pax_global_header00006660000000000000000000000064146434612730014524gustar00rootroot0000000000000052 comment=f50b46a5dc82eccfc4b49980c64a4886e084cf8b minify-2.20.37/000077500000000000000000000000001464346127300131725ustar00rootroot00000000000000minify-2.20.37/.ci/000077500000000000000000000000001464346127300136435ustar00rootroot00000000000000minify-2.20.37/.ci/ensure-go.sh000077500000000000000000000002731464346127300161100ustar00rootroot00000000000000if command -v dnf; then dnf -y install golang gcc elif command -v yum; then yum install epel-release yum -y install golang gcc elif command -v apk; then apk add go gcc fi minify-2.20.37/.gitattributes000066400000000000000000000001131464346127300160600ustar00rootroot00000000000000benchmarks/sample_* linguist-generated tests/*/corpus/* linguist-generated minify-2.20.37/.github/000077500000000000000000000000001464346127300145325ustar00rootroot00000000000000minify-2.20.37/.github/FUNDING.yml000066400000000000000000000000211464346127300163400ustar00rootroot00000000000000github: tdewolff minify-2.20.37/.github/dependabot.yml000066400000000000000000000005351464346127300173650ustar00rootroot00000000000000version: 2 updates: - package-ecosystem: gomod directory: / schedule: interval: daily - package-ecosystem: npm directory: /bindings/js versioning-strategy: increase schedule: interval: weekly - package-ecosystem: github-actions directory: / schedule: # Check for updates to GitHub Actions every weekday interval: daily minify-2.20.37/.github/workflows/000077500000000000000000000000001464346127300165675ustar00rootroot00000000000000minify-2.20.37/.github/workflows/cifuzz.yml000066400000000000000000000012671464346127300206320ustar00rootroot00000000000000name: CIFuzz on: [pull_request] jobs: Fuzzing: runs-on: ubuntu-latest steps: - name: Build Fuzzers id: build uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master with: oss-fuzz-project-name: 'minify' dry-run: false language: go - name: Run Fuzzers uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master with: oss-fuzz-project-name: 'minify' fuzz-seconds: 300 dry-run: false language: go - name: Upload Crash uses: actions/upload-artifact@v4 if: failure() && steps.build.outcome == 'success' with: name: artifacts path: ./out/artifacts minify-2.20.37/.github/workflows/docker.yml000066400000000000000000000012371464346127300205640ustar00rootroot00000000000000name: Docker on: push: tags: - 'v*' jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: docker/metadata-action@v5 id: meta with: images: tdewolff/minify tags: type=ref,event=tag - uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - uses: docker/setup-buildx-action@v3 - uses: docker/build-push-action@v6 with: context: . file: ./Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} minify-2.20.37/.github/workflows/go.yml000066400000000000000000000012251464346127300177170ustar00rootroot00000000000000name: Go on: push: branches: - master pull_request: branches: - master jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: '>=1.17' - name: Build run: go build -v ./... - name: Test run: go test -race -count=1 ./... golangci: name: lint runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: '>=1.17' - name: golangci-lint uses: golangci/golangci-lint-action@v6 continue-on-error: true with: version: latest minify-2.20.37/.github/workflows/nodejs.yml000066400000000000000000000043611464346127300206000ustar00rootroot00000000000000name: NodeJS on: push: tags: - 'v*' pull_request: branches: - master jobs: test: strategy: fail-fast: false matrix: #os: [ubuntu-latest, macos-latest, windows-latest] os: [ubuntu-latest, macos-latest] node: [16, 18, 20] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: '>=1.17' - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} - name: Install node-gyp run: npm install -g node-gyp - name: Build from source run: | cd bindings/js npm --version node --version npm ci --build-from-source npm test build: strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest] #os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: '>=1.17' - uses: actions/setup-node@v4 - name: Install node-gyp and prebuildify run: npm install --location=global node-gyp node-gyp-build node-api-headers prebuildify - name: Install dependencies run: | cd bindings/js npm install node-gyp-build node-api-headers - name: Build run: make -C bindings/js - name: Test run: | cd bindings/js npm test - uses: actions/upload-artifact@v4 with: name: ${{ matrix.os }}.node path: bindings/js/prebuilds/*/*.node deploy: if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') needs: [build] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: registry-url: 'https://registry.npmjs.org' - name: Install node-gyp and prebuildify run: npm install --location=global node-gyp node-gyp-build node-api-headers prebuildify - uses: actions/download-artifact@v4 with: path: bindings/js/prebuilds - name: Move artifacts run: cd bindings/js/prebuilds && mv */* . - name: Publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: make -C bindings/js publish minify-2.20.37/.github/workflows/python.yml000066400000000000000000000103251464346127300206340ustar00rootroot00000000000000name: Python on: push: tags: - 'v*' pull_request: branches: - master jobs: linux: runs-on: ubuntu-latest strategy: matrix: include: - go_target: amd64 cibw_target: x86_64 #- go_target:'386 # cibw_target: i686 - go_target: arm64 cibw_target: aarch64 steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up QEMU if: matrix.go_target == 'arm64' uses: docker/setup-qemu-action@v3 with: platforms: arm64 - name: Build wheels uses: pypa/cibuildwheel@v2.19.2 with: package-dir: bindings/py env: CIBW_ARCHS: ${{ matrix.cibw_target }} CIBW_MANYLINUX_I686_IMAGE: quay.io/pypa/manylinux_2_28_i686 CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux_2_28_x86_64 CIBW_MANYLINUX_AARCH64_IMAGE: quay.io/pypa/manylinux_2_28_aarch64 CIBW_BEFORE_ALL: .ci/ensure-go.sh; make -C bindings/py compile - name: Upload wheels uses: actions/upload-artifact@v4 with: name: wheels-linux-${{ matrix.go_target }} path: ./wheelhouse/*.whl windows: runs-on: windows-latest strategy: matrix: include: - go_target: amd64 cibw_target: AMD64 #- go_target: 386 # cibw_target: x86 #- go_target: arm64 # cibw_target: ARM64 steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: actions/setup-go@v5 with: go-version: '>=1.17' - name: Build Windows extension run: | set GOOS=windows set GOARCH=${{ matrix.go_target }} set CGO_ENABLED=1 make -C bindings/py compile - name: Build wheels uses: pypa/cibuildwheel@v2.19.2 with: package-dir: bindings/py env: CIBW_ARCHS: ${{ matrix.cibw_target }} - name: Upload wheels uses: actions/upload-artifact@v4 with: name: wheels-windows-${{ matrix.go_target }} path: ./wheelhouse/*.whl macos: runs-on: macos-latest strategy: matrix: include: - go_target: amd64 cibw_target: x86_64 #- go_target: arm64 # cibw_target: arm64 steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: actions/setup-go@v5 with: go-version: '>=1.17' - name: Build MacOS extension run: | export GOOS=darwin export GOARCH=${{ matrix.go_target }} export CGO_ENABLED=1 export MACOSX_DEPLOYMENT_TARGET=10.9 make -C bindings/py compile - name: Build wheels uses: pypa/cibuildwheel@v2.19.2 with: package-dir: bindings/py env: CIBW_ARCHS: ${{ matrix.cibw_target }} - name: Upload wheels uses: actions/upload-artifact@v4 with: name: wheels-macos-${{ matrix.go_target }} path: ./wheelhouse/*.whl sdist: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.11' - uses: actions/setup-go@v5 with: go-version: '>=1.17' - name: Install dependencies run: pip install build - name: Build package run: make -C bindings/py build - name: Upload sdist uses: actions/upload-artifact@v4 with: name: wheels path: bindings/py/dist/* release: if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') needs: [linux, windows, macos, sdist] runs-on: ubuntu-latest steps: - name: Download artifacts uses: actions/download-artifact@v4 with: path: bindings/py/artifacts - name: Bundle release artifacts run: | cd bindings/py/ mkdir dist mv artifacts/*/* dist/ - name: Upload to GitHub Release uses: softprops/action-gh-release@v2.0.6 with: files: bindings/py/dist/* - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} packages-dir: bindings/py/dist/ minify-2.20.37/.gitignore000066400000000000000000000012731464346127300151650ustar00rootroot00000000000000release.sh dist benchmarks/* !benchmarks/*.go !benchmarks/sample_* tests/*/fuzz-fuzz.zip tests/*/crashers tests/*/suppressions tests/*/corpus/* !tests/*/corpus/*.* parse/tests/*/fuzz-fuzz.zip parse/tests/*/crashers parse/tests/*/suppressions parse/tests/*/corpus/* !parse/tests/*/corpus/*.* bindings/js/build bindings/js/prebuilds bindings/js/minify.h bindings/js/minify.a bindings/js/node_modules bindings/js/example/package-lock.json bindings/js/example/node_modules bindings/js/example/test.min.html bindings/py/go.mod bindings/py/go.sum bindings/py/**/*.h bindings/py/**/*.so bindings/py/**/*.egg-info bindings/py/example/example.min.html bindings/py/dist bindings/py/build bindings/py/**/*.pyc minify-2.20.37/.golangci.yml000066400000000000000000000003031464346127300155520ustar00rootroot00000000000000linters: enable: - depguard - dogsled - gofmt - goimports - golint - gosec - govet - megacheck - misspell - nakedret - prealloc - unconvert - unparam - wastedassign minify-2.20.37/Dockerfile000066400000000000000000000007201464346127300151630ustar00rootroot00000000000000# Use this image to build the executable FROM golang:1.18-alpine AS build WORKDIR /go/src/github.com/tdewolff/minify COPY . /go/src/github.com/tdewolff/minify/ RUN apk add --no-cache git ca-certificates make bash RUN /usr/bin/env bash -c make install # Final image containing the executable from the previous step FROM alpine:3 COPY --from=build /go/bin/minify /usr/bin/minify COPY "containerfiles/container-entrypoint.sh" "/init.sh" ENTRYPOINT ["/init.sh"] minify-2.20.37/LICENSE000066400000000000000000000020621464346127300141770ustar00rootroot00000000000000Copyright (c) 2015 Taco de Wolff Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.minify-2.20.37/Makefile000066400000000000000000000027721464346127300146420ustar00rootroot00000000000000SHELL=/usr/bin/env bash NAME=minify CMD=./cmd/minify TARGETS=linux_amd64 linux_arm64 darwin_amd64 darwin_arm64 freebsd_amd64 netbsd_amd64 openbsd_amd64 windows_amd64 VERSION=`git describe --tags` FLAGS=-ldflags "-s -w -X 'main.Version=${VERSION}'" -trimpath ENVS=GO111MODULES=on CGO_ENABLED=0 all: install install: echo "Installing ${VERSION}" ${ENVS} go install ${FLAGS} ./cmd/minify . cmd/minify/bash_completion release: TAG=$(shell git describe --tags --exact-match 2> /dev/null); if [ "${.SHELLSTATUS}" -eq 0 ]; then \ echo "Releasing ${VERSION}"; \ else \ echo "ERROR: commit is not tagged with a version"; \ echo ""; \ exit 1; \ fi rm -rf dist mkdir -p dist for t in ${TARGETS}; do \ echo Building $$t...; \ mkdir dist/$$t; \ os=$$(echo $$t | cut -f1 -d_); \ arch=$$(echo $$t | cut -f2 -d_); \ ${ENVS} GOOS=$$os GOARCH=$$arch go build ${FLAGS} -o dist/$$t/${NAME} ${CMD}; \ \ cp LICENSE dist/$$t/.; \ cp cmd/minify/README.md dist/$$t/.; \ if [ "$$os" == "windows" ]; then \ mv dist/$$t/${NAME} dist/$$t/${NAME}.exe; \ zip -jq dist/${NAME}_$$t.zip dist/$$t/*; \ cd dist; \ sha256sum ${NAME}_$$t.zip >> checksums.txt; \ cd ..; \ else \ cp cmd/minify/bash_completion dist/$$t/.; \ cd dist/$$t; \ tar -cf - * | gzip -9 > ../${NAME}_$$t.tar.gz; \ cd ..; \ sha256sum ${NAME}_$$t.tar.gz >> checksums.txt; \ cd ..; \ fi; \ rm -rf dist/$$t; \ done clean: echo "Cleaning dist/" rm -rf dist .PHONY: install release clean .SILENT: install release clean minify-2.20.37/README.md000066400000000000000000001014741464346127300144600ustar00rootroot00000000000000# Minify [![API reference](https://img.shields.io/badge/godoc-reference-5272B4)](https://pkg.go.dev/github.com/tdewolff/minify/v2?tab=doc) [![Go Report Card](https://goreportcard.com/badge/github.com/tdewolff/minify)](https://goreportcard.com/report/github.com/tdewolff/minify) [![codecov](https://codecov.io/gh/tdewolff/minify/branch/master/graph/badge.svg?token=Cr7r2EKPj2)](https://codecov.io/gh/tdewolff/minify) **[Online demo](https://go.tacodewolff.nl/minify)** if you need to minify files *now*. **[Binaries](https://github.com/tdewolff/minify/releases) of CLI for various platforms.** See [CLI](https://github.com/tdewolff/minify/tree/master/cmd/minify) for more installation instructions. **[Windows binary from scoop](https://scoop.sh/#/apps?q=minify)** install with `scoop install main/minify` **[Python bindings](https://pypi.org/project/tdewolff-minify/)** install with `pip install tdewolff-minify` **[JavaScript bindings](https://www.npmjs.com/package/@tdewolff/minify)** install with `npm i @tdewolff/minify` **[.NET bindings](https://github.com/JKamsker/NMinify)** install with `Install-Package NMinify` or `dotnet add package NMinify`, thanks to Jonas Kamsker for the port --- *Did you know that the shortest valid piece of HTML5 is `x`? See for yourself at the [W3C Validator](http://validator.w3.org/)!* Minify is a minifier package written in [Go][1]. It provides HTML5, CSS3, JS, JSON, SVG and XML minifiers and an interface to implement any other minifier. Minification is the process of removing bytes from a file (such as whitespace) without changing its output and therefore shrinking its size and speeding up transmission over the internet and possibly parsing. The implemented minifiers are designed for high performance (see https://github.com/privatenumber/minification-benchmarks where this library is (one of) the fastest JS minifiers). The core functionality associates mimetypes with minification functions, allowing embedded resources (like CSS or JS within HTML files) to be minified as well. Users can add new implementations that are triggered based on a mimetype (or pattern), or redirect to an external command (like ClosureCompiler, UglifyCSS, ...). ### Sponsors I'm actively looking for support in the form of donations or sponsorships to keep developing this library and highly appreciate any gesture. Please see the Sponsors button in GitHub for ways to contribute, or contact me directly. [![SiteGround](https://www.siteground.com/img/downloads/siteground-logo-black-transparent-vector.svg)](https://www.siteground.com/) #### Table of Contents - [Minify](#minify) - [Prologue](#prologue) - [Installation](#installation) - [API stability](#api-stability) - [Testing](#testing) - [Performance](#performance) - [HTML](#html) - [Whitespace removal](#whitespace-removal) - [CSS](#css) - [JS](#js) - [Comparison with other tools](#comparison-with-other-tools) - [Compression ratio (lower is better)](#compression-ratio-lower-is-better) - [Time (lower is better)](#time-lower-is-better) - [JSON](#json) - [SVG](#svg) - [XML](#xml) - [Usage](#usage) - [New](#new) - [From reader](#from-reader) - [From bytes](#from-bytes) - [From string](#from-string) - [To reader](#to-reader) - [To writer](#to-writer) - [Middleware](#middleware) - [Custom minifier](#custom-minifier) - [Mediatypes](#mediatypes) - [Examples](#examples) - [Common minifiers](#common-minifiers) - [External minifiers](#external-minifiers) - [Closure Compiler](#closure-compiler) - [UglifyJS](#uglifyjs) - [esbuild](#esbuild) - [Custom minifier](#custom-minifier-example) - [ResponseWriter](#responsewriter) - [Templates](#templates) - [FAQ](#faq) - [License](#license) ### Roadmap - [ ] Use ASM/SSE to further speed-up core parts of the parsers/minifiers - [x] Improve JS minifiers by shortening variables and proper semicolon omission - [ ] Speed-up SVG minifier, it is very slow - [x] Proper parser error reporting and line number + column information - [ ] Generation of source maps (uncertain, might slow down parsers too much if it cannot run separately nicely) - [ ] Create a cmd to pack webfiles (much like webpack), ie. merging CSS and JS files, inlining small external files, minification and gzipping. This would work on HTML files. ## Prologue Minifiers or bindings to minifiers exist in almost all programming languages. Some implementations are merely using several regular expressions to trim whitespace and comments (even though regex for parsing HTML/XML is ill-advised, for a good read see [Regular Expressions: Now You Have Two Problems](http://blog.codinghorror.com/regular-expressions-now-you-have-two-problems/)). Some implementations are much more profound, such as the [YUI Compressor](http://yui.github.io/yuicompressor/) and [Google Closure Compiler](https://github.com/google/closure-compiler) for JS. As most existing implementations either use JavaScript, use regexes, and don't focus on performance, they are pretty slow. This minifier proves to be that fast and extensive minifier that can handle HTML and any other filetype it may contain (CSS, JS, ...). It is usually orders of magnitude faster than existing minifiers. ## Installation Make sure you have [Git](https://git-scm.com/) and [Go](https://golang.org/dl/) (1.18 or higher) installed, run ``` mkdir Project cd Project go mod init go get -u github.com/tdewolff/minify/v2 ``` Then add the following imports to be able to use the various minifiers ``` go import ( "github.com/tdewolff/minify/v2" "github.com/tdewolff/minify/v2/css" "github.com/tdewolff/minify/v2/html" "github.com/tdewolff/minify/v2/js" "github.com/tdewolff/minify/v2/json" "github.com/tdewolff/minify/v2/svg" "github.com/tdewolff/minify/v2/xml" ) ``` You can optionally run `go mod tidy` to clean up the `go.mod` and `go.sum` files. See [CLI tool](https://github.com/tdewolff/minify/tree/master/cmd/minify) for installation instructions of the binary. ### Docker If you want to use Docker, please see https://hub.docker.com/r/tdewolff/minify. ```bash $ docker run -it tdewolff/minify --help ``` ## API stability There is no guarantee for absolute stability, but I take issues and bugs seriously and don't take API changes lightly. The library will be maintained in a compatible way unless vital bugs prevent me from doing so. There has been one API change after v1 which added options support and I took the opportunity to push through some more API clean up as well. There are no plans whatsoever for future API changes. ## Testing For all subpackages and the imported `parse` package, test coverage of 100% is pursued. Besides full coverage, the minifiers are [fuzz tested](https://github.com/tdewolff/fuzz) using [github.com/dvyukov/go-fuzz](http://www.github.com/dvyukov/go-fuzz), see [the wiki](https://github.com/tdewolff/minify/wiki) for the most important bugs found by fuzz testing. These tests ensure that everything works as intended and that the code does not crash (whatever the input). If you still encounter a bug, please file a [bug report](https://github.com/tdewolff/minify/issues)! ## Performance The benchmarks directory contains a number of standardized samples used to compare performance between changes. To give an indication of the speed of this library, I've ran the tests on my Thinkpad T460 (i5-6300U quad-core 2.4GHz running Arch Linux) using Go 1.15. ``` name time/op CSS/sample_bootstrap.css-4 2.70ms ± 0% CSS/sample_gumby.css-4 3.57ms ± 0% CSS/sample_fontawesome.css-4 767µs ± 0% CSS/sample_normalize.css-4 85.5µs ± 0% HTML/sample_amazon.html-4 15.2ms ± 0% HTML/sample_bbc.html-4 3.90ms ± 0% HTML/sample_blogpost.html-4 420µs ± 0% HTML/sample_es6.html-4 15.6ms ± 0% HTML/sample_stackoverflow.html-4 3.73ms ± 0% HTML/sample_wikipedia.html-4 6.60ms ± 0% JS/sample_ace.js-4 28.7ms ± 0% JS/sample_dot.js-4 357µs ± 0% JS/sample_jquery.js-4 10.0ms ± 0% JS/sample_jqueryui.js-4 20.4ms ± 0% JS/sample_moment.js-4 3.47ms ± 0% JSON/sample_large.json-4 3.25ms ± 0% JSON/sample_testsuite.json-4 1.74ms ± 0% JSON/sample_twitter.json-4 24.2µs ± 0% SVG/sample_arctic.svg-4 34.7ms ± 0% SVG/sample_gopher.svg-4 307µs ± 0% SVG/sample_usa.svg-4 57.4ms ± 0% SVG/sample_car.svg-4 18.0ms ± 0% SVG/sample_tiger.svg-4 5.61ms ± 0% XML/sample_books.xml-4 54.7µs ± 0% XML/sample_catalog.xml-4 33.0µs ± 0% XML/sample_omg.xml-4 7.17ms ± 0% name speed CSS/sample_bootstrap.css-4 50.7MB/s ± 0% CSS/sample_gumby.css-4 52.1MB/s ± 0% CSS/sample_fontawesome.css-4 61.2MB/s ± 0% CSS/sample_normalize.css-4 70.8MB/s ± 0% HTML/sample_amazon.html-4 31.1MB/s ± 0% HTML/sample_bbc.html-4 29.5MB/s ± 0% HTML/sample_blogpost.html-4 49.8MB/s ± 0% HTML/sample_es6.html-4 65.6MB/s ± 0% HTML/sample_stackoverflow.html-4 55.0MB/s ± 0% HTML/sample_wikipedia.html-4 67.5MB/s ± 0% JS/sample_ace.js-4 22.4MB/s ± 0% JS/sample_dot.js-4 14.5MB/s ± 0% JS/sample_jquery.js-4 24.8MB/s ± 0% JS/sample_jqueryui.js-4 23.0MB/s ± 0% JS/sample_moment.js-4 28.6MB/s ± 0% JSON/sample_large.json-4 234MB/s ± 0% JSON/sample_testsuite.json-4 394MB/s ± 0% JSON/sample_twitter.json-4 63.0MB/s ± 0% SVG/sample_arctic.svg-4 42.4MB/s ± 0% SVG/sample_gopher.svg-4 19.0MB/s ± 0% SVG/sample_usa.svg-4 17.8MB/s ± 0% SVG/sample_car.svg-4 29.3MB/s ± 0% SVG/sample_tiger.svg-4 12.2MB/s ± 0% XML/sample_books.xml-4 81.0MB/s ± 0% XML/sample_catalog.xml-4 58.6MB/s ± 0% XML/sample_omg.xml-4 159MB/s ± 0% ``` ## HTML HTML (with JS and CSS) minification typically shaves off about 10%. The HTML5 minifier uses these minifications: - strip unnecessary whitespace and otherwise collapse it to one space (or newline if it originally contained a newline) - strip superfluous quotes, or uses single/double quotes whichever requires fewer escapes - strip default attribute values and attribute boolean values - strip some empty attributes - strip unrequired tags (`html`, `head`, `body`, ...) - strip unrequired end tags (`tr`, `td`, `li`, ... and often `p`) - strip default protocols (`http:`, `https:` and `javascript:`) - strip all comments (including conditional comments, old IE versions are not supported anymore by Microsoft) - shorten `doctype` and `meta` charset - lowercase tags, attributes and some values to enhance gzip compression Options: - `KeepSpecialComments` preserve all special comments, including Server Side Includes such as `` and IE conditional comments such as `` and ``, see https://msdn.microsoft.com/en-us/library/ms537512(v=vs.85).aspx#syntax - `KeepDefaultAttrVals` preserve default attribute values such as `` // Faulty JS req := httptest.NewRequest(http.MethodGet, "/", nil) rec := httptest.NewRecorder() m.Middleware(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "text/html") _, _ = w.Write([]byte(input)) if err = w.(io.Closer).Close(); err != nil { panic(err) } })).ServeHTTP(rec, req) } ``` #### ResponseWriter ``` go func Serve(w http.ResponseWriter, r *http.Request) { mw := m.ResponseWriter(w, r) defer mw.Close() w = mw http.ServeFile(w, r, path.Join("www", r.URL.Path)) } ``` #### Custom response writer ResponseWriter example which returns a ResponseWriter that minifies the content and then writes to the original ResponseWriter. Any write after applying this filter will be minified. ``` go type MinifyResponseWriter struct { http.ResponseWriter io.WriteCloser } func (m MinifyResponseWriter) Write(b []byte) (int, error) { return m.WriteCloser.Write(b) } // MinifyResponseWriter must be closed explicitly by calling site. func MinifyFilter(mediatype string, res http.ResponseWriter) MinifyResponseWriter { m := minify.New() // add minfiers mw := m.Writer(mediatype, res) return MinifyResponseWriter{res, mw} } ``` ``` go // Usage func(w http.ResponseWriter, req *http.Request) { w = MinifyFilter("text/html", w) if _, err := io.WriteString(w, "

This HTTP response will be minified.

"); err != nil { panic(err) } if err := w.Close(); err != nil { panic(err) } // Output:

This HTTP response will be minified. } ``` ### Templates Here's an example of a replacement for `template.ParseFiles` from `template/html`, which automatically minifies each template before parsing it. Be aware that minifying templates will work in most cases but not all. Because the HTML minifier only works for valid HTML5, your template must be valid HTML5 of itself. Template tags are parsed as regular text by the minifier. ``` go func compileTemplates(filenames ...string) (*template.Template, error) { m := minify.New() m.AddFunc("text/html", html.Minify) var tmpl *template.Template for _, filename := range filenames { name := filepath.Base(filename) if tmpl == nil { tmpl = template.New(name) } else { tmpl = tmpl.New(name) } b, err := ioutil.ReadFile(filename) if err != nil { return nil, err } mb, err := m.Bytes("text/html", b) if err != nil { return nil, err } tmpl.Parse(string(mb)) } return tmpl, nil } ``` Example usage: ``` go templates := template.Must(compileTemplates("view.html", "home.html")) ``` ## FAQ ### Newlines remain in minified output While you might expect the minified output to be on a single line for it to be fully minified, this is not true. In many cases, using a literal newline doesn't affect the file size, and in some cases it may even reduce the file size. A typical example is HTML. Whitespace is significant in HTML, meaning that spaces and newlines between or around tags may affect how they are displayed. There is no distinction between a space or a newline and they may be interchanged without affecting the displayed HTML. Remember that a space (0x20) and a newline (0x0A) are both one byte long, so that there is no difference in file size when interchanging them. This minifier removes unnecessary whitespace by replacing stretches of spaces and newlines by a single whitespace character. Specifically, if the stretch of white space characters contains a newline, it will replace it by a newline and otherwise by a space. This doesn't affect the file size, but may help somewhat for debugging or file transmission objectives. Another example is JavaScript. Single or double quoted string literals may not contain newline characters but instead need to escape them as `\n`. These are two bytes instead of a single newline byte. Using template literals it is allowed to have literal newline characters and we can use that fact to shave-off one byte! The result is that the minified output contains newlines instead of escaped newline characters, which makes the final file size smaller. Of course, changing from single or double quotes to template literals depends on other factors as well, and this minifier makes a calculation whether the template literal results in a shorter file size or not before converting a string literal. ## License Released under the [MIT license](LICENSE.md). [1]: http://golang.org/ "Go Language" minify-2.20.37/benchmarks/000077500000000000000000000000001464346127300153075ustar00rootroot00000000000000minify-2.20.37/benchmarks/benchmark_test.go000066400000000000000000000042661464346127300206370ustar00rootroot00000000000000package benchmarks import ( "io/ioutil" "runtime" "testing" "github.com/tdewolff/minify/v2/minify" "github.com/tdewolff/parse/v2" "github.com/tdewolff/parse/v2/buffer" ) func benchmark(b *testing.B, mediatype string, sample string) { m := minify.Default in, err := ioutil.ReadFile(sample) if err != nil { panic(err) } b.Run(sample, func(b *testing.B) { out := make([]byte, 0, len(in)) b.SetBytes(int64(len(in))) for i := 0; i < b.N; i++ { b.StopTimer() runtime.GC() r := buffer.NewReader(parse.Copy(in)) w := buffer.NewWriter(out[:0]) b.StartTimer() if err := m.Minify(mediatype, w, r); err != nil { b.Fatal(err) } } }) } func BenchmarkCSS(b *testing.B) { var samples = []string{ "sample_bootstrap.css", "sample_gumby.css", "sample_fontawesome.css", "sample_normalize.css", } for _, sample := range samples { benchmark(b, "text/css", sample) } } func BenchmarkHTML(b *testing.B) { var samples = []string{ "sample_amazon.html", "sample_bbc.html", "sample_blogpost.html", "sample_es6.html", "sample_stackoverflow.html", "sample_wikipedia.html", } for _, sample := range samples { benchmark(b, "text/html", sample) } } func BenchmarkJS(b *testing.B) { var samples = []string{ "sample_ace.js", "sample_antd.js", "sample_dot.js", "sample_echarts.js", "sample_jquery.js", "sample_jqueryui.js", "sample_moment.js", "sample_typescript.js", "sample_victory.js", } for _, sample := range samples { benchmark(b, "application/javascript", sample) } } func BenchmarkJSON(b *testing.B) { var samples = []string{ "sample_large.json", "sample_testsuite.json", "sample_twitter.json", } for _, sample := range samples { benchmark(b, "application/json", sample) } } func BenchmarkSVG(b *testing.B) { var samples = []string{ "sample_arctic.svg", "sample_gopher.svg", "sample_usa.svg", "sample_car.svg", "sample_tiger.svg", } for _, sample := range samples { benchmark(b, "image/svg+xml", sample) } } func BenchmarkXML(b *testing.B) { var samples = []string{ "sample_books.xml", "sample_catalog.xml", "sample_omg.xml", } for _, sample := range samples { benchmark(b, "application/xml", sample) } } minify-2.20.37/benchmarks/sample_ace.js000066400000000000000000023522161464346127300177510ustar00rootroot00000000000000/* ***** BEGIN LICENSE BLOCK ***** * Distributed under the BSD license: * * Copyright (c) 2010, Ajax.org B.V. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Ajax.org B.V. nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * ***** END LICENSE BLOCK ***** */ /** * Define a module along with a payload * @param module a name for the payload * @param payload a function to call with (require, exports, module) params */ (function() { var ACE_NAMESPACE = ""; var global = (function() { return this; })(); if (!global && typeof window != "undefined") global = window; // strict mode if (!ACE_NAMESPACE && typeof requirejs !== "undefined") return; var define = function(module, deps, payload) { if (typeof module !== "string") { if (define.original) define.original.apply(this, arguments); else { console.error("dropping module because define wasn\'t a string."); console.trace(); } return; } if (arguments.length == 2) payload = deps; if (!define.modules[module]) { define.payloads[module] = payload; define.modules[module] = null; } }; define.modules = {}; define.payloads = {}; /** * Get at functionality define()ed using the function above */ var _require = function(parentId, module, callback) { if (typeof module === "string") { var payload = lookup(parentId, module); if (payload != undefined) { callback && callback(); return payload; } } else if (Object.prototype.toString.call(module) === "[object Array]") { var params = []; for (var i = 0, l = module.length; i < l; ++i) { var dep = lookup(parentId, module[i]); if (dep == undefined && require.original) return; params.push(dep); } return callback && callback.apply(null, params) || true; } }; var require = function(module, callback) { var packagedModule = _require("", module, callback); if (packagedModule == undefined && require.original) return require.original.apply(this, arguments); return packagedModule; }; var normalizeModule = function(parentId, moduleName) { // normalize plugin requires if (moduleName.indexOf("!") !== -1) { var chunks = moduleName.split("!"); return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]); } // normalize relative requires if (moduleName.charAt(0) == ".") { var base = parentId.split("/").slice(0, -1).join("/"); moduleName = base + "/" + moduleName; while(moduleName.indexOf(".") !== -1 && previous != moduleName) { var previous = moduleName; moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); } } return moduleName; }; /** * Internal function to lookup moduleNames and resolve them by calling the * definition function if needed. */ var lookup = function(parentId, moduleName) { moduleName = normalizeModule(parentId, moduleName); var module = define.modules[moduleName]; if (!module) { module = define.payloads[moduleName]; if (typeof module === 'function') { var exports = {}; var mod = { id: moduleName, uri: '', exports: exports, packaged: true }; var req = function(module, callback) { return _require(moduleName, module, callback); }; var returnValue = module(req, exports, mod); exports = returnValue || mod.exports; define.modules[moduleName] = exports; delete define.payloads[moduleName]; } module = define.modules[moduleName] = exports || module; } return module; }; function exportAce(ns) { var root = global; if (ns) { if (!global[ns]) global[ns] = {}; root = global[ns]; } if (!root.define || !root.define.packaged) { define.original = root.define; root.define = define; root.define.packaged = true; } if (!root.require || !root.require.packaged) { require.original = root.require; root.require = require; root.require.packaged = true; } } exportAce(ACE_NAMESPACE); })(); define("ace/lib/regexp",["require","exports","module"], function(require, exports, module) { "use strict"; var real = { exec: RegExp.prototype.exec, test: RegExp.prototype.test, match: String.prototype.match, replace: String.prototype.replace, split: String.prototype.split }, compliantExecNpcg = real.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups compliantLastIndexIncrement = function () { var x = /^/g; real.test.call(x, ""); return !x.lastIndex; }(); if (compliantLastIndexIncrement && compliantExecNpcg) return; RegExp.prototype.exec = function (str) { var match = real.exec.apply(this, arguments), name, r2; if ( typeof(str) == 'string' && match) { if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) { r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), "g", "")); real.replace.call(str.slice(match.index), r2, function () { for (var i = 1; i < arguments.length - 2; i++) { if (arguments[i] === undefined) match[i] = undefined; } }); } if (this._xregexp && this._xregexp.captureNames) { for (var i = 1; i < match.length; i++) { name = this._xregexp.captureNames[i - 1]; if (name) match[name] = match[i]; } } if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index)) this.lastIndex--; } return match; }; if (!compliantLastIndexIncrement) { RegExp.prototype.test = function (str) { var match = real.exec.call(this, str); if (match && this.global && !match[0].length && (this.lastIndex > match.index)) this.lastIndex--; return !!match; }; } function getNativeFlags (regex) { return (regex.global ? "g" : "") + (regex.ignoreCase ? "i" : "") + (regex.multiline ? "m" : "") + (regex.extended ? "x" : "") + // Proposed for ES4; included in AS3 (regex.sticky ? "y" : ""); } function indexOf (array, item, from) { if (Array.prototype.indexOf) // Use the native array method if available return array.indexOf(item, from); for (var i = from || 0; i < array.length; i++) { if (array[i] === item) return i; } return -1; } }); define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) { function Empty() {} if (!Function.prototype.bind) { Function.prototype.bind = function bind(that) { // .length is 1 var target = this; if (typeof target != "function") { throw new TypeError("Function.prototype.bind called on incompatible " + target); } var args = slice.call(arguments, 1); // for normal call var bound = function () { if (this instanceof bound) { var result = target.apply( this, args.concat(slice.call(arguments)) ); if (Object(result) === result) { return result; } return this; } else { return target.apply( that, args.concat(slice.call(arguments)) ); } }; if(target.prototype) { Empty.prototype = target.prototype; bound.prototype = new Empty(); Empty.prototype = null; } return bound; }; } var call = Function.prototype.call; var prototypeOfArray = Array.prototype; var prototypeOfObject = Object.prototype; var slice = prototypeOfArray.slice; var _toString = call.bind(prototypeOfObject.toString); var owns = call.bind(prototypeOfObject.hasOwnProperty); var defineGetter; var defineSetter; var lookupGetter; var lookupSetter; var supportsAccessors; if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) { defineGetter = call.bind(prototypeOfObject.__defineGetter__); defineSetter = call.bind(prototypeOfObject.__defineSetter__); lookupGetter = call.bind(prototypeOfObject.__lookupGetter__); lookupSetter = call.bind(prototypeOfObject.__lookupSetter__); } if ([1,2].splice(0).length != 2) { if(function() { // test IE < 9 to splice bug - see issue #138 function makeArray(l) { var a = new Array(l+2); a[0] = a[1] = 0; return a; } var array = [], lengthBefore; array.splice.apply(array, makeArray(20)); array.splice.apply(array, makeArray(26)); lengthBefore = array.length; //46 array.splice(5, 0, "XXX"); // add one element lengthBefore + 1 == array.length if (lengthBefore + 1 == array.length) { return true;// has right splice implementation without bugs } }()) {//IE 6/7 var array_splice = Array.prototype.splice; Array.prototype.splice = function(start, deleteCount) { if (!arguments.length) { return []; } else { return array_splice.apply(this, [ start === void 0 ? 0 : start, deleteCount === void 0 ? (this.length - start) : deleteCount ].concat(slice.call(arguments, 2))) } }; } else {//IE8 Array.prototype.splice = function(pos, removeCount){ var length = this.length; if (pos > 0) { if (pos > length) pos = length; } else if (pos == void 0) { pos = 0; } else if (pos < 0) { pos = Math.max(length + pos, 0); } if (!(pos+removeCount < length)) removeCount = length - pos; var removed = this.slice(pos, pos+removeCount); var insert = slice.call(arguments, 2); var add = insert.length; if (pos === length) { if (add) { this.push.apply(this, insert); } } else { var remove = Math.min(removeCount, length - pos); var tailOldPos = pos + remove; var tailNewPos = tailOldPos + add - remove; var tailCount = length - tailOldPos; var lengthAfterRemove = length - remove; if (tailNewPos < tailOldPos) { // case A for (var i = 0; i < tailCount; ++i) { this[tailNewPos+i] = this[tailOldPos+i]; } } else if (tailNewPos > tailOldPos) { // case B for (i = tailCount; i--; ) { this[tailNewPos+i] = this[tailOldPos+i]; } } // else, add == remove (nothing to do) if (add && pos === lengthAfterRemove) { this.length = lengthAfterRemove; // truncate array this.push.apply(this, insert); } else { this.length = lengthAfterRemove + add; // reserves space for (i = 0; i < add; ++i) { this[pos+i] = insert[i]; } } } return removed; }; } } if (!Array.isArray) { Array.isArray = function isArray(obj) { return _toString(obj) == "[object Array]"; }; } var boxedString = Object("a"), splitString = boxedString[0] != "a" || !(0 in boxedString); if (!Array.prototype.forEach) { Array.prototype.forEach = function forEach(fun /*, thisp*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, thisp = arguments[1], i = -1, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(); // TODO message } while (++i < length) { if (i in self) { fun.call(thisp, self[i], i, object); } } }; } if (!Array.prototype.map) { Array.prototype.map = function map(fun /*, thisp*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, result = Array(length), thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self) result[i] = fun.call(thisp, self[i], i, object); } return result; }; } if (!Array.prototype.filter) { Array.prototype.filter = function filter(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, result = [], value, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self) { value = self[i]; if (fun.call(thisp, value, i, object)) { result.push(value); } } } return result; }; } if (!Array.prototype.every) { Array.prototype.every = function every(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self && !fun.call(thisp, self[i], i, object)) { return false; } } return true; }; } if (!Array.prototype.some) { Array.prototype.some = function some(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self && fun.call(thisp, self[i], i, object)) { return true; } } return false; }; } if (!Array.prototype.reduce) { Array.prototype.reduce = function reduce(fun /*, initial*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } if (!length && arguments.length == 1) { throw new TypeError("reduce of empty array with no initial value"); } var i = 0; var result; if (arguments.length >= 2) { result = arguments[1]; } else { do { if (i in self) { result = self[i++]; break; } if (++i >= length) { throw new TypeError("reduce of empty array with no initial value"); } } while (true); } for (; i < length; i++) { if (i in self) { result = fun.call(void 0, result, self[i], i, object); } } return result; }; } if (!Array.prototype.reduceRight) { Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } if (!length && arguments.length == 1) { throw new TypeError("reduceRight of empty array with no initial value"); } var result, i = length - 1; if (arguments.length >= 2) { result = arguments[1]; } else { do { if (i in self) { result = self[i--]; break; } if (--i < 0) { throw new TypeError("reduceRight of empty array with no initial value"); } } while (true); } do { if (i in this) { result = fun.call(void 0, result, self[i], i, object); } } while (i--); return result; }; } if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) { Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) { var self = splitString && _toString(this) == "[object String]" ? this.split("") : toObject(this), length = self.length >>> 0; if (!length) { return -1; } var i = 0; if (arguments.length > 1) { i = toInteger(arguments[1]); } i = i >= 0 ? i : Math.max(0, length + i); for (; i < length; i++) { if (i in self && self[i] === sought) { return i; } } return -1; }; } if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) { Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) { var self = splitString && _toString(this) == "[object String]" ? this.split("") : toObject(this), length = self.length >>> 0; if (!length) { return -1; } var i = length - 1; if (arguments.length > 1) { i = Math.min(i, toInteger(arguments[1])); } i = i >= 0 ? i : length - Math.abs(i); for (; i >= 0; i--) { if (i in self && sought === self[i]) { return i; } } return -1; }; } if (!Object.getPrototypeOf) { Object.getPrototypeOf = function getPrototypeOf(object) { return object.__proto__ || ( object.constructor ? object.constructor.prototype : prototypeOfObject ); }; } if (!Object.getOwnPropertyDescriptor) { var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " + "non-object: "; Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) { if ((typeof object != "object" && typeof object != "function") || object === null) throw new TypeError(ERR_NON_OBJECT + object); if (!owns(object, property)) return; var descriptor, getter, setter; descriptor = { enumerable: true, configurable: true }; if (supportsAccessors) { var prototype = object.__proto__; object.__proto__ = prototypeOfObject; var getter = lookupGetter(object, property); var setter = lookupSetter(object, property); object.__proto__ = prototype; if (getter || setter) { if (getter) descriptor.get = getter; if (setter) descriptor.set = setter; return descriptor; } } descriptor.value = object[property]; return descriptor; }; } if (!Object.getOwnPropertyNames) { Object.getOwnPropertyNames = function getOwnPropertyNames(object) { return Object.keys(object); }; } if (!Object.create) { var createEmpty; if (Object.prototype.__proto__ === null) { createEmpty = function () { return { "__proto__": null }; }; } else { createEmpty = function () { var empty = {}; for (var i in empty) empty[i] = null; empty.constructor = empty.hasOwnProperty = empty.propertyIsEnumerable = empty.isPrototypeOf = empty.toLocaleString = empty.toString = empty.valueOf = empty.__proto__ = null; return empty; } } Object.create = function create(prototype, properties) { var object; if (prototype === null) { object = createEmpty(); } else { if (typeof prototype != "object") throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'"); var Type = function () {}; Type.prototype = prototype; object = new Type(); object.__proto__ = prototype; } if (properties !== void 0) Object.defineProperties(object, properties); return object; }; } function doesDefinePropertyWork(object) { try { Object.defineProperty(object, "sentinel", {}); return "sentinel" in object; } catch (exception) { } } if (Object.defineProperty) { var definePropertyWorksOnObject = doesDefinePropertyWork({}); var definePropertyWorksOnDom = typeof document == "undefined" || doesDefinePropertyWork(document.createElement("div")); if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) { var definePropertyFallback = Object.defineProperty; } } if (!Object.defineProperty || definePropertyFallback) { var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: "; var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: " var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " + "on this javascript engine"; Object.defineProperty = function defineProperty(object, property, descriptor) { if ((typeof object != "object" && typeof object != "function") || object === null) throw new TypeError(ERR_NON_OBJECT_TARGET + object); if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null) throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor); if (definePropertyFallback) { try { return definePropertyFallback.call(Object, object, property, descriptor); } catch (exception) { } } if (owns(descriptor, "value")) { if (supportsAccessors && (lookupGetter(object, property) || lookupSetter(object, property))) { var prototype = object.__proto__; object.__proto__ = prototypeOfObject; delete object[property]; object[property] = descriptor.value; object.__proto__ = prototype; } else { object[property] = descriptor.value; } } else { if (!supportsAccessors) throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); if (owns(descriptor, "get")) defineGetter(object, property, descriptor.get); if (owns(descriptor, "set")) defineSetter(object, property, descriptor.set); } return object; }; } if (!Object.defineProperties) { Object.defineProperties = function defineProperties(object, properties) { for (var property in properties) { if (owns(properties, property)) Object.defineProperty(object, property, properties[property]); } return object; }; } if (!Object.seal) { Object.seal = function seal(object) { return object; }; } if (!Object.freeze) { Object.freeze = function freeze(object) { return object; }; } try { Object.freeze(function () {}); } catch (exception) { Object.freeze = (function freeze(freezeObject) { return function freeze(object) { if (typeof object == "function") { return object; } else { return freezeObject(object); } }; })(Object.freeze); } if (!Object.preventExtensions) { Object.preventExtensions = function preventExtensions(object) { return object; }; } if (!Object.isSealed) { Object.isSealed = function isSealed(object) { return false; }; } if (!Object.isFrozen) { Object.isFrozen = function isFrozen(object) { return false; }; } if (!Object.isExtensible) { Object.isExtensible = function isExtensible(object) { if (Object(object) === object) { throw new TypeError(); // TODO message } var name = ''; while (owns(object, name)) { name += '?'; } object[name] = true; var returnValue = owns(object, name); delete object[name]; return returnValue; }; } if (!Object.keys) { var hasDontEnumBug = true, dontEnums = [ "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor" ], dontEnumsLength = dontEnums.length; for (var key in {"toString": null}) { hasDontEnumBug = false; } Object.keys = function keys(object) { if ( (typeof object != "object" && typeof object != "function") || object === null ) { throw new TypeError("Object.keys called on a non-object"); } var keys = []; for (var name in object) { if (owns(object, name)) { keys.push(name); } } if (hasDontEnumBug) { for (var i = 0, ii = dontEnumsLength; i < ii; i++) { var dontEnum = dontEnums[i]; if (owns(object, dontEnum)) { keys.push(dontEnum); } } } return keys; }; } if (!Date.now) { Date.now = function now() { return new Date().getTime(); }; } var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" + "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" + "\u2029\uFEFF"; if (!String.prototype.trim || ws.trim()) { ws = "[" + ws + "]"; var trimBeginRegexp = new RegExp("^" + ws + ws + "*"), trimEndRegexp = new RegExp(ws + ws + "*$"); String.prototype.trim = function trim() { return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, ""); }; } function toInteger(n) { n = +n; if (n !== n) { // isNaN n = 0; } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) { n = (n > 0 || -1) * Math.floor(Math.abs(n)); } return n; } function isPrimitive(input) { var type = typeof input; return ( input === null || type === "undefined" || type === "boolean" || type === "number" || type === "string" ); } function toPrimitive(input) { var val, valueOf, toString; if (isPrimitive(input)) { return input; } valueOf = input.valueOf; if (typeof valueOf === "function") { val = valueOf.call(input); if (isPrimitive(val)) { return val; } } toString = input.toString; if (typeof toString === "function") { val = toString.call(input); if (isPrimitive(val)) { return val; } } throw new TypeError(); } var toObject = function (o) { if (o == null) { // this matches both null and undefined throw new TypeError("can't convert "+o+" to object"); } return Object(o); }; }); define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"], function(require, exports, module) { "use strict"; require("./regexp"); require("./es5-shim"); }); define("ace/lib/dom",["require","exports","module"], function(require, exports, module) { "use strict"; var XHTML_NS = "http://www.w3.org/1999/xhtml"; exports.getDocumentHead = function(doc) { if (!doc) doc = document; return doc.head || doc.getElementsByTagName("head")[0] || doc.documentElement; }; exports.createElement = function(tag, ns) { return document.createElementNS ? document.createElementNS(ns || XHTML_NS, tag) : document.createElement(tag); }; exports.hasCssClass = function(el, name) { var classes = (el.className || "").split(/\s+/g); return classes.indexOf(name) !== -1; }; exports.addCssClass = function(el, name) { if (!exports.hasCssClass(el, name)) { el.className += " " + name; } }; exports.removeCssClass = function(el, name) { var classes = el.className.split(/\s+/g); while (true) { var index = classes.indexOf(name); if (index == -1) { break; } classes.splice(index, 1); } el.className = classes.join(" "); }; exports.toggleCssClass = function(el, name) { var classes = el.className.split(/\s+/g), add = true; while (true) { var index = classes.indexOf(name); if (index == -1) { break; } add = false; classes.splice(index, 1); } if (add) classes.push(name); el.className = classes.join(" "); return add; }; exports.setCssClass = function(node, className, include) { if (include) { exports.addCssClass(node, className); } else { exports.removeCssClass(node, className); } }; exports.hasCssString = function(id, doc) { var index = 0, sheets; doc = doc || document; if (doc.createStyleSheet && (sheets = doc.styleSheets)) { while (index < sheets.length) if (sheets[index++].owningElement.id === id) return true; } else if ((sheets = doc.getElementsByTagName("style"))) { while (index < sheets.length) if (sheets[index++].id === id) return true; } return false; }; exports.importCssString = function importCssString(cssText, id, doc) { doc = doc || document; if (id && exports.hasCssString(id, doc)) return null; var style; if (id) cssText += "\n/*# sourceURL=ace/css/" + id + " */"; if (doc.createStyleSheet) { style = doc.createStyleSheet(); style.cssText = cssText; if (id) style.owningElement.id = id; } else { style = exports.createElement("style"); style.appendChild(doc.createTextNode(cssText)); if (id) style.id = id; exports.getDocumentHead(doc).appendChild(style); } }; exports.importCssStylsheet = function(uri, doc) { if (doc.createStyleSheet) { doc.createStyleSheet(uri); } else { var link = exports.createElement('link'); link.rel = 'stylesheet'; link.href = uri; exports.getDocumentHead(doc).appendChild(link); } }; exports.getInnerWidth = function(element) { return ( parseInt(exports.computedStyle(element, "paddingLeft"), 10) + parseInt(exports.computedStyle(element, "paddingRight"), 10) + element.clientWidth ); }; exports.getInnerHeight = function(element) { return ( parseInt(exports.computedStyle(element, "paddingTop"), 10) + parseInt(exports.computedStyle(element, "paddingBottom"), 10) + element.clientHeight ); }; exports.scrollbarWidth = function(document) { var inner = exports.createElement("ace_inner"); inner.style.width = "100%"; inner.style.minWidth = "0px"; inner.style.height = "200px"; inner.style.display = "block"; var outer = exports.createElement("ace_outer"); var style = outer.style; style.position = "absolute"; style.left = "-10000px"; style.overflow = "hidden"; style.width = "200px"; style.minWidth = "0px"; style.height = "150px"; style.display = "block"; outer.appendChild(inner); var body = document.documentElement; body.appendChild(outer); var noScrollbar = inner.offsetWidth; style.overflow = "scroll"; var withScrollbar = inner.offsetWidth; if (noScrollbar == withScrollbar) { withScrollbar = outer.clientWidth; } body.removeChild(outer); return noScrollbar-withScrollbar; }; if (typeof document == "undefined") { exports.importCssString = function() {}; return; } if (window.pageYOffset !== undefined) { exports.getPageScrollTop = function() { return window.pageYOffset; }; exports.getPageScrollLeft = function() { return window.pageXOffset; }; } else { exports.getPageScrollTop = function() { return document.body.scrollTop; }; exports.getPageScrollLeft = function() { return document.body.scrollLeft; }; } if (window.getComputedStyle) exports.computedStyle = function(element, style) { if (style) return (window.getComputedStyle(element, "") || {})[style] || ""; return window.getComputedStyle(element, "") || {}; }; else exports.computedStyle = function(element, style) { if (style) return element.currentStyle[style]; return element.currentStyle; }; exports.setInnerHtml = function(el, innerHtml) { var element = el.cloneNode(false);//document.createElement("div"); element.innerHTML = innerHtml; el.parentNode.replaceChild(element, el); return element; }; if ("textContent" in document.documentElement) { exports.setInnerText = function(el, innerText) { el.textContent = innerText; }; exports.getInnerText = function(el) { return el.textContent; }; } else { exports.setInnerText = function(el, innerText) { el.innerText = innerText; }; exports.getInnerText = function(el) { return el.innerText; }; } exports.getParentWindow = function(document) { return document.defaultView || document.parentWindow; }; }); define("ace/lib/oop",["require","exports","module"], function(require, exports, module) { "use strict"; exports.inherits = function(ctor, superCtor) { ctor.super_ = superCtor; ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }; exports.mixin = function(obj, mixin) { for (var key in mixin) { obj[key] = mixin[key]; } return obj; }; exports.implement = function(proto, mixin) { exports.mixin(proto, mixin); }; }); define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"], function(require, exports, module) { "use strict"; require("./fixoldbrowsers"); var oop = require("./oop"); var Keys = (function() { var ret = { MODIFIER_KEYS: { 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta' }, KEY_MODS: { "ctrl": 1, "alt": 2, "option" : 2, "shift": 4, "super": 8, "meta": 8, "command": 8, "cmd": 8 }, FUNCTION_KEYS : { 8 : "Backspace", 9 : "Tab", 13 : "Return", 19 : "Pause", 27 : "Esc", 32 : "Space", 33 : "PageUp", 34 : "PageDown", 35 : "End", 36 : "Home", 37 : "Left", 38 : "Up", 39 : "Right", 40 : "Down", 44 : "Print", 45 : "Insert", 46 : "Delete", 96 : "Numpad0", 97 : "Numpad1", 98 : "Numpad2", 99 : "Numpad3", 100: "Numpad4", 101: "Numpad5", 102: "Numpad6", 103: "Numpad7", 104: "Numpad8", 105: "Numpad9", '-13': "NumpadEnter", 112: "F1", 113: "F2", 114: "F3", 115: "F4", 116: "F5", 117: "F6", 118: "F7", 119: "F8", 120: "F9", 121: "F10", 122: "F11", 123: "F12", 144: "Numlock", 145: "Scrolllock" }, PRINTABLE_KEYS: { 32: ' ', 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5', 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', 61: '=', 65: 'a', 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h', 73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o', 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v', 87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.', 186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`', 219: '[', 220: '\\',221: ']', 222: "'", 111: '/', 106: '*' } }; var name, i; for (i in ret.FUNCTION_KEYS) { name = ret.FUNCTION_KEYS[i].toLowerCase(); ret[name] = parseInt(i, 10); } for (i in ret.PRINTABLE_KEYS) { name = ret.PRINTABLE_KEYS[i].toLowerCase(); ret[name] = parseInt(i, 10); } oop.mixin(ret, ret.MODIFIER_KEYS); oop.mixin(ret, ret.PRINTABLE_KEYS); oop.mixin(ret, ret.FUNCTION_KEYS); ret.enter = ret["return"]; ret.escape = ret.esc; ret.del = ret["delete"]; ret[173] = '-'; (function() { var mods = ["cmd", "ctrl", "alt", "shift"]; for (var i = Math.pow(2, mods.length); i--;) { ret.KEY_MODS[i] = mods.filter(function(x) { return i & ret.KEY_MODS[x]; }).join("-") + "-"; } })(); ret.KEY_MODS[0] = ""; ret.KEY_MODS[-1] = "input-"; return ret; })(); oop.mixin(exports, Keys); exports.keyCodeToString = function(keyCode) { var keyString = Keys[keyCode]; if (typeof keyString != "string") keyString = String.fromCharCode(keyCode); return keyString.toLowerCase(); }; }); define("ace/lib/useragent",["require","exports","module"], function(require, exports, module) { "use strict"; exports.OS = { LINUX: "LINUX", MAC: "MAC", WINDOWS: "WINDOWS" }; exports.getOS = function() { if (exports.isMac) { return exports.OS.MAC; } else if (exports.isLinux) { return exports.OS.LINUX; } else { return exports.OS.WINDOWS; } }; if (typeof navigator != "object") return; var os = (navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase(); var ua = navigator.userAgent; exports.isWin = (os == "win"); exports.isMac = (os == "mac"); exports.isLinux = (os == "linux"); exports.isIE = (navigator.appName == "Microsoft Internet Explorer" || navigator.appName.indexOf("MSAppHost") >= 0) ? parseFloat((ua.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]) : parseFloat((ua.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]); // for ie exports.isOldIE = exports.isIE && exports.isIE < 9; exports.isGecko = exports.isMozilla = (window.Controllers || window.controllers) && window.navigator.product === "Gecko"; exports.isOldGecko = exports.isGecko && parseInt((ua.match(/rv\:(\d+)/)||[])[1], 10) < 4; exports.isOpera = window.opera && Object.prototype.toString.call(window.opera) == "[object Opera]"; exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined; exports.isChrome = parseFloat(ua.split(" Chrome/")[1]) || undefined; exports.isAIR = ua.indexOf("AdobeAIR") >= 0; exports.isIPad = ua.indexOf("iPad") >= 0; exports.isTouchPad = ua.indexOf("TouchPad") >= 0; exports.isChromeOS = ua.indexOf(" CrOS ") >= 0; }); define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(require, exports, module) { "use strict"; var keys = require("./keys"); var useragent = require("./useragent"); var pressedKeys = null; var ts = 0; exports.addListener = function(elem, type, callback) { if (elem.addEventListener) { return elem.addEventListener(type, callback, false); } if (elem.attachEvent) { var wrapper = function() { callback.call(elem, window.event); }; callback._wrapper = wrapper; elem.attachEvent("on" + type, wrapper); } }; exports.removeListener = function(elem, type, callback) { if (elem.removeEventListener) { return elem.removeEventListener(type, callback, false); } if (elem.detachEvent) { elem.detachEvent("on" + type, callback._wrapper || callback); } }; exports.stopEvent = function(e) { exports.stopPropagation(e); exports.preventDefault(e); return false; }; exports.stopPropagation = function(e) { if (e.stopPropagation) e.stopPropagation(); else e.cancelBubble = true; }; exports.preventDefault = function(e) { if (e.preventDefault) e.preventDefault(); else e.returnValue = false; }; exports.getButton = function(e) { if (e.type == "dblclick") return 0; if (e.type == "contextmenu" || (useragent.isMac && (e.ctrlKey && !e.altKey && !e.shiftKey))) return 2; if (e.preventDefault) { return e.button; } else { return {1:0, 2:2, 4:1}[e.button]; } }; exports.capture = function(el, eventHandler, releaseCaptureHandler) { function onMouseUp(e) { eventHandler && eventHandler(e); releaseCaptureHandler && releaseCaptureHandler(e); exports.removeListener(document, "mousemove", eventHandler, true); exports.removeListener(document, "mouseup", onMouseUp, true); exports.removeListener(document, "dragstart", onMouseUp, true); } exports.addListener(document, "mousemove", eventHandler, true); exports.addListener(document, "mouseup", onMouseUp, true); exports.addListener(document, "dragstart", onMouseUp, true); return onMouseUp; }; exports.addTouchMoveListener = function (el, callback) { if ("ontouchmove" in el) { var startx, starty; exports.addListener(el, "touchstart", function (e) { var touchObj = e.changedTouches[0]; startx = touchObj.clientX; starty = touchObj.clientY; }); exports.addListener(el, "touchmove", function (e) { var factor = 1, touchObj = e.changedTouches[0]; e.wheelX = -(touchObj.clientX - startx) / factor; e.wheelY = -(touchObj.clientY - starty) / factor; startx = touchObj.clientX; starty = touchObj.clientY; callback(e); }); } }; exports.addMouseWheelListener = function(el, callback) { if ("onmousewheel" in el) { exports.addListener(el, "mousewheel", function(e) { var factor = 8; if (e.wheelDeltaX !== undefined) { e.wheelX = -e.wheelDeltaX / factor; e.wheelY = -e.wheelDeltaY / factor; } else { e.wheelX = 0; e.wheelY = -e.wheelDelta / factor; } callback(e); }); } else if ("onwheel" in el) { exports.addListener(el, "wheel", function(e) { var factor = 0.35; switch (e.deltaMode) { case e.DOM_DELTA_PIXEL: e.wheelX = e.deltaX * factor || 0; e.wheelY = e.deltaY * factor || 0; break; case e.DOM_DELTA_LINE: case e.DOM_DELTA_PAGE: e.wheelX = (e.deltaX || 0) * 5; e.wheelY = (e.deltaY || 0) * 5; break; } callback(e); }); } else { exports.addListener(el, "DOMMouseScroll", function(e) { if (e.axis && e.axis == e.HORIZONTAL_AXIS) { e.wheelX = (e.detail || 0) * 5; e.wheelY = 0; } else { e.wheelX = 0; e.wheelY = (e.detail || 0) * 5; } callback(e); }); } }; exports.addMultiMouseDownListener = function(el, timeouts, eventHandler, callbackName) { var clicks = 0; var startX, startY, timer; var eventNames = { 2: "dblclick", 3: "tripleclick", 4: "quadclick" }; exports.addListener(el, "mousedown", function(e) { if (exports.getButton(e) !== 0) { clicks = 0; } else if (e.detail > 1) { clicks++; if (clicks > 4) clicks = 1; } else { clicks = 1; } if (useragent.isIE) { var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5; if (!timer || isNewClick) clicks = 1; if (timer) clearTimeout(timer); timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600); if (clicks == 1) { startX = e.clientX; startY = e.clientY; } } e._clicks = clicks; eventHandler[callbackName]("mousedown", e); if (clicks > 4) clicks = 0; else if (clicks > 1) return eventHandler[callbackName](eventNames[clicks], e); }); if (useragent.isOldIE) { exports.addListener(el, "dblclick", function(e) { clicks = 2; if (timer) clearTimeout(timer); timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600); eventHandler[callbackName]("mousedown", e); eventHandler[callbackName](eventNames[clicks], e); }); } }; var getModifierHash = useragent.isMac && useragent.isOpera && !("KeyboardEvent" in window) ? function(e) { return 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0); } : function(e) { return 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0); }; exports.getModifierString = function(e) { return keys.KEY_MODS[getModifierHash(e)]; }; function normalizeCommandKeys(callback, e, keyCode) { var hashId = getModifierHash(e); if (!useragent.isMac && pressedKeys) { if (pressedKeys.OSKey) hashId |= 8; if (pressedKeys.altGr) { if ((3 & hashId) != 3) pressedKeys.altGr = 0; else return; } if (keyCode === 18 || keyCode === 17) { var location = "location" in e ? e.location : e.keyLocation; if (keyCode === 17 && location === 1) { if (pressedKeys[keyCode] == 1) ts = e.timeStamp; } else if (keyCode === 18 && hashId === 3 && location === 2) { var dt = e.timeStamp - ts; if (dt < 50) pressedKeys.altGr = true; } } } if (keyCode in keys.MODIFIER_KEYS) { keyCode = -1; } if (hashId & 8 && (keyCode >= 91 && keyCode <= 93)) { keyCode = -1; } if (!hashId && keyCode === 13) { var location = "location" in e ? e.location : e.keyLocation; if (location === 3) { callback(e, hashId, -keyCode); if (e.defaultPrevented) return; } } if (useragent.isChromeOS && hashId & 8) { callback(e, hashId, keyCode); if (e.defaultPrevented) return; else hashId &= ~8; } if (!hashId && !(keyCode in keys.FUNCTION_KEYS) && !(keyCode in keys.PRINTABLE_KEYS)) { return false; } return callback(e, hashId, keyCode); } exports.addCommandKeyListener = function(el, callback) { var addListener = exports.addListener; if (useragent.isOldGecko || (useragent.isOpera && !("KeyboardEvent" in window))) { var lastKeyDownKeyCode = null; addListener(el, "keydown", function(e) { lastKeyDownKeyCode = e.keyCode; }); addListener(el, "keypress", function(e) { return normalizeCommandKeys(callback, e, lastKeyDownKeyCode); }); } else { var lastDefaultPrevented = null; addListener(el, "keydown", function(e) { var keyCode = e.keyCode; pressedKeys[keyCode] = (pressedKeys[keyCode] || 0) + 1; if (keyCode == 91 || keyCode == 92) { pressedKeys.OSKey = true; } else if (pressedKeys.OSKey) { if (e.timeStamp - pressedKeys.lastT > 200 && pressedKeys.count == 1) resetPressedKeys(); } if (pressedKeys[keyCode] == 1) pressedKeys.count++; pressedKeys.lastT = e.timeStamp; var result = normalizeCommandKeys(callback, e, keyCode); lastDefaultPrevented = e.defaultPrevented; return result; }); addListener(el, "keypress", function(e) { if (lastDefaultPrevented && (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey)) { exports.stopEvent(e); lastDefaultPrevented = null; } }); addListener(el, "keyup", function(e) { var keyCode = e.keyCode; if (!pressedKeys[keyCode]) { resetPressedKeys(); } else { pressedKeys.count = Math.max(pressedKeys.count - 1, 0); } if (keyCode == 91 || keyCode == 92) { pressedKeys.OSKey = false; } pressedKeys[keyCode] = null; }); if (!pressedKeys) { resetPressedKeys(); addListener(window, "focus", resetPressedKeys); } } }; function resetPressedKeys() { pressedKeys = Object.create(null); pressedKeys.count = 0; pressedKeys.lastT = 0; } if (typeof window == "object" && window.postMessage && !useragent.isOldIE) { var postMessageId = 1; exports.nextTick = function(callback, win) { win = win || window; var messageName = "zero-timeout-message-" + postMessageId; exports.addListener(win, "message", function listener(e) { if (e.data == messageName) { exports.stopPropagation(e); exports.removeListener(win, "message", listener); callback(); } }); win.postMessage(messageName, "*"); }; } exports.nextFrame = typeof window == "object" && (window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame); if (exports.nextFrame) exports.nextFrame = exports.nextFrame.bind(window); else exports.nextFrame = function(callback) { setTimeout(callback, 17); }; }); define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { "use strict"; exports.last = function(a) { return a[a.length - 1]; }; exports.stringReverse = function(string) { return string.split("").reverse().join(""); }; exports.stringRepeat = function (string, count) { var result = ''; while (count > 0) { if (count & 1) result += string; if (count >>= 1) string += string; } return result; }; var trimBeginRegexp = /^\s\s*/; var trimEndRegexp = /\s\s*$/; exports.stringTrimLeft = function (string) { return string.replace(trimBeginRegexp, ''); }; exports.stringTrimRight = function (string) { return string.replace(trimEndRegexp, ''); }; exports.copyObject = function(obj) { var copy = {}; for (var key in obj) { copy[key] = obj[key]; } return copy; }; exports.copyArray = function(array){ var copy = []; for (var i=0, l=array.length; i 1); return ev.preventDefault(); }; this.startSelect = function(pos, waitForClickSelection) { pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y); var editor = this.editor; editor.$blockScrolling++; if (this.mousedownEvent.getShiftKey()) editor.selection.selectToPosition(pos); else if (!waitForClickSelection) editor.selection.moveToPosition(pos); if (!waitForClickSelection) this.select(); if (editor.renderer.scroller.setCapture) { editor.renderer.scroller.setCapture(); } editor.setStyle("ace_selecting"); this.setState("select"); editor.$blockScrolling--; }; this.select = function() { var anchor, editor = this.editor; var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y); editor.$blockScrolling++; if (this.$clickSelection) { var cmp = this.$clickSelection.comparePoint(cursor); if (cmp == -1) { anchor = this.$clickSelection.end; } else if (cmp == 1) { anchor = this.$clickSelection.start; } else { var orientedRange = calcRangeOrientation(this.$clickSelection, cursor); cursor = orientedRange.cursor; anchor = orientedRange.anchor; } editor.selection.setSelectionAnchor(anchor.row, anchor.column); } editor.selection.selectToPosition(cursor); editor.$blockScrolling--; editor.renderer.scrollCursorIntoView(); }; this.extendSelectionBy = function(unitName) { var anchor, editor = this.editor; var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y); var range = editor.selection[unitName](cursor.row, cursor.column); editor.$blockScrolling++; if (this.$clickSelection) { var cmpStart = this.$clickSelection.comparePoint(range.start); var cmpEnd = this.$clickSelection.comparePoint(range.end); if (cmpStart == -1 && cmpEnd <= 0) { anchor = this.$clickSelection.end; if (range.end.row != cursor.row || range.end.column != cursor.column) cursor = range.start; } else if (cmpEnd == 1 && cmpStart >= 0) { anchor = this.$clickSelection.start; if (range.start.row != cursor.row || range.start.column != cursor.column) cursor = range.end; } else if (cmpStart == -1 && cmpEnd == 1) { cursor = range.end; anchor = range.start; } else { var orientedRange = calcRangeOrientation(this.$clickSelection, cursor); cursor = orientedRange.cursor; anchor = orientedRange.anchor; } editor.selection.setSelectionAnchor(anchor.row, anchor.column); } editor.selection.selectToPosition(cursor); editor.$blockScrolling--; editor.renderer.scrollCursorIntoView(); }; this.selectEnd = this.selectAllEnd = this.selectByWordsEnd = this.selectByLinesEnd = function() { this.$clickSelection = null; this.editor.unsetStyle("ace_selecting"); if (this.editor.renderer.scroller.releaseCapture) { this.editor.renderer.scroller.releaseCapture(); } }; this.focusWait = function() { var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); var time = Date.now(); if (distance > DRAG_OFFSET || time - this.mousedownEvent.time > this.$focusTimout) this.startSelect(this.mousedownEvent.getDocumentPosition()); }; this.onDoubleClick = function(ev) { var pos = ev.getDocumentPosition(); var editor = this.editor; var session = editor.session; var range = session.getBracketRange(pos); if (range) { if (range.isEmpty()) { range.start.column--; range.end.column++; } this.setState("select"); } else { range = editor.selection.getWordRange(pos.row, pos.column); this.setState("selectByWords"); } this.$clickSelection = range; this.select(); }; this.onTripleClick = function(ev) { var pos = ev.getDocumentPosition(); var editor = this.editor; this.setState("selectByLines"); var range = editor.getSelectionRange(); if (range.isMultiLine() && range.contains(pos.row, pos.column)) { this.$clickSelection = editor.selection.getLineRange(range.start.row); this.$clickSelection.end = editor.selection.getLineRange(range.end.row).end; } else { this.$clickSelection = editor.selection.getLineRange(pos.row); } this.select(); }; this.onQuadClick = function(ev) { var editor = this.editor; editor.selectAll(); this.$clickSelection = editor.getSelectionRange(); this.setState("selectAll"); }; this.onMouseWheel = function(ev) { if (ev.getAccelKey()) return; if (ev.getShiftKey() && ev.wheelY && !ev.wheelX) { ev.wheelX = ev.wheelY; ev.wheelY = 0; } var t = ev.domEvent.timeStamp; var dt = t - (this.$lastScrollTime||0); var editor = this.editor; var isScrolable = editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); if (isScrolable || dt < 200) { this.$lastScrollTime = t; editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); return ev.stop(); } }; this.onTouchMove = function (ev) { var t = ev.domEvent.timeStamp; var dt = t - (this.$lastScrollTime || 0); var editor = this.editor; var isScrolable = editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); if (isScrolable || dt < 200) { this.$lastScrollTime = t; editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); return ev.stop(); } }; }).call(DefaultHandlers.prototype); exports.DefaultHandlers = DefaultHandlers; function calcDistance(ax, ay, bx, by) { return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2)); } function calcRangeOrientation(range, cursor) { if (range.start.row == range.end.row) var cmp = 2 * cursor.column - range.start.column - range.end.column; else if (range.start.row == range.end.row - 1 && !range.start.column && !range.end.column) var cmp = cursor.column - 4; else var cmp = 2 * cursor.row - range.start.row - range.end.row; if (cmp < 0) return {cursor: range.start, anchor: range.end}; else return {cursor: range.end, anchor: range.start}; } }); define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var dom = require("./lib/dom"); function Tooltip (parentNode) { this.isOpen = false; this.$element = null; this.$parentNode = parentNode; } (function() { this.$init = function() { this.$element = dom.createElement("div"); this.$element.className = "ace_tooltip"; this.$element.style.display = "none"; this.$parentNode.appendChild(this.$element); return this.$element; }; this.getElement = function() { return this.$element || this.$init(); }; this.setText = function(text) { dom.setInnerText(this.getElement(), text); }; this.setHtml = function(html) { this.getElement().innerHTML = html; }; this.setPosition = function(x, y) { this.getElement().style.left = x + "px"; this.getElement().style.top = y + "px"; }; this.setClassName = function(className) { dom.addCssClass(this.getElement(), className); }; this.show = function(text, x, y) { if (text != null) this.setText(text); if (x != null && y != null) this.setPosition(x, y); if (!this.isOpen) { this.getElement().style.display = "block"; this.isOpen = true; } }; this.hide = function() { if (this.isOpen) { this.getElement().style.display = "none"; this.isOpen = false; } }; this.getHeight = function() { return this.getElement().offsetHeight; }; this.getWidth = function() { return this.getElement().offsetWidth; }; }).call(Tooltip.prototype); exports.Tooltip = Tooltip; }); define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"], function(require, exports, module) { "use strict"; var dom = require("../lib/dom"); var oop = require("../lib/oop"); var event = require("../lib/event"); var Tooltip = require("../tooltip").Tooltip; function GutterHandler(mouseHandler) { var editor = mouseHandler.editor; var gutter = editor.renderer.$gutterLayer; var tooltip = new GutterTooltip(editor.container); mouseHandler.editor.setDefaultHandler("guttermousedown", function(e) { if (!editor.isFocused() || e.getButton() != 0) return; var gutterRegion = gutter.getRegion(e); if (gutterRegion == "foldWidgets") return; var row = e.getDocumentPosition().row; var selection = editor.session.selection; if (e.getShiftKey()) selection.selectTo(row, 0); else { if (e.domEvent.detail == 2) { editor.selectAll(); return e.preventDefault(); } mouseHandler.$clickSelection = editor.selection.getLineRange(row); } mouseHandler.setState("selectByLines"); mouseHandler.captureMouse(e); return e.preventDefault(); }); var tooltipTimeout, mouseEvent, tooltipAnnotation; function showTooltip() { var row = mouseEvent.getDocumentPosition().row; var annotation = gutter.$annotations[row]; if (!annotation) return hideTooltip(); var maxRow = editor.session.getLength(); if (row == maxRow) { var screenRow = editor.renderer.pixelToScreenCoordinates(0, mouseEvent.y).row; var pos = mouseEvent.$pos; if (screenRow > editor.session.documentToScreenRow(pos.row, pos.column)) return hideTooltip(); } if (tooltipAnnotation == annotation) return; tooltipAnnotation = annotation.text.join("
"); tooltip.setHtml(tooltipAnnotation); tooltip.show(); editor.on("mousewheel", hideTooltip); if (mouseHandler.$tooltipFollowsMouse) { moveTooltip(mouseEvent); } else { var gutterElement = mouseEvent.domEvent.target; var rect = gutterElement.getBoundingClientRect(); var style = tooltip.getElement().style; style.left = rect.right + "px"; style.top = rect.bottom + "px"; } } function hideTooltip() { if (tooltipTimeout) tooltipTimeout = clearTimeout(tooltipTimeout); if (tooltipAnnotation) { tooltip.hide(); tooltipAnnotation = null; editor.removeEventListener("mousewheel", hideTooltip); } } function moveTooltip(e) { tooltip.setPosition(e.x, e.y); } mouseHandler.editor.setDefaultHandler("guttermousemove", function(e) { var target = e.domEvent.target || e.domEvent.srcElement; if (dom.hasCssClass(target, "ace_fold-widget")) return hideTooltip(); if (tooltipAnnotation && mouseHandler.$tooltipFollowsMouse) moveTooltip(e); mouseEvent = e; if (tooltipTimeout) return; tooltipTimeout = setTimeout(function() { tooltipTimeout = null; if (mouseEvent && !mouseHandler.isMousePressed) showTooltip(); else hideTooltip(); }, 50); }); event.addListener(editor.renderer.$gutter, "mouseout", function(e) { mouseEvent = null; if (!tooltipAnnotation || tooltipTimeout) return; tooltipTimeout = setTimeout(function() { tooltipTimeout = null; hideTooltip(); }, 50); }); editor.on("changeSession", hideTooltip); } function GutterTooltip(parentNode) { Tooltip.call(this, parentNode); } oop.inherits(GutterTooltip, Tooltip); (function(){ this.setPosition = function(x, y) { var windowWidth = window.innerWidth || document.documentElement.clientWidth; var windowHeight = window.innerHeight || document.documentElement.clientHeight; var width = this.getWidth(); var height = this.getHeight(); x += 15; y += 15; if (x + width > windowWidth) { x -= (x + width) - windowWidth; } if (y + height > windowHeight) { y -= 20 + height; } Tooltip.prototype.setPosition.call(this, x, y); }; }).call(GutterTooltip.prototype); exports.GutterHandler = GutterHandler; }); define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(require, exports, module) { "use strict"; var event = require("../lib/event"); var useragent = require("../lib/useragent"); var MouseEvent = exports.MouseEvent = function(domEvent, editor) { this.domEvent = domEvent; this.editor = editor; this.x = this.clientX = domEvent.clientX; this.y = this.clientY = domEvent.clientY; this.$pos = null; this.$inSelection = null; this.propagationStopped = false; this.defaultPrevented = false; }; (function() { this.stopPropagation = function() { event.stopPropagation(this.domEvent); this.propagationStopped = true; }; this.preventDefault = function() { event.preventDefault(this.domEvent); this.defaultPrevented = true; }; this.stop = function() { this.stopPropagation(); this.preventDefault(); }; this.getDocumentPosition = function() { if (this.$pos) return this.$pos; this.$pos = this.editor.renderer.screenToTextCoordinates(this.clientX, this.clientY); return this.$pos; }; this.inSelection = function() { if (this.$inSelection !== null) return this.$inSelection; var editor = this.editor; var selectionRange = editor.getSelectionRange(); if (selectionRange.isEmpty()) this.$inSelection = false; else { var pos = this.getDocumentPosition(); this.$inSelection = selectionRange.contains(pos.row, pos.column); } return this.$inSelection; }; this.getButton = function() { return event.getButton(this.domEvent); }; this.getShiftKey = function() { return this.domEvent.shiftKey; }; this.getAccelKey = useragent.isMac ? function() { return this.domEvent.metaKey; } : function() { return this.domEvent.ctrlKey; }; }).call(MouseEvent.prototype); }); define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"], function(require, exports, module) { "use strict"; var dom = require("../lib/dom"); var event = require("../lib/event"); var useragent = require("../lib/useragent"); var AUTOSCROLL_DELAY = 200; var SCROLL_CURSOR_DELAY = 200; var SCROLL_CURSOR_HYSTERESIS = 5; function DragdropHandler(mouseHandler) { var editor = mouseHandler.editor; var blankImage = dom.createElement("img"); blankImage.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; if (useragent.isOpera) blankImage.style.cssText = "width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"; var exports = ["dragWait", "dragWaitEnd", "startDrag", "dragReadyEnd", "onMouseDrag"]; exports.forEach(function(x) { mouseHandler[x] = this[x]; }, this); editor.addEventListener("mousedown", this.onMouseDown.bind(mouseHandler)); var mouseTarget = editor.container; var dragSelectionMarker, x, y; var timerId, range; var dragCursor, counter = 0; var dragOperation; var isInternal; var autoScrollStartTime; var cursorMovedTime; var cursorPointOnCaretMoved; this.onDragStart = function(e) { if (this.cancelDrag || !mouseTarget.draggable) { var self = this; setTimeout(function(){ self.startSelect(); self.captureMouse(e); }, 0); return e.preventDefault(); } range = editor.getSelectionRange(); var dataTransfer = e.dataTransfer; dataTransfer.effectAllowed = editor.getReadOnly() ? "copy" : "copyMove"; if (useragent.isOpera) { editor.container.appendChild(blankImage); blankImage.scrollTop = 0; } dataTransfer.setDragImage && dataTransfer.setDragImage(blankImage, 0, 0); if (useragent.isOpera) { editor.container.removeChild(blankImage); } dataTransfer.clearData(); dataTransfer.setData("Text", editor.session.getTextRange()); isInternal = true; this.setState("drag"); }; this.onDragEnd = function(e) { mouseTarget.draggable = false; isInternal = false; this.setState(null); if (!editor.getReadOnly()) { var dropEffect = e.dataTransfer.dropEffect; if (!dragOperation && dropEffect == "move") editor.session.remove(editor.getSelectionRange()); editor.renderer.$cursorLayer.setBlinking(true); } this.editor.unsetStyle("ace_dragging"); this.editor.renderer.setCursorStyle(""); }; this.onDragEnter = function(e) { if (editor.getReadOnly() || !canAccept(e.dataTransfer)) return; x = e.clientX; y = e.clientY; if (!dragSelectionMarker) addDragMarker(); counter++; e.dataTransfer.dropEffect = dragOperation = getDropEffect(e); return event.preventDefault(e); }; this.onDragOver = function(e) { if (editor.getReadOnly() || !canAccept(e.dataTransfer)) return; x = e.clientX; y = e.clientY; if (!dragSelectionMarker) { addDragMarker(); counter++; } if (onMouseMoveTimer !== null) onMouseMoveTimer = null; e.dataTransfer.dropEffect = dragOperation = getDropEffect(e); return event.preventDefault(e); }; this.onDragLeave = function(e) { counter--; if (counter <= 0 && dragSelectionMarker) { clearDragMarker(); dragOperation = null; return event.preventDefault(e); } }; this.onDrop = function(e) { if (!dragCursor) return; var dataTransfer = e.dataTransfer; if (isInternal) { switch (dragOperation) { case "move": if (range.contains(dragCursor.row, dragCursor.column)) { range = { start: dragCursor, end: dragCursor }; } else { range = editor.moveText(range, dragCursor); } break; case "copy": range = editor.moveText(range, dragCursor, true); break; } } else { var dropData = dataTransfer.getData('Text'); range = { start: dragCursor, end: editor.session.insert(dragCursor, dropData) }; editor.focus(); dragOperation = null; } clearDragMarker(); return event.preventDefault(e); }; event.addListener(mouseTarget, "dragstart", this.onDragStart.bind(mouseHandler)); event.addListener(mouseTarget, "dragend", this.onDragEnd.bind(mouseHandler)); event.addListener(mouseTarget, "dragenter", this.onDragEnter.bind(mouseHandler)); event.addListener(mouseTarget, "dragover", this.onDragOver.bind(mouseHandler)); event.addListener(mouseTarget, "dragleave", this.onDragLeave.bind(mouseHandler)); event.addListener(mouseTarget, "drop", this.onDrop.bind(mouseHandler)); function scrollCursorIntoView(cursor, prevCursor) { var now = Date.now(); var vMovement = !prevCursor || cursor.row != prevCursor.row; var hMovement = !prevCursor || cursor.column != prevCursor.column; if (!cursorMovedTime || vMovement || hMovement) { editor.$blockScrolling += 1; editor.moveCursorToPosition(cursor); editor.$blockScrolling -= 1; cursorMovedTime = now; cursorPointOnCaretMoved = {x: x, y: y}; } else { var distance = calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y); if (distance > SCROLL_CURSOR_HYSTERESIS) { cursorMovedTime = null; } else if (now - cursorMovedTime >= SCROLL_CURSOR_DELAY) { editor.renderer.scrollCursorIntoView(); cursorMovedTime = null; } } } function autoScroll(cursor, prevCursor) { var now = Date.now(); var lineHeight = editor.renderer.layerConfig.lineHeight; var characterWidth = editor.renderer.layerConfig.characterWidth; var editorRect = editor.renderer.scroller.getBoundingClientRect(); var offsets = { x: { left: x - editorRect.left, right: editorRect.right - x }, y: { top: y - editorRect.top, bottom: editorRect.bottom - y } }; var nearestXOffset = Math.min(offsets.x.left, offsets.x.right); var nearestYOffset = Math.min(offsets.y.top, offsets.y.bottom); var scrollCursor = {row: cursor.row, column: cursor.column}; if (nearestXOffset / characterWidth <= 2) { scrollCursor.column += (offsets.x.left < offsets.x.right ? -3 : +2); } if (nearestYOffset / lineHeight <= 1) { scrollCursor.row += (offsets.y.top < offsets.y.bottom ? -1 : +1); } var vScroll = cursor.row != scrollCursor.row; var hScroll = cursor.column != scrollCursor.column; var vMovement = !prevCursor || cursor.row != prevCursor.row; if (vScroll || (hScroll && !vMovement)) { if (!autoScrollStartTime) autoScrollStartTime = now; else if (now - autoScrollStartTime >= AUTOSCROLL_DELAY) editor.renderer.scrollCursorIntoView(scrollCursor); } else { autoScrollStartTime = null; } } function onDragInterval() { var prevCursor = dragCursor; dragCursor = editor.renderer.screenToTextCoordinates(x, y); scrollCursorIntoView(dragCursor, prevCursor); autoScroll(dragCursor, prevCursor); } function addDragMarker() { range = editor.selection.toOrientedRange(); dragSelectionMarker = editor.session.addMarker(range, "ace_selection", editor.getSelectionStyle()); editor.clearSelection(); if (editor.isFocused()) editor.renderer.$cursorLayer.setBlinking(false); clearInterval(timerId); onDragInterval(); timerId = setInterval(onDragInterval, 20); counter = 0; event.addListener(document, "mousemove", onMouseMove); } function clearDragMarker() { clearInterval(timerId); editor.session.removeMarker(dragSelectionMarker); dragSelectionMarker = null; editor.$blockScrolling += 1; editor.selection.fromOrientedRange(range); editor.$blockScrolling -= 1; if (editor.isFocused() && !isInternal) editor.renderer.$cursorLayer.setBlinking(!editor.getReadOnly()); range = null; dragCursor = null; counter = 0; autoScrollStartTime = null; cursorMovedTime = null; event.removeListener(document, "mousemove", onMouseMove); } var onMouseMoveTimer = null; function onMouseMove() { if (onMouseMoveTimer == null) { onMouseMoveTimer = setTimeout(function() { if (onMouseMoveTimer != null && dragSelectionMarker) clearDragMarker(); }, 20); } } function canAccept(dataTransfer) { var types = dataTransfer.types; return !types || Array.prototype.some.call(types, function(type) { return type == 'text/plain' || type == 'Text'; }); } function getDropEffect(e) { var copyAllowed = ['copy', 'copymove', 'all', 'uninitialized']; var moveAllowed = ['move', 'copymove', 'linkmove', 'all', 'uninitialized']; var copyModifierState = useragent.isMac ? e.altKey : e.ctrlKey; var effectAllowed = "uninitialized"; try { effectAllowed = e.dataTransfer.effectAllowed.toLowerCase(); } catch (e) {} var dropEffect = "none"; if (copyModifierState && copyAllowed.indexOf(effectAllowed) >= 0) dropEffect = "copy"; else if (moveAllowed.indexOf(effectAllowed) >= 0) dropEffect = "move"; else if (copyAllowed.indexOf(effectAllowed) >= 0) dropEffect = "copy"; return dropEffect; } } (function() { this.dragWait = function() { var interval = Date.now() - this.mousedownEvent.time; if (interval > this.editor.getDragDelay()) this.startDrag(); }; this.dragWaitEnd = function() { var target = this.editor.container; target.draggable = false; this.startSelect(this.mousedownEvent.getDocumentPosition()); this.selectEnd(); }; this.dragReadyEnd = function(e) { this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()); this.editor.unsetStyle("ace_dragging"); this.editor.renderer.setCursorStyle(""); this.dragWaitEnd(); }; this.startDrag = function(){ this.cancelDrag = false; var editor = this.editor; var target = editor.container; target.draggable = true; editor.renderer.$cursorLayer.setBlinking(false); editor.setStyle("ace_dragging"); var cursorStyle = useragent.isWin ? "default" : "move"; editor.renderer.setCursorStyle(cursorStyle); this.setState("dragReady"); }; this.onMouseDrag = function(e) { var target = this.editor.container; if (useragent.isIE && this.state == "dragReady") { var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); if (distance > 3) target.dragDrop(); } if (this.state === "dragWait") { var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); if (distance > 0) { target.draggable = false; this.startSelect(this.mousedownEvent.getDocumentPosition()); } } }; this.onMouseDown = function(e) { if (!this.$dragEnabled) return; this.mousedownEvent = e; var editor = this.editor; var inSelection = e.inSelection(); var button = e.getButton(); var clickCount = e.domEvent.detail || 1; if (clickCount === 1 && button === 0 && inSelection) { if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey())) return; this.mousedownEvent.time = Date.now(); var eventTarget = e.domEvent.target || e.domEvent.srcElement; if ("unselectable" in eventTarget) eventTarget.unselectable = "on"; if (editor.getDragDelay()) { if (useragent.isWebKit) { this.cancelDrag = true; var mouseTarget = editor.container; mouseTarget.draggable = true; } this.setState("dragWait"); } else { this.startDrag(); } this.captureMouse(e, this.onMouseDrag.bind(this)); e.defaultPrevented = true; } }; }).call(DragdropHandler.prototype); function calcDistance(ax, ay, bx, by) { return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2)); } exports.DragdropHandler = DragdropHandler; }); define("ace/lib/net",["require","exports","module","ace/lib/dom"], function(require, exports, module) { "use strict"; var dom = require("./dom"); exports.get = function (url, callback) { var xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.onreadystatechange = function () { if (xhr.readyState === 4) { callback(xhr.responseText); } }; xhr.send(null); }; exports.loadScript = function(path, callback) { var head = dom.getDocumentHead(); var s = document.createElement('script'); s.src = path; head.appendChild(s); s.onload = s.onreadystatechange = function(_, isAbort) { if (isAbort || !s.readyState || s.readyState == "loaded" || s.readyState == "complete") { s = s.onload = s.onreadystatechange = null; if (!isAbort) callback(); } }; }; exports.qualifyURL = function(url) { var a = document.createElement('a'); a.href = url; return a.href; } }); define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) { "use strict"; var EventEmitter = {}; var stopPropagation = function() { this.propagationStopped = true; }; var preventDefault = function() { this.defaultPrevented = true; }; EventEmitter._emit = EventEmitter._dispatchEvent = function(eventName, e) { this._eventRegistry || (this._eventRegistry = {}); this._defaultHandlers || (this._defaultHandlers = {}); var listeners = this._eventRegistry[eventName] || []; var defaultHandler = this._defaultHandlers[eventName]; if (!listeners.length && !defaultHandler) return; if (typeof e != "object" || !e) e = {}; if (!e.type) e.type = eventName; if (!e.stopPropagation) e.stopPropagation = stopPropagation; if (!e.preventDefault) e.preventDefault = preventDefault; listeners = listeners.slice(); for (var i=0; i 1) base = parts[parts.length - 2]; var path = options[component + "Path"]; if (path == null) { path = options.basePath; } else if (sep == "/") { component = sep = ""; } if (path && path.slice(-1) != "/") path += "/"; return path + component + sep + base + this.get("suffix"); }; exports.setModuleUrl = function(name, subst) { return options.$moduleUrls[name] = subst; }; exports.$loading = {}; exports.loadModule = function(moduleName, onLoad) { var module, moduleType; if (Array.isArray(moduleName)) { moduleType = moduleName[0]; moduleName = moduleName[1]; } try { module = require(moduleName); } catch (e) {} if (module && !exports.$loading[moduleName]) return onLoad && onLoad(module); if (!exports.$loading[moduleName]) exports.$loading[moduleName] = []; exports.$loading[moduleName].push(onLoad); if (exports.$loading[moduleName].length > 1) return; var afterLoad = function() { require([moduleName], function(module) { exports._emit("load.module", {name: moduleName, module: module}); var listeners = exports.$loading[moduleName]; exports.$loading[moduleName] = null; listeners.forEach(function(onLoad) { onLoad && onLoad(module); }); }); }; if (!exports.get("packaged")) return afterLoad(); net.loadScript(exports.moduleUrl(moduleName, moduleType), afterLoad); }; init(true);function init(packaged) { options.packaged = packaged || require.packaged || module.packaged || (global.define && define.packaged); if (!global.document) return ""; var scriptOptions = {}; var scriptUrl = ""; var currentScript = (document.currentScript || document._currentScript ); // native or polyfill var currentDocument = currentScript && currentScript.ownerDocument || document; var scripts = currentDocument.getElementsByTagName("script"); for (var i=0; i [" + this.end.row + "/" + this.end.column + "]"); }; this.contains = function(row, column) { return this.compare(row, column) == 0; }; this.compareRange = function(range) { var cmp, end = range.end, start = range.start; cmp = this.compare(end.row, end.column); if (cmp == 1) { cmp = this.compare(start.row, start.column); if (cmp == 1) { return 2; } else if (cmp == 0) { return 1; } else { return 0; } } else if (cmp == -1) { return -2; } else { cmp = this.compare(start.row, start.column); if (cmp == -1) { return -1; } else if (cmp == 1) { return 42; } else { return 0; } } }; this.comparePoint = function(p) { return this.compare(p.row, p.column); }; this.containsRange = function(range) { return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; }; this.intersects = function(range) { var cmp = this.compareRange(range); return (cmp == -1 || cmp == 0 || cmp == 1); }; this.isEnd = function(row, column) { return this.end.row == row && this.end.column == column; }; this.isStart = function(row, column) { return this.start.row == row && this.start.column == column; }; this.setStart = function(row, column) { if (typeof row == "object") { this.start.column = row.column; this.start.row = row.row; } else { this.start.row = row; this.start.column = column; } }; this.setEnd = function(row, column) { if (typeof row == "object") { this.end.column = row.column; this.end.row = row.row; } else { this.end.row = row; this.end.column = column; } }; this.inside = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column) || this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.insideStart = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column)) { return false; } else { return true; } } return false; }; this.insideEnd = function(row, column) { if (this.compare(row, column) == 0) { if (this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.compare = function(row, column) { if (!this.isMultiLine()) { if (row === this.start.row) { return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); }; } if (row < this.start.row) return -1; if (row > this.end.row) return 1; if (this.start.row === row) return column >= this.start.column ? 0 : -1; if (this.end.row === row) return column <= this.end.column ? 0 : 1; return 0; }; this.compareStart = function(row, column) { if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.compareEnd = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else { return this.compare(row, column); } }; this.compareInside = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.clipRows = function(firstRow, lastRow) { if (this.end.row > lastRow) var end = {row: lastRow + 1, column: 0}; else if (this.end.row < firstRow) var end = {row: firstRow, column: 0}; if (this.start.row > lastRow) var start = {row: lastRow + 1, column: 0}; else if (this.start.row < firstRow) var start = {row: firstRow, column: 0}; return Range.fromPoints(start || this.start, end || this.end); }; this.extend = function(row, column) { var cmp = this.compare(row, column); if (cmp == 0) return this; else if (cmp == -1) var start = {row: row, column: column}; else var end = {row: row, column: column}; return Range.fromPoints(start || this.start, end || this.end); }; this.isEmpty = function() { return (this.start.row === this.end.row && this.start.column === this.end.column); }; this.isMultiLine = function() { return (this.start.row !== this.end.row); }; this.clone = function() { return Range.fromPoints(this.start, this.end); }; this.collapseRows = function() { if (this.end.column == 0) return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0) else return new Range(this.start.row, 0, this.end.row, 0) }; this.toScreenRange = function(session) { var screenPosStart = session.documentToScreenPosition(this.start); var screenPosEnd = session.documentToScreenPosition(this.end); return new Range( screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column ); }; this.moveBy = function(row, column) { this.start.row += row; this.start.column += column; this.end.row += row; this.end.column += column; }; }).call(Range.prototype); Range.fromPoints = function(start, end) { return new Range(start.row, start.column, end.row, end.column); }; Range.comparePoints = comparePoints; Range.comparePoints = function(p1, p2) { return p1.row - p2.row || p1.column - p2.column; }; exports.Range = Range; }); define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var lang = require("./lib/lang"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Range = require("./range").Range; var Selection = function(session) { this.session = session; this.doc = session.getDocument(); this.clearSelection(); this.lead = this.selectionLead = this.doc.createAnchor(0, 0); this.anchor = this.selectionAnchor = this.doc.createAnchor(0, 0); var self = this; this.lead.on("change", function(e) { self._emit("changeCursor"); if (!self.$isEmpty) self._emit("changeSelection"); if (!self.$keepDesiredColumnOnChange && e.old.column != e.value.column) self.$desiredColumn = null; }); this.selectionAnchor.on("change", function() { if (!self.$isEmpty) self._emit("changeSelection"); }); }; (function() { oop.implement(this, EventEmitter); this.isEmpty = function() { return (this.$isEmpty || ( this.anchor.row == this.lead.row && this.anchor.column == this.lead.column )); }; this.isMultiLine = function() { if (this.isEmpty()) { return false; } return this.getRange().isMultiLine(); }; this.getCursor = function() { return this.lead.getPosition(); }; this.setSelectionAnchor = function(row, column) { this.anchor.setPosition(row, column); if (this.$isEmpty) { this.$isEmpty = false; this._emit("changeSelection"); } }; this.getSelectionAnchor = function() { if (this.$isEmpty) return this.getSelectionLead(); else return this.anchor.getPosition(); }; this.getSelectionLead = function() { return this.lead.getPosition(); }; this.shiftSelection = function(columns) { if (this.$isEmpty) { this.moveCursorTo(this.lead.row, this.lead.column + columns); return; } var anchor = this.getSelectionAnchor(); var lead = this.getSelectionLead(); var isBackwards = this.isBackwards(); if (!isBackwards || anchor.column !== 0) this.setSelectionAnchor(anchor.row, anchor.column + columns); if (isBackwards || lead.column !== 0) { this.$moveSelection(function() { this.moveCursorTo(lead.row, lead.column + columns); }); } }; this.isBackwards = function() { var anchor = this.anchor; var lead = this.lead; return (anchor.row > lead.row || (anchor.row == lead.row && anchor.column > lead.column)); }; this.getRange = function() { var anchor = this.anchor; var lead = this.lead; if (this.isEmpty()) return Range.fromPoints(lead, lead); if (this.isBackwards()) { return Range.fromPoints(lead, anchor); } else { return Range.fromPoints(anchor, lead); } }; this.clearSelection = function() { if (!this.$isEmpty) { this.$isEmpty = true; this._emit("changeSelection"); } }; this.selectAll = function() { var lastRow = this.doc.getLength() - 1; this.setSelectionAnchor(0, 0); this.moveCursorTo(lastRow, this.doc.getLine(lastRow).length); }; this.setRange = this.setSelectionRange = function(range, reverse) { if (reverse) { this.setSelectionAnchor(range.end.row, range.end.column); this.selectTo(range.start.row, range.start.column); } else { this.setSelectionAnchor(range.start.row, range.start.column); this.selectTo(range.end.row, range.end.column); } if (this.getRange().isEmpty()) this.$isEmpty = true; this.$desiredColumn = null; }; this.$moveSelection = function(mover) { var lead = this.lead; if (this.$isEmpty) this.setSelectionAnchor(lead.row, lead.column); mover.call(this); }; this.selectTo = function(row, column) { this.$moveSelection(function() { this.moveCursorTo(row, column); }); }; this.selectToPosition = function(pos) { this.$moveSelection(function() { this.moveCursorToPosition(pos); }); }; this.moveTo = function(row, column) { this.clearSelection(); this.moveCursorTo(row, column); }; this.moveToPosition = function(pos) { this.clearSelection(); this.moveCursorToPosition(pos); }; this.selectUp = function() { this.$moveSelection(this.moveCursorUp); }; this.selectDown = function() { this.$moveSelection(this.moveCursorDown); }; this.selectRight = function() { this.$moveSelection(this.moveCursorRight); }; this.selectLeft = function() { this.$moveSelection(this.moveCursorLeft); }; this.selectLineStart = function() { this.$moveSelection(this.moveCursorLineStart); }; this.selectLineEnd = function() { this.$moveSelection(this.moveCursorLineEnd); }; this.selectFileEnd = function() { this.$moveSelection(this.moveCursorFileEnd); }; this.selectFileStart = function() { this.$moveSelection(this.moveCursorFileStart); }; this.selectWordRight = function() { this.$moveSelection(this.moveCursorWordRight); }; this.selectWordLeft = function() { this.$moveSelection(this.moveCursorWordLeft); }; this.getWordRange = function(row, column) { if (typeof column == "undefined") { var cursor = row || this.lead; row = cursor.row; column = cursor.column; } return this.session.getWordRange(row, column); }; this.selectWord = function() { this.setSelectionRange(this.getWordRange()); }; this.selectAWord = function() { var cursor = this.getCursor(); var range = this.session.getAWordRange(cursor.row, cursor.column); this.setSelectionRange(range); }; this.getLineRange = function(row, excludeLastChar) { var rowStart = typeof row == "number" ? row : this.lead.row; var rowEnd; var foldLine = this.session.getFoldLine(rowStart); if (foldLine) { rowStart = foldLine.start.row; rowEnd = foldLine.end.row; } else { rowEnd = rowStart; } if (excludeLastChar === true) return new Range(rowStart, 0, rowEnd, this.session.getLine(rowEnd).length); else return new Range(rowStart, 0, rowEnd + 1, 0); }; this.selectLine = function() { this.setSelectionRange(this.getLineRange()); }; this.moveCursorUp = function() { this.moveCursorBy(-1, 0); }; this.moveCursorDown = function() { this.moveCursorBy(1, 0); }; this.moveCursorLeft = function() { var cursor = this.lead.getPosition(), fold; if (fold = this.session.getFoldAt(cursor.row, cursor.column, -1)) { this.moveCursorTo(fold.start.row, fold.start.column); } else if (cursor.column === 0) { if (cursor.row > 0) { this.moveCursorTo(cursor.row - 1, this.doc.getLine(cursor.row - 1).length); } } else { var tabSize = this.session.getTabSize(); if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column-tabSize, cursor.column).split(" ").length-1 == tabSize) this.moveCursorBy(0, -tabSize); else this.moveCursorBy(0, -1); } }; this.moveCursorRight = function() { var cursor = this.lead.getPosition(), fold; if (fold = this.session.getFoldAt(cursor.row, cursor.column, 1)) { this.moveCursorTo(fold.end.row, fold.end.column); } else if (this.lead.column == this.doc.getLine(this.lead.row).length) { if (this.lead.row < this.doc.getLength() - 1) { this.moveCursorTo(this.lead.row + 1, 0); } } else { var tabSize = this.session.getTabSize(); var cursor = this.lead; if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column, cursor.column+tabSize).split(" ").length-1 == tabSize) this.moveCursorBy(0, tabSize); else this.moveCursorBy(0, 1); } }; this.moveCursorLineStart = function() { var row = this.lead.row; var column = this.lead.column; var screenRow = this.session.documentToScreenRow(row, column); var firstColumnPosition = this.session.screenToDocumentPosition(screenRow, 0); var beforeCursor = this.session.getDisplayLine( row, null, firstColumnPosition.row, firstColumnPosition.column ); var leadingSpace = beforeCursor.match(/^\s*/); if (leadingSpace[0].length != column && !this.session.$useEmacsStyleLineStart) firstColumnPosition.column += leadingSpace[0].length; this.moveCursorToPosition(firstColumnPosition); }; this.moveCursorLineEnd = function() { var lead = this.lead; var lineEnd = this.session.getDocumentLastRowColumnPosition(lead.row, lead.column); if (this.lead.column == lineEnd.column) { var line = this.session.getLine(lineEnd.row); if (lineEnd.column == line.length) { var textEnd = line.search(/\s+$/); if (textEnd > 0) lineEnd.column = textEnd; } } this.moveCursorTo(lineEnd.row, lineEnd.column); }; this.moveCursorFileEnd = function() { var row = this.doc.getLength() - 1; var column = this.doc.getLine(row).length; this.moveCursorTo(row, column); }; this.moveCursorFileStart = function() { this.moveCursorTo(0, 0); }; this.moveCursorLongWordRight = function() { var row = this.lead.row; var column = this.lead.column; var line = this.doc.getLine(row); var rightOfCursor = line.substring(column); var match; this.session.nonTokenRe.lastIndex = 0; this.session.tokenRe.lastIndex = 0; var fold = this.session.getFoldAt(row, column, 1); if (fold) { this.moveCursorTo(fold.end.row, fold.end.column); return; } if (match = this.session.nonTokenRe.exec(rightOfCursor)) { column += this.session.nonTokenRe.lastIndex; this.session.nonTokenRe.lastIndex = 0; rightOfCursor = line.substring(column); } if (column >= line.length) { this.moveCursorTo(row, line.length); this.moveCursorRight(); if (row < this.doc.getLength() - 1) this.moveCursorWordRight(); return; } if (match = this.session.tokenRe.exec(rightOfCursor)) { column += this.session.tokenRe.lastIndex; this.session.tokenRe.lastIndex = 0; } this.moveCursorTo(row, column); }; this.moveCursorLongWordLeft = function() { var row = this.lead.row; var column = this.lead.column; var fold; if (fold = this.session.getFoldAt(row, column, -1)) { this.moveCursorTo(fold.start.row, fold.start.column); return; } var str = this.session.getFoldStringAt(row, column, -1); if (str == null) { str = this.doc.getLine(row).substring(0, column); } var leftOfCursor = lang.stringReverse(str); var match; this.session.nonTokenRe.lastIndex = 0; this.session.tokenRe.lastIndex = 0; if (match = this.session.nonTokenRe.exec(leftOfCursor)) { column -= this.session.nonTokenRe.lastIndex; leftOfCursor = leftOfCursor.slice(this.session.nonTokenRe.lastIndex); this.session.nonTokenRe.lastIndex = 0; } if (column <= 0) { this.moveCursorTo(row, 0); this.moveCursorLeft(); if (row > 0) this.moveCursorWordLeft(); return; } if (match = this.session.tokenRe.exec(leftOfCursor)) { column -= this.session.tokenRe.lastIndex; this.session.tokenRe.lastIndex = 0; } this.moveCursorTo(row, column); }; this.$shortWordEndIndex = function(rightOfCursor) { var match, index = 0, ch; var whitespaceRe = /\s/; var tokenRe = this.session.tokenRe; tokenRe.lastIndex = 0; if (match = this.session.tokenRe.exec(rightOfCursor)) { index = this.session.tokenRe.lastIndex; } else { while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch)) index ++; if (index < 1) { tokenRe.lastIndex = 0; while ((ch = rightOfCursor[index]) && !tokenRe.test(ch)) { tokenRe.lastIndex = 0; index ++; if (whitespaceRe.test(ch)) { if (index > 2) { index--; break; } else { while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch)) index ++; if (index > 2) break; } } } } } tokenRe.lastIndex = 0; return index; }; this.moveCursorShortWordRight = function() { var row = this.lead.row; var column = this.lead.column; var line = this.doc.getLine(row); var rightOfCursor = line.substring(column); var fold = this.session.getFoldAt(row, column, 1); if (fold) return this.moveCursorTo(fold.end.row, fold.end.column); if (column == line.length) { var l = this.doc.getLength(); do { row++; rightOfCursor = this.doc.getLine(row); } while (row < l && /^\s*$/.test(rightOfCursor)); if (!/^\s+/.test(rightOfCursor)) rightOfCursor = ""; column = 0; } var index = this.$shortWordEndIndex(rightOfCursor); this.moveCursorTo(row, column + index); }; this.moveCursorShortWordLeft = function() { var row = this.lead.row; var column = this.lead.column; var fold; if (fold = this.session.getFoldAt(row, column, -1)) return this.moveCursorTo(fold.start.row, fold.start.column); var line = this.session.getLine(row).substring(0, column); if (column === 0) { do { row--; line = this.doc.getLine(row); } while (row > 0 && /^\s*$/.test(line)); column = line.length; if (!/\s+$/.test(line)) line = ""; } var leftOfCursor = lang.stringReverse(line); var index = this.$shortWordEndIndex(leftOfCursor); return this.moveCursorTo(row, column - index); }; this.moveCursorWordRight = function() { if (this.session.$selectLongWords) this.moveCursorLongWordRight(); else this.moveCursorShortWordRight(); }; this.moveCursorWordLeft = function() { if (this.session.$selectLongWords) this.moveCursorLongWordLeft(); else this.moveCursorShortWordLeft(); }; this.moveCursorBy = function(rows, chars) { var screenPos = this.session.documentToScreenPosition( this.lead.row, this.lead.column ); if (chars === 0) { if (this.$desiredColumn) screenPos.column = this.$desiredColumn; else this.$desiredColumn = screenPos.column; } var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column); if (rows !== 0 && chars === 0 && docPos.row === this.lead.row && docPos.column === this.lead.column) { if (this.session.lineWidgets && this.session.lineWidgets[docPos.row]) { if (docPos.row > 0 || rows > 0) docPos.row++; } } this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0); }; this.moveCursorToPosition = function(position) { this.moveCursorTo(position.row, position.column); }; this.moveCursorTo = function(row, column, keepDesiredColumn) { var fold = this.session.getFoldAt(row, column, 1); if (fold) { row = fold.start.row; column = fold.start.column; } this.$keepDesiredColumnOnChange = true; this.lead.setPosition(row, column); this.$keepDesiredColumnOnChange = false; if (!keepDesiredColumn) this.$desiredColumn = null; }; this.moveCursorToScreen = function(row, column, keepDesiredColumn) { var pos = this.session.screenToDocumentPosition(row, column); this.moveCursorTo(pos.row, pos.column, keepDesiredColumn); }; this.detach = function() { this.lead.detach(); this.anchor.detach(); this.session = this.doc = null; }; this.fromOrientedRange = function(range) { this.setSelectionRange(range, range.cursor == range.start); this.$desiredColumn = range.desiredColumn || this.$desiredColumn; }; this.toOrientedRange = function(range) { var r = this.getRange(); if (range) { range.start.column = r.start.column; range.start.row = r.start.row; range.end.column = r.end.column; range.end.row = r.end.row; } else { range = r; } range.cursor = this.isBackwards() ? range.start : range.end; range.desiredColumn = this.$desiredColumn; return range; }; this.getRangeOfMovements = function(func) { var start = this.getCursor(); try { func.call(null, this); var end = this.getCursor(); return Range.fromPoints(start,end); } catch(e) { return Range.fromPoints(start,start); } finally { this.moveCursorToPosition(start); } }; this.toJSON = function() { if (this.rangeCount) { var data = this.ranges.map(function(r) { var r1 = r.clone(); r1.isBackwards = r.cursor == r.start; return r1; }); } else { var data = this.getRange(); data.isBackwards = this.isBackwards(); } return data; }; this.fromJSON = function(data) { if (data.start == undefined) { if (this.rangeList) { this.toSingleRange(data[0]); for (var i = data.length; i--; ) { var r = Range.fromPoints(data[i].start, data[i].end); if (data[i].isBackwards) r.cursor = r.start; this.addRange(r, true); } return; } else data = data[0]; } if (this.rangeList) this.toSingleRange(data); this.setSelectionRange(data, data.isBackwards); }; this.isEqual = function(data) { if ((data.length || this.rangeCount) && data.length != this.rangeCount) return false; if (!data.length || !this.ranges) return this.getRange().isEqual(data); for (var i = this.ranges.length; i--; ) { if (!this.ranges[i].isEqual(data[i])) return false; } return true; }; }).call(Selection.prototype); exports.Selection = Selection; }); define("ace/tokenizer",["require","exports","module","ace/config"], function(require, exports, module) { "use strict"; var config = require("./config"); var MAX_TOKEN_COUNT = 2000; var Tokenizer = function(rules) { this.states = rules; this.regExps = {}; this.matchMappings = {}; for (var key in this.states) { var state = this.states[key]; var ruleRegExps = []; var matchTotal = 0; var mapping = this.matchMappings[key] = {defaultToken: "text"}; var flag = "g"; var splitterRurles = []; for (var i = 0; i < state.length; i++) { var rule = state[i]; if (rule.defaultToken) mapping.defaultToken = rule.defaultToken; if (rule.caseInsensitive) flag = "gi"; if (rule.regex == null) continue; if (rule.regex instanceof RegExp) rule.regex = rule.regex.toString().slice(1, -1); var adjustedregex = rule.regex; var matchcount = new RegExp("(?:(" + adjustedregex + ")|(.))").exec("a").length - 2; if (Array.isArray(rule.token)) { if (rule.token.length == 1 || matchcount == 1) { rule.token = rule.token[0]; } else if (matchcount - 1 != rule.token.length) { this.reportError("number of classes and regexp groups doesn't match", { rule: rule, groupCount: matchcount - 1 }); rule.token = rule.token[0]; } else { rule.tokenArray = rule.token; rule.token = null; rule.onMatch = this.$arrayTokens; } } else if (typeof rule.token == "function" && !rule.onMatch) { if (matchcount > 1) rule.onMatch = this.$applyToken; else rule.onMatch = rule.token; } if (matchcount > 1) { if (/\\\d/.test(rule.regex)) { adjustedregex = rule.regex.replace(/\\([0-9]+)/g, function(match, digit) { return "\\" + (parseInt(digit, 10) + matchTotal + 1); }); } else { matchcount = 1; adjustedregex = this.removeCapturingGroups(rule.regex); } if (!rule.splitRegex && typeof rule.token != "string") splitterRurles.push(rule); // flag will be known only at the very end } mapping[matchTotal] = i; matchTotal += matchcount; ruleRegExps.push(adjustedregex); if (!rule.onMatch) rule.onMatch = null; } if (!ruleRegExps.length) { mapping[0] = 0; ruleRegExps.push("$"); } splitterRurles.forEach(function(rule) { rule.splitRegex = this.createSplitterRegexp(rule.regex, flag); }, this); this.regExps[key] = new RegExp("(" + ruleRegExps.join(")|(") + ")|($)", flag); } }; (function() { this.$setMaxTokenCount = function(m) { MAX_TOKEN_COUNT = m | 0; }; this.$applyToken = function(str) { var values = this.splitRegex.exec(str).slice(1); var types = this.token.apply(this, values); if (typeof types === "string") return [{type: types, value: str}]; var tokens = []; for (var i = 0, l = types.length; i < l; i++) { if (values[i]) tokens[tokens.length] = { type: types[i], value: values[i] }; } return tokens; }, this.$arrayTokens = function(str) { if (!str) return []; var values = this.splitRegex.exec(str); if (!values) return "text"; var tokens = []; var types = this.tokenArray; for (var i = 0, l = types.length; i < l; i++) { if (values[i + 1]) tokens[tokens.length] = { type: types[i], value: values[i + 1] }; } return tokens; }; this.removeCapturingGroups = function(src) { var r = src.replace( /\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g, function(x, y) {return y ? "(?:" : x;} ); return r; }; this.createSplitterRegexp = function(src, flag) { if (src.indexOf("(?=") != -1) { var stack = 0; var inChClass = false; var lastCapture = {}; src.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g, function( m, esc, parenOpen, parenClose, square, index ) { if (inChClass) { inChClass = square != "]"; } else if (square) { inChClass = true; } else if (parenClose) { if (stack == lastCapture.stack) { lastCapture.end = index+1; lastCapture.stack = -1; } stack--; } else if (parenOpen) { stack++; if (parenOpen.length != 1) { lastCapture.stack = stack lastCapture.start = index; } } return m; }); if (lastCapture.end != null && /^\)*$/.test(src.substr(lastCapture.end))) src = src.substring(0, lastCapture.start) + src.substr(lastCapture.end); } if (src.charAt(0) != "^") src = "^" + src; if (src.charAt(src.length - 1) != "$") src += "$"; return new RegExp(src, (flag||"").replace("g", "")); }; this.getLineTokens = function(line, startState) { if (startState && typeof startState != "string") { var stack = startState.slice(0); startState = stack[0]; if (startState === "#tmp") { stack.shift() startState = stack.shift() } } else var stack = []; var currentState = startState || "start"; var state = this.states[currentState]; if (!state) { currentState = "start"; state = this.states[currentState]; } var mapping = this.matchMappings[currentState]; var re = this.regExps[currentState]; re.lastIndex = 0; var match, tokens = []; var lastIndex = 0; var matchAttempts = 0; var token = {type: null, value: ""}; while (match = re.exec(line)) { var type = mapping.defaultToken; var rule = null; var value = match[0]; var index = re.lastIndex; if (index - value.length > lastIndex) { var skipped = line.substring(lastIndex, index - value.length); if (token.type == type) { token.value += skipped; } else { if (token.type) tokens.push(token); token = {type: type, value: skipped}; } } for (var i = 0; i < match.length-2; i++) { if (match[i + 1] === undefined) continue; rule = state[mapping[i]]; if (rule.onMatch) type = rule.onMatch(value, currentState, stack); else type = rule.token; if (rule.next) { if (typeof rule.next == "string") { currentState = rule.next; } else { currentState = rule.next(currentState, stack); } state = this.states[currentState]; if (!state) { this.reportError("state doesn't exist", currentState); currentState = "start"; state = this.states[currentState]; } mapping = this.matchMappings[currentState]; lastIndex = index; re = this.regExps[currentState]; re.lastIndex = index; } break; } if (value) { if (typeof type === "string") { if ((!rule || rule.merge !== false) && token.type === type) { token.value += value; } else { if (token.type) tokens.push(token); token = {type: type, value: value}; } } else if (type) { if (token.type) tokens.push(token); token = {type: null, value: ""}; for (var i = 0; i < type.length; i++) tokens.push(type[i]); } } if (lastIndex == line.length) break; lastIndex = index; if (matchAttempts++ > MAX_TOKEN_COUNT) { if (matchAttempts > 2 * line.length) { this.reportError("infinite loop with in ace tokenizer", { startState: startState, line: line }); } while (lastIndex < line.length) { if (token.type) tokens.push(token); token = { value: line.substring(lastIndex, lastIndex += 2000), type: "overflow" }; } currentState = "start"; stack = []; break; } } if (token.type) tokens.push(token); if (stack.length > 1) { if (stack[0] !== currentState) stack.unshift("#tmp", currentState); } return { tokens : tokens, state : stack.length ? stack : currentState }; }; this.reportError = config.reportError; }).call(Tokenizer.prototype); exports.Tokenizer = Tokenizer; }); define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"], function(require, exports, module) { "use strict"; var lang = require("../lib/lang"); var TextHighlightRules = function() { this.$rules = { "start" : [{ token : "empty_line", regex : '^$' }, { defaultToken : "text" }] }; }; (function() { this.addRules = function(rules, prefix) { if (!prefix) { for (var key in rules) this.$rules[key] = rules[key]; return; } for (var key in rules) { var state = rules[key]; for (var i = 0; i < state.length; i++) { var rule = state[i]; if (rule.next || rule.onMatch) { if (typeof rule.next == "string") { if (rule.next.indexOf(prefix) !== 0) rule.next = prefix + rule.next; } if (rule.nextState && rule.nextState.indexOf(prefix) !== 0) rule.nextState = prefix + rule.nextState; } } this.$rules[prefix + key] = state; } }; this.getRules = function() { return this.$rules; }; this.embedRules = function (HighlightRules, prefix, escapeRules, states, append) { var embedRules = typeof HighlightRules == "function" ? new HighlightRules().getRules() : HighlightRules; if (states) { for (var i = 0; i < states.length; i++) states[i] = prefix + states[i]; } else { states = []; for (var key in embedRules) states.push(prefix + key); } this.addRules(embedRules, prefix); if (escapeRules) { var addRules = Array.prototype[append ? "push" : "unshift"]; for (var i = 0; i < states.length; i++) addRules.apply(this.$rules[states[i]], lang.deepCopy(escapeRules)); } if (!this.$embeds) this.$embeds = []; this.$embeds.push(prefix); }; this.getEmbeds = function() { return this.$embeds; }; var pushState = function(currentState, stack) { if (currentState != "start" || stack.length) stack.unshift(this.nextState, currentState); return this.nextState; }; var popState = function(currentState, stack) { stack.shift(); return stack.shift() || "start"; }; this.normalizeRules = function() { var id = 0; var rules = this.$rules; function processState(key) { var state = rules[key]; state.processed = true; for (var i = 0; i < state.length; i++) { var rule = state[i]; if (!rule.regex && rule.start) { rule.regex = rule.start; if (!rule.next) rule.next = []; rule.next.push({ defaultToken: rule.token }, { token: rule.token + ".end", regex: rule.end || rule.start, next: "pop" }); rule.token = rule.token + ".start"; rule.push = true; } var next = rule.next || rule.push; if (next && Array.isArray(next)) { var stateName = rule.stateName; if (!stateName) { stateName = rule.token; if (typeof stateName != "string") stateName = stateName[0] || ""; if (rules[stateName]) stateName += id++; } rules[stateName] = next; rule.next = stateName; processState(stateName); } else if (next == "pop") { rule.next = popState; } if (rule.push) { rule.nextState = rule.next || rule.push; rule.next = pushState; delete rule.push; } if (rule.rules) { for (var r in rule.rules) { if (rules[r]) { if (rules[r].push) rules[r].push.apply(rules[r], rule.rules[r]); } else { rules[r] = rule.rules[r]; } } } if (rule.include || typeof rule == "string") { var includeName = rule.include || rule; var toInsert = rules[includeName]; } else if (Array.isArray(rule)) toInsert = rule; if (toInsert) { var args = [i, 1].concat(toInsert); if (rule.noEscape) args = args.filter(function(x) {return !x.next;}); state.splice.apply(state, args); i--; toInsert = null; } if (rule.keywordMap) { rule.token = this.createKeywordMapper( rule.keywordMap, rule.defaultToken || "text", rule.caseInsensitive ); delete rule.defaultToken; } } } Object.keys(rules).forEach(processState, this); }; this.createKeywordMapper = function(map, defaultToken, ignoreCase, splitChar) { var keywords = Object.create(null); Object.keys(map).forEach(function(className) { var a = map[className]; if (ignoreCase) a = a.toLowerCase(); var list = a.split(splitChar || "|"); for (var i = list.length; i--; ) keywords[list[i]] = className; }); if (Object.getPrototypeOf(keywords)) { keywords.__proto__ = null; } this.$keywordList = Object.keys(keywords); map = null; return ignoreCase ? function(value) {return keywords[value.toLowerCase()] || defaultToken } : function(value) {return keywords[value] || defaultToken }; }; this.getKeywords = function() { return this.$keywords; }; }).call(TextHighlightRules.prototype); exports.TextHighlightRules = TextHighlightRules; }); define("ace/mode/behaviour",["require","exports","module"], function(require, exports, module) { "use strict"; var Behaviour = function() { this.$behaviours = {}; }; (function () { this.add = function (name, action, callback) { switch (undefined) { case this.$behaviours: this.$behaviours = {}; case this.$behaviours[name]: this.$behaviours[name] = {}; } this.$behaviours[name][action] = callback; } this.addBehaviours = function (behaviours) { for (var key in behaviours) { for (var action in behaviours[key]) { this.add(key, action, behaviours[key][action]); } } } this.remove = function (name) { if (this.$behaviours && this.$behaviours[name]) { delete this.$behaviours[name]; } } this.inherit = function (mode, filter) { if (typeof mode === "function") { var behaviours = new mode().getBehaviours(filter); } else { var behaviours = mode.getBehaviours(filter); } this.addBehaviours(behaviours); } this.getBehaviours = function (filter) { if (!filter) { return this.$behaviours; } else { var ret = {} for (var i = 0; i < filter.length; i++) { if (this.$behaviours[filter[i]]) { ret[filter[i]] = this.$behaviours[filter[i]]; } } return ret; } } }).call(Behaviour.prototype); exports.Behaviour = Behaviour; }); define("ace/unicode",["require","exports","module"], function(require, exports, module) { "use strict"; exports.packages = {}; addUnicodePackage({ L: "0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC", Ll: "0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A", Lu: "0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A", Lt: "01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC", Lm: "02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F", Lo: "01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC", M: "0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26", Mn: "0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26", Mc: "0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC", Me: "0488048906DE20DD-20E020E2-20E4A670-A672", N: "0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19", Nd: "0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19", Nl: "16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF", No: "00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835", P: "0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65", Pd: "002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D", Ps: "0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62", Pe: "0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63", Pi: "00AB2018201B201C201F20392E022E042E092E0C2E1C2E20", Pf: "00BB2019201D203A2E032E052E0A2E0D2E1D2E21", Pc: "005F203F20402054FE33FE34FE4D-FE4FFF3F", Po: "0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65", S: "0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD", Sm: "002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC", Sc: "002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6", Sk: "005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3", So: "00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD", Z: "002000A01680180E2000-200A20282029202F205F3000", Zs: "002000A01680180E2000-200A202F205F3000", Zl: "2028", Zp: "2029", C: "0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF", Cc: "0000-001F007F-009F", Cf: "00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB", Co: "E000-F8FF", Cs: "D800-DFFF", Cn: "03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF" }); function addUnicodePackage (pack) { var codePoint = /\w{4}/g; for (var name in pack) exports.packages[name] = pack[name].replace(codePoint, "\\u$&"); }; }); define("ace/token_iterator",["require","exports","module"], function(require, exports, module) { "use strict"; var TokenIterator = function(session, initialRow, initialColumn) { this.$session = session; this.$row = initialRow; this.$rowTokens = session.getTokens(initialRow); var token = session.getTokenAt(initialRow, initialColumn); this.$tokenIndex = token ? token.index : -1; }; (function() { this.stepBackward = function() { this.$tokenIndex -= 1; while (this.$tokenIndex < 0) { this.$row -= 1; if (this.$row < 0) { this.$row = 0; return null; } this.$rowTokens = this.$session.getTokens(this.$row); this.$tokenIndex = this.$rowTokens.length - 1; } return this.$rowTokens[this.$tokenIndex]; }; this.stepForward = function() { this.$tokenIndex += 1; var rowCount; while (this.$tokenIndex >= this.$rowTokens.length) { this.$row += 1; if (!rowCount) rowCount = this.$session.getLength(); if (this.$row >= rowCount) { this.$row = rowCount - 1; return null; } this.$rowTokens = this.$session.getTokens(this.$row); this.$tokenIndex = 0; } return this.$rowTokens[this.$tokenIndex]; }; this.getCurrentToken = function () { return this.$rowTokens[this.$tokenIndex]; }; this.getCurrentTokenRow = function () { return this.$row; }; this.getCurrentTokenColumn = function() { var rowTokens = this.$rowTokens; var tokenIndex = this.$tokenIndex; var column = rowTokens[tokenIndex].start; if (column !== undefined) return column; column = 0; while (tokenIndex > 0) { tokenIndex -= 1; column += rowTokens[tokenIndex].value.length; } return column; }; this.getCurrentTokenPosition = function() { return {row: this.$row, column: this.getCurrentTokenColumn()}; }; }).call(TokenIterator.prototype); exports.TokenIterator = TokenIterator; }); define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"], function(require, exports, module) { "use strict"; var Tokenizer = require("../tokenizer").Tokenizer; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var Behaviour = require("./behaviour").Behaviour; var unicode = require("../unicode"); var lang = require("../lib/lang"); var TokenIterator = require("../token_iterator").TokenIterator; var Range = require("../range").Range; var Mode = function() { this.HighlightRules = TextHighlightRules; this.$behaviour = new Behaviour(); }; (function() { this.tokenRe = new RegExp("^[" + unicode.packages.L + unicode.packages.Mn + unicode.packages.Mc + unicode.packages.Nd + unicode.packages.Pc + "\\$_]+", "g" ); this.nonTokenRe = new RegExp("^(?:[^" + unicode.packages.L + unicode.packages.Mn + unicode.packages.Mc + unicode.packages.Nd + unicode.packages.Pc + "\\$_]|\\s])+", "g" ); this.getTokenizer = function() { if (!this.$tokenizer) { this.$highlightRules = this.$highlightRules || new this.HighlightRules(); this.$tokenizer = new Tokenizer(this.$highlightRules.getRules()); } return this.$tokenizer; }; this.lineCommentStart = ""; this.blockComment = ""; this.toggleCommentLines = function(state, session, startRow, endRow) { var doc = session.doc; var ignoreBlankLines = true; var shouldRemove = true; var minIndent = Infinity; var tabSize = session.getTabSize(); var insertAtTabStop = false; if (!this.lineCommentStart) { if (!this.blockComment) return false; var lineCommentStart = this.blockComment.start; var lineCommentEnd = this.blockComment.end; var regexpStart = new RegExp("^(\\s*)(?:" + lang.escapeRegExp(lineCommentStart) + ")"); var regexpEnd = new RegExp("(?:" + lang.escapeRegExp(lineCommentEnd) + ")\\s*$"); var comment = function(line, i) { if (testRemove(line, i)) return; if (!ignoreBlankLines || /\S/.test(line)) { doc.insertInLine({row: i, column: line.length}, lineCommentEnd); doc.insertInLine({row: i, column: minIndent}, lineCommentStart); } }; var uncomment = function(line, i) { var m; if (m = line.match(regexpEnd)) doc.removeInLine(i, line.length - m[0].length, line.length); if (m = line.match(regexpStart)) doc.removeInLine(i, m[1].length, m[0].length); }; var testRemove = function(line, row) { if (regexpStart.test(line)) return true; var tokens = session.getTokens(row); for (var i = 0; i < tokens.length; i++) { if (tokens[i].type === 'comment') return true; } }; } else { if (Array.isArray(this.lineCommentStart)) { var regexpStart = this.lineCommentStart.map(lang.escapeRegExp).join("|"); var lineCommentStart = this.lineCommentStart[0]; } else { var regexpStart = lang.escapeRegExp(this.lineCommentStart); var lineCommentStart = this.lineCommentStart; } regexpStart = new RegExp("^(\\s*)(?:" + regexpStart + ") ?"); insertAtTabStop = session.getUseSoftTabs(); var uncomment = function(line, i) { var m = line.match(regexpStart); if (!m) return; var start = m[1].length, end = m[0].length; if (!shouldInsertSpace(line, start, end) && m[0][end - 1] == " ") end--; doc.removeInLine(i, start, end); }; var commentWithSpace = lineCommentStart + " "; var comment = function(line, i) { if (!ignoreBlankLines || /\S/.test(line)) { if (shouldInsertSpace(line, minIndent, minIndent)) doc.insertInLine({row: i, column: minIndent}, commentWithSpace); else doc.insertInLine({row: i, column: minIndent}, lineCommentStart); } }; var testRemove = function(line, i) { return regexpStart.test(line); }; var shouldInsertSpace = function(line, before, after) { var spaces = 0; while (before-- && line.charAt(before) == " ") spaces++; if (spaces % tabSize != 0) return false; var spaces = 0; while (line.charAt(after++) == " ") spaces++; if (tabSize > 2) return spaces % tabSize != tabSize - 1; else return spaces % tabSize == 0; return true; }; } function iter(fun) { for (var i = startRow; i <= endRow; i++) fun(doc.getLine(i), i); } var minEmptyLength = Infinity; iter(function(line, i) { var indent = line.search(/\S/); if (indent !== -1) { if (indent < minIndent) minIndent = indent; if (shouldRemove && !testRemove(line, i)) shouldRemove = false; } else if (minEmptyLength > line.length) { minEmptyLength = line.length; } }); if (minIndent == Infinity) { minIndent = minEmptyLength; ignoreBlankLines = false; shouldRemove = false; } if (insertAtTabStop && minIndent % tabSize != 0) minIndent = Math.floor(minIndent / tabSize) * tabSize; iter(shouldRemove ? uncomment : comment); }; this.toggleBlockComment = function(state, session, range, cursor) { var comment = this.blockComment; if (!comment) return; if (!comment.start && comment[0]) comment = comment[0]; var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); var sel = session.selection; var initialRange = session.selection.toOrientedRange(); var startRow, colDiff; if (token && /comment/.test(token.type)) { var startRange, endRange; while (token && /comment/.test(token.type)) { var i = token.value.indexOf(comment.start); if (i != -1) { var row = iterator.getCurrentTokenRow(); var column = iterator.getCurrentTokenColumn() + i; startRange = new Range(row, column, row, column + comment.start.length); break; } token = iterator.stepBackward(); } var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); while (token && /comment/.test(token.type)) { var i = token.value.indexOf(comment.end); if (i != -1) { var row = iterator.getCurrentTokenRow(); var column = iterator.getCurrentTokenColumn() + i; endRange = new Range(row, column, row, column + comment.end.length); break; } token = iterator.stepForward(); } if (endRange) session.remove(endRange); if (startRange) { session.remove(startRange); startRow = startRange.start.row; colDiff = -comment.start.length; } } else { colDiff = comment.start.length; startRow = range.start.row; session.insert(range.end, comment.end); session.insert(range.start, comment.start); } if (initialRange.start.row == startRow) initialRange.start.column += colDiff; if (initialRange.end.row == startRow) initialRange.end.column += colDiff; session.selection.fromOrientedRange(initialRange); }; this.getNextLineIndent = function(state, line, tab) { return this.$getIndent(line); }; this.checkOutdent = function(state, line, input) { return false; }; this.autoOutdent = function(state, doc, row) { }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; this.createWorker = function(session) { return null; }; this.createModeDelegates = function (mapping) { this.$embeds = []; this.$modes = {}; for (var i in mapping) { if (mapping[i]) { this.$embeds.push(i); this.$modes[i] = new mapping[i](); } } var delegations = ['toggleBlockComment', 'toggleCommentLines', 'getNextLineIndent', 'checkOutdent', 'autoOutdent', 'transformAction', 'getCompletions']; for (var i = 0; i < delegations.length; i++) { (function(scope) { var functionName = delegations[i]; var defaultHandler = scope[functionName]; scope[delegations[i]] = function() { return this.$delegator(functionName, arguments, defaultHandler); }; } (this)); } }; this.$delegator = function(method, args, defaultHandler) { var state = args[0]; if (typeof state != "string") state = state[0]; for (var i = 0; i < this.$embeds.length; i++) { if (!this.$modes[this.$embeds[i]]) continue; var split = state.split(this.$embeds[i]); if (!split[0] && split[1]) { args[0] = split[1]; var mode = this.$modes[this.$embeds[i]]; return mode[method].apply(mode, args); } } var ret = defaultHandler.apply(this, args); return defaultHandler ? ret : undefined; }; this.transformAction = function(state, action, editor, session, param) { if (this.$behaviour) { var behaviours = this.$behaviour.getBehaviours(); for (var key in behaviours) { if (behaviours[key][action]) { var ret = behaviours[key][action].apply(this, arguments); if (ret) { return ret; } } } } }; this.getKeywords = function(append) { if (!this.completionKeywords) { var rules = this.$tokenizer.rules; var completionKeywords = []; for (var rule in rules) { var ruleItr = rules[rule]; for (var r = 0, l = ruleItr.length; r < l; r++) { if (typeof ruleItr[r].token === "string") { if (/keyword|support|storage/.test(ruleItr[r].token)) completionKeywords.push(ruleItr[r].regex); } else if (typeof ruleItr[r].token === "object") { for (var a = 0, aLength = ruleItr[r].token.length; a < aLength; a++) { if (/keyword|support|storage/.test(ruleItr[r].token[a])) { var rule = ruleItr[r].regex.match(/\(.+?\)/g)[a]; completionKeywords.push(rule.substr(1, rule.length - 2)); } } } } } this.completionKeywords = completionKeywords; } if (!append) return this.$keywordList; return completionKeywords.concat(this.$keywordList || []); }; this.$createKeywordList = function() { if (!this.$highlightRules) this.getTokenizer(); return this.$keywordList = this.$highlightRules.$keywordList || []; }; this.getCompletions = function(state, session, pos, prefix) { var keywords = this.$keywordList || this.$createKeywordList(); return keywords.map(function(word) { return { name: word, value: word, score: 0, meta: "keyword" }; }); }; this.$id = "ace/mode/text"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/apply_delta",["require","exports","module"], function(require, exports, module) { "use strict"; function throwDeltaError(delta, errorText){ console.log("Invalid Delta:", delta); throw "Invalid Delta: " + errorText; } function positionInDocument(docLines, position) { return position.row >= 0 && position.row < docLines.length && position.column >= 0 && position.column <= docLines[position.row].length; } function validateDelta(docLines, delta) { if (delta.action != "insert" && delta.action != "remove") throwDeltaError(delta, "delta.action must be 'insert' or 'remove'"); if (!(delta.lines instanceof Array)) throwDeltaError(delta, "delta.lines must be an Array"); if (!delta.start || !delta.end) throwDeltaError(delta, "delta.start/end must be an present"); var start = delta.start; if (!positionInDocument(docLines, delta.start)) throwDeltaError(delta, "delta.start must be contained in document"); var end = delta.end; if (delta.action == "remove" && !positionInDocument(docLines, end)) throwDeltaError(delta, "delta.end must contained in document for 'remove' actions"); var numRangeRows = end.row - start.row; var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0)); if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars) throwDeltaError(delta, "delta.range must match delta lines"); } exports.applyDelta = function(docLines, delta, doNotValidate) { var row = delta.start.row; var startColumn = delta.start.column; var line = docLines[row] || ""; switch (delta.action) { case "insert": var lines = delta.lines; if (lines.length === 1) { docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn); } else { var args = [row, 1].concat(delta.lines); docLines.splice.apply(docLines, args); docLines[row] = line.substring(0, startColumn) + docLines[row]; docLines[row + delta.lines.length - 1] += line.substring(startColumn); } break; case "remove": var endColumn = delta.end.column; var endRow = delta.end.row; if (row === endRow) { docLines[row] = line.substring(0, startColumn) + line.substring(endColumn); } else { docLines.splice( row, endRow - row + 1, line.substring(0, startColumn) + docLines[endRow].substring(endColumn) ); } break; } } }); define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Anchor = exports.Anchor = function(doc, row, column) { this.$onChange = this.onChange.bind(this); this.attach(doc); if (typeof column == "undefined") this.setPosition(row.row, row.column); else this.setPosition(row, column); }; (function() { oop.implement(this, EventEmitter); this.getPosition = function() { return this.$clipPositionToDocument(this.row, this.column); }; this.getDocument = function() { return this.document; }; this.$insertRight = false; this.onChange = function(delta) { if (delta.start.row == delta.end.row && delta.start.row != this.row) return; if (delta.start.row > this.row) return; var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight); this.setPosition(point.row, point.column, true); }; function $pointsInOrder(point1, point2, equalPointsInOrder) { var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column; return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter); } function $getTransformedPoint(delta, point, moveIfEqual) { var deltaIsInsert = delta.action == "insert"; var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row); var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column); var deltaStart = delta.start; var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range. if ($pointsInOrder(point, deltaStart, moveIfEqual)) { return { row: point.row, column: point.column }; } if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) { return { row: point.row + deltaRowShift, column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0) }; } return { row: deltaStart.row, column: deltaStart.column }; } this.setPosition = function(row, column, noClip) { var pos; if (noClip) { pos = { row: row, column: column }; } else { pos = this.$clipPositionToDocument(row, column); } if (this.row == pos.row && this.column == pos.column) return; var old = { row: this.row, column: this.column }; this.row = pos.row; this.column = pos.column; this._signal("change", { old: old, value: pos }); }; this.detach = function() { this.document.removeEventListener("change", this.$onChange); }; this.attach = function(doc) { this.document = doc || this.document; this.document.on("change", this.$onChange); }; this.$clipPositionToDocument = function(row, column) { var pos = {}; if (row >= this.document.getLength()) { pos.row = Math.max(0, this.document.getLength() - 1); pos.column = this.document.getLine(pos.row).length; } else if (row < 0) { pos.row = 0; pos.column = 0; } else { pos.row = row; pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); } if (column < 0) pos.column = 0; return pos; }; }).call(Anchor.prototype); }); define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var applyDelta = require("./apply_delta").applyDelta; var EventEmitter = require("./lib/event_emitter").EventEmitter; var Range = require("./range").Range; var Anchor = require("./anchor").Anchor; var Document = function(textOrLines) { this.$lines = [""]; if (textOrLines.length === 0) { this.$lines = [""]; } else if (Array.isArray(textOrLines)) { this.insertMergedLines({row: 0, column: 0}, textOrLines); } else { this.insert({row: 0, column:0}, textOrLines); } }; (function() { oop.implement(this, EventEmitter); this.setValue = function(text) { var len = this.getLength() - 1; this.remove(new Range(0, 0, len, this.getLine(len).length)); this.insert({row: 0, column: 0}, text); }; this.getValue = function() { return this.getAllLines().join(this.getNewLineCharacter()); }; this.createAnchor = function(row, column) { return new Anchor(this, row, column); }; if ("aaa".split(/a/).length === 0) { this.$split = function(text) { return text.replace(/\r\n|\r/g, "\n").split("\n"); }; } else { this.$split = function(text) { return text.split(/\r\n|\r|\n/); }; } this.$detectNewLine = function(text) { var match = text.match(/^.*?(\r\n|\r|\n)/m); this.$autoNewLine = match ? match[1] : "\n"; this._signal("changeNewLineMode"); }; this.getNewLineCharacter = function() { switch (this.$newLineMode) { case "windows": return "\r\n"; case "unix": return "\n"; default: return this.$autoNewLine || "\n"; } }; this.$autoNewLine = ""; this.$newLineMode = "auto"; this.setNewLineMode = function(newLineMode) { if (this.$newLineMode === newLineMode) return; this.$newLineMode = newLineMode; this._signal("changeNewLineMode"); }; this.getNewLineMode = function() { return this.$newLineMode; }; this.isNewLine = function(text) { return (text == "\r\n" || text == "\r" || text == "\n"); }; this.getLine = function(row) { return this.$lines[row] || ""; }; this.getLines = function(firstRow, lastRow) { return this.$lines.slice(firstRow, lastRow + 1); }; this.getAllLines = function() { return this.getLines(0, this.getLength()); }; this.getLength = function() { return this.$lines.length; }; this.getTextRange = function(range) { return this.getLinesForRange(range).join(this.getNewLineCharacter()); }; this.getLinesForRange = function(range) { var lines; if (range.start.row === range.end.row) { lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)]; } else { lines = this.getLines(range.start.row, range.end.row); lines[0] = (lines[0] || "").substring(range.start.column); var l = lines.length - 1; if (range.end.row - range.start.row == l) lines[l] = lines[l].substring(0, range.end.column); } return lines; }; this.insertLines = function(row, lines) { console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."); return this.insertFullLines(row, lines); }; this.removeLines = function(firstRow, lastRow) { console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."); return this.removeFullLines(firstRow, lastRow); }; this.insertNewLine = function(position) { console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead."); return this.insertMergedLines(position, ["", ""]); }; this.insert = function(position, text) { if (this.getLength() <= 1) this.$detectNewLine(text); return this.insertMergedLines(position, this.$split(text)); }; this.insertInLine = function(position, text) { var start = this.clippedPos(position.row, position.column); var end = this.pos(position.row, position.column + text.length); this.applyDelta({ start: start, end: end, action: "insert", lines: [text] }, true); return this.clonePos(end); }; this.clippedPos = function(row, column) { var length = this.getLength(); if (row === undefined) { row = length; } else if (row < 0) { row = 0; } else if (row >= length) { row = length - 1; column = undefined; } var line = this.getLine(row); if (column == undefined) column = line.length; column = Math.min(Math.max(column, 0), line.length); return {row: row, column: column}; }; this.clonePos = function(pos) { return {row: pos.row, column: pos.column}; }; this.pos = function(row, column) { return {row: row, column: column}; }; this.$clipPosition = function(position) { var length = this.getLength(); if (position.row >= length) { position.row = Math.max(0, length - 1); position.column = this.getLine(length - 1).length; } else { position.row = Math.max(0, position.row); position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length); } return position; }; this.insertFullLines = function(row, lines) { row = Math.min(Math.max(row, 0), this.getLength()); var column = 0; if (row < this.getLength()) { lines = lines.concat([""]); column = 0; } else { lines = [""].concat(lines); row--; column = this.$lines[row].length; } this.insertMergedLines({row: row, column: column}, lines); }; this.insertMergedLines = function(position, lines) { var start = this.clippedPos(position.row, position.column); var end = { row: start.row + lines.length - 1, column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length }; this.applyDelta({ start: start, end: end, action: "insert", lines: lines }); return this.clonePos(end); }; this.remove = function(range) { var start = this.clippedPos(range.start.row, range.start.column); var end = this.clippedPos(range.end.row, range.end.column); this.applyDelta({ start: start, end: end, action: "remove", lines: this.getLinesForRange({start: start, end: end}) }); return this.clonePos(start); }; this.removeInLine = function(row, startColumn, endColumn) { var start = this.clippedPos(row, startColumn); var end = this.clippedPos(row, endColumn); this.applyDelta({ start: start, end: end, action: "remove", lines: this.getLinesForRange({start: start, end: end}) }, true); return this.clonePos(start); }; this.removeFullLines = function(firstRow, lastRow) { firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1); lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1); var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0; var deleteLastNewLine = lastRow < this.getLength() - 1; var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow ); var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 ); var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow ); var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length ); var range = new Range(startRow, startCol, endRow, endCol); var deletedLines = this.$lines.slice(firstRow, lastRow + 1); this.applyDelta({ start: range.start, end: range.end, action: "remove", lines: this.getLinesForRange(range) }); return deletedLines; }; this.removeNewLine = function(row) { if (row < this.getLength() - 1 && row >= 0) { this.applyDelta({ start: this.pos(row, this.getLine(row).length), end: this.pos(row + 1, 0), action: "remove", lines: ["", ""] }); } }; this.replace = function(range, text) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); if (text.length === 0 && range.isEmpty()) return range.start; if (text == this.getTextRange(range)) return range.end; this.remove(range); var end; if (text) { end = this.insert(range.start, text); } else { end = range.start; } return end; }; this.applyDeltas = function(deltas) { for (var i=0; i=0; i--) { this.revertDelta(deltas[i]); } }; this.applyDelta = function(delta, doNotValidate) { var isInsert = delta.action == "insert"; if (isInsert ? delta.lines.length <= 1 && !delta.lines[0] : !Range.comparePoints(delta.start, delta.end)) { return; } if (isInsert && delta.lines.length > 20000) this.$splitAndapplyLargeDelta(delta, 20000); applyDelta(this.$lines, delta, doNotValidate); this._signal("change", delta); }; this.$splitAndapplyLargeDelta = function(delta, MAX) { var lines = delta.lines; var l = lines.length; var row = delta.start.row; var column = delta.start.column; var from = 0, to = 0; do { from = to; to += MAX - 1; var chunk = lines.slice(from, to); if (to > l) { delta.lines = chunk; delta.start.row = row + from; delta.start.column = column; break; } chunk.push(""); this.applyDelta({ start: this.pos(row + from, column), end: this.pos(row + to, column = 0), action: delta.action, lines: chunk }, true); } while(true); }; this.revertDelta = function(delta) { this.applyDelta({ start: this.clonePos(delta.start), end: this.clonePos(delta.end), action: (delta.action == "insert" ? "remove" : "insert"), lines: delta.lines.slice() }); }; this.indexToPosition = function(index, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; for (var i = startRow || 0, l = lines.length; i < l; i++) { index -= lines[i].length + newlineLength; if (index < 0) return {row: i, column: index + lines[i].length + newlineLength}; } return {row: l-1, column: lines[l-1].length}; }; this.positionToIndex = function(pos, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; var index = 0; var row = Math.min(pos.row, lines.length); for (var i = startRow || 0; i < row; ++i) index += lines[i].length + newlineLength; return index + pos.column; }; }).call(Document.prototype); exports.Document = Document; }); define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var BackgroundTokenizer = function(tokenizer, editor) { this.running = false; this.lines = []; this.states = []; this.currentLine = 0; this.tokenizer = tokenizer; var self = this; this.$worker = function() { if (!self.running) { return; } var workerStart = new Date(); var currentLine = self.currentLine; var endLine = -1; var doc = self.doc; var startLine = currentLine; while (self.lines[currentLine]) currentLine++; var len = doc.getLength(); var processedLines = 0; self.running = false; while (currentLine < len) { self.$tokenizeRow(currentLine); endLine = currentLine; do { currentLine++; } while (self.lines[currentLine]); processedLines ++; if ((processedLines % 5 === 0) && (new Date() - workerStart) > 20) { self.running = setTimeout(self.$worker, 20); break; } } self.currentLine = currentLine; if (startLine <= endLine) self.fireUpdateEvent(startLine, endLine); }; }; (function(){ oop.implement(this, EventEmitter); this.setTokenizer = function(tokenizer) { this.tokenizer = tokenizer; this.lines = []; this.states = []; this.start(0); }; this.setDocument = function(doc) { this.doc = doc; this.lines = []; this.states = []; this.stop(); }; this.fireUpdateEvent = function(firstRow, lastRow) { var data = { first: firstRow, last: lastRow }; this._signal("update", {data: data}); }; this.start = function(startRow) { this.currentLine = Math.min(startRow || 0, this.currentLine, this.doc.getLength()); this.lines.splice(this.currentLine, this.lines.length); this.states.splice(this.currentLine, this.states.length); this.stop(); this.running = setTimeout(this.$worker, 700); }; this.scheduleStart = function() { if (!this.running) this.running = setTimeout(this.$worker, 700); } this.$updateOnChange = function(delta) { var startRow = delta.start.row; var len = delta.end.row - startRow; if (len === 0) { this.lines[startRow] = null; } else if (delta.action == "remove") { this.lines.splice(startRow, len + 1, null); this.states.splice(startRow, len + 1, null); } else { var args = Array(len + 1); args.unshift(startRow, 1); this.lines.splice.apply(this.lines, args); this.states.splice.apply(this.states, args); } this.currentLine = Math.min(startRow, this.currentLine, this.doc.getLength()); this.stop(); }; this.stop = function() { if (this.running) clearTimeout(this.running); this.running = false; }; this.getTokens = function(row) { return this.lines[row] || this.$tokenizeRow(row); }; this.getState = function(row) { if (this.currentLine == row) this.$tokenizeRow(row); return this.states[row] || "start"; }; this.$tokenizeRow = function(row) { var line = this.doc.getLine(row); var state = this.states[row - 1]; var data = this.tokenizer.getLineTokens(line, state, row); if (this.states[row] + "" !== data.state + "") { this.states[row] = data.state; this.lines[row + 1] = null; if (this.currentLine > row + 1) this.currentLine = row + 1; } else if (this.currentLine == row) { this.currentLine = row + 1; } return this.lines[row] = data.tokens; }; }).call(BackgroundTokenizer.prototype); exports.BackgroundTokenizer = BackgroundTokenizer; }); define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"], function(require, exports, module) { "use strict"; var lang = require("./lib/lang"); var oop = require("./lib/oop"); var Range = require("./range").Range; var SearchHighlight = function(regExp, clazz, type) { this.setRegexp(regExp); this.clazz = clazz; this.type = type || "text"; }; (function() { this.MAX_RANGES = 500; this.setRegexp = function(regExp) { if (this.regExp+"" == regExp+"") return; this.regExp = regExp; this.cache = []; }; this.update = function(html, markerLayer, session, config) { if (!this.regExp) return; var start = config.firstRow, end = config.lastRow; for (var i = start; i <= end; i++) { var ranges = this.cache[i]; if (ranges == null) { ranges = lang.getMatchOffsets(session.getLine(i), this.regExp); if (ranges.length > this.MAX_RANGES) ranges = ranges.slice(0, this.MAX_RANGES); ranges = ranges.map(function(match) { return new Range(i, match.offset, i, match.offset + match.length); }); this.cache[i] = ranges.length ? ranges : ""; } for (var j = ranges.length; j --; ) { markerLayer.drawSingleLineMarker( html, ranges[j].toScreenRange(session), this.clazz, config); } } }; }).call(SearchHighlight.prototype); exports.SearchHighlight = SearchHighlight; }); define("ace/edit_session/fold_line",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; function FoldLine(foldData, folds) { this.foldData = foldData; if (Array.isArray(folds)) { this.folds = folds; } else { folds = this.folds = [ folds ]; } var last = folds[folds.length - 1]; this.range = new Range(folds[0].start.row, folds[0].start.column, last.end.row, last.end.column); this.start = this.range.start; this.end = this.range.end; this.folds.forEach(function(fold) { fold.setFoldLine(this); }, this); } (function() { this.shiftRow = function(shift) { this.start.row += shift; this.end.row += shift; this.folds.forEach(function(fold) { fold.start.row += shift; fold.end.row += shift; }); }; this.addFold = function(fold) { if (fold.sameRow) { if (fold.start.row < this.startRow || fold.endRow > this.endRow) { throw new Error("Can't add a fold to this FoldLine as it has no connection"); } this.folds.push(fold); this.folds.sort(function(a, b) { return -a.range.compareEnd(b.start.row, b.start.column); }); if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) { this.end.row = fold.end.row; this.end.column = fold.end.column; } else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) { this.start.row = fold.start.row; this.start.column = fold.start.column; } } else if (fold.start.row == this.end.row) { this.folds.push(fold); this.end.row = fold.end.row; this.end.column = fold.end.column; } else if (fold.end.row == this.start.row) { this.folds.unshift(fold); this.start.row = fold.start.row; this.start.column = fold.start.column; } else { throw new Error("Trying to add fold to FoldRow that doesn't have a matching row"); } fold.foldLine = this; }; this.containsRow = function(row) { return row >= this.start.row && row <= this.end.row; }; this.walk = function(callback, endRow, endColumn) { var lastEnd = 0, folds = this.folds, fold, cmp, stop, isNewRow = true; if (endRow == null) { endRow = this.end.row; endColumn = this.end.column; } for (var i = 0; i < folds.length; i++) { fold = folds[i]; cmp = fold.range.compareStart(endRow, endColumn); if (cmp == -1) { callback(null, endRow, endColumn, lastEnd, isNewRow); return; } stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow); stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd); if (stop || cmp === 0) { return; } isNewRow = !fold.sameRow; lastEnd = fold.end.column; } callback(null, endRow, endColumn, lastEnd, isNewRow); }; this.getNextFoldTo = function(row, column) { var fold, cmp; for (var i = 0; i < this.folds.length; i++) { fold = this.folds[i]; cmp = fold.range.compareEnd(row, column); if (cmp == -1) { return { fold: fold, kind: "after" }; } else if (cmp === 0) { return { fold: fold, kind: "inside" }; } } return null; }; this.addRemoveChars = function(row, column, len) { var ret = this.getNextFoldTo(row, column), fold, folds; if (ret) { fold = ret.fold; if (ret.kind == "inside" && fold.start.column != column && fold.start.row != row) { window.console && window.console.log(row, column, fold); } else if (fold.start.row == row) { folds = this.folds; var i = folds.indexOf(fold); if (i === 0) { this.start.column += len; } for (i; i < folds.length; i++) { fold = folds[i]; fold.start.column += len; if (!fold.sameRow) { return; } fold.end.column += len; } this.end.column += len; } } }; this.split = function(row, column) { var pos = this.getNextFoldTo(row, column); if (!pos || pos.kind == "inside") return null; var fold = pos.fold; var folds = this.folds; var foldData = this.foldData; var i = folds.indexOf(fold); var foldBefore = folds[i - 1]; this.end.row = foldBefore.end.row; this.end.column = foldBefore.end.column; folds = folds.splice(i, folds.length - i); var newFoldLine = new FoldLine(foldData, folds); foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine); return newFoldLine; }; this.merge = function(foldLineNext) { var folds = foldLineNext.folds; for (var i = 0; i < folds.length; i++) { this.addFold(folds[i]); } var foldData = this.foldData; foldData.splice(foldData.indexOf(foldLineNext), 1); }; this.toString = function() { var ret = [this.range.toString() + ": [" ]; this.folds.forEach(function(fold) { ret.push(" " + fold.toString()); }); ret.push("]"); return ret.join("\n"); }; this.idxToPosition = function(idx) { var lastFoldEndColumn = 0; for (var i = 0; i < this.folds.length; i++) { var fold = this.folds[i]; idx -= fold.start.column - lastFoldEndColumn; if (idx < 0) { return { row: fold.start.row, column: fold.start.column + idx }; } idx -= fold.placeholder.length; if (idx < 0) { return fold.start; } lastFoldEndColumn = fold.end.column; } return { row: this.end.row, column: this.end.column + idx }; }; }).call(FoldLine.prototype); exports.FoldLine = FoldLine; }); define("ace/range_list",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("./range").Range; var comparePoints = Range.comparePoints; var RangeList = function() { this.ranges = []; }; (function() { this.comparePoints = comparePoints; this.pointIndex = function(pos, excludeEdges, startIndex) { var list = this.ranges; for (var i = startIndex || 0; i < list.length; i++) { var range = list[i]; var cmpEnd = comparePoints(pos, range.end); if (cmpEnd > 0) continue; var cmpStart = comparePoints(pos, range.start); if (cmpEnd === 0) return excludeEdges && cmpStart !== 0 ? -i-2 : i; if (cmpStart > 0 || (cmpStart === 0 && !excludeEdges)) return i; return -i-1; } return -i - 1; }; this.add = function(range) { var excludeEdges = !range.isEmpty(); var startIndex = this.pointIndex(range.start, excludeEdges); if (startIndex < 0) startIndex = -startIndex - 1; var endIndex = this.pointIndex(range.end, excludeEdges, startIndex); if (endIndex < 0) endIndex = -endIndex - 1; else endIndex++; return this.ranges.splice(startIndex, endIndex - startIndex, range); }; this.addList = function(list) { var removed = []; for (var i = list.length; i--; ) { removed.push.call(removed, this.add(list[i])); } return removed; }; this.substractPoint = function(pos) { var i = this.pointIndex(pos); if (i >= 0) return this.ranges.splice(i, 1); }; this.merge = function() { var removed = []; var list = this.ranges; list = list.sort(function(a, b) { return comparePoints(a.start, b.start); }); var next = list[0], range; for (var i = 1; i < list.length; i++) { range = next; next = list[i]; var cmp = comparePoints(range.end, next.start); if (cmp < 0) continue; if (cmp == 0 && !range.isEmpty() && !next.isEmpty()) continue; if (comparePoints(range.end, next.end) < 0) { range.end.row = next.end.row; range.end.column = next.end.column; } list.splice(i, 1); removed.push(next); next = range; i--; } this.ranges = list; return removed; }; this.contains = function(row, column) { return this.pointIndex({row: row, column: column}) >= 0; }; this.containsPoint = function(pos) { return this.pointIndex(pos) >= 0; }; this.rangeAtPoint = function(pos) { var i = this.pointIndex(pos); if (i >= 0) return this.ranges[i]; }; this.clipRows = function(startRow, endRow) { var list = this.ranges; if (list[0].start.row > endRow || list[list.length - 1].start.row < startRow) return []; var startIndex = this.pointIndex({row: startRow, column: 0}); if (startIndex < 0) startIndex = -startIndex - 1; var endIndex = this.pointIndex({row: endRow, column: 0}, startIndex); if (endIndex < 0) endIndex = -endIndex - 1; var clipped = []; for (var i = startIndex; i < endIndex; i++) { clipped.push(list[i]); } return clipped; }; this.removeAll = function() { return this.ranges.splice(0, this.ranges.length); }; this.attach = function(session) { if (this.session) this.detach(); this.session = session; this.onChange = this.$onChange.bind(this); this.session.on('change', this.onChange); }; this.detach = function() { if (!this.session) return; this.session.removeListener('change', this.onChange); this.session = null; }; this.$onChange = function(delta) { if (delta.action == "insert"){ var start = delta.start; var end = delta.end; } else { var end = delta.start; var start = delta.end; } var startRow = start.row; var endRow = end.row; var lineDif = endRow - startRow; var colDiff = -start.column + end.column; var ranges = this.ranges; for (var i = 0, n = ranges.length; i < n; i++) { var r = ranges[i]; if (r.end.row < startRow) continue; if (r.start.row > startRow) break; if (r.start.row == startRow && r.start.column >= start.column ) { if (r.start.column == start.column && this.$insertRight) { } else { r.start.column += colDiff; r.start.row += lineDif; } } if (r.end.row == startRow && r.end.column >= start.column) { if (r.end.column == start.column && this.$insertRight) { continue; } if (r.end.column == start.column && colDiff > 0 && i < n - 1) { if (r.end.column > r.start.column && r.end.column == ranges[i+1].start.column) r.end.column -= colDiff; } r.end.column += colDiff; r.end.row += lineDif; } } if (lineDif != 0 && i < n) { for (; i < n; i++) { var r = ranges[i]; r.start.row += lineDif; r.end.row += lineDif; } } }; }).call(RangeList.prototype); exports.RangeList = RangeList; }); define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var RangeList = require("../range_list").RangeList; var oop = require("../lib/oop") var Fold = exports.Fold = function(range, placeholder) { this.foldLine = null; this.placeholder = placeholder; this.range = range; this.start = range.start; this.end = range.end; this.sameRow = range.start.row == range.end.row; this.subFolds = this.ranges = []; }; oop.inherits(Fold, RangeList); (function() { this.toString = function() { return '"' + this.placeholder + '" ' + this.range.toString(); }; this.setFoldLine = function(foldLine) { this.foldLine = foldLine; this.subFolds.forEach(function(fold) { fold.setFoldLine(foldLine); }); }; this.clone = function() { var range = this.range.clone(); var fold = new Fold(range, this.placeholder); this.subFolds.forEach(function(subFold) { fold.subFolds.push(subFold.clone()); }); fold.collapseChildren = this.collapseChildren; return fold; }; this.addSubFold = function(fold) { if (this.range.isEqual(fold)) return; if (!this.range.containsRange(fold)) throw new Error("A fold can't intersect already existing fold" + fold.range + this.range); consumeRange(fold, this.start); var row = fold.start.row, column = fold.start.column; for (var i = 0, cmp = -1; i < this.subFolds.length; i++) { cmp = this.subFolds[i].range.compare(row, column); if (cmp != 1) break; } var afterStart = this.subFolds[i]; if (cmp == 0) return afterStart.addSubFold(fold); var row = fold.range.end.row, column = fold.range.end.column; for (var j = i, cmp = -1; j < this.subFolds.length; j++) { cmp = this.subFolds[j].range.compare(row, column); if (cmp != 1) break; } var afterEnd = this.subFolds[j]; if (cmp == 0) throw new Error("A fold can't intersect already existing fold" + fold.range + this.range); var consumedFolds = this.subFolds.splice(i, j - i, fold); fold.setFoldLine(this.foldLine); return fold; }; this.restoreRange = function(range) { return restoreRange(range, this.start); }; }).call(Fold.prototype); function consumePoint(point, anchor) { point.row -= anchor.row; if (point.row == 0) point.column -= anchor.column; } function consumeRange(range, anchor) { consumePoint(range.start, anchor); consumePoint(range.end, anchor); } function restorePoint(point, anchor) { if (point.row == 0) point.column += anchor.column; point.row += anchor.row; } function restoreRange(range, anchor) { restorePoint(range.start, anchor); restorePoint(range.end, anchor); } }); define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var FoldLine = require("./fold_line").FoldLine; var Fold = require("./fold").Fold; var TokenIterator = require("../token_iterator").TokenIterator; function Folding() { this.getFoldAt = function(row, column, side) { var foldLine = this.getFoldLine(row); if (!foldLine) return null; var folds = foldLine.folds; for (var i = 0; i < folds.length; i++) { var fold = folds[i]; if (fold.range.contains(row, column)) { if (side == 1 && fold.range.isEnd(row, column)) { continue; } else if (side == -1 && fold.range.isStart(row, column)) { continue; } return fold; } } }; this.getFoldsInRange = function(range) { var start = range.start; var end = range.end; var foldLines = this.$foldData; var foundFolds = []; start.column += 1; end.column -= 1; for (var i = 0; i < foldLines.length; i++) { var cmp = foldLines[i].range.compareRange(range); if (cmp == 2) { continue; } else if (cmp == -2) { break; } var folds = foldLines[i].folds; for (var j = 0; j < folds.length; j++) { var fold = folds[j]; cmp = fold.range.compareRange(range); if (cmp == -2) { break; } else if (cmp == 2) { continue; } else if (cmp == 42) { break; } foundFolds.push(fold); } } start.column -= 1; end.column += 1; return foundFolds; }; this.getFoldsInRangeList = function(ranges) { if (Array.isArray(ranges)) { var folds = []; ranges.forEach(function(range) { folds = folds.concat(this.getFoldsInRange(range)); }, this); } else { var folds = this.getFoldsInRange(ranges); } return folds; }; this.getAllFolds = function() { var folds = []; var foldLines = this.$foldData; for (var i = 0; i < foldLines.length; i++) for (var j = 0; j < foldLines[i].folds.length; j++) folds.push(foldLines[i].folds[j]); return folds; }; this.getFoldStringAt = function(row, column, trim, foldLine) { foldLine = foldLine || this.getFoldLine(row); if (!foldLine) return null; var lastFold = { end: { column: 0 } }; var str, fold; for (var i = 0; i < foldLine.folds.length; i++) { fold = foldLine.folds[i]; var cmp = fold.range.compareEnd(row, column); if (cmp == -1) { str = this .getLine(fold.start.row) .substring(lastFold.end.column, fold.start.column); break; } else if (cmp === 0) { return null; } lastFold = fold; } if (!str) str = this.getLine(fold.start.row).substring(lastFold.end.column); if (trim == -1) return str.substring(0, column - lastFold.end.column); else if (trim == 1) return str.substring(column - lastFold.end.column); else return str; }; this.getFoldLine = function(docRow, startFoldLine) { var foldData = this.$foldData; var i = 0; if (startFoldLine) i = foldData.indexOf(startFoldLine); if (i == -1) i = 0; for (i; i < foldData.length; i++) { var foldLine = foldData[i]; if (foldLine.start.row <= docRow && foldLine.end.row >= docRow) { return foldLine; } else if (foldLine.end.row > docRow) { return null; } } return null; }; this.getNextFoldLine = function(docRow, startFoldLine) { var foldData = this.$foldData; var i = 0; if (startFoldLine) i = foldData.indexOf(startFoldLine); if (i == -1) i = 0; for (i; i < foldData.length; i++) { var foldLine = foldData[i]; if (foldLine.end.row >= docRow) { return foldLine; } } return null; }; this.getFoldedRowCount = function(first, last) { var foldData = this.$foldData, rowCount = last-first+1; for (var i = 0; i < foldData.length; i++) { var foldLine = foldData[i], end = foldLine.end.row, start = foldLine.start.row; if (end >= last) { if (start < last) { if (start >= first) rowCount -= last-start; else rowCount = 0; // in one fold } break; } else if (end >= first){ if (start >= first) // fold inside range rowCount -= end-start; else rowCount -= end-first+1; } } return rowCount; }; this.$addFoldLine = function(foldLine) { this.$foldData.push(foldLine); this.$foldData.sort(function(a, b) { return a.start.row - b.start.row; }); return foldLine; }; this.addFold = function(placeholder, range) { var foldData = this.$foldData; var added = false; var fold; if (placeholder instanceof Fold) fold = placeholder; else { fold = new Fold(range, placeholder); fold.collapseChildren = range.collapseChildren; } this.$clipRangeToDocument(fold.range); var startRow = fold.start.row; var startColumn = fold.start.column; var endRow = fold.end.row; var endColumn = fold.end.column; if (!(startRow < endRow || startRow == endRow && startColumn <= endColumn - 2)) throw new Error("The range has to be at least 2 characters width"); var startFold = this.getFoldAt(startRow, startColumn, 1); var endFold = this.getFoldAt(endRow, endColumn, -1); if (startFold && endFold == startFold) return startFold.addSubFold(fold); if (startFold && !startFold.range.isStart(startRow, startColumn)) this.removeFold(startFold); if (endFold && !endFold.range.isEnd(endRow, endColumn)) this.removeFold(endFold); var folds = this.getFoldsInRange(fold.range); if (folds.length > 0) { this.removeFolds(folds); folds.forEach(function(subFold) { fold.addSubFold(subFold); }); } for (var i = 0; i < foldData.length; i++) { var foldLine = foldData[i]; if (endRow == foldLine.start.row) { foldLine.addFold(fold); added = true; break; } else if (startRow == foldLine.end.row) { foldLine.addFold(fold); added = true; if (!fold.sameRow) { var foldLineNext = foldData[i + 1]; if (foldLineNext && foldLineNext.start.row == endRow) { foldLine.merge(foldLineNext); break; } } break; } else if (endRow <= foldLine.start.row) { break; } } if (!added) foldLine = this.$addFoldLine(new FoldLine(this.$foldData, fold)); if (this.$useWrapMode) this.$updateWrapData(foldLine.start.row, foldLine.start.row); else this.$updateRowLengthCache(foldLine.start.row, foldLine.start.row); this.$modified = true; this._signal("changeFold", { data: fold, action: "add" }); return fold; }; this.addFolds = function(folds) { folds.forEach(function(fold) { this.addFold(fold); }, this); }; this.removeFold = function(fold) { var foldLine = fold.foldLine; var startRow = foldLine.start.row; var endRow = foldLine.end.row; var foldLines = this.$foldData; var folds = foldLine.folds; if (folds.length == 1) { foldLines.splice(foldLines.indexOf(foldLine), 1); } else if (foldLine.range.isEnd(fold.end.row, fold.end.column)) { folds.pop(); foldLine.end.row = folds[folds.length - 1].end.row; foldLine.end.column = folds[folds.length - 1].end.column; } else if (foldLine.range.isStart(fold.start.row, fold.start.column)) { folds.shift(); foldLine.start.row = folds[0].start.row; foldLine.start.column = folds[0].start.column; } else if (fold.sameRow) { folds.splice(folds.indexOf(fold), 1); } else { var newFoldLine = foldLine.split(fold.start.row, fold.start.column); folds = newFoldLine.folds; folds.shift(); newFoldLine.start.row = folds[0].start.row; newFoldLine.start.column = folds[0].start.column; } if (!this.$updating) { if (this.$useWrapMode) this.$updateWrapData(startRow, endRow); else this.$updateRowLengthCache(startRow, endRow); } this.$modified = true; this._signal("changeFold", { data: fold, action: "remove" }); }; this.removeFolds = function(folds) { var cloneFolds = []; for (var i = 0; i < folds.length; i++) { cloneFolds.push(folds[i]); } cloneFolds.forEach(function(fold) { this.removeFold(fold); }, this); this.$modified = true; }; this.expandFold = function(fold) { this.removeFold(fold); fold.subFolds.forEach(function(subFold) { fold.restoreRange(subFold); this.addFold(subFold); }, this); if (fold.collapseChildren > 0) { this.foldAll(fold.start.row+1, fold.end.row, fold.collapseChildren-1); } fold.subFolds = []; }; this.expandFolds = function(folds) { folds.forEach(function(fold) { this.expandFold(fold); }, this); }; this.unfold = function(location, expandInner) { var range, folds; if (location == null) { range = new Range(0, 0, this.getLength(), 0); expandInner = true; } else if (typeof location == "number") range = new Range(location, 0, location, this.getLine(location).length); else if ("row" in location) range = Range.fromPoints(location, location); else range = location; folds = this.getFoldsInRangeList(range); if (expandInner) { this.removeFolds(folds); } else { var subFolds = folds; while (subFolds.length) { this.expandFolds(subFolds); subFolds = this.getFoldsInRangeList(range); } } if (folds.length) return folds; }; this.isRowFolded = function(docRow, startFoldRow) { return !!this.getFoldLine(docRow, startFoldRow); }; this.getRowFoldEnd = function(docRow, startFoldRow) { var foldLine = this.getFoldLine(docRow, startFoldRow); return foldLine ? foldLine.end.row : docRow; }; this.getRowFoldStart = function(docRow, startFoldRow) { var foldLine = this.getFoldLine(docRow, startFoldRow); return foldLine ? foldLine.start.row : docRow; }; this.getFoldDisplayLine = function(foldLine, endRow, endColumn, startRow, startColumn) { if (startRow == null) startRow = foldLine.start.row; if (startColumn == null) startColumn = 0; if (endRow == null) endRow = foldLine.end.row; if (endColumn == null) endColumn = this.getLine(endRow).length; var doc = this.doc; var textLine = ""; foldLine.walk(function(placeholder, row, column, lastColumn) { if (row < startRow) return; if (row == startRow) { if (column < startColumn) return; lastColumn = Math.max(startColumn, lastColumn); } if (placeholder != null) { textLine += placeholder; } else { textLine += doc.getLine(row).substring(lastColumn, column); } }, endRow, endColumn); return textLine; }; this.getDisplayLine = function(row, endColumn, startRow, startColumn) { var foldLine = this.getFoldLine(row); if (!foldLine) { var line; line = this.doc.getLine(row); return line.substring(startColumn || 0, endColumn || line.length); } else { return this.getFoldDisplayLine( foldLine, row, endColumn, startRow, startColumn); } }; this.$cloneFoldData = function() { var fd = []; fd = this.$foldData.map(function(foldLine) { var folds = foldLine.folds.map(function(fold) { return fold.clone(); }); return new FoldLine(fd, folds); }); return fd; }; this.toggleFold = function(tryToUnfold) { var selection = this.selection; var range = selection.getRange(); var fold; var bracketPos; if (range.isEmpty()) { var cursor = range.start; fold = this.getFoldAt(cursor.row, cursor.column); if (fold) { this.expandFold(fold); return; } else if (bracketPos = this.findMatchingBracket(cursor)) { if (range.comparePoint(bracketPos) == 1) { range.end = bracketPos; } else { range.start = bracketPos; range.start.column++; range.end.column--; } } else if (bracketPos = this.findMatchingBracket({row: cursor.row, column: cursor.column + 1})) { if (range.comparePoint(bracketPos) == 1) range.end = bracketPos; else range.start = bracketPos; range.start.column++; } else { range = this.getCommentFoldRange(cursor.row, cursor.column) || range; } } else { var folds = this.getFoldsInRange(range); if (tryToUnfold && folds.length) { this.expandFolds(folds); return; } else if (folds.length == 1 ) { fold = folds[0]; } } if (!fold) fold = this.getFoldAt(range.start.row, range.start.column); if (fold && fold.range.toString() == range.toString()) { this.expandFold(fold); return; } var placeholder = "..."; if (!range.isMultiLine()) { placeholder = this.getTextRange(range); if (placeholder.length < 4) return; placeholder = placeholder.trim().substring(0, 2) + ".."; } this.addFold(placeholder, range); }; this.getCommentFoldRange = function(row, column, dir) { var iterator = new TokenIterator(this, row, column); var token = iterator.getCurrentToken(); if (token && /^comment|string/.test(token.type)) { var range = new Range(); var re = new RegExp(token.type.replace(/\..*/, "\\.")); if (dir != 1) { do { token = iterator.stepBackward(); } while (token && re.test(token.type)); iterator.stepForward(); } range.start.row = iterator.getCurrentTokenRow(); range.start.column = iterator.getCurrentTokenColumn() + 2; iterator = new TokenIterator(this, row, column); if (dir != -1) { do { token = iterator.stepForward(); } while (token && re.test(token.type)); token = iterator.stepBackward(); } else token = iterator.getCurrentToken(); range.end.row = iterator.getCurrentTokenRow(); range.end.column = iterator.getCurrentTokenColumn() + token.value.length - 2; return range; } }; this.foldAll = function(startRow, endRow, depth) { if (depth == undefined) depth = 100000; // JSON.stringify doesn't hanle Infinity var foldWidgets = this.foldWidgets; if (!foldWidgets) return; // mode doesn't support folding endRow = endRow || this.getLength(); startRow = startRow || 0; for (var row = startRow; row < endRow; row++) { if (foldWidgets[row] == null) foldWidgets[row] = this.getFoldWidget(row); if (foldWidgets[row] != "start") continue; var range = this.getFoldWidgetRange(row); if (range && range.isMultiLine() && range.end.row <= endRow && range.start.row >= startRow ) { row = range.end.row; try { var fold = this.addFold("...", range); if (fold) fold.collapseChildren = depth; } catch(e) {} } } }; this.$foldStyles = { "manual": 1, "markbegin": 1, "markbeginend": 1 }; this.$foldStyle = "markbegin"; this.setFoldStyle = function(style) { if (!this.$foldStyles[style]) throw new Error("invalid fold style: " + style + "[" + Object.keys(this.$foldStyles).join(", ") + "]"); if (this.$foldStyle == style) return; this.$foldStyle = style; if (style == "manual") this.unfold(); var mode = this.$foldMode; this.$setFolding(null); this.$setFolding(mode); }; this.$setFolding = function(foldMode) { if (this.$foldMode == foldMode) return; this.$foldMode = foldMode; this.off('change', this.$updateFoldWidgets); this.off('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets); this._signal("changeAnnotation"); if (!foldMode || this.$foldStyle == "manual") { this.foldWidgets = null; return; } this.foldWidgets = []; this.getFoldWidget = foldMode.getFoldWidget.bind(foldMode, this, this.$foldStyle); this.getFoldWidgetRange = foldMode.getFoldWidgetRange.bind(foldMode, this, this.$foldStyle); this.$updateFoldWidgets = this.updateFoldWidgets.bind(this); this.$tokenizerUpdateFoldWidgets = this.tokenizerUpdateFoldWidgets.bind(this); this.on('change', this.$updateFoldWidgets); this.on('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets); }; this.getParentFoldRangeData = function (row, ignoreCurrent) { var fw = this.foldWidgets; if (!fw || (ignoreCurrent && fw[row])) return {}; var i = row - 1, firstRange; while (i >= 0) { var c = fw[i]; if (c == null) c = fw[i] = this.getFoldWidget(i); if (c == "start") { var range = this.getFoldWidgetRange(i); if (!firstRange) firstRange = range; if (range && range.end.row >= row) break; } i--; } return { range: i !== -1 && range, firstRange: firstRange }; }; this.onFoldWidgetClick = function(row, e) { e = e.domEvent; var options = { children: e.shiftKey, all: e.ctrlKey || e.metaKey, siblings: e.altKey }; var range = this.$toggleFoldWidget(row, options); if (!range) { var el = (e.target || e.srcElement); if (el && /ace_fold-widget/.test(el.className)) el.className += " ace_invalid"; } }; this.$toggleFoldWidget = function(row, options) { if (!this.getFoldWidget) return; var type = this.getFoldWidget(row); var line = this.getLine(row); var dir = type === "end" ? -1 : 1; var fold = this.getFoldAt(row, dir === -1 ? 0 : line.length, dir); if (fold) { if (options.children || options.all) this.removeFold(fold); else this.expandFold(fold); return; } var range = this.getFoldWidgetRange(row, true); if (range && !range.isMultiLine()) { fold = this.getFoldAt(range.start.row, range.start.column, 1); if (fold && range.isEqual(fold.range)) { this.removeFold(fold); return; } } if (options.siblings) { var data = this.getParentFoldRangeData(row); if (data.range) { var startRow = data.range.start.row + 1; var endRow = data.range.end.row; } this.foldAll(startRow, endRow, options.all ? 10000 : 0); } else if (options.children) { endRow = range ? range.end.row : this.getLength(); this.foldAll(row + 1, endRow, options.all ? 10000 : 0); } else if (range) { if (options.all) range.collapseChildren = 10000; this.addFold("...", range); } return range; }; this.toggleFoldWidget = function(toggleParent) { var row = this.selection.getCursor().row; row = this.getRowFoldStart(row); var range = this.$toggleFoldWidget(row, {}); if (range) return; var data = this.getParentFoldRangeData(row, true); range = data.range || data.firstRange; if (range) { row = range.start.row; var fold = this.getFoldAt(row, this.getLine(row).length, 1); if (fold) { this.removeFold(fold); } else { this.addFold("...", range); } } }; this.updateFoldWidgets = function(delta) { var firstRow = delta.start.row; var len = delta.end.row - firstRow; if (len === 0) { this.foldWidgets[firstRow] = null; } else if (delta.action == 'remove') { this.foldWidgets.splice(firstRow, len + 1, null); } else { var args = Array(len + 1); args.unshift(firstRow, 1); this.foldWidgets.splice.apply(this.foldWidgets, args); } }; this.tokenizerUpdateFoldWidgets = function(e) { var rows = e.data; if (rows.first != rows.last) { if (this.foldWidgets.length > rows.first) this.foldWidgets.splice(rows.first, this.foldWidgets.length); } }; } exports.Folding = Folding; }); define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"], function(require, exports, module) { "use strict"; var TokenIterator = require("../token_iterator").TokenIterator; var Range = require("../range").Range; function BracketMatch() { this.findMatchingBracket = function(position, chr) { if (position.column == 0) return null; var charBeforeCursor = chr || this.getLine(position.row).charAt(position.column-1); if (charBeforeCursor == "") return null; var match = charBeforeCursor.match(/([\(\[\{])|([\)\]\}])/); if (!match) return null; if (match[1]) return this.$findClosingBracket(match[1], position); else return this.$findOpeningBracket(match[2], position); }; this.getBracketRange = function(pos) { var line = this.getLine(pos.row); var before = true, range; var chr = line.charAt(pos.column-1); var match = chr && chr.match(/([\(\[\{])|([\)\]\}])/); if (!match) { chr = line.charAt(pos.column); pos = {row: pos.row, column: pos.column + 1}; match = chr && chr.match(/([\(\[\{])|([\)\]\}])/); before = false; } if (!match) return null; if (match[1]) { var bracketPos = this.$findClosingBracket(match[1], pos); if (!bracketPos) return null; range = Range.fromPoints(pos, bracketPos); if (!before) { range.end.column++; range.start.column--; } range.cursor = range.end; } else { var bracketPos = this.$findOpeningBracket(match[2], pos); if (!bracketPos) return null; range = Range.fromPoints(bracketPos, pos); if (!before) { range.start.column++; range.end.column--; } range.cursor = range.start; } return range; }; this.$brackets = { ")": "(", "(": ")", "]": "[", "[": "]", "{": "}", "}": "{" }; this.$findOpeningBracket = function(bracket, position, typeRe) { var openBracket = this.$brackets[bracket]; var depth = 1; var iterator = new TokenIterator(this, position.row, position.column); var token = iterator.getCurrentToken(); if (!token) token = iterator.stepForward(); if (!token) return; if (!typeRe){ typeRe = new RegExp( "(\\.?" + token.type.replace(".", "\\.").replace("rparen", ".paren") .replace(/\b(?:end)\b/, "(?:start|begin|end)") + ")+" ); } var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2; var value = token.value; while (true) { while (valueIndex >= 0) { var chr = value.charAt(valueIndex); if (chr == openBracket) { depth -= 1; if (depth == 0) { return {row: iterator.getCurrentTokenRow(), column: valueIndex + iterator.getCurrentTokenColumn()}; } } else if (chr == bracket) { depth += 1; } valueIndex -= 1; } do { token = iterator.stepBackward(); } while (token && !typeRe.test(token.type)); if (token == null) break; value = token.value; valueIndex = value.length - 1; } return null; }; this.$findClosingBracket = function(bracket, position, typeRe) { var closingBracket = this.$brackets[bracket]; var depth = 1; var iterator = new TokenIterator(this, position.row, position.column); var token = iterator.getCurrentToken(); if (!token) token = iterator.stepForward(); if (!token) return; if (!typeRe){ typeRe = new RegExp( "(\\.?" + token.type.replace(".", "\\.").replace("lparen", ".paren") .replace(/\b(?:start|begin)\b/, "(?:start|begin|end)") + ")+" ); } var valueIndex = position.column - iterator.getCurrentTokenColumn(); while (true) { var value = token.value; var valueLength = value.length; while (valueIndex < valueLength) { var chr = value.charAt(valueIndex); if (chr == closingBracket) { depth -= 1; if (depth == 0) { return {row: iterator.getCurrentTokenRow(), column: valueIndex + iterator.getCurrentTokenColumn()}; } } else if (chr == bracket) { depth += 1; } valueIndex += 1; } do { token = iterator.stepForward(); } while (token && !typeRe.test(token.type)); if (token == null) break; valueIndex = 0; } return null; }; } exports.BracketMatch = BracketMatch; }); define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var lang = require("./lib/lang"); var config = require("./config"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Selection = require("./selection").Selection; var TextMode = require("./mode/text").Mode; var Range = require("./range").Range; var Document = require("./document").Document; var BackgroundTokenizer = require("./background_tokenizer").BackgroundTokenizer; var SearchHighlight = require("./search_highlight").SearchHighlight; var EditSession = function(text, mode) { this.$breakpoints = []; this.$decorations = []; this.$frontMarkers = {}; this.$backMarkers = {}; this.$markerId = 1; this.$undoSelect = true; this.$foldData = []; this.$foldData.toString = function() { return this.join("\n"); }; this.on("changeFold", this.onChangeFold.bind(this)); this.$onChange = this.onChange.bind(this); if (typeof text != "object" || !text.getLine) text = new Document(text); this.setDocument(text); this.selection = new Selection(this); config.resetOptions(this); this.setMode(mode); config._signal("session", this); }; (function() { oop.implement(this, EventEmitter); this.setDocument = function(doc) { if (this.doc) this.doc.removeListener("change", this.$onChange); this.doc = doc; doc.on("change", this.$onChange); if (this.bgTokenizer) this.bgTokenizer.setDocument(this.getDocument()); this.resetCaches(); }; this.getDocument = function() { return this.doc; }; this.$resetRowCache = function(docRow) { if (!docRow) { this.$docRowCache = []; this.$screenRowCache = []; return; } var l = this.$docRowCache.length; var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1; if (l > i) { this.$docRowCache.splice(i, l); this.$screenRowCache.splice(i, l); } }; this.$getRowCacheIndex = function(cacheArray, val) { var low = 0; var hi = cacheArray.length - 1; while (low <= hi) { var mid = (low + hi) >> 1; var c = cacheArray[mid]; if (val > c) low = mid + 1; else if (val < c) hi = mid - 1; else return mid; } return low -1; }; this.resetCaches = function() { this.$modified = true; this.$wrapData = []; this.$rowLengthCache = []; this.$resetRowCache(0); if (this.bgTokenizer) this.bgTokenizer.start(0); }; this.onChangeFold = function(e) { var fold = e.data; this.$resetRowCache(fold.start.row); }; this.onChange = function(delta) { this.$modified = true; this.$resetRowCache(delta.start.row); var removedFolds = this.$updateInternalDataOnChange(delta); if (!this.$fromUndo && this.$undoManager && !delta.ignore) { this.$deltasDoc.push(delta); if (removedFolds && removedFolds.length != 0) { this.$deltasFold.push({ action: "removeFolds", folds: removedFolds }); } this.$informUndoManager.schedule(); } this.bgTokenizer && this.bgTokenizer.$updateOnChange(delta); this._signal("change", delta); }; this.setValue = function(text) { this.doc.setValue(text); this.selection.moveTo(0, 0); this.$resetRowCache(0); this.$deltas = []; this.$deltasDoc = []; this.$deltasFold = []; this.setUndoManager(this.$undoManager); this.getUndoManager().reset(); }; this.getValue = this.toString = function() { return this.doc.getValue(); }; this.getSelection = function() { return this.selection; }; this.getState = function(row) { return this.bgTokenizer.getState(row); }; this.getTokens = function(row) { return this.bgTokenizer.getTokens(row); }; this.getTokenAt = function(row, column) { var tokens = this.bgTokenizer.getTokens(row); var token, c = 0; if (column == null) { i = tokens.length - 1; c = this.getLine(row).length; } else { for (var i = 0; i < tokens.length; i++) { c += tokens[i].value.length; if (c >= column) break; } } token = tokens[i]; if (!token) return null; token.index = i; token.start = c - token.value.length; return token; }; this.setUndoManager = function(undoManager) { this.$undoManager = undoManager; this.$deltas = []; this.$deltasDoc = []; this.$deltasFold = []; if (this.$informUndoManager) this.$informUndoManager.cancel(); if (undoManager) { var self = this; this.$syncInformUndoManager = function() { self.$informUndoManager.cancel(); if (self.$deltasFold.length) { self.$deltas.push({ group: "fold", deltas: self.$deltasFold }); self.$deltasFold = []; } if (self.$deltasDoc.length) { self.$deltas.push({ group: "doc", deltas: self.$deltasDoc }); self.$deltasDoc = []; } if (self.$deltas.length > 0) { undoManager.execute({ action: "aceupdate", args: [self.$deltas, self], merge: self.mergeUndoDeltas }); } self.mergeUndoDeltas = false; self.$deltas = []; }; this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager); } }; this.markUndoGroup = function() { if (this.$syncInformUndoManager) this.$syncInformUndoManager(); }; this.$defaultUndoManager = { undo: function() {}, redo: function() {}, reset: function() {} }; this.getUndoManager = function() { return this.$undoManager || this.$defaultUndoManager; }; this.getTabString = function() { if (this.getUseSoftTabs()) { return lang.stringRepeat(" ", this.getTabSize()); } else { return "\t"; } }; this.setUseSoftTabs = function(val) { this.setOption("useSoftTabs", val); }; this.getUseSoftTabs = function() { return this.$useSoftTabs && !this.$mode.$indentWithTabs; }; this.setTabSize = function(tabSize) { this.setOption("tabSize", tabSize); }; this.getTabSize = function() { return this.$tabSize; }; this.isTabStop = function(position) { return this.$useSoftTabs && (position.column % this.$tabSize === 0); }; this.$overwrite = false; this.setOverwrite = function(overwrite) { this.setOption("overwrite", overwrite); }; this.getOverwrite = function() { return this.$overwrite; }; this.toggleOverwrite = function() { this.setOverwrite(!this.$overwrite); }; this.addGutterDecoration = function(row, className) { if (!this.$decorations[row]) this.$decorations[row] = ""; this.$decorations[row] += " " + className; this._signal("changeBreakpoint", {}); }; this.removeGutterDecoration = function(row, className) { this.$decorations[row] = (this.$decorations[row] || "").replace(" " + className, ""); this._signal("changeBreakpoint", {}); }; this.getBreakpoints = function() { return this.$breakpoints; }; this.setBreakpoints = function(rows) { this.$breakpoints = []; for (var i=0; i 0) inToken = !!line.charAt(column - 1).match(this.tokenRe); if (!inToken) inToken = !!line.charAt(column).match(this.tokenRe); if (inToken) var re = this.tokenRe; else if (/^\s+$/.test(line.slice(column-1, column+1))) var re = /\s/; else var re = this.nonTokenRe; var start = column; if (start > 0) { do { start--; } while (start >= 0 && line.charAt(start).match(re)); start++; } var end = column; while (end < line.length && line.charAt(end).match(re)) { end++; } return new Range(row, start, row, end); }; this.getAWordRange = function(row, column) { var wordRange = this.getWordRange(row, column); var line = this.getLine(wordRange.end.row); while (line.charAt(wordRange.end.column).match(/[ \t]/)) { wordRange.end.column += 1; } return wordRange; }; this.setNewLineMode = function(newLineMode) { this.doc.setNewLineMode(newLineMode); }; this.getNewLineMode = function() { return this.doc.getNewLineMode(); }; this.setUseWorker = function(useWorker) { this.setOption("useWorker", useWorker); }; this.getUseWorker = function() { return this.$useWorker; }; this.onReloadTokenizer = function(e) { var rows = e.data; this.bgTokenizer.start(rows.first); this._signal("tokenizerUpdate", e); }; this.$modes = {}; this.$mode = null; this.$modeId = null; this.setMode = function(mode, cb) { if (mode && typeof mode === "object") { if (mode.getTokenizer) return this.$onChangeMode(mode); var options = mode; var path = options.path; } else { path = mode || "ace/mode/text"; } if (!this.$modes["ace/mode/text"]) this.$modes["ace/mode/text"] = new TextMode(); if (this.$modes[path] && !options) { this.$onChangeMode(this.$modes[path]); cb && cb(); return; } this.$modeId = path; config.loadModule(["mode", path], function(m) { if (this.$modeId !== path) return cb && cb(); if (this.$modes[path] && !options) { this.$onChangeMode(this.$modes[path]); } else if (m && m.Mode) { m = new m.Mode(options); if (!options) { this.$modes[path] = m; m.$id = path; } this.$onChangeMode(m); } cb && cb(); }.bind(this)); if (!this.$mode) this.$onChangeMode(this.$modes["ace/mode/text"], true); }; this.$onChangeMode = function(mode, $isPlaceholder) { if (!$isPlaceholder) this.$modeId = mode.$id; if (this.$mode === mode) return; this.$mode = mode; this.$stopWorker(); if (this.$useWorker) this.$startWorker(); var tokenizer = mode.getTokenizer(); if(tokenizer.addEventListener !== undefined) { var onReloadTokenizer = this.onReloadTokenizer.bind(this); tokenizer.addEventListener("update", onReloadTokenizer); } if (!this.bgTokenizer) { this.bgTokenizer = new BackgroundTokenizer(tokenizer); var _self = this; this.bgTokenizer.addEventListener("update", function(e) { _self._signal("tokenizerUpdate", e); }); } else { this.bgTokenizer.setTokenizer(tokenizer); } this.bgTokenizer.setDocument(this.getDocument()); this.tokenRe = mode.tokenRe; this.nonTokenRe = mode.nonTokenRe; if (!$isPlaceholder) { if (mode.attachToSession) mode.attachToSession(this); this.$options.wrapMethod.set.call(this, this.$wrapMethod); this.$setFolding(mode.foldingRules); this.bgTokenizer.start(0); this._emit("changeMode"); } }; this.$stopWorker = function() { if (this.$worker) { this.$worker.terminate(); this.$worker = null; } }; this.$startWorker = function() { try { this.$worker = this.$mode.createWorker(this); } catch (e) { config.warn("Could not load worker", e); this.$worker = null; } }; this.getMode = function() { return this.$mode; }; this.$scrollTop = 0; this.setScrollTop = function(scrollTop) { if (this.$scrollTop === scrollTop || isNaN(scrollTop)) return; this.$scrollTop = scrollTop; this._signal("changeScrollTop", scrollTop); }; this.getScrollTop = function() { return this.$scrollTop; }; this.$scrollLeft = 0; this.setScrollLeft = function(scrollLeft) { if (this.$scrollLeft === scrollLeft || isNaN(scrollLeft)) return; this.$scrollLeft = scrollLeft; this._signal("changeScrollLeft", scrollLeft); }; this.getScrollLeft = function() { return this.$scrollLeft; }; this.getScreenWidth = function() { this.$computeWidth(); if (this.lineWidgets) return Math.max(this.getLineWidgetMaxWidth(), this.screenWidth); return this.screenWidth; }; this.getLineWidgetMaxWidth = function() { if (this.lineWidgetsWidth != null) return this.lineWidgetsWidth; var width = 0; this.lineWidgets.forEach(function(w) { if (w && w.screenWidth > width) width = w.screenWidth; }); return this.lineWidgetWidth = width; }; this.$computeWidth = function(force) { if (this.$modified || force) { this.$modified = false; if (this.$useWrapMode) return this.screenWidth = this.$wrapLimit; var lines = this.doc.getAllLines(); var cache = this.$rowLengthCache; var longestScreenLine = 0; var foldIndex = 0; var foldLine = this.$foldData[foldIndex]; var foldStart = foldLine ? foldLine.start.row : Infinity; var len = lines.length; for (var i = 0; i < len; i++) { if (i > foldStart) { i = foldLine.end.row + 1; if (i >= len) break; foldLine = this.$foldData[foldIndex++]; foldStart = foldLine ? foldLine.start.row : Infinity; } if (cache[i] == null) cache[i] = this.$getStringScreenWidth(lines[i])[0]; if (cache[i] > longestScreenLine) longestScreenLine = cache[i]; } this.screenWidth = longestScreenLine; } }; this.getLine = function(row) { return this.doc.getLine(row); }; this.getLines = function(firstRow, lastRow) { return this.doc.getLines(firstRow, lastRow); }; this.getLength = function() { return this.doc.getLength(); }; this.getTextRange = function(range) { return this.doc.getTextRange(range || this.selection.getRange()); }; this.insert = function(position, text) { return this.doc.insert(position, text); }; this.remove = function(range) { return this.doc.remove(range); }; this.removeFullLines = function(firstRow, lastRow){ return this.doc.removeFullLines(firstRow, lastRow); }; this.undoChanges = function(deltas, dontSelect) { if (!deltas.length) return; this.$fromUndo = true; var lastUndoRange = null; for (var i = deltas.length - 1; i != -1; i--) { var delta = deltas[i]; if (delta.group == "doc") { this.doc.revertDeltas(delta.deltas); lastUndoRange = this.$getUndoSelection(delta.deltas, true, lastUndoRange); } else { delta.deltas.forEach(function(foldDelta) { this.addFolds(foldDelta.folds); }, this); } } this.$fromUndo = false; lastUndoRange && this.$undoSelect && !dontSelect && this.selection.setSelectionRange(lastUndoRange); return lastUndoRange; }; this.redoChanges = function(deltas, dontSelect) { if (!deltas.length) return; this.$fromUndo = true; var lastUndoRange = null; for (var i = 0; i < deltas.length; i++) { var delta = deltas[i]; if (delta.group == "doc") { this.doc.applyDeltas(delta.deltas); lastUndoRange = this.$getUndoSelection(delta.deltas, false, lastUndoRange); } } this.$fromUndo = false; lastUndoRange && this.$undoSelect && !dontSelect && this.selection.setSelectionRange(lastUndoRange); return lastUndoRange; }; this.setUndoSelect = function(enable) { this.$undoSelect = enable; }; this.$getUndoSelection = function(deltas, isUndo, lastUndoRange) { function isInsert(delta) { return isUndo ? delta.action !== "insert" : delta.action === "insert"; } var delta = deltas[0]; var range, point; var lastDeltaIsInsert = false; if (isInsert(delta)) { range = Range.fromPoints(delta.start, delta.end); lastDeltaIsInsert = true; } else { range = Range.fromPoints(delta.start, delta.start); lastDeltaIsInsert = false; } for (var i = 1; i < deltas.length; i++) { delta = deltas[i]; if (isInsert(delta)) { point = delta.start; if (range.compare(point.row, point.column) == -1) { range.setStart(point); } point = delta.end; if (range.compare(point.row, point.column) == 1) { range.setEnd(point); } lastDeltaIsInsert = true; } else { point = delta.start; if (range.compare(point.row, point.column) == -1) { range = Range.fromPoints(delta.start, delta.start); } lastDeltaIsInsert = false; } } if (lastUndoRange != null) { if (Range.comparePoints(lastUndoRange.start, range.start) === 0) { lastUndoRange.start.column += range.end.column - range.start.column; lastUndoRange.end.column += range.end.column - range.start.column; } var cmp = lastUndoRange.compareRange(range); if (cmp == 1) { range.setStart(lastUndoRange.start); } else if (cmp == -1) { range.setEnd(lastUndoRange.end); } } return range; }; this.replace = function(range, text) { return this.doc.replace(range, text); }; this.moveText = function(fromRange, toPosition, copy) { var text = this.getTextRange(fromRange); var folds = this.getFoldsInRange(fromRange); var toRange = Range.fromPoints(toPosition, toPosition); if (!copy) { this.remove(fromRange); var rowDiff = fromRange.start.row - fromRange.end.row; var collDiff = rowDiff ? -fromRange.end.column : fromRange.start.column - fromRange.end.column; if (collDiff) { if (toRange.start.row == fromRange.end.row && toRange.start.column > fromRange.end.column) toRange.start.column += collDiff; if (toRange.end.row == fromRange.end.row && toRange.end.column > fromRange.end.column) toRange.end.column += collDiff; } if (rowDiff && toRange.start.row >= fromRange.end.row) { toRange.start.row += rowDiff; toRange.end.row += rowDiff; } } toRange.end = this.insert(toRange.start, text); if (folds.length) { var oldStart = fromRange.start; var newStart = toRange.start; var rowDiff = newStart.row - oldStart.row; var collDiff = newStart.column - oldStart.column; this.addFolds(folds.map(function(x) { x = x.clone(); if (x.start.row == oldStart.row) x.start.column += collDiff; if (x.end.row == oldStart.row) x.end.column += collDiff; x.start.row += rowDiff; x.end.row += rowDiff; return x; })); } return toRange; }; this.indentRows = function(startRow, endRow, indentString) { indentString = indentString.replace(/\t/g, this.getTabString()); for (var row=startRow; row<=endRow; row++) this.doc.insertInLine({row: row, column: 0}, indentString); }; this.outdentRows = function (range) { var rowRange = range.collapseRows(); var deleteRange = new Range(0, 0, 0, 0); var size = this.getTabSize(); for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) { var line = this.getLine(i); deleteRange.start.row = i; deleteRange.end.row = i; for (var j = 0; j < size; ++j) if (line.charAt(j) != ' ') break; if (j < size && line.charAt(j) == '\t') { deleteRange.start.column = j; deleteRange.end.column = j + 1; } else { deleteRange.start.column = 0; deleteRange.end.column = j; } this.remove(deleteRange); } }; this.$moveLines = function(firstRow, lastRow, dir) { firstRow = this.getRowFoldStart(firstRow); lastRow = this.getRowFoldEnd(lastRow); if (dir < 0) { var row = this.getRowFoldStart(firstRow + dir); if (row < 0) return 0; var diff = row-firstRow; } else if (dir > 0) { var row = this.getRowFoldEnd(lastRow + dir); if (row > this.doc.getLength()-1) return 0; var diff = row-lastRow; } else { firstRow = this.$clipRowToDocument(firstRow); lastRow = this.$clipRowToDocument(lastRow); var diff = lastRow - firstRow + 1; } var range = new Range(firstRow, 0, lastRow, Number.MAX_VALUE); var folds = this.getFoldsInRange(range).map(function(x){ x = x.clone(); x.start.row += diff; x.end.row += diff; return x; }); var lines = dir == 0 ? this.doc.getLines(firstRow, lastRow) : this.doc.removeFullLines(firstRow, lastRow); this.doc.insertFullLines(firstRow+diff, lines); folds.length && this.addFolds(folds); return diff; }; this.moveLinesUp = function(firstRow, lastRow) { return this.$moveLines(firstRow, lastRow, -1); }; this.moveLinesDown = function(firstRow, lastRow) { return this.$moveLines(firstRow, lastRow, 1); }; this.duplicateLines = function(firstRow, lastRow) { return this.$moveLines(firstRow, lastRow, 0); }; this.$clipRowToDocument = function(row) { return Math.max(0, Math.min(row, this.doc.getLength()-1)); }; this.$clipColumnToRow = function(row, column) { if (column < 0) return 0; return Math.min(this.doc.getLine(row).length, column); }; this.$clipPositionToDocument = function(row, column) { column = Math.max(0, column); if (row < 0) { row = 0; column = 0; } else { var len = this.doc.getLength(); if (row >= len) { row = len - 1; column = this.doc.getLine(len-1).length; } else { column = Math.min(this.doc.getLine(row).length, column); } } return { row: row, column: column }; }; this.$clipRangeToDocument = function(range) { if (range.start.row < 0) { range.start.row = 0; range.start.column = 0; } else { range.start.column = this.$clipColumnToRow( range.start.row, range.start.column ); } var len = this.doc.getLength() - 1; if (range.end.row > len) { range.end.row = len; range.end.column = this.doc.getLine(len).length; } else { range.end.column = this.$clipColumnToRow( range.end.row, range.end.column ); } return range; }; this.$wrapLimit = 80; this.$useWrapMode = false; this.$wrapLimitRange = { min : null, max : null }; this.setUseWrapMode = function(useWrapMode) { if (useWrapMode != this.$useWrapMode) { this.$useWrapMode = useWrapMode; this.$modified = true; this.$resetRowCache(0); if (useWrapMode) { var len = this.getLength(); this.$wrapData = Array(len); this.$updateWrapData(0, len - 1); } this._signal("changeWrapMode"); } }; this.getUseWrapMode = function() { return this.$useWrapMode; }; this.setWrapLimitRange = function(min, max) { if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) { this.$wrapLimitRange = { min: min, max: max }; this.$modified = true; if (this.$useWrapMode) this._signal("changeWrapMode"); } }; this.adjustWrapLimit = function(desiredLimit, $printMargin) { var limits = this.$wrapLimitRange; if (limits.max < 0) limits = {min: $printMargin, max: $printMargin}; var wrapLimit = this.$constrainWrapLimit(desiredLimit, limits.min, limits.max); if (wrapLimit != this.$wrapLimit && wrapLimit > 1) { this.$wrapLimit = wrapLimit; this.$modified = true; if (this.$useWrapMode) { this.$updateWrapData(0, this.getLength() - 1); this.$resetRowCache(0); this._signal("changeWrapLimit"); } return true; } return false; }; this.$constrainWrapLimit = function(wrapLimit, min, max) { if (min) wrapLimit = Math.max(min, wrapLimit); if (max) wrapLimit = Math.min(max, wrapLimit); return wrapLimit; }; this.getWrapLimit = function() { return this.$wrapLimit; }; this.setWrapLimit = function (limit) { this.setWrapLimitRange(limit, limit); }; this.getWrapLimitRange = function() { return { min : this.$wrapLimitRange.min, max : this.$wrapLimitRange.max }; }; this.$updateInternalDataOnChange = function(delta) { var useWrapMode = this.$useWrapMode; var action = delta.action; var start = delta.start; var end = delta.end; var firstRow = start.row; var lastRow = end.row; var len = lastRow - firstRow; var removedFolds = null; this.$updating = true; if (len != 0) { if (action === "remove") { this[useWrapMode ? "$wrapData" : "$rowLengthCache"].splice(firstRow, len); var foldLines = this.$foldData; removedFolds = this.getFoldsInRange(delta); this.removeFolds(removedFolds); var foldLine = this.getFoldLine(end.row); var idx = 0; if (foldLine) { foldLine.addRemoveChars(end.row, end.column, start.column - end.column); foldLine.shiftRow(-len); var foldLineBefore = this.getFoldLine(firstRow); if (foldLineBefore && foldLineBefore !== foldLine) { foldLineBefore.merge(foldLine); foldLine = foldLineBefore; } idx = foldLines.indexOf(foldLine) + 1; } for (idx; idx < foldLines.length; idx++) { var foldLine = foldLines[idx]; if (foldLine.start.row >= end.row) { foldLine.shiftRow(-len); } } lastRow = firstRow; } else { var args = Array(len); args.unshift(firstRow, 0); var arr = useWrapMode ? this.$wrapData : this.$rowLengthCache arr.splice.apply(arr, args); var foldLines = this.$foldData; var foldLine = this.getFoldLine(firstRow); var idx = 0; if (foldLine) { var cmp = foldLine.range.compareInside(start.row, start.column); if (cmp == 0) { foldLine = foldLine.split(start.row, start.column); if (foldLine) { foldLine.shiftRow(len); foldLine.addRemoveChars(lastRow, 0, end.column - start.column); } } else if (cmp == -1) { foldLine.addRemoveChars(firstRow, 0, end.column - start.column); foldLine.shiftRow(len); } idx = foldLines.indexOf(foldLine) + 1; } for (idx; idx < foldLines.length; idx++) { var foldLine = foldLines[idx]; if (foldLine.start.row >= firstRow) { foldLine.shiftRow(len); } } } } else { len = Math.abs(delta.start.column - delta.end.column); if (action === "remove") { removedFolds = this.getFoldsInRange(delta); this.removeFolds(removedFolds); len = -len; } var foldLine = this.getFoldLine(firstRow); if (foldLine) { foldLine.addRemoveChars(firstRow, start.column, len); } } if (useWrapMode && this.$wrapData.length != this.doc.getLength()) { console.error("doc.getLength() and $wrapData.length have to be the same!"); } this.$updating = false; if (useWrapMode) this.$updateWrapData(firstRow, lastRow); else this.$updateRowLengthCache(firstRow, lastRow); return removedFolds; }; this.$updateRowLengthCache = function(firstRow, lastRow, b) { this.$rowLengthCache[firstRow] = null; this.$rowLengthCache[lastRow] = null; }; this.$updateWrapData = function(firstRow, lastRow) { var lines = this.doc.getAllLines(); var tabSize = this.getTabSize(); var wrapData = this.$wrapData; var wrapLimit = this.$wrapLimit; var tokens; var foldLine; var row = firstRow; lastRow = Math.min(lastRow, lines.length - 1); while (row <= lastRow) { foldLine = this.getFoldLine(row, foldLine); if (!foldLine) { tokens = this.$getDisplayTokens(lines[row]); wrapData[row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize); row ++; } else { tokens = []; foldLine.walk(function(placeholder, row, column, lastColumn) { var walkTokens; if (placeholder != null) { walkTokens = this.$getDisplayTokens( placeholder, tokens.length); walkTokens[0] = PLACEHOLDER_START; for (var i = 1; i < walkTokens.length; i++) { walkTokens[i] = PLACEHOLDER_BODY; } } else { walkTokens = this.$getDisplayTokens( lines[row].substring(lastColumn, column), tokens.length); } tokens = tokens.concat(walkTokens); }.bind(this), foldLine.end.row, lines[foldLine.end.row].length + 1 ); wrapData[foldLine.start.row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize); row = foldLine.end.row + 1; } } }; var CHAR = 1, CHAR_EXT = 2, PLACEHOLDER_START = 3, PLACEHOLDER_BODY = 4, PUNCTUATION = 9, SPACE = 10, TAB = 11, TAB_SPACE = 12; this.$computeWrapSplits = function(tokens, wrapLimit, tabSize) { if (tokens.length == 0) { return []; } var splits = []; var displayLength = tokens.length; var lastSplit = 0, lastDocSplit = 0; var isCode = this.$wrapAsCode; var indentedSoftWrap = this.$indentedSoftWrap; var maxIndent = wrapLimit <= Math.max(2 * tabSize, 8) || indentedSoftWrap === false ? 0 : Math.floor(wrapLimit / 2); function getWrapIndent() { var indentation = 0; if (maxIndent === 0) return indentation; if (indentedSoftWrap) { for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; if (token == SPACE) indentation += 1; else if (token == TAB) indentation += tabSize; else if (token == TAB_SPACE) continue; else break; } } if (isCode && indentedSoftWrap !== false) indentation += tabSize; return Math.min(indentation, maxIndent); } function addSplit(screenPos) { var displayed = tokens.slice(lastSplit, screenPos); var len = displayed.length; displayed.join(""). replace(/12/g, function() { len -= 1; }). replace(/2/g, function() { len -= 1; }); if (!splits.length) { indent = getWrapIndent(); splits.indent = indent; } lastDocSplit += len; splits.push(lastDocSplit); lastSplit = screenPos; } var indent = 0; while (displayLength - lastSplit > wrapLimit - indent) { var split = lastSplit + wrapLimit - indent; if (tokens[split - 1] >= SPACE && tokens[split] >= SPACE) { addSplit(split); continue; } if (tokens[split] == PLACEHOLDER_START || tokens[split] == PLACEHOLDER_BODY) { for (split; split != lastSplit - 1; split--) { if (tokens[split] == PLACEHOLDER_START) { break; } } if (split > lastSplit) { addSplit(split); continue; } split = lastSplit + wrapLimit; for (split; split < tokens.length; split++) { if (tokens[split] != PLACEHOLDER_BODY) { break; } } if (split == tokens.length) { break; // Breaks the while-loop. } addSplit(split); continue; } var minSplit = Math.max(split - (wrapLimit -(wrapLimit>>2)), lastSplit - 1); while (split > minSplit && tokens[split] < PLACEHOLDER_START) { split --; } if (isCode) { while (split > minSplit && tokens[split] < PLACEHOLDER_START) { split --; } while (split > minSplit && tokens[split] == PUNCTUATION) { split --; } } else { while (split > minSplit && tokens[split] < SPACE) { split --; } } if (split > minSplit) { addSplit(++split); continue; } split = lastSplit + wrapLimit; if (tokens[split] == CHAR_EXT) split--; addSplit(split - indent); } return splits; }; this.$getDisplayTokens = function(str, offset) { var arr = []; var tabSize; offset = offset || 0; for (var i = 0; i < str.length; i++) { var c = str.charCodeAt(i); if (c == 9) { tabSize = this.getScreenTabSize(arr.length + offset); arr.push(TAB); for (var n = 1; n < tabSize; n++) { arr.push(TAB_SPACE); } } else if (c == 32) { arr.push(SPACE); } else if((c > 39 && c < 48) || (c > 57 && c < 64)) { arr.push(PUNCTUATION); } else if (c >= 0x1100 && isFullWidth(c)) { arr.push(CHAR, CHAR_EXT); } else { arr.push(CHAR); } } return arr; }; this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) { if (maxScreenColumn == 0) return [0, 0]; if (maxScreenColumn == null) maxScreenColumn = Infinity; screenColumn = screenColumn || 0; var c, column; for (column = 0; column < str.length; column++) { c = str.charCodeAt(column); if (c == 9) { screenColumn += this.getScreenTabSize(screenColumn); } else if (c >= 0x1100 && isFullWidth(c)) { screenColumn += 2; } else { screenColumn += 1; } if (screenColumn > maxScreenColumn) { break; } } return [screenColumn, column]; }; this.lineWidgets = null; this.getRowLength = function(row) { if (this.lineWidgets) var h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0; else h = 0 if (!this.$useWrapMode || !this.$wrapData[row]) { return 1 + h; } else { return this.$wrapData[row].length + 1 + h; } }; this.getRowLineCount = function(row) { if (!this.$useWrapMode || !this.$wrapData[row]) { return 1; } else { return this.$wrapData[row].length + 1; } }; this.getRowWrapIndent = function(screenRow) { if (this.$useWrapMode) { var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE); var splits = this.$wrapData[pos.row]; return splits.length && splits[0] < pos.column ? splits.indent : 0; } else { return 0; } } this.getScreenLastRowColumn = function(screenRow) { var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE); return this.documentToScreenColumn(pos.row, pos.column); }; this.getDocumentLastRowColumn = function(docRow, docColumn) { var screenRow = this.documentToScreenRow(docRow, docColumn); return this.getScreenLastRowColumn(screenRow); }; this.getDocumentLastRowColumnPosition = function(docRow, docColumn) { var screenRow = this.documentToScreenRow(docRow, docColumn); return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10); }; this.getRowSplitData = function(row) { if (!this.$useWrapMode) { return undefined; } else { return this.$wrapData[row]; } }; this.getScreenTabSize = function(screenColumn) { return this.$tabSize - screenColumn % this.$tabSize; }; this.screenToDocumentRow = function(screenRow, screenColumn) { return this.screenToDocumentPosition(screenRow, screenColumn).row; }; this.screenToDocumentColumn = function(screenRow, screenColumn) { return this.screenToDocumentPosition(screenRow, screenColumn).column; }; this.screenToDocumentPosition = function(screenRow, screenColumn) { if (screenRow < 0) return {row: 0, column: 0}; var line; var docRow = 0; var docColumn = 0; var column; var row = 0; var rowLength = 0; var rowCache = this.$screenRowCache; var i = this.$getRowCacheIndex(rowCache, screenRow); var l = rowCache.length; if (l && i >= 0) { var row = rowCache[i]; var docRow = this.$docRowCache[i]; var doCache = screenRow > rowCache[l - 1]; } else { var doCache = !l; } var maxRow = this.getLength() - 1; var foldLine = this.getNextFoldLine(docRow); var foldStart = foldLine ? foldLine.start.row : Infinity; while (row <= screenRow) { rowLength = this.getRowLength(docRow); if (row + rowLength > screenRow || docRow >= maxRow) { break; } else { row += rowLength; docRow++; if (docRow > foldStart) { docRow = foldLine.end.row+1; foldLine = this.getNextFoldLine(docRow, foldLine); foldStart = foldLine ? foldLine.start.row : Infinity; } } if (doCache) { this.$docRowCache.push(docRow); this.$screenRowCache.push(row); } } if (foldLine && foldLine.start.row <= docRow) { line = this.getFoldDisplayLine(foldLine); docRow = foldLine.start.row; } else if (row + rowLength <= screenRow || docRow > maxRow) { return { row: maxRow, column: this.getLine(maxRow).length }; } else { line = this.getLine(docRow); foldLine = null; } var wrapIndent = 0; if (this.$useWrapMode) { var splits = this.$wrapData[docRow]; if (splits) { var splitIndex = Math.floor(screenRow - row); column = splits[splitIndex]; if(splitIndex > 0 && splits.length) { wrapIndent = splits.indent; docColumn = splits[splitIndex - 1] || splits[splits.length - 1]; line = line.substring(docColumn); } } } docColumn += this.$getStringScreenWidth(line, screenColumn - wrapIndent)[1]; if (this.$useWrapMode && docColumn >= column) docColumn = column - 1; if (foldLine) return foldLine.idxToPosition(docColumn); return {row: docRow, column: docColumn}; }; this.documentToScreenPosition = function(docRow, docColumn) { if (typeof docColumn === "undefined") var pos = this.$clipPositionToDocument(docRow.row, docRow.column); else pos = this.$clipPositionToDocument(docRow, docColumn); docRow = pos.row; docColumn = pos.column; var screenRow = 0; var foldStartRow = null; var fold = null; fold = this.getFoldAt(docRow, docColumn, 1); if (fold) { docRow = fold.start.row; docColumn = fold.start.column; } var rowEnd, row = 0; var rowCache = this.$docRowCache; var i = this.$getRowCacheIndex(rowCache, docRow); var l = rowCache.length; if (l && i >= 0) { var row = rowCache[i]; var screenRow = this.$screenRowCache[i]; var doCache = docRow > rowCache[l - 1]; } else { var doCache = !l; } var foldLine = this.getNextFoldLine(row); var foldStart = foldLine ?foldLine.start.row :Infinity; while (row < docRow) { if (row >= foldStart) { rowEnd = foldLine.end.row + 1; if (rowEnd > docRow) break; foldLine = this.getNextFoldLine(rowEnd, foldLine); foldStart = foldLine ?foldLine.start.row :Infinity; } else { rowEnd = row + 1; } screenRow += this.getRowLength(row); row = rowEnd; if (doCache) { this.$docRowCache.push(row); this.$screenRowCache.push(screenRow); } } var textLine = ""; if (foldLine && row >= foldStart) { textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn); foldStartRow = foldLine.start.row; } else { textLine = this.getLine(docRow).substring(0, docColumn); foldStartRow = docRow; } var wrapIndent = 0; if (this.$useWrapMode) { var wrapRow = this.$wrapData[foldStartRow]; if (wrapRow) { var screenRowOffset = 0; while (textLine.length >= wrapRow[screenRowOffset]) { screenRow ++; screenRowOffset++; } textLine = textLine.substring( wrapRow[screenRowOffset - 1] || 0, textLine.length ); wrapIndent = screenRowOffset > 0 ? wrapRow.indent : 0; } } return { row: screenRow, column: wrapIndent + this.$getStringScreenWidth(textLine)[0] }; }; this.documentToScreenColumn = function(row, docColumn) { return this.documentToScreenPosition(row, docColumn).column; }; this.documentToScreenRow = function(docRow, docColumn) { return this.documentToScreenPosition(docRow, docColumn).row; }; this.getScreenLength = function() { var screenRows = 0; var fold = null; if (!this.$useWrapMode) { screenRows = this.getLength(); var foldData = this.$foldData; for (var i = 0; i < foldData.length; i++) { fold = foldData[i]; screenRows -= fold.end.row - fold.start.row; } } else { var lastRow = this.$wrapData.length; var row = 0, i = 0; var fold = this.$foldData[i++]; var foldStart = fold ? fold.start.row :Infinity; while (row < lastRow) { var splits = this.$wrapData[row]; screenRows += splits ? splits.length + 1 : 1; row ++; if (row > foldStart) { row = fold.end.row+1; fold = this.$foldData[i++]; foldStart = fold ?fold.start.row :Infinity; } } } if (this.lineWidgets) screenRows += this.$getWidgetScreenLength(); return screenRows; }; this.$setFontMetrics = function(fm) { if (!this.$enableVarChar) return; this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) { if (maxScreenColumn === 0) return [0, 0]; if (!maxScreenColumn) maxScreenColumn = Infinity; screenColumn = screenColumn || 0; var c, column; for (column = 0; column < str.length; column++) { c = str.charAt(column); if (c === "\t") { screenColumn += this.getScreenTabSize(screenColumn); } else { screenColumn += fm.getCharacterWidth(c); } if (screenColumn > maxScreenColumn) { break; } } return [screenColumn, column]; }; }; this.destroy = function() { if (this.bgTokenizer) { this.bgTokenizer.setDocument(null); this.bgTokenizer = null; } this.$stopWorker(); }; function isFullWidth(c) { if (c < 0x1100) return false; return c >= 0x1100 && c <= 0x115F || c >= 0x11A3 && c <= 0x11A7 || c >= 0x11FA && c <= 0x11FF || c >= 0x2329 && c <= 0x232A || c >= 0x2E80 && c <= 0x2E99 || c >= 0x2E9B && c <= 0x2EF3 || c >= 0x2F00 && c <= 0x2FD5 || c >= 0x2FF0 && c <= 0x2FFB || c >= 0x3000 && c <= 0x303E || c >= 0x3041 && c <= 0x3096 || c >= 0x3099 && c <= 0x30FF || c >= 0x3105 && c <= 0x312D || c >= 0x3131 && c <= 0x318E || c >= 0x3190 && c <= 0x31BA || c >= 0x31C0 && c <= 0x31E3 || c >= 0x31F0 && c <= 0x321E || c >= 0x3220 && c <= 0x3247 || c >= 0x3250 && c <= 0x32FE || c >= 0x3300 && c <= 0x4DBF || c >= 0x4E00 && c <= 0xA48C || c >= 0xA490 && c <= 0xA4C6 || c >= 0xA960 && c <= 0xA97C || c >= 0xAC00 && c <= 0xD7A3 || c >= 0xD7B0 && c <= 0xD7C6 || c >= 0xD7CB && c <= 0xD7FB || c >= 0xF900 && c <= 0xFAFF || c >= 0xFE10 && c <= 0xFE19 || c >= 0xFE30 && c <= 0xFE52 || c >= 0xFE54 && c <= 0xFE66 || c >= 0xFE68 && c <= 0xFE6B || c >= 0xFF01 && c <= 0xFF60 || c >= 0xFFE0 && c <= 0xFFE6; }; }).call(EditSession.prototype); require("./edit_session/folding").Folding.call(EditSession.prototype); require("./edit_session/bracket_match").BracketMatch.call(EditSession.prototype); config.defineOptions(EditSession.prototype, "session", { wrap: { set: function(value) { if (!value || value == "off") value = false; else if (value == "free") value = true; else if (value == "printMargin") value = -1; else if (typeof value == "string") value = parseInt(value, 10) || false; if (this.$wrap == value) return; this.$wrap = value; if (!value) { this.setUseWrapMode(false); } else { var col = typeof value == "number" ? value : null; this.setWrapLimitRange(col, col); this.setUseWrapMode(true); } }, get: function() { if (this.getUseWrapMode()) { if (this.$wrap == -1) return "printMargin"; if (!this.getWrapLimitRange().min) return "free"; return this.$wrap; } return "off"; }, handlesSet: true }, wrapMethod: { set: function(val) { val = val == "auto" ? this.$mode.type != "text" : val != "text"; if (val != this.$wrapAsCode) { this.$wrapAsCode = val; if (this.$useWrapMode) { this.$modified = true; this.$resetRowCache(0); this.$updateWrapData(0, this.getLength() - 1); } } }, initialValue: "auto" }, indentedSoftWrap: { initialValue: true }, firstLineNumber: { set: function() {this._signal("changeBreakpoint");}, initialValue: 1 }, useWorker: { set: function(useWorker) { this.$useWorker = useWorker; this.$stopWorker(); if (useWorker) this.$startWorker(); }, initialValue: true }, useSoftTabs: {initialValue: true}, tabSize: { set: function(tabSize) { if (isNaN(tabSize) || this.$tabSize === tabSize) return; this.$modified = true; this.$rowLengthCache = []; this.$tabSize = tabSize; this._signal("changeTabSize"); }, initialValue: 4, handlesSet: true }, overwrite: { set: function(val) {this._signal("changeOverwrite");}, initialValue: false }, newLineMode: { set: function(val) {this.doc.setNewLineMode(val)}, get: function() {return this.doc.getNewLineMode()}, handlesSet: true }, mode: { set: function(val) { this.setMode(val) }, get: function() { return this.$modeId } } }); exports.EditSession = EditSession; }); define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"], function(require, exports, module) { "use strict"; var lang = require("./lib/lang"); var oop = require("./lib/oop"); var Range = require("./range").Range; var Search = function() { this.$options = {}; }; (function() { this.set = function(options) { oop.mixin(this.$options, options); return this; }; this.getOptions = function() { return lang.copyObject(this.$options); }; this.setOptions = function(options) { this.$options = options; }; this.find = function(session) { var options = this.$options; var iterator = this.$matchIterator(session, options); if (!iterator) return false; var firstRange = null; iterator.forEach(function(range, row, offset) { if (!range.start) { var column = range.offset + (offset || 0); firstRange = new Range(row, column, row, column + range.length); if (!range.length && options.start && options.start.start && options.skipCurrent != false && firstRange.isEqual(options.start) ) { firstRange = null; return false; } } else firstRange = range; return true; }); return firstRange; }; this.findAll = function(session) { var options = this.$options; if (!options.needle) return []; this.$assembleRegExp(options); var range = options.range; var lines = range ? session.getLines(range.start.row, range.end.row) : session.doc.getAllLines(); var ranges = []; var re = options.re; if (options.$isMultiLine) { var len = re.length; var maxRow = lines.length - len; var prevRange; outer: for (var row = re.offset || 0; row <= maxRow; row++) { for (var j = 0; j < len; j++) if (lines[row + j].search(re[j]) == -1) continue outer; var startLine = lines[row]; var line = lines[row + len - 1]; var startIndex = startLine.length - startLine.match(re[0])[0].length; var endIndex = line.match(re[len - 1])[0].length; if (prevRange && prevRange.end.row === row && prevRange.end.column > startIndex ) { continue; } ranges.push(prevRange = new Range( row, startIndex, row + len - 1, endIndex )); if (len > 2) row = row + len - 2; } } else { for (var i = 0; i < lines.length; i++) { var matches = lang.getMatchOffsets(lines[i], re); for (var j = 0; j < matches.length; j++) { var match = matches[j]; ranges.push(new Range(i, match.offset, i, match.offset + match.length)); } } } if (range) { var startColumn = range.start.column; var endColumn = range.start.column; var i = 0, j = ranges.length - 1; while (i < j && ranges[i].start.column < startColumn && ranges[i].start.row == range.start.row) i++; while (i < j && ranges[j].end.column > endColumn && ranges[j].end.row == range.end.row) j--; ranges = ranges.slice(i, j + 1); for (i = 0, j = ranges.length; i < j; i++) { ranges[i].start.row += range.start.row; ranges[i].end.row += range.start.row; } } return ranges; }; this.replace = function(input, replacement) { var options = this.$options; var re = this.$assembleRegExp(options); if (options.$isMultiLine) return replacement; if (!re) return; var match = re.exec(input); if (!match || match[0].length != input.length) return null; replacement = input.replace(re, replacement); if (options.preserveCase) { replacement = replacement.split(""); for (var i = Math.min(input.length, input.length); i--; ) { var ch = input[i]; if (ch && ch.toLowerCase() != ch) replacement[i] = replacement[i].toUpperCase(); else replacement[i] = replacement[i].toLowerCase(); } replacement = replacement.join(""); } return replacement; }; this.$matchIterator = function(session, options) { var re = this.$assembleRegExp(options); if (!re) return false; var callback; if (options.$isMultiLine) { var len = re.length; var matchIterator = function(line, row, offset) { var startIndex = line.search(re[0]); if (startIndex == -1) return; for (var i = 1; i < len; i++) { line = session.getLine(row + i); if (line.search(re[i]) == -1) return; } var endIndex = line.match(re[len - 1])[0].length; var range = new Range(row, startIndex, row + len - 1, endIndex); if (re.offset == 1) { range.start.row--; range.start.column = Number.MAX_VALUE; } else if (offset) range.start.column += offset; if (callback(range)) return true; }; } else if (options.backwards) { var matchIterator = function(line, row, startIndex) { var matches = lang.getMatchOffsets(line, re); for (var i = matches.length-1; i >= 0; i--) if (callback(matches[i], row, startIndex)) return true; }; } else { var matchIterator = function(line, row, startIndex) { var matches = lang.getMatchOffsets(line, re); for (var i = 0; i < matches.length; i++) if (callback(matches[i], row, startIndex)) return true; }; } var lineIterator = this.$lineIterator(session, options); return { forEach: function(_callback) { callback = _callback; lineIterator.forEach(matchIterator); } }; }; this.$assembleRegExp = function(options, $disableFakeMultiline) { if (options.needle instanceof RegExp) return options.re = options.needle; var needle = options.needle; if (!options.needle) return options.re = false; if (!options.regExp) needle = lang.escapeRegExp(needle); if (options.wholeWord) needle = "\\b" + needle + "\\b"; var modifier = options.caseSensitive ? "gm" : "gmi"; options.$isMultiLine = !$disableFakeMultiline && /[\n\r]/.test(needle); if (options.$isMultiLine) return options.re = this.$assembleMultilineRegExp(needle, modifier); try { var re = new RegExp(needle, modifier); } catch(e) { re = false; } return options.re = re; }; this.$assembleMultilineRegExp = function(needle, modifier) { var parts = needle.replace(/\r\n|\r|\n/g, "$\n^").split("\n"); var re = []; for (var i = 0; i < parts.length; i++) try { re.push(new RegExp(parts[i], modifier)); } catch(e) { return false; } if (parts[0] == "") { re.shift(); re.offset = 1; } else { re.offset = 0; } return re; }; this.$lineIterator = function(session, options) { var backwards = options.backwards == true; var skipCurrent = options.skipCurrent != false; var range = options.range; var start = options.start; if (!start) start = range ? range[backwards ? "end" : "start"] : session.selection.getRange(); if (start.start) start = start[skipCurrent != backwards ? "end" : "start"]; var firstRow = range ? range.start.row : 0; var lastRow = range ? range.end.row : session.getLength() - 1; var forEach = backwards ? function(callback) { var row = start.row; var line = session.getLine(row).substring(0, start.column); if (callback(line, row)) return; for (row--; row >= firstRow; row--) if (callback(session.getLine(row), row)) return; if (options.wrap == false) return; for (row = lastRow, firstRow = start.row; row >= firstRow; row--) if (callback(session.getLine(row), row)) return; } : function(callback) { var row = start.row; var line = session.getLine(row).substr(start.column); if (callback(line, row, start.column)) return; for (row = row+1; row <= lastRow; row++) if (callback(session.getLine(row), row)) return; if (options.wrap == false) return; for (row = firstRow, lastRow = start.row; row <= lastRow; row++) if (callback(session.getLine(row), row)) return; }; return {forEach: forEach}; }; }).call(Search.prototype); exports.Search = Search; }); define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(require, exports, module) { "use strict"; var keyUtil = require("../lib/keys"); var useragent = require("../lib/useragent"); var KEY_MODS = keyUtil.KEY_MODS; function HashHandler(config, platform) { this.platform = platform || (useragent.isMac ? "mac" : "win"); this.commands = {}; this.commandKeyBinding = {}; this.addCommands(config); this.$singleCommand = true; } function MultiHashHandler(config, platform) { HashHandler.call(this, config, platform); this.$singleCommand = false; } MultiHashHandler.prototype = HashHandler.prototype; (function() { this.addCommand = function(command) { if (this.commands[command.name]) this.removeCommand(command); this.commands[command.name] = command; if (command.bindKey) this._buildKeyHash(command); }; this.removeCommand = function(command, keepCommand) { var name = command && (typeof command === 'string' ? command : command.name); command = this.commands[name]; if (!keepCommand) delete this.commands[name]; var ckb = this.commandKeyBinding; for (var keyId in ckb) { var cmdGroup = ckb[keyId]; if (cmdGroup == command) { delete ckb[keyId]; } else if (Array.isArray(cmdGroup)) { var i = cmdGroup.indexOf(command); if (i != -1) { cmdGroup.splice(i, 1); if (cmdGroup.length == 1) ckb[keyId] = cmdGroup[0]; } } } }; this.bindKey = function(key, command, position) { if (typeof key == "object") { if (position == undefined) position = key.position; key = key[this.platform]; } if (!key) return; if (typeof command == "function") return this.addCommand({exec: command, bindKey: key, name: command.name || key}); key.split("|").forEach(function(keyPart) { var chain = ""; if (keyPart.indexOf(" ") != -1) { var parts = keyPart.split(/\s+/); keyPart = parts.pop(); parts.forEach(function(keyPart) { var binding = this.parseKeys(keyPart); var id = KEY_MODS[binding.hashId] + binding.key; chain += (chain ? " " : "") + id; this._addCommandToBinding(chain, "chainKeys"); }, this); chain += " "; } var binding = this.parseKeys(keyPart); var id = KEY_MODS[binding.hashId] + binding.key; this._addCommandToBinding(chain + id, command, position); }, this); }; function getPosition(command) { return typeof command == "object" && command.bindKey && command.bindKey.position || 0; } this._addCommandToBinding = function(keyId, command, position) { var ckb = this.commandKeyBinding, i; if (!command) { delete ckb[keyId]; } else if (!ckb[keyId] || this.$singleCommand) { ckb[keyId] = command; } else { if (!Array.isArray(ckb[keyId])) { ckb[keyId] = [ckb[keyId]]; } else if ((i = ckb[keyId].indexOf(command)) != -1) { ckb[keyId].splice(i, 1); } if (typeof position != "number") { if (position || command.isDefault) position = -100; else position = getPosition(command); } var commands = ckb[keyId]; for (i = 0; i < commands.length; i++) { var other = commands[i]; var otherPos = getPosition(other); if (otherPos > position) break; } commands.splice(i, 0, command); } }; this.addCommands = function(commands) { commands && Object.keys(commands).forEach(function(name) { var command = commands[name]; if (!command) return; if (typeof command === "string") return this.bindKey(command, name); if (typeof command === "function") command = { exec: command }; if (typeof command !== "object") return; if (!command.name) command.name = name; this.addCommand(command); }, this); }; this.removeCommands = function(commands) { Object.keys(commands).forEach(function(name) { this.removeCommand(commands[name]); }, this); }; this.bindKeys = function(keyList) { Object.keys(keyList).forEach(function(key) { this.bindKey(key, keyList[key]); }, this); }; this._buildKeyHash = function(command) { this.bindKey(command.bindKey, command); }; this.parseKeys = function(keys) { var parts = keys.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(x){return x}); var key = parts.pop(); var keyCode = keyUtil[key]; if (keyUtil.FUNCTION_KEYS[keyCode]) key = keyUtil.FUNCTION_KEYS[keyCode].toLowerCase(); else if (!parts.length) return {key: key, hashId: -1}; else if (parts.length == 1 && parts[0] == "shift") return {key: key.toUpperCase(), hashId: -1}; var hashId = 0; for (var i = parts.length; i--;) { var modifier = keyUtil.KEY_MODS[parts[i]]; if (modifier == null) { if (typeof console != "undefined") console.error("invalid modifier " + parts[i] + " in " + keys); return false; } hashId |= modifier; } return {key: key, hashId: hashId}; }; this.findKeyCommand = function findKeyCommand(hashId, keyString) { var key = KEY_MODS[hashId] + keyString; return this.commandKeyBinding[key]; }; this.handleKeyboard = function(data, hashId, keyString, keyCode) { if (keyCode < 0) return; var key = KEY_MODS[hashId] + keyString; var command = this.commandKeyBinding[key]; if (data.$keyChain) { data.$keyChain += " " + key; command = this.commandKeyBinding[data.$keyChain] || command; } if (command) { if (command == "chainKeys" || command[command.length - 1] == "chainKeys") { data.$keyChain = data.$keyChain || key; return {command: "null"}; } } if (data.$keyChain) { if ((!hashId || hashId == 4) && keyString.length == 1) data.$keyChain = data.$keyChain.slice(0, -key.length - 1); // wait for input else if (hashId == -1 || keyCode > 0) data.$keyChain = ""; // reset keyChain } return {command: command}; }; this.getStatusText = function(editor, data) { return data.$keyChain || ""; }; }).call(HashHandler.prototype); exports.HashHandler = HashHandler; exports.MultiHashHandler = MultiHashHandler; }); define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var MultiHashHandler = require("../keyboard/hash_handler").MultiHashHandler; var EventEmitter = require("../lib/event_emitter").EventEmitter; var CommandManager = function(platform, commands) { MultiHashHandler.call(this, commands, platform); this.byName = this.commands; this.setDefaultHandler("exec", function(e) { return e.command.exec(e.editor, e.args || {}); }); }; oop.inherits(CommandManager, MultiHashHandler); (function() { oop.implement(this, EventEmitter); this.exec = function(command, editor, args) { if (Array.isArray(command)) { for (var i = command.length; i--; ) { if (this.exec(command[i], editor, args)) return true; } return false; } if (typeof command === "string") command = this.commands[command]; if (!command) return false; if (editor && editor.$readOnly && !command.readOnly) return false; var e = {editor: editor, command: command, args: args}; e.returnValue = this._emit("exec", e); this._signal("afterExec", e); return e.returnValue === false ? false : true; }; this.toggleRecording = function(editor) { if (this.$inReplay) return; editor && editor._emit("changeStatus"); if (this.recording) { this.macro.pop(); this.removeEventListener("exec", this.$addCommandToMacro); if (!this.macro.length) this.macro = this.oldMacro; return this.recording = false; } if (!this.$addCommandToMacro) { this.$addCommandToMacro = function(e) { this.macro.push([e.command, e.args]); }.bind(this); } this.oldMacro = this.macro; this.macro = []; this.on("exec", this.$addCommandToMacro); return this.recording = true; }; this.replay = function(editor) { if (this.$inReplay || !this.macro) return; if (this.recording) return this.toggleRecording(editor); try { this.$inReplay = true; this.macro.forEach(function(x) { if (typeof x == "string") this.exec(x, editor); else this.exec(x[0], editor, x[1]); }, this); } finally { this.$inReplay = false; } }; this.trimMacro = function(m) { return m.map(function(x){ if (typeof x[0] != "string") x[0] = x[0].name; if (!x[1]) x = x[0]; return x; }); }; }).call(CommandManager.prototype); exports.CommandManager = CommandManager; }); define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"], function(require, exports, module) { "use strict"; var lang = require("../lib/lang"); var config = require("../config"); var Range = require("../range").Range; function bindKey(win, mac) { return {win: win, mac: mac}; } exports.commands = [{ name: "showSettingsMenu", bindKey: bindKey("Ctrl-,", "Command-,"), exec: function(editor) { config.loadModule("ace/ext/settings_menu", function(module) { module.init(editor); editor.showSettingsMenu(); }); }, readOnly: true }, { name: "goToNextError", bindKey: bindKey("Alt-E", "Ctrl-E"), exec: function(editor) { config.loadModule("ace/ext/error_marker", function(module) { module.showErrorMarker(editor, 1); }); }, scrollIntoView: "animate", readOnly: true }, { name: "goToPreviousError", bindKey: bindKey("Alt-Shift-E", "Ctrl-Shift-E"), exec: function(editor) { config.loadModule("ace/ext/error_marker", function(module) { module.showErrorMarker(editor, -1); }); }, scrollIntoView: "animate", readOnly: true }, { name: "selectall", bindKey: bindKey("Ctrl-A", "Command-A"), exec: function(editor) { editor.selectAll(); }, readOnly: true }, { name: "centerselection", bindKey: bindKey(null, "Ctrl-L"), exec: function(editor) { editor.centerSelection(); }, readOnly: true }, { name: "gotoline", bindKey: bindKey("Ctrl-L", "Command-L"), exec: function(editor) { var line = parseInt(prompt("Enter line number:"), 10); if (!isNaN(line)) { editor.gotoLine(line); } }, readOnly: true }, { name: "fold", bindKey: bindKey("Alt-L|Ctrl-F1", "Command-Alt-L|Command-F1"), exec: function(editor) { editor.session.toggleFold(false); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "unfold", bindKey: bindKey("Alt-Shift-L|Ctrl-Shift-F1", "Command-Alt-Shift-L|Command-Shift-F1"), exec: function(editor) { editor.session.toggleFold(true); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "toggleFoldWidget", bindKey: bindKey("F2", "F2"), exec: function(editor) { editor.session.toggleFoldWidget(); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "toggleParentFoldWidget", bindKey: bindKey("Alt-F2", "Alt-F2"), exec: function(editor) { editor.session.toggleFoldWidget(true); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "foldall", bindKey: bindKey(null, "Ctrl-Command-Option-0"), exec: function(editor) { editor.session.foldAll(); }, scrollIntoView: "center", readOnly: true }, { name: "foldOther", bindKey: bindKey("Alt-0", "Command-Option-0"), exec: function(editor) { editor.session.foldAll(); editor.session.unfold(editor.selection.getAllRanges()); }, scrollIntoView: "center", readOnly: true }, { name: "unfoldall", bindKey: bindKey("Alt-Shift-0", "Command-Option-Shift-0"), exec: function(editor) { editor.session.unfold(); }, scrollIntoView: "center", readOnly: true }, { name: "findnext", bindKey: bindKey("Ctrl-K", "Command-G"), exec: function(editor) { editor.findNext(); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "findprevious", bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"), exec: function(editor) { editor.findPrevious(); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "selectOrFindNext", bindKey: bindKey("Alt-K", "Ctrl-G"), exec: function(editor) { if (editor.selection.isEmpty()) editor.selection.selectWord(); else editor.findNext(); }, readOnly: true }, { name: "selectOrFindPrevious", bindKey: bindKey("Alt-Shift-K", "Ctrl-Shift-G"), exec: function(editor) { if (editor.selection.isEmpty()) editor.selection.selectWord(); else editor.findPrevious(); }, readOnly: true }, { name: "find", bindKey: bindKey("Ctrl-F", "Command-F"), exec: function(editor) { config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor)}); }, readOnly: true }, { name: "overwrite", bindKey: "Insert", exec: function(editor) { editor.toggleOverwrite(); }, readOnly: true }, { name: "selecttostart", bindKey: bindKey("Ctrl-Shift-Home", "Command-Shift-Up"), exec: function(editor) { editor.getSelection().selectFileStart(); }, multiSelectAction: "forEach", readOnly: true, scrollIntoView: "animate", aceCommandGroup: "fileJump" }, { name: "gotostart", bindKey: bindKey("Ctrl-Home", "Command-Home|Command-Up"), exec: function(editor) { editor.navigateFileStart(); }, multiSelectAction: "forEach", readOnly: true, scrollIntoView: "animate", aceCommandGroup: "fileJump" }, { name: "selectup", bindKey: bindKey("Shift-Up", "Shift-Up"), exec: function(editor) { editor.getSelection().selectUp(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "golineup", bindKey: bindKey("Up", "Up|Ctrl-P"), exec: function(editor, args) { editor.navigateUp(args.times); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selecttoend", bindKey: bindKey("Ctrl-Shift-End", "Command-Shift-Down"), exec: function(editor) { editor.getSelection().selectFileEnd(); }, multiSelectAction: "forEach", readOnly: true, scrollIntoView: "animate", aceCommandGroup: "fileJump" }, { name: "gotoend", bindKey: bindKey("Ctrl-End", "Command-End|Command-Down"), exec: function(editor) { editor.navigateFileEnd(); }, multiSelectAction: "forEach", readOnly: true, scrollIntoView: "animate", aceCommandGroup: "fileJump" }, { name: "selectdown", bindKey: bindKey("Shift-Down", "Shift-Down"), exec: function(editor) { editor.getSelection().selectDown(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "golinedown", bindKey: bindKey("Down", "Down|Ctrl-N"), exec: function(editor, args) { editor.navigateDown(args.times); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectwordleft", bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"), exec: function(editor) { editor.getSelection().selectWordLeft(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotowordleft", bindKey: bindKey("Ctrl-Left", "Option-Left"), exec: function(editor) { editor.navigateWordLeft(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selecttolinestart", bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left"), exec: function(editor) { editor.getSelection().selectLineStart(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotolinestart", bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"), exec: function(editor) { editor.navigateLineStart(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectleft", bindKey: bindKey("Shift-Left", "Shift-Left"), exec: function(editor) { editor.getSelection().selectLeft(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotoleft", bindKey: bindKey("Left", "Left|Ctrl-B"), exec: function(editor, args) { editor.navigateLeft(args.times); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectwordright", bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"), exec: function(editor) { editor.getSelection().selectWordRight(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotowordright", bindKey: bindKey("Ctrl-Right", "Option-Right"), exec: function(editor) { editor.navigateWordRight(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selecttolineend", bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right"), exec: function(editor) { editor.getSelection().selectLineEnd(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotolineend", bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"), exec: function(editor) { editor.navigateLineEnd(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectright", bindKey: bindKey("Shift-Right", "Shift-Right"), exec: function(editor) { editor.getSelection().selectRight(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotoright", bindKey: bindKey("Right", "Right|Ctrl-F"), exec: function(editor, args) { editor.navigateRight(args.times); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectpagedown", bindKey: "Shift-PageDown", exec: function(editor) { editor.selectPageDown(); }, readOnly: true }, { name: "pagedown", bindKey: bindKey(null, "Option-PageDown"), exec: function(editor) { editor.scrollPageDown(); }, readOnly: true }, { name: "gotopagedown", bindKey: bindKey("PageDown", "PageDown|Ctrl-V"), exec: function(editor) { editor.gotoPageDown(); }, readOnly: true }, { name: "selectpageup", bindKey: "Shift-PageUp", exec: function(editor) { editor.selectPageUp(); }, readOnly: true }, { name: "pageup", bindKey: bindKey(null, "Option-PageUp"), exec: function(editor) { editor.scrollPageUp(); }, readOnly: true }, { name: "gotopageup", bindKey: "PageUp", exec: function(editor) { editor.gotoPageUp(); }, readOnly: true }, { name: "scrollup", bindKey: bindKey("Ctrl-Up", null), exec: function(e) { e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight); }, readOnly: true }, { name: "scrolldown", bindKey: bindKey("Ctrl-Down", null), exec: function(e) { e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight); }, readOnly: true }, { name: "selectlinestart", bindKey: "Shift-Home", exec: function(editor) { editor.getSelection().selectLineStart(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectlineend", bindKey: "Shift-End", exec: function(editor) { editor.getSelection().selectLineEnd(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "togglerecording", bindKey: bindKey("Ctrl-Alt-E", "Command-Option-E"), exec: function(editor) { editor.commands.toggleRecording(editor); }, readOnly: true }, { name: "replaymacro", bindKey: bindKey("Ctrl-Shift-E", "Command-Shift-E"), exec: function(editor) { editor.commands.replay(editor); }, readOnly: true }, { name: "jumptomatching", bindKey: bindKey("Ctrl-P", "Ctrl-P"), exec: function(editor) { editor.jumpToMatching(); }, multiSelectAction: "forEach", scrollIntoView: "animate", readOnly: true }, { name: "selecttomatching", bindKey: bindKey("Ctrl-Shift-P", "Ctrl-Shift-P"), exec: function(editor) { editor.jumpToMatching(true); }, multiSelectAction: "forEach", scrollIntoView: "animate", readOnly: true }, { name: "expandToMatching", bindKey: bindKey("Ctrl-Shift-M", "Ctrl-Shift-M"), exec: function(editor) { editor.jumpToMatching(true, true); }, multiSelectAction: "forEach", scrollIntoView: "animate", readOnly: true }, { name: "passKeysToBrowser", bindKey: bindKey(null, null), exec: function() {}, passEvent: true, readOnly: true }, { name: "copy", exec: function(editor) { }, readOnly: true }, { name: "cut", exec: function(editor) { var range = editor.getSelectionRange(); editor._emit("cut", range); if (!editor.selection.isEmpty()) { editor.session.remove(range); editor.clearSelection(); } }, scrollIntoView: "cursor", multiSelectAction: "forEach" }, { name: "paste", exec: function(editor, args) { editor.$handlePaste(args); }, scrollIntoView: "cursor" }, { name: "removeline", bindKey: bindKey("Ctrl-D", "Command-D"), exec: function(editor) { editor.removeLines(); }, scrollIntoView: "cursor", multiSelectAction: "forEachLine" }, { name: "duplicateSelection", bindKey: bindKey("Ctrl-Shift-D", "Command-Shift-D"), exec: function(editor) { editor.duplicateSelection(); }, scrollIntoView: "cursor", multiSelectAction: "forEach" }, { name: "sortlines", bindKey: bindKey("Ctrl-Alt-S", "Command-Alt-S"), exec: function(editor) { editor.sortLines(); }, scrollIntoView: "selection", multiSelectAction: "forEachLine" }, { name: "togglecomment", bindKey: bindKey("Ctrl-/", "Command-/"), exec: function(editor) { editor.toggleCommentLines(); }, multiSelectAction: "forEachLine", scrollIntoView: "selectionPart" }, { name: "toggleBlockComment", bindKey: bindKey("Ctrl-Shift-/", "Command-Shift-/"), exec: function(editor) { editor.toggleBlockComment(); }, multiSelectAction: "forEach", scrollIntoView: "selectionPart" }, { name: "modifyNumberUp", bindKey: bindKey("Ctrl-Shift-Up", "Alt-Shift-Up"), exec: function(editor) { editor.modifyNumber(1); }, scrollIntoView: "cursor", multiSelectAction: "forEach" }, { name: "modifyNumberDown", bindKey: bindKey("Ctrl-Shift-Down", "Alt-Shift-Down"), exec: function(editor) { editor.modifyNumber(-1); }, scrollIntoView: "cursor", multiSelectAction: "forEach" }, { name: "replace", bindKey: bindKey("Ctrl-H", "Command-Option-F"), exec: function(editor) { config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor, true)}); } }, { name: "undo", bindKey: bindKey("Ctrl-Z", "Command-Z"), exec: function(editor) { editor.undo(); } }, { name: "redo", bindKey: bindKey("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"), exec: function(editor) { editor.redo(); } }, { name: "copylinesup", bindKey: bindKey("Alt-Shift-Up", "Command-Option-Up"), exec: function(editor) { editor.copyLinesUp(); }, scrollIntoView: "cursor" }, { name: "movelinesup", bindKey: bindKey("Alt-Up", "Option-Up"), exec: function(editor) { editor.moveLinesUp(); }, scrollIntoView: "cursor" }, { name: "copylinesdown", bindKey: bindKey("Alt-Shift-Down", "Command-Option-Down"), exec: function(editor) { editor.copyLinesDown(); }, scrollIntoView: "cursor" }, { name: "movelinesdown", bindKey: bindKey("Alt-Down", "Option-Down"), exec: function(editor) { editor.moveLinesDown(); }, scrollIntoView: "cursor" }, { name: "del", bindKey: bindKey("Delete", "Delete|Ctrl-D|Shift-Delete"), exec: function(editor) { editor.remove("right"); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "backspace", bindKey: bindKey( "Shift-Backspace|Backspace", "Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H" ), exec: function(editor) { editor.remove("left"); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "cut_or_delete", bindKey: bindKey("Shift-Delete", null), exec: function(editor) { if (editor.selection.isEmpty()) { editor.remove("left"); } else { return false; } }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "removetolinestart", bindKey: bindKey("Alt-Backspace", "Command-Backspace"), exec: function(editor) { editor.removeToLineStart(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "removetolineend", bindKey: bindKey("Alt-Delete", "Ctrl-K"), exec: function(editor) { editor.removeToLineEnd(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "removewordleft", bindKey: bindKey("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"), exec: function(editor) { editor.removeWordLeft(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "removewordright", bindKey: bindKey("Ctrl-Delete", "Alt-Delete"), exec: function(editor) { editor.removeWordRight(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "outdent", bindKey: bindKey("Shift-Tab", "Shift-Tab"), exec: function(editor) { editor.blockOutdent(); }, multiSelectAction: "forEach", scrollIntoView: "selectionPart" }, { name: "indent", bindKey: bindKey("Tab", "Tab"), exec: function(editor) { editor.indent(); }, multiSelectAction: "forEach", scrollIntoView: "selectionPart" }, { name: "blockoutdent", bindKey: bindKey("Ctrl-[", "Ctrl-["), exec: function(editor) { editor.blockOutdent(); }, multiSelectAction: "forEachLine", scrollIntoView: "selectionPart" }, { name: "blockindent", bindKey: bindKey("Ctrl-]", "Ctrl-]"), exec: function(editor) { editor.blockIndent(); }, multiSelectAction: "forEachLine", scrollIntoView: "selectionPart" }, { name: "insertstring", exec: function(editor, str) { editor.insert(str); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "inserttext", exec: function(editor, args) { editor.insert(lang.stringRepeat(args.text || "", args.times || 1)); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "splitline", bindKey: bindKey(null, "Ctrl-O"), exec: function(editor) { editor.splitLine(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "transposeletters", bindKey: bindKey("Ctrl-T", "Ctrl-T"), exec: function(editor) { editor.transposeLetters(); }, multiSelectAction: function(editor) {editor.transposeSelections(1); }, scrollIntoView: "cursor" }, { name: "touppercase", bindKey: bindKey("Ctrl-U", "Ctrl-U"), exec: function(editor) { editor.toUpperCase(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "tolowercase", bindKey: bindKey("Ctrl-Shift-U", "Ctrl-Shift-U"), exec: function(editor) { editor.toLowerCase(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "expandtoline", bindKey: bindKey("Ctrl-Shift-L", "Command-Shift-L"), exec: function(editor) { var range = editor.selection.getRange(); range.start.column = range.end.column = 0; range.end.row++; editor.selection.setRange(range, false); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "joinlines", bindKey: bindKey(null, null), exec: function(editor) { var isBackwards = editor.selection.isBackwards(); var selectionStart = isBackwards ? editor.selection.getSelectionLead() : editor.selection.getSelectionAnchor(); var selectionEnd = isBackwards ? editor.selection.getSelectionAnchor() : editor.selection.getSelectionLead(); var firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length; var selectedText = editor.session.doc.getTextRange(editor.selection.getRange()); var selectedCount = selectedText.replace(/\n\s*/, " ").length; var insertLine = editor.session.doc.getLine(selectionStart.row); for (var i = selectionStart.row + 1; i <= selectionEnd.row + 1; i++) { var curLine = lang.stringTrimLeft(lang.stringTrimRight(editor.session.doc.getLine(i))); if (curLine.length !== 0) { curLine = " " + curLine; } insertLine += curLine; } if (selectionEnd.row + 1 < (editor.session.doc.getLength() - 1)) { insertLine += editor.session.doc.getNewLineCharacter(); } editor.clearSelection(); editor.session.doc.replace(new Range(selectionStart.row, 0, selectionEnd.row + 2, 0), insertLine); if (selectedCount > 0) { editor.selection.moveCursorTo(selectionStart.row, selectionStart.column); editor.selection.selectTo(selectionStart.row, selectionStart.column + selectedCount); } else { firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length > firstLineEndCol ? (firstLineEndCol + 1) : firstLineEndCol; editor.selection.moveCursorTo(selectionStart.row, firstLineEndCol); } }, multiSelectAction: "forEach", readOnly: true }, { name: "invertSelection", bindKey: bindKey(null, null), exec: function(editor) { var endRow = editor.session.doc.getLength() - 1; var endCol = editor.session.doc.getLine(endRow).length; var ranges = editor.selection.rangeList.ranges; var newRanges = []; if (ranges.length < 1) { ranges = [editor.selection.getRange()]; } for (var i = 0; i < ranges.length; i++) { if (i == (ranges.length - 1)) { if (!(ranges[i].end.row === endRow && ranges[i].end.column === endCol)) { newRanges.push(new Range(ranges[i].end.row, ranges[i].end.column, endRow, endCol)); } } if (i === 0) { if (!(ranges[i].start.row === 0 && ranges[i].start.column === 0)) { newRanges.push(new Range(0, 0, ranges[i].start.row, ranges[i].start.column)); } } else { newRanges.push(new Range(ranges[i-1].end.row, ranges[i-1].end.column, ranges[i].start.row, ranges[i].start.column)); } } editor.exitMultiSelectMode(); editor.clearSelection(); for(var i = 0; i < newRanges.length; i++) { editor.selection.addRange(newRanges[i], false); } }, readOnly: true, scrollIntoView: "none" }]; }); define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"], function(require, exports, module) { "use strict"; require("./lib/fixoldbrowsers"); var oop = require("./lib/oop"); var dom = require("./lib/dom"); var lang = require("./lib/lang"); var useragent = require("./lib/useragent"); var TextInput = require("./keyboard/textinput").TextInput; var MouseHandler = require("./mouse/mouse_handler").MouseHandler; var FoldHandler = require("./mouse/fold_handler").FoldHandler; var KeyBinding = require("./keyboard/keybinding").KeyBinding; var EditSession = require("./edit_session").EditSession; var Search = require("./search").Search; var Range = require("./range").Range; var EventEmitter = require("./lib/event_emitter").EventEmitter; var CommandManager = require("./commands/command_manager").CommandManager; var defaultCommands = require("./commands/default_commands").commands; var config = require("./config"); var TokenIterator = require("./token_iterator").TokenIterator; var Editor = function(renderer, session) { var container = renderer.getContainerElement(); this.container = container; this.renderer = renderer; this.commands = new CommandManager(useragent.isMac ? "mac" : "win", defaultCommands); this.textInput = new TextInput(renderer.getTextAreaContainer(), this); this.renderer.textarea = this.textInput.getElement(); this.keyBinding = new KeyBinding(this); this.$mouseHandler = new MouseHandler(this); new FoldHandler(this); this.$blockScrolling = 0; this.$search = new Search().set({ wrap: true }); this.$historyTracker = this.$historyTracker.bind(this); this.commands.on("exec", this.$historyTracker); this.$initOperationListeners(); this._$emitInputEvent = lang.delayedCall(function() { this._signal("input", {}); if (this.session && this.session.bgTokenizer) this.session.bgTokenizer.scheduleStart(); }.bind(this)); this.on("change", function(_, _self) { _self._$emitInputEvent.schedule(31); }); this.setSession(session || new EditSession("")); config.resetOptions(this); config._signal("editor", this); }; (function(){ oop.implement(this, EventEmitter); this.$initOperationListeners = function() { function last(a) {return a[a.length - 1]} this.selections = []; this.commands.on("exec", this.startOperation.bind(this), true); this.commands.on("afterExec", this.endOperation.bind(this), true); this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this)); this.on("change", function() { this.curOp || this.startOperation(); this.curOp.docChanged = true; }.bind(this), true); this.on("changeSelection", function() { this.curOp || this.startOperation(); this.curOp.selectionChanged = true; }.bind(this), true); }; this.curOp = null; this.prevOp = {}; this.startOperation = function(commadEvent) { if (this.curOp) { if (!commadEvent || this.curOp.command) return; this.prevOp = this.curOp; } if (!commadEvent) { this.previousCommand = null; commadEvent = {}; } this.$opResetTimer.schedule(); this.curOp = { command: commadEvent.command || {}, args: commadEvent.args, scrollTop: this.renderer.scrollTop }; if (this.curOp.command.name && this.curOp.command.scrollIntoView !== undefined) this.$blockScrolling++; }; this.endOperation = function(e) { if (this.curOp) { if (e && e.returnValue === false) return this.curOp = null; this._signal("beforeEndOperation"); var command = this.curOp.command; if (command.name && this.$blockScrolling > 0) this.$blockScrolling--; var scrollIntoView = command && command.scrollIntoView; if (scrollIntoView) { switch (scrollIntoView) { case "center-animate": scrollIntoView = "animate"; case "center": this.renderer.scrollCursorIntoView(null, 0.5); break; case "animate": case "cursor": this.renderer.scrollCursorIntoView(); break; case "selectionPart": var range = this.selection.getRange(); var config = this.renderer.layerConfig; if (range.start.row >= config.lastRow || range.end.row <= config.firstRow) { this.renderer.scrollSelectionIntoView(this.selection.anchor, this.selection.lead); } break; default: break; } if (scrollIntoView == "animate") this.renderer.animateScrolling(this.curOp.scrollTop); } this.prevOp = this.curOp; this.curOp = null; } }; this.$mergeableCommands = ["backspace", "del", "insertstring"]; this.$historyTracker = function(e) { if (!this.$mergeUndoDeltas) return; var prev = this.prevOp; var mergeableCommands = this.$mergeableCommands; var shouldMerge = prev.command && (e.command.name == prev.command.name); if (e.command.name == "insertstring") { var text = e.args; if (this.mergeNextCommand === undefined) this.mergeNextCommand = true; shouldMerge = shouldMerge && this.mergeNextCommand // previous command allows to coalesce with && (!/\s/.test(text) || /\s/.test(prev.args)); // previous insertion was of same type this.mergeNextCommand = true; } else { shouldMerge = shouldMerge && mergeableCommands.indexOf(e.command.name) !== -1; // the command is mergeable } if ( this.$mergeUndoDeltas != "always" && Date.now() - this.sequenceStartTime > 2000 ) { shouldMerge = false; // the sequence is too long } if (shouldMerge) this.session.mergeUndoDeltas = true; else if (mergeableCommands.indexOf(e.command.name) !== -1) this.sequenceStartTime = Date.now(); }; this.setKeyboardHandler = function(keyboardHandler, cb) { if (keyboardHandler && typeof keyboardHandler === "string") { this.$keybindingId = keyboardHandler; var _self = this; config.loadModule(["keybinding", keyboardHandler], function(module) { if (_self.$keybindingId == keyboardHandler) _self.keyBinding.setKeyboardHandler(module && module.handler); cb && cb(); }); } else { this.$keybindingId = null; this.keyBinding.setKeyboardHandler(keyboardHandler); cb && cb(); } }; this.getKeyboardHandler = function() { return this.keyBinding.getKeyboardHandler(); }; this.setSession = function(session) { if (this.session == session) return; if (this.curOp) this.endOperation(); this.curOp = {}; var oldSession = this.session; if (oldSession) { this.session.removeEventListener("change", this.$onDocumentChange); this.session.removeEventListener("changeMode", this.$onChangeMode); this.session.removeEventListener("tokenizerUpdate", this.$onTokenizerUpdate); this.session.removeEventListener("changeTabSize", this.$onChangeTabSize); this.session.removeEventListener("changeWrapLimit", this.$onChangeWrapLimit); this.session.removeEventListener("changeWrapMode", this.$onChangeWrapMode); this.session.removeEventListener("onChangeFold", this.$onChangeFold); this.session.removeEventListener("changeFrontMarker", this.$onChangeFrontMarker); this.session.removeEventListener("changeBackMarker", this.$onChangeBackMarker); this.session.removeEventListener("changeBreakpoint", this.$onChangeBreakpoint); this.session.removeEventListener("changeAnnotation", this.$onChangeAnnotation); this.session.removeEventListener("changeOverwrite", this.$onCursorChange); this.session.removeEventListener("changeScrollTop", this.$onScrollTopChange); this.session.removeEventListener("changeScrollLeft", this.$onScrollLeftChange); var selection = this.session.getSelection(); selection.removeEventListener("changeCursor", this.$onCursorChange); selection.removeEventListener("changeSelection", this.$onSelectionChange); } this.session = session; if (session) { this.$onDocumentChange = this.onDocumentChange.bind(this); session.addEventListener("change", this.$onDocumentChange); this.renderer.setSession(session); this.$onChangeMode = this.onChangeMode.bind(this); session.addEventListener("changeMode", this.$onChangeMode); this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this); session.addEventListener("tokenizerUpdate", this.$onTokenizerUpdate); this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer); session.addEventListener("changeTabSize", this.$onChangeTabSize); this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this); session.addEventListener("changeWrapLimit", this.$onChangeWrapLimit); this.$onChangeWrapMode = this.onChangeWrapMode.bind(this); session.addEventListener("changeWrapMode", this.$onChangeWrapMode); this.$onChangeFold = this.onChangeFold.bind(this); session.addEventListener("changeFold", this.$onChangeFold); this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this); this.session.addEventListener("changeFrontMarker", this.$onChangeFrontMarker); this.$onChangeBackMarker = this.onChangeBackMarker.bind(this); this.session.addEventListener("changeBackMarker", this.$onChangeBackMarker); this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this); this.session.addEventListener("changeBreakpoint", this.$onChangeBreakpoint); this.$onChangeAnnotation = this.onChangeAnnotation.bind(this); this.session.addEventListener("changeAnnotation", this.$onChangeAnnotation); this.$onCursorChange = this.onCursorChange.bind(this); this.session.addEventListener("changeOverwrite", this.$onCursorChange); this.$onScrollTopChange = this.onScrollTopChange.bind(this); this.session.addEventListener("changeScrollTop", this.$onScrollTopChange); this.$onScrollLeftChange = this.onScrollLeftChange.bind(this); this.session.addEventListener("changeScrollLeft", this.$onScrollLeftChange); this.selection = session.getSelection(); this.selection.addEventListener("changeCursor", this.$onCursorChange); this.$onSelectionChange = this.onSelectionChange.bind(this); this.selection.addEventListener("changeSelection", this.$onSelectionChange); this.onChangeMode(); this.$blockScrolling += 1; this.onCursorChange(); this.$blockScrolling -= 1; this.onScrollTopChange(); this.onScrollLeftChange(); this.onSelectionChange(); this.onChangeFrontMarker(); this.onChangeBackMarker(); this.onChangeBreakpoint(); this.onChangeAnnotation(); this.session.getUseWrapMode() && this.renderer.adjustWrapLimit(); this.renderer.updateFull(); } else { this.selection = null; this.renderer.setSession(session); } this._signal("changeSession", { session: session, oldSession: oldSession }); this.curOp = null; oldSession && oldSession._signal("changeEditor", {oldEditor: this}); session && session._signal("changeEditor", {editor: this}); }; this.getSession = function() { return this.session; }; this.setValue = function(val, cursorPos) { this.session.doc.setValue(val); if (!cursorPos) this.selectAll(); else if (cursorPos == 1) this.navigateFileEnd(); else if (cursorPos == -1) this.navigateFileStart(); return val; }; this.getValue = function() { return this.session.getValue(); }; this.getSelection = function() { return this.selection; }; this.resize = function(force) { this.renderer.onResize(force); }; this.setTheme = function(theme, cb) { this.renderer.setTheme(theme, cb); }; this.getTheme = function() { return this.renderer.getTheme(); }; this.setStyle = function(style) { this.renderer.setStyle(style); }; this.unsetStyle = function(style) { this.renderer.unsetStyle(style); }; this.getFontSize = function () { return this.getOption("fontSize") || dom.computedStyle(this.container, "fontSize"); }; this.setFontSize = function(size) { this.setOption("fontSize", size); }; this.$highlightBrackets = function() { if (this.session.$bracketHighlight) { this.session.removeMarker(this.session.$bracketHighlight); this.session.$bracketHighlight = null; } if (this.$highlightPending) { return; } var self = this; this.$highlightPending = true; setTimeout(function() { self.$highlightPending = false; var session = self.session; if (!session || !session.bgTokenizer) return; var pos = session.findMatchingBracket(self.getCursorPosition()); if (pos) { var range = new Range(pos.row, pos.column, pos.row, pos.column + 1); } else if (session.$mode.getMatching) { var range = session.$mode.getMatching(self.session); } if (range) session.$bracketHighlight = session.addMarker(range, "ace_bracket", "text"); }, 50); }; this.$highlightTags = function() { if (this.$highlightTagPending) return; var self = this; this.$highlightTagPending = true; setTimeout(function() { self.$highlightTagPending = false; var session = self.session; if (!session || !session.bgTokenizer) return; var pos = self.getCursorPosition(); var iterator = new TokenIterator(self.session, pos.row, pos.column); var token = iterator.getCurrentToken(); if (!token || !/\b(?:tag-open|tag-name)/.test(token.type)) { session.removeMarker(session.$tagHighlight); session.$tagHighlight = null; return; } if (token.type.indexOf("tag-open") != -1) { token = iterator.stepForward(); if (!token) return; } var tag = token.value; var depth = 0; var prevToken = iterator.stepBackward(); if (prevToken.value == '<'){ do { prevToken = token; token = iterator.stepForward(); if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) { if (prevToken.value === '<'){ depth++; } else if (prevToken.value === '= 0); } else { do { token = prevToken; prevToken = iterator.stepBackward(); if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) { if (prevToken.value === '<') { depth++; } else if (prevToken.value === ' 1)) highlight = false; } if (session.$highlightLineMarker && !highlight) { session.removeMarker(session.$highlightLineMarker.id); session.$highlightLineMarker = null; } else if (!session.$highlightLineMarker && highlight) { var range = new Range(highlight.row, highlight.column, highlight.row, Infinity); range.id = session.addMarker(range, "ace_active-line", "screenLine"); session.$highlightLineMarker = range; } else if (highlight) { session.$highlightLineMarker.start.row = highlight.row; session.$highlightLineMarker.end.row = highlight.row; session.$highlightLineMarker.start.column = highlight.column; session._signal("changeBackMarker"); } }; this.onSelectionChange = function(e) { var session = this.session; if (session.$selectionMarker) { session.removeMarker(session.$selectionMarker); } session.$selectionMarker = null; if (!this.selection.isEmpty()) { var range = this.selection.getRange(); var style = this.getSelectionStyle(); session.$selectionMarker = session.addMarker(range, "ace_selection", style); } else { this.$updateHighlightActiveLine(); } var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp(); this.session.highlight(re); this._signal("changeSelection"); }; this.$getSelectionHighLightRegexp = function() { var session = this.session; var selection = this.getSelectionRange(); if (selection.isEmpty() || selection.isMultiLine()) return; var startOuter = selection.start.column - 1; var endOuter = selection.end.column + 1; var line = session.getLine(selection.start.row); var lineCols = line.length; var needle = line.substring(Math.max(startOuter, 0), Math.min(endOuter, lineCols)); if ((startOuter >= 0 && /^[\w\d]/.test(needle)) || (endOuter <= lineCols && /[\w\d]$/.test(needle))) return; needle = line.substring(selection.start.column, selection.end.column); if (!/^[\w\d]+$/.test(needle)) return; var re = this.$search.$assembleRegExp({ wholeWord: true, caseSensitive: true, needle: needle }); return re; }; this.onChangeFrontMarker = function() { this.renderer.updateFrontMarkers(); }; this.onChangeBackMarker = function() { this.renderer.updateBackMarkers(); }; this.onChangeBreakpoint = function() { this.renderer.updateBreakpoints(); }; this.onChangeAnnotation = function() { this.renderer.setAnnotations(this.session.getAnnotations()); }; this.onChangeMode = function(e) { this.renderer.updateText(); this._emit("changeMode", e); }; this.onChangeWrapLimit = function() { this.renderer.updateFull(); }; this.onChangeWrapMode = function() { this.renderer.onResize(true); }; this.onChangeFold = function() { this.$updateHighlightActiveLine(); this.renderer.updateFull(); }; this.getSelectedText = function() { return this.session.getTextRange(this.getSelectionRange()); }; this.getCopyText = function() { var text = this.getSelectedText(); this._signal("copy", text); return text; }; this.onCopy = function() { this.commands.exec("copy", this); }; this.onCut = function() { this.commands.exec("cut", this); }; this.onPaste = function(text, event) { var e = {text: text, event: event}; this.commands.exec("paste", this, e); }; this.$handlePaste = function(e) { if (typeof e == "string") e = {text: e}; this._signal("paste", e); var text = e.text; if (!this.inMultiSelectMode || this.inVirtualSelectionMode) { this.insert(text); } else { var lines = text.split(/\r\n|\r|\n/); var ranges = this.selection.rangeList.ranges; if (lines.length > ranges.length || lines.length < 2 || !lines[1]) return this.commands.exec("insertstring", this, text); for (var i = ranges.length; i--;) { var range = ranges[i]; if (!range.isEmpty()) this.session.remove(range); this.session.insert(range.start, lines[i]); } } }; this.execCommand = function(command, args) { return this.commands.exec(command, this, args); }; this.insert = function(text, pasted) { var session = this.session; var mode = session.getMode(); var cursor = this.getCursorPosition(); if (this.getBehavioursEnabled() && !pasted) { var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text); if (transform) { if (text !== transform.text) { this.session.mergeUndoDeltas = false; this.$mergeNextCommand = false; } text = transform.text; } } if (text == "\t") text = this.session.getTabString(); if (!this.selection.isEmpty()) { var range = this.getSelectionRange(); cursor = this.session.remove(range); this.clearSelection(); } else if (this.session.getOverwrite()) { var range = new Range.fromPoints(cursor, cursor); range.end.column += text.length; this.session.remove(range); } if (text == "\n" || text == "\r\n") { var line = session.getLine(cursor.row); if (cursor.column > line.search(/\S|$/)) { var d = line.substr(cursor.column).search(/\S|$/); session.doc.removeInLine(cursor.row, cursor.column, cursor.column + d); } } this.clearSelection(); var start = cursor.column; var lineState = session.getState(cursor.row); var line = session.getLine(cursor.row); var shouldOutdent = mode.checkOutdent(lineState, line, text); var end = session.insert(cursor, text); if (transform && transform.selection) { if (transform.selection.length == 2) { // Transform relative to the current column this.selection.setSelectionRange( new Range(cursor.row, start + transform.selection[0], cursor.row, start + transform.selection[1])); } else { // Transform relative to the current row. this.selection.setSelectionRange( new Range(cursor.row + transform.selection[0], transform.selection[1], cursor.row + transform.selection[2], transform.selection[3])); } } if (session.getDocument().isNewLine(text)) { var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString()); session.insert({row: cursor.row+1, column: 0}, lineIndent); } if (shouldOutdent) mode.autoOutdent(lineState, session, cursor.row); }; this.onTextInput = function(text) { this.keyBinding.onTextInput(text); }; this.onCommandKey = function(e, hashId, keyCode) { this.keyBinding.onCommandKey(e, hashId, keyCode); }; this.setOverwrite = function(overwrite) { this.session.setOverwrite(overwrite); }; this.getOverwrite = function() { return this.session.getOverwrite(); }; this.toggleOverwrite = function() { this.session.toggleOverwrite(); }; this.setScrollSpeed = function(speed) { this.setOption("scrollSpeed", speed); }; this.getScrollSpeed = function() { return this.getOption("scrollSpeed"); }; this.setDragDelay = function(dragDelay) { this.setOption("dragDelay", dragDelay); }; this.getDragDelay = function() { return this.getOption("dragDelay"); }; this.setSelectionStyle = function(val) { this.setOption("selectionStyle", val); }; this.getSelectionStyle = function() { return this.getOption("selectionStyle"); }; this.setHighlightActiveLine = function(shouldHighlight) { this.setOption("highlightActiveLine", shouldHighlight); }; this.getHighlightActiveLine = function() { return this.getOption("highlightActiveLine"); }; this.setHighlightGutterLine = function(shouldHighlight) { this.setOption("highlightGutterLine", shouldHighlight); }; this.getHighlightGutterLine = function() { return this.getOption("highlightGutterLine"); }; this.setHighlightSelectedWord = function(shouldHighlight) { this.setOption("highlightSelectedWord", shouldHighlight); }; this.getHighlightSelectedWord = function() { return this.$highlightSelectedWord; }; this.setAnimatedScroll = function(shouldAnimate){ this.renderer.setAnimatedScroll(shouldAnimate); }; this.getAnimatedScroll = function(){ return this.renderer.getAnimatedScroll(); }; this.setShowInvisibles = function(showInvisibles) { this.renderer.setShowInvisibles(showInvisibles); }; this.getShowInvisibles = function() { return this.renderer.getShowInvisibles(); }; this.setDisplayIndentGuides = function(display) { this.renderer.setDisplayIndentGuides(display); }; this.getDisplayIndentGuides = function() { return this.renderer.getDisplayIndentGuides(); }; this.setShowPrintMargin = function(showPrintMargin) { this.renderer.setShowPrintMargin(showPrintMargin); }; this.getShowPrintMargin = function() { return this.renderer.getShowPrintMargin(); }; this.setPrintMarginColumn = function(showPrintMargin) { this.renderer.setPrintMarginColumn(showPrintMargin); }; this.getPrintMarginColumn = function() { return this.renderer.getPrintMarginColumn(); }; this.setReadOnly = function(readOnly) { this.setOption("readOnly", readOnly); }; this.getReadOnly = function() { return this.getOption("readOnly"); }; this.setBehavioursEnabled = function (enabled) { this.setOption("behavioursEnabled", enabled); }; this.getBehavioursEnabled = function () { return this.getOption("behavioursEnabled"); }; this.setWrapBehavioursEnabled = function (enabled) { this.setOption("wrapBehavioursEnabled", enabled); }; this.getWrapBehavioursEnabled = function () { return this.getOption("wrapBehavioursEnabled"); }; this.setShowFoldWidgets = function(show) { this.setOption("showFoldWidgets", show); }; this.getShowFoldWidgets = function() { return this.getOption("showFoldWidgets"); }; this.setFadeFoldWidgets = function(fade) { this.setOption("fadeFoldWidgets", fade); }; this.getFadeFoldWidgets = function() { return this.getOption("fadeFoldWidgets"); }; this.remove = function(dir) { if (this.selection.isEmpty()){ if (dir == "left") this.selection.selectLeft(); else this.selection.selectRight(); } var range = this.getSelectionRange(); if (this.getBehavioursEnabled()) { var session = this.session; var state = session.getState(range.start.row); var new_range = session.getMode().transformAction(state, 'deletion', this, session, range); if (range.end.column === 0) { var text = session.getTextRange(range); if (text[text.length - 1] == "\n") { var line = session.getLine(range.end.row); if (/^\s+$/.test(line)) { range.end.column = line.length; } } } if (new_range) range = new_range; } this.session.remove(range); this.clearSelection(); }; this.removeWordRight = function() { if (this.selection.isEmpty()) this.selection.selectWordRight(); this.session.remove(this.getSelectionRange()); this.clearSelection(); }; this.removeWordLeft = function() { if (this.selection.isEmpty()) this.selection.selectWordLeft(); this.session.remove(this.getSelectionRange()); this.clearSelection(); }; this.removeToLineStart = function() { if (this.selection.isEmpty()) this.selection.selectLineStart(); this.session.remove(this.getSelectionRange()); this.clearSelection(); }; this.removeToLineEnd = function() { if (this.selection.isEmpty()) this.selection.selectLineEnd(); var range = this.getSelectionRange(); if (range.start.column == range.end.column && range.start.row == range.end.row) { range.end.column = 0; range.end.row++; } this.session.remove(range); this.clearSelection(); }; this.splitLine = function() { if (!this.selection.isEmpty()) { this.session.remove(this.getSelectionRange()); this.clearSelection(); } var cursor = this.getCursorPosition(); this.insert("\n"); this.moveCursorToPosition(cursor); }; this.transposeLetters = function() { if (!this.selection.isEmpty()) { return; } var cursor = this.getCursorPosition(); var column = cursor.column; if (column === 0) return; var line = this.session.getLine(cursor.row); var swap, range; if (column < line.length) { swap = line.charAt(column) + line.charAt(column-1); range = new Range(cursor.row, column-1, cursor.row, column+1); } else { swap = line.charAt(column-1) + line.charAt(column-2); range = new Range(cursor.row, column-2, cursor.row, column); } this.session.replace(range, swap); }; this.toLowerCase = function() { var originalRange = this.getSelectionRange(); if (this.selection.isEmpty()) { this.selection.selectWord(); } var range = this.getSelectionRange(); var text = this.session.getTextRange(range); this.session.replace(range, text.toLowerCase()); this.selection.setSelectionRange(originalRange); }; this.toUpperCase = function() { var originalRange = this.getSelectionRange(); if (this.selection.isEmpty()) { this.selection.selectWord(); } var range = this.getSelectionRange(); var text = this.session.getTextRange(range); this.session.replace(range, text.toUpperCase()); this.selection.setSelectionRange(originalRange); }; this.indent = function() { var session = this.session; var range = this.getSelectionRange(); if (range.start.row < range.end.row) { var rows = this.$getSelectedRows(); session.indentRows(rows.first, rows.last, "\t"); return; } else if (range.start.column < range.end.column) { var text = session.getTextRange(range); if (!/^\s+$/.test(text)) { var rows = this.$getSelectedRows(); session.indentRows(rows.first, rows.last, "\t"); return; } } var line = session.getLine(range.start.row); var position = range.start; var size = session.getTabSize(); var column = session.documentToScreenColumn(position.row, position.column); if (this.session.getUseSoftTabs()) { var count = (size - column % size); var indentString = lang.stringRepeat(" ", count); } else { var count = column % size; while (line[range.start.column] == " " && count) { range.start.column--; count--; } this.selection.setSelectionRange(range); indentString = "\t"; } return this.insert(indentString); }; this.blockIndent = function() { var rows = this.$getSelectedRows(); this.session.indentRows(rows.first, rows.last, "\t"); }; this.blockOutdent = function() { var selection = this.session.getSelection(); this.session.outdentRows(selection.getRange()); }; this.sortLines = function() { var rows = this.$getSelectedRows(); var session = this.session; var lines = []; for (i = rows.first; i <= rows.last; i++) lines.push(session.getLine(i)); lines.sort(function(a, b) { if (a.toLowerCase() < b.toLowerCase()) return -1; if (a.toLowerCase() > b.toLowerCase()) return 1; return 0; }); var deleteRange = new Range(0, 0, 0, 0); for (var i = rows.first; i <= rows.last; i++) { var line = session.getLine(i); deleteRange.start.row = i; deleteRange.end.row = i; deleteRange.end.column = line.length; session.replace(deleteRange, lines[i-rows.first]); } }; this.toggleCommentLines = function() { var state = this.session.getState(this.getCursorPosition().row); var rows = this.$getSelectedRows(); this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last); }; this.toggleBlockComment = function() { var cursor = this.getCursorPosition(); var state = this.session.getState(cursor.row); var range = this.getSelectionRange(); this.session.getMode().toggleBlockComment(state, this.session, range, cursor); }; this.getNumberAt = function(row, column) { var _numberRx = /[\-]?[0-9]+(?:\.[0-9]+)?/g; _numberRx.lastIndex = 0; var s = this.session.getLine(row); while (_numberRx.lastIndex < column) { var m = _numberRx.exec(s); if(m.index <= column && m.index+m[0].length >= column){ var number = { value: m[0], start: m.index, end: m.index+m[0].length }; return number; } } return null; }; this.modifyNumber = function(amount) { var row = this.selection.getCursor().row; var column = this.selection.getCursor().column; var charRange = new Range(row, column-1, row, column); var c = this.session.getTextRange(charRange); if (!isNaN(parseFloat(c)) && isFinite(c)) { var nr = this.getNumberAt(row, column); if (nr) { var fp = nr.value.indexOf(".") >= 0 ? nr.start + nr.value.indexOf(".") + 1 : nr.end; var decimals = nr.start + nr.value.length - fp; var t = parseFloat(nr.value); t *= Math.pow(10, decimals); if(fp !== nr.end && column < fp){ amount *= Math.pow(10, nr.end - column - 1); } else { amount *= Math.pow(10, nr.end - column); } t += amount; t /= Math.pow(10, decimals); var nnr = t.toFixed(decimals); var replaceRange = new Range(row, nr.start, row, nr.end); this.session.replace(replaceRange, nnr); this.moveCursorTo(row, Math.max(nr.start +1, column + nnr.length - nr.value.length)); } } }; this.removeLines = function() { var rows = this.$getSelectedRows(); this.session.removeFullLines(rows.first, rows.last); this.clearSelection(); }; this.duplicateSelection = function() { var sel = this.selection; var doc = this.session; var range = sel.getRange(); var reverse = sel.isBackwards(); if (range.isEmpty()) { var row = range.start.row; doc.duplicateLines(row, row); } else { var point = reverse ? range.start : range.end; var endPoint = doc.insert(point, doc.getTextRange(range), false); range.start = point; range.end = endPoint; sel.setSelectionRange(range, reverse); } }; this.moveLinesDown = function() { this.$moveLines(1, false); }; this.moveLinesUp = function() { this.$moveLines(-1, false); }; this.moveText = function(range, toPosition, copy) { return this.session.moveText(range, toPosition, copy); }; this.copyLinesUp = function() { this.$moveLines(-1, true); }; this.copyLinesDown = function() { this.$moveLines(1, true); }; this.$moveLines = function(dir, copy) { var rows, moved; var selection = this.selection; if (!selection.inMultiSelectMode || this.inVirtualSelectionMode) { var range = selection.toOrientedRange(); rows = this.$getSelectedRows(range); moved = this.session.$moveLines(rows.first, rows.last, copy ? 0 : dir); if (copy && dir == -1) moved = 0; range.moveBy(moved, 0); selection.fromOrientedRange(range); } else { var ranges = selection.rangeList.ranges; selection.rangeList.detach(this.session); this.inVirtualSelectionMode = true; var diff = 0; var totalDiff = 0; var l = ranges.length; for (var i = 0; i < l; i++) { var rangeIndex = i; ranges[i].moveBy(diff, 0); rows = this.$getSelectedRows(ranges[i]); var first = rows.first; var last = rows.last; while (++i < l) { if (totalDiff) ranges[i].moveBy(totalDiff, 0); var subRows = this.$getSelectedRows(ranges[i]); if (copy && subRows.first != last) break; else if (!copy && subRows.first > last + 1) break; last = subRows.last; } i--; diff = this.session.$moveLines(first, last, copy ? 0 : dir); if (copy && dir == -1) rangeIndex = i + 1; while (rangeIndex <= i) { ranges[rangeIndex].moveBy(diff, 0); rangeIndex++; } if (!copy) diff = 0; totalDiff += diff; } selection.fromOrientedRange(selection.ranges[0]); selection.rangeList.attach(this.session); this.inVirtualSelectionMode = false; } }; this.$getSelectedRows = function(range) { range = (range || this.getSelectionRange()).collapseRows(); return { first: this.session.getRowFoldStart(range.start.row), last: this.session.getRowFoldEnd(range.end.row) }; }; this.onCompositionStart = function(text) { this.renderer.showComposition(this.getCursorPosition()); }; this.onCompositionUpdate = function(text) { this.renderer.setCompositionText(text); }; this.onCompositionEnd = function() { this.renderer.hideComposition(); }; this.getFirstVisibleRow = function() { return this.renderer.getFirstVisibleRow(); }; this.getLastVisibleRow = function() { return this.renderer.getLastVisibleRow(); }; this.isRowVisible = function(row) { return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow()); }; this.isRowFullyVisible = function(row) { return (row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow()); }; this.$getVisibleRowCount = function() { return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1; }; this.$moveByPage = function(dir, select) { var renderer = this.renderer; var config = this.renderer.layerConfig; var rows = dir * Math.floor(config.height / config.lineHeight); this.$blockScrolling++; if (select === true) { this.selection.$moveSelection(function(){ this.moveCursorBy(rows, 0); }); } else if (select === false) { this.selection.moveCursorBy(rows, 0); this.selection.clearSelection(); } this.$blockScrolling--; var scrollTop = renderer.scrollTop; renderer.scrollBy(0, rows * config.lineHeight); if (select != null) renderer.scrollCursorIntoView(null, 0.5); renderer.animateScrolling(scrollTop); }; this.selectPageDown = function() { this.$moveByPage(1, true); }; this.selectPageUp = function() { this.$moveByPage(-1, true); }; this.gotoPageDown = function() { this.$moveByPage(1, false); }; this.gotoPageUp = function() { this.$moveByPage(-1, false); }; this.scrollPageDown = function() { this.$moveByPage(1); }; this.scrollPageUp = function() { this.$moveByPage(-1); }; this.scrollToRow = function(row) { this.renderer.scrollToRow(row); }; this.scrollToLine = function(line, center, animate, callback) { this.renderer.scrollToLine(line, center, animate, callback); }; this.centerSelection = function() { var range = this.getSelectionRange(); var pos = { row: Math.floor(range.start.row + (range.end.row - range.start.row) / 2), column: Math.floor(range.start.column + (range.end.column - range.start.column) / 2) }; this.renderer.alignCursor(pos, 0.5); }; this.getCursorPosition = function() { return this.selection.getCursor(); }; this.getCursorPositionScreen = function() { return this.session.documentToScreenPosition(this.getCursorPosition()); }; this.getSelectionRange = function() { return this.selection.getRange(); }; this.selectAll = function() { this.$blockScrolling += 1; this.selection.selectAll(); this.$blockScrolling -= 1; }; this.clearSelection = function() { this.selection.clearSelection(); }; this.moveCursorTo = function(row, column) { this.selection.moveCursorTo(row, column); }; this.moveCursorToPosition = function(pos) { this.selection.moveCursorToPosition(pos); }; this.jumpToMatching = function(select, expand) { var cursor = this.getCursorPosition(); var iterator = new TokenIterator(this.session, cursor.row, cursor.column); var prevToken = iterator.getCurrentToken(); var token = prevToken || iterator.stepForward(); if (!token) return; var matchType; var found = false; var depth = {}; var i = cursor.column - token.start; var bracketType; var brackets = { ")": "(", "(": "(", "]": "[", "[": "[", "{": "{", "}": "{" }; do { if (token.value.match(/[{}()\[\]]/g)) { for (; i < token.value.length && !found; i++) { if (!brackets[token.value[i]]) { continue; } bracketType = brackets[token.value[i]] + '.' + token.type.replace("rparen", "lparen"); if (isNaN(depth[bracketType])) { depth[bracketType] = 0; } switch (token.value[i]) { case '(': case '[': case '{': depth[bracketType]++; break; case ')': case ']': case '}': depth[bracketType]--; if (depth[bracketType] === -1) { matchType = 'bracket'; found = true; } break; } } } else if (token && token.type.indexOf('tag-name') !== -1) { if (isNaN(depth[token.value])) { depth[token.value] = 0; } if (prevToken.value === '<') { depth[token.value]++; } else if (prevToken.value === '= 0; --i) { if(this.$tryReplace(ranges[i], replacement)) { replaced++; } } this.selection.setSelectionRange(selection); this.$blockScrolling -= 1; return replaced; }; this.$tryReplace = function(range, replacement) { var input = this.session.getTextRange(range); replacement = this.$search.replace(input, replacement); if (replacement !== null) { range.end = this.session.replace(range, replacement); return range; } else { return null; } }; this.getLastSearchOptions = function() { return this.$search.getOptions(); }; this.find = function(needle, options, animate) { if (!options) options = {}; if (typeof needle == "string" || needle instanceof RegExp) options.needle = needle; else if (typeof needle == "object") oop.mixin(options, needle); var range = this.selection.getRange(); if (options.needle == null) { needle = this.session.getTextRange(range) || this.$search.$options.needle; if (!needle) { range = this.session.getWordRange(range.start.row, range.start.column); needle = this.session.getTextRange(range); } this.$search.set({needle: needle}); } this.$search.set(options); if (!options.start) this.$search.set({start: range}); var newRange = this.$search.find(this.session); if (options.preventScroll) return newRange; if (newRange) { this.revealRange(newRange, animate); return newRange; } if (options.backwards) range.start = range.end; else range.end = range.start; this.selection.setRange(range); }; this.findNext = function(options, animate) { this.find({skipCurrent: true, backwards: false}, options, animate); }; this.findPrevious = function(options, animate) { this.find(options, {skipCurrent: true, backwards: true}, animate); }; this.revealRange = function(range, animate) { this.$blockScrolling += 1; this.session.unfold(range); this.selection.setSelectionRange(range); this.$blockScrolling -= 1; var scrollTop = this.renderer.scrollTop; this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5); if (animate !== false) this.renderer.animateScrolling(scrollTop); }; this.undo = function() { this.$blockScrolling++; this.session.getUndoManager().undo(); this.$blockScrolling--; this.renderer.scrollCursorIntoView(null, 0.5); }; this.redo = function() { this.$blockScrolling++; this.session.getUndoManager().redo(); this.$blockScrolling--; this.renderer.scrollCursorIntoView(null, 0.5); }; this.destroy = function() { this.renderer.destroy(); this._signal("destroy", this); if (this.session) { this.session.destroy(); } }; this.setAutoScrollEditorIntoView = function(enable) { if (!enable) return; var rect; var self = this; var shouldScroll = false; if (!this.$scrollAnchor) this.$scrollAnchor = document.createElement("div"); var scrollAnchor = this.$scrollAnchor; scrollAnchor.style.cssText = "position:absolute"; this.container.insertBefore(scrollAnchor, this.container.firstChild); var onChangeSelection = this.on("changeSelection", function() { shouldScroll = true; }); var onBeforeRender = this.renderer.on("beforeRender", function() { if (shouldScroll) rect = self.renderer.container.getBoundingClientRect(); }); var onAfterRender = this.renderer.on("afterRender", function() { if (shouldScroll && rect && (self.isFocused() || self.searchBox && self.searchBox.isFocused()) ) { var renderer = self.renderer; var pos = renderer.$cursorLayer.$pixelPos; var config = renderer.layerConfig; var top = pos.top - config.offset; if (pos.top >= 0 && top + rect.top < 0) { shouldScroll = true; } else if (pos.top < config.height && pos.top + rect.top + config.lineHeight > window.innerHeight) { shouldScroll = false; } else { shouldScroll = null; } if (shouldScroll != null) { scrollAnchor.style.top = top + "px"; scrollAnchor.style.left = pos.left + "px"; scrollAnchor.style.height = config.lineHeight + "px"; scrollAnchor.scrollIntoView(shouldScroll); } shouldScroll = rect = null; } }); this.setAutoScrollEditorIntoView = function(enable) { if (enable) return; delete this.setAutoScrollEditorIntoView; this.removeEventListener("changeSelection", onChangeSelection); this.renderer.removeEventListener("afterRender", onAfterRender); this.renderer.removeEventListener("beforeRender", onBeforeRender); }; }; this.$resetCursorStyle = function() { var style = this.$cursorStyle || "ace"; var cursorLayer = this.renderer.$cursorLayer; if (!cursorLayer) return; cursorLayer.setSmoothBlinking(/smooth/.test(style)); cursorLayer.isBlinking = !this.$readOnly && style != "wide"; dom.setCssClass(cursorLayer.element, "ace_slim-cursors", /slim/.test(style)); }; }).call(Editor.prototype); config.defineOptions(Editor.prototype, "editor", { selectionStyle: { set: function(style) { this.onSelectionChange(); this._signal("changeSelectionStyle", {data: style}); }, initialValue: "line" }, highlightActiveLine: { set: function() {this.$updateHighlightActiveLine();}, initialValue: true }, highlightSelectedWord: { set: function(shouldHighlight) {this.$onSelectionChange();}, initialValue: true }, readOnly: { set: function(readOnly) { this.$resetCursorStyle(); }, initialValue: false }, cursorStyle: { set: function(val) { this.$resetCursorStyle(); }, values: ["ace", "slim", "smooth", "wide"], initialValue: "ace" }, mergeUndoDeltas: { values: [false, true, "always"], initialValue: true }, behavioursEnabled: {initialValue: true}, wrapBehavioursEnabled: {initialValue: true}, autoScrollEditorIntoView: { set: function(val) {this.setAutoScrollEditorIntoView(val)} }, hScrollBarAlwaysVisible: "renderer", vScrollBarAlwaysVisible: "renderer", highlightGutterLine: "renderer", animatedScroll: "renderer", showInvisibles: "renderer", showPrintMargin: "renderer", printMarginColumn: "renderer", printMargin: "renderer", fadeFoldWidgets: "renderer", showFoldWidgets: "renderer", showLineNumbers: "renderer", showGutter: "renderer", displayIndentGuides: "renderer", fontSize: "renderer", fontFamily: "renderer", maxLines: "renderer", minLines: "renderer", scrollPastEnd: "renderer", fixedWidthGutter: "renderer", theme: "renderer", scrollSpeed: "$mouseHandler", dragDelay: "$mouseHandler", dragEnabled: "$mouseHandler", focusTimout: "$mouseHandler", tooltipFollowsMouse: "$mouseHandler", firstLineNumber: "session", overwrite: "session", newLineMode: "session", useWorker: "session", useSoftTabs: "session", tabSize: "session", wrap: "session", indentedSoftWrap: "session", foldStyle: "session", mode: "session" }); exports.Editor = Editor; }); define("ace/undomanager",["require","exports","module"], function(require, exports, module) { "use strict"; var UndoManager = function() { this.reset(); }; (function() { this.execute = function(options) { var deltaSets = options.args[0]; this.$doc = options.args[1]; if (options.merge && this.hasUndo()){ this.dirtyCounter--; deltaSets = this.$undoStack.pop().concat(deltaSets); } this.$undoStack.push(deltaSets); this.$redoStack = []; if (this.dirtyCounter < 0) { this.dirtyCounter = NaN; } this.dirtyCounter++; }; this.undo = function(dontSelect) { var deltaSets = this.$undoStack.pop(); var undoSelectionRange = null; if (deltaSets) { undoSelectionRange = this.$doc.undoChanges(deltaSets, dontSelect); this.$redoStack.push(deltaSets); this.dirtyCounter--; } return undoSelectionRange; }; this.redo = function(dontSelect) { var deltaSets = this.$redoStack.pop(); var redoSelectionRange = null; if (deltaSets) { redoSelectionRange = this.$doc.redoChanges(this.$deserializeDeltas(deltaSets), dontSelect); this.$undoStack.push(deltaSets); this.dirtyCounter++; } return redoSelectionRange; }; this.reset = function() { this.$undoStack = []; this.$redoStack = []; this.dirtyCounter = 0; }; this.hasUndo = function() { return this.$undoStack.length > 0; }; this.hasRedo = function() { return this.$redoStack.length > 0; }; this.markClean = function() { this.dirtyCounter = 0; }; this.isClean = function() { return this.dirtyCounter === 0; }; this.$serializeDeltas = function(deltaSets) { return cloneDeltaSetsObj(deltaSets, $serializeDelta); }; this.$deserializeDeltas = function(deltaSets) { return cloneDeltaSetsObj(deltaSets, $deserializeDelta); }; function $serializeDelta(delta){ return { action: delta.action, start: delta.start, end: delta.end, lines: delta.lines.length == 1 ? null : delta.lines, text: delta.lines.length == 1 ? delta.lines[0] : null, }; } function $deserializeDelta(delta) { return { action: delta.action, start: delta.start, end: delta.end, lines: delta.lines || [delta.text] }; } function cloneDeltaSetsObj(deltaSets_old, fnGetModifiedDelta) { var deltaSets_new = new Array(deltaSets_old.length); for (var i = 0; i < deltaSets_old.length; i++) { var deltaSet_old = deltaSets_old[i]; var deltaSet_new = { group: deltaSet_old.group, deltas: new Array(deltaSet_old.length)}; for (var j = 0; j < deltaSet_old.deltas.length; j++) { var delta_old = deltaSet_old.deltas[j]; deltaSet_new.deltas[j] = fnGetModifiedDelta(delta_old); } deltaSets_new[i] = deltaSet_new; } return deltaSets_new; } }).call(UndoManager.prototype); exports.UndoManager = UndoManager; }); define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var dom = require("../lib/dom"); var oop = require("../lib/oop"); var lang = require("../lib/lang"); var EventEmitter = require("../lib/event_emitter").EventEmitter; var Gutter = function(parentEl) { this.element = dom.createElement("div"); this.element.className = "ace_layer ace_gutter-layer"; parentEl.appendChild(this.element); this.setShowFoldWidgets(this.$showFoldWidgets); this.gutterWidth = 0; this.$annotations = []; this.$updateAnnotations = this.$updateAnnotations.bind(this); this.$cells = []; }; (function() { oop.implement(this, EventEmitter); this.setSession = function(session) { if (this.session) this.session.removeEventListener("change", this.$updateAnnotations); this.session = session; if (session) session.on("change", this.$updateAnnotations); }; this.addGutterDecoration = function(row, className){ if (window.console) console.warn && console.warn("deprecated use session.addGutterDecoration"); this.session.addGutterDecoration(row, className); }; this.removeGutterDecoration = function(row, className){ if (window.console) console.warn && console.warn("deprecated use session.removeGutterDecoration"); this.session.removeGutterDecoration(row, className); }; this.setAnnotations = function(annotations) { this.$annotations = []; for (var i = 0; i < annotations.length; i++) { var annotation = annotations[i]; var row = annotation.row; var rowInfo = this.$annotations[row]; if (!rowInfo) rowInfo = this.$annotations[row] = {text: []}; var annoText = annotation.text; annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || ""; if (rowInfo.text.indexOf(annoText) === -1) rowInfo.text.push(annoText); var type = annotation.type; if (type == "error") rowInfo.className = " ace_error"; else if (type == "warning" && rowInfo.className != " ace_error") rowInfo.className = " ace_warning"; else if (type == "info" && (!rowInfo.className)) rowInfo.className = " ace_info"; } }; this.$updateAnnotations = function (delta) { if (!this.$annotations.length) return; var firstRow = delta.start.row; var len = delta.end.row - firstRow; if (len === 0) { } else if (delta.action == 'remove') { this.$annotations.splice(firstRow, len + 1, null); } else { var args = new Array(len + 1); args.unshift(firstRow, 1); this.$annotations.splice.apply(this.$annotations, args); } }; this.update = function(config) { var session = this.session; var firstRow = config.firstRow; var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar session.getLength() - 1); var fold = session.getNextFoldLine(firstRow); var foldStart = fold ? fold.start.row : Infinity; var foldWidgets = this.$showFoldWidgets && session.foldWidgets; var breakpoints = session.$breakpoints; var decorations = session.$decorations; var firstLineNumber = session.$firstLineNumber; var lastLineNumber = 0; var gutterRenderer = session.gutterRenderer || this.$renderer; var cell = null; var index = -1; var row = firstRow; while (true) { if (row > foldStart) { row = fold.end.row + 1; fold = session.getNextFoldLine(row, fold); foldStart = fold ? fold.start.row : Infinity; } if (row > lastRow) { while (this.$cells.length > index + 1) { cell = this.$cells.pop(); this.element.removeChild(cell.element); } break; } cell = this.$cells[++index]; if (!cell) { cell = {element: null, textNode: null, foldWidget: null}; cell.element = dom.createElement("div"); cell.textNode = document.createTextNode(''); cell.element.appendChild(cell.textNode); this.element.appendChild(cell.element); this.$cells[index] = cell; } var className = "ace_gutter-cell "; if (breakpoints[row]) className += breakpoints[row]; if (decorations[row]) className += decorations[row]; if (this.$annotations[row]) className += this.$annotations[row].className; if (cell.element.className != className) cell.element.className = className; var height = session.getRowLength(row) * config.lineHeight + "px"; if (height != cell.element.style.height) cell.element.style.height = height; if (foldWidgets) { var c = foldWidgets[row]; if (c == null) c = foldWidgets[row] = session.getFoldWidget(row); } if (c) { if (!cell.foldWidget) { cell.foldWidget = dom.createElement("span"); cell.element.appendChild(cell.foldWidget); } var className = "ace_fold-widget ace_" + c; if (c == "start" && row == foldStart && row < fold.end.row) className += " ace_closed"; else className += " ace_open"; if (cell.foldWidget.className != className) cell.foldWidget.className = className; var height = config.lineHeight + "px"; if (cell.foldWidget.style.height != height) cell.foldWidget.style.height = height; } else { if (cell.foldWidget) { cell.element.removeChild(cell.foldWidget); cell.foldWidget = null; } } var text = lastLineNumber = gutterRenderer ? gutterRenderer.getText(session, row) : row + firstLineNumber; if (text != cell.textNode.data) cell.textNode.data = text; row++; } this.element.style.height = config.minHeight + "px"; if (this.$fixedWidth || session.$useWrapMode) lastLineNumber = session.getLength() + firstLineNumber; var gutterWidth = gutterRenderer ? gutterRenderer.getWidth(session, lastLineNumber, config) : lastLineNumber.toString().length * config.characterWidth; var padding = this.$padding || this.$computePadding(); gutterWidth += padding.left + padding.right; if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) { this.gutterWidth = gutterWidth; this.element.style.width = Math.ceil(this.gutterWidth) + "px"; this._emit("changeGutterWidth", gutterWidth); } }; this.$fixedWidth = false; this.$showLineNumbers = true; this.$renderer = ""; this.setShowLineNumbers = function(show) { this.$renderer = !show && { getWidth: function() {return ""}, getText: function() {return ""} }; }; this.getShowLineNumbers = function() { return this.$showLineNumbers; }; this.$showFoldWidgets = true; this.setShowFoldWidgets = function(show) { if (show) dom.addCssClass(this.element, "ace_folding-enabled"); else dom.removeCssClass(this.element, "ace_folding-enabled"); this.$showFoldWidgets = show; this.$padding = null; }; this.getShowFoldWidgets = function() { return this.$showFoldWidgets; }; this.$computePadding = function() { if (!this.element.firstChild) return {left: 0, right: 0}; var style = dom.computedStyle(this.element.firstChild); this.$padding = {}; this.$padding.left = parseInt(style.paddingLeft) + 1 || 0; this.$padding.right = parseInt(style.paddingRight) || 0; return this.$padding; }; this.getRegion = function(point) { var padding = this.$padding || this.$computePadding(); var rect = this.element.getBoundingClientRect(); if (point.x < padding.left + rect.left) return "markers"; if (this.$showFoldWidgets && point.x > rect.right - padding.right) return "foldWidgets"; }; }).call(Gutter.prototype); exports.Gutter = Gutter; }); define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var dom = require("../lib/dom"); var Marker = function(parentEl) { this.element = dom.createElement("div"); this.element.className = "ace_layer ace_marker-layer"; parentEl.appendChild(this.element); }; (function() { this.$padding = 0; this.setPadding = function(padding) { this.$padding = padding; }; this.setSession = function(session) { this.session = session; }; this.setMarkers = function(markers) { this.markers = markers; }; this.update = function(config) { var config = config || this.config; if (!config) return; this.config = config; var html = []; for (var key in this.markers) { var marker = this.markers[key]; if (!marker.range) { marker.update(html, this, this.session, config); continue; } var range = marker.range.clipRows(config.firstRow, config.lastRow); if (range.isEmpty()) continue; range = range.toScreenRange(this.session); if (marker.renderer) { var top = this.$getTop(range.start.row, config); var left = this.$padding + range.start.column * config.characterWidth; marker.renderer(html, range, left, top, config); } else if (marker.type == "fullLine") { this.drawFullLineMarker(html, range, marker.clazz, config); } else if (marker.type == "screenLine") { this.drawScreenLineMarker(html, range, marker.clazz, config); } else if (range.isMultiLine()) { if (marker.type == "text") this.drawTextMarker(html, range, marker.clazz, config); else this.drawMultiLineMarker(html, range, marker.clazz, config); } else { this.drawSingleLineMarker(html, range, marker.clazz + " ace_start" + " ace_br15", config); } } this.element.innerHTML = html.join(""); }; this.$getTop = function(row, layerConfig) { return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight; }; function getBorderClass(tl, tr, br, bl) { return (tl ? 1 : 0) | (tr ? 2 : 0) | (br ? 4 : 0) | (bl ? 8 : 0); } this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig, extraStyle) { var session = this.session; var start = range.start.row; var end = range.end.row; var row = start; var prev = 0; var curr = 0; var next = session.getScreenLastRowColumn(row); var lineRange = new Range(row, range.start.column, row, curr); for (; row <= end; row++) { lineRange.start.row = lineRange.end.row = row; lineRange.start.column = row == start ? range.start.column : session.getRowWrapIndent(row); lineRange.end.column = next; prev = curr; curr = next; next = row + 1 < end ? session.getScreenLastRowColumn(row + 1) : row == end ? 0 : range.end.column; this.drawSingleLineMarker(stringBuilder, lineRange, clazz + (row == start ? " ace_start" : "") + " ace_br" + getBorderClass(row == start || row == start + 1 && range.start.column, prev < curr, curr > next, row == end), layerConfig, row == end ? 0 : 1, extraStyle); } }; this.drawMultiLineMarker = function(stringBuilder, range, clazz, config, extraStyle) { var padding = this.$padding; var height = config.lineHeight; var top = this.$getTop(range.start.row, config); var left = padding + range.start.column * config.characterWidth; extraStyle = extraStyle || ""; stringBuilder.push( "

" ); top = this.$getTop(range.end.row, config); var width = range.end.column * config.characterWidth; stringBuilder.push( "
" ); height = (range.end.row - range.start.row - 1) * config.lineHeight; if (height <= 0) return; top = this.$getTop(range.start.row + 1, config); var radiusClass = (range.start.column ? 1 : 0) | (range.end.column ? 0 : 8); stringBuilder.push( "
" ); }; this.drawSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength, extraStyle) { var height = config.lineHeight; var width = (range.end.column + (extraLength || 0) - range.start.column) * config.characterWidth; var top = this.$getTop(range.start.row, config); var left = this.$padding + range.start.column * config.characterWidth; stringBuilder.push( "
" ); }; this.drawFullLineMarker = function(stringBuilder, range, clazz, config, extraStyle) { var top = this.$getTop(range.start.row, config); var height = config.lineHeight; if (range.start.row != range.end.row) height += this.$getTop(range.end.row, config) - top; stringBuilder.push( "
" ); }; this.drawScreenLineMarker = function(stringBuilder, range, clazz, config, extraStyle) { var top = this.$getTop(range.start.row, config); var height = config.lineHeight; stringBuilder.push( "
" ); }; }).call(Marker.prototype); exports.Marker = Marker; }); define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var dom = require("../lib/dom"); var lang = require("../lib/lang"); var useragent = require("../lib/useragent"); var EventEmitter = require("../lib/event_emitter").EventEmitter; var Text = function(parentEl) { this.element = dom.createElement("div"); this.element.className = "ace_layer ace_text-layer"; parentEl.appendChild(this.element); this.$updateEolChar = this.$updateEolChar.bind(this); }; (function() { oop.implement(this, EventEmitter); this.EOF_CHAR = "\xB6"; this.EOL_CHAR_LF = "\xAC"; this.EOL_CHAR_CRLF = "\xa4"; this.EOL_CHAR = this.EOL_CHAR_LF; this.TAB_CHAR = "\u2014"; //"\u21E5"; this.SPACE_CHAR = "\xB7"; this.$padding = 0; this.$updateEolChar = function() { var EOL_CHAR = this.session.doc.getNewLineCharacter() == "\n" ? this.EOL_CHAR_LF : this.EOL_CHAR_CRLF; if (this.EOL_CHAR != EOL_CHAR) { this.EOL_CHAR = EOL_CHAR; return true; } } this.setPadding = function(padding) { this.$padding = padding; this.element.style.padding = "0 " + padding + "px"; }; this.getLineHeight = function() { return this.$fontMetrics.$characterSize.height || 0; }; this.getCharacterWidth = function() { return this.$fontMetrics.$characterSize.width || 0; }; this.$setFontMetrics = function(measure) { this.$fontMetrics = measure; this.$fontMetrics.on("changeCharacterSize", function(e) { this._signal("changeCharacterSize", e); }.bind(this)); this.$pollSizeChanges(); } this.checkForSizeChanges = function() { this.$fontMetrics.checkForSizeChanges(); }; this.$pollSizeChanges = function() { return this.$pollSizeChangesTimer = this.$fontMetrics.$pollSizeChanges(); }; this.setSession = function(session) { this.session = session; if (session) this.$computeTabString(); }; this.showInvisibles = false; this.setShowInvisibles = function(showInvisibles) { if (this.showInvisibles == showInvisibles) return false; this.showInvisibles = showInvisibles; this.$computeTabString(); return true; }; this.displayIndentGuides = true; this.setDisplayIndentGuides = function(display) { if (this.displayIndentGuides == display) return false; this.displayIndentGuides = display; this.$computeTabString(); return true; }; this.$tabStrings = []; this.onChangeTabSize = this.$computeTabString = function() { var tabSize = this.session.getTabSize(); this.tabSize = tabSize; var tabStr = this.$tabStrings = [0]; for (var i = 1; i < tabSize + 1; i++) { if (this.showInvisibles) { tabStr.push("" + lang.stringRepeat(this.TAB_CHAR, i) + ""); } else { tabStr.push(lang.stringRepeat(" ", i)); } } if (this.displayIndentGuides) { this.$indentGuideRe = /\s\S| \t|\t |\s$/; var className = "ace_indent-guide"; var spaceClass = ""; var tabClass = ""; if (this.showInvisibles) { className += " ace_invisible"; spaceClass = " ace_invisible_space"; tabClass = " ace_invisible_tab"; var spaceContent = lang.stringRepeat(this.SPACE_CHAR, this.tabSize); var tabContent = lang.stringRepeat(this.TAB_CHAR, this.tabSize); } else{ var spaceContent = lang.stringRepeat(" ", this.tabSize); var tabContent = spaceContent; } this.$tabStrings[" "] = "" + spaceContent + ""; this.$tabStrings["\t"] = "" + tabContent + ""; } }; this.updateLines = function(config, firstRow, lastRow) { if (this.config.lastRow != config.lastRow || this.config.firstRow != config.firstRow) { this.scrollLines(config); } this.config = config; var first = Math.max(firstRow, config.firstRow); var last = Math.min(lastRow, config.lastRow); var lineElements = this.element.childNodes; var lineElementsIdx = 0; for (var row = config.firstRow; row < first; row++) { var foldLine = this.session.getFoldLine(row); if (foldLine) { if (foldLine.containsRow(first)) { first = foldLine.start.row; break; } else { row = foldLine.end.row; } } lineElementsIdx ++; } var row = first; var foldLine = this.session.getNextFoldLine(row); var foldStart = foldLine ? foldLine.start.row : Infinity; while (true) { if (row > foldStart) { row = foldLine.end.row+1; foldLine = this.session.getNextFoldLine(row, foldLine); foldStart = foldLine ? foldLine.start.row :Infinity; } if (row > last) break; var lineElement = lineElements[lineElementsIdx++]; if (lineElement) { var html = []; this.$renderLine( html, row, !this.$useLineGroups(), row == foldStart ? foldLine : false ); lineElement.style.height = config.lineHeight * this.session.getRowLength(row) + "px"; lineElement.innerHTML = html.join(""); } row++; } }; this.scrollLines = function(config) { var oldConfig = this.config; this.config = config; if (!oldConfig || oldConfig.lastRow < config.firstRow) return this.update(config); if (config.lastRow < oldConfig.firstRow) return this.update(config); var el = this.element; if (oldConfig.firstRow < config.firstRow) for (var row=this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row>0; row--) el.removeChild(el.firstChild); if (oldConfig.lastRow > config.lastRow) for (var row=this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row>0; row--) el.removeChild(el.lastChild); if (config.firstRow < oldConfig.firstRow) { var fragment = this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1); if (el.firstChild) el.insertBefore(fragment, el.firstChild); else el.appendChild(fragment); } if (config.lastRow > oldConfig.lastRow) { var fragment = this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow); el.appendChild(fragment); } }; this.$renderLinesFragment = function(config, firstRow, lastRow) { var fragment = this.element.ownerDocument.createDocumentFragment(); var row = firstRow; var foldLine = this.session.getNextFoldLine(row); var foldStart = foldLine ? foldLine.start.row : Infinity; while (true) { if (row > foldStart) { row = foldLine.end.row+1; foldLine = this.session.getNextFoldLine(row, foldLine); foldStart = foldLine ? foldLine.start.row : Infinity; } if (row > lastRow) break; var container = dom.createElement("div"); var html = []; this.$renderLine(html, row, false, row == foldStart ? foldLine : false); container.innerHTML = html.join(""); if (this.$useLineGroups()) { container.className = 'ace_line_group'; fragment.appendChild(container); container.style.height = config.lineHeight * this.session.getRowLength(row) + "px"; } else { while(container.firstChild) fragment.appendChild(container.firstChild); } row++; } return fragment; }; this.update = function(config) { this.config = config; var html = []; var firstRow = config.firstRow, lastRow = config.lastRow; var row = firstRow; var foldLine = this.session.getNextFoldLine(row); var foldStart = foldLine ? foldLine.start.row : Infinity; while (true) { if (row > foldStart) { row = foldLine.end.row+1; foldLine = this.session.getNextFoldLine(row, foldLine); foldStart = foldLine ? foldLine.start.row :Infinity; } if (row > lastRow) break; if (this.$useLineGroups()) html.push("
") this.$renderLine(html, row, false, row == foldStart ? foldLine : false); if (this.$useLineGroups()) html.push("
"); // end the line group row++; } this.element.innerHTML = html.join(""); }; this.$textToken = { "text": true, "rparen": true, "lparen": true }; this.$renderToken = function(stringBuilder, screenColumn, token, value) { var self = this; var replaceReg = /\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g; var replaceFunc = function(c, a, b, tabIdx, idx4) { if (a) { return self.showInvisibles ? "" + lang.stringRepeat(self.SPACE_CHAR, c.length) + "" : c; } else if (c == "&") { return "&"; } else if (c == "<") { return "<"; } else if (c == ">") { return ">"; } else if (c == "\t") { var tabSize = self.session.getScreenTabSize(screenColumn + tabIdx); screenColumn += tabSize - 1; return self.$tabStrings[tabSize]; } else if (c == "\u3000") { var classToUse = self.showInvisibles ? "ace_cjk ace_invisible ace_invisible_space" : "ace_cjk"; var space = self.showInvisibles ? self.SPACE_CHAR : ""; screenColumn += 1; return "" + space + ""; } else if (b) { return "" + self.SPACE_CHAR + ""; } else { screenColumn += 1; return "" + c + ""; } }; var output = value.replace(replaceReg, replaceFunc); if (!this.$textToken[token.type]) { var classes = "ace_" + token.type.replace(/\./g, " ace_"); var style = ""; if (token.type == "fold") style = " style='width:" + (token.value.length * this.config.characterWidth) + "px;' "; stringBuilder.push("", output, ""); } else { stringBuilder.push(output); } return screenColumn + value.length; }; this.renderIndentGuide = function(stringBuilder, value, max) { var cols = value.search(this.$indentGuideRe); if (cols <= 0 || cols >= max) return value; if (value[0] == " ") { cols -= cols % this.tabSize; stringBuilder.push(lang.stringRepeat(this.$tabStrings[" "], cols/this.tabSize)); return value.substr(cols); } else if (value[0] == "\t") { stringBuilder.push(lang.stringRepeat(this.$tabStrings["\t"], cols)); return value.substr(cols); } return value; }; this.$renderWrappedLine = function(stringBuilder, tokens, splits, onlyContents) { var chars = 0; var split = 0; var splitChars = splits[0]; var screenColumn = 0; for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; var value = token.value; if (i == 0 && this.displayIndentGuides) { chars = value.length; value = this.renderIndentGuide(stringBuilder, value, splitChars); if (!value) continue; chars -= value.length; } if (chars + value.length < splitChars) { screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value); chars += value.length; } else { while (chars + value.length >= splitChars) { screenColumn = this.$renderToken( stringBuilder, screenColumn, token, value.substring(0, splitChars - chars) ); value = value.substring(splitChars - chars); chars = splitChars; if (!onlyContents) { stringBuilder.push("", "
" ); } stringBuilder.push(lang.stringRepeat("\xa0", splits.indent)); split ++; screenColumn = 0; splitChars = splits[split] || Number.MAX_VALUE; } if (value.length != 0) { chars += value.length; screenColumn = this.$renderToken( stringBuilder, screenColumn, token, value ); } } } }; this.$renderSimpleLine = function(stringBuilder, tokens) { var screenColumn = 0; var token = tokens[0]; var value = token.value; if (this.displayIndentGuides) value = this.renderIndentGuide(stringBuilder, value); if (value) screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value); for (var i = 1; i < tokens.length; i++) { token = tokens[i]; value = token.value; screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value); } }; this.$renderLine = function(stringBuilder, row, onlyContents, foldLine) { if (!foldLine && foldLine != false) foldLine = this.session.getFoldLine(row); if (foldLine) var tokens = this.$getFoldLineTokens(row, foldLine); else var tokens = this.session.getTokens(row); if (!onlyContents) { stringBuilder.push( "
" ); } if (tokens.length) { var splits = this.session.getRowSplitData(row); if (splits && splits.length) this.$renderWrappedLine(stringBuilder, tokens, splits, onlyContents); else this.$renderSimpleLine(stringBuilder, tokens); } if (this.showInvisibles) { if (foldLine) row = foldLine.end.row stringBuilder.push( "", row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR, "" ); } if (!onlyContents) stringBuilder.push("
"); }; this.$getFoldLineTokens = function(row, foldLine) { var session = this.session; var renderTokens = []; function addTokens(tokens, from, to) { var idx = 0, col = 0; while ((col + tokens[idx].value.length) < from) { col += tokens[idx].value.length; idx++; if (idx == tokens.length) return; } if (col != from) { var value = tokens[idx].value.substring(from - col); if (value.length > (to - from)) value = value.substring(0, to - from); renderTokens.push({ type: tokens[idx].type, value: value }); col = from + value.length; idx += 1; } while (col < to && idx < tokens.length) { var value = tokens[idx].value; if (value.length + col > to) { renderTokens.push({ type: tokens[idx].type, value: value.substring(0, to - col) }); } else renderTokens.push(tokens[idx]); col += value.length; idx += 1; } } var tokens = session.getTokens(row); foldLine.walk(function(placeholder, row, column, lastColumn, isNewRow) { if (placeholder != null) { renderTokens.push({ type: "fold", value: placeholder }); } else { if (isNewRow) tokens = session.getTokens(row); if (tokens.length) addTokens(tokens, lastColumn, column); } }, foldLine.end.row, this.session.getLine(foldLine.end.row).length); return renderTokens; }; this.$useLineGroups = function() { return this.session.getUseWrapMode(); }; this.destroy = function() { clearInterval(this.$pollSizeChangesTimer); if (this.$measureNode) this.$measureNode.parentNode.removeChild(this.$measureNode); delete this.$measureNode; }; }).call(Text.prototype); exports.Text = Text; }); define("ace/layer/cursor",["require","exports","module","ace/lib/dom"], function(require, exports, module) { "use strict"; var dom = require("../lib/dom"); var isIE8; var Cursor = function(parentEl) { this.element = dom.createElement("div"); this.element.className = "ace_layer ace_cursor-layer"; parentEl.appendChild(this.element); if (isIE8 === undefined) isIE8 = !("opacity" in this.element.style); this.isVisible = false; this.isBlinking = true; this.blinkInterval = 1000; this.smoothBlinking = false; this.cursors = []; this.cursor = this.addCursor(); dom.addCssClass(this.element, "ace_hidden-cursors"); this.$updateCursors = (isIE8 ? this.$updateVisibility : this.$updateOpacity).bind(this); }; (function() { this.$updateVisibility = function(val) { var cursors = this.cursors; for (var i = cursors.length; i--; ) cursors[i].style.visibility = val ? "" : "hidden"; }; this.$updateOpacity = function(val) { var cursors = this.cursors; for (var i = cursors.length; i--; ) cursors[i].style.opacity = val ? "" : "0"; }; this.$padding = 0; this.setPadding = function(padding) { this.$padding = padding; }; this.setSession = function(session) { this.session = session; }; this.setBlinking = function(blinking) { if (blinking != this.isBlinking){ this.isBlinking = blinking; this.restartTimer(); } }; this.setBlinkInterval = function(blinkInterval) { if (blinkInterval != this.blinkInterval){ this.blinkInterval = blinkInterval; this.restartTimer(); } }; this.setSmoothBlinking = function(smoothBlinking) { if (smoothBlinking != this.smoothBlinking && !isIE8) { this.smoothBlinking = smoothBlinking; dom.setCssClass(this.element, "ace_smooth-blinking", smoothBlinking); this.$updateCursors(true); this.$updateCursors = (this.$updateOpacity).bind(this); this.restartTimer(); } }; this.addCursor = function() { var el = dom.createElement("div"); el.className = "ace_cursor"; this.element.appendChild(el); this.cursors.push(el); return el; }; this.removeCursor = function() { if (this.cursors.length > 1) { var el = this.cursors.pop(); el.parentNode.removeChild(el); return el; } }; this.hideCursor = function() { this.isVisible = false; dom.addCssClass(this.element, "ace_hidden-cursors"); this.restartTimer(); }; this.showCursor = function() { this.isVisible = true; dom.removeCssClass(this.element, "ace_hidden-cursors"); this.restartTimer(); }; this.restartTimer = function() { var update = this.$updateCursors; clearInterval(this.intervalId); clearTimeout(this.timeoutId); if (this.smoothBlinking) { dom.removeCssClass(this.element, "ace_smooth-blinking"); } update(true); if (!this.isBlinking || !this.blinkInterval || !this.isVisible) return; if (this.smoothBlinking) { setTimeout(function(){ dom.addCssClass(this.element, "ace_smooth-blinking"); }.bind(this)); } var blink = function(){ this.timeoutId = setTimeout(function() { update(false); }, 0.6 * this.blinkInterval); }.bind(this); this.intervalId = setInterval(function() { update(true); blink(); }, this.blinkInterval); blink(); }; this.getPixelPosition = function(position, onScreen) { if (!this.config || !this.session) return {left : 0, top : 0}; if (!position) position = this.session.selection.getCursor(); var pos = this.session.documentToScreenPosition(position); var cursorLeft = this.$padding + pos.column * this.config.characterWidth; var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) * this.config.lineHeight; return {left : cursorLeft, top : cursorTop}; }; this.update = function(config) { this.config = config; var selections = this.session.$selectionMarkers; var i = 0, cursorIndex = 0; if (selections === undefined || selections.length === 0){ selections = [{cursor: null}]; } for (var i = 0, n = selections.length; i < n; i++) { var pixelPos = this.getPixelPosition(selections[i].cursor, true); if ((pixelPos.top > config.height + config.offset || pixelPos.top < 0) && i > 1) { continue; } var style = (this.cursors[cursorIndex++] || this.addCursor()).style; if (!this.drawCursor) { style.left = pixelPos.left + "px"; style.top = pixelPos.top + "px"; style.width = config.characterWidth + "px"; style.height = config.lineHeight + "px"; } else { this.drawCursor(style, pixelPos, config, selections[i], this.session); } } while (this.cursors.length > cursorIndex) this.removeCursor(); var overwrite = this.session.getOverwrite(); this.$setOverwrite(overwrite); this.$pixelPos = pixelPos; this.restartTimer(); }; this.drawCursor = null; this.$setOverwrite = function(overwrite) { if (overwrite != this.overwrite) { this.overwrite = overwrite; if (overwrite) dom.addCssClass(this.element, "ace_overwrite-cursors"); else dom.removeCssClass(this.element, "ace_overwrite-cursors"); } }; this.destroy = function() { clearInterval(this.intervalId); clearTimeout(this.timeoutId); }; }).call(Cursor.prototype); exports.Cursor = Cursor; }); define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var dom = require("./lib/dom"); var event = require("./lib/event"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var ScrollBar = function(parent) { this.element = dom.createElement("div"); this.element.className = "ace_scrollbar ace_scrollbar" + this.classSuffix; this.inner = dom.createElement("div"); this.inner.className = "ace_scrollbar-inner"; this.element.appendChild(this.inner); parent.appendChild(this.element); this.setVisible(false); this.skipEvent = false; event.addListener(this.element, "scroll", this.onScroll.bind(this)); event.addListener(this.element, "mousedown", event.preventDefault); }; (function() { oop.implement(this, EventEmitter); this.setVisible = function(isVisible) { this.element.style.display = isVisible ? "" : "none"; this.isVisible = isVisible; }; }).call(ScrollBar.prototype); var VScrollBar = function(parent, renderer) { ScrollBar.call(this, parent); this.scrollTop = 0; renderer.$scrollbarWidth = this.width = dom.scrollbarWidth(parent.ownerDocument); this.inner.style.width = this.element.style.width = (this.width || 15) + 5 + "px"; }; oop.inherits(VScrollBar, ScrollBar); (function() { this.classSuffix = '-v'; this.onScroll = function() { if (!this.skipEvent) { this.scrollTop = this.element.scrollTop; this._emit("scroll", {data: this.scrollTop}); } this.skipEvent = false; }; this.getWidth = function() { return this.isVisible ? this.width : 0; }; this.setHeight = function(height) { this.element.style.height = height + "px"; }; this.setInnerHeight = function(height) { this.inner.style.height = height + "px"; }; this.setScrollHeight = function(height) { this.inner.style.height = height + "px"; }; this.setScrollTop = function(scrollTop) { if (this.scrollTop != scrollTop) { this.skipEvent = true; this.scrollTop = this.element.scrollTop = scrollTop; } }; }).call(VScrollBar.prototype); var HScrollBar = function(parent, renderer) { ScrollBar.call(this, parent); this.scrollLeft = 0; this.height = renderer.$scrollbarWidth; this.inner.style.height = this.element.style.height = (this.height || 15) + 5 + "px"; }; oop.inherits(HScrollBar, ScrollBar); (function() { this.classSuffix = '-h'; this.onScroll = function() { if (!this.skipEvent) { this.scrollLeft = this.element.scrollLeft; this._emit("scroll", {data: this.scrollLeft}); } this.skipEvent = false; }; this.getHeight = function() { return this.isVisible ? this.height : 0; }; this.setWidth = function(width) { this.element.style.width = width + "px"; }; this.setInnerWidth = function(width) { this.inner.style.width = width + "px"; }; this.setScrollWidth = function(width) { this.inner.style.width = width + "px"; }; this.setScrollLeft = function(scrollLeft) { if (this.scrollLeft != scrollLeft) { this.skipEvent = true; this.scrollLeft = this.element.scrollLeft = scrollLeft; } }; }).call(HScrollBar.prototype); exports.ScrollBar = VScrollBar; // backward compatibility exports.ScrollBarV = VScrollBar; // backward compatibility exports.ScrollBarH = HScrollBar; // backward compatibility exports.VScrollBar = VScrollBar; exports.HScrollBar = HScrollBar; }); define("ace/renderloop",["require","exports","module","ace/lib/event"], function(require, exports, module) { "use strict"; var event = require("./lib/event"); var RenderLoop = function(onRender, win) { this.onRender = onRender; this.pending = false; this.changes = 0; this.window = win || window; }; (function() { this.schedule = function(change) { this.changes = this.changes | change; if (!this.pending && this.changes) { this.pending = true; var _self = this; event.nextFrame(function() { _self.pending = false; var changes; while (changes = _self.changes) { _self.changes = 0; _self.onRender(changes); } }, this.window); } }; }).call(RenderLoop.prototype); exports.RenderLoop = RenderLoop; }); define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"], function(require, exports, module) { var oop = require("../lib/oop"); var dom = require("../lib/dom"); var lang = require("../lib/lang"); var useragent = require("../lib/useragent"); var EventEmitter = require("../lib/event_emitter").EventEmitter; var CHAR_COUNT = 0; var FontMetrics = exports.FontMetrics = function(parentEl, interval) { this.el = dom.createElement("div"); this.$setMeasureNodeStyles(this.el.style, true); this.$main = dom.createElement("div"); this.$setMeasureNodeStyles(this.$main.style); this.$measureNode = dom.createElement("div"); this.$setMeasureNodeStyles(this.$measureNode.style); this.el.appendChild(this.$main); this.el.appendChild(this.$measureNode); parentEl.appendChild(this.el); if (!CHAR_COUNT) this.$testFractionalRect(); this.$measureNode.innerHTML = lang.stringRepeat("X", CHAR_COUNT); this.$characterSize = {width: 0, height: 0}; this.checkForSizeChanges(); }; (function() { oop.implement(this, EventEmitter); this.$characterSize = {width: 0, height: 0}; this.$testFractionalRect = function() { var el = dom.createElement("div"); this.$setMeasureNodeStyles(el.style); el.style.width = "0.2px"; document.documentElement.appendChild(el); var w = el.getBoundingClientRect().width; if (w > 0 && w < 1) CHAR_COUNT = 50; else CHAR_COUNT = 100; el.parentNode.removeChild(el); }; this.$setMeasureNodeStyles = function(style, isRoot) { style.width = style.height = "auto"; style.left = style.top = "0px"; style.visibility = "hidden"; style.position = "absolute"; style.whiteSpace = "pre"; if (useragent.isIE < 8) { style["font-family"] = "inherit"; } else { style.font = "inherit"; } style.overflow = isRoot ? "hidden" : "visible"; }; this.checkForSizeChanges = function() { var size = this.$measureSizes(); if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) { this.$measureNode.style.fontWeight = "bold"; var boldSize = this.$measureSizes(); this.$measureNode.style.fontWeight = ""; this.$characterSize = size; this.charSizes = Object.create(null); this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height; this._emit("changeCharacterSize", {data: size}); } }; this.$pollSizeChanges = function() { if (this.$pollSizeChangesTimer) return this.$pollSizeChangesTimer; var self = this; return this.$pollSizeChangesTimer = setInterval(function() { self.checkForSizeChanges(); }, 500); }; this.setPolling = function(val) { if (val) { this.$pollSizeChanges(); } else if (this.$pollSizeChangesTimer) { clearInterval(this.$pollSizeChangesTimer); this.$pollSizeChangesTimer = 0; } }; this.$measureSizes = function() { if (CHAR_COUNT === 50) { var rect = null; try { rect = this.$measureNode.getBoundingClientRect(); } catch(e) { rect = {width: 0, height:0 }; }; var size = { height: rect.height, width: rect.width / CHAR_COUNT }; } else { var size = { height: this.$measureNode.clientHeight, width: this.$measureNode.clientWidth / CHAR_COUNT }; } if (size.width === 0 || size.height === 0) return null; return size; }; this.$measureCharWidth = function(ch) { this.$main.innerHTML = lang.stringRepeat(ch, CHAR_COUNT); var rect = this.$main.getBoundingClientRect(); return rect.width / CHAR_COUNT; }; this.getCharacterWidth = function(ch) { var w = this.charSizes[ch]; if (w === undefined) { w = this.charSizes[ch] = this.$measureCharWidth(ch) / this.$characterSize.width; } return w; }; this.destroy = function() { clearInterval(this.$pollSizeChangesTimer); if (this.el && this.el.parentNode) this.el.parentNode.removeChild(this.el); }; }).call(FontMetrics.prototype); }); define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var dom = require("./lib/dom"); var config = require("./config"); var useragent = require("./lib/useragent"); var GutterLayer = require("./layer/gutter").Gutter; var MarkerLayer = require("./layer/marker").Marker; var TextLayer = require("./layer/text").Text; var CursorLayer = require("./layer/cursor").Cursor; var HScrollBar = require("./scrollbar").HScrollBar; var VScrollBar = require("./scrollbar").VScrollBar; var RenderLoop = require("./renderloop").RenderLoop; var FontMetrics = require("./layer/font_metrics").FontMetrics; var EventEmitter = require("./lib/event_emitter").EventEmitter; var editorCss = ".ace_editor {\ position: relative;\ overflow: hidden;\ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;\ direction: ltr;\ }\ .ace_scroller {\ position: absolute;\ overflow: hidden;\ top: 0;\ bottom: 0;\ background-color: inherit;\ -ms-user-select: none;\ -moz-user-select: none;\ -webkit-user-select: none;\ user-select: none;\ cursor: text;\ }\ .ace_content {\ position: absolute;\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ min-width: 100%;\ }\ .ace_dragging .ace_scroller:before{\ position: absolute;\ top: 0;\ left: 0;\ right: 0;\ bottom: 0;\ content: '';\ background: rgba(250, 250, 250, 0.01);\ z-index: 1000;\ }\ .ace_dragging.ace_dark .ace_scroller:before{\ background: rgba(0, 0, 0, 0.01);\ }\ .ace_selecting, .ace_selecting * {\ cursor: text !important;\ }\ .ace_gutter {\ position: absolute;\ overflow : hidden;\ width: auto;\ top: 0;\ bottom: 0;\ left: 0;\ cursor: default;\ z-index: 4;\ -ms-user-select: none;\ -moz-user-select: none;\ -webkit-user-select: none;\ user-select: none;\ }\ .ace_gutter-active-line {\ position: absolute;\ left: 0;\ right: 0;\ }\ .ace_scroller.ace_scroll-left {\ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\ }\ .ace_gutter-cell {\ padding-left: 19px;\ padding-right: 6px;\ background-repeat: no-repeat;\ }\ .ace_gutter-cell.ace_error {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==\");\ background-repeat: no-repeat;\ background-position: 2px center;\ }\ .ace_gutter-cell.ace_warning {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==\");\ background-position: 2px center;\ }\ .ace_gutter-cell.ace_info {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=\");\ background-position: 2px center;\ }\ .ace_dark .ace_gutter-cell.ace_info {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC\");\ }\ .ace_scrollbar {\ position: absolute;\ right: 0;\ bottom: 0;\ z-index: 6;\ }\ .ace_scrollbar-inner {\ position: absolute;\ cursor: text;\ left: 0;\ top: 0;\ }\ .ace_scrollbar-v{\ overflow-x: hidden;\ overflow-y: scroll;\ top: 0;\ }\ .ace_scrollbar-h {\ overflow-x: scroll;\ overflow-y: hidden;\ left: 0;\ }\ .ace_print-margin {\ position: absolute;\ height: 100%;\ }\ .ace_text-input {\ position: absolute;\ z-index: 0;\ width: 0.5em;\ height: 1em;\ opacity: 0;\ background: transparent;\ -moz-appearance: none;\ appearance: none;\ border: none;\ resize: none;\ outline: none;\ overflow: hidden;\ font: inherit;\ padding: 0 1px;\ margin: 0 -1px;\ text-indent: -1em;\ -ms-user-select: text;\ -moz-user-select: text;\ -webkit-user-select: text;\ user-select: text;\ white-space: pre!important;\ }\ .ace_text-input.ace_composition {\ background: inherit;\ color: inherit;\ z-index: 1000;\ opacity: 1;\ text-indent: 0;\ }\ .ace_layer {\ z-index: 1;\ position: absolute;\ overflow: hidden;\ word-wrap: normal;\ white-space: pre;\ height: 100%;\ width: 100%;\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ pointer-events: none;\ }\ .ace_gutter-layer {\ position: relative;\ width: auto;\ text-align: right;\ pointer-events: auto;\ }\ .ace_text-layer {\ font: inherit !important;\ }\ .ace_cjk {\ display: inline-block;\ text-align: center;\ }\ .ace_cursor-layer {\ z-index: 4;\ }\ .ace_cursor {\ z-index: 4;\ position: absolute;\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ border-left: 2px solid;\ transform: translatez(0);\ }\ .ace_slim-cursors .ace_cursor {\ border-left-width: 1px;\ }\ .ace_overwrite-cursors .ace_cursor {\ border-left-width: 0;\ border-bottom: 1px solid;\ }\ .ace_hidden-cursors .ace_cursor {\ opacity: 0.2;\ }\ .ace_smooth-blinking .ace_cursor {\ -webkit-transition: opacity 0.18s;\ transition: opacity 0.18s;\ }\ .ace_editor.ace_multiselect .ace_cursor {\ border-left-width: 1px;\ }\ .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\ position: absolute;\ z-index: 3;\ }\ .ace_marker-layer .ace_selection {\ position: absolute;\ z-index: 5;\ }\ .ace_marker-layer .ace_bracket {\ position: absolute;\ z-index: 6;\ }\ .ace_marker-layer .ace_active-line {\ position: absolute;\ z-index: 2;\ }\ .ace_marker-layer .ace_selected-word {\ position: absolute;\ z-index: 4;\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ }\ .ace_line .ace_fold {\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ display: inline-block;\ height: 11px;\ margin-top: -2px;\ vertical-align: middle;\ background-image:\ url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\"),\ url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=\");\ background-repeat: no-repeat, repeat-x;\ background-position: center center, top left;\ color: transparent;\ border: 1px solid black;\ border-radius: 2px;\ cursor: pointer;\ pointer-events: auto;\ }\ .ace_dark .ace_fold {\ }\ .ace_fold:hover{\ background-image:\ url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\"),\ url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC\");\ }\ .ace_tooltip {\ background-color: #FFF;\ background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));\ background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\ border: 1px solid gray;\ border-radius: 1px;\ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\ color: black;\ max-width: 100%;\ padding: 3px 4px;\ position: fixed;\ z-index: 999999;\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ cursor: default;\ white-space: pre;\ word-wrap: break-word;\ line-height: normal;\ font-style: normal;\ font-weight: normal;\ letter-spacing: normal;\ pointer-events: none;\ }\ .ace_folding-enabled > .ace_gutter-cell {\ padding-right: 13px;\ }\ .ace_fold-widget {\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ margin: 0 -12px 0 1px;\ display: none;\ width: 11px;\ vertical-align: top;\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==\");\ background-repeat: no-repeat;\ background-position: center;\ border-radius: 3px;\ border: 1px solid transparent;\ cursor: pointer;\ }\ .ace_folding-enabled .ace_fold-widget {\ display: inline-block; \ }\ .ace_fold-widget.ace_end {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==\");\ }\ .ace_fold-widget.ace_closed {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==\");\ }\ .ace_fold-widget:hover {\ border: 1px solid rgba(0, 0, 0, 0.3);\ background-color: rgba(255, 255, 255, 0.2);\ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\ }\ .ace_fold-widget:active {\ border: 1px solid rgba(0, 0, 0, 0.4);\ background-color: rgba(0, 0, 0, 0.05);\ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\ }\ .ace_dark .ace_fold-widget {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\");\ }\ .ace_dark .ace_fold-widget.ace_end {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\");\ }\ .ace_dark .ace_fold-widget.ace_closed {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\");\ }\ .ace_dark .ace_fold-widget:hover {\ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\ background-color: rgba(255, 255, 255, 0.1);\ }\ .ace_dark .ace_fold-widget:active {\ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\ }\ .ace_fold-widget.ace_invalid {\ background-color: #FFB4B4;\ border-color: #DE5555;\ }\ .ace_fade-fold-widgets .ace_fold-widget {\ -webkit-transition: opacity 0.4s ease 0.05s;\ transition: opacity 0.4s ease 0.05s;\ opacity: 0;\ }\ .ace_fade-fold-widgets:hover .ace_fold-widget {\ -webkit-transition: opacity 0.05s ease 0.05s;\ transition: opacity 0.05s ease 0.05s;\ opacity:1;\ }\ .ace_underline {\ text-decoration: underline;\ }\ .ace_bold {\ font-weight: bold;\ }\ .ace_nobold .ace_bold {\ font-weight: normal;\ }\ .ace_italic {\ font-style: italic;\ }\ .ace_error-marker {\ background-color: rgba(255, 0, 0,0.2);\ position: absolute;\ z-index: 9;\ }\ .ace_highlight-marker {\ background-color: rgba(255, 255, 0,0.2);\ position: absolute;\ z-index: 8;\ }\ .ace_br1 {border-top-left-radius : 3px;}\ .ace_br2 {border-top-right-radius : 3px;}\ .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\ .ace_br4 {border-bottom-right-radius: 3px;}\ .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\ .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\ .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\ .ace_br8 {border-bottom-left-radius : 3px;}\ .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\ .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\ .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\ .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ "; dom.importCssString(editorCss, "ace_editor.css"); var VirtualRenderer = function(container, theme) { var _self = this; this.container = container || dom.createElement("div"); this.$keepTextAreaAtCursor = !useragent.isOldIE; dom.addCssClass(this.container, "ace_editor"); this.setTheme(theme); this.$gutter = dom.createElement("div"); this.$gutter.className = "ace_gutter"; this.container.appendChild(this.$gutter); this.scroller = dom.createElement("div"); this.scroller.className = "ace_scroller"; this.container.appendChild(this.scroller); this.content = dom.createElement("div"); this.content.className = "ace_content"; this.scroller.appendChild(this.content); this.$gutterLayer = new GutterLayer(this.$gutter); this.$gutterLayer.on("changeGutterWidth", this.onGutterResize.bind(this)); this.$markerBack = new MarkerLayer(this.content); var textLayer = this.$textLayer = new TextLayer(this.content); this.canvas = textLayer.element; this.$markerFront = new MarkerLayer(this.content); this.$cursorLayer = new CursorLayer(this.content); this.$horizScroll = false; this.$vScroll = false; this.scrollBar = this.scrollBarV = new VScrollBar(this.container, this); this.scrollBarH = new HScrollBar(this.container, this); this.scrollBarV.addEventListener("scroll", function(e) { if (!_self.$scrollAnimation) _self.session.setScrollTop(e.data - _self.scrollMargin.top); }); this.scrollBarH.addEventListener("scroll", function(e) { if (!_self.$scrollAnimation) _self.session.setScrollLeft(e.data - _self.scrollMargin.left); }); this.scrollTop = 0; this.scrollLeft = 0; this.cursorPos = { row : 0, column : 0 }; this.$fontMetrics = new FontMetrics(this.container, 500); this.$textLayer.$setFontMetrics(this.$fontMetrics); this.$textLayer.addEventListener("changeCharacterSize", function(e) { _self.updateCharacterSize(); _self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height); _self._signal("changeCharacterSize", e); }); this.$size = { width: 0, height: 0, scrollerHeight: 0, scrollerWidth: 0, $dirty: true }; this.layerConfig = { width : 1, padding : 0, firstRow : 0, firstRowScreen: 0, lastRow : 0, lineHeight : 0, characterWidth : 0, minHeight : 1, maxHeight : 1, offset : 0, height : 1, gutterOffset: 1 }; this.scrollMargin = { left: 0, right: 0, top: 0, bottom: 0, v: 0, h: 0 }; this.$loop = new RenderLoop( this.$renderChanges.bind(this), this.container.ownerDocument.defaultView ); this.$loop.schedule(this.CHANGE_FULL); this.updateCharacterSize(); this.setPadding(4); config.resetOptions(this); config._emit("renderer", this); }; (function() { this.CHANGE_CURSOR = 1; this.CHANGE_MARKER = 2; this.CHANGE_GUTTER = 4; this.CHANGE_SCROLL = 8; this.CHANGE_LINES = 16; this.CHANGE_TEXT = 32; this.CHANGE_SIZE = 64; this.CHANGE_MARKER_BACK = 128; this.CHANGE_MARKER_FRONT = 256; this.CHANGE_FULL = 512; this.CHANGE_H_SCROLL = 1024; oop.implement(this, EventEmitter); this.updateCharacterSize = function() { if (this.$textLayer.allowBoldFonts != this.$allowBoldFonts) { this.$allowBoldFonts = this.$textLayer.allowBoldFonts; this.setStyle("ace_nobold", !this.$allowBoldFonts); } this.layerConfig.characterWidth = this.characterWidth = this.$textLayer.getCharacterWidth(); this.layerConfig.lineHeight = this.lineHeight = this.$textLayer.getLineHeight(); this.$updatePrintMargin(); }; this.setSession = function(session) { if (this.session) this.session.doc.off("changeNewLineMode", this.onChangeNewLineMode); this.session = session; if (session && this.scrollMargin.top && session.getScrollTop() <= 0) session.setScrollTop(-this.scrollMargin.top); this.$cursorLayer.setSession(session); this.$markerBack.setSession(session); this.$markerFront.setSession(session); this.$gutterLayer.setSession(session); this.$textLayer.setSession(session); if (!session) return; this.$loop.schedule(this.CHANGE_FULL); this.session.$setFontMetrics(this.$fontMetrics); this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this); this.onChangeNewLineMode() this.session.doc.on("changeNewLineMode", this.onChangeNewLineMode); }; this.updateLines = function(firstRow, lastRow, force) { if (lastRow === undefined) lastRow = Infinity; if (!this.$changedLines) { this.$changedLines = { firstRow: firstRow, lastRow: lastRow }; } else { if (this.$changedLines.firstRow > firstRow) this.$changedLines.firstRow = firstRow; if (this.$changedLines.lastRow < lastRow) this.$changedLines.lastRow = lastRow; } if (this.$changedLines.lastRow < this.layerConfig.firstRow) { if (force) this.$changedLines.lastRow = this.layerConfig.lastRow; else return; } if (this.$changedLines.firstRow > this.layerConfig.lastRow) return; this.$loop.schedule(this.CHANGE_LINES); }; this.onChangeNewLineMode = function() { this.$loop.schedule(this.CHANGE_TEXT); this.$textLayer.$updateEolChar(); }; this.onChangeTabSize = function() { this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER); this.$textLayer.onChangeTabSize(); }; this.updateText = function() { this.$loop.schedule(this.CHANGE_TEXT); }; this.updateFull = function(force) { if (force) this.$renderChanges(this.CHANGE_FULL, true); else this.$loop.schedule(this.CHANGE_FULL); }; this.updateFontSize = function() { this.$textLayer.checkForSizeChanges(); }; this.$changes = 0; this.$updateSizeAsync = function() { if (this.$loop.pending) this.$size.$dirty = true; else this.onResize(); }; this.onResize = function(force, gutterWidth, width, height) { if (this.resizing > 2) return; else if (this.resizing > 0) this.resizing++; else this.resizing = force ? 1 : 0; var el = this.container; if (!height) height = el.clientHeight || el.scrollHeight; if (!width) width = el.clientWidth || el.scrollWidth; var changes = this.$updateCachedSize(force, gutterWidth, width, height); if (!this.$size.scrollerHeight || (!width && !height)) return this.resizing = 0; if (force) this.$gutterLayer.$padding = null; if (force) this.$renderChanges(changes | this.$changes, true); else this.$loop.schedule(changes | this.$changes); if (this.resizing) this.resizing = 0; this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null; }; this.$updateCachedSize = function(force, gutterWidth, width, height) { height -= (this.$extraHeight || 0); var changes = 0; var size = this.$size; var oldSize = { width: size.width, height: size.height, scrollerHeight: size.scrollerHeight, scrollerWidth: size.scrollerWidth }; if (height && (force || size.height != height)) { size.height = height; changes |= this.CHANGE_SIZE; size.scrollerHeight = size.height; if (this.$horizScroll) size.scrollerHeight -= this.scrollBarH.getHeight(); this.scrollBarV.element.style.bottom = this.scrollBarH.getHeight() + "px"; changes = changes | this.CHANGE_SCROLL; } if (width && (force || size.width != width)) { changes |= this.CHANGE_SIZE; size.width = width; if (gutterWidth == null) gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0; this.gutterWidth = gutterWidth; this.scrollBarH.element.style.left = this.scroller.style.left = gutterWidth + "px"; size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth()); this.scrollBarH.element.style.right = this.scroller.style.right = this.scrollBarV.getWidth() + "px"; this.scroller.style.bottom = this.scrollBarH.getHeight() + "px"; if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force) changes |= this.CHANGE_FULL; } size.$dirty = !width || !height; if (changes) this._signal("resize", oldSize); return changes; }; this.onGutterResize = function() { var gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0; if (gutterWidth != this.gutterWidth) this.$changes |= this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height); if (this.session.getUseWrapMode() && this.adjustWrapLimit()) { this.$loop.schedule(this.CHANGE_FULL); } else if (this.$size.$dirty) { this.$loop.schedule(this.CHANGE_FULL); } else { this.$computeLayerConfig(); this.$loop.schedule(this.CHANGE_MARKER); } }; this.adjustWrapLimit = function() { var availableWidth = this.$size.scrollerWidth - this.$padding * 2; var limit = Math.floor(availableWidth / this.characterWidth); return this.session.adjustWrapLimit(limit, this.$showPrintMargin && this.$printMarginColumn); }; this.setAnimatedScroll = function(shouldAnimate){ this.setOption("animatedScroll", shouldAnimate); }; this.getAnimatedScroll = function() { return this.$animatedScroll; }; this.setShowInvisibles = function(showInvisibles) { this.setOption("showInvisibles", showInvisibles); }; this.getShowInvisibles = function() { return this.getOption("showInvisibles"); }; this.getDisplayIndentGuides = function() { return this.getOption("displayIndentGuides"); }; this.setDisplayIndentGuides = function(display) { this.setOption("displayIndentGuides", display); }; this.setShowPrintMargin = function(showPrintMargin) { this.setOption("showPrintMargin", showPrintMargin); }; this.getShowPrintMargin = function() { return this.getOption("showPrintMargin"); }; this.setPrintMarginColumn = function(showPrintMargin) { this.setOption("printMarginColumn", showPrintMargin); }; this.getPrintMarginColumn = function() { return this.getOption("printMarginColumn"); }; this.getShowGutter = function(){ return this.getOption("showGutter"); }; this.setShowGutter = function(show){ return this.setOption("showGutter", show); }; this.getFadeFoldWidgets = function(){ return this.getOption("fadeFoldWidgets") }; this.setFadeFoldWidgets = function(show) { this.setOption("fadeFoldWidgets", show); }; this.setHighlightGutterLine = function(shouldHighlight) { this.setOption("highlightGutterLine", shouldHighlight); }; this.getHighlightGutterLine = function() { return this.getOption("highlightGutterLine"); }; this.$updateGutterLineHighlight = function() { var pos = this.$cursorLayer.$pixelPos; var height = this.layerConfig.lineHeight; if (this.session.getUseWrapMode()) { var cursor = this.session.selection.getCursor(); cursor.column = 0; pos = this.$cursorLayer.getPixelPosition(cursor, true); height *= this.session.getRowLength(cursor.row); } this.$gutterLineHighlight.style.top = pos.top - this.layerConfig.offset + "px"; this.$gutterLineHighlight.style.height = height + "px"; }; this.$updatePrintMargin = function() { if (!this.$showPrintMargin && !this.$printMarginEl) return; if (!this.$printMarginEl) { var containerEl = dom.createElement("div"); containerEl.className = "ace_layer ace_print-margin-layer"; this.$printMarginEl = dom.createElement("div"); this.$printMarginEl.className = "ace_print-margin"; containerEl.appendChild(this.$printMarginEl); this.content.insertBefore(containerEl, this.content.firstChild); } var style = this.$printMarginEl.style; style.left = ((this.characterWidth * this.$printMarginColumn) + this.$padding) + "px"; style.visibility = this.$showPrintMargin ? "visible" : "hidden"; if (this.session && this.session.$wrap == -1) this.adjustWrapLimit(); }; this.getContainerElement = function() { return this.container; }; this.getMouseEventTarget = function() { return this.scroller; }; this.getTextAreaContainer = function() { return this.container; }; this.$moveTextAreaToCursor = function() { if (!this.$keepTextAreaAtCursor) return; var config = this.layerConfig; var posTop = this.$cursorLayer.$pixelPos.top; var posLeft = this.$cursorLayer.$pixelPos.left; posTop -= config.offset; var style = this.textarea.style; var h = this.lineHeight; if (posTop < 0 || posTop > config.height - h) { style.top = style.left = "0"; return; } var w = this.characterWidth; if (this.$composition) { var val = this.textarea.value.replace(/^\x01+/, ""); w *= (this.session.$getStringScreenWidth(val)[0]+2); h += 2; } posLeft -= this.scrollLeft; if (posLeft > this.$size.scrollerWidth - w) posLeft = this.$size.scrollerWidth - w; posLeft += this.gutterWidth; style.height = h + "px"; style.width = w + "px"; style.left = Math.min(posLeft, this.$size.scrollerWidth - w) + "px"; style.top = Math.min(posTop, this.$size.height - h) + "px"; }; this.getFirstVisibleRow = function() { return this.layerConfig.firstRow; }; this.getFirstFullyVisibleRow = function() { return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1); }; this.getLastFullyVisibleRow = function() { var flint = Math.floor((this.layerConfig.height + this.layerConfig.offset) / this.layerConfig.lineHeight); return this.layerConfig.firstRow - 1 + flint; }; this.getLastVisibleRow = function() { return this.layerConfig.lastRow; }; this.$padding = null; this.setPadding = function(padding) { this.$padding = padding; this.$textLayer.setPadding(padding); this.$cursorLayer.setPadding(padding); this.$markerFront.setPadding(padding); this.$markerBack.setPadding(padding); this.$loop.schedule(this.CHANGE_FULL); this.$updatePrintMargin(); }; this.setScrollMargin = function(top, bottom, left, right) { var sm = this.scrollMargin; sm.top = top|0; sm.bottom = bottom|0; sm.right = right|0; sm.left = left|0; sm.v = sm.top + sm.bottom; sm.h = sm.left + sm.right; if (sm.top && this.scrollTop <= 0 && this.session) this.session.setScrollTop(-sm.top); this.updateFull(); }; this.getHScrollBarAlwaysVisible = function() { return this.$hScrollBarAlwaysVisible; }; this.setHScrollBarAlwaysVisible = function(alwaysVisible) { this.setOption("hScrollBarAlwaysVisible", alwaysVisible); }; this.getVScrollBarAlwaysVisible = function() { return this.$vScrollBarAlwaysVisible; }; this.setVScrollBarAlwaysVisible = function(alwaysVisible) { this.setOption("vScrollBarAlwaysVisible", alwaysVisible); }; this.$updateScrollBarV = function() { var scrollHeight = this.layerConfig.maxHeight; var scrollerHeight = this.$size.scrollerHeight; if (!this.$maxLines && this.$scrollPastEnd) { scrollHeight -= (scrollerHeight - this.lineHeight) * this.$scrollPastEnd; if (this.scrollTop > scrollHeight - scrollerHeight) { scrollHeight = this.scrollTop + scrollerHeight; this.scrollBarV.scrollTop = null; } } this.scrollBarV.setScrollHeight(scrollHeight + this.scrollMargin.v); this.scrollBarV.setScrollTop(this.scrollTop + this.scrollMargin.top); }; this.$updateScrollBarH = function() { this.scrollBarH.setScrollWidth(this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h); this.scrollBarH.setScrollLeft(this.scrollLeft + this.scrollMargin.left); }; this.$frozen = false; this.freeze = function() { this.$frozen = true; }; this.unfreeze = function() { this.$frozen = false; }; this.$renderChanges = function(changes, force) { if (this.$changes) { changes |= this.$changes; this.$changes = 0; } if ((!this.session || !this.container.offsetWidth || this.$frozen) || (!changes && !force)) { this.$changes |= changes; return; } if (this.$size.$dirty) { this.$changes |= changes; return this.onResize(true); } if (!this.lineHeight) { this.$textLayer.checkForSizeChanges(); } this._signal("beforeRender"); var config = this.layerConfig; if (changes & this.CHANGE_FULL || changes & this.CHANGE_SIZE || changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES || changes & this.CHANGE_SCROLL || changes & this.CHANGE_H_SCROLL ) { changes |= this.$computeLayerConfig(); if (config.firstRow != this.layerConfig.firstRow && config.firstRowScreen == this.layerConfig.firstRowScreen) { var st = this.scrollTop + (config.firstRow - this.layerConfig.firstRow) * this.lineHeight; if (st > 0) { this.scrollTop = st; changes = changes | this.CHANGE_SCROLL; changes |= this.$computeLayerConfig(); } } config = this.layerConfig; this.$updateScrollBarV(); if (changes & this.CHANGE_H_SCROLL) this.$updateScrollBarH(); this.$gutterLayer.element.style.marginTop = (-config.offset) + "px"; this.content.style.marginTop = (-config.offset) + "px"; this.content.style.width = config.width + 2 * this.$padding + "px"; this.content.style.height = config.minHeight + "px"; } if (changes & this.CHANGE_H_SCROLL) { this.content.style.marginLeft = -this.scrollLeft + "px"; this.scroller.className = this.scrollLeft <= 0 ? "ace_scroller" : "ace_scroller ace_scroll-left"; } if (changes & this.CHANGE_FULL) { this.$textLayer.update(config); if (this.$showGutter) this.$gutterLayer.update(config); this.$markerBack.update(config); this.$markerFront.update(config); this.$cursorLayer.update(config); this.$moveTextAreaToCursor(); this.$highlightGutterLine && this.$updateGutterLineHighlight(); this._signal("afterRender"); return; } if (changes & this.CHANGE_SCROLL) { if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES) this.$textLayer.update(config); else this.$textLayer.scrollLines(config); if (this.$showGutter) this.$gutterLayer.update(config); this.$markerBack.update(config); this.$markerFront.update(config); this.$cursorLayer.update(config); this.$highlightGutterLine && this.$updateGutterLineHighlight(); this.$moveTextAreaToCursor(); this._signal("afterRender"); return; } if (changes & this.CHANGE_TEXT) { this.$textLayer.update(config); if (this.$showGutter) this.$gutterLayer.update(config); } else if (changes & this.CHANGE_LINES) { if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this.$showGutter) this.$gutterLayer.update(config); } else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) { if (this.$showGutter) this.$gutterLayer.update(config); } if (changes & this.CHANGE_CURSOR) { this.$cursorLayer.update(config); this.$moveTextAreaToCursor(); this.$highlightGutterLine && this.$updateGutterLineHighlight(); } if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) { this.$markerFront.update(config); } if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) { this.$markerBack.update(config); } this._signal("afterRender"); }; this.$autosize = function() { var height = this.session.getScreenLength() * this.lineHeight; var maxHeight = this.$maxLines * this.lineHeight; var desiredHeight = Math.max( (this.$minLines||1) * this.lineHeight, Math.min(maxHeight, height) ) + this.scrollMargin.v + (this.$extraHeight || 0); if (this.$horizScroll) desiredHeight += this.scrollBarH.getHeight(); var vScroll = height > maxHeight; if (desiredHeight != this.desiredHeight || this.$size.height != this.desiredHeight || vScroll != this.$vScroll) { if (vScroll != this.$vScroll) { this.$vScroll = vScroll; this.scrollBarV.setVisible(vScroll); } var w = this.container.clientWidth; this.container.style.height = desiredHeight + "px"; this.$updateCachedSize(true, this.$gutterWidth, w, desiredHeight); this.desiredHeight = desiredHeight; this._signal("autosize"); } }; this.$computeLayerConfig = function() { var session = this.session; var size = this.$size; var hideScrollbars = size.height <= 2 * this.lineHeight; var screenLines = this.session.getScreenLength(); var maxHeight = screenLines * this.lineHeight; var longestLine = this.$getLongestLine(); var horizScroll = !hideScrollbars && (this.$hScrollBarAlwaysVisible || size.scrollerWidth - longestLine - 2 * this.$padding < 0); var hScrollChanged = this.$horizScroll !== horizScroll; if (hScrollChanged) { this.$horizScroll = horizScroll; this.scrollBarH.setVisible(horizScroll); } var vScrollBefore = this.$vScroll; // autosize can change vscroll value in which case we need to update longestLine if (this.$maxLines && this.lineHeight > 1) this.$autosize(); var offset = this.scrollTop % this.lineHeight; var minHeight = size.scrollerHeight + this.lineHeight; var scrollPastEnd = !this.$maxLines && this.$scrollPastEnd ? (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd : 0; maxHeight += scrollPastEnd; var sm = this.scrollMargin; this.session.setScrollTop(Math.max(-sm.top, Math.min(this.scrollTop, maxHeight - size.scrollerHeight + sm.bottom))); this.session.setScrollLeft(Math.max(-sm.left, Math.min(this.scrollLeft, longestLine + 2 * this.$padding - size.scrollerWidth + sm.right))); var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible || size.scrollerHeight - maxHeight + scrollPastEnd < 0 || this.scrollTop > sm.top); var vScrollChanged = vScrollBefore !== vScroll; if (vScrollChanged) { this.$vScroll = vScroll; this.scrollBarV.setVisible(vScroll); } var lineCount = Math.ceil(minHeight / this.lineHeight) - 1; var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight)); var lastRow = firstRow + lineCount; var firstRowScreen, firstRowHeight; var lineHeight = this.lineHeight; firstRow = session.screenToDocumentRow(firstRow, 0); var foldLine = session.getFoldLine(firstRow); if (foldLine) { firstRow = foldLine.start.row; } firstRowScreen = session.documentToScreenRow(firstRow, 0); firstRowHeight = session.getRowLength(firstRow) * lineHeight; lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1); minHeight = size.scrollerHeight + session.getRowLength(lastRow) * lineHeight + firstRowHeight; offset = this.scrollTop - firstRowScreen * lineHeight; var changes = 0; if (this.layerConfig.width != longestLine) changes = this.CHANGE_H_SCROLL; if (hScrollChanged || vScrollChanged) { changes = this.$updateCachedSize(true, this.gutterWidth, size.width, size.height); this._signal("scrollbarVisibilityChanged"); if (vScrollChanged) longestLine = this.$getLongestLine(); } this.layerConfig = { width : longestLine, padding : this.$padding, firstRow : firstRow, firstRowScreen: firstRowScreen, lastRow : lastRow, lineHeight : lineHeight, characterWidth : this.characterWidth, minHeight : minHeight, maxHeight : maxHeight, offset : offset, gutterOffset : Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)), height : this.$size.scrollerHeight }; return changes; }; this.$updateLines = function() { var firstRow = this.$changedLines.firstRow; var lastRow = this.$changedLines.lastRow; this.$changedLines = null; var layerConfig = this.layerConfig; if (firstRow > layerConfig.lastRow + 1) { return; } if (lastRow < layerConfig.firstRow) { return; } if (lastRow === Infinity) { if (this.$showGutter) this.$gutterLayer.update(layerConfig); this.$textLayer.update(layerConfig); return; } this.$textLayer.updateLines(layerConfig, firstRow, lastRow); return true; }; this.$getLongestLine = function() { var charCount = this.session.getScreenWidth(); if (this.showInvisibles && !this.session.$useWrapMode) charCount += 1; return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth)); }; this.updateFrontMarkers = function() { this.$markerFront.setMarkers(this.session.getMarkers(true)); this.$loop.schedule(this.CHANGE_MARKER_FRONT); }; this.updateBackMarkers = function() { this.$markerBack.setMarkers(this.session.getMarkers()); this.$loop.schedule(this.CHANGE_MARKER_BACK); }; this.addGutterDecoration = function(row, className){ this.$gutterLayer.addGutterDecoration(row, className); }; this.removeGutterDecoration = function(row, className){ this.$gutterLayer.removeGutterDecoration(row, className); }; this.updateBreakpoints = function(rows) { this.$loop.schedule(this.CHANGE_GUTTER); }; this.setAnnotations = function(annotations) { this.$gutterLayer.setAnnotations(annotations); this.$loop.schedule(this.CHANGE_GUTTER); }; this.updateCursor = function() { this.$loop.schedule(this.CHANGE_CURSOR); }; this.hideCursor = function() { this.$cursorLayer.hideCursor(); }; this.showCursor = function() { this.$cursorLayer.showCursor(); }; this.scrollSelectionIntoView = function(anchor, lead, offset) { this.scrollCursorIntoView(anchor, offset); this.scrollCursorIntoView(lead, offset); }; this.scrollCursorIntoView = function(cursor, offset, $viewMargin) { if (this.$size.scrollerHeight === 0) return; var pos = this.$cursorLayer.getPixelPosition(cursor); var left = pos.left; var top = pos.top; var topMargin = $viewMargin && $viewMargin.top || 0; var bottomMargin = $viewMargin && $viewMargin.bottom || 0; var scrollTop = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop; if (scrollTop + topMargin > top) { if (offset) top -= offset * this.$size.scrollerHeight; if (top === 0) top = -this.scrollMargin.top; this.session.setScrollTop(top); } else if (scrollTop + this.$size.scrollerHeight - bottomMargin < top + this.lineHeight) { if (offset) top += offset * this.$size.scrollerHeight; this.session.setScrollTop(top + this.lineHeight - this.$size.scrollerHeight); } var scrollLeft = this.scrollLeft; if (scrollLeft > left) { if (left < this.$padding + 2 * this.layerConfig.characterWidth) left = -this.scrollMargin.left; this.session.setScrollLeft(left); } else if (scrollLeft + this.$size.scrollerWidth < left + this.characterWidth) { this.session.setScrollLeft(Math.round(left + this.characterWidth - this.$size.scrollerWidth)); } else if (scrollLeft <= this.$padding && left - scrollLeft < this.characterWidth) { this.session.setScrollLeft(0); } }; this.getScrollTop = function() { return this.session.getScrollTop(); }; this.getScrollLeft = function() { return this.session.getScrollLeft(); }; this.getScrollTopRow = function() { return this.scrollTop / this.lineHeight; }; this.getScrollBottomRow = function() { return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1); }; this.scrollToRow = function(row) { this.session.setScrollTop(row * this.lineHeight); }; this.alignCursor = function(cursor, alignment) { if (typeof cursor == "number") cursor = {row: cursor, column: 0}; var pos = this.$cursorLayer.getPixelPosition(cursor); var h = this.$size.scrollerHeight - this.lineHeight; var offset = pos.top - h * (alignment || 0); this.session.setScrollTop(offset); return offset; }; this.STEPS = 8; this.$calcSteps = function(fromValue, toValue){ var i = 0; var l = this.STEPS; var steps = []; var func = function(t, x_min, dx) { return dx * (Math.pow(t - 1, 3) + 1) + x_min; }; for (i = 0; i < l; ++i) steps.push(func(i / this.STEPS, fromValue, toValue - fromValue)); return steps; }; this.scrollToLine = function(line, center, animate, callback) { var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0}); var offset = pos.top; if (center) offset -= this.$size.scrollerHeight / 2; var initialScroll = this.scrollTop; this.session.setScrollTop(offset); if (animate !== false) this.animateScrolling(initialScroll, callback); }; this.animateScrolling = function(fromValue, callback) { var toValue = this.scrollTop; if (!this.$animatedScroll) return; var _self = this; if (fromValue == toValue) return; if (this.$scrollAnimation) { var oldSteps = this.$scrollAnimation.steps; if (oldSteps.length) { fromValue = oldSteps[0]; if (fromValue == toValue) return; } } var steps = _self.$calcSteps(fromValue, toValue); this.$scrollAnimation = {from: fromValue, to: toValue, steps: steps}; clearInterval(this.$timer); _self.session.setScrollTop(steps.shift()); _self.session.$scrollTop = toValue; this.$timer = setInterval(function() { if (steps.length) { _self.session.setScrollTop(steps.shift()); _self.session.$scrollTop = toValue; } else if (toValue != null) { _self.session.$scrollTop = -1; _self.session.setScrollTop(toValue); toValue = null; } else { _self.$timer = clearInterval(_self.$timer); _self.$scrollAnimation = null; callback && callback(); } }, 10); }; this.scrollToY = function(scrollTop) { if (this.scrollTop !== scrollTop) { this.$loop.schedule(this.CHANGE_SCROLL); this.scrollTop = scrollTop; } }; this.scrollToX = function(scrollLeft) { if (this.scrollLeft !== scrollLeft) this.scrollLeft = scrollLeft; this.$loop.schedule(this.CHANGE_H_SCROLL); }; this.scrollTo = function(x, y) { this.session.setScrollTop(y); this.session.setScrollLeft(y); }; this.scrollBy = function(deltaX, deltaY) { deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY); deltaX && this.session.setScrollLeft(this.session.getScrollLeft() + deltaX); }; this.isScrollableBy = function(deltaX, deltaY) { if (deltaY < 0 && this.session.getScrollTop() >= 1 - this.scrollMargin.top) return true; if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight - this.layerConfig.maxHeight < -1 + this.scrollMargin.bottom) return true; if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left) return true; if (deltaX > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth - this.layerConfig.width < -1 + this.scrollMargin.right) return true; }; this.pixelToScreenCoordinates = function(x, y) { var canvasPos = this.scroller.getBoundingClientRect(); var offset = (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth; var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight); var col = Math.round(offset); return {row: row, column: col, side: offset - col > 0 ? 1 : -1}; }; this.screenToTextCoordinates = function(x, y) { var canvasPos = this.scroller.getBoundingClientRect(); var col = Math.round( (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth ); var row = (y + this.scrollTop - canvasPos.top) / this.lineHeight; return this.session.screenToDocumentPosition(row, Math.max(col, 0)); }; this.textToScreenCoordinates = function(row, column) { var canvasPos = this.scroller.getBoundingClientRect(); var pos = this.session.documentToScreenPosition(row, column); var x = this.$padding + Math.round(pos.column * this.characterWidth); var y = pos.row * this.lineHeight; return { pageX: canvasPos.left + x - this.scrollLeft, pageY: canvasPos.top + y - this.scrollTop }; }; this.visualizeFocus = function() { dom.addCssClass(this.container, "ace_focus"); }; this.visualizeBlur = function() { dom.removeCssClass(this.container, "ace_focus"); }; this.showComposition = function(position) { if (!this.$composition) this.$composition = { keepTextAreaAtCursor: this.$keepTextAreaAtCursor, cssText: this.textarea.style.cssText }; this.$keepTextAreaAtCursor = true; dom.addCssClass(this.textarea, "ace_composition"); this.textarea.style.cssText = ""; this.$moveTextAreaToCursor(); }; this.setCompositionText = function(text) { this.$moveTextAreaToCursor(); }; this.hideComposition = function() { if (!this.$composition) return; dom.removeCssClass(this.textarea, "ace_composition"); this.$keepTextAreaAtCursor = this.$composition.keepTextAreaAtCursor; this.textarea.style.cssText = this.$composition.cssText; this.$composition = null; }; this.setTheme = function(theme, cb) { var _self = this; this.$themeId = theme; _self._dispatchEvent('themeChange',{theme:theme}); if (!theme || typeof theme == "string") { var moduleName = theme || this.$options.theme.initialValue; config.loadModule(["theme", moduleName], afterLoad); } else { afterLoad(theme); } function afterLoad(module) { if (_self.$themeId != theme) return cb && cb(); if (!module.cssClass) return; dom.importCssString( module.cssText, module.cssClass, _self.container.ownerDocument ); if (_self.theme) dom.removeCssClass(_self.container, _self.theme.cssClass); var padding = "padding" in module ? module.padding : "padding" in (_self.theme || {}) ? 4 : _self.$padding; if (_self.$padding && padding != _self.$padding) _self.setPadding(padding); _self.$theme = module.cssClass; _self.theme = module; dom.addCssClass(_self.container, module.cssClass); dom.setCssClass(_self.container, "ace_dark", module.isDark); if (_self.$size) { _self.$size.width = 0; _self.$updateSizeAsync(); } _self._dispatchEvent('themeLoaded', {theme:module}); cb && cb(); } }; this.getTheme = function() { return this.$themeId; }; this.setStyle = function(style, include) { dom.setCssClass(this.container, style, include !== false); }; this.unsetStyle = function(style) { dom.removeCssClass(this.container, style); }; this.setCursorStyle = function(style) { if (this.scroller.style.cursor != style) this.scroller.style.cursor = style; }; this.setMouseCursor = function(cursorStyle) { this.scroller.style.cursor = cursorStyle; }; this.destroy = function() { this.$textLayer.destroy(); this.$cursorLayer.destroy(); }; }).call(VirtualRenderer.prototype); config.defineOptions(VirtualRenderer.prototype, "renderer", { animatedScroll: {initialValue: false}, showInvisibles: { set: function(value) { if (this.$textLayer.setShowInvisibles(value)) this.$loop.schedule(this.CHANGE_TEXT); }, initialValue: false }, showPrintMargin: { set: function() { this.$updatePrintMargin(); }, initialValue: true }, printMarginColumn: { set: function() { this.$updatePrintMargin(); }, initialValue: 80 }, printMargin: { set: function(val) { if (typeof val == "number") this.$printMarginColumn = val; this.$showPrintMargin = !!val; this.$updatePrintMargin(); }, get: function() { return this.$showPrintMargin && this.$printMarginColumn; } }, showGutter: { set: function(show){ this.$gutter.style.display = show ? "block" : "none"; this.$loop.schedule(this.CHANGE_FULL); this.onGutterResize(); }, initialValue: true }, fadeFoldWidgets: { set: function(show) { dom.setCssClass(this.$gutter, "ace_fade-fold-widgets", show); }, initialValue: false }, showFoldWidgets: { set: function(show) {this.$gutterLayer.setShowFoldWidgets(show)}, initialValue: true }, showLineNumbers: { set: function(show) { this.$gutterLayer.setShowLineNumbers(show); this.$loop.schedule(this.CHANGE_GUTTER); }, initialValue: true }, displayIndentGuides: { set: function(show) { if (this.$textLayer.setDisplayIndentGuides(show)) this.$loop.schedule(this.CHANGE_TEXT); }, initialValue: true }, highlightGutterLine: { set: function(shouldHighlight) { if (!this.$gutterLineHighlight) { this.$gutterLineHighlight = dom.createElement("div"); this.$gutterLineHighlight.className = "ace_gutter-active-line"; this.$gutter.appendChild(this.$gutterLineHighlight); return; } this.$gutterLineHighlight.style.display = shouldHighlight ? "" : "none"; if (this.$cursorLayer.$pixelPos) this.$updateGutterLineHighlight(); }, initialValue: false, value: true }, hScrollBarAlwaysVisible: { set: function(val) { if (!this.$hScrollBarAlwaysVisible || !this.$horizScroll) this.$loop.schedule(this.CHANGE_SCROLL); }, initialValue: false }, vScrollBarAlwaysVisible: { set: function(val) { if (!this.$vScrollBarAlwaysVisible || !this.$vScroll) this.$loop.schedule(this.CHANGE_SCROLL); }, initialValue: false }, fontSize: { set: function(size) { if (typeof size == "number") size = size + "px"; this.container.style.fontSize = size; this.updateFontSize(); }, initialValue: 12 }, fontFamily: { set: function(name) { this.container.style.fontFamily = name; this.updateFontSize(); } }, maxLines: { set: function(val) { this.updateFull(); } }, minLines: { set: function(val) { this.updateFull(); } }, scrollPastEnd: { set: function(val) { val = +val || 0; if (this.$scrollPastEnd == val) return; this.$scrollPastEnd = val; this.$loop.schedule(this.CHANGE_SCROLL); }, initialValue: 0, handlesSet: true }, fixedWidthGutter: { set: function(val) { this.$gutterLayer.$fixedWidth = !!val; this.$loop.schedule(this.CHANGE_GUTTER); } }, theme: { set: function(val) { this.setTheme(val) }, get: function() { return this.$themeId || this.theme; }, initialValue: "./theme/textmate", handlesSet: true } }); exports.VirtualRenderer = VirtualRenderer; }); define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var net = require("../lib/net"); var EventEmitter = require("../lib/event_emitter").EventEmitter; var config = require("../config"); var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl) { this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this); this.changeListener = this.changeListener.bind(this); this.onMessage = this.onMessage.bind(this); if (require.nameToUrl && !require.toUrl) require.toUrl = require.nameToUrl; if (config.get("packaged") || !require.toUrl) { workerUrl = workerUrl || config.moduleUrl(mod, "worker"); } else { var normalizePath = this.$normalizePath; workerUrl = workerUrl || normalizePath(require.toUrl("ace/worker/worker.js", null, "_")); var tlns = {}; topLevelNamespaces.forEach(function(ns) { tlns[ns] = normalizePath(require.toUrl(ns, null, "_").replace(/(\.js)?(\?.*)?$/, "")); }); } try { this.$worker = new Worker(workerUrl); } catch(e) { if (e instanceof window.DOMException) { var blob = this.$workerBlob(workerUrl); var URL = window.URL || window.webkitURL; var blobURL = URL.createObjectURL(blob); this.$worker = new Worker(blobURL); URL.revokeObjectURL(blobURL); } else { throw e; } } this.$worker.postMessage({ init : true, tlns : tlns, module : mod, classname : classname }); this.callbackId = 1; this.callbacks = {}; this.$worker.onmessage = this.onMessage; }; (function(){ oop.implement(this, EventEmitter); this.onMessage = function(e) { var msg = e.data; switch(msg.type) { case "event": this._signal(msg.name, {data: msg.data}); break; case "call": var callback = this.callbacks[msg.id]; if (callback) { callback(msg.data); delete this.callbacks[msg.id]; } break; case "error": this.reportError(msg.data); break; case "log": window.console && console.log && console.log.apply(console, msg.data); break; } }; this.reportError = function(err) { window.console && console.error && console.error(err); }; this.$normalizePath = function(path) { return net.qualifyURL(path); }; this.terminate = function() { this._signal("terminate", {}); this.deltaQueue = null; this.$worker.terminate(); this.$worker = null; if (this.$doc) this.$doc.off("change", this.changeListener); this.$doc = null; }; this.send = function(cmd, args) { this.$worker.postMessage({command: cmd, args: args}); }; this.call = function(cmd, args, callback) { if (callback) { var id = this.callbackId++; this.callbacks[id] = callback; args.push(id); } this.send(cmd, args); }; this.emit = function(event, data) { try { this.$worker.postMessage({event: event, data: {data: data.data}}); } catch(ex) { console.error(ex.stack); } }; this.attachToDocument = function(doc) { if(this.$doc) this.terminate(); this.$doc = doc; this.call("setValue", [doc.getValue()]); doc.on("change", this.changeListener); }; this.changeListener = function(delta) { if (!this.deltaQueue) { this.deltaQueue = []; setTimeout(this.$sendDeltaQueue, 0); } if (delta.action == "insert") this.deltaQueue.push(delta.start, delta.lines); else this.deltaQueue.push(delta.start, delta.end); }; this.$sendDeltaQueue = function() { var q = this.deltaQueue; if (!q) return; this.deltaQueue = null; if (q.length > 50 && q.length > this.$doc.getLength() >> 1) { this.call("setValue", [this.$doc.getValue()]); } else this.emit("change", {data: q}); }; this.$workerBlob = function(workerUrl) { var script = "importScripts('" + net.qualifyURL(workerUrl) + "');"; try { return new Blob([script], {"type": "application/javascript"}); } catch (e) { // Backwards-compatibility var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder; var blobBuilder = new BlobBuilder(); blobBuilder.append(script); return blobBuilder.getBlob("application/javascript"); } }; }).call(WorkerClient.prototype); var UIWorkerClient = function(topLevelNamespaces, mod, classname) { this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this); this.changeListener = this.changeListener.bind(this); this.callbackId = 1; this.callbacks = {}; this.messageBuffer = []; var main = null; var emitSync = false; var sender = Object.create(EventEmitter); var _self = this; this.$worker = {}; this.$worker.terminate = function() {}; this.$worker.postMessage = function(e) { _self.messageBuffer.push(e); if (main) { if (emitSync) setTimeout(processNext); else processNext(); } }; this.setEmitSync = function(val) { emitSync = val }; var processNext = function() { var msg = _self.messageBuffer.shift(); if (msg.command) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); }; sender.postMessage = function(msg) { _self.onMessage({data: msg}); }; sender.callback = function(data, callbackId) { this.postMessage({type: "call", id: callbackId, data: data}); }; sender.emit = function(name, data) { this.postMessage({type: "event", name: name, data: data}); }; config.loadModule(["worker", mod], function(Main) { main = new Main[classname](sender); while (_self.messageBuffer.length) processNext(); }); }; UIWorkerClient.prototype = WorkerClient.prototype; exports.UIWorkerClient = UIWorkerClient; exports.WorkerClient = WorkerClient; }); define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"], function(require, exports, module) { "use strict"; var Range = require("./range").Range; var EventEmitter = require("./lib/event_emitter").EventEmitter; var oop = require("./lib/oop"); var PlaceHolder = function(session, length, pos, others, mainClass, othersClass) { var _self = this; this.length = length; this.session = session; this.doc = session.getDocument(); this.mainClass = mainClass; this.othersClass = othersClass; this.$onUpdate = this.onUpdate.bind(this); this.doc.on("change", this.$onUpdate); this.$others = others; this.$onCursorChange = function() { setTimeout(function() { _self.onCursorChange(); }); }; this.$pos = pos; var undoStack = session.getUndoManager().$undoStack || session.getUndoManager().$undostack || {length: -1}; this.$undoStackDepth = undoStack.length; this.setup(); session.selection.on("changeCursor", this.$onCursorChange); }; (function() { oop.implement(this, EventEmitter); this.setup = function() { var _self = this; var doc = this.doc; var session = this.session; this.selectionBefore = session.selection.toJSON(); if (session.selection.inMultiSelectMode) session.selection.toSingleRange(); this.pos = doc.createAnchor(this.$pos.row, this.$pos.column); var pos = this.pos; pos.$insertRight = true; pos.detach(); pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false); this.others = []; this.$others.forEach(function(other) { var anchor = doc.createAnchor(other.row, other.column); anchor.$insertRight = true; anchor.detach(); _self.others.push(anchor); }); session.setUndoSelect(false); }; this.showOtherMarkers = function() { if (this.othersActive) return; var session = this.session; var _self = this; this.othersActive = true; this.others.forEach(function(anchor) { anchor.markerId = session.addMarker(new Range(anchor.row, anchor.column, anchor.row, anchor.column+_self.length), _self.othersClass, null, false); }); }; this.hideOtherMarkers = function() { if (!this.othersActive) return; this.othersActive = false; for (var i = 0; i < this.others.length; i++) { this.session.removeMarker(this.others[i].markerId); } }; this.onUpdate = function(delta) { if (this.$updating) return this.updateAnchors(delta); var range = delta; if (range.start.row !== range.end.row) return; if (range.start.row !== this.pos.row) return; this.$updating = true; var lengthDiff = delta.action === "insert" ? range.end.column - range.start.column : range.start.column - range.end.column; var inMainRange = range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1; var distanceFromStart = range.start.column - this.pos.column; this.updateAnchors(delta); if (inMainRange) this.length += lengthDiff; if (inMainRange && !this.session.$fromUndo) { if (delta.action === 'insert') { for (var i = this.others.length - 1; i >= 0; i--) { var otherPos = this.others[i]; var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart}; this.doc.insertMergedLines(newPos, delta.lines); } } else if (delta.action === 'remove') { for (var i = this.others.length - 1; i >= 0; i--) { var otherPos = this.others[i]; var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart}; this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff)); } } } this.$updating = false; this.updateMarkers(); }; this.updateAnchors = function(delta) { this.pos.onChange(delta); for (var i = this.others.length; i--;) this.others[i].onChange(delta); this.updateMarkers(); }; this.updateMarkers = function() { if (this.$updating) return; var _self = this; var session = this.session; var updateMarker = function(pos, className) { session.removeMarker(pos.markerId); pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column+_self.length), className, null, false); }; updateMarker(this.pos, this.mainClass); for (var i = this.others.length; i--;) updateMarker(this.others[i], this.othersClass); }; this.onCursorChange = function(event) { if (this.$updating || !this.session) return; var pos = this.session.selection.getCursor(); if (pos.row === this.pos.row && pos.column >= this.pos.column && pos.column <= this.pos.column + this.length) { this.showOtherMarkers(); this._emit("cursorEnter", event); } else { this.hideOtherMarkers(); this._emit("cursorLeave", event); } }; this.detach = function() { this.session.removeMarker(this.pos && this.pos.markerId); this.hideOtherMarkers(); this.doc.removeEventListener("change", this.$onUpdate); this.session.selection.removeEventListener("changeCursor", this.$onCursorChange); this.session.setUndoSelect(true); this.session = null; }; this.cancel = function() { if (this.$undoStackDepth === -1) return; var undoManager = this.session.getUndoManager(); var undosRequired = (undoManager.$undoStack || undoManager.$undostack).length - this.$undoStackDepth; for (var i = 0; i < undosRequired; i++) { undoManager.undo(true); } if (this.selectionBefore) this.session.selection.fromJSON(this.selectionBefore); }; }).call(PlaceHolder.prototype); exports.PlaceHolder = PlaceHolder; }); define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(require, exports, module) { var event = require("../lib/event"); var useragent = require("../lib/useragent"); function isSamePoint(p1, p2) { return p1.row == p2.row && p1.column == p2.column; } function onMouseDown(e) { var ev = e.domEvent; var alt = ev.altKey; var shift = ev.shiftKey; var ctrl = ev.ctrlKey; var accel = e.getAccelKey(); var button = e.getButton(); if (ctrl && useragent.isMac) button = ev.button; if (e.editor.inMultiSelectMode && button == 2) { e.editor.textInput.onContextMenu(e.domEvent); return; } if (!ctrl && !alt && !accel) { if (button === 0 && e.editor.inMultiSelectMode) e.editor.exitMultiSelectMode(); return; } if (button !== 0) return; var editor = e.editor; var selection = editor.selection; var isMultiSelect = editor.inMultiSelectMode; var pos = e.getDocumentPosition(); var cursor = selection.getCursor(); var inSelection = e.inSelection() || (selection.isEmpty() && isSamePoint(pos, cursor)); var mouseX = e.x, mouseY = e.y; var onMouseSelection = function(e) { mouseX = e.clientX; mouseY = e.clientY; }; var session = editor.session; var screenAnchor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY); var screenCursor = screenAnchor; var selectionMode; if (editor.$mouseHandler.$enableJumpToDef) { if (ctrl && alt || accel && alt) selectionMode = shift ? "block" : "add"; else if (alt && editor.$blockSelectEnabled) selectionMode = "block"; } else { if (accel && !alt) { selectionMode = "add"; if (!isMultiSelect && shift) return; } else if (alt && editor.$blockSelectEnabled) { selectionMode = "block"; } } if (selectionMode && useragent.isMac && ev.ctrlKey) { editor.$mouseHandler.cancelContextMenu(); } if (selectionMode == "add") { if (!isMultiSelect && inSelection) return; // dragging if (!isMultiSelect) { var range = selection.toOrientedRange(); editor.addSelectionMarker(range); } var oldRange = selection.rangeList.rangeAtPoint(pos); editor.$blockScrolling++; editor.inVirtualSelectionMode = true; if (shift) { oldRange = null; range = selection.ranges[0] || range; editor.removeSelectionMarker(range); } editor.once("mouseup", function() { var tmpSel = selection.toOrientedRange(); if (oldRange && tmpSel.isEmpty() && isSamePoint(oldRange.cursor, tmpSel.cursor)) selection.substractPoint(tmpSel.cursor); else { if (shift) { selection.substractPoint(range.cursor); } else if (range) { editor.removeSelectionMarker(range); selection.addRange(range); } selection.addRange(tmpSel); } editor.$blockScrolling--; editor.inVirtualSelectionMode = false; }); } else if (selectionMode == "block") { e.stop(); editor.inVirtualSelectionMode = true; var initialRange; var rectSel = []; var blockSelect = function() { var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY); var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column); if (isSamePoint(screenCursor, newCursor) && isSamePoint(cursor, selection.lead)) return; screenCursor = newCursor; editor.$blockScrolling++; editor.selection.moveToPosition(cursor); editor.renderer.scrollCursorIntoView(); editor.removeSelectionMarkers(rectSel); rectSel = selection.rectangularRangeBlock(screenCursor, screenAnchor); if (editor.$mouseHandler.$clickSelection && rectSel.length == 1 && rectSel[0].isEmpty()) rectSel[0] = editor.$mouseHandler.$clickSelection.clone(); rectSel.forEach(editor.addSelectionMarker, editor); editor.updateSelectionMarkers(); editor.$blockScrolling--; }; editor.$blockScrolling++; if (isMultiSelect && !accel) { selection.toSingleRange(); } else if (!isMultiSelect && accel) { initialRange = selection.toOrientedRange(); editor.addSelectionMarker(initialRange); } if (shift) screenAnchor = session.documentToScreenPosition(selection.lead); else selection.moveToPosition(pos); editor.$blockScrolling--; screenCursor = {row: -1, column: -1}; var onMouseSelectionEnd = function(e) { clearInterval(timerId); editor.removeSelectionMarkers(rectSel); if (!rectSel.length) rectSel = [selection.toOrientedRange()]; editor.$blockScrolling++; if (initialRange) { editor.removeSelectionMarker(initialRange); selection.toSingleRange(initialRange); } for (var i = 0; i < rectSel.length; i++) selection.addRange(rectSel[i]); editor.inVirtualSelectionMode = false; editor.$mouseHandler.$clickSelection = null; editor.$blockScrolling--; }; var onSelectionInterval = blockSelect; event.capture(editor.container, onMouseSelection, onMouseSelectionEnd); var timerId = setInterval(function() {onSelectionInterval();}, 20); return e.preventDefault(); } } exports.onMouseDown = onMouseDown; }); define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"], function(require, exports, module) { exports.defaultCommands = [{ name: "addCursorAbove", exec: function(editor) { editor.selectMoreLines(-1); }, bindKey: {win: "Ctrl-Alt-Up", mac: "Ctrl-Alt-Up"}, scrollIntoView: "cursor", readOnly: true }, { name: "addCursorBelow", exec: function(editor) { editor.selectMoreLines(1); }, bindKey: {win: "Ctrl-Alt-Down", mac: "Ctrl-Alt-Down"}, scrollIntoView: "cursor", readOnly: true }, { name: "addCursorAboveSkipCurrent", exec: function(editor) { editor.selectMoreLines(-1, true); }, bindKey: {win: "Ctrl-Alt-Shift-Up", mac: "Ctrl-Alt-Shift-Up"}, scrollIntoView: "cursor", readOnly: true }, { name: "addCursorBelowSkipCurrent", exec: function(editor) { editor.selectMoreLines(1, true); }, bindKey: {win: "Ctrl-Alt-Shift-Down", mac: "Ctrl-Alt-Shift-Down"}, scrollIntoView: "cursor", readOnly: true }, { name: "selectMoreBefore", exec: function(editor) { editor.selectMore(-1); }, bindKey: {win: "Ctrl-Alt-Left", mac: "Ctrl-Alt-Left"}, scrollIntoView: "cursor", readOnly: true }, { name: "selectMoreAfter", exec: function(editor) { editor.selectMore(1); }, bindKey: {win: "Ctrl-Alt-Right", mac: "Ctrl-Alt-Right"}, scrollIntoView: "cursor", readOnly: true }, { name: "selectNextBefore", exec: function(editor) { editor.selectMore(-1, true); }, bindKey: {win: "Ctrl-Alt-Shift-Left", mac: "Ctrl-Alt-Shift-Left"}, scrollIntoView: "cursor", readOnly: true }, { name: "selectNextAfter", exec: function(editor) { editor.selectMore(1, true); }, bindKey: {win: "Ctrl-Alt-Shift-Right", mac: "Ctrl-Alt-Shift-Right"}, scrollIntoView: "cursor", readOnly: true }, { name: "splitIntoLines", exec: function(editor) { editor.multiSelect.splitIntoLines(); }, bindKey: {win: "Ctrl-Alt-L", mac: "Ctrl-Alt-L"}, readOnly: true }, { name: "alignCursors", exec: function(editor) { editor.alignCursors(); }, bindKey: {win: "Ctrl-Alt-A", mac: "Ctrl-Alt-A"}, scrollIntoView: "cursor" }, { name: "findAll", exec: function(editor) { editor.findAll(); }, bindKey: {win: "Ctrl-Alt-K", mac: "Ctrl-Alt-G"}, scrollIntoView: "cursor", readOnly: true }]; exports.multiSelectCommands = [{ name: "singleSelection", bindKey: "esc", exec: function(editor) { editor.exitMultiSelectMode(); }, scrollIntoView: "cursor", readOnly: true, isAvailable: function(editor) {return editor && editor.inMultiSelectMode} }]; var HashHandler = require("../keyboard/hash_handler").HashHandler; exports.keyboardHandler = new HashHandler(exports.multiSelectCommands); }); define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"], function(require, exports, module) { var RangeList = require("./range_list").RangeList; var Range = require("./range").Range; var Selection = require("./selection").Selection; var onMouseDown = require("./mouse/multi_select_handler").onMouseDown; var event = require("./lib/event"); var lang = require("./lib/lang"); var commands = require("./commands/multi_select_commands"); exports.commands = commands.defaultCommands.concat(commands.multiSelectCommands); var Search = require("./search").Search; var search = new Search(); function find(session, needle, dir) { search.$options.wrap = true; search.$options.needle = needle; search.$options.backwards = dir == -1; return search.find(session); } var EditSession = require("./edit_session").EditSession; (function() { this.getSelectionMarkers = function() { return this.$selectionMarkers; }; }).call(EditSession.prototype); (function() { this.ranges = null; this.rangeList = null; this.addRange = function(range, $blockChangeEvents) { if (!range) return; if (!this.inMultiSelectMode && this.rangeCount === 0) { var oldRange = this.toOrientedRange(); this.rangeList.add(oldRange); this.rangeList.add(range); if (this.rangeList.ranges.length != 2) { this.rangeList.removeAll(); return $blockChangeEvents || this.fromOrientedRange(range); } this.rangeList.removeAll(); this.rangeList.add(oldRange); this.$onAddRange(oldRange); } if (!range.cursor) range.cursor = range.end; var removed = this.rangeList.add(range); this.$onAddRange(range); if (removed.length) this.$onRemoveRange(removed); if (this.rangeCount > 1 && !this.inMultiSelectMode) { this._signal("multiSelect"); this.inMultiSelectMode = true; this.session.$undoSelect = false; this.rangeList.attach(this.session); } return $blockChangeEvents || this.fromOrientedRange(range); }; this.toSingleRange = function(range) { range = range || this.ranges[0]; var removed = this.rangeList.removeAll(); if (removed.length) this.$onRemoveRange(removed); range && this.fromOrientedRange(range); }; this.substractPoint = function(pos) { var removed = this.rangeList.substractPoint(pos); if (removed) { this.$onRemoveRange(removed); return removed[0]; } }; this.mergeOverlappingRanges = function() { var removed = this.rangeList.merge(); if (removed.length) this.$onRemoveRange(removed); else if(this.ranges[0]) this.fromOrientedRange(this.ranges[0]); }; this.$onAddRange = function(range) { this.rangeCount = this.rangeList.ranges.length; this.ranges.unshift(range); this._signal("addRange", {range: range}); }; this.$onRemoveRange = function(removed) { this.rangeCount = this.rangeList.ranges.length; if (this.rangeCount == 1 && this.inMultiSelectMode) { var lastRange = this.rangeList.ranges.pop(); removed.push(lastRange); this.rangeCount = 0; } for (var i = removed.length; i--; ) { var index = this.ranges.indexOf(removed[i]); this.ranges.splice(index, 1); } this._signal("removeRange", {ranges: removed}); if (this.rangeCount === 0 && this.inMultiSelectMode) { this.inMultiSelectMode = false; this._signal("singleSelect"); this.session.$undoSelect = true; this.rangeList.detach(this.session); } lastRange = lastRange || this.ranges[0]; if (lastRange && !lastRange.isEqual(this.getRange())) this.fromOrientedRange(lastRange); }; this.$initRangeList = function() { if (this.rangeList) return; this.rangeList = new RangeList(); this.ranges = []; this.rangeCount = 0; }; this.getAllRanges = function() { return this.rangeCount ? this.rangeList.ranges.concat() : [this.getRange()]; }; this.splitIntoLines = function () { if (this.rangeCount > 1) { var ranges = this.rangeList.ranges; var lastRange = ranges[ranges.length - 1]; var range = Range.fromPoints(ranges[0].start, lastRange.end); this.toSingleRange(); this.setSelectionRange(range, lastRange.cursor == lastRange.start); } else { var range = this.getRange(); var isBackwards = this.isBackwards(); var startRow = range.start.row; var endRow = range.end.row; if (startRow == endRow) { if (isBackwards) var start = range.end, end = range.start; else var start = range.start, end = range.end; this.addRange(Range.fromPoints(end, end)); this.addRange(Range.fromPoints(start, start)); return; } var rectSel = []; var r = this.getLineRange(startRow, true); r.start.column = range.start.column; rectSel.push(r); for (var i = startRow + 1; i < endRow; i++) rectSel.push(this.getLineRange(i, true)); r = this.getLineRange(endRow, true); r.end.column = range.end.column; rectSel.push(r); rectSel.forEach(this.addRange, this); } }; this.toggleBlockSelection = function () { if (this.rangeCount > 1) { var ranges = this.rangeList.ranges; var lastRange = ranges[ranges.length - 1]; var range = Range.fromPoints(ranges[0].start, lastRange.end); this.toSingleRange(); this.setSelectionRange(range, lastRange.cursor == lastRange.start); } else { var cursor = this.session.documentToScreenPosition(this.selectionLead); var anchor = this.session.documentToScreenPosition(this.selectionAnchor); var rectSel = this.rectangularRangeBlock(cursor, anchor); rectSel.forEach(this.addRange, this); } }; this.rectangularRangeBlock = function(screenCursor, screenAnchor, includeEmptyLines) { var rectSel = []; var xBackwards = screenCursor.column < screenAnchor.column; if (xBackwards) { var startColumn = screenCursor.column; var endColumn = screenAnchor.column; } else { var startColumn = screenAnchor.column; var endColumn = screenCursor.column; } var yBackwards = screenCursor.row < screenAnchor.row; if (yBackwards) { var startRow = screenCursor.row; var endRow = screenAnchor.row; } else { var startRow = screenAnchor.row; var endRow = screenCursor.row; } if (startColumn < 0) startColumn = 0; if (startRow < 0) startRow = 0; if (startRow == endRow) includeEmptyLines = true; for (var row = startRow; row <= endRow; row++) { var range = Range.fromPoints( this.session.screenToDocumentPosition(row, startColumn), this.session.screenToDocumentPosition(row, endColumn) ); if (range.isEmpty()) { if (docEnd && isSamePoint(range.end, docEnd)) break; var docEnd = range.end; } range.cursor = xBackwards ? range.start : range.end; rectSel.push(range); } if (yBackwards) rectSel.reverse(); if (!includeEmptyLines) { var end = rectSel.length - 1; while (rectSel[end].isEmpty() && end > 0) end--; if (end > 0) { var start = 0; while (rectSel[start].isEmpty()) start++; } for (var i = end; i >= start; i--) { if (rectSel[i].isEmpty()) rectSel.splice(i, 1); } } return rectSel; }; }).call(Selection.prototype); var Editor = require("./editor").Editor; (function() { this.updateSelectionMarkers = function() { this.renderer.updateCursor(); this.renderer.updateBackMarkers(); }; this.addSelectionMarker = function(orientedRange) { if (!orientedRange.cursor) orientedRange.cursor = orientedRange.end; var style = this.getSelectionStyle(); orientedRange.marker = this.session.addMarker(orientedRange, "ace_selection", style); this.session.$selectionMarkers.push(orientedRange); this.session.selectionMarkerCount = this.session.$selectionMarkers.length; return orientedRange; }; this.removeSelectionMarker = function(range) { if (!range.marker) return; this.session.removeMarker(range.marker); var index = this.session.$selectionMarkers.indexOf(range); if (index != -1) this.session.$selectionMarkers.splice(index, 1); this.session.selectionMarkerCount = this.session.$selectionMarkers.length; }; this.removeSelectionMarkers = function(ranges) { var markerList = this.session.$selectionMarkers; for (var i = ranges.length; i--; ) { var range = ranges[i]; if (!range.marker) continue; this.session.removeMarker(range.marker); var index = markerList.indexOf(range); if (index != -1) markerList.splice(index, 1); } this.session.selectionMarkerCount = markerList.length; }; this.$onAddRange = function(e) { this.addSelectionMarker(e.range); this.renderer.updateCursor(); this.renderer.updateBackMarkers(); }; this.$onRemoveRange = function(e) { this.removeSelectionMarkers(e.ranges); this.renderer.updateCursor(); this.renderer.updateBackMarkers(); }; this.$onMultiSelect = function(e) { if (this.inMultiSelectMode) return; this.inMultiSelectMode = true; this.setStyle("ace_multiselect"); this.keyBinding.addKeyboardHandler(commands.keyboardHandler); this.commands.setDefaultHandler("exec", this.$onMultiSelectExec); this.renderer.updateCursor(); this.renderer.updateBackMarkers(); }; this.$onSingleSelect = function(e) { if (this.session.multiSelect.inVirtualMode) return; this.inMultiSelectMode = false; this.unsetStyle("ace_multiselect"); this.keyBinding.removeKeyboardHandler(commands.keyboardHandler); this.commands.removeDefaultHandler("exec", this.$onMultiSelectExec); this.renderer.updateCursor(); this.renderer.updateBackMarkers(); this._emit("changeSelection"); }; this.$onMultiSelectExec = function(e) { var command = e.command; var editor = e.editor; if (!editor.multiSelect) return; if (!command.multiSelectAction) { var result = command.exec(editor, e.args || {}); editor.multiSelect.addRange(editor.multiSelect.toOrientedRange()); editor.multiSelect.mergeOverlappingRanges(); } else if (command.multiSelectAction == "forEach") { result = editor.forEachSelection(command, e.args); } else if (command.multiSelectAction == "forEachLine") { result = editor.forEachSelection(command, e.args, true); } else if (command.multiSelectAction == "single") { editor.exitMultiSelectMode(); result = command.exec(editor, e.args || {}); } else { result = command.multiSelectAction(editor, e.args || {}); } return result; }; this.forEachSelection = function(cmd, args, options) { if (this.inVirtualSelectionMode) return; var keepOrder = options && options.keepOrder; var $byLines = options == true || options && options.$byLines var session = this.session; var selection = this.selection; var rangeList = selection.rangeList; var ranges = (keepOrder ? selection : rangeList).ranges; var result; if (!ranges.length) return cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {}); var reg = selection._eventRegistry; selection._eventRegistry = {}; var tmpSel = new Selection(session); this.inVirtualSelectionMode = true; for (var i = ranges.length; i--;) { if ($byLines) { while (i > 0 && ranges[i].start.row == ranges[i - 1].end.row) i--; } tmpSel.fromOrientedRange(ranges[i]); tmpSel.index = i; this.selection = session.selection = tmpSel; var cmdResult = cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {}); if (!result && cmdResult !== undefined) result = cmdResult; tmpSel.toOrientedRange(ranges[i]); } tmpSel.detach(); this.selection = session.selection = selection; this.inVirtualSelectionMode = false; selection._eventRegistry = reg; selection.mergeOverlappingRanges(); var anim = this.renderer.$scrollAnimation; this.onCursorChange(); this.onSelectionChange(); if (anim && anim.from == anim.to) this.renderer.animateScrolling(anim.from); return result; }; this.exitMultiSelectMode = function() { if (!this.inMultiSelectMode || this.inVirtualSelectionMode) return; this.multiSelect.toSingleRange(); }; this.getSelectedText = function() { var text = ""; if (this.inMultiSelectMode && !this.inVirtualSelectionMode) { var ranges = this.multiSelect.rangeList.ranges; var buf = []; for (var i = 0; i < ranges.length; i++) { buf.push(this.session.getTextRange(ranges[i])); } var nl = this.session.getDocument().getNewLineCharacter(); text = buf.join(nl); if (text.length == (buf.length - 1) * nl.length) text = ""; } else if (!this.selection.isEmpty()) { text = this.session.getTextRange(this.getSelectionRange()); } return text; }; this.$checkMultiselectChange = function(e, anchor) { if (this.inMultiSelectMode && !this.inVirtualSelectionMode) { var range = this.multiSelect.ranges[0]; if (this.multiSelect.isEmpty() && anchor == this.multiSelect.anchor) return; var pos = anchor == this.multiSelect.anchor ? range.cursor == range.start ? range.end : range.start : range.cursor; if (pos.row != anchor.row || this.session.$clipPositionToDocument(pos.row, pos.column).column != anchor.column) this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()); } }; this.findAll = function(needle, options, additive) { options = options || {}; options.needle = needle || options.needle; if (options.needle == undefined) { var range = this.selection.isEmpty() ? this.selection.getWordRange() : this.selection.getRange(); options.needle = this.session.getTextRange(range); } this.$search.set(options); var ranges = this.$search.findAll(this.session); if (!ranges.length) return 0; this.$blockScrolling += 1; var selection = this.multiSelect; if (!additive) selection.toSingleRange(ranges[0]); for (var i = ranges.length; i--; ) selection.addRange(ranges[i], true); if (range && selection.rangeList.rangeAtPoint(range.start)) selection.addRange(range, true); this.$blockScrolling -= 1; return ranges.length; }; this.selectMoreLines = function(dir, skip) { var range = this.selection.toOrientedRange(); var isBackwards = range.cursor == range.end; var screenLead = this.session.documentToScreenPosition(range.cursor); if (this.selection.$desiredColumn) screenLead.column = this.selection.$desiredColumn; var lead = this.session.screenToDocumentPosition(screenLead.row + dir, screenLead.column); if (!range.isEmpty()) { var screenAnchor = this.session.documentToScreenPosition(isBackwards ? range.end : range.start); var anchor = this.session.screenToDocumentPosition(screenAnchor.row + dir, screenAnchor.column); } else { var anchor = lead; } if (isBackwards) { var newRange = Range.fromPoints(lead, anchor); newRange.cursor = newRange.start; } else { var newRange = Range.fromPoints(anchor, lead); newRange.cursor = newRange.end; } newRange.desiredColumn = screenLead.column; if (!this.selection.inMultiSelectMode) { this.selection.addRange(range); } else { if (skip) var toRemove = range.cursor; } this.selection.addRange(newRange); if (toRemove) this.selection.substractPoint(toRemove); }; this.transposeSelections = function(dir) { var session = this.session; var sel = session.multiSelect; var all = sel.ranges; for (var i = all.length; i--; ) { var range = all[i]; if (range.isEmpty()) { var tmp = session.getWordRange(range.start.row, range.start.column); range.start.row = tmp.start.row; range.start.column = tmp.start.column; range.end.row = tmp.end.row; range.end.column = tmp.end.column; } } sel.mergeOverlappingRanges(); var words = []; for (var i = all.length; i--; ) { var range = all[i]; words.unshift(session.getTextRange(range)); } if (dir < 0) words.unshift(words.pop()); else words.push(words.shift()); for (var i = all.length; i--; ) { var range = all[i]; var tmp = range.clone(); session.replace(range, words[i]); range.start.row = tmp.start.row; range.start.column = tmp.start.column; } }; this.selectMore = function(dir, skip, stopAtFirst) { var session = this.session; var sel = session.multiSelect; var range = sel.toOrientedRange(); if (range.isEmpty()) { range = session.getWordRange(range.start.row, range.start.column); range.cursor = dir == -1 ? range.start : range.end; this.multiSelect.addRange(range); if (stopAtFirst) return; } var needle = session.getTextRange(range); var newRange = find(session, needle, dir); if (newRange) { newRange.cursor = dir == -1 ? newRange.start : newRange.end; this.$blockScrolling += 1; this.session.unfold(newRange); this.multiSelect.addRange(newRange); this.$blockScrolling -= 1; this.renderer.scrollCursorIntoView(null, 0.5); } if (skip) this.multiSelect.substractPoint(range.cursor); }; this.alignCursors = function() { var session = this.session; var sel = session.multiSelect; var ranges = sel.ranges; var row = -1; var sameRowRanges = ranges.filter(function(r) { if (r.cursor.row == row) return true; row = r.cursor.row; }); if (!ranges.length || sameRowRanges.length == ranges.length - 1) { var range = this.selection.getRange(); var fr = range.start.row, lr = range.end.row; var guessRange = fr == lr; if (guessRange) { var max = this.session.getLength(); var line; do { line = this.session.getLine(lr); } while (/[=:]/.test(line) && ++lr < max); do { line = this.session.getLine(fr); } while (/[=:]/.test(line) && --fr > 0); if (fr < 0) fr = 0; if (lr >= max) lr = max - 1; } var lines = this.session.removeFullLines(fr, lr); lines = this.$reAlignText(lines, guessRange); this.session.insert({row: fr, column: 0}, lines.join("\n") + "\n"); if (!guessRange) { range.start.column = 0; range.end.column = lines[lines.length - 1].length; } this.selection.setRange(range); } else { sameRowRanges.forEach(function(r) { sel.substractPoint(r.cursor); }); var maxCol = 0; var minSpace = Infinity; var spaceOffsets = ranges.map(function(r) { var p = r.cursor; var line = session.getLine(p.row); var spaceOffset = line.substr(p.column).search(/\S/g); if (spaceOffset == -1) spaceOffset = 0; if (p.column > maxCol) maxCol = p.column; if (spaceOffset < minSpace) minSpace = spaceOffset; return spaceOffset; }); ranges.forEach(function(r, i) { var p = r.cursor; var l = maxCol - p.column; var d = spaceOffsets[i] - minSpace; if (l > d) session.insert(p, lang.stringRepeat(" ", l - d)); else session.remove(new Range(p.row, p.column, p.row, p.column - l + d)); r.start.column = r.end.column = maxCol; r.start.row = r.end.row = p.row; r.cursor = r.end; }); sel.fromOrientedRange(ranges[0]); this.renderer.updateCursor(); this.renderer.updateBackMarkers(); } }; this.$reAlignText = function(lines, forceLeft) { var isLeftAligned = true, isRightAligned = true; var startW, textW, endW; return lines.map(function(line) { var m = line.match(/(\s*)(.*?)(\s*)([=:].*)/); if (!m) return [line]; if (startW == null) { startW = m[1].length; textW = m[2].length; endW = m[3].length; return m; } if (startW + textW + endW != m[1].length + m[2].length + m[3].length) isRightAligned = false; if (startW != m[1].length) isLeftAligned = false; if (startW > m[1].length) startW = m[1].length; if (textW < m[2].length) textW = m[2].length; if (endW > m[3].length) endW = m[3].length; return m; }).map(forceLeft ? alignLeft : isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign); function spaces(n) { return lang.stringRepeat(" ", n); } function alignLeft(m) { return !m[2] ? m[0] : spaces(startW) + m[2] + spaces(textW - m[2].length + endW) + m[4].replace(/^([=:])\s+/, "$1 "); } function alignRight(m) { return !m[2] ? m[0] : spaces(startW + textW - m[2].length) + m[2] + spaces(endW, " ") + m[4].replace(/^([=:])\s+/, "$1 "); } function unAlign(m) { return !m[2] ? m[0] : spaces(startW) + m[2] + spaces(endW) + m[4].replace(/^([=:])\s+/, "$1 "); } }; }).call(Editor.prototype); function isSamePoint(p1, p2) { return p1.row == p2.row && p1.column == p2.column; } exports.onSessionChange = function(e) { var session = e.session; if (session && !session.multiSelect) { session.$selectionMarkers = []; session.selection.$initRangeList(); session.multiSelect = session.selection; } this.multiSelect = session && session.multiSelect; var oldSession = e.oldSession; if (oldSession) { oldSession.multiSelect.off("addRange", this.$onAddRange); oldSession.multiSelect.off("removeRange", this.$onRemoveRange); oldSession.multiSelect.off("multiSelect", this.$onMultiSelect); oldSession.multiSelect.off("singleSelect", this.$onSingleSelect); oldSession.multiSelect.lead.off("change", this.$checkMultiselectChange); oldSession.multiSelect.anchor.off("change", this.$checkMultiselectChange); } if (session) { session.multiSelect.on("addRange", this.$onAddRange); session.multiSelect.on("removeRange", this.$onRemoveRange); session.multiSelect.on("multiSelect", this.$onMultiSelect); session.multiSelect.on("singleSelect", this.$onSingleSelect); session.multiSelect.lead.on("change", this.$checkMultiselectChange); session.multiSelect.anchor.on("change", this.$checkMultiselectChange); } if (session && this.inMultiSelectMode != session.selection.inMultiSelectMode) { if (session.selection.inMultiSelectMode) this.$onMultiSelect(); else this.$onSingleSelect(); } }; function MultiSelect(editor) { if (editor.$multiselectOnSessionChange) return; editor.$onAddRange = editor.$onAddRange.bind(editor); editor.$onRemoveRange = editor.$onRemoveRange.bind(editor); editor.$onMultiSelect = editor.$onMultiSelect.bind(editor); editor.$onSingleSelect = editor.$onSingleSelect.bind(editor); editor.$multiselectOnSessionChange = exports.onSessionChange.bind(editor); editor.$checkMultiselectChange = editor.$checkMultiselectChange.bind(editor); editor.$multiselectOnSessionChange(editor); editor.on("changeSession", editor.$multiselectOnSessionChange); editor.on("mousedown", onMouseDown); editor.commands.addCommands(commands.defaultCommands); addAltCursorListeners(editor); } function addAltCursorListeners(editor){ var el = editor.textInput.getElement(); var altCursor = false; event.addListener(el, "keydown", function(e) { var altDown = e.keyCode == 18 && !(e.ctrlKey || e.shiftKey || e.metaKey); if (editor.$blockSelectEnabled && altDown) { if (!altCursor) { editor.renderer.setMouseCursor("crosshair"); altCursor = true; } } else if (altCursor) { reset(); } }); event.addListener(el, "keyup", reset); event.addListener(el, "blur", reset); function reset(e) { if (altCursor) { editor.renderer.setMouseCursor(""); altCursor = false; } } } exports.MultiSelect = MultiSelect; require("./config").defineOptions(Editor.prototype, "editor", { enableMultiselect: { set: function(val) { MultiSelect(this); if (val) { this.on("changeSession", this.$multiselectOnSessionChange); this.on("mousedown", onMouseDown); } else { this.off("changeSession", this.$multiselectOnSessionChange); this.off("mousedown", onMouseDown); } }, value: true }, enableBlockSelect: { set: function(val) { this.$blockSelectEnabled = val; }, value: true } }); }); define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../../range").Range; var FoldMode = exports.FoldMode = function() {}; (function() { this.foldingStartMarker = null; this.foldingStopMarker = null; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.foldingStartMarker.test(line)) return "start"; if (foldStyle == "markbeginend" && this.foldingStopMarker && this.foldingStopMarker.test(line)) return "end"; return ""; }; this.getFoldWidgetRange = function(session, foldStyle, row) { return null; }; this.indentationBlock = function(session, row, column) { var re = /\S/; var line = session.getLine(row); var startLevel = line.search(re); if (startLevel == -1) return; var startColumn = column || line.length; var maxRow = session.getLength(); var startRow = row; var endRow = row; while (++row < maxRow) { var level = session.getLine(row).search(re); if (level == -1) continue; if (level <= startLevel) break; endRow = row; } if (endRow > startRow) { var endColumn = session.getLine(endRow).length; return new Range(startRow, startColumn, endRow, endColumn); } }; this.openingBracketBlock = function(session, bracket, row, column, typeRe) { var start = {row: row, column: column + 1}; var end = session.$findClosingBracket(bracket, start, typeRe); if (!end) return; var fw = session.foldWidgets[end.row]; if (fw == null) fw = session.getFoldWidget(end.row); if (fw == "start" && end.row > start.row) { end.row --; end.column = session.getLine(end.row).length; } return Range.fromPoints(start, end); }; this.closingBracketBlock = function(session, bracket, row, column, typeRe) { var end = {row: row, column: column}; var start = session.$findOpeningBracket(bracket, end); if (!start) return; start.column++; end.column--; return Range.fromPoints(start, end); }; }).call(FoldMode.prototype); }); define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) { "use strict"; exports.isDark = false; exports.cssClass = "ace-tm"; exports.cssText = ".ace-tm .ace_gutter {\ background: #f0f0f0;\ color: #333;\ }\ .ace-tm .ace_print-margin {\ width: 1px;\ background: #e8e8e8;\ }\ .ace-tm .ace_fold {\ background-color: #6B72E6;\ }\ .ace-tm {\ background-color: #FFFFFF;\ color: black;\ }\ .ace-tm .ace_cursor {\ color: black;\ }\ .ace-tm .ace_invisible {\ color: rgb(191, 191, 191);\ }\ .ace-tm .ace_storage,\ .ace-tm .ace_keyword {\ color: blue;\ }\ .ace-tm .ace_constant {\ color: rgb(197, 6, 11);\ }\ .ace-tm .ace_constant.ace_buildin {\ color: rgb(88, 72, 246);\ }\ .ace-tm .ace_constant.ace_language {\ color: rgb(88, 92, 246);\ }\ .ace-tm .ace_constant.ace_library {\ color: rgb(6, 150, 14);\ }\ .ace-tm .ace_invalid {\ background-color: rgba(255, 0, 0, 0.1);\ color: red;\ }\ .ace-tm .ace_support.ace_function {\ color: rgb(60, 76, 114);\ }\ .ace-tm .ace_support.ace_constant {\ color: rgb(6, 150, 14);\ }\ .ace-tm .ace_support.ace_type,\ .ace-tm .ace_support.ace_class {\ color: rgb(109, 121, 222);\ }\ .ace-tm .ace_keyword.ace_operator {\ color: rgb(104, 118, 135);\ }\ .ace-tm .ace_string {\ color: rgb(3, 106, 7);\ }\ .ace-tm .ace_comment {\ color: rgb(76, 136, 107);\ }\ .ace-tm .ace_comment.ace_doc {\ color: rgb(0, 102, 255);\ }\ .ace-tm .ace_comment.ace_doc.ace_tag {\ color: rgb(128, 159, 191);\ }\ .ace-tm .ace_constant.ace_numeric {\ color: rgb(0, 0, 205);\ }\ .ace-tm .ace_variable {\ color: rgb(49, 132, 149);\ }\ .ace-tm .ace_xml-pe {\ color: rgb(104, 104, 91);\ }\ .ace-tm .ace_entity.ace_name.ace_function {\ color: #0000A2;\ }\ .ace-tm .ace_heading {\ color: rgb(12, 7, 255);\ }\ .ace-tm .ace_list {\ color:rgb(185, 6, 144);\ }\ .ace-tm .ace_meta.ace_tag {\ color:rgb(0, 22, 142);\ }\ .ace-tm .ace_string.ace_regex {\ color: rgb(255, 0, 0)\ }\ .ace-tm .ace_marker-layer .ace_selection {\ background: rgb(181, 213, 255);\ }\ .ace-tm.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px white;\ }\ .ace-tm .ace_marker-layer .ace_step {\ background: rgb(252, 255, 0);\ }\ .ace-tm .ace_marker-layer .ace_stack {\ background: rgb(164, 229, 101);\ }\ .ace-tm .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid rgb(192, 192, 192);\ }\ .ace-tm .ace_marker-layer .ace_active-line {\ background: rgba(0, 0, 0, 0.07);\ }\ .ace-tm .ace_gutter-active-line {\ background-color : #dcdcdc;\ }\ .ace-tm .ace_marker-layer .ace_selected-word {\ background: rgb(250, 250, 255);\ border: 1px solid rgb(200, 200, 250);\ }\ .ace-tm .ace_indent-guide {\ background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ }\ "; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var dom = require("./lib/dom"); var Range = require("./range").Range; function LineWidgets(session) { this.session = session; this.session.widgetManager = this; this.session.getRowLength = this.getRowLength; this.session.$getWidgetScreenLength = this.$getWidgetScreenLength; this.updateOnChange = this.updateOnChange.bind(this); this.renderWidgets = this.renderWidgets.bind(this); this.measureWidgets = this.measureWidgets.bind(this); this.session._changedWidgets = []; this.$onChangeEditor = this.$onChangeEditor.bind(this); this.session.on("change", this.updateOnChange); this.session.on("changeFold", this.updateOnFold); this.session.on("changeEditor", this.$onChangeEditor); } (function() { this.getRowLength = function(row) { var h; if (this.lineWidgets) h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0; else h = 0; if (!this.$useWrapMode || !this.$wrapData[row]) { return 1 + h; } else { return this.$wrapData[row].length + 1 + h; } }; this.$getWidgetScreenLength = function() { var screenRows = 0; this.lineWidgets.forEach(function(w){ if (w && w.rowCount && !w.hidden) screenRows += w.rowCount; }); return screenRows; }; this.$onChangeEditor = function(e) { this.attach(e.editor); }; this.attach = function(editor) { if (editor && editor.widgetManager && editor.widgetManager != this) editor.widgetManager.detach(); if (this.editor == editor) return; this.detach(); this.editor = editor; if (editor) { editor.widgetManager = this; editor.renderer.on("beforeRender", this.measureWidgets); editor.renderer.on("afterRender", this.renderWidgets); } }; this.detach = function(e) { var editor = this.editor; if (!editor) return; this.editor = null; editor.widgetManager = null; editor.renderer.off("beforeRender", this.measureWidgets); editor.renderer.off("afterRender", this.renderWidgets); var lineWidgets = this.session.lineWidgets; lineWidgets && lineWidgets.forEach(function(w) { if (w && w.el && w.el.parentNode) { w._inDocument = false; w.el.parentNode.removeChild(w.el); } }); }; this.updateOnFold = function(e, session) { var lineWidgets = session.lineWidgets; if (!lineWidgets || !e.action) return; var fold = e.data; var start = fold.start.row; var end = fold.end.row; var hide = e.action == "add"; for (var i = start + 1; i < end; i++) { if (lineWidgets[i]) lineWidgets[i].hidden = hide; } if (lineWidgets[end]) { if (hide) { if (!lineWidgets[start]) lineWidgets[start] = lineWidgets[end]; else lineWidgets[end].hidden = hide; } else { if (lineWidgets[start] == lineWidgets[end]) lineWidgets[start] = undefined; lineWidgets[end].hidden = hide; } } }; this.updateOnChange = function(delta) { var lineWidgets = this.session.lineWidgets; if (!lineWidgets) return; var startRow = delta.start.row; var len = delta.end.row - startRow; if (len === 0) { } else if (delta.action == 'remove') { var removed = lineWidgets.splice(startRow + 1, len); removed.forEach(function(w) { w && this.removeLineWidget(w); }, this); this.$updateRows(); } else { var args = new Array(len); args.unshift(startRow, 0); lineWidgets.splice.apply(lineWidgets, args); this.$updateRows(); } }; this.$updateRows = function() { var lineWidgets = this.session.lineWidgets; if (!lineWidgets) return; var noWidgets = true; lineWidgets.forEach(function(w, i) { if (w) { noWidgets = false; w.row = i; while (w.$oldWidget) { w.$oldWidget.row = i; w = w.$oldWidget; } } }); if (noWidgets) this.session.lineWidgets = null; }; this.addLineWidget = function(w) { if (!this.session.lineWidgets) this.session.lineWidgets = new Array(this.session.getLength()); var old = this.session.lineWidgets[w.row]; if (old) { w.$oldWidget = old; if (old.el && old.el.parentNode) { old.el.parentNode.removeChild(old.el); old._inDocument = false; } } this.session.lineWidgets[w.row] = w; w.session = this.session; var renderer = this.editor.renderer; if (w.html && !w.el) { w.el = dom.createElement("div"); w.el.innerHTML = w.html; } if (w.el) { dom.addCssClass(w.el, "ace_lineWidgetContainer"); w.el.style.position = "absolute"; w.el.style.zIndex = 5; renderer.container.appendChild(w.el); w._inDocument = true; } if (!w.coverGutter) { w.el.style.zIndex = 3; } if (!w.pixelHeight) { w.pixelHeight = w.el.offsetHeight; } if (w.rowCount == null) { w.rowCount = w.pixelHeight / renderer.layerConfig.lineHeight; } var fold = this.session.getFoldAt(w.row, 0); w.$fold = fold; if (fold) { var lineWidgets = this.session.lineWidgets; if (w.row == fold.end.row && !lineWidgets[fold.start.row]) lineWidgets[fold.start.row] = w; else w.hidden = true; } this.session._emit("changeFold", {data:{start:{row: w.row}}}); this.$updateRows(); this.renderWidgets(null, renderer); this.onWidgetChanged(w); return w; }; this.removeLineWidget = function(w) { w._inDocument = false; w.session = null; if (w.el && w.el.parentNode) w.el.parentNode.removeChild(w.el); if (w.editor && w.editor.destroy) try { w.editor.destroy(); } catch(e){} if (this.session.lineWidgets) { var w1 = this.session.lineWidgets[w.row] if (w1 == w) { this.session.lineWidgets[w.row] = w.$oldWidget; if (w.$oldWidget) this.onWidgetChanged(w.$oldWidget); } else { while (w1) { if (w1.$oldWidget == w) { w1.$oldWidget = w.$oldWidget; break; } w1 = w1.$oldWidget; } } } this.session._emit("changeFold", {data:{start:{row: w.row}}}); this.$updateRows(); }; this.getWidgetsAtRow = function(row) { var lineWidgets = this.session.lineWidgets; var w = lineWidgets && lineWidgets[row]; var list = []; while (w) { list.push(w); w = w.$oldWidget; } return list; }; this.onWidgetChanged = function(w) { this.session._changedWidgets.push(w); this.editor && this.editor.renderer.updateFull(); }; this.measureWidgets = function(e, renderer) { var changedWidgets = this.session._changedWidgets; var config = renderer.layerConfig; if (!changedWidgets || !changedWidgets.length) return; var min = Infinity; for (var i = 0; i < changedWidgets.length; i++) { var w = changedWidgets[i]; if (!w || !w.el) continue; if (w.session != this.session) continue; if (!w._inDocument) { if (this.session.lineWidgets[w.row] != w) continue; w._inDocument = true; renderer.container.appendChild(w.el); } w.h = w.el.offsetHeight; if (!w.fixedWidth) { w.w = w.el.offsetWidth; w.screenWidth = Math.ceil(w.w / config.characterWidth); } var rowCount = w.h / config.lineHeight; if (w.coverLine) { rowCount -= this.session.getRowLineCount(w.row); if (rowCount < 0) rowCount = 0; } if (w.rowCount != rowCount) { w.rowCount = rowCount; if (w.row < min) min = w.row; } } if (min != Infinity) { this.session._emit("changeFold", {data:{start:{row: min}}}); this.session.lineWidgetWidth = null; } this.session._changedWidgets = []; }; this.renderWidgets = function(e, renderer) { var config = renderer.layerConfig; var lineWidgets = this.session.lineWidgets; if (!lineWidgets) return; var first = Math.min(this.firstRow, config.firstRow); var last = Math.max(this.lastRow, config.lastRow, lineWidgets.length); while (first > 0 && !lineWidgets[first]) first--; this.firstRow = config.firstRow; this.lastRow = config.lastRow; renderer.$cursorLayer.config = config; for (var i = first; i <= last; i++) { var w = lineWidgets[i]; if (!w || !w.el) continue; if (w.hidden) { w.el.style.top = -100 - (w.pixelHeight || 0) + "px"; continue; } if (!w._inDocument) { w._inDocument = true; renderer.container.appendChild(w.el); } var top = renderer.$cursorLayer.getPixelPosition({row: i, column:0}, true).top; if (!w.coverLine) top += config.lineHeight * this.session.getRowLineCount(w.row); w.el.style.top = top - config.offset + "px"; var left = w.coverGutter ? 0 : renderer.gutterWidth; if (!w.fixedWidth) left -= renderer.scrollLeft; w.el.style.left = left + "px"; if (w.fullWidth && w.screenWidth) { w.el.style.minWidth = config.width + 2 * config.padding + "px"; } if (w.fixedWidth) { w.el.style.right = renderer.scrollBar.getWidth() + "px"; } else { w.el.style.right = ""; } } }; }).call(LineWidgets.prototype); exports.LineWidgets = LineWidgets; }); define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"], function(require, exports, module) { "use strict"; var LineWidgets = require("../line_widgets").LineWidgets; var dom = require("../lib/dom"); var Range = require("../range").Range; function binarySearch(array, needle, comparator) { var first = 0; var last = array.length - 1; while (first <= last) { var mid = (first + last) >> 1; var c = comparator(needle, array[mid]); if (c > 0) first = mid + 1; else if (c < 0) last = mid - 1; else return mid; } return -(first + 1); } function findAnnotations(session, row, dir) { var annotations = session.getAnnotations().sort(Range.comparePoints); if (!annotations.length) return; var i = binarySearch(annotations, {row: row, column: -1}, Range.comparePoints); if (i < 0) i = -i - 1; if (i >= annotations.length) i = dir > 0 ? 0 : annotations.length - 1; else if (i === 0 && dir < 0) i = annotations.length - 1; var annotation = annotations[i]; if (!annotation || !dir) return; if (annotation.row === row) { do { annotation = annotations[i += dir]; } while (annotation && annotation.row === row); if (!annotation) return annotations.slice(); } var matched = []; row = annotation.row; do { matched[dir < 0 ? "unshift" : "push"](annotation); annotation = annotations[i += dir]; } while (annotation && annotation.row == row); return matched.length && matched; } exports.showErrorMarker = function(editor, dir) { var session = editor.session; if (!session.widgetManager) { session.widgetManager = new LineWidgets(session); session.widgetManager.attach(editor); } var pos = editor.getCursorPosition(); var row = pos.row; var oldWidget = session.widgetManager.getWidgetsAtRow(row).filter(function(w) { return w.type == "errorMarker"; })[0]; if (oldWidget) { oldWidget.destroy(); } else { row -= dir; } var annotations = findAnnotations(session, row, dir); var gutterAnno; if (annotations) { var annotation = annotations[0]; pos.column = (annotation.pos && typeof annotation.column != "number" ? annotation.pos.sc : annotation.column) || 0; pos.row = annotation.row; gutterAnno = editor.renderer.$gutterLayer.$annotations[pos.row]; } else if (oldWidget) { return; } else { gutterAnno = { text: ["Looks good!"], className: "ace_ok" }; } editor.session.unfold(pos.row); editor.selection.moveToPosition(pos); var w = { row: pos.row, fixedWidth: true, coverGutter: true, el: dom.createElement("div"), type: "errorMarker" }; var el = w.el.appendChild(dom.createElement("div")); var arrow = w.el.appendChild(dom.createElement("div")); arrow.className = "error_widget_arrow " + gutterAnno.className; var left = editor.renderer.$cursorLayer .getPixelPosition(pos).left; arrow.style.left = left + editor.renderer.gutterWidth - 5 + "px"; w.el.className = "error_widget_wrapper"; el.className = "error_widget " + gutterAnno.className; el.innerHTML = gutterAnno.text.join("
"); el.appendChild(dom.createElement("div")); var kb = function(_, hashId, keyString) { if (hashId === 0 && (keyString === "esc" || keyString === "return")) { w.destroy(); return {command: "null"}; } }; w.destroy = function() { if (editor.$mouseHandler.isMousePressed) return; editor.keyBinding.removeKeyboardHandler(kb); session.widgetManager.removeLineWidget(w); editor.off("changeSelection", w.destroy); editor.off("changeSession", w.destroy); editor.off("mouseup", w.destroy); editor.off("change", w.destroy); }; editor.keyBinding.addKeyboardHandler(kb); editor.on("changeSelection", w.destroy); editor.on("changeSession", w.destroy); editor.on("mouseup", w.destroy); editor.on("change", w.destroy); editor.session.widgetManager.addLineWidget(w); w.el.onmousedown = editor.focus.bind(editor); editor.renderer.scrollCursorIntoView(null, 0.5, {bottom: w.el.offsetHeight}); }; dom.importCssString("\ .error_widget_wrapper {\ background: inherit;\ color: inherit;\ border:none\ }\ .error_widget {\ border-top: solid 2px;\ border-bottom: solid 2px;\ margin: 5px 0;\ padding: 10px 40px;\ white-space: pre-wrap;\ }\ .error_widget.ace_error, .error_widget_arrow.ace_error{\ border-color: #ff5a5a\ }\ .error_widget.ace_warning, .error_widget_arrow.ace_warning{\ border-color: #F1D817\ }\ .error_widget.ace_info, .error_widget_arrow.ace_info{\ border-color: #5a5a5a\ }\ .error_widget.ace_ok, .error_widget_arrow.ace_ok{\ border-color: #5aaa5a\ }\ .error_widget_arrow {\ position: absolute;\ border: solid 5px;\ border-top-color: transparent!important;\ border-right-color: transparent!important;\ border-left-color: transparent!important;\ top: -5px;\ }\ ", ""); }); define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"], function(require, exports, module) { "use strict"; require("./lib/fixoldbrowsers"); var dom = require("./lib/dom"); var event = require("./lib/event"); var Editor = require("./editor").Editor; var EditSession = require("./edit_session").EditSession; var UndoManager = require("./undomanager").UndoManager; var Renderer = require("./virtual_renderer").VirtualRenderer; require("./worker/worker_client"); require("./keyboard/hash_handler"); require("./placeholder"); require("./multi_select"); require("./mode/folding/fold_mode"); require("./theme/textmate"); require("./ext/error_marker"); exports.config = require("./config"); exports.require = require; exports.edit = function(el) { if (typeof(el) == "string") { var _id = el; el = document.getElementById(_id); if (!el) throw new Error("ace.edit can't find div #" + _id); } if (el && el.env && el.env.editor instanceof Editor) return el.env.editor; var value = ""; if (el && /input|textarea/i.test(el.tagName)) { var oldNode = el; value = oldNode.value; el = dom.createElement("pre"); oldNode.parentNode.replaceChild(el, oldNode); } else if (el) { value = dom.getInnerText(el); el.innerHTML = ''; } var doc = exports.createEditSession(value); var editor = new Editor(new Renderer(el)); editor.setSession(doc); var env = { document: doc, editor: editor, onResize: editor.resize.bind(editor, null) }; if (oldNode) env.textarea = oldNode; event.addListener(window, "resize", env.onResize); editor.on("destroy", function() { event.removeListener(window, "resize", env.onResize); env.editor.container.env = null; // prevent memory leak on old ie }); editor.container.env = editor.env = env; return editor; }; exports.createEditSession = function(text, mode) { var doc = new EditSession(text, mode); doc.setUndoManager(new UndoManager()); return doc; } exports.EditSession = EditSession; exports.UndoManager = UndoManager; exports.version = "1.2.2"; }); (function() { window.require(["ace/ace"], function(a) { a && a.config.init(true); if (!window.ace) window.ace = a; for (var key in a) if (a.hasOwnProperty(key)) window.ace[key] = a[key]; }); })(); minify-2.20.37/benchmarks/sample_amazon.html000066400000000000000000016351561464346127300210440ustar00rootroot00000000000000 Amazon.com: Online Shopping for Electronics, Apparel, Computers, Books, DVDs & more
We have recently updated the screen reader optimized website to include headings, landmarks, and new shopping features to improve your experience. Please follow this link or go to www.amazon.com/access.
Black Friday Deals Week in Automotive Black Friday Deals Week in Automotive Corporate Deals Page Holiday Deals in Books Shop Up to 65% Off Shop Up to 65% Off Sales & Deals Learn more nav_sap_plcc_6M_fly_blackbelt Black Friday 2014 Electronics Holiday Gift Guide Grooming Deals Home, Kitchen & Garden Holiday Deals & Gift Guide Gortimer S1 Movies Deals Movies Deals Music Deals Music Deals Video Games Deals Video Games Deals Shop Sports Deals Shop Sports Deals Shop All Deals Shop Sports Deals Toys & Games Black Friday Deals Get Fire phone plus 12 months of Prime for only $0.99 Shop Fire HD 6 Shop Amazon Fire TV Shop Kindle Voyage

Related to Items You've Viewed See more

Wearable Technology See more


Gifts in Tools & Home Improvement See more

Gift Ideas in Beauty, Grooming & Health See more


Gift Ideas from the Home Gift Guide See more

More Items to Consider See more


Included with Prime Membership at No Additional Cost See more

Your Recently Viewed Items and Featured Recommendations 
 

minify-2.20.37/benchmarks/sample_antd.js000066400000000000000000314031541464346127300201470ustar00rootroot00000000000000/*! * * antd v4.16.1 * * Copyright 2015-present, Alipay, Inc. * All rights reserved. * */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("moment"), require("react"), require("react-dom")); else if(typeof define === 'function' && define.amd) define(["moment", "react", "react-dom"], factory); else if(typeof exports === 'object') exports["antd"] = factory(require("moment"), require("react"), require("react-dom")); else root["antd"] = factory(root["moment"], root["React"], root["ReactDOM"]); })(window, function(__WEBPACK_EXTERNAL_MODULE_moment__, __WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 0); /******/ }) /************************************************************************/ /******/ ({ /***/ "./components sync recursive ^\\.\\/[^_][\\w-]+\\/style\\/index\\.tsx?$": /*!**************************************************************!*\ !*** ./components sync ^\.\/[^_][\w-]+\/style\/index\.tsx?$ ***! \**************************************************************/ /*! no static exports found */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { var map = { "./affix/style/index.tsx": "./components/affix/style/index.tsx", "./alert/style/index.tsx": "./components/alert/style/index.tsx", "./anchor/style/index.tsx": "./components/anchor/style/index.tsx", "./auto-complete/style/index.tsx": "./components/auto-complete/style/index.tsx", "./avatar/style/index.tsx": "./components/avatar/style/index.tsx", "./back-top/style/index.tsx": "./components/back-top/style/index.tsx", "./badge/style/index.tsx": "./components/badge/style/index.tsx", "./breadcrumb/style/index.tsx": "./components/breadcrumb/style/index.tsx", "./button/style/index.tsx": "./components/button/style/index.tsx", "./calendar/style/index.tsx": "./components/calendar/style/index.tsx", "./card/style/index.tsx": "./components/card/style/index.tsx", "./carousel/style/index.tsx": "./components/carousel/style/index.tsx", "./cascader/style/index.tsx": "./components/cascader/style/index.tsx", "./checkbox/style/index.tsx": "./components/checkbox/style/index.tsx", "./col/style/index.tsx": "./components/col/style/index.tsx", "./collapse/style/index.tsx": "./components/collapse/style/index.tsx", "./comment/style/index.tsx": "./components/comment/style/index.tsx", "./config-provider/style/index.tsx": "./components/config-provider/style/index.tsx", "./date-picker/style/index.tsx": "./components/date-picker/style/index.tsx", "./descriptions/style/index.tsx": "./components/descriptions/style/index.tsx", "./divider/style/index.tsx": "./components/divider/style/index.tsx", "./drawer/style/index.tsx": "./components/drawer/style/index.tsx", "./dropdown/style/index.tsx": "./components/dropdown/style/index.tsx", "./empty/style/index.tsx": "./components/empty/style/index.tsx", "./form/style/index.tsx": "./components/form/style/index.tsx", "./grid/style/index.tsx": "./components/grid/style/index.tsx", "./icon/style/index.tsx": "./components/icon/style/index.tsx", "./image/style/index.tsx": "./components/image/style/index.tsx", "./input-number/style/index.tsx": "./components/input-number/style/index.tsx", "./input/style/index.tsx": "./components/input/style/index.tsx", "./layout/style/index.tsx": "./components/layout/style/index.tsx", "./list/style/index.tsx": "./components/list/style/index.tsx", "./locale-provider/style/index.tsx": "./components/locale-provider/style/index.tsx", "./mentions/style/index.tsx": "./components/mentions/style/index.tsx", "./menu/style/index.tsx": "./components/menu/style/index.tsx", "./message/style/index.tsx": "./components/message/style/index.tsx", "./modal/style/index.tsx": "./components/modal/style/index.tsx", "./notification/style/index.tsx": "./components/notification/style/index.tsx", "./page-header/style/index.tsx": "./components/page-header/style/index.tsx", "./pagination/style/index.tsx": "./components/pagination/style/index.tsx", "./popconfirm/style/index.tsx": "./components/popconfirm/style/index.tsx", "./popover/style/index.tsx": "./components/popover/style/index.tsx", "./progress/style/index.tsx": "./components/progress/style/index.tsx", "./radio/style/index.tsx": "./components/radio/style/index.tsx", "./rate/style/index.tsx": "./components/rate/style/index.tsx", "./result/style/index.tsx": "./components/result/style/index.tsx", "./row/style/index.tsx": "./components/row/style/index.tsx", "./select/style/index.tsx": "./components/select/style/index.tsx", "./skeleton/style/index.tsx": "./components/skeleton/style/index.tsx", "./slider/style/index.tsx": "./components/slider/style/index.tsx", "./space/style/index.tsx": "./components/space/style/index.tsx", "./spin/style/index.tsx": "./components/spin/style/index.tsx", "./statistic/style/index.tsx": "./components/statistic/style/index.tsx", "./steps/style/index.tsx": "./components/steps/style/index.tsx", "./switch/style/index.tsx": "./components/switch/style/index.tsx", "./table/style/index.tsx": "./components/table/style/index.tsx", "./tabs/style/index.tsx": "./components/tabs/style/index.tsx", "./tag/style/index.tsx": "./components/tag/style/index.tsx", "./time-picker/style/index.tsx": "./components/time-picker/style/index.tsx", "./timeline/style/index.tsx": "./components/timeline/style/index.tsx", "./tooltip/style/index.tsx": "./components/tooltip/style/index.tsx", "./transfer/style/index.tsx": "./components/transfer/style/index.tsx", "./tree-select/style/index.tsx": "./components/tree-select/style/index.tsx", "./tree/style/index.tsx": "./components/tree/style/index.tsx", "./typography/style/index.tsx": "./components/typography/style/index.tsx", "./upload/style/index.tsx": "./components/upload/style/index.tsx", "./version/style/index.tsx": "./components/version/style/index.tsx" }; function webpackContext(req) { var id = webpackContextResolve(req); return __webpack_require__(id); } function webpackContextResolve(req) { if(!__webpack_require__.o(map, req)) { var e = new Error("Cannot find module '" + req + "'"); e.code = 'MODULE_NOT_FOUND'; throw e; } return map[req]; } webpackContext.keys = function webpackContextKeys() { return Object.keys(map); }; webpackContext.resolve = webpackContextResolve; module.exports = webpackContext; webpackContext.id = "./components sync recursive ^\\.\\/[^_][\\w-]+\\/style\\/index\\.tsx?$"; /***/ }), /***/ "./components/_util/colors.ts": /*!************************************!*\ !*** ./components/_util/colors.ts ***! \************************************/ /*! exports provided: PresetStatusColorTypes, PresetColorTypes */ /*! exports used: PresetColorTypes, PresetStatusColorTypes */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return PresetStatusColorTypes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PresetColorTypes; }); /* harmony import */ var _type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./type */ "./components/_util/type.ts"); var PresetStatusColorTypes = Object(_type__WEBPACK_IMPORTED_MODULE_0__[/* tuple */ "a"])('success', 'processing', 'error', 'default', 'warning'); // eslint-disable-next-line import/prefer-default-export var PresetColorTypes = Object(_type__WEBPACK_IMPORTED_MODULE_0__[/* tuple */ "a"])('pink', 'red', 'yellow', 'orange', 'cyan', 'green', 'blue', 'purple', 'geekblue', 'magenta', 'volcano', 'gold', 'lime'); /***/ }), /***/ "./components/_util/devWarning.ts": /*!****************************************!*\ !*** ./components/_util/devWarning.ts ***! \****************************************/ /*! exports provided: resetWarned, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var rc_util_es_warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/warning */ "./node_modules/rc-util/es/warning.js"); /* harmony default export */ __webpack_exports__["a"] = (function (valid, component, message) { if (true) Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(valid, "[antd: ".concat(component, "] ").concat(message)); }); /***/ }), /***/ "./components/_util/easings.ts": /*!*************************************!*\ !*** ./components/_util/easings.ts ***! \*************************************/ /*! exports provided: easeInOutCubic */ /*! exports used: easeInOutCubic */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return easeInOutCubic; }); // eslint-disable-next-line import/prefer-default-export function easeInOutCubic(t, b, c, d) { var cc = c - b; t /= d / 2; if (t < 1) { return cc / 2 * t * t * t + b; } // eslint-disable-next-line no-return-assign return cc / 2 * ((t -= 2) * t * t + 2) + b; } /***/ }), /***/ "./components/_util/getDataOrAriaProps.ts": /*!************************************************!*\ !*** ./components/_util/getDataOrAriaProps.ts ***! \************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getDataOrAriaProps; }); function getDataOrAriaProps(props) { return Object.keys(props).reduce(function (prev, key) { if ((key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') && key.substr(0, 7) !== 'data-__') { prev[key] = props[key]; } return prev; }, {}); } /***/ }), /***/ "./components/_util/getRenderPropValue.ts": /*!************************************************!*\ !*** ./components/_util/getRenderPropValue.ts ***! \************************************************/ /*! exports provided: getRenderPropValue */ /*! exports used: getRenderPropValue */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getRenderPropValue; }); var getRenderPropValue = function getRenderPropValue(propValue) { if (!propValue) { return null; } var isRenderFunction = typeof propValue === 'function'; if (isRenderFunction) { return propValue(); } return propValue; }; /***/ }), /***/ "./components/_util/getScroll.tsx": /*!****************************************!*\ !*** ./components/_util/getScroll.tsx ***! \****************************************/ /*! exports provided: isWindow, default */ /*! exports used: default, isWindow */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isWindow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getScroll; }); function isWindow(obj) { return obj !== null && obj !== undefined && obj === obj.window; } function getScroll(target, top) { var _a; if (typeof window === 'undefined') { return 0; } var method = top ? 'scrollTop' : 'scrollLeft'; var result = 0; if (isWindow(target)) { result = target[top ? 'pageYOffset' : 'pageXOffset']; } else if (target instanceof Document) { result = target.documentElement[method]; } else if (target) { result = target[method]; } if (target && !isWindow(target) && typeof result !== 'number') { result = (_a = (target.ownerDocument || target).documentElement) === null || _a === void 0 ? void 0 : _a[method]; } return result; } /***/ }), /***/ "./components/_util/hooks/useFlexGapSupport.ts": /*!*****************************************************!*\ !*** ./components/_util/hooks/useFlexGapSupport.ts ***! \*****************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _styleChecker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../styleChecker */ "./components/_util/styleChecker.tsx"); /* harmony default export */ __webpack_exports__["a"] = (function () { var _React$useState = react__WEBPACK_IMPORTED_MODULE_1__["useState"](false), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_React$useState, 2), flexible = _React$useState2[0], setFlexible = _React$useState2[1]; react__WEBPACK_IMPORTED_MODULE_1__["useEffect"](function () { setFlexible(Object(_styleChecker__WEBPACK_IMPORTED_MODULE_2__[/* detectFlexGapSupported */ "b"])()); }, []); return flexible; }); /***/ }), /***/ "./components/_util/hooks/useForceUpdate.ts": /*!**************************************************!*\ !*** ./components/_util/hooks/useForceUpdate.ts ***! \**************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useForceUpdate; }); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); function useForceUpdate() { var _React$useReducer = react__WEBPACK_IMPORTED_MODULE_1__["useReducer"](function (x) { return x + 1; }, 0), _React$useReducer2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_React$useReducer, 2), forceUpdate = _React$useReducer2[1]; return forceUpdate; } /***/ }), /***/ "./components/_util/hooks/usePatchElement.tsx": /*!****************************************************!*\ !*** ./components/_util/hooks/usePatchElement.tsx ***! \****************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return usePatchElement; }); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); function usePatchElement() { var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"]([]), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_React$useState, 2), elements = _React$useState2[0], setElements = _React$useState2[1]; var patchElement = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function (element) { // append a new element to elements (and create a new ref) setElements(function (originElements) { return [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(originElements), [element]); }); // return a function that removes the new element out of elements (and create a new ref) // it works a little like useEffect return function () { setElements(function (originElements) { return originElements.filter(function (ele) { return ele !== element; }); }); }; }, []); return [elements, patchElement]; } /***/ }), /***/ "./components/_util/hooks/useSyncState.ts": /*!************************************************!*\ !*** ./components/_util/hooks/useSyncState.ts ***! \************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useSyncState; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _useForceUpdate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./useForceUpdate */ "./components/_util/hooks/useForceUpdate.ts"); function useSyncState(initialValue) { var ref = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](initialValue); var forceUpdate = Object(_useForceUpdate__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(); return [function () { return ref.current; }, function (newValue) { ref.current = newValue; // re-render forceUpdate(); }]; } /***/ }), /***/ "./components/_util/isNumeric.ts": /*!***************************************!*\ !*** ./components/_util/isNumeric.ts ***! \***************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; var isNumeric = function isNumeric(value) { return !isNaN(parseFloat(value)) && isFinite(value); }; /* harmony default export */ __webpack_exports__["a"] = (isNumeric); /***/ }), /***/ "./components/_util/motion.tsx": /*!*************************************!*\ !*** ./components/_util/motion.tsx ***! \*************************************/ /*! exports provided: getTransitionName, default */ /*! exports used: default, getTransitionName */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getTransitionName; }); // ================== Collapse Motion ================== var getCollapsedHeight = function getCollapsedHeight() { return { height: 0, opacity: 0 }; }; var getRealHeight = function getRealHeight(node) { return { height: node.scrollHeight, opacity: 1 }; }; var getCurrentHeight = function getCurrentHeight(node) { return { height: node.offsetHeight }; }; var skipOpacityTransition = function skipOpacityTransition(_, event) { return (event === null || event === void 0 ? void 0 : event.deadline) === true || event.propertyName === 'height'; }; var collapseMotion = { motionName: 'ant-motion-collapse', onAppearStart: getCollapsedHeight, onEnterStart: getCollapsedHeight, onAppearActive: getRealHeight, onEnterActive: getRealHeight, onLeaveStart: getCurrentHeight, onLeaveActive: getCollapsedHeight, onAppearEnd: skipOpacityTransition, onEnterEnd: skipOpacityTransition, onLeaveEnd: skipOpacityTransition, motionDeadline: 500 }; var getTransitionName = function getTransitionName(rootPrefixCls, motion, transitionName) { if (transitionName !== undefined) { return transitionName; } return "".concat(rootPrefixCls, "-").concat(motion); }; /* harmony default export */ __webpack_exports__["a"] = (collapseMotion); /***/ }), /***/ "./components/_util/raf.ts": /*!*********************************!*\ !*** ./components/_util/raf.ts ***! \*********************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return wrapperRaf; }); /* harmony import */ var rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/raf */ "./node_modules/rc-util/es/raf.js"); var id = 0; var ids = {}; // Support call raf with delay specified frame function wrapperRaf(callback) { var delayFrames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; var myId = id++; var restFrames = delayFrames; function internalCallback() { restFrames -= 1; if (restFrames <= 0) { callback(); delete ids[myId]; } else { ids[myId] = Object(rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(internalCallback); } } ids[myId] = Object(rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(internalCallback); return myId; } wrapperRaf.cancel = function cancel(pid) { if (pid === undefined) return; rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].cancel(ids[pid]); delete ids[pid]; }; wrapperRaf.ids = ids; // export this for test usage /***/ }), /***/ "./components/_util/reactNode.ts": /*!***************************************!*\ !*** ./components/_util/reactNode.ts ***! \***************************************/ /*! exports provided: isValidElement, replaceElement, cloneElement */ /*! exports used: cloneElement, isValidElement, replaceElement */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isValidElement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return replaceElement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return cloneElement; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var isValidElement = react__WEBPACK_IMPORTED_MODULE_0__["isValidElement"]; function replaceElement(element, replacement, props) { if (!isValidElement(element)) return replacement; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["cloneElement"](element, typeof props === 'function' ? props(element.props || {}) : props); } function cloneElement(element, props) { return replaceElement(element, element, props); } /***/ }), /***/ "./components/_util/responsiveObserve.ts": /*!***********************************************!*\ !*** ./components/_util/responsiveObserve.ts ***! \***********************************************/ /*! exports provided: responsiveArray, responsiveMap, default */ /*! exports used: default, responsiveArray */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return responsiveArray; }); /* unused harmony export responsiveMap */ /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); var responsiveArray = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs']; var responsiveMap = { xs: '(max-width: 575px)', sm: '(min-width: 576px)', md: '(min-width: 768px)', lg: '(min-width: 992px)', xl: '(min-width: 1200px)', xxl: '(min-width: 1600px)' }; var subscribers = new Map(); var subUid = -1; var screens = {}; var responsiveObserve = { matchHandlers: {}, dispatch: function dispatch(pointMap) { screens = pointMap; subscribers.forEach(function (func) { return func(screens); }); return subscribers.size >= 1; }, subscribe: function subscribe(func) { if (!subscribers.size) this.register(); subUid += 1; subscribers.set(subUid, func); func(screens); return subUid; }, unsubscribe: function unsubscribe(token) { subscribers["delete"](token); if (!subscribers.size) this.unregister(); }, unregister: function unregister() { var _this = this; Object.keys(responsiveMap).forEach(function (screen) { var matchMediaQuery = responsiveMap[screen]; var handler = _this.matchHandlers[matchMediaQuery]; handler === null || handler === void 0 ? void 0 : handler.mql.removeListener(handler === null || handler === void 0 ? void 0 : handler.listener); }); subscribers.clear(); }, register: function register() { var _this2 = this; Object.keys(responsiveMap).forEach(function (screen) { var matchMediaQuery = responsiveMap[screen]; var listener = function listener(_ref) { var matches = _ref.matches; _this2.dispatch(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, screens), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, screen, matches))); }; var mql = window.matchMedia(matchMediaQuery); mql.addListener(listener); _this2.matchHandlers[matchMediaQuery] = { mql: mql, listener: listener }; listener(mql); }); } }; /* harmony default export */ __webpack_exports__["a"] = (responsiveObserve); /***/ }), /***/ "./components/_util/scrollTo.ts": /*!**************************************!*\ !*** ./components/_util/scrollTo.ts ***! \**************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return scrollTo; }); /* harmony import */ var rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/raf */ "./node_modules/rc-util/es/raf.js"); /* harmony import */ var _getScroll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getScroll */ "./components/_util/getScroll.tsx"); /* harmony import */ var _easings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./easings */ "./components/_util/easings.ts"); function scrollTo(y) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var _options$getContainer = options.getContainer, getContainer = _options$getContainer === void 0 ? function () { return window; } : _options$getContainer, callback = options.callback, _options$duration = options.duration, duration = _options$duration === void 0 ? 450 : _options$duration; var container = getContainer(); var scrollTop = Object(_getScroll__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(container, true); var startTime = Date.now(); var frameFunc = function frameFunc() { var timestamp = Date.now(); var time = timestamp - startTime; var nextScrollTop = Object(_easings__WEBPACK_IMPORTED_MODULE_2__[/* easeInOutCubic */ "a"])(time > duration ? duration : time, scrollTop, y, duration); if (Object(_getScroll__WEBPACK_IMPORTED_MODULE_1__[/* isWindow */ "b"])(container)) { container.scrollTo(window.pageXOffset, nextScrollTop); } else if (container instanceof HTMLDocument || container.constructor.name === 'HTMLDocument') { container.documentElement.scrollTop = nextScrollTop; } else { container.scrollTop = nextScrollTop; } if (time < duration) { Object(rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(frameFunc); } else if (typeof callback === 'function') { callback(); } }; Object(rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(frameFunc); } /***/ }), /***/ "./components/_util/styleChecker.tsx": /*!*******************************************!*\ !*** ./components/_util/styleChecker.tsx ***! \*******************************************/ /*! exports provided: canUseDocElement, isStyleSupport, detectFlexGapSupported */ /*! exports used: canUseDocElement, detectFlexGapSupported, isStyleSupport */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return canUseDocElement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isStyleSupport; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return detectFlexGapSupported; }); /* harmony import */ var rc_util_es_Dom_canUseDom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/Dom/canUseDom */ "./node_modules/rc-util/es/Dom/canUseDom.js"); var canUseDocElement = function canUseDocElement() { return Object(rc_util_es_Dom_canUseDom__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])() && window.document.documentElement; }; var isStyleSupport = function isStyleSupport(styleName) { if (canUseDocElement()) { var styleNameList = Array.isArray(styleName) ? styleName : [styleName]; var documentElement = window.document.documentElement; return styleNameList.some(function (name) { return name in documentElement.style; }); } return false; }; var flexGapSupported; var detectFlexGapSupported = function detectFlexGapSupported() { if (!canUseDocElement()) { return false; } if (flexGapSupported !== undefined) { return flexGapSupported; } // create flex container with row-gap set var flex = document.createElement('div'); flex.style.display = 'flex'; flex.style.flexDirection = 'column'; flex.style.rowGap = '1px'; // create two, elements inside it flex.appendChild(document.createElement('div')); flex.appendChild(document.createElement('div')); // append to the DOM (needed to obtain scrollHeight) document.body.appendChild(flex); flexGapSupported = flex.scrollHeight === 1; // flex container should be 1px high from the row-gap document.body.removeChild(flex); return flexGapSupported; }; /***/ }), /***/ "./components/_util/throttleByAnimationFrame.tsx": /*!*******************************************************!*\ !*** ./components/_util/throttleByAnimationFrame.tsx ***! \*******************************************************/ /*! exports provided: throttleByAnimationFrame, throttleByAnimationFrameDecorator */ /*! exports used: throttleByAnimationFrame, throttleByAnimationFrameDecorator */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return throttleByAnimationFrame; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return throttleByAnimationFrameDecorator; }); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var rc_util_es_raf__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/raf */ "./node_modules/rc-util/es/raf.js"); function throttleByAnimationFrame(fn) { var requestId; var later = function later(args) { return function () { requestId = null; fn.apply(void 0, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(args)); }; }; var throttled = function throttled() { if (requestId == null) { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } requestId = Object(rc_util_es_raf__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(later(args)); } }; throttled.cancel = function () { return rc_util_es_raf__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].cancel(requestId); }; return throttled; } function throttleByAnimationFrameDecorator() { return function throttle(target, key, descriptor) { var fn = descriptor.value; var definingProperty = false; return { configurable: true, get: function get() { // In IE11 calling Object.defineProperty has a side-effect of evaluating the // getter for the property which is being replaced. This causes infinite // recursion and an "Out of stack space" error. // eslint-disable-next-line no-prototype-builtins if (definingProperty || this === target.prototype || this.hasOwnProperty(key)) { /* istanbul ignore next */ return fn; } var boundFn = throttleByAnimationFrame(fn.bind(this)); definingProperty = true; Object.defineProperty(this, key, { value: boundFn, configurable: true, writable: true }); definingProperty = false; return boundFn; } }; }; } /***/ }), /***/ "./components/_util/transButton.tsx": /*!******************************************!*\ !*** ./components/_util/transButton.tsx ***! \******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-util/es/KeyCode */ "./node_modules/rc-util/es/KeyCode.js"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; /** * Wrap of sub component which need use as Button capacity (like Icon component). * * This helps accessibility reader to tread as a interactive button to operation. */ var inlineStyle = { border: 0, background: 'transparent', padding: 0, lineHeight: 'inherit', display: 'inline-block' }; var TransButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["forwardRef"](function (props, ref) { var onKeyDown = function onKeyDown(event) { var keyCode = event.keyCode; if (keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].ENTER) { event.preventDefault(); } }; var onKeyUp = function onKeyUp(event) { var keyCode = event.keyCode; var onClick = props.onClick; if (keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].ENTER && onClick) { onClick(); } }; var style = props.style, noStyle = props.noStyle, disabled = props.disabled, restProps = __rest(props, ["style", "noStyle", "disabled"]); var mergedStyle = {}; if (!noStyle) { mergedStyle = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, inlineStyle); } if (disabled) { mergedStyle.pointerEvents = 'none'; } mergedStyle = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, mergedStyle), style); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ role: "button", tabIndex: 0, ref: ref }, restProps, { onKeyDown: onKeyDown, onKeyUp: onKeyUp, style: mergedStyle })); }); /* harmony default export */ __webpack_exports__["a"] = (TransButton); /***/ }), /***/ "./components/_util/type.ts": /*!**********************************!*\ !*** ./components/_util/type.ts ***! \**********************************/ /*! exports provided: tuple, tupleNum */ /*! exports used: tuple, tupleNum */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return tuple; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return tupleNum; }); // https://stackoverflow.com/questions/46176165/ways-to-get-string-literal-type-of-array-values-without-enum-overhead var tuple = function tuple() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return args; }; var tupleNum = function tupleNum() { for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } return args; }; /***/ }), /***/ "./components/_util/unreachableException.ts": /*!**************************************************!*\ !*** ./components/_util/unreachableException.ts ***! \**************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return UnreachableException; }); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); var UnreachableException = function UnreachableException(value) { Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, UnreachableException); return new Error("unreachable case: ".concat(JSON.stringify(value))); }; /***/ }), /***/ "./components/_util/wave.tsx": /*!***********************************!*\ !*** ./components/_util/wave.tsx ***! \***********************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Wave; }); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var rc_util_es_Dom_dynamicCSS__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/Dom/dynamicCSS */ "./node_modules/rc-util/es/Dom/dynamicCSS.js"); /* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-util/es/ref */ "./node_modules/rc-util/es/ref.js"); /* harmony import */ var _raf__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./raf */ "./components/_util/raf.ts"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _reactNode__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./reactNode */ "./components/_util/reactNode.ts"); var styleForPseudo; // Where el is the DOM element you'd like to test for visibility function isHidden(element) { if (false) {} return !element || element.offsetParent === null || element.hidden; } function isNotGrey(color) { // eslint-disable-next-line no-useless-escape var match = (color || '').match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/); if (match && match[1] && match[2] && match[3]) { return !(match[1] === match[2] && match[2] === match[3]); } return true; } var Wave = /*#__PURE__*/function (_React$Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Wave, _React$Component); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Wave); function Wave() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, Wave); _this = _super.apply(this, arguments); _this.containerRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createRef"](); _this.animationStart = false; _this.destroyed = false; _this.onClick = function (node, waveColor) { var _a, _b; if (!node || isHidden(node) || node.className.indexOf('-leave') >= 0) { return; } var insertExtraNode = _this.props.insertExtraNode; _this.extraNode = document.createElement('div'); var _assertThisInitialize = Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_this), extraNode = _assertThisInitialize.extraNode; var getPrefixCls = _this.context.getPrefixCls; extraNode.className = "".concat(getPrefixCls(''), "-click-animating-node"); var attributeName = _this.getAttributeName(); node.setAttribute(attributeName, 'true'); // Not white or transparent or grey if (waveColor && waveColor !== '#ffffff' && waveColor !== 'rgb(255, 255, 255)' && isNotGrey(waveColor) && !/rgba\((?:\d*, ){3}0\)/.test(waveColor) && // any transparent rgba color waveColor !== 'transparent') { extraNode.style.borderColor = waveColor; var nodeRoot = ((_a = node.getRootNode) === null || _a === void 0 ? void 0 : _a.call(node)) || node.ownerDocument; var nodeBody = nodeRoot instanceof Document ? nodeRoot.body : (_b = nodeRoot.firstChild) !== null && _b !== void 0 ? _b : nodeRoot; styleForPseudo = Object(rc_util_es_Dom_dynamicCSS__WEBPACK_IMPORTED_MODULE_6__[/* updateCSS */ "a"])("\n [".concat(getPrefixCls(''), "-click-animating-without-extra-node='true']::after, .").concat(getPrefixCls(''), "-click-animating-node {\n --antd-wave-shadow-color: ").concat(waveColor, ";\n }"), 'antd-wave', { csp: _this.csp, attachTo: nodeBody }); } if (insertExtraNode) { node.appendChild(extraNode); } ['transition', 'animation'].forEach(function (name) { node.addEventListener("".concat(name, "start"), _this.onTransitionStart); node.addEventListener("".concat(name, "end"), _this.onTransitionEnd); }); }; _this.onTransitionStart = function (e) { if (_this.destroyed) { return; } var node = _this.containerRef.current; if (!e || e.target !== node || _this.animationStart) { return; } _this.resetEffect(node); }; _this.onTransitionEnd = function (e) { if (!e || e.animationName !== 'fadeEffect') { return; } _this.resetEffect(e.target); }; _this.bindAnimationEvent = function (node) { if (!node || !node.getAttribute || node.getAttribute('disabled') || node.className.indexOf('disabled') >= 0) { return; } var onClick = function onClick(e) { // Fix radio button click twice if (e.target.tagName === 'INPUT' || isHidden(e.target)) { return; } _this.resetEffect(node); // Get wave color from target var waveColor = getComputedStyle(node).getPropertyValue('border-top-color') || // Firefox Compatible getComputedStyle(node).getPropertyValue('border-color') || getComputedStyle(node).getPropertyValue('background-color'); _this.clickWaveTimeoutId = window.setTimeout(function () { return _this.onClick(node, waveColor); }, 0); _raf__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].cancel(_this.animationStartId); _this.animationStart = true; // Render to trigger transition event cost 3 frames. Let's delay 10 frames to reset this. _this.animationStartId = Object(_raf__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(function () { _this.animationStart = false; }, 10); }; node.addEventListener('click', onClick, true); return { cancel: function cancel() { node.removeEventListener('click', onClick, true); } }; }; _this.renderWave = function (_ref) { var csp = _ref.csp; var children = _this.props.children; _this.csp = csp; if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["isValidElement"](children)) return children; var ref = _this.containerRef; if (Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_7__[/* supportRef */ "c"])(children)) { ref = Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_7__[/* composeRef */ "a"])(children.ref, _this.containerRef); } return Object(_reactNode__WEBPACK_IMPORTED_MODULE_10__[/* cloneElement */ "a"])(children, { ref: ref }); }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Wave, [{ key: "componentDidMount", value: function componentDidMount() { var node = this.containerRef.current; if (!node || node.nodeType !== 1) { return; } this.instance = this.bindAnimationEvent(node); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (this.instance) { this.instance.cancel(); } if (this.clickWaveTimeoutId) { clearTimeout(this.clickWaveTimeoutId); } this.destroyed = true; } }, { key: "getAttributeName", value: function getAttributeName() { var getPrefixCls = this.context.getPrefixCls; var insertExtraNode = this.props.insertExtraNode; return insertExtraNode ? "".concat(getPrefixCls(''), "-click-animating") : "".concat(getPrefixCls(''), "-click-animating-without-extra-node"); } }, { key: "resetEffect", value: function resetEffect(node) { var _this2 = this; if (!node || node === this.extraNode || !(node instanceof Element)) { return; } var insertExtraNode = this.props.insertExtraNode; var attributeName = this.getAttributeName(); node.setAttribute(attributeName, 'false'); // edge has bug on `removeAttribute` #14466 if (styleForPseudo) { styleForPseudo.innerHTML = ''; } if (insertExtraNode && this.extraNode && node.contains(this.extraNode)) { node.removeChild(this.extraNode); } ['transition', 'animation'].forEach(function (name) { node.removeEventListener("".concat(name, "start"), _this2.onTransitionStart); node.removeEventListener("".concat(name, "end"), _this2.onTransitionEnd); }); } }, { key: "render", value: function render() { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_9__[/* ConfigConsumer */ "a"], null, this.renderWave); } }]); return Wave; }(react__WEBPACK_IMPORTED_MODULE_5__["Component"]); Wave.contextType = _config_provider__WEBPACK_IMPORTED_MODULE_9__[/* ConfigContext */ "b"]; /***/ }), /***/ "./components/affix/index.tsx": /*!************************************!*\ !*** ./components/affix/index.tsx ***! \************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var rc_resize_observer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rc-resize-observer */ "./node_modules/rc-resize-observer/es/index.js"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_throttleByAnimationFrame__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../_util/throttleByAnimationFrame */ "./components/_util/throttleByAnimationFrame.tsx"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./utils */ "./components/affix/utils.ts"); var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if ((typeof Reflect === "undefined" ? "undefined" : Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);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; } return c > 3 && r && Object.defineProperty(target, key, r), r; }; function getDefaultTarget() { return typeof window !== 'undefined' ? window : null; } var AffixStatus; (function (AffixStatus) { AffixStatus[AffixStatus["None"] = 0] = "None"; AffixStatus[AffixStatus["Prepare"] = 1] = "Prepare"; })(AffixStatus || (AffixStatus = {})); var Affix = /*#__PURE__*/function (_React$Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Affix, _React$Component); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(Affix); function Affix() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, Affix); _this = _super.apply(this, arguments); _this.state = { status: AffixStatus.None, lastAffix: false, prevTarget: null }; _this.getOffsetTop = function () { var offsetBottom = _this.props.offsetBottom; var offsetTop = _this.props.offsetTop; if (offsetBottom === undefined && offsetTop === undefined) { offsetTop = 0; } return offsetTop; }; _this.getOffsetBottom = function () { return _this.props.offsetBottom; }; _this.savePlaceholderNode = function (node) { _this.placeholderNode = node; }; _this.saveFixedNode = function (node) { _this.fixedNode = node; }; // =================== Measure =================== _this.measure = function () { var _this$state = _this.state, status = _this$state.status, lastAffix = _this$state.lastAffix; var onChange = _this.props.onChange; var targetFunc = _this.getTargetFunc(); if (status !== AffixStatus.Prepare || !_this.fixedNode || !_this.placeholderNode || !targetFunc) { return; } var offsetTop = _this.getOffsetTop(); var offsetBottom = _this.getOffsetBottom(); var targetNode = targetFunc(); if (!targetNode) { return; } var newState = { status: AffixStatus.None }; var targetRect = Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* getTargetRect */ "d"])(targetNode); var placeholderReact = Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* getTargetRect */ "d"])(_this.placeholderNode); var fixedTop = Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* getFixedTop */ "c"])(placeholderReact, targetRect, offsetTop); var fixedBottom = Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* getFixedBottom */ "b"])(placeholderReact, targetRect, offsetBottom); if (fixedTop !== undefined) { newState.affixStyle = { position: 'fixed', top: fixedTop, width: placeholderReact.width, height: placeholderReact.height }; newState.placeholderStyle = { width: placeholderReact.width, height: placeholderReact.height }; } else if (fixedBottom !== undefined) { newState.affixStyle = { position: 'fixed', bottom: fixedBottom, width: placeholderReact.width, height: placeholderReact.height }; newState.placeholderStyle = { width: placeholderReact.width, height: placeholderReact.height }; } newState.lastAffix = !!newState.affixStyle; if (onChange && lastAffix !== newState.lastAffix) { onChange(newState.lastAffix); } _this.setState(newState); }; // @ts-ignore TS6133 _this.prepareMeasure = function () { // event param is used before. Keep compatible ts define here. _this.setState({ status: AffixStatus.Prepare, affixStyle: undefined, placeholderStyle: undefined }); // Test if `updatePosition` called if (false) { var onTestUpdatePosition; } }; // =================== Render =================== _this.render = function () { var getPrefixCls = _this.context.getPrefixCls; var _this$state2 = _this.state, affixStyle = _this$state2.affixStyle, placeholderStyle = _this$state2.placeholderStyle; var _this$props = _this.props, prefixCls = _this$props.prefixCls, children = _this$props.children; var className = classnames__WEBPACK_IMPORTED_MODULE_8___default()(Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, getPrefixCls('affix', prefixCls), !!affixStyle)); var props = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])(_this.props, ['prefixCls', 'offsetTop', 'offsetBottom', 'target', 'onChange']); // Omit this since `onTestUpdatePosition` only works on test. if (false) {} return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](rc_resize_observer__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], { onResize: function onResize() { _this.updatePosition(); } }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, props, { ref: _this.savePlaceholderNode }), affixStyle && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"]("div", { style: placeholderStyle, "aria-hidden": "true" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"]("div", { className: className, ref: _this.saveFixedNode, style: affixStyle }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](rc_resize_observer__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], { onResize: function onResize() { _this.updatePosition(); } }, children)))); }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Affix, [{ key: "getTargetFunc", value: function getTargetFunc() { var getTargetContainer = this.context.getTargetContainer; var target = this.props.target; if (target !== undefined) { return target; } return getTargetContainer || getDefaultTarget; } // Event handler }, { key: "componentDidMount", value: function componentDidMount() { var _this2 = this; var targetFunc = this.getTargetFunc(); if (targetFunc) { // [Legacy] Wait for parent component ref has its value. // We should use target as directly element instead of function which makes element check hard. this.timeout = setTimeout(function () { Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* addObserveTarget */ "a"])(targetFunc(), _this2); // Mock Event object. _this2.updatePosition(); }); } } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var prevTarget = this.state.prevTarget; var targetFunc = this.getTargetFunc(); var newTarget = null; if (targetFunc) { newTarget = targetFunc() || null; } if (prevTarget !== newTarget) { Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* removeObserveTarget */ "e"])(this); if (newTarget) { Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* addObserveTarget */ "a"])(newTarget, this); // Mock Event object. this.updatePosition(); } // eslint-disable-next-line react/no-did-update-set-state this.setState({ prevTarget: newTarget }); } if (prevProps.offsetTop !== this.props.offsetTop || prevProps.offsetBottom !== this.props.offsetBottom) { this.updatePosition(); } this.measure(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { clearTimeout(this.timeout); Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* removeObserveTarget */ "e"])(this); this.updatePosition.cancel(); // https://github.com/ant-design/ant-design/issues/22683 this.lazyUpdatePosition.cancel(); } // Handle realign logic }, { key: "updatePosition", value: function updatePosition() { this.prepareMeasure(); } }, { key: "lazyUpdatePosition", value: function lazyUpdatePosition() { var targetFunc = this.getTargetFunc(); var affixStyle = this.state.affixStyle; // Check position change before measure to make Safari smooth if (targetFunc && affixStyle) { var offsetTop = this.getOffsetTop(); var offsetBottom = this.getOffsetBottom(); var targetNode = targetFunc(); if (targetNode && this.placeholderNode) { var targetRect = Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* getTargetRect */ "d"])(targetNode); var placeholderReact = Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* getTargetRect */ "d"])(this.placeholderNode); var fixedTop = Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* getFixedTop */ "c"])(placeholderReact, targetRect, offsetTop); var fixedBottom = Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* getFixedBottom */ "b"])(placeholderReact, targetRect, offsetBottom); if (fixedTop !== undefined && affixStyle.top === fixedTop || fixedBottom !== undefined && affixStyle.bottom === fixedBottom) { return; } } } // Directly call prepare measure since it's already throttled. this.prepareMeasure(); } }]); return Affix; }(react__WEBPACK_IMPORTED_MODULE_7__["Component"]); Affix.contextType = _config_provider__WEBPACK_IMPORTED_MODULE_11__[/* ConfigContext */ "b"]; __decorate([Object(_util_throttleByAnimationFrame__WEBPACK_IMPORTED_MODULE_12__[/* throttleByAnimationFrameDecorator */ "b"])()], Affix.prototype, "updatePosition", null); __decorate([Object(_util_throttleByAnimationFrame__WEBPACK_IMPORTED_MODULE_12__[/* throttleByAnimationFrameDecorator */ "b"])()], Affix.prototype, "lazyUpdatePosition", null); /* harmony default export */ __webpack_exports__["a"] = (Affix); /***/ }), /***/ "./components/affix/style/index.less": /*!*******************************************!*\ !*** ./components/affix/style/index.less ***! \*******************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/affix/style/index.tsx": /*!******************************************!*\ !*** ./components/affix/style/index.tsx ***! \******************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/affix/style/index.less"); /***/ }), /***/ "./components/affix/utils.ts": /*!***********************************!*\ !*** ./components/affix/utils.ts ***! \***********************************/ /*! exports provided: getTargetRect, getFixedTop, getFixedBottom, getObserverEntities, addObserveTarget, removeObserveTarget */ /*! exports used: addObserveTarget, getFixedBottom, getFixedTop, getTargetRect, removeObserveTarget */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getTargetRect; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getFixedTop; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getFixedBottom; }); /* unused harmony export getObserverEntities */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addObserveTarget; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return removeObserveTarget; }); /* harmony import */ var rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/Dom/addEventListener */ "./node_modules/rc-util/es/Dom/addEventListener.js"); function getTargetRect(target) { return target !== window ? target.getBoundingClientRect() : { top: 0, bottom: window.innerHeight }; } function getFixedTop(placeholderReact, targetRect, offsetTop) { if (offsetTop !== undefined && targetRect.top > placeholderReact.top - offsetTop) { return offsetTop + targetRect.top; } return undefined; } function getFixedBottom(placeholderReact, targetRect, offsetBottom) { if (offsetBottom !== undefined && targetRect.bottom < placeholderReact.bottom + offsetBottom) { var targetBottomOffset = window.innerHeight - targetRect.bottom; return offsetBottom + targetBottomOffset; } return undefined; } // ======================== Observer ======================== var TRIGGER_EVENTS = ['resize', 'scroll', 'touchstart', 'touchmove', 'touchend', 'pageshow', 'load']; var observerEntities = []; function getObserverEntities() { // Only used in test env. Can be removed if refactor. return observerEntities; } function addObserveTarget(target, affix) { if (!target) return; var entity = observerEntities.find(function (item) { return item.target === target; }); if (entity) { entity.affixList.push(affix); } else { entity = { target: target, affixList: [affix], eventHandlers: {} }; observerEntities.push(entity); // Add listener TRIGGER_EVENTS.forEach(function (eventName) { entity.eventHandlers[eventName] = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, eventName, function () { entity.affixList.forEach(function (targetAffix) { targetAffix.lazyUpdatePosition(); }); }); }); } } function removeObserveTarget(affix) { var observerEntity = observerEntities.find(function (oriObserverEntity) { var hasAffix = oriObserverEntity.affixList.some(function (item) { return item === affix; }); if (hasAffix) { oriObserverEntity.affixList = oriObserverEntity.affixList.filter(function (item) { return item !== affix; }); } return hasAffix; }); if (observerEntity && observerEntity.affixList.length === 0) { observerEntities = observerEntities.filter(function (item) { return item !== observerEntity; }); // Remove listener TRIGGER_EVENTS.forEach(function (eventName) { var handler = observerEntity.eventHandlers[eventName]; if (handler && handler.remove) { handler.remove(); } }); } } /***/ }), /***/ "./components/alert/ErrorBoundary.tsx": /*!********************************************!*\ !*** ./components/alert/ErrorBoundary.tsx ***! \********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ErrorBoundary; }); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! . */ "./components/alert/index.tsx"); var ErrorBoundary = /*#__PURE__*/function (_React$Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(ErrorBoundary, _React$Component); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(ErrorBoundary); function ErrorBoundary() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, ErrorBoundary); _this = _super.apply(this, arguments); _this.state = { error: undefined, info: { componentStack: '' } }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(ErrorBoundary, [{ key: "componentDidCatch", value: function componentDidCatch(error, info) { this.setState({ error: error, info: info }); } }, { key: "render", value: function render() { var _this$props = this.props, message = _this$props.message, description = _this$props.description, children = _this$props.children; var _this$state = this.state, error = _this$state.error, info = _this$state.info; var componentStack = info && info.componentStack ? info.componentStack : null; var errorMessage = typeof message === 'undefined' ? (error || '').toString() : message; var errorDescription = typeof description === 'undefined' ? componentStack : description; if (error) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](___WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], { type: "error", message: errorMessage, description: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("pre", null, errorDescription) }); } return children; } }]); return ErrorBoundary; }(react__WEBPACK_IMPORTED_MODULE_4__["Component"]); /***/ }), /***/ "./components/alert/index.tsx": /*!************************************!*\ !*** ./components/alert/index.tsx ***! \************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseOutlined */ "./node_modules/@ant-design/icons/es/icons/CloseOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_CheckCircleOutlined__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/icons/es/icons/CheckCircleOutlined */ "./node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_ExclamationCircleOutlined__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ant-design/icons/es/icons/ExclamationCircleOutlined */ "./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_InfoCircleOutlined__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ant-design/icons/es/icons/InfoCircleOutlined */ "./node_modules/@ant-design/icons/es/icons/InfoCircleOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_CloseCircleOutlined__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseCircleOutlined */ "./node_modules/@ant-design/icons/es/icons/CloseCircleOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_CheckCircleFilled__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ant-design/icons/es/icons/CheckCircleFilled */ "./node_modules/@ant-design/icons/es/icons/CheckCircleFilled.js"); /* harmony import */ var _ant_design_icons_es_icons_ExclamationCircleFilled__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @ant-design/icons/es/icons/ExclamationCircleFilled */ "./node_modules/@ant-design/icons/es/icons/ExclamationCircleFilled.js"); /* harmony import */ var _ant_design_icons_es_icons_InfoCircleFilled__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @ant-design/icons/es/icons/InfoCircleFilled */ "./node_modules/@ant-design/icons/es/icons/InfoCircleFilled.js"); /* harmony import */ var _ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseCircleFilled */ "./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js"); /* harmony import */ var rc_motion__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! rc-motion */ "./node_modules/rc-motion/es/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_getDataOrAriaProps__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../_util/getDataOrAriaProps */ "./components/_util/getDataOrAriaProps.ts"); /* harmony import */ var _ErrorBoundary__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./ErrorBoundary */ "./components/alert/ErrorBoundary.tsx"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var iconMapFilled = { success: _ant_design_icons_es_icons_CheckCircleFilled__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], info: _ant_design_icons_es_icons_InfoCircleFilled__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"], error: _ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"], warning: _ant_design_icons_es_icons_ExclamationCircleFilled__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"] }; var iconMapOutlined = { success: _ant_design_icons_es_icons_CheckCircleOutlined__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], info: _ant_design_icons_es_icons_InfoCircleOutlined__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], error: _ant_design_icons_es_icons_CloseCircleOutlined__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], warning: _ant_design_icons_es_icons_ExclamationCircleOutlined__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"] }; var Alert = function Alert(_a) { var _classNames2; var description = _a.description, customizePrefixCls = _a.prefixCls, message = _a.message, banner = _a.banner, _a$className = _a.className, className = _a$className === void 0 ? '' : _a$className, style = _a.style, onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, onClick = _a.onClick, afterClose = _a.afterClose, showIcon = _a.showIcon, closable = _a.closable, closeText = _a.closeText, action = _a.action, props = __rest(_a, ["description", "prefixCls", "message", "banner", "className", "style", "onMouseEnter", "onMouseLeave", "onClick", "afterClose", "showIcon", "closable", "closeText", "action"]); var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__["useState"](false), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_React$useState, 2), closed = _React$useState2[0], setClosed = _React$useState2[1]; var ref = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_3__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_15__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var prefixCls = getPrefixCls('alert', customizePrefixCls); var handleClose = function handleClose(e) { var _a; setClosed(true); (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props, e); }; var getType = function getType() { var type = props.type; if (type !== undefined) { return type; } // banner 模式默认为警告 return banner ? 'warning' : 'info'; }; // closeable when closeText is assigned var isClosable = closeText ? true : closable; var type = getType(); var renderIconNode = function renderIconNode() { var icon = props.icon; // use outline icon in alert with description var iconType = (description ? iconMapOutlined : iconMapFilled)[type] || null; if (icon) { return Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_18__[/* replaceElement */ "c"])(icon, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", { className: "".concat(prefixCls, "-icon") }, icon), function () { return { className: classnames__WEBPACK_IMPORTED_MODULE_14___default()("".concat(prefixCls, "-icon"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, icon.props.className, icon.props.className)) }; }); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](iconType, { className: "".concat(prefixCls, "-icon") }); }; var renderCloseIcon = function renderCloseIcon() { return isClosable ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("button", { type: "button", onClick: handleClose, className: "".concat(prefixCls, "-close-icon"), tabIndex: 0 }, closeText ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", { className: "".concat(prefixCls, "-close-text") }, closeText) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], null)) : null; }; // banner 模式默认有 Icon var isShowIcon = banner && showIcon === undefined ? true : showIcon; var alertCls = classnames__WEBPACK_IMPORTED_MODULE_14___default()(prefixCls, "".concat(prefixCls, "-").concat(type), (_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-with-description"), !!description), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-no-icon"), !isShowIcon), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-banner"), !!banner), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames2), className); var dataOrAriaProps = Object(_util_getDataOrAriaProps__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"])(props); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](rc_motion__WEBPACK_IMPORTED_MODULE_13__[/* default */ "b"], { visible: !closed, motionName: "".concat(prefixCls, "-motion"), motionAppear: false, motionEnter: false, onLeaveStart: function onLeaveStart(node) { return { maxHeight: node.offsetHeight }; }, onLeaveEnd: afterClose }, function (_ref) { var motionClassName = _ref.className, motionStyle = _ref.style; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ ref: ref, "data-show": !closed, className: classnames__WEBPACK_IMPORTED_MODULE_14___default()(alertCls, motionClassName), style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, style), motionStyle), onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onClick: onClick, role: "alert" }, dataOrAriaProps), isShowIcon ? renderIconNode() : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(prefixCls, "-content") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(prefixCls, "-message") }, message), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(prefixCls, "-description") }, description)), action ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(prefixCls, "-action") }, action) : null, renderCloseIcon()); }); }; Alert.ErrorBoundary = _ErrorBoundary__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"]; /* harmony default export */ __webpack_exports__["a"] = (Alert); /***/ }), /***/ "./components/alert/style/index.less": /*!*******************************************!*\ !*** ./components/alert/style/index.less ***! \*******************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/alert/style/index.tsx": /*!******************************************!*\ !*** ./components/alert/style/index.tsx ***! \******************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/alert/style/index.less"); /***/ }), /***/ "./components/anchor/Anchor.tsx": /*!**************************************!*\ !*** ./components/anchor/Anchor.tsx ***! \**************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Anchor; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rc-util/es/Dom/addEventListener */ "./node_modules/rc-util/es/Dom/addEventListener.js"); /* harmony import */ var _affix__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../affix */ "./components/affix/index.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_scrollTo__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../_util/scrollTo */ "./components/_util/scrollTo.ts"); /* harmony import */ var _util_getScroll__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../_util/getScroll */ "./components/_util/getScroll.tsx"); /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./context */ "./components/anchor/context.ts"); function getDefaultContainer() { return window; } function getOffsetTop(element, container) { if (!element.getClientRects().length) { return 0; } var rect = element.getBoundingClientRect(); if (rect.width || rect.height) { if (container === window) { container = element.ownerDocument.documentElement; return rect.top - container.clientTop; } return rect.top - container.getBoundingClientRect().top; } return rect.top; } var sharpMatcherRegx = /#(\S+)$/; var Anchor = /*#__PURE__*/function (_React$Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(Anchor, _React$Component); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(Anchor); function Anchor() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, Anchor); _this = _super.apply(this, arguments); _this.state = { activeLink: null }; _this.wrapperRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createRef"](); _this.links = []; // Context _this.registerLink = function (link) { if (!_this.links.includes(link)) { _this.links.push(link); } }; _this.unregisterLink = function (link) { var index = _this.links.indexOf(link); if (index !== -1) { _this.links.splice(index, 1); } }; _this.getContainer = function () { var getTargetContainer = _this.context.getTargetContainer; var getContainer = _this.props.getContainer; var getFunc = getContainer || getTargetContainer || getDefaultContainer; return getFunc(); }; _this.handleScrollTo = function (link) { var _this$props = _this.props, offsetTop = _this$props.offsetTop, targetOffset = _this$props.targetOffset; _this.setCurrentActiveLink(link); var container = _this.getContainer(); var scrollTop = Object(_util_getScroll__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"])(container, true); var sharpLinkMatch = sharpMatcherRegx.exec(link); if (!sharpLinkMatch) { return; } var targetElement = document.getElementById(sharpLinkMatch[1]); if (!targetElement) { return; } var eleOffsetTop = getOffsetTop(targetElement, container); var y = scrollTop + eleOffsetTop; y -= targetOffset !== undefined ? targetOffset : offsetTop || 0; _this.animating = true; Object(_util_scrollTo__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"])(y, { callback: function callback() { _this.animating = false; }, getContainer: _this.getContainer }); }; _this.saveInkNode = function (node) { _this.inkNode = node; }; _this.setCurrentActiveLink = function (link) { var activeLink = _this.state.activeLink; var _this$props2 = _this.props, onChange = _this$props2.onChange, getCurrentAnchor = _this$props2.getCurrentAnchor; if (activeLink === link) { return; } // https://github.com/ant-design/ant-design/issues/30584 _this.setState({ activeLink: typeof getCurrentAnchor === 'function' ? getCurrentAnchor() : link }); onChange === null || onChange === void 0 ? void 0 : onChange(link); }; _this.handleScroll = function () { if (_this.animating) { return; } var _this$props3 = _this.props, offsetTop = _this$props3.offsetTop, bounds = _this$props3.bounds, targetOffset = _this$props3.targetOffset; var currentActiveLink = _this.getCurrentAnchor(targetOffset !== undefined ? targetOffset : offsetTop || 0, bounds); _this.setCurrentActiveLink(currentActiveLink); }; _this.updateInk = function () { var _assertThisInitialize = Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(_this), prefixCls = _assertThisInitialize.prefixCls, wrapperRef = _assertThisInitialize.wrapperRef; var anchorNode = wrapperRef.current; var linkNode = anchorNode === null || anchorNode === void 0 ? void 0 : anchorNode.getElementsByClassName("".concat(prefixCls, "-link-title-active"))[0]; if (linkNode) { _this.inkNode.style.top = "".concat(linkNode.offsetTop + linkNode.clientHeight / 2 - 4.5, "px"); } }; _this.render = function () { var _this$context = _this.context, getPrefixCls = _this$context.getPrefixCls, direction = _this$context.direction; var _this$props4 = _this.props, customizePrefixCls = _this$props4.prefixCls, _this$props4$classNam = _this$props4.className, className = _this$props4$classNam === void 0 ? '' : _this$props4$classNam, style = _this$props4.style, offsetTop = _this$props4.offsetTop, affix = _this$props4.affix, showInkInFixed = _this$props4.showInkInFixed, children = _this$props4.children; var activeLink = _this.state.activeLink; var prefixCls = getPrefixCls('anchor', customizePrefixCls); // To support old version react. // Have to add prefixCls on the instance. // https://github.com/facebook/react/issues/12397 _this.prefixCls = prefixCls; var inkClass = classnames__WEBPACK_IMPORTED_MODULE_8___default()("".concat(prefixCls, "-ink-ball"), { visible: activeLink }); var wrapperClass = classnames__WEBPACK_IMPORTED_MODULE_8___default()("".concat(prefixCls, "-wrapper"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'), className); var anchorClass = classnames__WEBPACK_IMPORTED_MODULE_8___default()(prefixCls, { fixed: !affix && !showInkInFixed }); var wrapperStyle = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ maxHeight: offsetTop ? "calc(100vh - ".concat(offsetTop, "px)") : '100vh' }, style); var anchorContent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"]("div", { ref: _this.wrapperRef, className: wrapperClass, style: wrapperStyle }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"]("div", { className: anchorClass }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"]("div", { className: "".concat(prefixCls, "-ink") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"]("span", { className: inkClass, ref: _this.saveInkNode })), children)); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_context__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"].Provider, { value: { registerLink: _this.registerLink, unregisterLink: _this.unregisterLink, activeLink: _this.state.activeLink, scrollTo: _this.handleScrollTo, onClick: _this.props.onClick } }, !affix ? anchorContent : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_affix__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], { offsetTop: offsetTop, target: _this.getContainer }, anchorContent)); }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Anchor, [{ key: "componentDidMount", value: function componentDidMount() { this.scrollContainer = this.getContainer(); this.scrollEvent = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])(this.scrollContainer, 'scroll', this.handleScroll); this.handleScroll(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { if (this.scrollEvent) { var currentContainer = this.getContainer(); if (this.scrollContainer !== currentContainer) { this.scrollContainer = currentContainer; this.scrollEvent.remove(); this.scrollEvent = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])(this.scrollContainer, 'scroll', this.handleScroll); this.handleScroll(); } } this.updateInk(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (this.scrollEvent) { this.scrollEvent.remove(); } } }, { key: "getCurrentAnchor", value: function getCurrentAnchor() { var offsetTop = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; var bounds = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5; var linkSections = []; var container = this.getContainer(); this.links.forEach(function (link) { var sharpLinkMatch = sharpMatcherRegx.exec(link.toString()); if (!sharpLinkMatch) { return; } var target = document.getElementById(sharpLinkMatch[1]); if (target) { var top = getOffsetTop(target, container); if (top < offsetTop + bounds) { linkSections.push({ link: link, top: top }); } } }); if (linkSections.length) { var maxSection = linkSections.reduce(function (prev, curr) { return curr.top > prev.top ? curr : prev; }); return maxSection.link; } return ''; } }]); return Anchor; }(react__WEBPACK_IMPORTED_MODULE_7__["Component"]); Anchor.defaultProps = { affix: true, showInkInFixed: false }; Anchor.contextType = _config_provider__WEBPACK_IMPORTED_MODULE_11__[/* ConfigContext */ "b"]; /***/ }), /***/ "./components/anchor/AnchorLink.tsx": /*!******************************************!*\ !*** ./components/anchor/AnchorLink.tsx ***! \******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./context */ "./components/anchor/context.ts"); var AnchorLink = /*#__PURE__*/function (_React$Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(AnchorLink, _React$Component); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(AnchorLink); function AnchorLink() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, AnchorLink); _this = _super.apply(this, arguments); _this.handleClick = function (e) { var _this$context = _this.context, scrollTo = _this$context.scrollTo, onClick = _this$context.onClick; var _this$props = _this.props, href = _this$props.href, title = _this$props.title; onClick === null || onClick === void 0 ? void 0 : onClick(e, { title: title, href: href }); scrollTo(href); }; _this.renderAnchorLink = function (_ref) { var getPrefixCls = _ref.getPrefixCls; var _this$props2 = _this.props, customizePrefixCls = _this$props2.prefixCls, href = _this$props2.href, title = _this$props2.title, children = _this$props2.children, className = _this$props2.className, target = _this$props2.target; var prefixCls = getPrefixCls('anchor', customizePrefixCls); var active = _this.context.activeLink === href; var wrapperClassName = classnames__WEBPACK_IMPORTED_MODULE_6___default()("".concat(prefixCls, "-link"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(prefixCls, "-link-active"), active), className); var titleClassName = classnames__WEBPACK_IMPORTED_MODULE_6___default()("".concat(prefixCls, "-link-title"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(prefixCls, "-link-title-active"), active)); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("div", { className: wrapperClassName }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("a", { className: titleClassName, href: href, title: typeof title === 'string' ? title : '', target: target, onClick: _this.handleClick }, title), children); }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(AnchorLink, [{ key: "componentDidMount", value: function componentDidMount() { this.context.registerLink(this.props.href); } }, { key: "componentDidUpdate", value: function componentDidUpdate(_ref2) { var prevHref = _ref2.href; var href = this.props.href; if (prevHref !== href) { this.context.unregisterLink(prevHref); this.context.registerLink(href); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.context.unregisterLink(this.props.href); } }, { key: "render", value: function render() { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_7__[/* ConfigConsumer */ "a"], null, this.renderAnchorLink); } }]); return AnchorLink; }(react__WEBPACK_IMPORTED_MODULE_5__["Component"]); AnchorLink.defaultProps = { href: '#' }; AnchorLink.contextType = _context__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"]; /* harmony default export */ __webpack_exports__["a"] = (AnchorLink); /***/ }), /***/ "./components/anchor/context.ts": /*!**************************************!*\ !*** ./components/anchor/context.ts ***! \**************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var AnchorContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createContext"](null); /* harmony default export */ __webpack_exports__["a"] = (AnchorContext); /***/ }), /***/ "./components/anchor/index.tsx": /*!*************************************!*\ !*** ./components/anchor/index.tsx ***! \*************************************/ /*! exports provided: AnchorProps, AnchorLinkProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _Anchor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Anchor */ "./components/anchor/Anchor.tsx"); /* harmony import */ var _AnchorLink__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AnchorLink */ "./components/anchor/AnchorLink.tsx"); _Anchor__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].Link = _AnchorLink__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]; /* harmony default export */ __webpack_exports__["a"] = (_Anchor__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]); /***/ }), /***/ "./components/anchor/style/index.less": /*!********************************************!*\ !*** ./components/anchor/style/index.less ***! \********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/anchor/style/index.tsx": /*!*******************************************!*\ !*** ./components/anchor/style/index.tsx ***! \*******************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/anchor/style/index.less"); /* harmony import */ var _affix_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../affix/style */ "./components/affix/style/index.tsx"); // style dependencies /***/ }), /***/ "./components/auto-complete/index.tsx": /*!********************************************!*\ !*** ./components/auto-complete/index.tsx ***! \********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-util/es/Children/toArray */ "./node_modules/rc-util/es/Children/toArray.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../select */ "./components/select/index.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); /** * TODO: 4.0 * * - Remove `dataSource` * - `size` not work with customizeInput * - CustomizeInput not feedback `ENTER` key since accessibility enhancement */ var Option = _select__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].Option; function isSelectOptionOrSelectOptGroup(child) { return child && child.type && (child.type.isSelectOption || child.type.isSelectOptGroup); } var AutoComplete = function AutoComplete(props, ref) { var customizePrefixCls = props.prefixCls, className = props.className, children = props.children, dataSource = props.dataSource; var childNodes = Object(rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(children); // ============================= Input ============================= var customizeInput; if (childNodes.length === 1 && Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_10__[/* isValidElement */ "b"])(childNodes[0]) && !isSelectOptionOrSelectOptGroup(childNodes[0])) { var _childNodes = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(childNodes, 1); customizeInput = _childNodes[0]; } var getInputElement = customizeInput ? function () { return customizeInput; } : undefined; // ============================ Options ============================ var optionChildren; // [Legacy] convert `children` or `dataSource` into option children if (childNodes.length && isSelectOptionOrSelectOptGroup(childNodes[0])) { optionChildren = children; } else { optionChildren = dataSource ? dataSource.map(function (item) { if (Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_10__[/* isValidElement */ "b"])(item)) { return item; } switch (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(item)) { case 'string': return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](Option, { key: item, value: item }, item); case 'object': { var optionValue = item.value; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](Option, { key: optionValue, value: optionValue }, item.text); } default: throw new Error('AutoComplete[dataSource] only supports type `string[] | Object[]`.'); } }) : []; } // ============================ Warning ============================ react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])(!('dataSource' in props), 'AutoComplete', '`dataSource` is deprecated, please use `options` instead.'); Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])(!customizeInput || !('size' in props), 'AutoComplete', 'You need to control style self instead of setting `size` when using customize input.'); }, []); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_8__[/* ConfigConsumer */ "a"], null, function (_ref) { var getPrefixCls = _ref.getPrefixCls; var prefixCls = getPrefixCls('select', customizePrefixCls); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_select__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ ref: ref }, Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(props, ['dataSource']), { prefixCls: prefixCls, className: classnames__WEBPACK_IMPORTED_MODULE_5___default()("".concat(prefixCls, "-auto-complete"), className), mode: _select__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].SECRET_COMBOBOX_MODE_DO_NOT_USE, // Internal api getInputElement: getInputElement }), optionChildren); }); }; var RefAutoComplete = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](AutoComplete); RefAutoComplete.Option = Option; /* harmony default export */ __webpack_exports__["a"] = (RefAutoComplete); /***/ }), /***/ "./components/auto-complete/style/index.less": /*!***************************************************!*\ !*** ./components/auto-complete/style/index.less ***! \***************************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/auto-complete/style/index.tsx": /*!**************************************************!*\ !*** ./components/auto-complete/style/index.tsx ***! \**************************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/auto-complete/style/index.less"); /* harmony import */ var _select_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../select/style */ "./components/select/style/index.tsx"); // style dependencies /***/ }), /***/ "./components/avatar/SizeContext.tsx": /*!*******************************************!*\ !*** ./components/avatar/SizeContext.tsx ***! \*******************************************/ /*! exports provided: SizeContextProvider, default */ /*! exports used: SizeContextProvider, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SizeContextProvider; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var SizeContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createContext"]('default'); var SizeContextProvider = function SizeContextProvider(_ref) { var children = _ref.children, size = _ref.size; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SizeContext.Consumer, null, function (originSize) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SizeContext.Provider, { value: size || originSize }, children); }); }; /* harmony default export */ __webpack_exports__["b"] = (SizeContext); /***/ }), /***/ "./components/avatar/avatar.tsx": /*!**************************************!*\ !*** ./components/avatar/avatar.tsx ***! \**************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var rc_resize_observer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-resize-observer */ "./node_modules/rc-resize-observer/es/index.js"); /* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-util/es/ref */ "./node_modules/rc-util/es/ref.js"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../_util/responsiveObserve */ "./components/_util/responsiveObserve.ts"); /* harmony import */ var _grid_hooks_useBreakpoint__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../grid/hooks/useBreakpoint */ "./components/grid/hooks/useBreakpoint.tsx"); /* harmony import */ var _SizeContext__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./SizeContext */ "./components/avatar/SizeContext.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var InternalAvatar = function InternalAvatar(props, ref) { var _classNames, _classNames2; var groupSize = react__WEBPACK_IMPORTED_MODULE_4__["useContext"](_SizeContext__WEBPACK_IMPORTED_MODULE_12__[/* default */ "b"]); var _React$useState = react__WEBPACK_IMPORTED_MODULE_4__["useState"](1), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_React$useState, 2), scale = _React$useState2[0], setScale = _React$useState2[1]; var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_4__["useState"](false), _React$useState4 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_React$useState3, 2), mounted = _React$useState4[0], setMounted = _React$useState4[1]; var _React$useState5 = react__WEBPACK_IMPORTED_MODULE_4__["useState"](true), _React$useState6 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_React$useState5, 2), isImgExist = _React$useState6[0], setIsImgExist = _React$useState6[1]; var avatarNodeRef = react__WEBPACK_IMPORTED_MODULE_4__["useRef"](); var avatarChildrenRef = react__WEBPACK_IMPORTED_MODULE_4__["useRef"](); var avatarNodeMergeRef = Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_7__[/* composeRef */ "a"])(ref, avatarNodeRef); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_4__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_8__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls; var setScaleParam = function setScaleParam() { if (!avatarChildrenRef.current || !avatarNodeRef.current) { return; } var childrenWidth = avatarChildrenRef.current.offsetWidth; // offsetWidth avoid affecting be transform scale var nodeWidth = avatarNodeRef.current.offsetWidth; // denominator is 0 is no meaning if (childrenWidth !== 0 && nodeWidth !== 0) { var _props$gap = props.gap, gap = _props$gap === void 0 ? 4 : _props$gap; if (gap * 2 < nodeWidth) { setScale(nodeWidth - gap * 2 < childrenWidth ? (nodeWidth - gap * 2) / childrenWidth : 1); } } }; react__WEBPACK_IMPORTED_MODULE_4__["useEffect"](function () { setMounted(true); }, []); react__WEBPACK_IMPORTED_MODULE_4__["useEffect"](function () { setIsImgExist(true); setScale(1); }, [props.src]); react__WEBPACK_IMPORTED_MODULE_4__["useEffect"](function () { setScaleParam(); }, [props.gap]); var handleImgLoadError = function handleImgLoadError() { var onError = props.onError; var errorFlag = onError ? onError() : undefined; if (errorFlag !== false) { setIsImgExist(false); } }; var customizePrefixCls = props.prefixCls, shape = props.shape, customSize = props.size, src = props.src, srcSet = props.srcSet, icon = props.icon, className = props.className, alt = props.alt, draggable = props.draggable, children = props.children, others = __rest(props, ["prefixCls", "shape", "size", "src", "srcSet", "icon", "className", "alt", "draggable", "children"]); var size = customSize === 'default' ? groupSize : customSize; var screens = Object(_grid_hooks_useBreakpoint__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"])(); var responsiveSizeStyle = react__WEBPACK_IMPORTED_MODULE_4__["useMemo"](function () { if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(size) !== 'object') { return {}; } var currentBreakpoint = _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_10__[/* responsiveArray */ "b"].find(function (screen) { return screens[screen]; }); var currentSize = size[currentBreakpoint]; return currentSize ? { width: currentSize, height: currentSize, lineHeight: "".concat(currentSize, "px"), fontSize: icon ? currentSize / 2 : 18 } : {}; }, [screens, size]); if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])(!(typeof icon === 'string' && icon.length > 2), 'Avatar', "`icon` is using ReactNode instead of string naming in v4. Please check `".concat(icon, "` at https://ant.design/components/icon")); var prefixCls = getPrefixCls('avatar', customizePrefixCls); var sizeCls = classnames__WEBPACK_IMPORTED_MODULE_5___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-lg"), size === 'large'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-sm"), size === 'small'), _classNames)); var hasImageElement = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["isValidElement"](src); var classString = classnames__WEBPACK_IMPORTED_MODULE_5___default()(prefixCls, sizeCls, (_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-").concat(shape), !!shape), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-image"), hasImageElement || src && isImgExist), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-icon"), !!icon), _classNames2), className); var sizeStyle = typeof size === 'number' ? { width: size, height: size, lineHeight: "".concat(size, "px"), fontSize: icon ? size / 2 : 18 } : {}; var childrenToRender; if (typeof src === 'string' && isImgExist) { childrenToRender = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("img", { src: src, draggable: draggable, srcSet: srcSet, onError: handleImgLoadError, alt: alt }); } else if (hasImageElement) { childrenToRender = src; } else if (icon) { childrenToRender = icon; } else if (mounted || scale !== 1) { var transformString = "scale(".concat(scale, ") translateX(-50%)"); var childrenStyle = { msTransform: transformString, WebkitTransform: transformString, transform: transformString }; var sizeChildrenStyle = typeof size === 'number' ? { lineHeight: "".concat(size, "px") } : {}; childrenToRender = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](rc_resize_observer__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], { onResize: setScaleParam }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("span", { className: "".concat(prefixCls, "-string"), ref: function ref(node) { avatarChildrenRef.current = node; }, style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, sizeChildrenStyle), childrenStyle) }, children)); } else { childrenToRender = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("span", { className: "".concat(prefixCls, "-string"), style: { opacity: 0 }, ref: function ref(node) { avatarChildrenRef.current = node; } }, children); } // The event is triggered twice from bubbling up the DOM tree. // see https://codesandbox.io/s/kind-snow-9lidz delete others.onError; delete others.gap; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("span", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, others, { style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, sizeStyle), responsiveSizeStyle), others.style), className: classString, ref: avatarNodeMergeRef }), childrenToRender); }; var Avatar = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["forwardRef"](InternalAvatar); Avatar.displayName = 'Avatar'; Avatar.defaultProps = { shape: 'circle', size: 'default' }; /* harmony default export */ __webpack_exports__["a"] = (Avatar); /***/ }), /***/ "./components/avatar/group.tsx": /*!*************************************!*\ !*** ./components/avatar/group.tsx ***! \*************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/es/Children/toArray */ "./node_modules/rc-util/es/Children/toArray.js"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _avatar__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./avatar */ "./components/avatar/avatar.tsx"); /* harmony import */ var _popover__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../popover */ "./components/popover/index.tsx"); /* harmony import */ var _SizeContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./SizeContext */ "./components/avatar/SizeContext.tsx"); var Group = function Group(props) { var _React$useContext = react__WEBPACK_IMPORTED_MODULE_1__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_5__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var customizePrefixCls = props.prefixCls, _props$className = props.className, className = _props$className === void 0 ? '' : _props$className, maxCount = props.maxCount, maxStyle = props.maxStyle, size = props.size; var prefixCls = getPrefixCls('avatar-group', customizePrefixCls); var cls = classnames__WEBPACK_IMPORTED_MODULE_2___default()(prefixCls, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'), className); var children = props.children, _props$maxPopoverPlac = props.maxPopoverPlacement, maxPopoverPlacement = _props$maxPopoverPlac === void 0 ? 'top' : _props$maxPopoverPlac; var childrenWithProps = Object(rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(children).map(function (child, index) { return Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_4__[/* cloneElement */ "a"])(child, { key: "avatar-key-".concat(index) }); }); var numOfChildren = childrenWithProps.length; if (maxCount && maxCount < numOfChildren) { var childrenShow = childrenWithProps.slice(0, maxCount); var childrenHidden = childrenWithProps.slice(maxCount, numOfChildren); childrenShow.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_popover__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], { key: "avatar-popover-key", content: childrenHidden, trigger: "hover", placement: maxPopoverPlacement, overlayClassName: "".concat(prefixCls, "-popover") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_avatar__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], { style: maxStyle }, "+".concat(numOfChildren - maxCount)))); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_SizeContext__WEBPACK_IMPORTED_MODULE_8__[/* SizeContextProvider */ "a"], { size: size }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: cls, style: props.style }, childrenShow)); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_SizeContext__WEBPACK_IMPORTED_MODULE_8__[/* SizeContextProvider */ "a"], { size: size }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: cls, style: props.style }, childrenWithProps)); }; /* harmony default export */ __webpack_exports__["a"] = (Group); /***/ }), /***/ "./components/avatar/index.tsx": /*!*************************************!*\ !*** ./components/avatar/index.tsx ***! \*************************************/ /*! exports provided: AvatarProps, GroupProps, Group, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _avatar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./avatar */ "./components/avatar/avatar.tsx"); /* harmony import */ var _group__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./group */ "./components/avatar/group.tsx"); var Avatar = _avatar__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]; Avatar.Group = _group__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]; /* harmony default export */ __webpack_exports__["a"] = (Avatar); /***/ }), /***/ "./components/avatar/style/index.less": /*!********************************************!*\ !*** ./components/avatar/style/index.less ***! \********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/avatar/style/index.tsx": /*!*******************************************!*\ !*** ./components/avatar/style/index.tsx ***! \*******************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/avatar/style/index.less"); /* harmony import */ var _popover_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../popover/style */ "./components/popover/style/index.tsx"); // style dependencies // deps-lint-skip: grid /***/ }), /***/ "./components/back-top/index.tsx": /*!***************************************!*\ !*** ./components/back-top/index.tsx ***! \***************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var rc_motion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-motion */ "./node_modules/rc-motion/es/index.js"); /* harmony import */ var rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/Dom/addEventListener */ "./node_modules/rc-util/es/Dom/addEventListener.js"); /* harmony import */ var rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/hooks/useMergedState */ "./node_modules/rc-util/es/hooks/useMergedState.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var _ant_design_icons_es_icons_VerticalAlignTopOutlined__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ant-design/icons/es/icons/VerticalAlignTopOutlined */ "./node_modules/@ant-design/icons/es/icons/VerticalAlignTopOutlined.js"); /* harmony import */ var _util_throttleByAnimationFrame__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../_util/throttleByAnimationFrame */ "./components/_util/throttleByAnimationFrame.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_getScroll__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../_util/getScroll */ "./components/_util/getScroll.tsx"); /* harmony import */ var _util_scrollTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../_util/scrollTo */ "./components/_util/scrollTo.ts"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); var BackTop = function BackTop(props) { var _useMergedState = Object(rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(false, { value: props.visible }), _useMergedState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_useMergedState, 2), visible = _useMergedState2[0], setVisible = _useMergedState2[1]; var ref = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createRef"](); var scrollEvent = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](); var getDefaultTarget = function getDefaultTarget() { return ref.current && ref.current.ownerDocument ? ref.current.ownerDocument : window; }; var handleScroll = Object(_util_throttleByAnimationFrame__WEBPACK_IMPORTED_MODULE_10__[/* throttleByAnimationFrame */ "a"])(function (e) { var visibilityHeight = props.visibilityHeight; var scrollTop = Object(_util_getScroll__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"])(e.target, true); setVisible(scrollTop > visibilityHeight); }); var bindScrollEvent = function bindScrollEvent() { var target = props.target; var getTarget = target || getDefaultTarget; var container = getTarget(); scrollEvent.current = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(container, 'scroll', function (e) { handleScroll(e); }); handleScroll({ target: container }); }; react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { bindScrollEvent(); return function () { if (scrollEvent.current) { scrollEvent.current.remove(); } handleScroll.cancel(); }; }, [props.target]); var scrollToTop = function scrollToTop(e) { var onClick = props.onClick, target = props.target, _props$duration = props.duration, duration = _props$duration === void 0 ? 450 : _props$duration; Object(_util_scrollTo__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"])(0, { getContainer: target || getDefaultTarget, duration: duration }); if (typeof onClick === 'function') { onClick(e); } }; var renderChildren = function renderChildren(_ref) { var prefixCls = _ref.prefixCls, rootPrefixCls = _ref.rootPrefixCls; var children = props.children; var defaultElement = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(prefixCls, "-content") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(prefixCls, "-icon") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_ant_design_icons_es_icons_VerticalAlignTopOutlined__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], null))); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](rc_motion__WEBPACK_IMPORTED_MODULE_4__[/* default */ "b"], { visible: visible, motionName: "".concat(rootPrefixCls, "-fade"), removeOnLeave: true }, function (_ref2) { var motionClassName = _ref2.className; var childNode = children || defaultElement; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", null, Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_14__[/* cloneElement */ "a"])(childNode, function (_ref3) { var className = _ref3.className; return { className: classnames__WEBPACK_IMPORTED_MODULE_7___default()(motionClassName, className) }; })); }); }; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_3__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_11__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var customizePrefixCls = props.prefixCls, _props$className = props.className, className = _props$className === void 0 ? '' : _props$className; var prefixCls = getPrefixCls('back-top', customizePrefixCls); var rootPrefixCls = getPrefixCls(); var classString = classnames__WEBPACK_IMPORTED_MODULE_7___default()(prefixCls, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'), className); // fix https://fb.me/react-unknown-prop var divProps = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(props, ['prefixCls', 'className', 'children', 'visibilityHeight', 'target', 'visible']); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, divProps, { className: classString, onClick: scrollToTop, ref: ref }), renderChildren({ prefixCls: prefixCls, rootPrefixCls: rootPrefixCls })); }; BackTop.defaultProps = { visibilityHeight: 400 }; /* harmony default export */ __webpack_exports__["a"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["memo"](BackTop)); /***/ }), /***/ "./components/back-top/style/index.less": /*!**********************************************!*\ !*** ./components/back-top/style/index.less ***! \**********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/back-top/style/index.tsx": /*!*********************************************!*\ !*** ./components/back-top/style/index.tsx ***! \*********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/back-top/style/index.less"); /***/ }), /***/ "./components/badge/Ribbon.tsx": /*!*************************************!*\ !*** ./components/badge/Ribbon.tsx ***! \*************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ "./components/badge/utils.tsx"); var Ribbon = function Ribbon(_ref) { var _classNames; var className = _ref.className, customizePrefixCls = _ref.prefixCls, style = _ref.style, color = _ref.color, children = _ref.children, text = _ref.text, _ref$placement = _ref.placement, placement = _ref$placement === void 0 ? 'end' : _ref$placement; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_4__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var prefixCls = getPrefixCls('ribbon', customizePrefixCls); var colorInPreset = Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* isPresetColor */ "a"])(color); var ribbonCls = classnames__WEBPACK_IMPORTED_MODULE_3___default()(prefixCls, "".concat(prefixCls, "-placement-").concat(placement), (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-color-").concat(color), colorInPreset), _classNames), className); var colorStyle = {}; var cornerColorStyle = {}; if (color && !colorInPreset) { colorStyle.background = color; cornerColorStyle.color = color; } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-wrapper") }, children, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: ribbonCls, style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, colorStyle), style) }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { className: "".concat(prefixCls, "-text") }, text), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-corner"), style: cornerColorStyle }))); }; /* harmony default export */ __webpack_exports__["a"] = (Ribbon); /***/ }), /***/ "./components/badge/ScrollNumber.tsx": /*!*******************************************!*\ !*** ./components/badge/ScrollNumber.tsx ***! \*******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); /* harmony import */ var _SingleNumber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SingleNumber */ "./components/badge/SingleNumber.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var ScrollNumber = function ScrollNumber(_a) { var customizePrefixCls = _a.prefixCls, count = _a.count, className = _a.className, motionClassName = _a.motionClassName, style = _a.style, title = _a.title, show = _a.show, _a$component = _a.component, component = _a$component === void 0 ? 'sup' : _a$component, children = _a.children, restProps = __rest(_a, ["prefixCls", "count", "className", "motionClassName", "style", "title", "show", "component", "children"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_1__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_3__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls; var prefixCls = getPrefixCls('scroll-number', customizePrefixCls); // ============================ Render ============================ var newProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, restProps), { 'data-show': show, style: style, className: classnames__WEBPACK_IMPORTED_MODULE_2___default()(prefixCls, className, motionClassName), title: title }); // Only integer need motion var numberNodes = count; if (count && Number(count) % 1 === 0) { var numberList = String(count).split(''); numberNodes = numberList.map(function (num, i) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_SingleNumber__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], { prefixCls: prefixCls, count: Number(count), value: num // eslint-disable-next-line react/no-array-index-key , key: numberList.length - i }); }); } // allow specify the border // mock border-color by box-shadow for compatible with old usage: // if (style && style.borderColor) { newProps.style = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, style), { boxShadow: "0 0 0 1px ".concat(style.borderColor, " inset") }); } if (children) { return Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_4__[/* cloneElement */ "a"])(children, function (oriProps) { return { className: classnames__WEBPACK_IMPORTED_MODULE_2___default()("".concat(prefixCls, "-custom-component"), oriProps === null || oriProps === void 0 ? void 0 : oriProps.className, motionClassName) }; }); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](component, newProps, numberNodes); }; /* harmony default export */ __webpack_exports__["a"] = (ScrollNumber); /***/ }), /***/ "./components/badge/SingleNumber.tsx": /*!*******************************************!*\ !*** ./components/badge/SingleNumber.tsx ***! \*******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SingleNumber; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); function UnitNumber(_ref) { var prefixCls = _ref.prefixCls, value = _ref.value, current = _ref.current, _ref$offset = _ref.offset, offset = _ref$offset === void 0 ? 0 : _ref$offset; var style; if (offset) { style = { position: 'absolute', top: "".concat(offset, "00%"), left: 0 }; } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("p", { style: style, className: classnames__WEBPACK_IMPORTED_MODULE_3___default()("".concat(prefixCls, "-only-unit"), { current: current }) }, value); } function getOffset(start, end, unit) { var index = start; var offset = 0; while ((index + 10) % 10 !== end) { index += unit; offset += unit; } return offset; } function SingleNumber(props) { var prefixCls = props.prefixCls, originCount = props.count, originValue = props.value; var value = Number(originValue); var count = Math.abs(originCount); var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"](value), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_React$useState, 2), prevValue = _React$useState2[0], setPrevValue = _React$useState2[1]; var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_2__["useState"](count), _React$useState4 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_React$useState3, 2), prevCount = _React$useState4[0], setPrevCount = _React$useState4[1]; // ============================= Events ============================= var onTransitionEnd = function onTransitionEnd() { setPrevValue(value); setPrevCount(count); }; // Fallback if transition event not support react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { var timeout = setTimeout(function () { onTransitionEnd(); }, 1000); return function () { clearTimeout(timeout); }; }, [value]); // ============================= Render ============================= // Render unit list var unitNodes; var offsetStyle; if (prevValue === value || Number.isNaN(value) || Number.isNaN(prevValue)) { // Nothing to change unitNodes = [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](UnitNumber, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, props, { key: value, current: true }))]; offsetStyle = { transition: 'none' }; } else { unitNodes = []; // Fill basic number units var end = value + 10; var unitNumberList = []; for (var index = value; index <= end; index += 1) { unitNumberList.push(index); } // Fill with number unit nodes var prevIndex = unitNumberList.findIndex(function (n) { return n % 10 === prevValue; }); unitNodes = unitNumberList.map(function (n, index) { var singleUnit = n % 10; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](UnitNumber, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, props, { key: n, value: singleUnit, offset: index - prevIndex, current: index === prevIndex })); }); // Calculate container offset value var unit = prevCount < count ? 1 : -1; offsetStyle = { transform: "translateY(".concat(-getOffset(prevValue, value, unit), "00%)") }; } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { className: "".concat(prefixCls, "-only"), style: offsetStyle, onTransitionEnd: onTransitionEnd }, unitNodes); } /***/ }), /***/ "./components/badge/index.tsx": /*!************************************!*\ !*** ./components/badge/index.tsx ***! \************************************/ /*! exports provided: ScrollNumberProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var rc_motion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-motion */ "./node_modules/rc-motion/es/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _ScrollNumber__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ScrollNumber */ "./components/badge/ScrollNumber.tsx"); /* harmony import */ var _Ribbon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Ribbon */ "./components/badge/Ribbon.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils */ "./components/badge/utils.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Badge = function Badge(_a) { var _classNames, _classNames2; var customizePrefixCls = _a.prefixCls, customizeScrollNumberPrefixCls = _a.scrollNumberPrefixCls, children = _a.children, status = _a.status, text = _a.text, color = _a.color, _a$count = _a.count, count = _a$count === void 0 ? null : _a$count, _a$overflowCount = _a.overflowCount, overflowCount = _a$overflowCount === void 0 ? 99 : _a$overflowCount, _a$dot = _a.dot, dot = _a$dot === void 0 ? false : _a$dot, _a$size = _a.size, size = _a$size === void 0 ? 'default' : _a$size, title = _a.title, offset = _a.offset, style = _a.style, className = _a.className, _a$showZero = _a.showZero, showZero = _a$showZero === void 0 ? false : _a$showZero, restProps = __rest(_a, ["prefixCls", "scrollNumberPrefixCls", "children", "status", "text", "color", "count", "overflowCount", "dot", "size", "title", "offset", "style", "className", "showZero"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_3__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_8__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var prefixCls = getPrefixCls('badge', customizePrefixCls); // ================================ Misc ================================ var numberedDisplayCount = count > overflowCount ? "".concat(overflowCount, "+") : count; var hasStatus = status !== null && status !== undefined || color !== null && color !== undefined; var isZero = numberedDisplayCount === '0' || numberedDisplayCount === 0; var showAsDot = dot && !isZero || hasStatus; var mergedCount = showAsDot ? '' : numberedDisplayCount; var isHidden = Object(react__WEBPACK_IMPORTED_MODULE_3__["useMemo"])(function () { var isEmpty = mergedCount === null || mergedCount === undefined || mergedCount === ''; return (isEmpty || isZero && !showZero) && !showAsDot; }, [mergedCount, isZero, showZero, showAsDot]); // Count should be cache in case hidden change it var countRef = Object(react__WEBPACK_IMPORTED_MODULE_3__["useRef"])(count); if (!isHidden) { countRef.current = count; } var livingCount = countRef.current; // We need cache count since remove motion should not change count display var displayCountRef = Object(react__WEBPACK_IMPORTED_MODULE_3__["useRef"])(mergedCount); if (!isHidden) { displayCountRef.current = mergedCount; } var displayCount = displayCountRef.current; // We will cache the dot status to avoid shaking on leaved motion var isDotRef = Object(react__WEBPACK_IMPORTED_MODULE_3__["useRef"])(showAsDot); if (!isHidden) { isDotRef.current = showAsDot; } // =============================== Styles =============================== var mergedStyle = Object(react__WEBPACK_IMPORTED_MODULE_3__["useMemo"])(function () { if (!offset) { return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, style); } var offsetStyle = { marginTop: offset[1] }; if (direction === 'rtl') { offsetStyle.left = parseInt(offset[0], 10); } else { offsetStyle.right = -parseInt(offset[0], 10); } return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, offsetStyle), style); }, [direction, offset, style]); // =============================== Render =============================== // >>> Title var titleNode = title !== null && title !== void 0 ? title : typeof livingCount === 'string' || typeof livingCount === 'number' ? livingCount : undefined; // >>> Status Text var statusTextNode = isHidden || !text ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", { className: "".concat(prefixCls, "-status-text") }, text); // >>> Display Component var displayNode = !livingCount || Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(livingCount) !== 'object' ? undefined : Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_9__[/* cloneElement */ "a"])(livingCount, function (oriProps) { return { style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, mergedStyle), oriProps.style) }; }); // Shared styles var statusCls = classnames__WEBPACK_IMPORTED_MODULE_5___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-status-dot"), hasStatus), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-status-").concat(status), !!status), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-status-").concat(color), Object(_utils__WEBPACK_IMPORTED_MODULE_10__[/* isPresetColor */ "a"])(color)), _classNames)); var statusStyle = {}; if (color && !Object(_utils__WEBPACK_IMPORTED_MODULE_10__[/* isPresetColor */ "a"])(color)) { statusStyle.background = color; } var badgeClassName = classnames__WEBPACK_IMPORTED_MODULE_5___default()(prefixCls, (_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-status"), hasStatus), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-not-a-wrapper"), !children), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames2), className); // if (!children && hasStatus) { var statusTextColor = mergedStyle.color; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, restProps, { className: badgeClassName, style: mergedStyle }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", { className: statusCls, style: statusStyle }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", { style: { color: statusTextColor }, className: "".concat(prefixCls, "-status-text") }, text)); } // }> return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, restProps, { className: badgeClassName }), children, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](rc_motion__WEBPACK_IMPORTED_MODULE_4__[/* default */ "b"], { visible: !isHidden, motionName: "".concat(prefixCls, "-zoom"), motionAppear: false }, function (_ref) { var _classNames3; var motionClassName = _ref.className; var scrollNumberPrefixCls = getPrefixCls('scroll-number', customizeScrollNumberPrefixCls); var isDot = isDotRef.current; var scrollNumberCls = classnames__WEBPACK_IMPORTED_MODULE_5___default()((_classNames3 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-dot"), isDot), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-count"), !isDot), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-count-sm"), size === 'small'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-multiple-words"), !isDot && displayCount && displayCount.toString().length > 1), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-status-").concat(status), !!status), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-status-").concat(color), Object(_utils__WEBPACK_IMPORTED_MODULE_10__[/* isPresetColor */ "a"])(color)), _classNames3)); var scrollNumberStyle = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, mergedStyle); if (color && !Object(_utils__WEBPACK_IMPORTED_MODULE_10__[/* isPresetColor */ "a"])(color)) { scrollNumberStyle = scrollNumberStyle || {}; scrollNumberStyle.background = color; } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_ScrollNumber__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], { prefixCls: scrollNumberPrefixCls, show: !isHidden, motionClassName: motionClassName, className: scrollNumberCls, count: displayCount, title: titleNode, style: scrollNumberStyle, key: "scrollNumber" }, displayNode); }), statusTextNode); }; Badge.Ribbon = _Ribbon__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"]; /* harmony default export */ __webpack_exports__["a"] = (Badge); /***/ }), /***/ "./components/badge/style/index.less": /*!*******************************************!*\ !*** ./components/badge/style/index.less ***! \*******************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/badge/style/index.tsx": /*!******************************************!*\ !*** ./components/badge/style/index.tsx ***! \******************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/badge/style/index.less"); /***/ }), /***/ "./components/badge/utils.tsx": /*!************************************!*\ !*** ./components/badge/utils.tsx ***! \************************************/ /*! exports provided: isPresetColor */ /*! exports used: isPresetColor */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isPresetColor; }); /* harmony import */ var _util_colors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_util/colors */ "./components/_util/colors.ts"); // eslint-disable-next-line import/prefer-default-export function isPresetColor(color) { return _util_colors__WEBPACK_IMPORTED_MODULE_0__[/* PresetColorTypes */ "a"].indexOf(color) !== -1; } /***/ }), /***/ "./components/breadcrumb/Breadcrumb.tsx": /*!**********************************************!*\ !*** ./components/breadcrumb/Breadcrumb.tsx ***! \**********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/Children/toArray */ "./node_modules/rc-util/es/Children/toArray.js"); /* harmony import */ var _BreadcrumbItem__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BreadcrumbItem */ "./components/breadcrumb/BreadcrumbItem.tsx"); /* harmony import */ var _BreadcrumbSeparator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./BreadcrumbSeparator */ "./components/breadcrumb/BreadcrumbSeparator.tsx"); /* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../menu */ "./components/menu/index.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; function getBreadcrumbName(route, params) { if (!route.breadcrumbName) { return null; } var paramsKeys = Object.keys(params).join('|'); var name = route.breadcrumbName.replace(new RegExp(":(".concat(paramsKeys, ")"), 'g'), function (replacement, key) { return params[key] || replacement; }); return name; } function defaultItemRender(route, params, routes, paths) { var isLastItem = routes.indexOf(route) === routes.length - 1; var name = getBreadcrumbName(route, params); return isLastItem ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", null, name) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("a", { href: "#/".concat(paths.join('/')) }, name); } var getPath = function getPath(path, params) { path = (path || '').replace(/^\//, ''); Object.keys(params).forEach(function (key) { path = path.replace(":".concat(key), params[key]); }); return path; }; var addChildPath = function addChildPath(paths) { var childPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; var params = arguments.length > 2 ? arguments[2] : undefined; var originalPaths = Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(paths); var path = getPath(childPath, params); if (path) { originalPaths.push(path); } return originalPaths; }; var Breadcrumb = function Breadcrumb(_a) { var customizePrefixCls = _a.prefixCls, _a$separator = _a.separator, separator = _a$separator === void 0 ? '/' : _a$separator, style = _a.style, className = _a.className, routes = _a.routes, children = _a.children, _a$itemRender = _a.itemRender, itemRender = _a$itemRender === void 0 ? defaultItemRender : _a$itemRender, _a$params = _a.params, params = _a$params === void 0 ? {} : _a$params, restProps = __rest(_a, ["prefixCls", "separator", "style", "className", "routes", "children", "itemRender", "params"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_3__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_9__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var crumbs; var prefixCls = getPrefixCls('breadcrumb', customizePrefixCls); if (routes && routes.length > 0) { // generated by route var paths = []; crumbs = routes.map(function (route) { var path = getPath(route.path, params); if (path) { paths.push(path); } // generated overlay by route.children var overlay; if (route.children && route.children.length) { overlay = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_menu__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], null, route.children.map(function (child) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_menu__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].Item, { key: child.path || child.breadcrumbName }, itemRender(child, params, routes, addChildPath(paths, child.path, params))); })); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_BreadcrumbItem__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], { overlay: overlay, separator: separator, key: path || route.breadcrumbName }, itemRender(route, params, routes, paths)); }); } else if (children) { crumbs = Object(rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(children).map(function (element, index) { if (!element) { return element; } if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(element.type && (element.type.__ANT_BREADCRUMB_ITEM === true || element.type.__ANT_BREADCRUMB_SEPARATOR === true), 'Breadcrumb', "Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children"); return Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_11__[/* cloneElement */ "a"])(element, { separator: separator, key: index }); }); } var breadcrumbClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()(prefixCls, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ className: breadcrumbClassName, style: style }, restProps), crumbs); }; Breadcrumb.Item = _BreadcrumbItem__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"]; Breadcrumb.Separator = _BreadcrumbSeparator__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"]; /* harmony default export */ __webpack_exports__["a"] = (Breadcrumb); /***/ }), /***/ "./components/breadcrumb/BreadcrumbItem.tsx": /*!**************************************************!*\ !*** ./components/breadcrumb/BreadcrumbItem.tsx ***! \**************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _ant_design_icons_es_icons_DownOutlined__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ant-design/icons/es/icons/DownOutlined */ "./node_modules/@ant-design/icons/es/icons/DownOutlined.js"); /* harmony import */ var _dropdown_dropdown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../dropdown/dropdown */ "./components/dropdown/dropdown.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var BreadcrumbItem = function BreadcrumbItem(_a) { var customizePrefixCls = _a.prefixCls, _a$separator = _a.separator, separator = _a$separator === void 0 ? '/' : _a$separator, children = _a.children, overlay = _a.overlay, dropdownProps = _a.dropdownProps, restProps = __rest(_a, ["prefixCls", "separator", "children", "overlay", "dropdownProps"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_1__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_4__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls; var prefixCls = getPrefixCls('breadcrumb', customizePrefixCls); /** If overlay is have Wrap a DropDown */ var renderBreadcrumbNode = function renderBreadcrumbNode(breadcrumbItem) { if (overlay) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_dropdown_dropdown__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ overlay: overlay, placement: "bottomCenter" }, dropdownProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("span", { className: "".concat(prefixCls, "-overlay-link") }, breadcrumbItem, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_ant_design_icons_es_icons_DownOutlined__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], null))); } return breadcrumbItem; }; var link; if ('href' in restProps) { link = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("a", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ className: "".concat(prefixCls, "-link") }, restProps), children); } else { link = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("span", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ className: "".concat(prefixCls, "-link") }, restProps), children); } // wrap to dropDown link = renderBreadcrumbNode(link); if (children) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("span", null, link, separator && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("span", { className: "".concat(prefixCls, "-separator") }, separator)); } return null; }; BreadcrumbItem.__ANT_BREADCRUMB_ITEM = true; /* harmony default export */ __webpack_exports__["a"] = (BreadcrumbItem); /***/ }), /***/ "./components/breadcrumb/BreadcrumbSeparator.tsx": /*!*******************************************************!*\ !*** ./components/breadcrumb/BreadcrumbSeparator.tsx ***! \*******************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var BreadcrumbSeparator = function BreadcrumbSeparator(_ref) { var children = _ref.children; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_0__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_1__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls; var prefixCls = getPrefixCls('breadcrumb'); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: "".concat(prefixCls, "-separator") }, children || '/'); }; BreadcrumbSeparator.__ANT_BREADCRUMB_SEPARATOR = true; /* harmony default export */ __webpack_exports__["a"] = (BreadcrumbSeparator); /***/ }), /***/ "./components/breadcrumb/index.tsx": /*!*****************************************!*\ !*** ./components/breadcrumb/index.tsx ***! \*****************************************/ /*! exports provided: BreadcrumbProps, BreadcrumbItemProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _Breadcrumb__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Breadcrumb */ "./components/breadcrumb/Breadcrumb.tsx"); /* harmony import */ var _BreadcrumbItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BreadcrumbItem */ "./components/breadcrumb/BreadcrumbItem.tsx"); /* harmony default export */ __webpack_exports__["a"] = (_Breadcrumb__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]); /***/ }), /***/ "./components/breadcrumb/style/index.less": /*!************************************************!*\ !*** ./components/breadcrumb/style/index.less ***! \************************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/breadcrumb/style/index.tsx": /*!***********************************************!*\ !*** ./components/breadcrumb/style/index.tsx ***! \***********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/breadcrumb/style/index.less"); /* harmony import */ var _menu_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../menu/style */ "./components/menu/style/index.tsx"); /* harmony import */ var _dropdown_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dropdown/style */ "./components/dropdown/style/index.tsx"); // style dependencies /***/ }), /***/ "./components/button/LoadingIcon.tsx": /*!*******************************************!*\ !*** ./components/button/LoadingIcon.tsx ***! \*******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var rc_motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-motion */ "./node_modules/rc-motion/es/index.js"); /* harmony import */ var _ant_design_icons_es_icons_LoadingOutlined__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ant-design/icons/es/icons/LoadingOutlined */ "./node_modules/@ant-design/icons/es/icons/LoadingOutlined.js"); var getCollapsedWidth = function getCollapsedWidth() { return { width: 0, opacity: 0, transform: 'scale(0)' }; }; var getRealWidth = function getRealWidth(node) { return { width: node.scrollWidth, opacity: 1, transform: 'scale(1)' }; }; var LoadingIcon = function LoadingIcon(_ref) { var prefixCls = _ref.prefixCls, loading = _ref.loading, existIcon = _ref.existIcon; var visible = !!loading; if (existIcon) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: "".concat(prefixCls, "-loading-icon") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ant_design_icons_es_icons_LoadingOutlined__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], null)); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(rc_motion__WEBPACK_IMPORTED_MODULE_1__[/* default */ "b"], { visible: visible // We do not really use this motionName , motionName: "".concat(prefixCls, "-loading-icon-motion"), removeOnLeave: true, onAppearStart: getCollapsedWidth, onAppearActive: getRealWidth, onEnterStart: getCollapsedWidth, onEnterActive: getRealWidth, onLeaveStart: getRealWidth, onLeaveActive: getCollapsedWidth }, function (_ref2, ref) { var className = _ref2.className, style = _ref2.style; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: "".concat(prefixCls, "-loading-icon"), style: style, ref: ref }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ant_design_icons_es_icons_LoadingOutlined__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], { className: className })); }); }; /* harmony default export */ __webpack_exports__["a"] = (LoadingIcon); /***/ }), /***/ "./components/button/button-group.tsx": /*!********************************************!*\ !*** ./components/button/button-group.tsx ***! \********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_unreachableException__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../_util/unreachableException */ "./components/_util/unreachableException.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var ButtonGroup = function ButtonGroup(props) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_4__[/* ConfigConsumer */ "a"], null, function (_ref) { var _classNames; var getPrefixCls = _ref.getPrefixCls, direction = _ref.direction; var customizePrefixCls = props.prefixCls, size = props.size, className = props.className, others = __rest(props, ["prefixCls", "size", "className"]); var prefixCls = getPrefixCls('btn-group', customizePrefixCls); // large => lg // small => sm var sizeCls = ''; switch (size) { case 'large': sizeCls = 'lg'; break; case 'small': sizeCls = 'sm'; break; case 'middle': case undefined: break; default: // eslint-disable-next-line no-console console.warn(new _util_unreachableException__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"](size)); } var classes = classnames__WEBPACK_IMPORTED_MODULE_3___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(sizeCls), sizeCls), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, others, { className: classes })); }); }; /* harmony default export */ __webpack_exports__["a"] = (ButtonGroup); /***/ }), /***/ "./components/button/button.tsx": /*!**************************************!*\ !*** ./components/button/button.tsx ***! \**************************************/ /*! exports provided: convertLegacyProps, default */ /*! exports used: convertLegacyProps, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return convertLegacyProps; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var _button_group__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./button-group */ "./components/button/button-group.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_wave__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../_util/wave */ "./components/_util/wave.tsx"); /* harmony import */ var _util_type__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../_util/type */ "./components/_util/type.ts"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../config-provider/SizeContext */ "./components/config-provider/SizeContext.tsx"); /* harmony import */ var _LoadingIcon__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./LoadingIcon */ "./components/button/LoadingIcon.tsx"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; /* eslint-disable react/button-has-type */ var rxTwoCNChar = /^[\u4e00-\u9fa5]{2}$/; var isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar); function isString(str) { return typeof str === 'string'; } function isUnborderedButtonType(type) { return type === 'text' || type === 'link'; } // Insert one space between two chinese characters automatically. function insertSpace(child, needInserted) { // Check the child if is undefined or null. if (child == null) { return; } var SPACE = needInserted ? ' ' : ''; // strictNullChecks oops. if (typeof child !== 'string' && typeof child !== 'number' && isString(child.type) && isTwoCNChar(child.props.children)) { return Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_14__[/* cloneElement */ "a"])(child, { children: child.props.children.split('').join(SPACE) }); } if (typeof child === 'string') { if (isTwoCNChar(child)) { child = child.split('').join(SPACE); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("span", null, child); } return child; } function spaceChildren(children, needInserted) { var isPrevChildPure = false; var childList = []; react__WEBPACK_IMPORTED_MODULE_4__["Children"].forEach(children, function (child) { var type = Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(child); var isCurrentChildPure = type === 'string' || type === 'number'; if (isPrevChildPure && isCurrentChildPure) { var lastIndex = childList.length - 1; var lastChild = childList[lastIndex]; childList[lastIndex] = "".concat(lastChild).concat(child); } else { childList.push(child); } isPrevChildPure = isCurrentChildPure; }); // Pass to React.Children.map to auto fill key return react__WEBPACK_IMPORTED_MODULE_4__["Children"].map(childList, function (child) { return insertSpace(child, needInserted); }); } var ButtonTypes = Object(_util_type__WEBPACK_IMPORTED_MODULE_10__[/* tuple */ "a"])('default', 'primary', 'ghost', 'dashed', 'link', 'text'); var ButtonShapes = Object(_util_type__WEBPACK_IMPORTED_MODULE_10__[/* tuple */ "a"])('circle', 'round'); var ButtonHTMLTypes = Object(_util_type__WEBPACK_IMPORTED_MODULE_10__[/* tuple */ "a"])('submit', 'button', 'reset'); function convertLegacyProps(type) { if (type === 'danger') { return { danger: true }; } return { type: type }; } var InternalButton = function InternalButton(props, ref) { var _classNames; var _props$loading = props.loading, loading = _props$loading === void 0 ? false : _props$loading, customizePrefixCls = props.prefixCls, type = props.type, danger = props.danger, shape = props.shape, customizeSize = props.size, className = props.className, children = props.children, icon = props.icon, _props$ghost = props.ghost, ghost = _props$ghost === void 0 ? false : _props$ghost, _props$block = props.block, block = _props$block === void 0 ? false : _props$block, _props$htmlType = props.htmlType, htmlType = _props$htmlType === void 0 ? 'button' : _props$htmlType, rest = __rest(props, ["loading", "prefixCls", "type", "danger", "shape", "size", "className", "children", "icon", "ghost", "block", "htmlType"]); var size = react__WEBPACK_IMPORTED_MODULE_4__["useContext"](_config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_12__[/* default */ "b"]); var _React$useState = react__WEBPACK_IMPORTED_MODULE_4__["useState"](!!loading), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_React$useState, 2), innerLoading = _React$useState2[0], setLoading = _React$useState2[1]; var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_4__["useState"](false), _React$useState4 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_React$useState3, 2), hasTwoCNChar = _React$useState4[0], setHasTwoCNChar = _React$useState4[1]; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_4__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_8__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, autoInsertSpaceInButton = _React$useContext.autoInsertSpaceInButton, direction = _React$useContext.direction; var buttonRef = ref || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createRef"](); var delayTimeoutRef = react__WEBPACK_IMPORTED_MODULE_4__["useRef"](); var isNeedInserted = function isNeedInserted() { return react__WEBPACK_IMPORTED_MODULE_4__["Children"].count(children) === 1 && !icon && !isUnborderedButtonType(type); }; var fixTwoCNChar = function fixTwoCNChar() { // Fix for HOC usage like if (!buttonRef || !buttonRef.current || autoInsertSpaceInButton === false) { return; } var buttonText = buttonRef.current.textContent; if (isNeedInserted() && isTwoCNChar(buttonText)) { if (!hasTwoCNChar) { setHasTwoCNChar(true); } } else if (hasTwoCNChar) { setHasTwoCNChar(false); } }; // =============== Update Loading =============== var loadingOrDelay; if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(loading) === 'object' && loading.delay) { loadingOrDelay = loading.delay || true; } else { loadingOrDelay = !!loading; } react__WEBPACK_IMPORTED_MODULE_4__["useEffect"](function () { clearTimeout(delayTimeoutRef.current); if (typeof loadingOrDelay === 'number') { delayTimeoutRef.current = window.setTimeout(function () { setLoading(loadingOrDelay); }, loadingOrDelay); } else { setLoading(loadingOrDelay); } }, [loadingOrDelay]); react__WEBPACK_IMPORTED_MODULE_4__["useEffect"](fixTwoCNChar, [buttonRef]); var handleClick = function handleClick(e) { var _a; var onClick = props.onClick, disabled = props.disabled; // https://github.com/ant-design/ant-design/issues/30207 if (innerLoading || disabled) { e.preventDefault(); return; } (_a = onClick) === null || _a === void 0 ? void 0 : _a(e); }; if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"])(!(typeof icon === 'string' && icon.length > 2), 'Button', "`icon` is using ReactNode instead of string naming in v4. Please check `".concat(icon, "` at https://ant.design/components/icon")); Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"])(!(ghost && isUnborderedButtonType(type)), 'Button', "`link` or `text` button can't be a `ghost` button."); var prefixCls = getPrefixCls('btn', customizePrefixCls); var autoInsertSpace = autoInsertSpaceInButton !== false; // large => lg // small => sm var sizeCls = ''; switch (customizeSize || size) { case 'large': sizeCls = 'lg'; break; case 'small': sizeCls = 'sm'; break; default: break; } var iconType = innerLoading ? 'loading' : icon; var classes = classnames__WEBPACK_IMPORTED_MODULE_5___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(type), type), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(shape), shape), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(sizeCls), sizeCls), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-icon-only"), !children && children !== 0 && !!iconType), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-background-ghost"), ghost && !isUnborderedButtonType(type)), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-loading"), innerLoading), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-two-chinese-chars"), hasTwoCNChar && autoInsertSpace), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-block"), block), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-dangerous"), !!danger), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className); var iconNode = icon && !innerLoading ? icon : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_LoadingIcon__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"], { existIcon: !!icon, prefixCls: prefixCls, loading: !!innerLoading }); var kids = children || children === 0 ? spaceChildren(children, isNeedInserted() && autoInsertSpace) : null; var linkButtonRestProps = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(rest, ['navigate']); if (linkButtonRestProps.href !== undefined) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("a", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, linkButtonRestProps, { className: classes, onClick: handleClick, ref: buttonRef }), iconNode, kids); } var buttonNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("button", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, rest, { type: htmlType, className: classes, onClick: handleClick, ref: buttonRef }), iconNode, kids); if (isUnborderedButtonType(type)) { return buttonNode; } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_util_wave__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], null, buttonNode); }; var Button = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["forwardRef"](InternalButton); Button.displayName = 'Button'; Button.Group = _button_group__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"]; Button.__ANT_BUTTON = true; /* harmony default export */ __webpack_exports__["b"] = (Button); /***/ }), /***/ "./components/button/index.tsx": /*!*************************************!*\ !*** ./components/button/index.tsx ***! \*************************************/ /*! exports provided: ButtonProps, ButtonShape, ButtonType, ButtonGroupProps, ButtonSize, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./button */ "./components/button/button.tsx"); /* harmony import */ var _button_group__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./button-group */ "./components/button/button-group.tsx"); /* harmony import */ var _config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config-provider/SizeContext */ "./components/config-provider/SizeContext.tsx"); /* harmony default export */ __webpack_exports__["a"] = (_button__WEBPACK_IMPORTED_MODULE_0__[/* default */ "b"]); /***/ }), /***/ "./components/button/style/index.less": /*!********************************************!*\ !*** ./components/button/style/index.less ***! \********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/button/style/index.tsx": /*!*******************************************!*\ !*** ./components/button/style/index.tsx ***! \*******************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/button/style/index.less"); /***/ }), /***/ "./components/calendar/Header.tsx": /*!****************************************!*\ !*** ./components/calendar/Header.tsx ***! \****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../select */ "./components/select/index.tsx"); /* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../radio */ "./components/radio/index.tsx"); var YearSelectOffset = 10; var YearSelectTotal = 20; function YearSelect(props) { var fullscreen = props.fullscreen, validRange = props.validRange, generateConfig = props.generateConfig, locale = props.locale, prefixCls = props.prefixCls, value = props.value, _onChange = props.onChange, divRef = props.divRef; var year = generateConfig.getYear(value || generateConfig.getNow()); var start = year - YearSelectOffset; var end = start + YearSelectTotal; if (validRange) { start = generateConfig.getYear(validRange[0]); end = generateConfig.getYear(validRange[1]) + 1; } var suffix = locale && locale.year === '年' ? '年' : ''; var options = []; for (var index = start; index < end; index++) { options.push({ label: "".concat(index).concat(suffix), value: index }); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_select__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], { size: fullscreen ? undefined : 'small', options: options, value: year, className: "".concat(prefixCls, "-year-select"), onChange: function onChange(numYear) { var newDate = generateConfig.setYear(value, numYear); if (validRange) { var _validRange = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(validRange, 2), startDate = _validRange[0], endDate = _validRange[1]; var newYear = generateConfig.getYear(newDate); var newMonth = generateConfig.getMonth(newDate); if (newYear === generateConfig.getYear(endDate) && newMonth > generateConfig.getMonth(endDate)) { newDate = generateConfig.setMonth(newDate, generateConfig.getMonth(endDate)); } if (newYear === generateConfig.getYear(startDate) && newMonth < generateConfig.getMonth(startDate)) { newDate = generateConfig.setMonth(newDate, generateConfig.getMonth(startDate)); } } _onChange(newDate); }, getPopupContainer: function getPopupContainer() { return divRef.current; } }); } function MonthSelect(props) { var prefixCls = props.prefixCls, fullscreen = props.fullscreen, validRange = props.validRange, value = props.value, generateConfig = props.generateConfig, locale = props.locale, _onChange2 = props.onChange, divRef = props.divRef; var month = generateConfig.getMonth(value || generateConfig.getNow()); var start = 0; var end = 11; if (validRange) { var _validRange2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(validRange, 2), rangeStart = _validRange2[0], rangeEnd = _validRange2[1]; var currentYear = generateConfig.getYear(value); if (generateConfig.getYear(rangeEnd) === currentYear) { end = generateConfig.getMonth(rangeEnd); } if (generateConfig.getYear(rangeStart) === currentYear) { start = generateConfig.getMonth(rangeStart); } } var months = locale.shortMonths || generateConfig.locale.getShortMonths(locale.locale); var options = []; for (var index = start; index <= end; index += 1) { options.push({ label: months[index], value: index }); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_select__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], { size: fullscreen ? undefined : 'small', className: "".concat(prefixCls, "-month-select"), value: month, options: options, onChange: function onChange(newMonth) { _onChange2(generateConfig.setMonth(value, newMonth)); }, getPopupContainer: function getPopupContainer() { return divRef.current; } }); } function ModeSwitch(props) { var prefixCls = props.prefixCls, locale = props.locale, mode = props.mode, fullscreen = props.fullscreen, onModeChange = props.onModeChange; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_radio__WEBPACK_IMPORTED_MODULE_4__[/* Group */ "b"], { onChange: function onChange(_ref) { var value = _ref.target.value; onModeChange(value); }, value: mode, size: fullscreen ? undefined : 'small', className: "".concat(prefixCls, "-mode-switch") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_radio__WEBPACK_IMPORTED_MODULE_4__[/* Button */ "a"], { value: "month" }, locale.month), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_radio__WEBPACK_IMPORTED_MODULE_4__[/* Button */ "a"], { value: "year" }, locale.year)); } function CalendarHeader(props) { var prefixCls = props.prefixCls, fullscreen = props.fullscreen, mode = props.mode, onChange = props.onChange, onModeChange = props.onModeChange; var divRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](null); var sharedProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, props), { onChange: onChange, fullscreen: fullscreen, divRef: divRef }); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-header"), ref: divRef }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](YearSelect, sharedProps), mode === 'month' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](MonthSelect, sharedProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](ModeSwitch, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, sharedProps, { onModeChange: onModeChange }))); } /* harmony default export */ __webpack_exports__["a"] = (CalendarHeader); /***/ }), /***/ "./components/calendar/generateCalendar.tsx": /*!**************************************************!*\ !*** ./components/calendar/generateCalendar.tsx ***! \**************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-util/es/hooks/useMergedState */ "./node_modules/rc-util/es/hooks/useMergedState.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var lodash_padStart__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/padStart */ "./node_modules/lodash/padStart.js"); /* harmony import */ var lodash_padStart__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_padStart__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var rc_picker__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-picker */ "./node_modules/rc-picker/es/index.js"); /* harmony import */ var _locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../locale-provider/LocaleReceiver */ "./components/locale-provider/LocaleReceiver.tsx"); /* harmony import */ var _locale_en_US__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./locale/en_US */ "./components/calendar/locale/en_US.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _Header__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Header */ "./components/calendar/Header.tsx"); function generateCalendar(generateConfig) { function isSameYear(date1, date2) { return date1 && date2 && generateConfig.getYear(date1) === generateConfig.getYear(date2); } function isSameMonth(date1, date2) { return isSameYear(date1, date2) && generateConfig.getMonth(date1) === generateConfig.getMonth(date2); } function isSameDate(date1, date2) { return isSameMonth(date1, date2) && generateConfig.getDate(date1) === generateConfig.getDate(date2); } var Calendar = function Calendar(props) { var customizePrefixCls = props.prefixCls, className = props.className, style = props.style, dateFullCellRender = props.dateFullCellRender, dateCellRender = props.dateCellRender, monthFullCellRender = props.monthFullCellRender, monthCellRender = props.monthCellRender, headerRender = props.headerRender, value = props.value, defaultValue = props.defaultValue, disabledDate = props.disabledDate, mode = props.mode, validRange = props.validRange, _props$fullscreen = props.fullscreen, fullscreen = _props$fullscreen === void 0 ? true : _props$fullscreen, onChange = props.onChange, onPanelChange = props.onPanelChange, onSelect = props.onSelect; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_3__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_10__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var prefixCls = getPrefixCls('picker', customizePrefixCls); var calendarPrefixCls = "".concat(prefixCls, "-calendar"); var today = generateConfig.getNow(); // ====================== State ======================= // Value var _useMergedState = Object(rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(function () { return value || generateConfig.getNow(); }, { defaultValue: defaultValue, value: value }), _useMergedState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_useMergedState, 2), mergedValue = _useMergedState2[0], setMergedValue = _useMergedState2[1]; // Mode var _useMergedState3 = Object(rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])('month', { value: mode }), _useMergedState4 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_useMergedState3, 2), mergedMode = _useMergedState4[0], setMergedMode = _useMergedState4[1]; var panelMode = react__WEBPACK_IMPORTED_MODULE_3__["useMemo"](function () { return mergedMode === 'year' ? 'month' : 'date'; }, [mergedMode]); // Disabled Date var mergedDisabledDate = react__WEBPACK_IMPORTED_MODULE_3__["useCallback"](function (date) { var notInRange = validRange ? generateConfig.isAfter(validRange[0], date) || generateConfig.isAfter(date, validRange[1]) : false; return notInRange || !!(disabledDate === null || disabledDate === void 0 ? void 0 : disabledDate(date)); }, [disabledDate, validRange]); // ====================== Events ====================== var triggerPanelChange = function triggerPanelChange(date, newMode) { onPanelChange === null || onPanelChange === void 0 ? void 0 : onPanelChange(date, newMode); }; var triggerChange = function triggerChange(date) { setMergedValue(date); if (!isSameDate(date, mergedValue)) { // Trigger when month panel switch month if (panelMode === 'date' && !isSameMonth(date, mergedValue) || panelMode === 'month' && !isSameYear(date, mergedValue)) { triggerPanelChange(date, mergedMode); } onChange === null || onChange === void 0 ? void 0 : onChange(date); } }; var triggerModeChange = function triggerModeChange(newMode) { setMergedMode(newMode); triggerPanelChange(mergedValue, newMode); }; var onInternalSelect = function onInternalSelect(date) { triggerChange(date); onSelect === null || onSelect === void 0 ? void 0 : onSelect(date); }; // ====================== Locale ====================== var getDefaultLocale = function getDefaultLocale() { var locale = props.locale; var result = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, _locale_en_US__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"]), locale); result.lang = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, result.lang), (locale || {}).lang); return result; }; // ====================== Render ====================== var dateRender = react__WEBPACK_IMPORTED_MODULE_3__["useCallback"](function (date) { if (dateFullCellRender) { return dateFullCellRender(date); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: classnames__WEBPACK_IMPORTED_MODULE_5___default()("".concat(prefixCls, "-cell-inner"), "".concat(calendarPrefixCls, "-date"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(calendarPrefixCls, "-date-today"), isSameDate(today, date))) }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(calendarPrefixCls, "-date-value") }, lodash_padStart__WEBPACK_IMPORTED_MODULE_6___default()(String(generateConfig.getDate(date)), 2, '0')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(calendarPrefixCls, "-date-content") }, dateCellRender && dateCellRender(date))); }, [dateFullCellRender, dateCellRender]); var monthRender = react__WEBPACK_IMPORTED_MODULE_3__["useCallback"](function (date, locale) { if (monthFullCellRender) { return monthFullCellRender(date); } var months = locale.shortMonths || generateConfig.locale.getShortMonths(locale.locale); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: classnames__WEBPACK_IMPORTED_MODULE_5___default()("".concat(prefixCls, "-cell-inner"), "".concat(calendarPrefixCls, "-date"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(calendarPrefixCls, "-date-today"), isSameMonth(today, date))) }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(calendarPrefixCls, "-date-value") }, months[generateConfig.getMonth(date)]), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(calendarPrefixCls, "-date-content") }, monthCellRender && monthCellRender(date))); }, [monthFullCellRender, monthCellRender]); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], { componentName: "Calendar", defaultLocale: getDefaultLocale }, function (mergedLocale) { var _classNames3; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: classnames__WEBPACK_IMPORTED_MODULE_5___default()(calendarPrefixCls, (_classNames3 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames3, "".concat(calendarPrefixCls, "-full"), fullscreen), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames3, "".concat(calendarPrefixCls, "-mini"), !fullscreen), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames3, "".concat(calendarPrefixCls, "-rtl"), direction === 'rtl'), _classNames3), className), style: style }, headerRender ? headerRender({ value: mergedValue, type: mergedMode, onChange: onInternalSelect, onTypeChange: triggerModeChange }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_Header__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"], { prefixCls: calendarPrefixCls, value: mergedValue, generateConfig: generateConfig, mode: mergedMode, fullscreen: fullscreen, locale: mergedLocale.lang, validRange: validRange, onChange: onInternalSelect, onModeChange: triggerModeChange }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](rc_picker__WEBPACK_IMPORTED_MODULE_7__[/* PickerPanel */ "a"], { value: mergedValue, prefixCls: prefixCls, locale: mergedLocale.lang, generateConfig: generateConfig, dateRender: dateRender, monthCellRender: function monthCellRender(date) { return monthRender(date, mergedLocale.lang); }, onSelect: onInternalSelect, mode: panelMode, picker: panelMode, disabledDate: mergedDisabledDate, hideHeader: true })); }); }; return Calendar; } /* harmony default export */ __webpack_exports__["a"] = (generateCalendar); /***/ }), /***/ "./components/calendar/index.tsx": /*!***************************************!*\ !*** ./components/calendar/index.tsx ***! \***************************************/ /*! exports provided: CalendarProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var rc_picker_es_generate_moment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-picker/es/generate/moment */ "./node_modules/rc-picker/es/generate/moment.js"); /* harmony import */ var _generateCalendar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./generateCalendar */ "./components/calendar/generateCalendar.tsx"); var Calendar = Object(_generateCalendar__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(rc_picker_es_generate_moment__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]); /* harmony default export */ __webpack_exports__["a"] = (Calendar); /***/ }), /***/ "./components/calendar/locale/en_US.tsx": /*!**********************************************!*\ !*** ./components/calendar/locale/en_US.tsx ***! \**********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _date_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../date-picker/locale/en_US */ "./components/date-picker/locale/en_US.tsx"); /* harmony default export */ __webpack_exports__["a"] = (_date_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]); /***/ }), /***/ "./components/calendar/style/index.less": /*!**********************************************!*\ !*** ./components/calendar/style/index.less ***! \**********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/calendar/style/index.tsx": /*!*********************************************!*\ !*** ./components/calendar/style/index.tsx ***! \*********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/calendar/style/index.less"); /* harmony import */ var _select_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../select/style */ "./components/select/style/index.tsx"); /* harmony import */ var _radio_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../radio/style */ "./components/radio/style/index.tsx"); /* harmony import */ var _date_picker_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../date-picker/style */ "./components/date-picker/style/index.tsx"); // style dependencies // deps-lint-skip: date-picker /***/ }), /***/ "./components/card/Grid.tsx": /*!**********************************!*\ !*** ./components/card/Grid.tsx ***! \**********************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Grid = function Grid(_a) { var prefixCls = _a.prefixCls, className = _a.className, _a$hoverable = _a.hoverable, hoverable = _a$hoverable === void 0 ? true : _a$hoverable, props = __rest(_a, ["prefixCls", "className", "hoverable"]); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_4__[/* ConfigConsumer */ "a"], null, function (_ref) { var getPrefixCls = _ref.getPrefixCls; var prefix = getPrefixCls('card', prefixCls); var classString = classnames__WEBPACK_IMPORTED_MODULE_3___default()("".concat(prefix, "-grid"), className, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(prefix, "-grid-hoverable"), hoverable)); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, props, { className: classString })); }); }; /* harmony default export */ __webpack_exports__["a"] = (Grid); /***/ }), /***/ "./components/card/Meta.tsx": /*!**********************************!*\ !*** ./components/card/Meta.tsx ***! \**********************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Meta = function Meta(props) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_3__[/* ConfigConsumer */ "a"], null, function (_ref) { var getPrefixCls = _ref.getPrefixCls; var customizePrefixCls = props.prefixCls, className = props.className, avatar = props.avatar, title = props.title, description = props.description, others = __rest(props, ["prefixCls", "className", "avatar", "title", "description"]); var prefixCls = getPrefixCls('card', customizePrefixCls); var classString = classnames__WEBPACK_IMPORTED_MODULE_2___default()("".concat(prefixCls, "-meta"), className); var avatarDom = avatar ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(prefixCls, "-meta-avatar") }, avatar) : null; var titleDom = title ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(prefixCls, "-meta-title") }, title) : null; var descriptionDom = description ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(prefixCls, "-meta-description") }, description) : null; var MetaDetail = titleDom || descriptionDom ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(prefixCls, "-meta-detail") }, titleDom, descriptionDom) : null; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, others, { className: classString }), avatarDom, MetaDetail); }); }; /* harmony default export */ __webpack_exports__["a"] = (Meta); /***/ }), /***/ "./components/card/index.tsx": /*!***********************************!*\ !*** ./components/card/index.tsx ***! \***********************************/ /*! exports provided: CardGridProps, CardMetaProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var _Grid__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Grid */ "./components/card/Grid.tsx"); /* harmony import */ var _Meta__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Meta */ "./components/card/Meta.tsx"); /* harmony import */ var _tabs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../tabs */ "./components/tabs/index.tsx"); /* harmony import */ var _row__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../row */ "./components/row/index.tsx"); /* harmony import */ var _col__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../col */ "./components/col/index.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../config-provider/SizeContext */ "./components/config-provider/SizeContext.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; function getAction(actions) { var actionList = actions.map(function (action, index) { return ( /*#__PURE__*/ // eslint-disable-next-line react/no-array-index-key react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("li", { style: { width: "".concat(100 / actions.length, "%") }, key: "action-".concat(index) }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", null, action)) ); }); return actionList; } var Card = function Card(props) { var _extends2, _classNames; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_10__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var size = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_11__[/* default */ "b"]); var onTabChange = function onTabChange(key) { var _a; (_a = props.onTabChange) === null || _a === void 0 ? void 0 : _a.call(props, key); }; var isContainGrid = function isContainGrid() { var containGrid; react__WEBPACK_IMPORTED_MODULE_2__["Children"].forEach(props.children, function (element) { if (element && element.type && element.type === _Grid__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"]) { containGrid = true; } }); return containGrid; }; var customizePrefixCls = props.prefixCls, className = props.className, extra = props.extra, _props$headStyle = props.headStyle, headStyle = _props$headStyle === void 0 ? {} : _props$headStyle, _props$bodyStyle = props.bodyStyle, bodyStyle = _props$bodyStyle === void 0 ? {} : _props$bodyStyle, title = props.title, loading = props.loading, _props$bordered = props.bordered, bordered = _props$bordered === void 0 ? true : _props$bordered, customizeSize = props.size, type = props.type, cover = props.cover, actions = props.actions, tabList = props.tabList, children = props.children, activeTabKey = props.activeTabKey, defaultActiveTabKey = props.defaultActiveTabKey, tabBarExtraContent = props.tabBarExtraContent, hoverable = props.hoverable, _props$tabProps = props.tabProps, tabProps = _props$tabProps === void 0 ? {} : _props$tabProps, others = __rest(props, ["prefixCls", "className", "extra", "headStyle", "bodyStyle", "title", "loading", "bordered", "size", "type", "cover", "actions", "tabList", "children", "activeTabKey", "defaultActiveTabKey", "tabBarExtraContent", "hoverable", "tabProps"]); var prefixCls = getPrefixCls('card', customizePrefixCls); var loadingBlockStyle = bodyStyle.padding === 0 || bodyStyle.padding === '0px' ? { padding: 24 } : undefined; var block = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-loading-block") }); var loadingBlock = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-loading-content"), style: loadingBlockStyle }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_row__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], { gutter: 8 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_col__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], { span: 22 }, block)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_row__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], { gutter: 8 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_col__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], { span: 8 }, block), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_col__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], { span: 15 }, block)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_row__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], { gutter: 8 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_col__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], { span: 6 }, block), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_col__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], { span: 18 }, block)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_row__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], { gutter: 8 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_col__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], { span: 13 }, block), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_col__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], { span: 9 }, block)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_row__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], { gutter: 8 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_col__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], { span: 4 }, block), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_col__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], { span: 3 }, block), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_col__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], { span: 16 }, block))); var hasActiveTabKey = activeTabKey !== undefined; var extraProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, tabProps), (_extends2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_extends2, hasActiveTabKey ? 'activeKey' : 'defaultActiveKey', hasActiveTabKey ? activeTabKey : defaultActiveTabKey), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_extends2, "tabBarExtraContent", tabBarExtraContent), _extends2)); var head; var tabs = tabList && tabList.length ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_tabs__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ size: "large" }, extraProps, { className: "".concat(prefixCls, "-head-tabs"), onChange: onTabChange }), tabList.map(function (item) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_tabs__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].TabPane, { tab: item.tab, disabled: item.disabled, key: item.key }); })) : null; if (title || extra || tabs) { head = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-head"), style: headStyle }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-head-wrapper") }, title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-head-title") }, title), extra && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-extra") }, extra)), tabs); } var coverDom = cover ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-cover") }, cover) : null; var body = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-body"), style: bodyStyle }, loading ? loadingBlock : children); var actionDom = actions && actions.length ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("ul", { className: "".concat(prefixCls, "-actions") }, getAction(actions)) : null; var divProps = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(others, ['onTabChange']); var mergedSize = customizeSize || size; var classString = classnames__WEBPACK_IMPORTED_MODULE_3___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-loading"), loading), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-bordered"), bordered), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-hoverable"), hoverable), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-contain-grid"), isContainGrid()), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-contain-tabs"), tabList && tabList.length), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(mergedSize), mergedSize), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-type-").concat(type), !!type), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, divProps, { className: classString }), head, coverDom, body, actionDom); }; Card.Grid = _Grid__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"]; Card.Meta = _Meta__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"]; /* harmony default export */ __webpack_exports__["a"] = (Card); /***/ }), /***/ "./components/card/style/index.less": /*!******************************************!*\ !*** ./components/card/style/index.less ***! \******************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/card/style/index.tsx": /*!*****************************************!*\ !*** ./components/card/style/index.tsx ***! \*****************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/card/style/index.less"); /* harmony import */ var _tabs_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../tabs/style */ "./components/tabs/style/index.tsx"); /* harmony import */ var _row_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../row/style */ "./components/row/style/index.tsx"); /* harmony import */ var _col_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../col/style */ "./components/col/style/index.tsx"); // style dependencies /***/ }), /***/ "./components/carousel/index.tsx": /*!***************************************!*\ !*** ./components/carousel/index.tsx ***! \***************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _ant_design_react_slick__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/react-slick */ "./node_modules/@ant-design/react-slick/es/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Carousel = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function (_a, ref) { var _classNames; var _a$dots = _a.dots, dots = _a$dots === void 0 ? true : _a$dots, _a$arrows = _a.arrows, arrows = _a$arrows === void 0 ? false : _a$arrows, _a$draggable = _a.draggable, draggable = _a$draggable === void 0 ? false : _a$draggable, _a$dotPosition = _a.dotPosition, dotPosition = _a$dotPosition === void 0 ? 'bottom' : _a$dotPosition, props = __rest(_a, ["dots", "arrows", "draggable", "dotPosition"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_5__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var slickRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](); var goTo = function goTo(slide) { var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; slickRef.current.slickGoTo(slide, dontAnimate); }; react__WEBPACK_IMPORTED_MODULE_2__["useImperativeHandle"](ref, function () { return { goTo: goTo, autoPlay: slickRef.current.innerSlider.autoPlay, innerSlider: slickRef.current.innerSlider, prev: slickRef.current.slickPrev, next: slickRef.current.slickNext }; }, [slickRef.current]); var prevCount = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](react__WEBPACK_IMPORTED_MODULE_2__["Children"].count(props.children)); react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { if (prevCount.current !== react__WEBPACK_IMPORTED_MODULE_2__["Children"].count(props.children)) { goTo(props.initialSlide || 0, false); prevCount.current = react__WEBPACK_IMPORTED_MODULE_2__["Children"].count(props.children); } }, [props.children]); var newProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, props); if (newProps.effect === 'fade') { newProps.fade = true; } var prefixCls = getPrefixCls('carousel', newProps.prefixCls); var dotsClass = 'slick-dots'; newProps.vertical = dotPosition === 'left' || dotPosition === 'right'; var enableDots = !!dots; var dsClass = classnames__WEBPACK_IMPORTED_MODULE_4___default()(dotsClass, "".concat(dotsClass, "-").concat(dotPosition), typeof dots === 'boolean' ? false : dots === null || dots === void 0 ? void 0 : dots.className); var className = classnames__WEBPACK_IMPORTED_MODULE_4___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-vertical"), newProps.vertical), _classNames)); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: className }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_react_slick__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ ref: slickRef }, newProps, { dots: enableDots, dotsClass: dsClass, arrows: arrows, draggable: draggable }))); }); /* harmony default export */ __webpack_exports__["a"] = (Carousel); /***/ }), /***/ "./components/carousel/style/index.less": /*!**********************************************!*\ !*** ./components/carousel/style/index.less ***! \**********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/carousel/style/index.tsx": /*!*********************************************!*\ !*** ./components/carousel/style/index.tsx ***! \*********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/carousel/style/index.less"); /***/ }), /***/ "./components/cascader/index.tsx": /*!***************************************!*\ !*** ./components/cascader/index.tsx ***! \***************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var rc_cascader__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-cascader */ "./node_modules/rc-cascader/es/index.js"); /* harmony import */ var array_tree_filter__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! array-tree-filter */ "./node_modules/array-tree-filter/lib/index.js"); /* harmony import */ var array_tree_filter__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(array_tree_filter__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! rc-util/es/KeyCode */ "./node_modules/rc-util/es/KeyCode.js"); /* harmony import */ var _ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseCircleFilled */ "./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js"); /* harmony import */ var _ant_design_icons_es_icons_DownOutlined__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @ant-design/icons/es/icons/DownOutlined */ "./node_modules/@ant-design/icons/es/icons/DownOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @ant-design/icons/es/icons/RightOutlined */ "./node_modules/@ant-design/icons/es/icons/RightOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_RedoOutlined__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @ant-design/icons/es/icons/RedoOutlined */ "./node_modules/@ant-design/icons/es/icons/RedoOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_LeftOutlined__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @ant-design/icons/es/icons/LeftOutlined */ "./node_modules/@ant-design/icons/es/icons/LeftOutlined.js"); /* harmony import */ var _input__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../input */ "./components/input/index.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../locale-provider/LocaleReceiver */ "./components/locale-provider/LocaleReceiver.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../config-provider/SizeContext */ "./components/config-provider/SizeContext.tsx"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); /* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../_util/motion */ "./components/_util/motion.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; // We limit the filtered item count by default var defaultLimit = 50; // keep value when filtering var keepFilteredValueField = '__KEEP_FILTERED_OPTION_VALUE'; function highlightKeyword(str, keyword, prefixCls) { return str.split(keyword).map(function (node, index) { return index === 0 ? node : [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"]("span", { className: "".concat(prefixCls, "-menu-item-keyword"), key: "seperator" }, keyword), node]; }); } function defaultFilterOption(inputValue, path, names) { return path.some(function (option) { return option[names.label].indexOf(inputValue) > -1; }); } function defaultRenderFilteredOption(inputValue, path, prefixCls, names) { return path.map(function (option, index) { var label = option[names.label]; var node = label.indexOf(inputValue) > -1 ? highlightKeyword(label, inputValue, prefixCls) : label; return index === 0 ? node : [' / ', node]; }); } function defaultSortFilteredOption(a, b, inputValue, names) { function callback(elem) { return elem[names.label].indexOf(inputValue) > -1; } return a.findIndex(callback) - b.findIndex(callback); } function getFieldNames(_ref) { var fieldNames = _ref.fieldNames; return fieldNames; } function getFilledFieldNames(props) { var fieldNames = getFieldNames(props) || {}; var names = { children: fieldNames.children || 'children', label: fieldNames.label || 'label', value: fieldNames.value || 'value' }; return names; } function flattenTree(options, props) { var ancestor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; var names = getFilledFieldNames(props); var flattenOptions = []; var childrenName = names.children; options.forEach(function (option) { var path = ancestor.concat(option); if (props.changeOnSelect || !option[childrenName] || !option[childrenName].length) { flattenOptions.push(path); } if (option[childrenName]) { flattenOptions = flattenOptions.concat(flattenTree(option[childrenName], props, path)); } }); return flattenOptions; } var defaultDisplayRender = function defaultDisplayRender(label) { return label.join(' / '); }; function warningValueNotExist(list) { var fieldNames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; (list || []).forEach(function (item) { var valueFieldName = fieldNames.value || 'value'; if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"])(valueFieldName in item, 'Cascader', 'Not found `value` in `options`.'); warningValueNotExist(item[fieldNames.children || 'children'], fieldNames); }); } function getEmptyNode(renderEmpty, names, notFoundContent) { var _ref2; return _ref2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref2, names.value, 'ANT_CASCADER_NOT_FOUND'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref2, names.label, notFoundContent || renderEmpty('Cascader')), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref2, "disabled", true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref2, "isEmptyNode", true), _ref2; } var Cascader = /*#__PURE__*/function (_React$Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Cascader, _React$Component); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(Cascader); function Cascader(props) { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, Cascader); _this = _super.call(this, props); _this.cachedOptions = []; _this.setValue = function (value) { var selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; if (!('value' in _this.props)) { _this.setState({ value: value }); } var onChange = _this.props.onChange; onChange === null || onChange === void 0 ? void 0 : onChange(value, selectedOptions); }; _this.saveInput = function (node) { _this.input = node; }; _this.handleChange = function (value, selectedOptions) { _this.setState({ inputValue: '' }); if (selectedOptions[0].__IS_FILTERED_OPTION) { var unwrappedValue = selectedOptions[0][keepFilteredValueField] === undefined ? value[0] : selectedOptions[0][keepFilteredValueField]; var unwrappedSelectedOptions = selectedOptions[0].path; _this.setValue(unwrappedValue, unwrappedSelectedOptions); return; } _this.setValue(value, selectedOptions); }; _this.handlePopupVisibleChange = function (popupVisible) { if (!('popupVisible' in _this.props)) { _this.setState(function (state) { return { popupVisible: popupVisible, inputFocused: popupVisible, inputValue: popupVisible ? state.inputValue : '' }; }); } var onPopupVisibleChange = _this.props.onPopupVisibleChange; onPopupVisibleChange === null || onPopupVisibleChange === void 0 ? void 0 : onPopupVisibleChange(popupVisible); }; _this.handleInputBlur = function () { _this.setState({ inputFocused: false }); }; _this.handleInputClick = function (e) { var _this$state = _this.state, inputFocused = _this$state.inputFocused, popupVisible = _this$state.popupVisible; // Prevent `Trigger` behaviour. if (inputFocused || popupVisible) { e.stopPropagation(); } }; _this.handleKeyDown = function (e) { // SPACE => https://github.com/ant-design/ant-design/issues/16871 if (e.keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].BACKSPACE || e.keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].SPACE) { e.stopPropagation(); } }; _this.handleInputChange = function (e) { var popupVisible = _this.state.popupVisible; var inputValue = e.target.value; if (!popupVisible) { _this.handlePopupVisibleChange(true); } _this.setState({ inputValue: inputValue }); }; _this.clearSelection = function (e) { var inputValue = _this.state.inputValue; e.preventDefault(); e.stopPropagation(); if (!inputValue) { _this.handlePopupVisibleChange(false); _this.clearSelectionTimeout = setTimeout(function () { _this.setValue([]); }, 200); } else { _this.setState({ inputValue: '' }); } }; _this.renderCascader = function (_ref3, locale) { var getContextPopupContainer = _ref3.getPopupContainer, getPrefixCls = _ref3.getPrefixCls, renderEmpty = _ref3.renderEmpty, direction = _ref3.direction; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_22__[/* default */ "b"].Consumer, null, function (size) { var _classNames, _classNames2, _classNames3, _classNames5; var _assertThisInitialize = Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_this), props = _assertThisInitialize.props, state = _assertThisInitialize.state; var customizePrefixCls = props.prefixCls, customizeInputPrefixCls = props.inputPrefixCls, children = props.children, _props$placeholder = props.placeholder, placeholder = _props$placeholder === void 0 ? locale.placeholder || 'Please select' : _props$placeholder, customizeSize = props.size, disabled = props.disabled, className = props.className, style = props.style, allowClear = props.allowClear, _props$showSearch = props.showSearch, showSearch = _props$showSearch === void 0 ? false : _props$showSearch, suffixIcon = props.suffixIcon, expandIcon = props.expandIcon, notFoundContent = props.notFoundContent, popupClassName = props.popupClassName, bordered = props.bordered, dropdownRender = props.dropdownRender, otherProps = __rest(props, ["prefixCls", "inputPrefixCls", "children", "placeholder", "size", "disabled", "className", "style", "allowClear", "showSearch", "suffixIcon", "expandIcon", "notFoundContent", "popupClassName", "bordered", "dropdownRender"]); var mergedSize = customizeSize || size; var value = state.value, inputFocused = state.inputFocused; var isRtlLayout = direction === 'rtl'; var prefixCls = getPrefixCls('cascader', customizePrefixCls); var inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls); var sizeCls = classnames__WEBPACK_IMPORTED_MODULE_10___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames, "".concat(inputPrefixCls, "-lg"), mergedSize === 'large'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames, "".concat(inputPrefixCls, "-sm"), mergedSize === 'small'), _classNames)); var clearIcon = allowClear && !disabled && value.length > 0 || state.inputValue ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"], { className: "".concat(prefixCls, "-picker-clear"), onClick: _this.clearSelection }) : null; var arrowCls = classnames__WEBPACK_IMPORTED_MODULE_10___default()((_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-picker-arrow"), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-picker-arrow-expand"), state.popupVisible), _classNames2)); var pickerCls = classnames__WEBPACK_IMPORTED_MODULE_10___default()("".concat(prefixCls, "-picker"), (_classNames3 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-picker-rtl"), isRtlLayout), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-picker-with-value"), state.inputValue), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-picker-disabled"), disabled), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-picker-").concat(mergedSize), !!mergedSize), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-picker-show-search"), !!showSearch), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-picker-focused"), inputFocused), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-picker-borderless"), !bordered), _classNames3), className); // Fix bug of https://github.com/facebook/react/pull/5004 // and https://fb.me/react-unknown-prop var inputProps = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"])( // Not know why these props left otherProps, ['onChange', 'options', 'popupPlacement', 'transitionName', 'displayRender', 'onPopupVisibleChange', 'changeOnSelect', 'expandTrigger', 'popupVisible', 'getPopupContainer', 'loadData', 'filterOption', 'renderFilteredOption', 'sortFilteredOption', 'fieldNames']); var options = props.options; var names = getFilledFieldNames(_this.props); if (options && options.length > 0) { if (state.inputValue) { options = _this.generateFilteredOptions(prefixCls, renderEmpty); } } else { options = [getEmptyNode(renderEmpty, names, notFoundContent)]; } // Dropdown menu should keep previous status until it is fully closed. if (!state.popupVisible) { options = _this.cachedOptions; } else { _this.cachedOptions = options; } var dropdownMenuColumnStyle = {}; var isNotFound = (options || []).length === 1 && options[0].isEmptyNode; if (isNotFound) { dropdownMenuColumnStyle.height = 'auto'; // Height of one row. } // The default value of `matchInputWidth` is `true` var resultListMatchInputWidth = showSearch.matchInputWidth !== false; if (resultListMatchInputWidth && (state.inputValue || isNotFound) && _this.input) { dropdownMenuColumnStyle.width = _this.input.input.offsetWidth; } var inputIcon; if (suffixIcon) { inputIcon = Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_23__[/* replaceElement */ "c"])(suffixIcon, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"]("span", { className: "".concat(prefixCls, "-picker-arrow") }, suffixIcon), function () { var _classNames4; return { className: classnames__WEBPACK_IMPORTED_MODULE_10___default()((_classNames4 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames4, suffixIcon.props.className, suffixIcon.props.className), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames4, "".concat(prefixCls, "-picker-arrow"), true), _classNames4)) }; }); } else { inputIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_ant_design_icons_es_icons_DownOutlined__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"], { className: arrowCls }); } var input = children || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"]("span", { style: style, className: pickerCls }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"]("span", { className: "".concat(prefixCls, "-picker-label") }, _this.getLabel()), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_input__WEBPACK_IMPORTED_MODULE_18__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, inputProps, { tabIndex: -1, ref: _this.saveInput, prefixCls: inputPrefixCls, placeholder: value && value.length > 0 ? undefined : placeholder, className: "".concat(prefixCls, "-input ").concat(sizeCls), value: state.inputValue, disabled: disabled, readOnly: !showSearch, autoComplete: inputProps.autoComplete || 'off', onClick: showSearch ? _this.handleInputClick : undefined, onBlur: showSearch ? _this.handleInputBlur : undefined, onKeyDown: _this.handleKeyDown, onChange: showSearch ? _this.handleInputChange : undefined })), clearIcon, inputIcon); var expandIconNode; if (expandIcon) { expandIconNode = expandIcon; } else { expandIconNode = isRtlLayout ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_ant_design_icons_es_icons_LeftOutlined__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"], null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"], null); } var loadingIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"]("span", { className: "".concat(prefixCls, "-menu-item-loading-icon") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_ant_design_icons_es_icons_RedoOutlined__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"], { spin: true })); var getPopupContainer = props.getPopupContainer || getContextPopupContainer; var rest = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"])(props, ['inputIcon', 'expandIcon', 'loadingIcon', 'bordered', 'className']); var rcCascaderPopupClassName = classnames__WEBPACK_IMPORTED_MODULE_10___default()(popupClassName, (_classNames5 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames5, "".concat(prefixCls, "-menu-").concat(direction), direction === 'rtl'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames5, "".concat(prefixCls, "-menu-empty"), options.length === 1 && options[0].value === 'ANT_CASCADER_NOT_FOUND'), _classNames5)); var rootPrefixCls = getPrefixCls(); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](rc_cascader__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, rest, { prefixCls: prefixCls, getPopupContainer: getPopupContainer, options: options, value: value, popupVisible: state.popupVisible, onPopupVisibleChange: _this.handlePopupVisibleChange, onChange: _this.handleChange, dropdownMenuColumnStyle: dropdownMenuColumnStyle, expandIcon: expandIconNode, loadingIcon: loadingIcon, popupClassName: rcCascaderPopupClassName, popupPlacement: _this.getPopupPlacement(direction) // rc-cascader should update ts define to fix this case , dropdownRender: dropdownRender, transitionName: Object(_util_motion__WEBPACK_IMPORTED_MODULE_24__[/* getTransitionName */ "b"])(rootPrefixCls, 'slide-up', props.transitionName) }), input); }); }; _this.state = { value: props.value || props.defaultValue || [], inputValue: '', inputFocused: false, popupVisible: props.popupVisible, flattenOptions: props.showSearch ? flattenTree(props.options, props) : undefined, prevProps: props }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Cascader, [{ key: "componentWillUnmount", value: function componentWillUnmount() { if (this.clearSelectionTimeout) { clearTimeout(this.clearSelectionTimeout); } } }, { key: "getLabel", value: function getLabel() { var _this$props = this.props, options = _this$props.options, _this$props$displayRe = _this$props.displayRender, displayRender = _this$props$displayRe === void 0 ? defaultDisplayRender : _this$props$displayRe; var names = getFilledFieldNames(this.props); var value = this.state.value; var unwrappedValue = Array.isArray(value[0]) ? value[0] : value; var selectedOptions = array_tree_filter__WEBPACK_IMPORTED_MODULE_9___default()(options, function (o, level) { return o[names.value] === unwrappedValue[level]; }, { childrenKeyName: names.children }); var label = selectedOptions.length ? selectedOptions.map(function (o) { return o[names.label]; }) : value; return displayRender(label, selectedOptions); } }, { key: "generateFilteredOptions", value: function generateFilteredOptions(prefixCls, renderEmpty) { var _this2 = this; var _this$props2 = this.props, showSearch = _this$props2.showSearch, notFoundContent = _this$props2.notFoundContent; var names = getFilledFieldNames(this.props); var _showSearch$filter = showSearch.filter, filter = _showSearch$filter === void 0 ? defaultFilterOption : _showSearch$filter, _showSearch$render = showSearch.render, render = _showSearch$render === void 0 ? defaultRenderFilteredOption : _showSearch$render, _showSearch$sort = showSearch.sort, sort = _showSearch$sort === void 0 ? defaultSortFilteredOption : _showSearch$sort, _showSearch$limit = showSearch.limit, limit = _showSearch$limit === void 0 ? defaultLimit : _showSearch$limit; var _this$state2 = this.state, _this$state2$flattenO = _this$state2.flattenOptions, flattenOptions = _this$state2$flattenO === void 0 ? [] : _this$state2$flattenO, inputValue = _this$state2.inputValue; // Limit the filter if needed var filtered; if (limit > 0) { filtered = []; var matchCount = 0; // Perf optimization to filter items only below the limit flattenOptions.some(function (path) { var match = filter(_this2.state.inputValue, path, names); if (match) { filtered.push(path); matchCount += 1; } return matchCount >= limit; }); } else { Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"])(typeof limit !== 'number', 'Cascader', "'limit' of showSearch should be positive number or false."); filtered = flattenOptions.filter(function (path) { return filter(_this2.state.inputValue, path, names); }); } filtered = filtered.sort(function (a, b) { return sort(a, b, inputValue, names); }); if (filtered.length > 0) { // Fix issue: https://github.com/ant-design/ant-design/issues/26554 var field = names.value === names.label ? keepFilteredValueField : names.value; return filtered.map(function (path) { var _ref4; return _ref4 = { __IS_FILTERED_OPTION: true, path: path }, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref4, field, path.map(function (o) { return o[names.value]; })), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref4, names.label, render(inputValue, path, prefixCls, names)), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref4, "disabled", path.some(function (o) { return !!o.disabled; })), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref4, "isEmptyNode", true), _ref4; }); } return [getEmptyNode(renderEmpty, names, notFoundContent)]; } }, { key: "focus", value: function focus() { this.input.focus(); } }, { key: "blur", value: function blur() { this.input.blur(); } }, { key: "getPopupPlacement", value: function getPopupPlacement() { var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'ltr'; var popupPlacement = this.props.popupPlacement; if (popupPlacement !== undefined) { return popupPlacement; } return direction === 'rtl' ? 'bottomRight' : 'bottomLeft'; } }, { key: "render", value: function render() { var _this3 = this; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_19__[/* ConfigConsumer */ "a"], null, function (configArgument) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_20__[/* default */ "a"], null, function (locale) { return _this3.renderCascader(configArgument, locale); }); }); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps, _ref5) { var prevProps = _ref5.prevProps; var newState = { prevProps: nextProps }; if ('value' in nextProps) { newState.value = nextProps.value || []; } if ('popupVisible' in nextProps) { newState.popupVisible = nextProps.popupVisible; } if (nextProps.showSearch && prevProps.options !== nextProps.options) { newState.flattenOptions = flattenTree(nextProps.options, nextProps); } if ( true && nextProps.options) { warningValueNotExist(nextProps.options, getFieldNames(nextProps)); } return newState; } }]); return Cascader; }(react__WEBPACK_IMPORTED_MODULE_7__["Component"]); Cascader.defaultProps = { options: [], disabled: false, allowClear: true, bordered: true }; /* harmony default export */ __webpack_exports__["a"] = (Cascader); /***/ }), /***/ "./components/cascader/style/index.less": /*!**********************************************!*\ !*** ./components/cascader/style/index.less ***! \**********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/cascader/style/index.tsx": /*!*********************************************!*\ !*** ./components/cascader/style/index.tsx ***! \*********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/cascader/style/index.less"); /* harmony import */ var _empty_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../empty/style */ "./components/empty/style/index.tsx"); /* harmony import */ var _input_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../input/style */ "./components/input/style/index.tsx"); // style dependencies /***/ }), /***/ "./components/checkbox/Checkbox.tsx": /*!******************************************!*\ !*** ./components/checkbox/Checkbox.tsx ***! \******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var rc_checkbox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-checkbox */ "./node_modules/rc-checkbox/es/index.js"); /* harmony import */ var _Group__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Group */ "./components/checkbox/Group.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var InternalCheckbox = function InternalCheckbox(_a, ref) { var _classNames; var customizePrefixCls = _a.prefixCls, className = _a.className, children = _a.children, _a$indeterminate = _a.indeterminate, indeterminate = _a$indeterminate === void 0 ? false : _a$indeterminate, style = _a.style, onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, _a$skipGroup = _a.skipGroup, skipGroup = _a$skipGroup === void 0 ? false : _a$skipGroup, restProps = __rest(_a, ["prefixCls", "className", "children", "indeterminate", "style", "onMouseEnter", "onMouseLeave", "skipGroup"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_6__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var checkboxGroup = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_Group__WEBPACK_IMPORTED_MODULE_5__[/* GroupContext */ "a"]); var prevValue = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](restProps.value); react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.registerValue(restProps.value); if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])('checked' in restProps || !!checkboxGroup || !('value' in restProps), 'Checkbox', '`value` is not a valid prop, do you mean `checked`?'); }, []); react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { if (skipGroup) { return; } if (restProps.value !== prevValue.current) { checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.cancelValue(prevValue.current); checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.registerValue(restProps.value); } return function () { return checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.cancelValue(restProps.value); }; }, [restProps.value]); var prefixCls = getPrefixCls('checkbox', customizePrefixCls); var checkboxProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, restProps); if (checkboxGroup && !skipGroup) { checkboxProps.onChange = function () { if (restProps.onChange) { restProps.onChange.apply(restProps, arguments); } if (checkboxGroup.toggleOption) { checkboxGroup.toggleOption({ label: children, value: restProps.value }); } }; checkboxProps.name = checkboxGroup.name; checkboxProps.checked = checkboxGroup.value.indexOf(restProps.value) !== -1; checkboxProps.disabled = restProps.disabled || checkboxGroup.disabled; } var classString = classnames__WEBPACK_IMPORTED_MODULE_3___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-wrapper"), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-wrapper-checked"), checkboxProps.checked), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-wrapper-disabled"), checkboxProps.disabled), _classNames), className); var checkboxClass = classnames__WEBPACK_IMPORTED_MODULE_3___default()(Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(prefixCls, "-indeterminate"), indeterminate)); return ( /*#__PURE__*/ // eslint-disable-next-line jsx-a11y/label-has-associated-control react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("label", { className: classString, style: style, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](rc_checkbox__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, checkboxProps, { prefixCls: prefixCls, className: checkboxClass, ref: ref })), children !== undefined && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", null, children)) ); }; var Checkbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](InternalCheckbox); Checkbox.displayName = 'Checkbox'; /* harmony default export */ __webpack_exports__["a"] = (Checkbox); /***/ }), /***/ "./components/checkbox/Group.tsx": /*!***************************************!*\ !*** ./components/checkbox/Group.tsx ***! \***************************************/ /*! exports provided: GroupContext, default */ /*! exports used: GroupContext, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return GroupContext; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var _Checkbox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Checkbox */ "./components/checkbox/Checkbox.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var GroupContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createContext"](null); var InternalCheckboxGroup = function InternalCheckboxGroup(_a, ref) { var defaultValue = _a.defaultValue, children = _a.children, _a$options = _a.options, options = _a$options === void 0 ? [] : _a$options, customizePrefixCls = _a.prefixCls, className = _a.className, style = _a.style, onChange = _a.onChange, restProps = __rest(_a, ["defaultValue", "children", "options", "prefixCls", "className", "style", "onChange"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_4__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_8__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var _React$useState = react__WEBPACK_IMPORTED_MODULE_4__["useState"](restProps.value || defaultValue || []), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_React$useState, 2), value = _React$useState2[0], setValue = _React$useState2[1]; var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_4__["useState"]([]), _React$useState4 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_React$useState3, 2), registeredValues = _React$useState4[0], setRegisteredValues = _React$useState4[1]; react__WEBPACK_IMPORTED_MODULE_4__["useEffect"](function () { if ('value' in restProps) { setValue(restProps.value || []); } }, [restProps.value]); var getOptions = function getOptions() { return options.map(function (option) { if (typeof option === 'string') { return { label: option, value: option }; } return option; }); }; var cancelValue = function cancelValue(val) { setRegisteredValues(function (prevValues) { return prevValues.filter(function (v) { return v !== val; }); }); }; var registerValue = function registerValue(val) { setRegisteredValues(function (prevValues) { return [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(prevValues), [val]); }); }; var toggleOption = function toggleOption(option) { var optionIndex = value.indexOf(option.value); var newValue = Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(value); if (optionIndex === -1) { newValue.push(option.value); } else { newValue.splice(optionIndex, 1); } if (!('value' in restProps)) { setValue(newValue); } var opts = getOptions(); onChange === null || onChange === void 0 ? void 0 : onChange(newValue.filter(function (val) { return registeredValues.indexOf(val) !== -1; }).sort(function (a, b) { var indexA = opts.findIndex(function (opt) { return opt.value === a; }); var indexB = opts.findIndex(function (opt) { return opt.value === b; }); return indexA - indexB; })); }; var prefixCls = getPrefixCls('checkbox', customizePrefixCls); var groupPrefixCls = "".concat(prefixCls, "-group"); var domProps = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(restProps, ['value', 'disabled']); if (options && options.length > 0) { children = getOptions().map(function (option) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_Checkbox__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], { prefixCls: prefixCls, key: option.value.toString(), disabled: 'disabled' in option ? option.disabled : restProps.disabled, value: option.value, checked: value.indexOf(option.value) !== -1, onChange: option.onChange, className: "".concat(groupPrefixCls, "-item"), style: option.style }, option.label); }); } var context = { toggleOption: toggleOption, value: value, disabled: restProps.disabled, name: restProps.name, // https://github.com/ant-design/ant-design/issues/16376 registerValue: registerValue, cancelValue: cancelValue }; var classString = classnames__WEBPACK_IMPORTED_MODULE_5___default()(groupPrefixCls, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(groupPrefixCls, "-rtl"), direction === 'rtl'), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ className: classString, style: style }, domProps, { ref: ref }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](GroupContext.Provider, { value: context }, children)); }; var CheckboxGroup = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["forwardRef"](InternalCheckboxGroup); /* harmony default export */ __webpack_exports__["b"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["memo"](CheckboxGroup)); /***/ }), /***/ "./components/checkbox/index.tsx": /*!***************************************!*\ !*** ./components/checkbox/index.tsx ***! \***************************************/ /*! exports provided: CheckboxProps, CheckboxChangeEvent, CheckboxGroupProps, CheckboxOptionType, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _Checkbox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Checkbox */ "./components/checkbox/Checkbox.tsx"); /* harmony import */ var _Group__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Group */ "./components/checkbox/Group.tsx"); var Checkbox = _Checkbox__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]; Checkbox.Group = _Group__WEBPACK_IMPORTED_MODULE_1__[/* default */ "b"]; Checkbox.__ANT_CHECKBOX = true; /* harmony default export */ __webpack_exports__["a"] = (Checkbox); /***/ }), /***/ "./components/checkbox/style/index.less": /*!**********************************************!*\ !*** ./components/checkbox/style/index.less ***! \**********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/checkbox/style/index.tsx": /*!*********************************************!*\ !*** ./components/checkbox/style/index.tsx ***! \*********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/checkbox/style/index.less"); /***/ }), /***/ "./components/col/index.tsx": /*!**********************************!*\ !*** ./components/col/index.tsx ***! \**********************************/ /*! exports provided: ColProps, ColSize, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../grid */ "./components/grid/index.tsx"); /* harmony default export */ __webpack_exports__["a"] = (_grid__WEBPACK_IMPORTED_MODULE_0__[/* Col */ "a"]); /***/ }), /***/ "./components/col/style/index.tsx": /*!****************************************!*\ !*** ./components/col/style/index.tsx ***! \****************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _grid_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../grid/style */ "./components/grid/style/index.tsx"); // style dependencies // deps-lint-skip: grid /***/ }), /***/ "./components/collapse/Collapse.tsx": /*!******************************************!*\ !*** ./components/collapse/Collapse.tsx ***! \******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var rc_collapse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-collapse */ "./node_modules/rc-collapse/es/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/icons/es/icons/RightOutlined */ "./node_modules/@ant-design/icons/es/icons/RightOutlined.js"); /* harmony import */ var rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/Children/toArray */ "./node_modules/rc-util/es/Children/toArray.js"); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var _CollapsePanel__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CollapsePanel */ "./components/collapse/CollapsePanel.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../_util/motion */ "./components/_util/motion.tsx"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); var Collapse = function Collapse(props) { var _classNames; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_9__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var customizePrefixCls = props.prefixCls, _props$className = props.className, className = _props$className === void 0 ? '' : _props$className, _props$bordered = props.bordered, bordered = _props$bordered === void 0 ? true : _props$bordered, ghost = props.ghost; var prefixCls = getPrefixCls('collapse', customizePrefixCls); var getIconPosition = function getIconPosition() { var expandIconPosition = props.expandIconPosition; if (expandIconPosition !== undefined) { return expandIconPosition; } return direction === 'rtl' ? 'right' : 'left'; }; var renderExpandIcon = function renderExpandIcon() { var panelProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var expandIcon = props.expandIcon; var icon = expandIcon ? expandIcon(panelProps) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], { rotate: panelProps.isActive ? 90 : undefined }); return Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_11__[/* cloneElement */ "a"])(icon, function () { return { className: classnames__WEBPACK_IMPORTED_MODULE_4___default()(icon.props.className, "".concat(prefixCls, "-arrow")) }; }); }; var iconPosition = getIconPosition(); var collapseClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-borderless"), !bordered), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-icon-position-").concat(iconPosition), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-ghost"), !!ghost), _classNames), className); var openMotion = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, _util_motion__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"]), { motionAppear: false, leavedClassName: "".concat(prefixCls, "-content-hidden") }); var getItems = function getItems() { var children = props.children; return Object(rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(children).map(function (child, index) { var _a; if ((_a = child.props) === null || _a === void 0 ? void 0 : _a.disabled) { var key = child.key || String(index); var _child$props = child.props, disabled = _child$props.disabled, collapsible = _child$props.collapsible; var childProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(child.props, ['disabled'])), { key: key, collapsible: collapsible !== null && collapsible !== void 0 ? collapsible : disabled ? 'disabled' : undefined }); return Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_11__[/* cloneElement */ "a"])(child, childProps); } return child; }); }; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](rc_collapse__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ openMotion: openMotion }, props, { bordered: bordered, expandIcon: renderExpandIcon, prefixCls: prefixCls, className: collapseClassName }), getItems()); }; Collapse.Panel = _CollapsePanel__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"]; /* harmony default export */ __webpack_exports__["a"] = (Collapse); /***/ }), /***/ "./components/collapse/CollapsePanel.tsx": /*!***********************************************!*\ !*** ./components/collapse/CollapsePanel.tsx ***! \***********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var rc_collapse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-collapse */ "./node_modules/rc-collapse/es/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); var CollapsePanel = function CollapsePanel(props) { if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(!('disabled' in props), 'Collapse.Panel', '`disabled` is deprecated. Please use `collapsible="disabled"` instead.'); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_5__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls; var customizePrefixCls = props.prefixCls, _props$className = props.className, className = _props$className === void 0 ? '' : _props$className, _props$showArrow = props.showArrow, showArrow = _props$showArrow === void 0 ? true : _props$showArrow; var prefixCls = getPrefixCls('collapse', customizePrefixCls); var collapsePanelClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()(Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(prefixCls, "-no-arrow"), !showArrow), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](rc_collapse__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].Panel, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, props, { prefixCls: prefixCls, className: collapsePanelClassName })); }; /* harmony default export */ __webpack_exports__["a"] = (CollapsePanel); /***/ }), /***/ "./components/collapse/index.tsx": /*!***************************************!*\ !*** ./components/collapse/index.tsx ***! \***************************************/ /*! exports provided: CollapseProps, CollapsePanelProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _Collapse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Collapse */ "./components/collapse/Collapse.tsx"); /* harmony import */ var _CollapsePanel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CollapsePanel */ "./components/collapse/CollapsePanel.tsx"); /* harmony default export */ __webpack_exports__["a"] = (_Collapse__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]); /***/ }), /***/ "./components/collapse/style/index.less": /*!**********************************************!*\ !*** ./components/collapse/style/index.less ***! \**********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/collapse/style/index.tsx": /*!*********************************************!*\ !*** ./components/collapse/style/index.tsx ***! \*********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/collapse/style/index.less"); /***/ }), /***/ "./components/comment/index.tsx": /*!**************************************!*\ !*** ./components/comment/index.tsx ***! \**************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Comment = function Comment(_a) { var actions = _a.actions, author = _a.author, avatar = _a.avatar, children = _a.children, className = _a.className, content = _a.content, customizePrefixCls = _a.prefixCls, datetime = _a.datetime, otherProps = __rest(_a, ["actions", "author", "avatar", "children", "className", "content", "prefixCls", "datetime"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_4__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var renderNested = function renderNested(prefixCls, nestedChildren) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: classnames__WEBPACK_IMPORTED_MODULE_3___default()("".concat(prefixCls, "-nested")) }, nestedChildren); }; var prefixCls = getPrefixCls('comment', customizePrefixCls); var avatarDom = avatar ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-avatar") }, typeof avatar === 'string' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("img", { src: avatar, alt: "comment-avatar" }) : avatar) : null; var actionDom = actions && actions.length ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("ul", { className: "".concat(prefixCls, "-actions") }, actions.map(function (action, index) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("li", { key: "action-".concat(index) }, action) // eslint-disable-line react/no-array-index-key ; })) : null; var authorContent = (author || datetime) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-content-author") }, author && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { className: "".concat(prefixCls, "-content-author-name") }, author), datetime && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { className: "".concat(prefixCls, "-content-author-time") }, datetime)); var contentDom = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-content") }, authorContent, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-content-detail") }, content), actionDom); var cls = classnames__WEBPACK_IMPORTED_MODULE_3___default()(prefixCls, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, otherProps, { className: cls }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-inner") }, avatarDom, contentDom), children ? renderNested(prefixCls, children) : null); }; /* harmony default export */ __webpack_exports__["a"] = (Comment); /***/ }), /***/ "./components/comment/style/index.less": /*!*********************************************!*\ !*** ./components/comment/style/index.less ***! \*********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/comment/style/index.tsx": /*!********************************************!*\ !*** ./components/comment/style/index.tsx ***! \********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/comment/style/index.less"); /***/ }), /***/ "./components/config-provider/SizeContext.tsx": /*!****************************************************!*\ !*** ./components/config-provider/SizeContext.tsx ***! \****************************************************/ /*! exports provided: SizeContextProvider, default */ /*! exports used: SizeContextProvider, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SizeContextProvider; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var SizeContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createContext"](undefined); var SizeContextProvider = function SizeContextProvider(_ref) { var children = _ref.children, size = _ref.size; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SizeContext.Consumer, null, function (originSize) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SizeContext.Provider, { value: size || originSize }, children); }); }; /* harmony default export */ __webpack_exports__["b"] = (SizeContext); /***/ }), /***/ "./components/config-provider/context.tsx": /*!************************************************!*\ !*** ./components/config-provider/context.tsx ***! \************************************************/ /*! exports provided: ConfigContext, ConfigConsumer, withConfigConsumer */ /*! exports used: ConfigConsumer, ConfigContext, withConfigConsumer */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ConfigContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ConfigConsumer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return withConfigConsumer; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _renderEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./renderEmpty */ "./components/config-provider/renderEmpty.tsx"); var defaultGetPrefixCls = function defaultGetPrefixCls(suffixCls, customizePrefixCls) { if (customizePrefixCls) return customizePrefixCls; return suffixCls ? "ant-".concat(suffixCls) : 'ant'; }; var ConfigContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createContext"]({ // We provide a default function for Context without provider getPrefixCls: defaultGetPrefixCls, renderEmpty: _renderEmpty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"] }); var ConfigConsumer = ConfigContext.Consumer; /** @deprecated Use hooks instead. This is a legacy function */ function withConfigConsumer(config) { return function withConfigConsumerFunc(Component) { // Wrap with ConfigConsumer. Since we need compatible with react 15, be care when using ref methods var SFC = function SFC(props) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](ConfigConsumer, null, function (configProps) { var basicPrefixCls = config.prefixCls; var getPrefixCls = configProps.getPrefixCls; var customizePrefixCls = props.prefixCls; var prefixCls = getPrefixCls(basicPrefixCls, customizePrefixCls); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, configProps, props, { prefixCls: prefixCls })); }); }; var cons = Component.constructor; var name = cons && cons.displayName || Component.name || 'Component'; SFC.displayName = "withConfigConsumer(".concat(name, ")"); return SFC; }; } /***/ }), /***/ "./components/config-provider/index.tsx": /*!**********************************************!*\ !*** ./components/config-provider/index.tsx ***! \**********************************************/ /*! exports provided: RenderEmptyHandler, ConfigContext, ConfigConsumer, CSPConfig, DirectionType, ConfigConsumerProps, configConsumerProps, defaultPrefixCls, globalConfig, default */ /*! exports used: ConfigConsumer, ConfigContext, configConsumerProps, default, globalConfig */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return configConsumerProps; }); /* unused harmony export defaultPrefixCls */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return globalConfig; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _ant_design_icons_es_components_Context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ant-design/icons/es/components/Context */ "./node_modules/@ant-design/icons/es/components/Context.js"); /* harmony import */ var rc_field_form__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-field-form */ "./node_modules/rc-field-form/es/index.js"); /* harmony import */ var rc_util_es_hooks_useMemo__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-util/es/hooks/useMemo */ "./node_modules/rc-util/es/hooks/useMemo.js"); /* harmony import */ var _renderEmpty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./renderEmpty */ "./components/config-provider/renderEmpty.tsx"); /* harmony import */ var _locale_provider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../locale-provider */ "./components/locale-provider/index.tsx"); /* harmony import */ var _locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../locale-provider/LocaleReceiver */ "./components/locale-provider/LocaleReceiver.tsx"); /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./context */ "./components/config-provider/context.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _context__WEBPACK_IMPORTED_MODULE_8__["b"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _context__WEBPACK_IMPORTED_MODULE_8__["a"]; }); /* harmony import */ var _SizeContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./SizeContext */ "./components/config-provider/SizeContext.tsx"); /* harmony import */ var _message__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../message */ "./components/message/index.tsx"); /* harmony import */ var _notification__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../notification */ "./components/notification/index.tsx"); var configConsumerProps = ['getTargetContainer', 'getPopupContainer', 'rootPrefixCls', 'getPrefixCls', 'renderEmpty', 'csp', 'autoInsertSpaceInButton', 'locale', 'pageHeader']; // These props is used by `useContext` directly in sub component var PASSED_PROPS = ['getTargetContainer', 'getPopupContainer', 'renderEmpty', 'pageHeader', 'input', 'form']; var defaultPrefixCls = 'ant'; var globalPrefixCls; var setGlobalConfig = function setGlobalConfig(params) { if (params.prefixCls !== undefined) { globalPrefixCls = params.prefixCls; } }; function getGlobalPrefixCls() { return globalPrefixCls || defaultPrefixCls; } var globalConfig = function globalConfig() { return { getPrefixCls: function getPrefixCls(suffixCls, customizePrefixCls) { if (customizePrefixCls) return customizePrefixCls; return suffixCls ? "".concat(getGlobalPrefixCls(), "-").concat(suffixCls) : getGlobalPrefixCls(); }, getRootPrefixCls: function getRootPrefixCls(rootPrefixCls, customizePrefixCls) { // Customize rootPrefixCls is first priority if (rootPrefixCls) { return rootPrefixCls; } // If Global prefixCls provided, use this if (globalPrefixCls) { return globalPrefixCls; } // [Legacy] If customize prefixCls provided, we cut it to get the prefixCls if (customizePrefixCls && customizePrefixCls.includes('-')) { return customizePrefixCls.replace(/^(.*)-[^-]*$/, '$1'); } // Fallback to default prefixCls return getGlobalPrefixCls(); } }; }; var ProviderChildren = function ProviderChildren(props) { var children = props.children, csp = props.csp, autoInsertSpaceInButton = props.autoInsertSpaceInButton, form = props.form, locale = props.locale, componentSize = props.componentSize, direction = props.direction, space = props.space, virtual = props.virtual, dropdownMatchSelectWidth = props.dropdownMatchSelectWidth, legacyLocale = props.legacyLocale, parentContext = props.parentContext, iconPrefixCls = props.iconPrefixCls; var getPrefixCls = react__WEBPACK_IMPORTED_MODULE_1__["useCallback"](function (suffixCls, customizePrefixCls) { var prefixCls = props.prefixCls; if (customizePrefixCls) return customizePrefixCls; var mergedPrefixCls = prefixCls || parentContext.getPrefixCls(''); return suffixCls ? "".concat(mergedPrefixCls, "-").concat(suffixCls) : mergedPrefixCls; }, [parentContext.getPrefixCls, props.prefixCls]); var config = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, parentContext), { csp: csp, autoInsertSpaceInButton: autoInsertSpaceInButton, locale: locale || legacyLocale, direction: direction, space: space, virtual: virtual, dropdownMatchSelectWidth: dropdownMatchSelectWidth, getPrefixCls: getPrefixCls }); // Pass the props used by `useContext` directly with child component. // These props should merged into `config`. PASSED_PROPS.forEach(function (propName) { var propValue = props[propName]; if (propValue) { config[propName] = propValue; } }); // https://github.com/ant-design/ant-design/issues/27617 var memoedConfig = Object(rc_util_es_hooks_useMemo__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(function () { return config; }, config, function (prevConfig, currentConfig) { var prevKeys = Object.keys(prevConfig); var currentKeys = Object.keys(currentConfig); return prevKeys.length !== currentKeys.length || prevKeys.some(function (key) { return prevConfig[key] !== currentConfig[key]; }); }); var memoIconContextValue = react__WEBPACK_IMPORTED_MODULE_1__["useMemo"](function () { return { prefixCls: iconPrefixCls, csp: csp }; }, [iconPrefixCls]); var childNode = children; // Additional Form provider var validateMessages = {}; if (locale && locale.Form && locale.Form.defaultValidateMessages) { validateMessages = locale.Form.defaultValidateMessages; } if (form && form.validateMessages) { validateMessages = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, validateMessages), form.validateMessages); } if (Object.keys(validateMessages).length > 0) { childNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](rc_field_form__WEBPACK_IMPORTED_MODULE_3__[/* FormProvider */ "b"], { validateMessages: validateMessages }, children); } if (locale) { childNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_locale_provider__WEBPACK_IMPORTED_MODULE_6__[/* default */ "b"], { locale: locale, _ANT_MARK__: _locale_provider__WEBPACK_IMPORTED_MODULE_6__[/* ANT_MARK */ "a"] }, childNode); } if (iconPrefixCls) { childNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_ant_design_icons_es_components_Context__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].Provider, { value: memoIconContextValue }, childNode); } if (componentSize) { childNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_SizeContext__WEBPACK_IMPORTED_MODULE_9__[/* SizeContextProvider */ "a"], { size: componentSize }, childNode); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_context__WEBPACK_IMPORTED_MODULE_8__[/* ConfigContext */ "b"].Provider, { value: memoedConfig }, childNode); }; var ConfigProvider = function ConfigProvider(props) { react__WEBPACK_IMPORTED_MODULE_1__["useEffect"](function () { if (props.direction) { _message__WEBPACK_IMPORTED_MODULE_10__[/* default */ "b"].config({ rtl: props.direction === 'rtl' }); _notification__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].config({ rtl: props.direction === 'rtl' }); } }, [props.direction]); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], null, function (_, __, legacyLocale) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_context__WEBPACK_IMPORTED_MODULE_8__[/* ConfigConsumer */ "a"], null, function (context) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](ProviderChildren, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ parentContext: context, legacyLocale: legacyLocale }, props)); }); }); }; /** @private internal Usage. do not use in your production */ ConfigProvider.ConfigContext = _context__WEBPACK_IMPORTED_MODULE_8__[/* ConfigContext */ "b"]; ConfigProvider.SizeContext = _SizeContext__WEBPACK_IMPORTED_MODULE_9__[/* default */ "b"]; ConfigProvider.config = setGlobalConfig; /* harmony default export */ __webpack_exports__["d"] = (ConfigProvider); /***/ }), /***/ "./components/config-provider/renderEmpty.tsx": /*!****************************************************!*\ !*** ./components/config-provider/renderEmpty.tsx ***! \****************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../empty */ "./components/empty/index.tsx"); /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! . */ "./components/config-provider/index.tsx"); var renderEmpty = function renderEmpty(componentName) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](___WEBPACK_IMPORTED_MODULE_2__[/* ConfigConsumer */ "a"], null, function (_ref) { var getPrefixCls = _ref.getPrefixCls; var prefix = getPrefixCls('empty'); switch (componentName) { case 'Table': case 'List': return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_empty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"], { image: _empty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].PRESENTED_IMAGE_SIMPLE }); case 'Select': case 'TreeSelect': case 'Cascader': case 'Transfer': case 'Mentions': return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_empty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"], { image: _empty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].PRESENTED_IMAGE_SIMPLE, className: "".concat(prefix, "-small") }); default: return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_empty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"], null); } }); }; /* harmony default export */ __webpack_exports__["a"] = (renderEmpty); /***/ }), /***/ "./components/config-provider/style/index.less": /*!*****************************************************!*\ !*** ./components/config-provider/style/index.less ***! \*****************************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/config-provider/style/index.tsx": /*!****************************************************!*\ !*** ./components/config-provider/style/index.tsx ***! \****************************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.less */ "./components/config-provider/style/index.less"); /***/ }), /***/ "./components/date-picker/PickerButton.tsx": /*!*************************************************!*\ !*** ./components/date-picker/PickerButton.tsx ***! \*************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PickerButton; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../button */ "./components/button/index.tsx"); function PickerButton(props) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_button__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ size: "small", type: "primary" }, props)); } /***/ }), /***/ "./components/date-picker/PickerTag.tsx": /*!**********************************************!*\ !*** ./components/date-picker/PickerTag.tsx ***! \**********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PickerTag; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _tag__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../tag */ "./components/tag/index.tsx"); function PickerTag(props) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_tag__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ color: "blue" }, props)); } /***/ }), /***/ "./components/date-picker/generatePicker/generateRangePicker.tsx": /*!***********************************************************************!*\ !*** ./components/date-picker/generatePicker/generateRangePicker.tsx ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return generateRangePicker; }); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _ant_design_icons_es_icons_CalendarOutlined__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ant-design/icons/es/icons/CalendarOutlined */ "./node_modules/@ant-design/icons/es/icons/CalendarOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_ClockCircleOutlined__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ant-design/icons/es/icons/ClockCircleOutlined */ "./node_modules/@ant-design/icons/es/icons/ClockCircleOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseCircleFilled */ "./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js"); /* harmony import */ var _ant_design_icons_es_icons_SwapRightOutlined__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @ant-design/icons/es/icons/SwapRightOutlined */ "./node_modules/@ant-design/icons/es/icons/SwapRightOutlined.js"); /* harmony import */ var rc_picker__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! rc-picker */ "./node_modules/rc-picker/es/index.js"); /* harmony import */ var _locale_en_US__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../locale/en_US */ "./components/date-picker/locale/en_US.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../config-provider/SizeContext */ "./components/config-provider/SizeContext.tsx"); /* harmony import */ var _locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../locale-provider/LocaleReceiver */ "./components/locale-provider/LocaleReceiver.tsx"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../util */ "./components/date-picker/util.ts"); /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! . */ "./components/date-picker/generatePicker/index.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; function generateRangePicker(generateConfig) { var RangePicker = /*#__PURE__*/function (_React$Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(RangePicker, _React$Component); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(RangePicker); function RangePicker() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, RangePicker); _this = _super.apply(this, arguments); _this.pickerRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createRef"](); _this.focus = function () { if (_this.pickerRef.current) { _this.pickerRef.current.focus(); } }; _this.blur = function () { if (_this.pickerRef.current) { _this.pickerRef.current.blur(); } }; _this.renderPicker = function (contextLocale) { var locale = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, contextLocale), _this.props.locale); var _this$context = _this.context, getPrefixCls = _this$context.getPrefixCls, direction = _this$context.direction, getPopupContainer = _this$context.getPopupContainer; var _a = _this.props, customizePrefixCls = _a.prefixCls, customGetPopupContainer = _a.getPopupContainer, className = _a.className, customizeSize = _a.size, _a$bordered = _a.bordered, bordered = _a$bordered === void 0 ? true : _a$bordered, placeholder = _a.placeholder, restProps = __rest(_a, ["prefixCls", "getPopupContainer", "className", "size", "bordered", "placeholder"]); var _this$props = _this.props, format = _this$props.format, showTime = _this$props.showTime, picker = _this$props.picker; var prefixCls = getPrefixCls('picker', customizePrefixCls); var additionalOverrideProps = {}; additionalOverrideProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, additionalOverrideProps), showTime ? Object(___WEBPACK_IMPORTED_MODULE_18__[/* getTimeProps */ "c"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ format: format, picker: picker }, showTime)) : {}), picker === 'time' ? Object(___WEBPACK_IMPORTED_MODULE_18__[/* getTimeProps */ "c"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ format: format }, _this.props), { picker: picker })) : {}); var rootPrefixCls = getPrefixCls(); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_15__[/* default */ "b"].Consumer, null, function (size) { var _classNames; var mergedSize = customizeSize || size; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](rc_picker__WEBPACK_IMPORTED_MODULE_12__[/* RangePicker */ "b"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ separator: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("span", { "aria-label": "to", className: "".concat(prefixCls, "-separator") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_ant_design_icons_es_icons_SwapRightOutlined__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"], null)), ref: _this.pickerRef, placeholder: Object(_util__WEBPACK_IMPORTED_MODULE_17__[/* getRangePlaceholder */ "b"])(picker, locale, placeholder), suffixIcon: picker === 'time' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_ant_design_icons_es_icons_ClockCircleOutlined__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_ant_design_icons_es_icons_CalendarOutlined__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], null), clearIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], null), allowClear: true, transitionName: "".concat(rootPrefixCls, "-slide-up") }, restProps, additionalOverrideProps, { className: classnames__WEBPACK_IMPORTED_MODULE_7___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(mergedSize), mergedSize), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-borderless"), !bordered), _classNames), className), locale: locale.lang, prefixCls: prefixCls, getPopupContainer: customGetPopupContainer || getPopupContainer, generateConfig: generateConfig, prevIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("span", { className: "".concat(prefixCls, "-prev-icon") }), nextIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("span", { className: "".concat(prefixCls, "-next-icon") }), superPrevIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("span", { className: "".concat(prefixCls, "-super-prev-icon") }), superNextIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("span", { className: "".concat(prefixCls, "-super-next-icon") }), components: ___WEBPACK_IMPORTED_MODULE_18__[/* Components */ "a"], direction: direction })); }); }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(RangePicker, [{ key: "render", value: function render() { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"], { componentName: "DatePicker", defaultLocale: _locale_en_US__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"] }, this.renderPicker); } }]); return RangePicker; }(react__WEBPACK_IMPORTED_MODULE_6__["Component"]); RangePicker.contextType = _config_provider__WEBPACK_IMPORTED_MODULE_14__[/* ConfigContext */ "b"]; return RangePicker; } /***/ }), /***/ "./components/date-picker/generatePicker/generateSinglePicker.tsx": /*!************************************************************************!*\ !*** ./components/date-picker/generatePicker/generateSinglePicker.tsx ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return generatePicker; }); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _ant_design_icons_es_icons_CalendarOutlined__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ant-design/icons/es/icons/CalendarOutlined */ "./node_modules/@ant-design/icons/es/icons/CalendarOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_ClockCircleOutlined__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ant-design/icons/es/icons/ClockCircleOutlined */ "./node_modules/@ant-design/icons/es/icons/ClockCircleOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseCircleFilled */ "./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js"); /* harmony import */ var rc_picker__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rc-picker */ "./node_modules/rc-picker/es/index.js"); /* harmony import */ var _locale_en_US__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../locale/en_US */ "./components/date-picker/locale/en_US.tsx"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../util */ "./components/date-picker/util.ts"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../locale-provider/LocaleReceiver */ "./components/locale-provider/LocaleReceiver.tsx"); /* harmony import */ var _config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../config-provider/SizeContext */ "./components/config-provider/SizeContext.tsx"); /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! . */ "./components/date-picker/generatePicker/index.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; function generatePicker(generateConfig) { function getPicker(picker, displayName) { var Picker = /*#__PURE__*/function (_React$Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Picker, _React$Component); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(Picker); function Picker(props) { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, Picker); _this = _super.call(this, props); _this.pickerRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createRef"](); _this.focus = function () { if (_this.pickerRef.current) { _this.pickerRef.current.focus(); } }; _this.blur = function () { if (_this.pickerRef.current) { _this.pickerRef.current.blur(); } }; _this.renderPicker = function (contextLocale) { var locale = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, contextLocale), _this.props.locale); var _this$context = _this.context, getPrefixCls = _this$context.getPrefixCls, direction = _this$context.direction, getPopupContainer = _this$context.getPopupContainer; var _a = _this.props, customizePrefixCls = _a.prefixCls, customizeGetPopupContainer = _a.getPopupContainer, className = _a.className, customizeSize = _a.size, _a$bordered = _a.bordered, bordered = _a$bordered === void 0 ? true : _a$bordered, placeholder = _a.placeholder, restProps = __rest(_a, ["prefixCls", "getPopupContainer", "className", "size", "bordered", "placeholder"]); var _this$props = _this.props, format = _this$props.format, showTime = _this$props.showTime; var prefixCls = getPrefixCls('picker', customizePrefixCls); var additionalProps = { showToday: true }; var additionalOverrideProps = {}; if (picker) { additionalOverrideProps.picker = picker; } var mergedPicker = picker || _this.props.picker; additionalOverrideProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, additionalOverrideProps), showTime ? Object(___WEBPACK_IMPORTED_MODULE_18__[/* getTimeProps */ "c"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ format: format, picker: mergedPicker }, showTime)) : {}), mergedPicker === 'time' ? Object(___WEBPACK_IMPORTED_MODULE_18__[/* getTimeProps */ "c"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ format: format }, _this.props), { picker: mergedPicker })) : {}); var rootPrefixCls = getPrefixCls(); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_17__[/* default */ "b"].Consumer, null, function (size) { var _classNames; var mergedSize = customizeSize || size; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](rc_picker__WEBPACK_IMPORTED_MODULE_11__[/* default */ "c"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ ref: _this.pickerRef, placeholder: Object(_util__WEBPACK_IMPORTED_MODULE_13__[/* getPlaceholder */ "a"])(mergedPicker, locale, placeholder), suffixIcon: mergedPicker === 'time' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_ant_design_icons_es_icons_ClockCircleOutlined__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_ant_design_icons_es_icons_CalendarOutlined__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], null), clearIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], null), allowClear: true, transitionName: "".concat(rootPrefixCls, "-slide-up") }, additionalProps, restProps, additionalOverrideProps, { locale: locale.lang, className: classnames__WEBPACK_IMPORTED_MODULE_7___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(mergedSize), mergedSize), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-borderless"), !bordered), _classNames), className), prefixCls: prefixCls, getPopupContainer: customizeGetPopupContainer || getPopupContainer, generateConfig: generateConfig, prevIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("span", { className: "".concat(prefixCls, "-prev-icon") }), nextIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("span", { className: "".concat(prefixCls, "-next-icon") }), superPrevIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("span", { className: "".concat(prefixCls, "-super-prev-icon") }), superNextIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("span", { className: "".concat(prefixCls, "-super-next-icon") }), components: ___WEBPACK_IMPORTED_MODULE_18__[/* Components */ "a"], direction: direction })); }); }; if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"])(picker !== 'quarter', displayName, "DatePicker.".concat(displayName, " is legacy usage. Please use DatePicker[picker='").concat(picker, "'] directly.")); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Picker, [{ key: "render", value: function render() { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"], { componentName: "DatePicker", defaultLocale: _locale_en_US__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"] }, this.renderPicker); } }]); return Picker; }(react__WEBPACK_IMPORTED_MODULE_6__["Component"]); Picker.contextType = _config_provider__WEBPACK_IMPORTED_MODULE_15__[/* ConfigContext */ "b"]; if (displayName) { Picker.displayName = displayName; } return Picker; } var DatePicker = getPicker(); var WeekPicker = getPicker('week', 'WeekPicker'); var MonthPicker = getPicker('month', 'MonthPicker'); var YearPicker = getPicker('year', 'YearPicker'); var TimePicker = getPicker('time', 'TimePicker'); var QuarterPicker = getPicker('quarter', 'QuarterPicker'); return { DatePicker: DatePicker, WeekPicker: WeekPicker, MonthPicker: MonthPicker, YearPicker: YearPicker, TimePicker: TimePicker, QuarterPicker: QuarterPicker }; } /***/ }), /***/ "./components/date-picker/generatePicker/index.tsx": /*!*********************************************************!*\ !*** ./components/date-picker/generatePicker/index.tsx ***! \*********************************************************/ /*! exports provided: Components, getTimeProps, default */ /*! exports used: Components, default, getTimeProps */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Components; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getTimeProps; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _PickerButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../PickerButton */ "./components/date-picker/PickerButton.tsx"); /* harmony import */ var _PickerTag__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../PickerTag */ "./components/date-picker/PickerTag.tsx"); /* harmony import */ var _generateSinglePicker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./generateSinglePicker */ "./components/date-picker/generatePicker/generateSinglePicker.tsx"); /* harmony import */ var _generateRangePicker__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./generateRangePicker */ "./components/date-picker/generatePicker/generateRangePicker.tsx"); var Components = { button: _PickerButton__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"], rangeItem: _PickerTag__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"] }; function toArray(list) { if (!list) { return []; } return Array.isArray(list) ? list : [list]; } function getTimeProps(props) { var format = props.format, picker = props.picker, showHour = props.showHour, showMinute = props.showMinute, showSecond = props.showSecond, use12Hours = props.use12Hours; var firstFormat = toArray(format)[0]; var showTimeObj = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, props); if (firstFormat && typeof firstFormat === 'string') { if (!firstFormat.includes('s') && showSecond === undefined) { showTimeObj.showSecond = false; } if (!firstFormat.includes('m') && showMinute === undefined) { showTimeObj.showMinute = false; } if (!firstFormat.includes('H') && !firstFormat.includes('h') && showHour === undefined) { showTimeObj.showHour = false; } if ((firstFormat.includes('a') || firstFormat.includes('A')) && use12Hours === undefined) { showTimeObj.use12Hours = true; } } if (picker === 'time') { return showTimeObj; } if (typeof firstFormat === 'function') { // format of showTime should use default when format is custom format function delete showTimeObj.format; } return { showTime: showTimeObj }; } function generatePicker(generateConfig) { // =========================== Picker =========================== var _generateSinglePicker = Object(_generateSinglePicker__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(generateConfig), DatePicker = _generateSinglePicker.DatePicker, WeekPicker = _generateSinglePicker.WeekPicker, MonthPicker = _generateSinglePicker.MonthPicker, YearPicker = _generateSinglePicker.YearPicker, TimePicker = _generateSinglePicker.TimePicker, QuarterPicker = _generateSinglePicker.QuarterPicker; // ======================== Range Picker ======================== var RangePicker = Object(_generateRangePicker__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(generateConfig); var MergedDatePicker = DatePicker; MergedDatePicker.WeekPicker = WeekPicker; MergedDatePicker.MonthPicker = MonthPicker; MergedDatePicker.YearPicker = YearPicker; MergedDatePicker.RangePicker = RangePicker; MergedDatePicker.TimePicker = TimePicker; MergedDatePicker.QuarterPicker = QuarterPicker; return MergedDatePicker; } /* harmony default export */ __webpack_exports__["b"] = (generatePicker); /***/ }), /***/ "./components/date-picker/index.tsx": /*!******************************************!*\ !*** ./components/date-picker/index.tsx ***! \******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var rc_picker_es_generate_moment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-picker/es/generate/moment */ "./node_modules/rc-picker/es/generate/moment.js"); /* harmony import */ var _generatePicker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./generatePicker */ "./components/date-picker/generatePicker/index.tsx"); var DatePicker = Object(_generatePicker__WEBPACK_IMPORTED_MODULE_1__[/* default */ "b"])(rc_picker_es_generate_moment__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]); /* harmony default export */ __webpack_exports__["a"] = (DatePicker); /***/ }), /***/ "./components/date-picker/locale/en_US.tsx": /*!*************************************************!*\ !*** ./components/date-picker/locale/en_US.tsx ***! \*************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var rc_picker_es_locale_en_US__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-picker/es/locale/en_US */ "./node_modules/rc-picker/es/locale/en_US.js"); /* harmony import */ var _time_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../time-picker/locale/en_US */ "./components/time-picker/locale/en_US.tsx"); // Merge into a locale object var locale = { lang: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ placeholder: 'Select date', yearPlaceholder: 'Select year', quarterPlaceholder: 'Select quarter', monthPlaceholder: 'Select month', weekPlaceholder: 'Select week', rangePlaceholder: ['Start date', 'End date'], rangeYearPlaceholder: ['Start year', 'End year'], rangeMonthPlaceholder: ['Start month', 'End month'], rangeWeekPlaceholder: ['Start week', 'End week'] }, rc_picker_es_locale_en_US__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]), timePickerLocale: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, _time_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"]) }; // All settings at: // https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json /* harmony default export */ __webpack_exports__["a"] = (locale); /***/ }), /***/ "./components/date-picker/style/index.less": /*!*************************************************!*\ !*** ./components/date-picker/style/index.less ***! \*************************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/date-picker/style/index.tsx": /*!************************************************!*\ !*** ./components/date-picker/style/index.tsx ***! \************************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.less */ "./components/date-picker/style/index.less"); /* harmony import */ var _tag_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../tag/style */ "./components/tag/style/index.tsx"); /* harmony import */ var _button_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../button/style */ "./components/button/style/index.tsx"); // style dependencies /***/ }), /***/ "./components/date-picker/util.ts": /*!****************************************!*\ !*** ./components/date-picker/util.ts ***! \****************************************/ /*! exports provided: getPlaceholder, getRangePlaceholder */ /*! exports used: getPlaceholder, getRangePlaceholder */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getPlaceholder; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getRangePlaceholder; }); function getPlaceholder(picker, locale, customizePlaceholder) { if (customizePlaceholder !== undefined) { return customizePlaceholder; } if (picker === 'year' && locale.lang.yearPlaceholder) { return locale.lang.yearPlaceholder; } if (picker === 'quarter' && locale.lang.quarterPlaceholder) { return locale.lang.quarterPlaceholder; } if (picker === 'month' && locale.lang.monthPlaceholder) { return locale.lang.monthPlaceholder; } if (picker === 'week' && locale.lang.weekPlaceholder) { return locale.lang.weekPlaceholder; } if (picker === 'time' && locale.timePickerLocale.placeholder) { return locale.timePickerLocale.placeholder; } return locale.lang.placeholder; } function getRangePlaceholder(picker, locale, customizePlaceholder) { if (customizePlaceholder !== undefined) { return customizePlaceholder; } if (picker === 'year' && locale.lang.yearPlaceholder) { return locale.lang.rangeYearPlaceholder; } if (picker === 'month' && locale.lang.monthPlaceholder) { return locale.lang.rangeMonthPlaceholder; } if (picker === 'week' && locale.lang.weekPlaceholder) { return locale.lang.rangeWeekPlaceholder; } if (picker === 'time' && locale.timePickerLocale.placeholder) { return locale.timePickerLocale.rangePlaceholder; } return locale.lang.rangePlaceholder; } /***/ }), /***/ "./components/descriptions/Cell.tsx": /*!******************************************!*\ !*** ./components/descriptions/Cell.tsx ***! \******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); function notEmpty(val) { return val !== undefined && val !== null; } var Cell = function Cell(_ref) { var itemPrefixCls = _ref.itemPrefixCls, component = _ref.component, span = _ref.span, className = _ref.className, style = _ref.style, labelStyle = _ref.labelStyle, contentStyle = _ref.contentStyle, bordered = _ref.bordered, label = _ref.label, content = _ref.content, colon = _ref.colon; var Component = component; if (bordered) { var _classNames; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](Component, { className: classnames__WEBPACK_IMPORTED_MODULE_2___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(itemPrefixCls, "-item-label"), notEmpty(label)), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(itemPrefixCls, "-item-content"), notEmpty(content)), _classNames), className), style: style, colSpan: span }, notEmpty(label) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("span", { style: labelStyle }, label), notEmpty(content) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("span", { style: contentStyle }, content)); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](Component, { className: classnames__WEBPACK_IMPORTED_MODULE_2___default()("".concat(itemPrefixCls, "-item"), className), style: style, colSpan: span }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(itemPrefixCls, "-item-container") }, label && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("span", { className: classnames__WEBPACK_IMPORTED_MODULE_2___default()("".concat(itemPrefixCls, "-item-label"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(itemPrefixCls, "-item-no-colon"), !colon)), style: labelStyle }, label), content && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("span", { className: classnames__WEBPACK_IMPORTED_MODULE_2___default()("".concat(itemPrefixCls, "-item-content")), style: contentStyle }, content))); }; /* harmony default export */ __webpack_exports__["a"] = (Cell); /***/ }), /***/ "./components/descriptions/Item.tsx": /*!******************************************!*\ !*** ./components/descriptions/Item.tsx ***! \******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; var DescriptionsItem = function DescriptionsItem(_ref) { var children = _ref.children; return children; }; /* harmony default export */ __webpack_exports__["a"] = (DescriptionsItem); /***/ }), /***/ "./components/descriptions/Row.tsx": /*!*****************************************!*\ !*** ./components/descriptions/Row.tsx ***! \*****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _Cell__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Cell */ "./components/descriptions/Cell.tsx"); /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! . */ "./components/descriptions/index.tsx"); function renderCells(items, _ref, _ref2) { var colon = _ref.colon, prefixCls = _ref.prefixCls, bordered = _ref.bordered; var component = _ref2.component, type = _ref2.type, showLabel = _ref2.showLabel, showContent = _ref2.showContent, rootLabelStyle = _ref2.labelStyle, rootContentStyle = _ref2.contentStyle; return items.map(function (_ref3, index) { var _ref3$props = _ref3.props, label = _ref3$props.label, children = _ref3$props.children, _ref3$props$prefixCls = _ref3$props.prefixCls, itemPrefixCls = _ref3$props$prefixCls === void 0 ? prefixCls : _ref3$props$prefixCls, className = _ref3$props.className, style = _ref3$props.style, labelStyle = _ref3$props.labelStyle, contentStyle = _ref3$props.contentStyle, _ref3$props$span = _ref3$props.span, span = _ref3$props$span === void 0 ? 1 : _ref3$props$span, key = _ref3.key; if (typeof component === 'string') { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_Cell__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], { key: "".concat(type, "-").concat(key || index), className: className, style: style, labelStyle: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, rootLabelStyle), labelStyle), contentStyle: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, rootContentStyle), contentStyle), span: span, colon: colon, component: component, itemPrefixCls: itemPrefixCls, bordered: bordered, label: showLabel ? label : null, content: showContent ? children : null }); } return [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_Cell__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], { key: "label-".concat(key || index), className: className, style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, rootLabelStyle), style), labelStyle), span: 1, colon: colon, component: component[0], itemPrefixCls: itemPrefixCls, bordered: bordered, label: label }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_Cell__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], { key: "content-".concat(key || index), className: className, style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, rootContentStyle), style), contentStyle), span: span * 2 - 1, component: component[1], itemPrefixCls: itemPrefixCls, bordered: bordered, content: children })]; }); } var Row = function Row(props) { var descContext = react__WEBPACK_IMPORTED_MODULE_1__["useContext"](___WEBPACK_IMPORTED_MODULE_3__[/* DescriptionsContext */ "a"]); var prefixCls = props.prefixCls, vertical = props.vertical, row = props.row, index = props.index, bordered = props.bordered; if (vertical) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](react__WEBPACK_IMPORTED_MODULE_1__["Fragment"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("tr", { key: "label-".concat(index), className: "".concat(prefixCls, "-row") }, renderCells(row, props, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ component: 'th', type: 'label', showLabel: true }, descContext))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("tr", { key: "content-".concat(index), className: "".concat(prefixCls, "-row") }, renderCells(row, props, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ component: 'td', type: 'content', showContent: true }, descContext)))); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("tr", { key: index, className: "".concat(prefixCls, "-row") }, renderCells(row, props, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ component: bordered ? ['th', 'td'] : 'td', type: 'item', showLabel: true, showContent: true }, descContext))); }; /* harmony default export */ __webpack_exports__["a"] = (Row); /***/ }), /***/ "./components/descriptions/index.tsx": /*!*******************************************!*\ !*** ./components/descriptions/index.tsx ***! \*******************************************/ /*! exports provided: DescriptionsContext, default */ /*! exports used: DescriptionsContext, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DescriptionsContext; }); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/Children/toArray */ "./node_modules/rc-util/es/Children/toArray.js"); /* harmony import */ var _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../_util/responsiveObserve */ "./components/_util/responsiveObserve.ts"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _Row__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Row */ "./components/descriptions/Row.tsx"); /* harmony import */ var _Item__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Item */ "./components/descriptions/Item.tsx"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); /* eslint-disable react/no-array-index-key */ var DescriptionsContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createContext"]({}); var DEFAULT_COLUMN_MAP = { xxl: 3, xl: 3, lg: 3, md: 3, sm: 2, xs: 1 }; function getColumn(column, screens) { if (typeof column === 'number') { return column; } if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(column) === 'object') { for (var i = 0; i < _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_6__[/* responsiveArray */ "b"].length; i++) { var breakpoint = _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_6__[/* responsiveArray */ "b"][i]; if (screens[breakpoint] && column[breakpoint] !== undefined) { return column[breakpoint] || DEFAULT_COLUMN_MAP[breakpoint]; } } } return 3; } function getFilledItem(node, span, rowRestCol) { var clone = node; if (span === undefined || span > rowRestCol) { clone = Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_11__[/* cloneElement */ "a"])(node, { span: rowRestCol }); if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(span === undefined, 'Descriptions', 'Sum of column `span` in a line not match `column` of Descriptions.'); } return clone; } function getRows(children, column) { var childNodes = Object(rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(children).filter(function (n) { return n; }); var rows = []; var tmpRow = []; var rowRestCol = column; childNodes.forEach(function (node, index) { var _a; var span = (_a = node.props) === null || _a === void 0 ? void 0 : _a.span; var mergedSpan = span || 1; // Additional handle last one if (index === childNodes.length - 1) { tmpRow.push(getFilledItem(node, span, rowRestCol)); rows.push(tmpRow); return; } if (mergedSpan < rowRestCol) { rowRestCol -= mergedSpan; tmpRow.push(node); } else { tmpRow.push(getFilledItem(node, mergedSpan, rowRestCol)); rows.push(tmpRow); rowRestCol = column; tmpRow = []; } }); return rows; } function Descriptions(_ref) { var _classNames; var customizePrefixCls = _ref.prefixCls, title = _ref.title, extra = _ref.extra, _ref$column = _ref.column, column = _ref$column === void 0 ? DEFAULT_COLUMN_MAP : _ref$column, _ref$colon = _ref.colon, colon = _ref$colon === void 0 ? true : _ref$colon, bordered = _ref.bordered, layout = _ref.layout, children = _ref.children, className = _ref.className, style = _ref.style, size = _ref.size, labelStyle = _ref.labelStyle, contentStyle = _ref.contentStyle; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_3__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_8__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var prefixCls = getPrefixCls('descriptions', customizePrefixCls); var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__["useState"]({}), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_React$useState, 2), screens = _React$useState2[0], setScreens = _React$useState2[1]; var mergedColumn = getColumn(column, screens); // Responsive react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { var token = _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].subscribe(function (newScreens) { if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(column) !== 'object') { return; } setScreens(newScreens); }); return function () { _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].unsubscribe(token); }; }, []); // Children var rows = getRows(children, mergedColumn); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](DescriptionsContext.Provider, { value: { labelStyle: labelStyle, contentStyle: contentStyle } }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: classnames__WEBPACK_IMPORTED_MODULE_4___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(size), size && size !== 'default'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-bordered"), !!bordered), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className), style: style }, (title || extra) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(prefixCls, "-header") }, title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(prefixCls, "-title") }, title), extra && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(prefixCls, "-extra") }, extra)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(prefixCls, "-view") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("table", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("tbody", null, rows.map(function (row, index) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_Row__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], { key: index, index: index, colon: colon, prefixCls: prefixCls, vertical: layout === 'vertical', bordered: bordered, row: row }); })))))); } Descriptions.Item = _Item__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"]; /* harmony default export */ __webpack_exports__["b"] = (Descriptions); /***/ }), /***/ "./components/descriptions/style/index.less": /*!**************************************************!*\ !*** ./components/descriptions/style/index.less ***! \**************************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/descriptions/style/index.tsx": /*!*************************************************!*\ !*** ./components/descriptions/style/index.tsx ***! \*************************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/descriptions/style/index.less"); /***/ }), /***/ "./components/divider/index.tsx": /*!**************************************!*\ !*** ./components/divider/index.tsx ***! \**************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Divider = function Divider(props) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_4__[/* ConfigConsumer */ "a"], null, function (_ref) { var _classNames; var getPrefixCls = _ref.getPrefixCls, direction = _ref.direction; var customizePrefixCls = props.prefixCls, _props$type = props.type, type = _props$type === void 0 ? 'horizontal' : _props$type, _props$orientation = props.orientation, orientation = _props$orientation === void 0 ? 'center' : _props$orientation, className = props.className, children = props.children, dashed = props.dashed, plain = props.plain, restProps = __rest(props, ["prefixCls", "type", "orientation", "className", "children", "dashed", "plain"]); var prefixCls = getPrefixCls('divider', customizePrefixCls); var orientationPrefix = orientation.length > 0 ? "-".concat(orientation) : orientation; var hasChildren = !!children; var classString = classnames__WEBPACK_IMPORTED_MODULE_3___default()(prefixCls, "".concat(prefixCls, "-").concat(type), (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-with-text"), hasChildren), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-with-text").concat(orientationPrefix), hasChildren), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-dashed"), !!dashed), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-plain"), !!plain), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ className: classString }, restProps, { role: "separator" }), children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { className: "".concat(prefixCls, "-inner-text") }, children)); }); }; /* harmony default export */ __webpack_exports__["a"] = (Divider); /***/ }), /***/ "./components/divider/style/index.less": /*!*********************************************!*\ !*** ./components/divider/style/index.less ***! \*********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/divider/style/index.tsx": /*!********************************************!*\ !*** ./components/divider/style/index.tsx ***! \********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/divider/style/index.less"); /***/ }), /***/ "./components/drawer/index.tsx": /*!*************************************!*\ !*** ./components/drawer/index.tsx ***! \*************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var rc_drawer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-drawer */ "./node_modules/rc-drawer/es/index.js"); /* harmony import */ var rc_util_es_getScrollBarSize__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/getScrollBarSize */ "./node_modules/rc-util/es/getScrollBarSize.js"); /* harmony import */ var _ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseOutlined */ "./node_modules/@ant-design/icons/es/icons/CloseOutlined.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_type__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../_util/type */ "./components/_util/type.ts"); /* harmony import */ var _util_hooks_useForceUpdate__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../_util/hooks/useForceUpdate */ "./components/_util/hooks/useForceUpdate.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var DrawerContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createContext"](null); var PlacementTypes = Object(_util_type__WEBPACK_IMPORTED_MODULE_9__[/* tuple */ "a"])('top', 'right', 'bottom', 'left'); var defaultPushState = { distance: 180 }; var Drawer = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function (_a, ref) { var _a$width = _a.width, width = _a$width === void 0 ? 256 : _a$width, _a$height = _a.height, height = _a$height === void 0 ? 256 : _a$height, _a$closable = _a.closable, closable = _a$closable === void 0 ? true : _a$closable, _a$placement = _a.placement, placement = _a$placement === void 0 ? 'right' : _a$placement, _a$maskClosable = _a.maskClosable, maskClosable = _a$maskClosable === void 0 ? true : _a$maskClosable, _a$mask = _a.mask, mask = _a$mask === void 0 ? true : _a$mask, _a$level = _a.level, level = _a$level === void 0 ? null : _a$level, _a$keyboard = _a.keyboard, keyboard = _a$keyboard === void 0 ? true : _a$keyboard, _a$push = _a.push, _push = _a$push === void 0 ? defaultPushState : _a$push, _a$closeIcon = _a.closeIcon, closeIcon = _a$closeIcon === void 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], null) : _a$closeIcon, bodyStyle = _a.bodyStyle, drawerStyle = _a.drawerStyle, prefixCls = _a.prefixCls, className = _a.className, direction = _a.direction, visible = _a.visible, children = _a.children, zIndex = _a.zIndex, destroyOnClose = _a.destroyOnClose, style = _a.style, title = _a.title, headerStyle = _a.headerStyle, onClose = _a.onClose, footer = _a.footer, footerStyle = _a.footerStyle, rest = __rest(_a, ["width", "height", "closable", "placement", "maskClosable", "mask", "level", "keyboard", "push", "closeIcon", "bodyStyle", "drawerStyle", "prefixCls", "className", "direction", "visible", "children", "zIndex", "destroyOnClose", "style", "title", "headerStyle", "onClose", "footer", "footerStyle"]); var forceUpdate = Object(_util_hooks_useForceUpdate__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(); var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__["useState"](false), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_React$useState, 2), internalPush = _React$useState2[0], setPush = _React$useState2[1]; var parentDrawer = react__WEBPACK_IMPORTED_MODULE_3__["useContext"](DrawerContext); var destroyClose = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](false); react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { // fix: delete drawer in child and re-render, no push started. // {show && } if (visible && parentDrawer) { parentDrawer.push(); } return function () { if (parentDrawer) { parentDrawer.pull(); // parentDrawer = null; } }; }, []); react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { if (parentDrawer) { if (visible) { parentDrawer.push(); } else { parentDrawer.pull(); } } }, [visible]); var operations = react__WEBPACK_IMPORTED_MODULE_3__["useMemo"](function () { return { push: function push() { if (_push) { setPush(true); } }, pull: function pull() { if (_push) { setPush(false); } } }; }, [_push]); react__WEBPACK_IMPORTED_MODULE_3__["useImperativeHandle"](ref, function () { return operations; }, [operations]); var isDestroyOnClose = destroyOnClose && !visible; var onDestroyTransitionEnd = function onDestroyTransitionEnd() { if (!isDestroyOnClose) { return; } if (!visible) { destroyClose.current = true; forceUpdate(); } }; var getOffsetStyle = function getOffsetStyle() { // https://github.com/ant-design/ant-design/issues/24287 if (!visible && !mask) { return {}; } var offsetStyle = {}; if (placement === 'left' || placement === 'right') { offsetStyle.width = width; } else { offsetStyle.height = height; } return offsetStyle; }; var getRcDrawerStyle = function getRcDrawerStyle() { // get drawer push width or height var getPushTransform = function getPushTransform(_placement) { var distance; if (typeof _push === 'boolean') { distance = _push ? defaultPushState.distance : 0; } else { distance = _push.distance; } distance = parseFloat(String(distance || 0)); if (_placement === 'left' || _placement === 'right') { return "translateX(".concat(_placement === 'left' ? distance : -distance, "px)"); } if (_placement === 'top' || _placement === 'bottom') { return "translateY(".concat(_placement === 'top' ? distance : -distance, "px)"); } }; // 当无 mask 时,将 width 应用到外层容器上 // 解决 https://github.com/ant-design/ant-design/issues/12401 的问题 var offsetStyle = mask ? {} : getOffsetStyle(); return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ zIndex: zIndex, transform: internalPush ? getPushTransform(placement) : undefined }, offsetStyle), style); }; function renderCloseIcon() { return closable && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("button", { type: "button", onClick: onClose, "aria-label": "Close", className: "".concat(prefixCls, "-close"), style: { '--scroll-bar': "".concat(Object(rc_util_es_getScrollBarSize__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(), "px") } }, closeIcon); } function renderHeader() { if (!title && !closable) { return null; } var headerClassName = title ? "".concat(prefixCls, "-header") : "".concat(prefixCls, "-header-no-title"); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: headerClassName, style: headerStyle }, title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(prefixCls, "-title") }, title), closable && renderCloseIcon()); } function renderFooter() { if (!footer) { return null; } var footerClassName = "".concat(prefixCls, "-footer"); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: footerClassName, style: footerStyle }, footer); } // render drawer body dom var renderBody = function renderBody() { if (destroyClose.current && !visible) { return null; } destroyClose.current = false; var containerStyle = {}; if (isDestroyOnClose) { // Increase the opacity transition, delete children after closing. containerStyle.opacity = 0; containerStyle.transition = 'opacity .3s'; } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(prefixCls, "-wrapper-body"), style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, containerStyle), drawerStyle), onTransitionEnd: onDestroyTransitionEnd }, renderHeader(), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(prefixCls, "-body"), style: bodyStyle }, children), renderFooter()); }; var drawerClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()(Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ 'no-mask': !mask }, "".concat(prefixCls, "-rtl"), direction === 'rtl'), className); var offsetStyle = mask ? getOffsetStyle() : {}; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](DrawerContext.Provider, { value: operations }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](rc_drawer__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ handler: false }, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ placement: placement, prefixCls: prefixCls, maskClosable: maskClosable, level: level, keyboard: keyboard, children: children, onClose: onClose }, rest), offsetStyle, { open: visible, showMask: mask, style: getRcDrawerStyle(), className: drawerClassName }), renderBody())); }); Drawer.displayName = 'Drawer'; var DrawerWrapper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function (props, ref) { var customizePrefixCls = props.prefixCls, customizeGetContainer = props.getContainer; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_3__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_8__[/* ConfigContext */ "b"]), getPopupContainer = _React$useContext.getPopupContainer, getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var prefixCls = getPrefixCls('drawer', customizePrefixCls); var getContainer = // 有可能为 false,所以不能直接判断 customizeGetContainer === undefined && getPopupContainer ? function () { return getPopupContainer(document.body); } : customizeGetContainer; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](Drawer, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, props, { ref: ref, prefixCls: prefixCls, getContainer: getContainer, direction: direction })); }); DrawerWrapper.displayName = 'DrawerWrapper'; /* harmony default export */ __webpack_exports__["a"] = (DrawerWrapper); /***/ }), /***/ "./components/drawer/style/index.less": /*!********************************************!*\ !*** ./components/drawer/style/index.less ***! \********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/drawer/style/index.tsx": /*!*******************************************!*\ !*** ./components/drawer/style/index.tsx ***! \*******************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/drawer/style/index.less"); // deps-lint-skip: empty /***/ }), /***/ "./components/dropdown/dropdown-button.tsx": /*!*************************************************!*\ !*** ./components/dropdown/dropdown-button.tsx ***! \*************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _ant_design_icons_es_icons_EllipsisOutlined__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ant-design/icons/es/icons/EllipsisOutlined */ "./node_modules/@ant-design/icons/es/icons/EllipsisOutlined.js"); /* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../button */ "./components/button/index.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _dropdown__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./dropdown */ "./components/dropdown/dropdown.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var ButtonGroup = _button__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].Group; var DropdownButton = function DropdownButton(props) { var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_6__[/* ConfigContext */ "b"]), getContextPopupContainer = _React$useContext.getPopupContainer, getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var customizePrefixCls = props.prefixCls, type = props.type, disabled = props.disabled, onClick = props.onClick, htmlType = props.htmlType, children = props.children, className = props.className, overlay = props.overlay, trigger = props.trigger, align = props.align, visible = props.visible, onVisibleChange = props.onVisibleChange, placement = props.placement, getPopupContainer = props.getPopupContainer, href = props.href, _props$icon = props.icon, icon = _props$icon === void 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_EllipsisOutlined__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], null) : _props$icon, title = props.title, buttonsRender = props.buttonsRender, mouseEnterDelay = props.mouseEnterDelay, mouseLeaveDelay = props.mouseLeaveDelay, restProps = __rest(props, ["prefixCls", "type", "disabled", "onClick", "htmlType", "children", "className", "overlay", "trigger", "align", "visible", "onVisibleChange", "placement", "getPopupContainer", "href", "icon", "title", "buttonsRender", "mouseEnterDelay", "mouseLeaveDelay"]); var prefixCls = getPrefixCls('dropdown-button', customizePrefixCls); var dropdownProps = { align: align, overlay: overlay, disabled: disabled, trigger: disabled ? [] : trigger, onVisibleChange: onVisibleChange, getPopupContainer: getPopupContainer || getContextPopupContainer, mouseEnterDelay: mouseEnterDelay, mouseLeaveDelay: mouseLeaveDelay }; if ('visible' in props) { dropdownProps.visible = visible; } if ('placement' in props) { dropdownProps.placement = placement; } else { dropdownProps.placement = direction === 'rtl' ? 'bottomLeft' : 'bottomRight'; } var leftButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_button__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], { type: type, disabled: disabled, onClick: onClick, htmlType: htmlType, href: href, title: title }, children); var rightButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_button__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], { type: type, icon: icon }); var _buttonsRender = buttonsRender([leftButton, rightButton]), _buttonsRender2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_buttonsRender, 2), leftButtonToRender = _buttonsRender2[0], rightButtonToRender = _buttonsRender2[1]; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](ButtonGroup, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, restProps, { className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(prefixCls, className) }), leftButtonToRender, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_dropdown__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], dropdownProps, rightButtonToRender)); }; DropdownButton.__ANT_BUTTON = true; DropdownButton.defaultProps = { type: 'default', buttonsRender: function buttonsRender(buttons) { return buttons; } }; /* harmony default export */ __webpack_exports__["a"] = (DropdownButton); /***/ }), /***/ "./components/dropdown/dropdown.tsx": /*!******************************************!*\ !*** ./components/dropdown/dropdown.tsx ***! \******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var rc_dropdown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-dropdown */ "./node_modules/rc-dropdown/es/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/icons/es/icons/RightOutlined */ "./node_modules/@ant-design/icons/es/icons/RightOutlined.js"); /* harmony import */ var _dropdown_button__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./dropdown-button */ "./components/dropdown/dropdown-button.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _util_type__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../_util/type */ "./components/_util/type.ts"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); var Placements = Object(_util_type__WEBPACK_IMPORTED_MODULE_9__[/* tuple */ "a"])('topLeft', 'topCenter', 'topRight', 'bottomLeft', 'bottomCenter', 'bottomRight'); var Dropdown = function Dropdown(props) { var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_7__[/* ConfigContext */ "b"]), getContextPopupContainer = _React$useContext.getPopupContainer, getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var getTransitionName = function getTransitionName() { var rootPrefixCls = getPrefixCls(); var _props$placement = props.placement, placement = _props$placement === void 0 ? '' : _props$placement, transitionName = props.transitionName; if (transitionName !== undefined) { return transitionName; } if (placement.indexOf('top') >= 0) { return "".concat(rootPrefixCls, "-slide-down"); } return "".concat(rootPrefixCls, "-slide-up"); }; var renderOverlay = function renderOverlay(prefixCls) { // rc-dropdown already can process the function of overlay, but we have check logic here. // So we need render the element to check and pass back to rc-dropdown. var overlay = props.overlay; var overlayNode; if (typeof overlay === 'function') { overlayNode = overlay(); } else { overlayNode = overlay; } overlayNode = react__WEBPACK_IMPORTED_MODULE_2__["Children"].only(typeof overlayNode === 'string' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", null, overlayNode) : overlayNode); var overlayProps = overlayNode.props; // Warning if use other mode if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(!overlayProps.mode || overlayProps.mode === 'vertical', 'Dropdown', "mode=\"".concat(overlayProps.mode, "\" is not supported for Dropdown's Menu.")); // menu cannot be selectable in dropdown defaultly var _overlayProps$selecta = overlayProps.selectable, selectable = _overlayProps$selecta === void 0 ? false : _overlayProps$selecta, expandIcon = overlayProps.expandIcon; var overlayNodeExpandIcon = typeof expandIcon !== 'undefined' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["isValidElement"](expandIcon) ? expandIcon : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { className: "".concat(prefixCls, "-menu-submenu-arrow") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], { className: "".concat(prefixCls, "-menu-submenu-arrow-icon") })); var fixedModeOverlay = typeof overlayNode.type === 'string' ? overlayNode : Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_10__[/* cloneElement */ "a"])(overlayNode, { mode: 'vertical', selectable: selectable, expandIcon: overlayNodeExpandIcon }); return fixedModeOverlay; }; var getPlacement = function getPlacement() { var placement = props.placement; if (placement !== undefined) { return placement; } return direction === 'rtl' ? 'bottomRight' : 'bottomLeft'; }; var arrow = props.arrow, customizePrefixCls = props.prefixCls, children = props.children, trigger = props.trigger, disabled = props.disabled, getPopupContainer = props.getPopupContainer, overlayClassName = props.overlayClassName; var prefixCls = getPrefixCls('dropdown', customizePrefixCls); var child = react__WEBPACK_IMPORTED_MODULE_2__["Children"].only(children); var dropdownTrigger = Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_10__[/* cloneElement */ "a"])(child, { className: classnames__WEBPACK_IMPORTED_MODULE_4___default()("".concat(prefixCls, "-trigger"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'), child.props.className), disabled: disabled }); var overlayClassNameCustomized = classnames__WEBPACK_IMPORTED_MODULE_4___default()(overlayClassName, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(prefixCls, "-rtl"), direction === 'rtl')); var triggerActions = disabled ? [] : trigger; var alignPoint; if (triggerActions && triggerActions.indexOf('contextMenu') !== -1) { alignPoint = true; } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](rc_dropdown__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ arrow: arrow, alignPoint: alignPoint }, props, { overlayClassName: overlayClassNameCustomized, prefixCls: prefixCls, getPopupContainer: getPopupContainer || getContextPopupContainer, transitionName: getTransitionName(), trigger: triggerActions, overlay: function overlay() { return renderOverlay(prefixCls); }, placement: getPlacement() }), dropdownTrigger); }; Dropdown.Button = _dropdown_button__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"]; Dropdown.defaultProps = { mouseEnterDelay: 0.15, mouseLeaveDelay: 0.1 }; /* harmony default export */ __webpack_exports__["a"] = (Dropdown); /***/ }), /***/ "./components/dropdown/index.tsx": /*!***************************************!*\ !*** ./components/dropdown/index.tsx ***! \***************************************/ /*! exports provided: DropDownProps, DropdownButtonProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _dropdown__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dropdown */ "./components/dropdown/dropdown.tsx"); /* harmony import */ var _dropdown_button__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dropdown-button */ "./components/dropdown/dropdown-button.tsx"); /* harmony default export */ __webpack_exports__["a"] = (_dropdown__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]); /***/ }), /***/ "./components/dropdown/style/index.less": /*!**********************************************!*\ !*** ./components/dropdown/style/index.less ***! \**********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/dropdown/style/index.tsx": /*!*********************************************!*\ !*** ./components/dropdown/style/index.tsx ***! \*********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/dropdown/style/index.less"); /* harmony import */ var _button_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../button/style */ "./components/button/style/index.tsx"); // style dependencies /***/ }), /***/ "./components/empty/empty.tsx": /*!************************************!*\ !*** ./components/empty/empty.tsx ***! \************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var Empty = function Empty() { var _React$useContext = react__WEBPACK_IMPORTED_MODULE_0__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_1__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls; var prefixCls = getPrefixCls('empty-img-default'); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: prefixCls, width: "184", height: "152", viewBox: "0 0 184 152", xmlns: "http://www.w3.org/2000/svg" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("g", { fill: "none", fillRule: "evenodd" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("g", { transform: "translate(24 31.67)" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("ellipse", { className: "".concat(prefixCls, "-ellipse"), cx: "67.797", cy: "106.89", rx: "67.797", ry: "12.668" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { className: "".concat(prefixCls, "-path-1"), d: "M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { className: "".concat(prefixCls, "-path-2"), d: "M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z", transform: "translate(13.56)" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { className: "".concat(prefixCls, "-path-3"), d: "M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { className: "".concat(prefixCls, "-path-4"), d: "M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z" })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { className: "".concat(prefixCls, "-path-5"), d: "M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("g", { className: "".concat(prefixCls, "-g"), transform: "translate(149.65 15.383)" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("ellipse", { cx: "20.654", cy: "3.167", rx: "2.849", ry: "2.815" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z" })))); }; /* harmony default export */ __webpack_exports__["a"] = (Empty); /***/ }), /***/ "./components/empty/index.tsx": /*!************************************!*\ !*** ./components/empty/index.tsx ***! \************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../locale-provider/LocaleReceiver */ "./components/locale-provider/LocaleReceiver.tsx"); /* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./empty */ "./components/empty/empty.tsx"); /* harmony import */ var _simple__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./simple */ "./components/empty/simple.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var defaultEmptyImg = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_empty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], null); var simpleEmptyImg = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_simple__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], null); var Empty = function Empty(_a) { var className = _a.className, customizePrefixCls = _a.prefixCls, _a$image = _a.image, image = _a$image === void 0 ? defaultEmptyImg : _a$image, description = _a.description, children = _a.children, imageStyle = _a.imageStyle, restProps = __rest(_a, ["className", "prefixCls", "image", "description", "children", "imageStyle"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_4__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], { componentName: "Empty" }, function (locale) { var _classNames; var prefixCls = getPrefixCls('empty', customizePrefixCls); var des = typeof description !== 'undefined' ? description : locale.description; var alt = typeof des === 'string' ? des : 'empty'; var imageNode = null; if (typeof image === 'string') { imageNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("img", { alt: alt, src: image }); } else { imageNode = image; } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-normal"), image === simpleEmptyImg), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className) }, restProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-image"), style: imageStyle }, imageNode), des && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-description") }, des), children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-footer") }, children)); }); }; Empty.PRESENTED_IMAGE_DEFAULT = defaultEmptyImg; Empty.PRESENTED_IMAGE_SIMPLE = simpleEmptyImg; /* harmony default export */ __webpack_exports__["a"] = (Empty); /***/ }), /***/ "./components/empty/simple.tsx": /*!*************************************!*\ !*** ./components/empty/simple.tsx ***! \*************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var Simple = function Simple() { var _React$useContext = react__WEBPACK_IMPORTED_MODULE_0__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_1__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls; var prefixCls = getPrefixCls('empty-img-simple'); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: prefixCls, width: "64", height: "41", viewBox: "0 0 64 41", xmlns: "http://www.w3.org/2000/svg" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("g", { transform: "translate(0 1)", fill: "none", fillRule: "evenodd" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("ellipse", { className: "".concat(prefixCls, "-ellipse"), cx: "32", cy: "33", rx: "32", ry: "7" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("g", { className: "".concat(prefixCls, "-g"), fillRule: "nonzero" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z", className: "".concat(prefixCls, "-path") })))); }; /* harmony default export */ __webpack_exports__["a"] = (Simple); /***/ }), /***/ "./components/empty/style/index.less": /*!*******************************************!*\ !*** ./components/empty/style/index.less ***! \*******************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/empty/style/index.tsx": /*!******************************************!*\ !*** ./components/empty/style/index.tsx ***! \******************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/empty/style/index.less"); /***/ }), /***/ "./components/form/ErrorList.tsx": /*!***************************************!*\ !*** ./components/form/ErrorList.tsx ***! \***************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ErrorList; }); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var rc_motion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-motion */ "./node_modules/rc-motion/es/index.js"); /* harmony import */ var rc_util_es_hooks_useMemo__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/hooks/useMemo */ "./node_modules/rc-util/es/hooks/useMemo.js"); /* harmony import */ var _hooks_useCacheErrors__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./hooks/useCacheErrors */ "./components/form/hooks/useCacheErrors.ts"); /* harmony import */ var _util_hooks_useForceUpdate__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_util/hooks/useForceUpdate */ "./components/_util/hooks/useForceUpdate.ts"); /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./context */ "./components/form/context.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var EMPTY_LIST = []; function ErrorList(_ref) { var _ref$errors = _ref.errors, errors = _ref$errors === void 0 ? EMPTY_LIST : _ref$errors, help = _ref.help, onDomErrorVisibleChange = _ref.onDomErrorVisibleChange; var forceUpdate = Object(_util_hooks_useForceUpdate__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_context__WEBPACK_IMPORTED_MODULE_8__[/* FormItemPrefixContext */ "c"]), prefixCls = _React$useContext.prefixCls, status = _React$useContext.status; var _React$useContext2 = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_9__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext2.getPrefixCls; var _useCacheErrors = Object(_hooks_useCacheErrors__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(errors, function (changedVisible) { if (changedVisible) { /** * We trigger in sync to avoid dom shaking but this get warning in react 16.13. * * So use Promise to keep in micro async to handle this. * https://github.com/ant-design/ant-design/issues/21698#issuecomment-593743485 */ Promise.resolve().then(function () { onDomErrorVisibleChange === null || onDomErrorVisibleChange === void 0 ? void 0 : onDomErrorVisibleChange(true); }); } forceUpdate(); }, !!help), _useCacheErrors2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_useCacheErrors, 2), visible = _useCacheErrors2[0], cacheErrors = _useCacheErrors2[1]; var memoErrors = Object(rc_util_es_hooks_useMemo__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(function () { return cacheErrors; }, visible, function (_, nextVisible) { return nextVisible; }); // Memo status in same visible var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"](status), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_React$useState, 2), innerStatus = _React$useState2[0], setInnerStatus = _React$useState2[1]; react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { if (visible && status) { setInnerStatus(status); } }, [visible, status]); var baseClassName = "".concat(prefixCls, "-item-explain"); var rootPrefixCls = getPrefixCls(); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](rc_motion__WEBPACK_IMPORTED_MODULE_4__[/* default */ "b"], { motionDeadline: 500, visible: visible, motionName: "".concat(rootPrefixCls, "-show-help"), onLeaveEnd: function onLeaveEnd() { onDomErrorVisibleChange === null || onDomErrorVisibleChange === void 0 ? void 0 : onDomErrorVisibleChange(false); }, motionAppear: true, removeOnLeave: true }, function (_ref2) { var motionClassName = _ref2.className; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(baseClassName, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(baseClassName, "-").concat(innerStatus), innerStatus), motionClassName), key: "help" }, memoErrors.map(function (error, index) { return ( /*#__PURE__*/ // eslint-disable-next-line react/no-array-index-key react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { key: index, role: "alert" }, error) ); })); }); } /***/ }), /***/ "./components/form/Form.tsx": /*!**********************************!*\ !*** ./components/form/Form.tsx ***! \**********************************/ /*! exports provided: useForm, List, FormInstance, default */ /*! exports used: default, useForm */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var rc_field_form__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-field-form */ "./node_modules/rc-field-form/es/index.js"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./context */ "./components/form/context.tsx"); /* harmony import */ var _hooks_useForm__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./hooks/useForm */ "./components/form/hooks/useForm.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _hooks_useForm__WEBPACK_IMPORTED_MODULE_9__["a"]; }); /* harmony import */ var _config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../config-provider/SizeContext */ "./components/config-provider/SizeContext.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var InternalForm = function InternalForm(props, ref) { var _classNames; var contextSize = react__WEBPACK_IMPORTED_MODULE_4__["useContext"](_config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_10__[/* default */ "b"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_4__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_7__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction, contextForm = _React$useContext.form; var customizePrefixCls = props.prefixCls, _props$className = props.className, className = _props$className === void 0 ? '' : _props$className, _props$size = props.size, size = _props$size === void 0 ? contextSize : _props$size, form = props.form, colon = props.colon, labelAlign = props.labelAlign, labelCol = props.labelCol, wrapperCol = props.wrapperCol, hideRequiredMark = props.hideRequiredMark, _props$layout = props.layout, layout = _props$layout === void 0 ? 'horizontal' : _props$layout, scrollToFirstError = props.scrollToFirstError, requiredMark = props.requiredMark, onFinishFailed = props.onFinishFailed, name = props.name, restFormProps = __rest(props, ["prefixCls", "className", "size", "form", "colon", "labelAlign", "labelCol", "wrapperCol", "hideRequiredMark", "layout", "scrollToFirstError", "requiredMark", "onFinishFailed", "name"]); var mergedRequiredMark = Object(react__WEBPACK_IMPORTED_MODULE_4__["useMemo"])(function () { if (requiredMark !== undefined) { return requiredMark; } if (contextForm && contextForm.requiredMark !== undefined) { return contextForm.requiredMark; } if (hideRequiredMark) { return false; } return true; }, [hideRequiredMark, requiredMark, contextForm]); var prefixCls = getPrefixCls('form', customizePrefixCls); var formClassName = classnames__WEBPACK_IMPORTED_MODULE_5___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(layout), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-hide-required-mark"), mergedRequiredMark === false), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(size), size), _classNames), className); var _useForm = Object(_hooks_useForm__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])(form), _useForm2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_useForm, 1), wrapForm = _useForm2[0]; var __INTERNAL__ = wrapForm.__INTERNAL__; __INTERNAL__.name = name; var formContextValue = Object(react__WEBPACK_IMPORTED_MODULE_4__["useMemo"])(function () { return { name: name, labelAlign: labelAlign, labelCol: labelCol, wrapperCol: wrapperCol, vertical: layout === 'vertical', colon: colon, requiredMark: mergedRequiredMark, itemRef: __INTERNAL__.itemRef }; }, [name, labelAlign, labelCol, wrapperCol, layout, colon, mergedRequiredMark]); react__WEBPACK_IMPORTED_MODULE_4__["useImperativeHandle"](ref, function () { return wrapForm; }); var onInternalFinishFailed = function onInternalFinishFailed(errorInfo) { onFinishFailed === null || onFinishFailed === void 0 ? void 0 : onFinishFailed(errorInfo); var defaultScrollToFirstError = { block: 'nearest' }; if (scrollToFirstError && errorInfo.errorFields.length) { if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(scrollToFirstError) === 'object') { defaultScrollToFirstError = scrollToFirstError; } wrapForm.scrollToField(errorInfo.errorFields[0].name, defaultScrollToFirstError); } }; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_10__[/* SizeContextProvider */ "a"], { size: size }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_context__WEBPACK_IMPORTED_MODULE_8__[/* FormContext */ "a"].Provider, { value: formContextValue }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](rc_field_form__WEBPACK_IMPORTED_MODULE_6__[/* default */ "d"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ id: name }, restFormProps, { name: name, onFinishFailed: onInternalFinishFailed, form: wrapForm, className: formClassName })))); }; var Form = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["forwardRef"](InternalForm); /* harmony default export */ __webpack_exports__["a"] = (Form); /***/ }), /***/ "./components/form/FormItem.tsx": /*!**************************************!*\ !*** ./components/form/FormItem.tsx ***! \**************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/isEqual */ "./node_modules/lodash/isEqual.js"); /* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_isEqual__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var rc_field_form__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-field-form */ "./node_modules/rc-field-form/es/index.js"); /* harmony import */ var rc_field_form_es_FieldContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rc-field-form/es/FieldContext */ "./node_modules/rc-field-form/es/FieldContext.js"); /* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rc-util/es/ref */ "./node_modules/rc-util/es/ref.js"); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var _grid_row__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../grid/row */ "./components/grid/row.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_type__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../_util/type */ "./components/_util/type.ts"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _FormItemLabel__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./FormItemLabel */ "./components/form/FormItemLabel.tsx"); /* harmony import */ var _FormItemInput__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./FormItemInput */ "./components/form/FormItemInput.tsx"); /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./context */ "./components/form/context.tsx"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./util */ "./components/form/util.ts"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); /* harmony import */ var _hooks_useFrameState__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./hooks/useFrameState */ "./components/form/hooks/useFrameState.ts"); /* harmony import */ var _hooks_useItemRef__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./hooks/useItemRef */ "./components/form/hooks/useItemRef.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var NAME_SPLIT = '__SPLIT__'; var ValidateStatuses = Object(_util_type__WEBPACK_IMPORTED_MODULE_14__[/* tuple */ "a"])('success', 'warning', 'error', 'validating', ''); var MemoInput = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["memo"](function (_ref) { var children = _ref.children; return children; }, function (prev, next) { return prev.value === next.value && prev.update === next.update; }); function hasValidName(name) { if (name === null) { if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(false, 'Form.Item', '`null` is passed as `name` property'); } return !(name === undefined || name === null); } function FormItem(props) { var name = props.name, fieldKey = props.fieldKey, noStyle = props.noStyle, dependencies = props.dependencies, customizePrefixCls = props.prefixCls, style = props.style, className = props.className, shouldUpdate = props.shouldUpdate, hasFeedback = props.hasFeedback, help = props.help, rules = props.rules, validateStatus = props.validateStatus, children = props.children, required = props.required, label = props.label, messageVariables = props.messageVariables, _props$trigger = props.trigger, trigger = _props$trigger === void 0 ? 'onChange' : _props$trigger, validateTrigger = props.validateTrigger, hidden = props.hidden, restProps = __rest(props, ["name", "fieldKey", "noStyle", "dependencies", "prefixCls", "style", "className", "shouldUpdate", "hasFeedback", "help", "rules", "validateStatus", "children", "required", "label", "messageVariables", "trigger", "validateTrigger", "hidden"]); var destroyRef = Object(react__WEBPACK_IMPORTED_MODULE_5__["useRef"])(false); var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_5__["useContext"])(_config_provider__WEBPACK_IMPORTED_MODULE_13__[/* ConfigContext */ "b"]), getPrefixCls = _useContext.getPrefixCls; var _useContext2 = Object(react__WEBPACK_IMPORTED_MODULE_5__["useContext"])(_context__WEBPACK_IMPORTED_MODULE_18__[/* FormContext */ "a"]), formName = _useContext2.name, requiredMark = _useContext2.requiredMark; var _useContext3 = Object(react__WEBPACK_IMPORTED_MODULE_5__["useContext"])(_context__WEBPACK_IMPORTED_MODULE_18__[/* FormItemContext */ "b"]), updateItemErrors = _useContext3.updateItemErrors; var _React$useState = react__WEBPACK_IMPORTED_MODULE_5__["useState"](!!help), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(_React$useState, 2), domErrorVisible = _React$useState2[0], innerSetDomErrorVisible = _React$useState2[1]; var _useFrameState = Object(_hooks_useFrameState__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"])({}), _useFrameState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(_useFrameState, 2), inlineErrors = _useFrameState2[0], setInlineErrors = _useFrameState2[1]; var _useContext4 = Object(react__WEBPACK_IMPORTED_MODULE_5__["useContext"])(rc_field_form_es_FieldContext__WEBPACK_IMPORTED_MODULE_9__[/* default */ "b"]), contextValidateTrigger = _useContext4.validateTrigger; var mergedValidateTrigger = validateTrigger !== undefined ? validateTrigger : contextValidateTrigger; function setDomErrorVisible(visible) { if (!destroyRef.current) { innerSetDomErrorVisible(visible); } } var hasName = hasValidName(name); // Cache Field NamePath var nameRef = Object(react__WEBPACK_IMPORTED_MODULE_5__["useRef"])([]); // Should clean up if Field removed react__WEBPACK_IMPORTED_MODULE_5__["useEffect"](function () { return function () { destroyRef.current = true; updateItemErrors(nameRef.current.join(NAME_SPLIT), []); }; }, []); var prefixCls = getPrefixCls('form', customizePrefixCls); // ======================== Errors ======================== // Collect noStyle Field error to the top FormItem var updateChildItemErrors = noStyle ? updateItemErrors : function (subName, subErrors, originSubName) { setInlineErrors(function () { var prevInlineErrors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; // Clean up origin error when name changed if (originSubName !== subName) { delete prevInlineErrors[originSubName]; } if (!lodash_isEqual__WEBPACK_IMPORTED_MODULE_6___default()(prevInlineErrors[subName], subErrors)) { return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, prevInlineErrors), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, subName, subErrors)); } return prevInlineErrors; }); }; // ===================== Children Ref ===================== var getItemRef = Object(_hooks_useItemRef__WEBPACK_IMPORTED_MODULE_22__[/* default */ "a"])(); function renderLayout(baseChildren, fieldId, meta, isRequired) { var _itemClassName; var _a; if (noStyle && !hidden) { return baseChildren; } // ======================== Errors ======================== // >>> collect sub errors var subErrorList = []; Object.keys(inlineErrors).forEach(function (subName) { subErrorList = [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(subErrorList), Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(inlineErrors[subName] || [])); }); // >>> merged errors var mergedErrors; if (help !== undefined && help !== null) { mergedErrors = Object(_util__WEBPACK_IMPORTED_MODULE_19__[/* toArray */ "b"])(help); } else { mergedErrors = meta ? meta.errors : []; mergedErrors = [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(mergedErrors), Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(subErrorList)); } // ======================== Status ======================== var mergedValidateStatus = ''; if (validateStatus !== undefined) { mergedValidateStatus = validateStatus; } else if (meta === null || meta === void 0 ? void 0 : meta.validating) { mergedValidateStatus = 'validating'; } else if (((_a = meta === null || meta === void 0 ? void 0 : meta.errors) === null || _a === void 0 ? void 0 : _a.length) || subErrorList.length) { mergedValidateStatus = 'error'; } else if (meta === null || meta === void 0 ? void 0 : meta.touched) { mergedValidateStatus = 'success'; } var itemClassName = (_itemClassName = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_itemClassName, "".concat(prefixCls, "-item"), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_itemClassName, "".concat(prefixCls, "-item-with-help"), domErrorVisible || !!help), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_itemClassName, "".concat(className), !!className), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_itemClassName, "".concat(prefixCls, "-item-has-feedback"), mergedValidateStatus && hasFeedback), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_itemClassName, "".concat(prefixCls, "-item-has-success"), mergedValidateStatus === 'success'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_itemClassName, "".concat(prefixCls, "-item-has-warning"), mergedValidateStatus === 'warning'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_itemClassName, "".concat(prefixCls, "-item-has-error"), mergedValidateStatus === 'error'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_itemClassName, "".concat(prefixCls, "-item-is-validating"), mergedValidateStatus === 'validating'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_itemClassName, "".concat(prefixCls, "-item-hidden"), hidden), _itemClassName); // ======================= Children ======================= return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_grid_row__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({ className: classnames__WEBPACK_IMPORTED_MODULE_7___default()(itemClassName), style: style, key: "row" }, Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"])(restProps, ['colon', 'extra', 'getValueFromEvent', 'getValueProps', 'htmlFor', 'id', 'initialValue', 'isListField', 'labelAlign', 'labelCol', 'normalize', 'preserve', 'tooltip', 'validateFirst', 'valuePropName', 'wrapperCol', '_internalItemRender'])), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_FormItemLabel__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({ htmlFor: fieldId, required: isRequired, requiredMark: requiredMark }, props, { prefixCls: prefixCls })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_FormItemInput__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, props, meta, { errors: mergedErrors, prefixCls: prefixCls, status: mergedValidateStatus, onDomErrorVisibleChange: setDomErrorVisible, validateStatus: mergedValidateStatus }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_context__WEBPACK_IMPORTED_MODULE_18__[/* FormItemContext */ "b"].Provider, { value: { updateItemErrors: updateChildItemErrors } }, baseChildren))); } var isRenderProps = typeof children === 'function'; // Record for real component render var updateRef = Object(react__WEBPACK_IMPORTED_MODULE_5__["useRef"])(0); updateRef.current += 1; if (!hasName && !isRenderProps && !dependencies) { return renderLayout(children); } var variables = {}; if (typeof label === 'string') { variables.label = label; } if (messageVariables) { variables = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, variables), messageVariables); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](rc_field_form__WEBPACK_IMPORTED_MODULE_8__[/* Field */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, props, { messageVariables: variables, trigger: trigger, validateTrigger: mergedValidateTrigger, onReset: function onReset() { setDomErrorVisible(false); } }), function (control, meta, context) { var errors = meta.errors; var mergedName = Object(_util__WEBPACK_IMPORTED_MODULE_19__[/* toArray */ "b"])(name).length && meta ? meta.name : []; var fieldId = Object(_util__WEBPACK_IMPORTED_MODULE_19__[/* getFieldId */ "a"])(mergedName, formName); if (noStyle) { // Clean up origin one var originErrorName = nameRef.current.join(NAME_SPLIT); nameRef.current = Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(mergedName); if (fieldKey) { var fieldKeys = Array.isArray(fieldKey) ? fieldKey : [fieldKey]; nameRef.current = [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(mergedName.slice(0, -1)), Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(fieldKeys)); } updateItemErrors(nameRef.current.join(NAME_SPLIT), errors, originErrorName); } var isRequired = required !== undefined ? required : !!(rules && rules.some(function (rule) { if (rule && Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(rule) === 'object' && rule.required) { return true; } if (typeof rule === 'function') { var ruleEntity = rule(context); return ruleEntity && ruleEntity.required; } return false; })); // ======================= Children ======================= var mergedControl = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, control); var childNode = null; Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(!(shouldUpdate && dependencies), 'Form.Item', "`shouldUpdate` and `dependencies` shouldn't be used together. See https://ant.design/components/form/#dependencies."); if (Array.isArray(children) && hasName) { Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(false, 'Form.Item', '`children` is array of render props cannot have `name`.'); childNode = children; } else if (isRenderProps && (!(shouldUpdate || dependencies) || hasName)) { Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(!!(shouldUpdate || dependencies), 'Form.Item', '`children` of render props only work with `shouldUpdate` or `dependencies`.'); Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(!hasName, 'Form.Item', "Do not use `name` with `children` of render props since it's not a field."); } else if (dependencies && !isRenderProps && !hasName) { Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(false, 'Form.Item', 'Must set `name` or use render props when `dependencies` is set.'); } else if (Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_20__[/* isValidElement */ "b"])(children)) { Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(children.props.defaultValue === undefined, 'Form.Item', '`defaultValue` will not work on controlled Field. You should use `initialValues` of Form instead.'); var childProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, children.props), mergedControl); if (!childProps.id) { childProps.id = fieldId; } if (Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_10__[/* supportRef */ "c"])(children)) { childProps.ref = getItemRef(mergedName, children); } // We should keep user origin event handler var triggers = new Set([].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_util__WEBPACK_IMPORTED_MODULE_19__[/* toArray */ "b"])(trigger)), Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_util__WEBPACK_IMPORTED_MODULE_19__[/* toArray */ "b"])(mergedValidateTrigger)))); triggers.forEach(function (eventName) { childProps[eventName] = function () { var _a2, _c2; var _a, _b, _c; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } (_a = mergedControl[eventName]) === null || _a === void 0 ? void 0 : (_a2 = _a).call.apply(_a2, [mergedControl].concat(args)); (_c = (_b = children.props)[eventName]) === null || _c === void 0 ? void 0 : (_c2 = _c).call.apply(_c2, [_b].concat(args)); }; }); childNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](MemoInput, { value: mergedControl[props.valuePropName || 'value'], update: updateRef.current }, Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_20__[/* cloneElement */ "a"])(children, childProps)); } else if (isRenderProps && (shouldUpdate || dependencies) && !hasName) { childNode = children(context); } else { Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(!mergedName.length, 'Form.Item', '`name` is only used for validate React element. If you are using Form.Item as layout display, please remove `name` instead.'); childNode = children; } return renderLayout(childNode, fieldId, meta, isRequired); }); } /* harmony default export */ __webpack_exports__["a"] = (FormItem); /***/ }), /***/ "./components/form/FormItemInput.tsx": /*!*******************************************!*\ !*** ./components/form/FormItemInput.tsx ***! \*******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _ant_design_icons_es_icons_LoadingOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons/es/icons/LoadingOutlined */ "./node_modules/@ant-design/icons/es/icons/LoadingOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseCircleFilled */ "./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js"); /* harmony import */ var _ant_design_icons_es_icons_CheckCircleFilled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/icons/es/icons/CheckCircleFilled */ "./node_modules/@ant-design/icons/es/icons/CheckCircleFilled.js"); /* harmony import */ var _ant_design_icons_es_icons_ExclamationCircleFilled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ant-design/icons/es/icons/ExclamationCircleFilled */ "./node_modules/@ant-design/icons/es/icons/ExclamationCircleFilled.js"); /* harmony import */ var _grid_col__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../grid/col */ "./components/grid/col.tsx"); /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./context */ "./components/form/context.tsx"); /* harmony import */ var _ErrorList__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ErrorList */ "./components/form/ErrorList.tsx"); var iconMap = { success: _ant_design_icons_es_icons_CheckCircleFilled__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], warning: _ant_design_icons_es_icons_ExclamationCircleFilled__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], error: _ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], validating: _ant_design_icons_es_icons_LoadingOutlined__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"] }; var FormItemInput = function FormItemInput(props) { var prefixCls = props.prefixCls, status = props.status, wrapperCol = props.wrapperCol, children = props.children, help = props.help, errors = props.errors, onDomErrorVisibleChange = props.onDomErrorVisibleChange, hasFeedback = props.hasFeedback, formItemRender = props._internalItemRender, validateStatus = props.validateStatus, extra = props.extra; var baseClassName = "".concat(prefixCls, "-item"); var formContext = react__WEBPACK_IMPORTED_MODULE_1__["useContext"](_context__WEBPACK_IMPORTED_MODULE_8__[/* FormContext */ "a"]); var mergedWrapperCol = wrapperCol || formContext.wrapperCol || {}; var className = classnames__WEBPACK_IMPORTED_MODULE_2___default()("".concat(baseClassName, "-control"), mergedWrapperCol.className); react__WEBPACK_IMPORTED_MODULE_1__["useEffect"](function () { return function () { onDomErrorVisibleChange(false); }; }, []); // Should provides additional icon if `hasFeedback` var IconNode = validateStatus && iconMap[validateStatus]; var icon = hasFeedback && IconNode ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("span", { className: "".concat(baseClassName, "-children-icon") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](IconNode, null)) : null; // Pass to sub FormItem should not with col info var subFormContext = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, formContext); delete subFormContext.labelCol; delete subFormContext.wrapperCol; var inputDom = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(baseClassName, "-control-input") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(baseClassName, "-control-input-content") }, children), icon); var errorListDom = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_context__WEBPACK_IMPORTED_MODULE_8__[/* FormItemPrefixContext */ "c"].Provider, { value: { prefixCls: prefixCls, status: status } }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_ErrorList__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], { errors: errors, help: help, onDomErrorVisibleChange: onDomErrorVisibleChange })); // If extra = 0, && will goes wrong // 0&&error -> 0 var extraDom = extra ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(baseClassName, "-extra") }, extra) : null; var dom = formItemRender && formItemRender.mark === 'pro_table_render' && formItemRender.render ? formItemRender.render(props, { input: inputDom, errorList: errorListDom, extra: extraDom }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](react__WEBPACK_IMPORTED_MODULE_1__["Fragment"], null, inputDom, errorListDom, extraDom); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_context__WEBPACK_IMPORTED_MODULE_8__[/* FormContext */ "a"].Provider, { value: subFormContext }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_grid_col__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, mergedWrapperCol, { className: className }), dom)); }; /* harmony default export */ __webpack_exports__["a"] = (FormItemInput); /***/ }), /***/ "./components/form/FormItemLabel.tsx": /*!*******************************************!*\ !*** ./components/form/FormItemLabel.tsx ***! \*******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _ant_design_icons_es_icons_QuestionCircleOutlined__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ant-design/icons/es/icons/QuestionCircleOutlined */ "./node_modules/@ant-design/icons/es/icons/QuestionCircleOutlined.js"); /* harmony import */ var _grid_col__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../grid/col */ "./components/grid/col.tsx"); /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./context */ "./components/form/context.tsx"); /* harmony import */ var _locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../locale-provider/LocaleReceiver */ "./components/locale-provider/LocaleReceiver.tsx"); /* harmony import */ var _locale_default__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../locale/default */ "./components/locale/default.tsx"); /* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../tooltip */ "./components/tooltip/index.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; function toTooltipProps(tooltip) { if (!tooltip) { return null; } if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(tooltip) === 'object' && ! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["isValidElement"](tooltip)) { return tooltip; } return { title: tooltip }; } var FormItemLabel = function FormItemLabel(_ref) { var prefixCls = _ref.prefixCls, label = _ref.label, htmlFor = _ref.htmlFor, labelCol = _ref.labelCol, labelAlign = _ref.labelAlign, colon = _ref.colon, required = _ref.required, requiredMark = _ref.requiredMark, tooltip = _ref.tooltip; var _useLocaleReceiver = Object(_locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_9__[/* useLocaleReceiver */ "b"])('Form'), _useLocaleReceiver2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_useLocaleReceiver, 1), formLocale = _useLocaleReceiver2[0]; if (!label) return null; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_context__WEBPACK_IMPORTED_MODULE_8__[/* FormContext */ "a"].Consumer, { key: "label" }, function (_ref2) { var _classNames; var vertical = _ref2.vertical, contextLabelAlign = _ref2.labelAlign, contextLabelCol = _ref2.labelCol, contextColon = _ref2.colon; var _a; var mergedLabelCol = labelCol || contextLabelCol || {}; var mergedLabelAlign = labelAlign || contextLabelAlign; var labelClsBasic = "".concat(prefixCls, "-item-label"); var labelColClassName = classnames__WEBPACK_IMPORTED_MODULE_5___default()(labelClsBasic, mergedLabelAlign === 'left' && "".concat(labelClsBasic, "-left"), mergedLabelCol.className); var labelChildren = label; // Keep label is original where there should have no colon var computedColon = colon === true || contextColon !== false && colon !== false; var haveColon = computedColon && !vertical; // Remove duplicated user input colon if (haveColon && typeof label === 'string' && label.trim() !== '') { labelChildren = label.replace(/[:|:]\s*$/, ''); } // Tooltip var tooltipProps = toTooltipProps(tooltip); if (tooltipProps) { var _tooltipProps$icon = tooltipProps.icon, icon = _tooltipProps$icon === void 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_ant_design_icons_es_icons_QuestionCircleOutlined__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], null) : _tooltipProps$icon, restTooltipProps = __rest(tooltipProps, ["icon"]); var tooltipNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_tooltip__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"], restTooltipProps, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["cloneElement"](icon, { className: "".concat(prefixCls, "-item-tooltip") })); labelChildren = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](react__WEBPACK_IMPORTED_MODULE_4__["Fragment"], null, labelChildren, tooltipNode); } // Add required mark if optional if (requiredMark === 'optional' && !required) { labelChildren = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](react__WEBPACK_IMPORTED_MODULE_4__["Fragment"], null, labelChildren, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("span", { className: "".concat(prefixCls, "-item-optional") }, (formLocale === null || formLocale === void 0 ? void 0 : formLocale.optional) || ((_a = _locale_default__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].Form) === null || _a === void 0 ? void 0 : _a.optional))); } var labelClassName = classnames__WEBPACK_IMPORTED_MODULE_5___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-item-required"), required), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-item-required-mark-optional"), requiredMark === 'optional'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-item-no-colon"), !computedColon), _classNames)); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_grid_col__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, mergedLabelCol, { className: labelColClassName }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("label", { htmlFor: htmlFor, className: labelClassName, title: typeof label === 'string' ? label : '' }, labelChildren)); }); }; /* harmony default export */ __webpack_exports__["a"] = (FormItemLabel); /***/ }), /***/ "./components/form/FormList.tsx": /*!**************************************!*\ !*** ./components/form/FormList.tsx ***! \**************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var rc_field_form__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-field-form */ "./node_modules/rc-field-form/es/index.js"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./context */ "./components/form/context.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var FormList = function FormList(_a) { var customizePrefixCls = _a.prefixCls, children = _a.children, props = __rest(_a, ["prefixCls", "children"]); if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(!!props.name, 'Form.List', 'Miss `name` prop.'); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_1__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_4__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls; var prefixCls = getPrefixCls('form', customizePrefixCls); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](rc_field_form__WEBPACK_IMPORTED_MODULE_2__[/* List */ "c"], props, function (fields, operation, meta) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_context__WEBPACK_IMPORTED_MODULE_5__[/* FormItemPrefixContext */ "c"].Provider, { value: { prefixCls: prefixCls, status: 'error' } }, children(fields.map(function (field) { return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, field), { fieldKey: field.key }); }), operation, { errors: meta.errors })); }); }; /* harmony default export */ __webpack_exports__["a"] = (FormList); /***/ }), /***/ "./components/form/context.tsx": /*!*************************************!*\ !*** ./components/form/context.tsx ***! \*************************************/ /*! exports provided: FormContext, FormItemContext, FormProvider, FormItemPrefixContext */ /*! exports used: FormContext, FormItemContext, FormItemPrefixContext, FormProvider */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FormContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return FormItemContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return FormProvider; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return FormItemPrefixContext; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var rc_field_form__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-field-form */ "./node_modules/rc-field-form/es/index.js"); var FormContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createContext"]({ labelAlign: 'right', vertical: false, itemRef: function itemRef() {} }); var FormItemContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createContext"]({ updateItemErrors: function updateItemErrors() {} }); var FormProvider = function FormProvider(props) { var providerProps = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(props, ['prefixCls']); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](rc_field_form__WEBPACK_IMPORTED_MODULE_2__[/* FormProvider */ "b"], providerProps); }; var FormItemPrefixContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createContext"]({ prefixCls: '' }); /***/ }), /***/ "./components/form/hooks/useCacheErrors.ts": /*!*************************************************!*\ !*** ./components/form/hooks/useCacheErrors.ts ***! \*************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useCacheErrors; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _util_hooks_useForceUpdate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../_util/hooks/useForceUpdate */ "./components/_util/hooks/useForceUpdate.ts"); /** Always debounce error to avoid [error -> null -> error] blink */ function useCacheErrors(errors, changeTrigger, directly) { var cacheRef = react__WEBPACK_IMPORTED_MODULE_0__["useRef"]({ errors: errors, visible: !!errors.length }); var forceUpdate = Object(_util_hooks_useForceUpdate__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(); var update = function update() { var prevVisible = cacheRef.current.visible; var newVisible = !!errors.length; var prevErrors = cacheRef.current.errors; cacheRef.current.errors = errors; cacheRef.current.visible = newVisible; if (prevVisible !== newVisible) { changeTrigger(newVisible); } else if (prevErrors.length !== errors.length || prevErrors.some(function (prevErr, index) { return prevErr !== errors[index]; })) { forceUpdate(); } }; react__WEBPACK_IMPORTED_MODULE_0__["useEffect"](function () { if (!directly) { var timeout = setTimeout(update, 10); return function () { return clearTimeout(timeout); }; } }, [errors]); if (directly) { update(); } return [cacheRef.current.visible, cacheRef.current.errors]; } /***/ }), /***/ "./components/form/hooks/useForm.ts": /*!******************************************!*\ !*** ./components/form/hooks/useForm.ts ***! \******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useForm; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var rc_field_form__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-field-form */ "./node_modules/rc-field-form/es/index.js"); /* harmony import */ var scroll_into_view_if_needed__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! scroll-into-view-if-needed */ "./node_modules/scroll-into-view-if-needed/es/index.js"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util */ "./components/form/util.ts"); function toNamePathStr(name) { var namePath = Object(_util__WEBPACK_IMPORTED_MODULE_5__[/* toArray */ "b"])(name); return namePath.join('_'); } function useForm(form) { var _useRcForm = Object(rc_field_form__WEBPACK_IMPORTED_MODULE_3__[/* useForm */ "e"])(), _useRcForm2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_useRcForm, 1), rcForm = _useRcForm2[0]; var itemsRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"]({}); var wrapForm = react__WEBPACK_IMPORTED_MODULE_2__["useMemo"](function () { return form || Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, rcForm), { __INTERNAL__: { itemRef: function itemRef(name) { return function (node) { var namePathStr = toNamePathStr(name); if (node) { itemsRef.current[namePathStr] = node; } else { delete itemsRef.current[namePathStr]; } }; } }, scrollToField: function scrollToField(name) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var namePath = Object(_util__WEBPACK_IMPORTED_MODULE_5__[/* toArray */ "b"])(name); var fieldId = Object(_util__WEBPACK_IMPORTED_MODULE_5__[/* getFieldId */ "a"])(namePath, wrapForm.__INTERNAL__.name); var node = fieldId ? document.getElementById(fieldId) : null; if (node) { Object(scroll_into_view_if_needed__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(node, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ scrollMode: 'if-needed', block: 'nearest' }, options)); } }, getFieldInstance: function getFieldInstance(name) { var namePathStr = toNamePathStr(name); return itemsRef.current[namePathStr]; } }); }, [form, rcForm]); return [wrapForm]; } /***/ }), /***/ "./components/form/hooks/useFrameState.ts": /*!************************************************!*\ !*** ./components/form/hooks/useFrameState.ts ***! \************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useFrameState; }); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var rc_util_es_raf__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-util/es/raf */ "./node_modules/rc-util/es/raf.js"); function useFrameState(defaultValue) { var _React$useState = react__WEBPACK_IMPORTED_MODULE_1__["useState"](defaultValue), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_React$useState, 2), value = _React$useState2[0], setValue = _React$useState2[1]; var frameRef = Object(react__WEBPACK_IMPORTED_MODULE_1__["useRef"])(null); var batchRef = Object(react__WEBPACK_IMPORTED_MODULE_1__["useRef"])([]); var destroyRef = Object(react__WEBPACK_IMPORTED_MODULE_1__["useRef"])(false); react__WEBPACK_IMPORTED_MODULE_1__["useEffect"](function () { return function () { destroyRef.current = true; rc_util_es_raf__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].cancel(frameRef.current); }; }, []); function setFrameValue(updater) { if (destroyRef.current) { return; } if (frameRef.current === null) { batchRef.current = []; frameRef.current = Object(rc_util_es_raf__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(function () { frameRef.current = null; setValue(function (prevValue) { var current = prevValue; batchRef.current.forEach(function (func) { current = func(current); }); return current; }); }); } batchRef.current.push(updater); } return [value, setFrameValue]; } /***/ }), /***/ "./components/form/hooks/useItemRef.ts": /*!*********************************************!*\ !*** ./components/form/hooks/useItemRef.ts ***! \*********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useItemRef; }); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-util/es/ref */ "./node_modules/rc-util/es/ref.js"); /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../context */ "./components/form/context.tsx"); function useItemRef() { var _React$useContext = react__WEBPACK_IMPORTED_MODULE_1__["useContext"](_context__WEBPACK_IMPORTED_MODULE_3__[/* FormContext */ "a"]), itemRef = _React$useContext.itemRef; var cacheRef = react__WEBPACK_IMPORTED_MODULE_1__["useRef"]({}); function getRef(name, children) { var childrenRef = children && Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(children) === 'object' && children.ref; var nameStr = name.join('_'); if (cacheRef.current.name !== nameStr || cacheRef.current.originRef !== childrenRef) { cacheRef.current.name = nameStr; cacheRef.current.originRef = childrenRef; cacheRef.current.ref = Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_2__[/* composeRef */ "a"])(itemRef(name), childrenRef); } return cacheRef.current.ref; } return getRef; } /***/ }), /***/ "./components/form/index.tsx": /*!***********************************!*\ !*** ./components/form/index.tsx ***! \***********************************/ /*! exports provided: FormInstance, FormProps, FormItemProps, ErrorListProps, Rule, RuleObject, RuleRender, FormListProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var rc_field_form_es_interface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-field-form/es/interface */ "./node_modules/rc-field-form/es/interface.js"); /* harmony import */ var _Form__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Form */ "./components/form/Form.tsx"); /* harmony import */ var _FormItem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./FormItem */ "./components/form/FormItem.tsx"); /* harmony import */ var _ErrorList__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ErrorList */ "./components/form/ErrorList.tsx"); /* harmony import */ var _FormList__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./FormList */ "./components/form/FormList.tsx"); /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./context */ "./components/form/context.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); var Form = _Form__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]; Form.Item = _FormItem__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"]; Form.List = _FormList__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"]; Form.ErrorList = _ErrorList__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"]; Form.useForm = _Form__WEBPACK_IMPORTED_MODULE_1__[/* useForm */ "b"]; Form.Provider = _context__WEBPACK_IMPORTED_MODULE_5__[/* FormProvider */ "d"]; Form.create = function () { if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(false, 'Form', 'antd v4 removed `Form.create`. Please remove or use `@ant-design/compatible` instead.'); }; /* harmony default export */ __webpack_exports__["a"] = (Form); /***/ }), /***/ "./components/form/style/index.less": /*!******************************************!*\ !*** ./components/form/style/index.less ***! \******************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/form/style/index.tsx": /*!*****************************************!*\ !*** ./components/form/style/index.tsx ***! \*****************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/form/style/index.less"); /* harmony import */ var _grid_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../grid/style */ "./components/grid/style/index.tsx"); /* harmony import */ var _tooltip_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../tooltip/style */ "./components/tooltip/style/index.tsx"); // style dependencies /***/ }), /***/ "./components/form/util.ts": /*!*********************************!*\ !*** ./components/form/util.ts ***! \*********************************/ /*! exports provided: toArray, getFieldId */ /*! exports used: getFieldId, toArray */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return toArray; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getFieldId; }); function toArray(candidate) { if (candidate === undefined || candidate === false) return []; return Array.isArray(candidate) ? candidate : [candidate]; } function getFieldId(namePath, formName) { if (!namePath.length) return undefined; var mergedId = namePath.join('_'); return formName ? "".concat(formName, "_").concat(mergedId) : mergedId; } /***/ }), /***/ "./components/grid/RowContext.tsx": /*!****************************************!*\ !*** ./components/grid/RowContext.tsx ***! \****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var RowContext = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createContext"])({}); /* harmony default export */ __webpack_exports__["a"] = (RowContext); /***/ }), /***/ "./components/grid/col.tsx": /*!*********************************!*\ !*** ./components/grid/col.tsx ***! \*********************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _RowContext__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./RowContext */ "./components/grid/RowContext.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; function parseFlex(flex) { if (typeof flex === 'number') { return "".concat(flex, " ").concat(flex, " auto"); } if (/^\d+(\.\d+)?(px|em|rem|%)$/.test(flex)) { return "0 0 ".concat(flex); } return flex; } var sizes = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl']; var Col = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function (props, ref) { var _classNames; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_3__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_6__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var _React$useContext2 = react__WEBPACK_IMPORTED_MODULE_3__["useContext"](_RowContext__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"]), gutter = _React$useContext2.gutter, wrap = _React$useContext2.wrap, supportFlexGap = _React$useContext2.supportFlexGap; var customizePrefixCls = props.prefixCls, span = props.span, order = props.order, offset = props.offset, push = props.push, pull = props.pull, className = props.className, children = props.children, flex = props.flex, style = props.style, others = __rest(props, ["prefixCls", "span", "order", "offset", "push", "pull", "className", "children", "flex", "style"]); var prefixCls = getPrefixCls('col', customizePrefixCls); var sizeClassObj = {}; sizes.forEach(function (size) { var _extends2; var sizeProps = {}; var propSize = props[size]; if (typeof propSize === 'number') { sizeProps.span = propSize; } else if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(propSize) === 'object') { sizeProps = propSize || {}; } delete others[size]; sizeClassObj = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, sizeClassObj), (_extends2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_extends2, "".concat(prefixCls, "-").concat(size, "-").concat(sizeProps.span), sizeProps.span !== undefined), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_extends2, "".concat(prefixCls, "-").concat(size, "-order-").concat(sizeProps.order), sizeProps.order || sizeProps.order === 0), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_extends2, "".concat(prefixCls, "-").concat(size, "-offset-").concat(sizeProps.offset), sizeProps.offset || sizeProps.offset === 0), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_extends2, "".concat(prefixCls, "-").concat(size, "-push-").concat(sizeProps.push), sizeProps.push || sizeProps.push === 0), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_extends2, "".concat(prefixCls, "-").concat(size, "-pull-").concat(sizeProps.pull), sizeProps.pull || sizeProps.pull === 0), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_extends2, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _extends2)); }); var classes = classnames__WEBPACK_IMPORTED_MODULE_4___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(span), span !== undefined), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-order-").concat(order), order), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-offset-").concat(offset), offset), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-push-").concat(push), push), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-pull-").concat(pull), pull), _classNames), className, sizeClassObj); var mergedStyle = {}; // Horizontal gutter use padding if (gutter && gutter[0] > 0) { var horizontalGutter = gutter[0] / 2; mergedStyle.paddingLeft = horizontalGutter; mergedStyle.paddingRight = horizontalGutter; } // Vertical gutter use padding when gap not support if (gutter && gutter[1] > 0 && !supportFlexGap) { var verticalGutter = gutter[1] / 2; mergedStyle.paddingTop = verticalGutter; mergedStyle.paddingBottom = verticalGutter; } if (flex) { mergedStyle.flex = parseFlex(flex); // Hack for Firefox to avoid size issue // https://github.com/ant-design/ant-design/pull/20023#issuecomment-564389553 if (flex === 'auto' && wrap === false && !mergedStyle.minWidth) { mergedStyle.minWidth = 0; } } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, others, { style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, mergedStyle), style), className: classes, ref: ref }), children); }); Col.displayName = 'Col'; /* harmony default export */ __webpack_exports__["a"] = (Col); /***/ }), /***/ "./components/grid/hooks/useBreakpoint.tsx": /*!*************************************************!*\ !*** ./components/grid/hooks/useBreakpoint.tsx ***! \*************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../_util/responsiveObserve */ "./components/_util/responsiveObserve.ts"); function useBreakpoint() { var _useState = Object(react__WEBPACK_IMPORTED_MODULE_1__["useState"])({}), _useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_useState, 2), screens = _useState2[0], setScreens = _useState2[1]; Object(react__WEBPACK_IMPORTED_MODULE_1__["useEffect"])(function () { var token = _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].subscribe(function (supportScreens) { setScreens(supportScreens); }); return function () { return _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].unsubscribe(token); }; }, []); return screens; } /* harmony default export */ __webpack_exports__["a"] = (useBreakpoint); /***/ }), /***/ "./components/grid/index.tsx": /*!***********************************!*\ !*** ./components/grid/index.tsx ***! \***********************************/ /*! exports provided: RowProps, ColProps, ColSize, Row, Col, default */ /*! exports used: Col, Row, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _row__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./row */ "./components/grid/row.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _row__WEBPACK_IMPORTED_MODULE_0__["a"]; }); /* harmony import */ var _col__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./col */ "./components/grid/col.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _col__WEBPACK_IMPORTED_MODULE_1__["a"]; }); /* harmony import */ var _hooks_useBreakpoint__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hooks/useBreakpoint */ "./components/grid/hooks/useBreakpoint.tsx"); /* harmony default export */ __webpack_exports__["c"] = ({ useBreakpoint: _hooks_useBreakpoint__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"] }); /***/ }), /***/ "./components/grid/row.tsx": /*!*********************************!*\ !*** ./components/grid/row.tsx ***! \*********************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _RowContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./RowContext */ "./components/grid/RowContext.tsx"); /* harmony import */ var _util_type__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../_util/type */ "./components/_util/type.ts"); /* harmony import */ var _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../_util/responsiveObserve */ "./components/_util/responsiveObserve.ts"); /* harmony import */ var _util_hooks_useFlexGapSupport__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../_util/hooks/useFlexGapSupport */ "./components/_util/hooks/useFlexGapSupport.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var RowAligns = Object(_util_type__WEBPACK_IMPORTED_MODULE_8__[/* tuple */ "a"])('top', 'middle', 'bottom', 'stretch'); var RowJustify = Object(_util_type__WEBPACK_IMPORTED_MODULE_8__[/* tuple */ "a"])('start', 'end', 'center', 'space-around', 'space-between'); var Row = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["forwardRef"](function (props, ref) { var _classNames; var customizePrefixCls = props.prefixCls, justify = props.justify, align = props.align, className = props.className, style = props.style, children = props.children, _props$gutter = props.gutter, gutter = _props$gutter === void 0 ? 0 : _props$gutter, wrap = props.wrap, others = __rest(props, ["prefixCls", "justify", "align", "className", "style", "children", "gutter", "wrap"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_4__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_6__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var _React$useState = react__WEBPACK_IMPORTED_MODULE_4__["useState"]({ xs: true, sm: true, md: true, lg: true, xl: true, xxl: true }), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_React$useState, 2), screens = _React$useState2[0], setScreens = _React$useState2[1]; var supportFlexGap = Object(_util_hooks_useFlexGapSupport__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(); var gutterRef = react__WEBPACK_IMPORTED_MODULE_4__["useRef"](gutter); // ================================== Effect ================================== react__WEBPACK_IMPORTED_MODULE_4__["useEffect"](function () { var token = _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].subscribe(function (screen) { var currentGutter = gutterRef.current || 0; if (!Array.isArray(currentGutter) && Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(currentGutter) === 'object' || Array.isArray(currentGutter) && (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(currentGutter[0]) === 'object' || Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(currentGutter[1]) === 'object')) { setScreens(screen); } }); return function () { return _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].unsubscribe(token); }; }, []); // ================================== Render ================================== var getGutter = function getGutter() { var results = [0, 0]; var normalizedGutter = Array.isArray(gutter) ? gutter : [gutter, 0]; normalizedGutter.forEach(function (g, index) { if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(g) === 'object') { for (var i = 0; i < _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_9__[/* responsiveArray */ "b"].length; i++) { var breakpoint = _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_9__[/* responsiveArray */ "b"][i]; if (screens[breakpoint] && g[breakpoint] !== undefined) { results[index] = g[breakpoint]; break; } } } else { results[index] = g || 0; } }); return results; }; var prefixCls = getPrefixCls('row', customizePrefixCls); var gutters = getGutter(); var classes = classnames__WEBPACK_IMPORTED_MODULE_5___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-no-wrap"), wrap === false), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(justify), justify), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(align), align), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className); // Add gutter related style var rowStyle = {}; var horizontalGutter = gutters[0] > 0 ? gutters[0] / -2 : undefined; var verticalGutter = gutters[1] > 0 ? gutters[1] / -2 : undefined; if (horizontalGutter) { rowStyle.marginLeft = horizontalGutter; rowStyle.marginRight = horizontalGutter; } if (supportFlexGap) { // Set gap direct if flex gap support var _gutters = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(gutters, 2); rowStyle.rowGap = _gutters[1]; } else if (verticalGutter) { rowStyle.marginTop = verticalGutter; rowStyle.marginBottom = verticalGutter; } var rowContext = react__WEBPACK_IMPORTED_MODULE_4__["useMemo"](function () { return { gutter: gutters, wrap: wrap, supportFlexGap: supportFlexGap }; }, [gutters, wrap, supportFlexGap]); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_RowContext__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].Provider, { value: rowContext }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, others, { className: classes, style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, rowStyle), style), ref: ref }), children)); }); Row.displayName = 'Row'; /* harmony default export */ __webpack_exports__["a"] = (Row); /***/ }), /***/ "./components/grid/style/index.less": /*!******************************************!*\ !*** ./components/grid/style/index.less ***! \******************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/grid/style/index.tsx": /*!*****************************************!*\ !*** ./components/grid/style/index.tsx ***! \*****************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/grid/style/index.less"); /***/ }), /***/ "./components/icon/style/index.less": /*!******************************************!*\ !*** ./components/icon/style/index.less ***! \******************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/icon/style/index.tsx": /*!*****************************************!*\ !*** ./components/icon/style/index.tsx ***! \*****************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/icon/style/index.less"); /***/ }), /***/ "./components/image/PreviewGroup.tsx": /*!*******************************************!*\ !*** ./components/image/PreviewGroup.tsx ***! \*******************************************/ /*! exports provided: icons, default */ /*! exports used: default, icons */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return icons; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var rc_image__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-image */ "./node_modules/rc-image/es/index.js"); /* harmony import */ var _ant_design_icons_es_icons_RotateLeftOutlined__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ant-design/icons/es/icons/RotateLeftOutlined */ "./node_modules/@ant-design/icons/es/icons/RotateLeftOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_RotateRightOutlined__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/icons/es/icons/RotateRightOutlined */ "./node_modules/@ant-design/icons/es/icons/RotateRightOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_ZoomInOutlined__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ant-design/icons/es/icons/ZoomInOutlined */ "./node_modules/@ant-design/icons/es/icons/ZoomInOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_ZoomOutOutlined__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ant-design/icons/es/icons/ZoomOutOutlined */ "./node_modules/@ant-design/icons/es/icons/ZoomOutOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseOutlined */ "./node_modules/@ant-design/icons/es/icons/CloseOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_LeftOutlined__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ant-design/icons/es/icons/LeftOutlined */ "./node_modules/@ant-design/icons/es/icons/LeftOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @ant-design/icons/es/icons/RightOutlined */ "./node_modules/@ant-design/icons/es/icons/RightOutlined.js"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../_util/motion */ "./components/_util/motion.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var icons = { rotateLeft: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_RotateLeftOutlined__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], null), rotateRight: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_RotateRightOutlined__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], null), zoomIn: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_ZoomInOutlined__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], null), zoomOut: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_ZoomOutOutlined__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], null), close: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], null), left: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_LeftOutlined__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], null), right: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], null) }; var InternalPreviewGroup = function InternalPreviewGroup(_a) { var customizePrefixCls = _a.previewPrefixCls, preview = _a.preview, props = __rest(_a, ["previewPrefixCls", "preview"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_11__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls; var prefixCls = getPrefixCls('image-preview', customizePrefixCls); var rootPrefixCls = getPrefixCls(); var mergedPreview = react__WEBPACK_IMPORTED_MODULE_2__["useMemo"](function () { if (preview === false) { return preview; } var _preview = Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(preview) === 'object' ? preview : {}; return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, _preview), { transitionName: Object(_util_motion__WEBPACK_IMPORTED_MODULE_12__[/* getTransitionName */ "b"])(rootPrefixCls, 'zoom', _preview.transitionName), maskTransitionName: Object(_util_motion__WEBPACK_IMPORTED_MODULE_12__[/* getTransitionName */ "b"])(rootPrefixCls, 'fade', _preview.maskTransitionName) }); }, [preview]); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](rc_image__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].PreviewGroup, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ preview: mergedPreview, previewPrefixCls: prefixCls, icons: icons }, props)); }; /* harmony default export */ __webpack_exports__["a"] = (InternalPreviewGroup); /***/ }), /***/ "./components/image/index.tsx": /*!************************************!*\ !*** ./components/image/index.tsx ***! \************************************/ /*! exports provided: ImageProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _ant_design_icons_es_icons_EyeOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons/es/icons/EyeOutlined */ "./node_modules/@ant-design/icons/es/icons/EyeOutlined.js"); /* harmony import */ var rc_image__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-image */ "./node_modules/rc-image/es/index.js"); /* harmony import */ var _locale_en_US__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../locale/en_US */ "./components/locale/en_US.tsx"); /* harmony import */ var _PreviewGroup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./PreviewGroup */ "./components/image/PreviewGroup.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../_util/motion */ "./components/_util/motion.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Image = function Image(_a) { var customizePrefixCls = _a.prefixCls, preview = _a.preview, otherProps = __rest(_a, ["prefixCls", "preview"]); var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_2__["useContext"])(_config_provider__WEBPACK_IMPORTED_MODULE_7__[/* ConfigContext */ "b"]), getPrefixCls = _useContext.getPrefixCls; var prefixCls = getPrefixCls('image', customizePrefixCls); var rootPrefixCls = getPrefixCls(); var _useContext2 = Object(react__WEBPACK_IMPORTED_MODULE_2__["useContext"])(_config_provider__WEBPACK_IMPORTED_MODULE_7__[/* ConfigContext */ "b"]), _useContext2$locale = _useContext2.locale, contextLocale = _useContext2$locale === void 0 ? _locale_en_US__WEBPACK_IMPORTED_MODULE_5__["default"] : _useContext2$locale; var imageLocale = contextLocale.Image || _locale_en_US__WEBPACK_IMPORTED_MODULE_5__["default"].Image; var mergedPreview = react__WEBPACK_IMPORTED_MODULE_2__["useMemo"](function () { if (preview === false) { return preview; } var _preview = Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(preview) === 'object' ? preview : {}; return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ mask: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-mask-info") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_EyeOutlined__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], null), imageLocale === null || imageLocale === void 0 ? void 0 : imageLocale.preview), icons: _PreviewGroup__WEBPACK_IMPORTED_MODULE_6__[/* icons */ "b"] }, _preview), { transitionName: Object(_util_motion__WEBPACK_IMPORTED_MODULE_8__[/* getTransitionName */ "b"])(rootPrefixCls, 'zoom', _preview.transitionName), maskTransitionName: Object(_util_motion__WEBPACK_IMPORTED_MODULE_8__[/* getTransitionName */ "b"])(rootPrefixCls, 'fade', _preview.maskTransitionName) }); }, [preview, imageLocale]); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](rc_image__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ prefixCls: prefixCls, preview: mergedPreview }, otherProps)); }; Image.PreviewGroup = _PreviewGroup__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"]; /* harmony default export */ __webpack_exports__["a"] = (Image); /***/ }), /***/ "./components/image/style/index.less": /*!*******************************************!*\ !*** ./components/image/style/index.less ***! \*******************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/image/style/index.tsx": /*!******************************************!*\ !*** ./components/image/style/index.tsx ***! \******************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/image/style/index.less"); /***/ }), /***/ "./components/index.tsx": /*!******************************!*\ !*** ./components/index.tsx ***! \******************************/ /*! exports provided: Affix, Anchor, AutoComplete, Alert, Avatar, BackTop, Badge, Breadcrumb, Button, Calendar, Card, Collapse, Carousel, Cascader, Checkbox, Col, Comment, ConfigProvider, DatePicker, Descriptions, Divider, Dropdown, Drawer, Empty, Form, Grid, Input, Image, InputNumber, Layout, List, message, Menu, Mentions, Modal, Statistic, notification, PageHeader, Pagination, Popconfirm, Popover, Progress, Radio, Rate, Result, Row, Select, Skeleton, Slider, Space, Spin, Steps, Switch, Table, Transfer, Tree, TreeSelect, Tabs, Tag, TimePicker, Timeline, Tooltip, Typography, Upload, version */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _affix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./affix */ "./components/affix/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Affix", function() { return _affix__WEBPACK_IMPORTED_MODULE_0__["a"]; }); /* harmony import */ var _anchor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./anchor */ "./components/anchor/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Anchor", function() { return _anchor__WEBPACK_IMPORTED_MODULE_1__["a"]; }); /* harmony import */ var _auto_complete__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./auto-complete */ "./components/auto-complete/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AutoComplete", function() { return _auto_complete__WEBPACK_IMPORTED_MODULE_2__["a"]; }); /* harmony import */ var _alert__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./alert */ "./components/alert/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Alert", function() { return _alert__WEBPACK_IMPORTED_MODULE_3__["a"]; }); /* harmony import */ var _avatar__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./avatar */ "./components/avatar/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Avatar", function() { return _avatar__WEBPACK_IMPORTED_MODULE_4__["a"]; }); /* harmony import */ var _back_top__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./back-top */ "./components/back-top/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BackTop", function() { return _back_top__WEBPACK_IMPORTED_MODULE_5__["a"]; }); /* harmony import */ var _badge__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./badge */ "./components/badge/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Badge", function() { return _badge__WEBPACK_IMPORTED_MODULE_6__["a"]; }); /* harmony import */ var _breadcrumb__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./breadcrumb */ "./components/breadcrumb/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Breadcrumb", function() { return _breadcrumb__WEBPACK_IMPORTED_MODULE_7__["a"]; }); /* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./button */ "./components/button/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Button", function() { return _button__WEBPACK_IMPORTED_MODULE_8__["a"]; }); /* harmony import */ var _calendar__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./calendar */ "./components/calendar/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Calendar", function() { return _calendar__WEBPACK_IMPORTED_MODULE_9__["a"]; }); /* harmony import */ var _card__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./card */ "./components/card/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Card", function() { return _card__WEBPACK_IMPORTED_MODULE_10__["a"]; }); /* harmony import */ var _collapse__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./collapse */ "./components/collapse/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Collapse", function() { return _collapse__WEBPACK_IMPORTED_MODULE_11__["a"]; }); /* harmony import */ var _carousel__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./carousel */ "./components/carousel/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Carousel", function() { return _carousel__WEBPACK_IMPORTED_MODULE_12__["a"]; }); /* harmony import */ var _cascader__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./cascader */ "./components/cascader/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Cascader", function() { return _cascader__WEBPACK_IMPORTED_MODULE_13__["a"]; }); /* harmony import */ var _checkbox__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./checkbox */ "./components/checkbox/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Checkbox", function() { return _checkbox__WEBPACK_IMPORTED_MODULE_14__["a"]; }); /* harmony import */ var _col__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./col */ "./components/col/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Col", function() { return _col__WEBPACK_IMPORTED_MODULE_15__["a"]; }); /* harmony import */ var _comment__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./comment */ "./components/comment/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Comment", function() { return _comment__WEBPACK_IMPORTED_MODULE_16__["a"]; }); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./config-provider */ "./components/config-provider/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConfigProvider", function() { return _config_provider__WEBPACK_IMPORTED_MODULE_17__["d"]; }); /* harmony import */ var _date_picker__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./date-picker */ "./components/date-picker/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DatePicker", function() { return _date_picker__WEBPACK_IMPORTED_MODULE_18__["a"]; }); /* harmony import */ var _descriptions__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./descriptions */ "./components/descriptions/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Descriptions", function() { return _descriptions__WEBPACK_IMPORTED_MODULE_19__["b"]; }); /* harmony import */ var _divider__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./divider */ "./components/divider/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Divider", function() { return _divider__WEBPACK_IMPORTED_MODULE_20__["a"]; }); /* harmony import */ var _dropdown__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./dropdown */ "./components/dropdown/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Dropdown", function() { return _dropdown__WEBPACK_IMPORTED_MODULE_21__["a"]; }); /* harmony import */ var _drawer__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./drawer */ "./components/drawer/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Drawer", function() { return _drawer__WEBPACK_IMPORTED_MODULE_22__["a"]; }); /* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./empty */ "./components/empty/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Empty", function() { return _empty__WEBPACK_IMPORTED_MODULE_23__["a"]; }); /* harmony import */ var _form__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./form */ "./components/form/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Form", function() { return _form__WEBPACK_IMPORTED_MODULE_24__["a"]; }); /* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./grid */ "./components/grid/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Grid", function() { return _grid__WEBPACK_IMPORTED_MODULE_25__["c"]; }); /* harmony import */ var _input__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./input */ "./components/input/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Input", function() { return _input__WEBPACK_IMPORTED_MODULE_26__["a"]; }); /* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./image */ "./components/image/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Image", function() { return _image__WEBPACK_IMPORTED_MODULE_27__["a"]; }); /* harmony import */ var _input_number__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./input-number */ "./components/input-number/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputNumber", function() { return _input_number__WEBPACK_IMPORTED_MODULE_28__["a"]; }); /* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./layout */ "./components/layout/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Layout", function() { return _layout__WEBPACK_IMPORTED_MODULE_29__["a"]; }); /* harmony import */ var _list__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./list */ "./components/list/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "List", function() { return _list__WEBPACK_IMPORTED_MODULE_30__["b"]; }); /* harmony import */ var _message__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./message */ "./components/message/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "message", function() { return _message__WEBPACK_IMPORTED_MODULE_31__["b"]; }); /* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./menu */ "./components/menu/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Menu", function() { return _menu__WEBPACK_IMPORTED_MODULE_32__["a"]; }); /* harmony import */ var _mentions__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./mentions */ "./components/mentions/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Mentions", function() { return _mentions__WEBPACK_IMPORTED_MODULE_33__["a"]; }); /* harmony import */ var _modal__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./modal */ "./components/modal/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Modal", function() { return _modal__WEBPACK_IMPORTED_MODULE_34__["a"]; }); /* harmony import */ var _statistic__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./statistic */ "./components/statistic/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Statistic", function() { return _statistic__WEBPACK_IMPORTED_MODULE_35__["a"]; }); /* harmony import */ var _notification__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./notification */ "./components/notification/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "notification", function() { return _notification__WEBPACK_IMPORTED_MODULE_36__["a"]; }); /* harmony import */ var _page_header__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./page-header */ "./components/page-header/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageHeader", function() { return _page_header__WEBPACK_IMPORTED_MODULE_37__["a"]; }); /* harmony import */ var _pagination__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./pagination */ "./components/pagination/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Pagination", function() { return _pagination__WEBPACK_IMPORTED_MODULE_38__["a"]; }); /* harmony import */ var _popconfirm__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./popconfirm */ "./components/popconfirm/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Popconfirm", function() { return _popconfirm__WEBPACK_IMPORTED_MODULE_39__["a"]; }); /* harmony import */ var _popover__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./popover */ "./components/popover/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Popover", function() { return _popover__WEBPACK_IMPORTED_MODULE_40__["a"]; }); /* harmony import */ var _progress__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./progress */ "./components/progress/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Progress", function() { return _progress__WEBPACK_IMPORTED_MODULE_41__["a"]; }); /* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./radio */ "./components/radio/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Radio", function() { return _radio__WEBPACK_IMPORTED_MODULE_42__["c"]; }); /* harmony import */ var _rate__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./rate */ "./components/rate/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Rate", function() { return _rate__WEBPACK_IMPORTED_MODULE_43__["a"]; }); /* harmony import */ var _result__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./result */ "./components/result/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Result", function() { return _result__WEBPACK_IMPORTED_MODULE_44__["a"]; }); /* harmony import */ var _row__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./row */ "./components/row/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Row", function() { return _row__WEBPACK_IMPORTED_MODULE_45__["a"]; }); /* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./select */ "./components/select/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Select", function() { return _select__WEBPACK_IMPORTED_MODULE_46__["a"]; }); /* harmony import */ var _skeleton__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./skeleton */ "./components/skeleton/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Skeleton", function() { return _skeleton__WEBPACK_IMPORTED_MODULE_47__["a"]; }); /* harmony import */ var _slider__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./slider */ "./components/slider/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Slider", function() { return _slider__WEBPACK_IMPORTED_MODULE_48__["a"]; }); /* harmony import */ var _space__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./space */ "./components/space/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Space", function() { return _space__WEBPACK_IMPORTED_MODULE_49__["b"]; }); /* harmony import */ var _spin__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./spin */ "./components/spin/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Spin", function() { return _spin__WEBPACK_IMPORTED_MODULE_50__["a"]; }); /* harmony import */ var _steps__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./steps */ "./components/steps/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Steps", function() { return _steps__WEBPACK_IMPORTED_MODULE_51__["a"]; }); /* harmony import */ var _switch__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./switch */ "./components/switch/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Switch", function() { return _switch__WEBPACK_IMPORTED_MODULE_52__["a"]; }); /* harmony import */ var _table__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./table */ "./components/table/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Table", function() { return _table__WEBPACK_IMPORTED_MODULE_53__["a"]; }); /* harmony import */ var _transfer__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./transfer */ "./components/transfer/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Transfer", function() { return _transfer__WEBPACK_IMPORTED_MODULE_54__["a"]; }); /* harmony import */ var _tree__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./tree */ "./components/tree/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Tree", function() { return _tree__WEBPACK_IMPORTED_MODULE_55__["a"]; }); /* harmony import */ var _tree_select__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./tree-select */ "./components/tree-select/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TreeSelect", function() { return _tree_select__WEBPACK_IMPORTED_MODULE_56__["a"]; }); /* harmony import */ var _tabs__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./tabs */ "./components/tabs/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Tabs", function() { return _tabs__WEBPACK_IMPORTED_MODULE_57__["a"]; }); /* harmony import */ var _tag__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./tag */ "./components/tag/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Tag", function() { return _tag__WEBPACK_IMPORTED_MODULE_58__["a"]; }); /* harmony import */ var _time_picker__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./time-picker */ "./components/time-picker/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimePicker", function() { return _time_picker__WEBPACK_IMPORTED_MODULE_59__["a"]; }); /* harmony import */ var _timeline__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./timeline */ "./components/timeline/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Timeline", function() { return _timeline__WEBPACK_IMPORTED_MODULE_60__["a"]; }); /* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./tooltip */ "./components/tooltip/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Tooltip", function() { return _tooltip__WEBPACK_IMPORTED_MODULE_61__["a"]; }); /* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./typography */ "./components/typography/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Typography", function() { return _typography__WEBPACK_IMPORTED_MODULE_62__["a"]; }); /* harmony import */ var _upload__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./upload */ "./components/upload/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Upload", function() { return _upload__WEBPACK_IMPORTED_MODULE_63__["a"]; }); /* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./version */ "./components/version/index.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "version", function() { return _version__WEBPACK_IMPORTED_MODULE_64__["a"]; }); /* @remove-on-es-build-begin */ // this file is not used if use https://github.com/ant-design/babel-plugin-import var ENV = "development"; if (ENV !== 'production' && ENV !== 'test' && typeof console !== 'undefined' && console.warn && // eslint-disable-line no-console typeof window !== 'undefined') { // eslint-disable-next-line no-console console.warn('You are using a whole package of antd, ' + 'please use https://www.npmjs.com/package/babel-plugin-import to reduce app bundle size.'); } /***/ }), /***/ "./components/input-number/index.tsx": /*!*******************************************!*\ !*** ./components/input-number/index.tsx ***! \*******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var rc_input_number__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-input-number */ "./node_modules/rc-input-number/es/index.js"); /* harmony import */ var _ant_design_icons_es_icons_UpOutlined__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/icons/es/icons/UpOutlined */ "./node_modules/@ant-design/icons/es/icons/UpOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_DownOutlined__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ant-design/icons/es/icons/DownOutlined */ "./node_modules/@ant-design/icons/es/icons/DownOutlined.js"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config-provider/SizeContext */ "./components/config-provider/SizeContext.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var InputNumber = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function (props, ref) { var _classNames; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_7__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var size = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_8__[/* default */ "b"]); var className = props.className, customizeSize = props.size, customizePrefixCls = props.prefixCls, _props$bordered = props.bordered, bordered = _props$bordered === void 0 ? true : _props$bordered, readOnly = props.readOnly, others = __rest(props, ["className", "size", "prefixCls", "bordered", "readOnly"]); var prefixCls = getPrefixCls('input-number', customizePrefixCls); var upIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_UpOutlined__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], { className: "".concat(prefixCls, "-handler-up-inner") }); var downIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_DownOutlined__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], { className: "".concat(prefixCls, "-handler-down-inner") }); var mergeSize = customizeSize || size; var inputNumberClass = classnames__WEBPACK_IMPORTED_MODULE_3___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-lg"), mergeSize === 'large'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-sm"), mergeSize === 'small'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-readonly"), readOnly), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-borderless"), !bordered), _classNames), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](rc_input_number__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ ref: ref, className: inputNumberClass, upHandler: upIcon, downHandler: downIcon, prefixCls: prefixCls, readOnly: readOnly }, others)); }); /* harmony default export */ __webpack_exports__["a"] = (InputNumber); /***/ }), /***/ "./components/input-number/style/index.less": /*!**************************************************!*\ !*** ./components/input-number/style/index.less ***! \**************************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/input-number/style/index.tsx": /*!*************************************************!*\ !*** ./components/input-number/style/index.tsx ***! \*************************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/input-number/style/index.less"); /***/ }), /***/ "./components/input/ClearableLabeledInput.tsx": /*!****************************************************!*\ !*** ./components/input/ClearableLabeledInput.tsx ***! \****************************************************/ /*! exports provided: hasPrefixSuffix, default */ /*! exports used: default, hasPrefixSuffix */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return hasPrefixSuffix; }); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseCircleFilled */ "./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js"); /* harmony import */ var _util_type__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../_util/type */ "./components/_util/type.ts"); /* harmony import */ var _Input__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Input */ "./components/input/Input.tsx"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); var ClearableInputType = Object(_util_type__WEBPACK_IMPORTED_MODULE_8__[/* tuple */ "a"])('text', 'input'); function hasPrefixSuffix(props) { return !!(props.prefix || props.suffix || props.allowClear); } function hasAddon(props) { return !!(props.addonBefore || props.addonAfter); } var ClearableLabeledInput = /*#__PURE__*/function (_React$Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(ClearableLabeledInput, _React$Component); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(ClearableLabeledInput); function ClearableLabeledInput() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, ClearableLabeledInput); _this = _super.apply(this, arguments); /** @private Do Not use out of this class. We do not promise this is always keep. */ _this.containerRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createRef"](); _this.onInputMouseUp = function (e) { var _a; if ((_a = _this.containerRef.current) === null || _a === void 0 ? void 0 : _a.contains(e.target)) { var triggerFocus = _this.props.triggerFocus; triggerFocus === null || triggerFocus === void 0 ? void 0 : triggerFocus(); } }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(ClearableLabeledInput, [{ key: "renderClearIcon", value: function renderClearIcon(prefixCls) { var _this$props = this.props, allowClear = _this$props.allowClear, value = _this$props.value, disabled = _this$props.disabled, readOnly = _this$props.readOnly, handleReset = _this$props.handleReset; if (!allowClear) { return null; } var needClear = !disabled && !readOnly && value; var className = "".concat(prefixCls, "-clear-icon"); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], { onClick: handleReset, className: classnames__WEBPACK_IMPORTED_MODULE_6___default()(Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(className, "-hidden"), !needClear), className), role: "button" }); } }, { key: "renderSuffix", value: function renderSuffix(prefixCls) { var _this$props2 = this.props, suffix = _this$props2.suffix, allowClear = _this$props2.allowClear; if (suffix || allowClear) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("span", { className: "".concat(prefixCls, "-suffix") }, this.renderClearIcon(prefixCls), suffix); } return null; } }, { key: "renderLabeledIcon", value: function renderLabeledIcon(prefixCls, element) { var _classNames2; var _this$props3 = this.props, focused = _this$props3.focused, value = _this$props3.value, prefix = _this$props3.prefix, className = _this$props3.className, size = _this$props3.size, suffix = _this$props3.suffix, disabled = _this$props3.disabled, allowClear = _this$props3.allowClear, direction = _this$props3.direction, style = _this$props3.style, readOnly = _this$props3.readOnly, bordered = _this$props3.bordered; var suffixNode = this.renderSuffix(prefixCls); if (!hasPrefixSuffix(this.props)) { return Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_10__[/* cloneElement */ "a"])(element, { value: value }); } var prefixNode = prefix ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("span", { className: "".concat(prefixCls, "-prefix") }, prefix) : null; var affixWrapperCls = classnames__WEBPACK_IMPORTED_MODULE_6___default()("".concat(prefixCls, "-affix-wrapper"), (_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-affix-wrapper-focused"), focused), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-affix-wrapper-disabled"), disabled), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-affix-wrapper-sm"), size === 'small'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-affix-wrapper-lg"), size === 'large'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-affix-wrapper-input-with-clear-btn"), suffix && allowClear && value), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-affix-wrapper-rtl"), direction === 'rtl'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-affix-wrapper-readonly"), readOnly), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-affix-wrapper-borderless"), !bordered), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(className), !hasAddon(this.props) && className), _classNames2)); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("span", { ref: this.containerRef, className: affixWrapperCls, style: style, onMouseUp: this.onInputMouseUp }, prefixNode, Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_10__[/* cloneElement */ "a"])(element, { style: null, value: value, className: Object(_Input__WEBPACK_IMPORTED_MODULE_9__[/* getInputClassName */ "c"])(prefixCls, bordered, size, disabled) }), suffixNode); } }, { key: "renderInputWithLabel", value: function renderInputWithLabel(prefixCls, labeledElement) { var _classNames4; var _this$props4 = this.props, addonBefore = _this$props4.addonBefore, addonAfter = _this$props4.addonAfter, style = _this$props4.style, size = _this$props4.size, className = _this$props4.className, direction = _this$props4.direction; // Not wrap when there is not addons if (!hasAddon(this.props)) { return labeledElement; } var wrapperClassName = "".concat(prefixCls, "-group"); var addonClassName = "".concat(wrapperClassName, "-addon"); var addonBeforeNode = addonBefore ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("span", { className: addonClassName }, addonBefore) : null; var addonAfterNode = addonAfter ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("span", { className: addonClassName }, addonAfter) : null; var mergedWrapperClassName = classnames__WEBPACK_IMPORTED_MODULE_6___default()("".concat(prefixCls, "-wrapper"), wrapperClassName, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(wrapperClassName, "-rtl"), direction === 'rtl')); var mergedGroupClassName = classnames__WEBPACK_IMPORTED_MODULE_6___default()("".concat(prefixCls, "-group-wrapper"), (_classNames4 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames4, "".concat(prefixCls, "-group-wrapper-sm"), size === 'small'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames4, "".concat(prefixCls, "-group-wrapper-lg"), size === 'large'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames4, "".concat(prefixCls, "-group-wrapper-rtl"), direction === 'rtl'), _classNames4), className); // Need another wrapper for changing display:table to display:inline-block // and put style prop in wrapper return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("span", { className: mergedGroupClassName, style: style }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("span", { className: mergedWrapperClassName }, addonBeforeNode, Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_10__[/* cloneElement */ "a"])(labeledElement, { style: null }), addonAfterNode)); } }, { key: "renderTextAreaWithClearIcon", value: function renderTextAreaWithClearIcon(prefixCls, element) { var _classNames5; var _this$props5 = this.props, value = _this$props5.value, allowClear = _this$props5.allowClear, className = _this$props5.className, style = _this$props5.style, direction = _this$props5.direction, bordered = _this$props5.bordered; if (!allowClear) { return Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_10__[/* cloneElement */ "a"])(element, { value: value }); } var affixWrapperCls = classnames__WEBPACK_IMPORTED_MODULE_6___default()("".concat(prefixCls, "-affix-wrapper"), "".concat(prefixCls, "-affix-wrapper-textarea-with-clear-btn"), (_classNames5 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames5, "".concat(prefixCls, "-affix-wrapper-rtl"), direction === 'rtl'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames5, "".concat(prefixCls, "-affix-wrapper-borderless"), !bordered), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames5, "".concat(className), !hasAddon(this.props) && className), _classNames5)); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("span", { className: affixWrapperCls, style: style }, Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_10__[/* cloneElement */ "a"])(element, { style: null, value: value }), this.renderClearIcon(prefixCls)); } }, { key: "render", value: function render() { var _this$props6 = this.props, prefixCls = _this$props6.prefixCls, inputType = _this$props6.inputType, element = _this$props6.element; if (inputType === ClearableInputType[0]) { return this.renderTextAreaWithClearIcon(prefixCls, element); } return this.renderInputWithLabel(prefixCls, this.renderLabeledIcon(prefixCls, element)); } }]); return ClearableLabeledInput; }(react__WEBPACK_IMPORTED_MODULE_5__["Component"]); /* harmony default export */ __webpack_exports__["a"] = (ClearableLabeledInput); /***/ }), /***/ "./components/input/Group.tsx": /*!************************************!*\ !*** ./components/input/Group.tsx ***! \************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var Group = function Group(props) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_3__[/* ConfigConsumer */ "a"], null, function (_ref) { var _classNames; var getPrefixCls = _ref.getPrefixCls, direction = _ref.direction; var customizePrefixCls = props.prefixCls, _props$className = props.className, className = _props$className === void 0 ? '' : _props$className; var prefixCls = getPrefixCls('input-group', customizePrefixCls); var cls = classnames__WEBPACK_IMPORTED_MODULE_2___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-lg"), props.size === 'large'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-sm"), props.size === 'small'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-compact"), props.compact), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("span", { className: cls, style: props.style, onMouseEnter: props.onMouseEnter, onMouseLeave: props.onMouseLeave, onFocus: props.onFocus, onBlur: props.onBlur }, props.children); }); }; /* harmony default export */ __webpack_exports__["a"] = (Group); /***/ }), /***/ "./components/input/Input.tsx": /*!************************************!*\ !*** ./components/input/Input.tsx ***! \************************************/ /*! exports provided: fixControlledValue, resolveOnChange, getInputClassName, triggerFocus, default */ /*! exports used: default, fixControlledValue, getInputClassName, resolveOnChange, triggerFocus */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return fixControlledValue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return resolveOnChange; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getInputClassName; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return triggerFocus; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var _ClearableLabeledInput__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ClearableLabeledInput */ "./components/input/ClearableLabeledInput.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../config-provider/SizeContext */ "./components/config-provider/SizeContext.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); function fixControlledValue(value) { if (typeof value === 'undefined' || value === null) { return ''; } return value; } function resolveOnChange(target, e, onChange, targetValue) { if (!onChange) { return; } var event = e; var originalInputValue = target.value; if (e.type === 'click') { // click clear icon event = Object.create(e); event.target = target; event.currentTarget = target; // change target ref value cause e.target.value should be '' when clear input target.value = ''; onChange(event); // reset target ref value target.value = originalInputValue; return; } // Trigger by composition event, this means we need force change the input value if (targetValue !== undefined) { event = Object.create(e); event.target = target; event.currentTarget = target; target.value = targetValue; onChange(event); return; } onChange(event); } function getInputClassName(prefixCls, bordered, size, disabled, direction) { var _classNames; return classnames__WEBPACK_IMPORTED_MODULE_7___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-sm"), size === 'small'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-lg"), size === 'large'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-disabled"), disabled), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-borderless"), !bordered), _classNames)); } function triggerFocus(element, option) { if (!element) return; element.focus(option); // Selection content var _ref = option || {}, cursor = _ref.cursor; if (cursor) { var len = element.value.length; switch (cursor) { case 'start': element.setSelectionRange(0, 0); break; case 'end': element.setSelectionRange(len, len); break; default: element.setSelectionRange(0, len); } } } var Input = /*#__PURE__*/function (_React$Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Input, _React$Component); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Input); function Input(props) { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, Input); _this = _super.call(this, props); _this.direction = 'ltr'; _this.focus = function (option) { triggerFocus(_this.input, option); }; _this.saveClearableInput = function (input) { _this.clearableInput = input; }; _this.saveInput = function (input) { _this.input = input; }; _this.onFocus = function (e) { var onFocus = _this.props.onFocus; _this.setState({ focused: true }, _this.clearPasswordValueAttribute); onFocus === null || onFocus === void 0 ? void 0 : onFocus(e); }; _this.onBlur = function (e) { var onBlur = _this.props.onBlur; _this.setState({ focused: false }, _this.clearPasswordValueAttribute); onBlur === null || onBlur === void 0 ? void 0 : onBlur(e); }; _this.handleReset = function (e) { _this.setValue('', function () { _this.focus(); }); resolveOnChange(_this.input, e, _this.props.onChange); }; _this.renderInput = function (prefixCls, size, bordered) { var input = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; var _this$props = _this.props, className = _this$props.className, addonBefore = _this$props.addonBefore, addonAfter = _this$props.addonAfter, customizeSize = _this$props.size, disabled = _this$props.disabled; // Fix https://fb.me/react-unknown-prop var otherProps = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(_this.props, ['prefixCls', 'onPressEnter', 'addonBefore', 'addonAfter', 'prefix', 'suffix', 'allowClear', // Input elements must be either controlled or uncontrolled, // specify either the value prop, or the defaultValue prop, but not both. 'defaultValue', 'size', 'inputType', 'bordered']); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("input", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ autoComplete: input.autoComplete }, otherProps, { onChange: _this.handleChange, onFocus: _this.onFocus, onBlur: _this.onBlur, onKeyDown: _this.handleKeyDown, className: classnames__WEBPACK_IMPORTED_MODULE_7___default()(getInputClassName(prefixCls, bordered, customizeSize || size, disabled, _this.direction), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, className, className && !addonBefore && !addonAfter)), ref: _this.saveInput })); }; _this.clearPasswordValueAttribute = function () { // https://github.com/ant-design/ant-design/issues/20541 _this.removePasswordTimeout = setTimeout(function () { if (_this.input && _this.input.getAttribute('type') === 'password' && _this.input.hasAttribute('value')) { _this.input.removeAttribute('value'); } }); }; _this.handleChange = function (e) { _this.setValue(e.target.value, _this.clearPasswordValueAttribute); resolveOnChange(_this.input, e, _this.props.onChange); }; _this.handleKeyDown = function (e) { var _this$props2 = _this.props, onPressEnter = _this$props2.onPressEnter, onKeyDown = _this$props2.onKeyDown; if (onPressEnter && e.keyCode === 13) { onPressEnter(e); } onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e); }; _this.renderComponent = function (_ref2) { var getPrefixCls = _ref2.getPrefixCls, direction = _ref2.direction, input = _ref2.input; var _this$state = _this.state, value = _this$state.value, focused = _this$state.focused; var _this$props3 = _this.props, customizePrefixCls = _this$props3.prefixCls, _this$props3$bordered = _this$props3.bordered, bordered = _this$props3$bordered === void 0 ? true : _this$props3$bordered; var prefixCls = getPrefixCls('input', customizePrefixCls); _this.direction = direction; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_11__[/* default */ "b"].Consumer, null, function (size) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_ClearableLabeledInput__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ size: size }, _this.props, { prefixCls: prefixCls, inputType: "input", value: fixControlledValue(value), element: _this.renderInput(prefixCls, size, bordered, input), handleReset: _this.handleReset, ref: _this.saveClearableInput, direction: direction, focused: focused, triggerFocus: _this.focus, bordered: bordered })); }); }; var value = typeof props.value === 'undefined' ? props.defaultValue : props.value; _this.state = { value: value, focused: false, // eslint-disable-next-line react/no-unused-state prevValue: props.value }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Input, [{ key: "componentDidMount", value: function componentDidMount() { this.clearPasswordValueAttribute(); } // Since polyfill `getSnapshotBeforeUpdate` need work with `componentDidUpdate`. // We keep an empty function here. }, { key: "componentDidUpdate", value: function componentDidUpdate() {} }, { key: "getSnapshotBeforeUpdate", value: function getSnapshotBeforeUpdate(prevProps) { if (Object(_ClearableLabeledInput__WEBPACK_IMPORTED_MODULE_9__[/* hasPrefixSuffix */ "b"])(prevProps) !== Object(_ClearableLabeledInput__WEBPACK_IMPORTED_MODULE_9__[/* hasPrefixSuffix */ "b"])(this.props)) { if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"])(this.input !== document.activeElement, 'Input', "When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"); } return null; } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (this.removePasswordTimeout) { clearTimeout(this.removePasswordTimeout); } } }, { key: "blur", value: function blur() { this.input.blur(); } }, { key: "setSelectionRange", value: function setSelectionRange(start, end, direction) { this.input.setSelectionRange(start, end, direction); } }, { key: "select", value: function select() { this.input.select(); } }, { key: "setValue", value: function setValue(value, callback) { if (this.props.value === undefined) { this.setState({ value: value }, callback); } else { callback === null || callback === void 0 ? void 0 : callback(); } } }, { key: "render", value: function render() { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_10__[/* ConfigConsumer */ "a"], null, this.renderComponent); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps, _ref3) { var prevValue = _ref3.prevValue; var newState = { prevValue: nextProps.value }; if (nextProps.value !== undefined || prevValue !== nextProps.value) { newState.value = nextProps.value; } return newState; } }]); return Input; }(react__WEBPACK_IMPORTED_MODULE_6__["Component"]); Input.defaultProps = { type: 'text' }; /* harmony default export */ __webpack_exports__["a"] = (Input); /***/ }), /***/ "./components/input/Password.tsx": /*!***************************************!*\ !*** ./components/input/Password.tsx ***! \***************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var _ant_design_icons_es_icons_EyeOutlined__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ant-design/icons/es/icons/EyeOutlined */ "./node_modules/@ant-design/icons/es/icons/EyeOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_EyeInvisibleOutlined__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ant-design/icons/es/icons/EyeInvisibleOutlined */ "./node_modules/@ant-design/icons/es/icons/EyeInvisibleOutlined.js"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _Input__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Input */ "./components/input/Input.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var ActionMap = { click: 'onClick', hover: 'onMouseOver' }; var Password = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function (props, ref) { var _useState = Object(react__WEBPACK_IMPORTED_MODULE_3__["useState"])(false), _useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_useState, 2), visible = _useState2[0], setVisible = _useState2[1]; var onVisibleChange = function onVisibleChange() { var disabled = props.disabled; if (disabled) { return; } setVisible(!visible); }; var getIcon = function getIcon(prefixCls) { var _iconProps; var action = props.action, _props$iconRender = props.iconRender, iconRender = _props$iconRender === void 0 ? function () { return null; } : _props$iconRender; var iconTrigger = ActionMap[action] || ''; var icon = iconRender(visible); var iconProps = (_iconProps = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_iconProps, iconTrigger, onVisibleChange), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_iconProps, "className", "".concat(prefixCls, "-icon")), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_iconProps, "key", 'passwordIcon'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_iconProps, "onMouseDown", function onMouseDown(e) { // Prevent focused state lost // https://github.com/ant-design/ant-design/issues/15173 e.preventDefault(); }), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_iconProps, "onMouseUp", function onMouseUp(e) { // Prevent caret position change // https://github.com/ant-design/ant-design/issues/23524 e.preventDefault(); }), _iconProps); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["cloneElement"]( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["isValidElement"](icon) ? icon : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", null, icon), iconProps); }; var renderPassword = function renderPassword(_ref) { var getPrefixCls = _ref.getPrefixCls; var className = props.className, customizePrefixCls = props.prefixCls, customizeInputPrefixCls = props.inputPrefixCls, size = props.size, visibilityToggle = props.visibilityToggle, restProps = __rest(props, ["className", "prefixCls", "inputPrefixCls", "size", "visibilityToggle"]); var inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls); var prefixCls = getPrefixCls('input-password', customizePrefixCls); var suffixIcon = visibilityToggle && getIcon(prefixCls); var inputClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()(prefixCls, className, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(prefixCls, "-").concat(size), !!size)); var omittedProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(restProps, ['suffix', 'iconRender'])), { type: visible ? 'text' : 'password', className: inputClassName, prefixCls: inputPrefixCls, suffix: suffixIcon }); if (size) { omittedProps.size = size; } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_Input__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ ref: ref }, omittedProps)); }; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_8__[/* ConfigConsumer */ "a"], null, renderPassword); }); Password.defaultProps = { action: 'click', visibilityToggle: true, iconRender: function iconRender(visible) { return visible ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_ant_design_icons_es_icons_EyeOutlined__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_ant_design_icons_es_icons_EyeInvisibleOutlined__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], null); } }; Password.displayName = 'Password'; /* harmony default export */ __webpack_exports__["a"] = (Password); /***/ }), /***/ "./components/input/Search.tsx": /*!*************************************!*\ !*** ./components/input/Search.tsx ***! \*************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-util/es/ref */ "./node_modules/rc-util/es/ref.js"); /* harmony import */ var _ant_design_icons_es_icons_SearchOutlined__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/icons/es/icons/SearchOutlined */ "./node_modules/@ant-design/icons/es/icons/SearchOutlined.js"); /* harmony import */ var _Input__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Input */ "./components/input/Input.tsx"); /* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../button */ "./components/button/index.tsx"); /* harmony import */ var _config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config-provider/SizeContext */ "./components/config-provider/SizeContext.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Search = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function (props, ref) { var _classNames; var customizePrefixCls = props.prefixCls, customizeInputPrefixCls = props.inputPrefixCls, className = props.className, customizeSize = props.size, suffix = props.suffix, _props$enterButton = props.enterButton, enterButton = _props$enterButton === void 0 ? false : _props$enterButton, addonAfter = props.addonAfter, loading = props.loading, disabled = props.disabled, customOnSearch = props.onSearch, customOnChange = props.onChange, restProps = __rest(props, ["prefixCls", "inputPrefixCls", "className", "size", "suffix", "enterButton", "addonAfter", "loading", "disabled", "onSearch", "onChange"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_9__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var contextSize = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_8__[/* default */ "b"]); var size = customizeSize || contextSize; var inputRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](null); var onChange = function onChange(e) { if (e && e.target && e.type === 'click' && customOnSearch) { customOnSearch(e.target.value, e); } if (customOnChange) { customOnChange(e); } }; var onMouseDown = function onMouseDown(e) { var _a; if (document.activeElement === ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input)) { e.preventDefault(); } }; var onSearch = function onSearch(e) { var _a; if (customOnSearch) { customOnSearch((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input.value, e); } }; var prefixCls = getPrefixCls('input-search', customizePrefixCls); var inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls); var searchIcon = typeof enterButton === 'boolean' || typeof enterButton === 'undefined' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_SearchOutlined__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], null) : null; var btnClassName = "".concat(prefixCls, "-button"); var button; var enterButtonAsElement = enterButton || {}; var isAntdButton = enterButtonAsElement.type && enterButtonAsElement.type.__ANT_BUTTON === true; if (isAntdButton || enterButtonAsElement.type === 'button') { button = Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_10__[/* cloneElement */ "a"])(enterButtonAsElement, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ onMouseDown: onMouseDown, onClick: onSearch, key: 'enterButton' }, isAntdButton ? { className: btnClassName, size: size } : {})); } else { button = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_button__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], { className: btnClassName, type: enterButton ? 'primary' : undefined, size: size, disabled: disabled, key: "enterButton", onMouseDown: onMouseDown, onClick: onSearch, loading: loading, icon: searchIcon }, enterButton); } if (addonAfter) { button = [button, Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_10__[/* cloneElement */ "a"])(addonAfter, { key: 'addonAfter' })]; } var cls = classnames__WEBPACK_IMPORTED_MODULE_3___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(size), !!size), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-with-button"), !!enterButton), _classNames), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Input__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ ref: Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_4__[/* composeRef */ "a"])(inputRef, ref), onPressEnter: onSearch }, restProps, { size: size, prefixCls: inputPrefixCls, addonAfter: button, suffix: suffix, onChange: onChange, className: cls, disabled: disabled })); }); Search.displayName = 'Search'; /* harmony default export */ __webpack_exports__["a"] = (Search); /***/ }), /***/ "./components/input/TextArea.tsx": /*!***************************************!*\ !*** ./components/input/TextArea.tsx ***! \***************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var rc_textarea__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-textarea */ "./node_modules/rc-textarea/es/index.js"); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rc-util/es/hooks/useMergedState */ "./node_modules/rc-util/es/hooks/useMergedState.js"); /* harmony import */ var _ClearableLabeledInput__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ClearableLabeledInput */ "./components/input/ClearableLabeledInput.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _Input__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Input */ "./components/input/Input.tsx"); /* harmony import */ var _config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../config-provider/SizeContext */ "./components/config-provider/SizeContext.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; function fixEmojiLength(value, maxLength) { return Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(value || '').slice(0, maxLength).join(''); } var TextArea = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["forwardRef"](function (_a, ref) { var _classNames; var customizePrefixCls = _a.prefixCls, _a$bordered = _a.bordered, bordered = _a$bordered === void 0 ? true : _a$bordered, _a$showCount = _a.showCount, showCount = _a$showCount === void 0 ? false : _a$showCount, maxLength = _a.maxLength, className = _a.className, style = _a.style, customizeSize = _a.size, onCompositionStart = _a.onCompositionStart, onCompositionEnd = _a.onCompositionEnd, onChange = _a.onChange, props = __rest(_a, ["prefixCls", "bordered", "showCount", "maxLength", "className", "style", "size", "onCompositionStart", "onCompositionEnd", "onChange"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_5__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_11__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var size = react__WEBPACK_IMPORTED_MODULE_5__["useContext"](_config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_13__[/* default */ "b"]); var innerRef = react__WEBPACK_IMPORTED_MODULE_5__["useRef"](null); var clearableInputRef = react__WEBPACK_IMPORTED_MODULE_5__["useRef"](null); var _React$useState = react__WEBPACK_IMPORTED_MODULE_5__["useState"](false), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_React$useState, 2), compositing = _React$useState2[0], setCompositing = _React$useState2[1]; var _useMergedState = Object(rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])(props.defaultValue, { value: props.value }), _useMergedState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_useMergedState, 2), value = _useMergedState2[0], setValue = _useMergedState2[1]; var handleSetValue = function handleSetValue(val, callback) { if (props.value === undefined) { setValue(val); callback === null || callback === void 0 ? void 0 : callback(); } }; // =========================== Value Update =========================== // Max length value var hasMaxLength = Number(maxLength) > 0; var onInternalCompositionStart = function onInternalCompositionStart(e) { setCompositing(true); onCompositionStart === null || onCompositionStart === void 0 ? void 0 : onCompositionStart(e); }; var onInternalCompositionEnd = function onInternalCompositionEnd(e) { setCompositing(false); var triggerValue = e.currentTarget.value; if (hasMaxLength) { triggerValue = fixEmojiLength(triggerValue, maxLength); } // Patch composition onChange when value changed if (triggerValue !== value) { handleSetValue(triggerValue); Object(_Input__WEBPACK_IMPORTED_MODULE_12__[/* resolveOnChange */ "d"])(e.currentTarget, e, onChange, triggerValue); } onCompositionEnd === null || onCompositionEnd === void 0 ? void 0 : onCompositionEnd(e); }; var handleChange = function handleChange(e) { var triggerValue = e.target.value; if (!compositing && hasMaxLength) { triggerValue = fixEmojiLength(triggerValue, maxLength); } handleSetValue(triggerValue); Object(_Input__WEBPACK_IMPORTED_MODULE_12__[/* resolveOnChange */ "d"])(e.currentTarget, e, onChange, triggerValue); }; // ============================== Reset =============================== var handleReset = function handleReset(e) { var _a, _b; handleSetValue('', function () { var _a; (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.focus(); }); Object(_Input__WEBPACK_IMPORTED_MODULE_12__[/* resolveOnChange */ "d"])((_b = (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.resizableTextArea) === null || _b === void 0 ? void 0 : _b.textArea, e, onChange); }; var prefixCls = getPrefixCls('input', customizePrefixCls); react__WEBPACK_IMPORTED_MODULE_5__["useImperativeHandle"](ref, function () { var _a; return { resizableTextArea: (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.resizableTextArea, focus: function focus(option) { var _a, _b; Object(_Input__WEBPACK_IMPORTED_MODULE_12__[/* triggerFocus */ "e"])((_b = (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.resizableTextArea) === null || _b === void 0 ? void 0 : _b.textArea, option); }, blur: function blur() { var _a; return (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.blur(); } }; }); var textArea = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](rc_textarea__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(props, ['allowClear']), { className: classnames__WEBPACK_IMPORTED_MODULE_8___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-borderless"), !bordered), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_classNames, className, className && !showCount), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-sm"), size === 'small' || customizeSize === 'small'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-lg"), size === 'large' || customizeSize === 'large'), _classNames)), style: showCount ? undefined : style, prefixCls: prefixCls, onCompositionStart: onInternalCompositionStart, onChange: handleChange, onCompositionEnd: onInternalCompositionEnd, ref: innerRef })); var val = Object(_Input__WEBPACK_IMPORTED_MODULE_12__[/* fixControlledValue */ "b"])(value); if (!compositing && hasMaxLength && (props.value === null || props.value === undefined)) { // fix #27612 将value转为数组进行截取,解决 '😂'.length === 2 等emoji表情导致的截取乱码的问题 val = fixEmojiLength(val, maxLength); } // TextArea var textareaNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_ClearableLabeledInput__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, props, { prefixCls: prefixCls, direction: direction, inputType: "text", value: val, element: textArea, handleReset: handleReset, ref: clearableInputRef, bordered: bordered })); // Only show text area wrapper when needed if (showCount) { var valueLength = Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(val).length; var dataCount = ''; if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(showCount) === 'object') { dataCount = showCount.formatter({ count: valueLength, maxLength: maxLength }); } else { dataCount = "".concat(valueLength).concat(hasMaxLength ? " / ".concat(maxLength) : ''); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("div", { className: classnames__WEBPACK_IMPORTED_MODULE_8___default()("".concat(prefixCls, "-textarea"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, "".concat(prefixCls, "-textarea-rtl"), direction === 'rtl'), "".concat(prefixCls, "-textarea-show-count"), className), style: style, "data-count": dataCount }, textareaNode); } return textareaNode; }); /* harmony default export */ __webpack_exports__["a"] = (TextArea); /***/ }), /***/ "./components/input/index.tsx": /*!************************************!*\ !*** ./components/input/index.tsx ***! \************************************/ /*! exports provided: InputProps, GroupProps, SearchProps, TextAreaProps, PasswordProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _Input__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Input */ "./components/input/Input.tsx"); /* harmony import */ var _Group__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Group */ "./components/input/Group.tsx"); /* harmony import */ var _Search__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Search */ "./components/input/Search.tsx"); /* harmony import */ var _TextArea__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./TextArea */ "./components/input/TextArea.tsx"); /* harmony import */ var _Password__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Password */ "./components/input/Password.tsx"); _Input__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].Group = _Group__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]; _Input__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].Search = _Search__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"]; _Input__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].TextArea = _TextArea__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"]; _Input__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].Password = _Password__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"]; /* harmony default export */ __webpack_exports__["a"] = (_Input__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]); /***/ }), /***/ "./components/input/style/index.less": /*!*******************************************!*\ !*** ./components/input/style/index.less ***! \*******************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/input/style/index.tsx": /*!******************************************!*\ !*** ./components/input/style/index.tsx ***! \******************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/input/style/index.less"); /* harmony import */ var _button_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../button/style */ "./components/button/style/index.tsx"); // style dependencies /***/ }), /***/ "./components/layout/Sider.tsx": /*!*************************************!*\ !*** ./components/layout/Sider.tsx ***! \*************************************/ /*! exports provided: SiderContext, default */ /*! exports used: SiderContext, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SiderContext; }); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var _ant_design_icons_es_icons_BarsOutlined__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ant-design/icons/es/icons/BarsOutlined */ "./node_modules/@ant-design/icons/es/icons/BarsOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ant-design/icons/es/icons/RightOutlined */ "./node_modules/@ant-design/icons/es/icons/RightOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_LeftOutlined__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ant-design/icons/es/icons/LeftOutlined */ "./node_modules/@ant-design/icons/es/icons/LeftOutlined.js"); /* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./layout */ "./components/layout/layout.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../_util/isNumeric */ "./components/_util/isNumeric.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var dimensionMaxMap = { xs: '479.98px', sm: '575.98px', md: '767.98px', lg: '991.98px', xl: '1199.98px', xxl: '1599.98px' }; var SiderContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createContext"]({}); var generateId = function () { var i = 0; return function () { var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; i += 1; return "".concat(prefix).concat(i); }; }(); var Sider = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function (_a, ref) { var customizePrefixCls = _a.prefixCls, className = _a.className, trigger = _a.trigger, children = _a.children, _a$defaultCollapsed = _a.defaultCollapsed, defaultCollapsed = _a$defaultCollapsed === void 0 ? false : _a$defaultCollapsed, _a$theme = _a.theme, theme = _a$theme === void 0 ? 'dark' : _a$theme, _a$style = _a.style, style = _a$style === void 0 ? {} : _a$style, _a$collapsible = _a.collapsible, collapsible = _a$collapsible === void 0 ? false : _a$collapsible, _a$reverseArrow = _a.reverseArrow, reverseArrow = _a$reverseArrow === void 0 ? false : _a$reverseArrow, _a$width = _a.width, width = _a$width === void 0 ? 200 : _a$width, _a$collapsedWidth = _a.collapsedWidth, collapsedWidth = _a$collapsedWidth === void 0 ? 80 : _a$collapsedWidth, zeroWidthTriggerStyle = _a.zeroWidthTriggerStyle, breakpoint = _a.breakpoint, onCollapse = _a.onCollapse, onBreakpoint = _a.onBreakpoint, props = __rest(_a, ["prefixCls", "className", "trigger", "children", "defaultCollapsed", "theme", "style", "collapsible", "reverseArrow", "width", "collapsedWidth", "zeroWidthTriggerStyle", "breakpoint", "onCollapse", "onBreakpoint"]); var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_3__["useContext"])(_layout__WEBPACK_IMPORTED_MODULE_9__[/* LayoutContext */ "d"]), siderHook = _useContext.siderHook; var _useState = Object(react__WEBPACK_IMPORTED_MODULE_3__["useState"])('collapsed' in props ? props.collapsed : defaultCollapsed), _useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_useState, 2), collapsed = _useState2[0], setCollapsed = _useState2[1]; var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_3__["useState"])(false), _useState4 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_useState3, 2), below = _useState4[0], setBelow = _useState4[1]; Object(react__WEBPACK_IMPORTED_MODULE_3__["useEffect"])(function () { if ('collapsed' in props) { setCollapsed(props.collapsed); } }, [props.collapsed]); var handleSetCollapsed = function handleSetCollapsed(value, type) { if (!('collapsed' in props)) { setCollapsed(value); } onCollapse === null || onCollapse === void 0 ? void 0 : onCollapse(value, type); }; // ========================= Responsive ========================= var responsiveHandlerRef = Object(react__WEBPACK_IMPORTED_MODULE_3__["useRef"])(); responsiveHandlerRef.current = function (mql) { setBelow(mql.matches); onBreakpoint === null || onBreakpoint === void 0 ? void 0 : onBreakpoint(mql.matches); if (collapsed !== mql.matches) { handleSetCollapsed(mql.matches, 'responsive'); } }; Object(react__WEBPACK_IMPORTED_MODULE_3__["useEffect"])(function () { function responsiveHandler(mql) { return responsiveHandlerRef.current(mql); } var mql; if (typeof window !== 'undefined') { var _window = window, matchMedia = _window.matchMedia; if (matchMedia && breakpoint && breakpoint in dimensionMaxMap) { mql = matchMedia("(max-width: ".concat(dimensionMaxMap[breakpoint], ")")); try { mql.addEventListener('change', responsiveHandler); } catch (error) { mql.addListener(responsiveHandler); } responsiveHandler(mql); } } return function () { try { mql === null || mql === void 0 ? void 0 : mql.removeEventListener('change', responsiveHandler); } catch (error) { mql === null || mql === void 0 ? void 0 : mql.removeListener(responsiveHandler); } }; }, []); Object(react__WEBPACK_IMPORTED_MODULE_3__["useEffect"])(function () { var uniqueId = generateId('ant-sider-'); siderHook.addSider(uniqueId); return function () { return siderHook.removeSider(uniqueId); }; }, []); var toggle = function toggle() { handleSetCollapsed(!collapsed, 'clickTrigger'); }; var _useContext2 = Object(react__WEBPACK_IMPORTED_MODULE_3__["useContext"])(_config_provider__WEBPACK_IMPORTED_MODULE_10__[/* ConfigContext */ "b"]), getPrefixCls = _useContext2.getPrefixCls; var renderSider = function renderSider() { var _classNames; var prefixCls = getPrefixCls('layout-sider', customizePrefixCls); var divProps = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(props, ['collapsed']); var rawWidth = collapsed ? collapsedWidth : width; // use "px" as fallback unit for width var siderWidth = Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"])(rawWidth) ? "".concat(rawWidth, "px") : String(rawWidth); // special trigger when collapsedWidth == 0 var zeroWidthTrigger = parseFloat(String(collapsedWidth || 0)) === 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", { onClick: toggle, className: classnames__WEBPACK_IMPORTED_MODULE_4___default()("".concat(prefixCls, "-zero-width-trigger"), "".concat(prefixCls, "-zero-width-trigger-").concat(reverseArrow ? 'right' : 'left')), style: zeroWidthTriggerStyle }, trigger || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_ant_design_icons_es_icons_BarsOutlined__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], null)) : null; var iconObj = { expanded: reverseArrow ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_ant_design_icons_es_icons_LeftOutlined__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], null), collapsed: reverseArrow ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_ant_design_icons_es_icons_LeftOutlined__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], null) }; var status = collapsed ? 'collapsed' : 'expanded'; var defaultTrigger = iconObj[status]; var triggerDom = trigger !== null ? zeroWidthTrigger || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(prefixCls, "-trigger"), onClick: toggle, style: { width: siderWidth } }, trigger || defaultTrigger) : null; var divStyle = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, style), { flex: "0 0 ".concat(siderWidth), maxWidth: siderWidth, minWidth: siderWidth, width: siderWidth }); var siderCls = classnames__WEBPACK_IMPORTED_MODULE_4___default()(prefixCls, "".concat(prefixCls, "-").concat(theme), (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-collapsed"), !!collapsed), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-has-trigger"), collapsible && trigger !== null && !zeroWidthTrigger), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-below"), !!below), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-zero-width"), parseFloat(siderWidth) === 0), _classNames), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("aside", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ className: siderCls }, divProps, { style: divStyle, ref: ref }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(prefixCls, "-children") }, children), collapsible || below && zeroWidthTrigger ? triggerDom : null); }; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](SiderContext.Provider, { value: { siderCollapsed: collapsed } }, renderSider()); }); Sider.displayName = 'Sider'; /* harmony default export */ __webpack_exports__["b"] = (Sider); /***/ }), /***/ "./components/layout/index.tsx": /*!*************************************!*\ !*** ./components/layout/index.tsx ***! \*************************************/ /*! exports provided: LayoutProps, SiderProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./layout */ "./components/layout/layout.tsx"); /* harmony import */ var _Sider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Sider */ "./components/layout/Sider.tsx"); var Layout = _layout__WEBPACK_IMPORTED_MODULE_0__[/* default */ "e"]; Layout.Header = _layout__WEBPACK_IMPORTED_MODULE_0__[/* Header */ "c"]; Layout.Footer = _layout__WEBPACK_IMPORTED_MODULE_0__[/* Footer */ "b"]; Layout.Content = _layout__WEBPACK_IMPORTED_MODULE_0__[/* Content */ "a"]; Layout.Sider = _Sider__WEBPACK_IMPORTED_MODULE_1__[/* default */ "b"]; /* harmony default export */ __webpack_exports__["a"] = (Layout); /***/ }), /***/ "./components/layout/layout.tsx": /*!**************************************!*\ !*** ./components/layout/layout.tsx ***! \**************************************/ /*! exports provided: LayoutContext, Header, Footer, Content, default */ /*! exports used: Content, Footer, Header, LayoutContext, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return LayoutContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return Header; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Footer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Content; }); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var LayoutContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createContext"]({ siderHook: { addSider: function addSider() { return null; }, removeSider: function removeSider() { return null; } } }); function generator(_ref) { var suffixCls = _ref.suffixCls, tagName = _ref.tagName, displayName = _ref.displayName; return function (BasicComponent) { var Adapter = function Adapter(props) { var _React$useContext = react__WEBPACK_IMPORTED_MODULE_4__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_6__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls; var customizePrefixCls = props.prefixCls; var prefixCls = getPrefixCls(suffixCls, customizePrefixCls); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](BasicComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({ prefixCls: prefixCls, tagName: tagName }, props)); }; Adapter.displayName = displayName; return Adapter; }; } var Basic = function Basic(props) { var prefixCls = props.prefixCls, className = props.className, children = props.children, tagName = props.tagName, others = __rest(props, ["prefixCls", "className", "children", "tagName"]); var classString = classnames__WEBPACK_IMPORTED_MODULE_5___default()(prefixCls, className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](tagName, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({ className: classString }, others), children); }; var BasicLayout = function BasicLayout(props) { var _classNames; var _React$useContext2 = react__WEBPACK_IMPORTED_MODULE_4__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_6__[/* ConfigContext */ "b"]), direction = _React$useContext2.direction; var _React$useState = react__WEBPACK_IMPORTED_MODULE_4__["useState"]([]), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_React$useState, 2), siders = _React$useState2[0], setSiders = _React$useState2[1]; var prefixCls = props.prefixCls, className = props.className, children = props.children, hasSider = props.hasSider, Tag = props.tagName, others = __rest(props, ["prefixCls", "className", "children", "hasSider", "tagName"]); var classString = classnames__WEBPACK_IMPORTED_MODULE_5___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-has-sider"), typeof hasSider === 'boolean' ? hasSider : siders.length > 0), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](LayoutContext.Provider, { value: { siderHook: { addSider: function addSider(id) { setSiders(function (prev) { return [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(prev), [id]); }); }, removeSider: function removeSider(id) { setSiders(function (prev) { return prev.filter(function (currentId) { return currentId !== id; }); }); } } } }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](Tag, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({ className: classString }, others), children)); }; var Layout = generator({ suffixCls: 'layout', tagName: 'section', displayName: 'Layout' })(BasicLayout); var Header = generator({ suffixCls: 'layout-header', tagName: 'header', displayName: 'Header' })(Basic); var Footer = generator({ suffixCls: 'layout-footer', tagName: 'footer', displayName: 'Footer' })(Basic); var Content = generator({ suffixCls: 'layout-content', tagName: 'main', displayName: 'Content' })(Basic); /* harmony default export */ __webpack_exports__["e"] = (Layout); /***/ }), /***/ "./components/layout/style/index.less": /*!********************************************!*\ !*** ./components/layout/style/index.less ***! \********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/layout/style/index.tsx": /*!*******************************************!*\ !*** ./components/layout/style/index.tsx ***! \*******************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/layout/style/index.less"); /***/ }), /***/ "./components/list/Item.tsx": /*!**********************************!*\ !*** ./components/list/Item.tsx ***! \**********************************/ /*! exports provided: Meta, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export Meta */ /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index */ "./components/list/index.tsx"); /* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../grid */ "./components/grid/index.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Meta = function Meta(_a) { var customizePrefixCls = _a.prefixCls, className = _a.className, avatar = _a.avatar, title = _a.title, description = _a.description, others = __rest(_a, ["prefixCls", "className", "avatar", "title", "description"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_6__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls; var prefixCls = getPrefixCls('list', customizePrefixCls); var classString = classnames__WEBPACK_IMPORTED_MODULE_3___default()("".concat(prefixCls, "-item-meta"), className); var content = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-item-meta-content") }, title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("h4", { className: "".concat(prefixCls, "-item-meta-title") }, title), description && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-item-meta-description") }, description)); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, others, { className: classString }), avatar && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-item-meta-avatar") }, avatar), (title || description) && content); }; var Item = function Item(_a) { var customizePrefixCls = _a.prefixCls, children = _a.children, actions = _a.actions, extra = _a.extra, className = _a.className, colStyle = _a.colStyle, others = __rest(_a, ["prefixCls", "children", "actions", "extra", "className", "colStyle"]); var _React$useContext2 = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_index__WEBPACK_IMPORTED_MODULE_4__[/* ListContext */ "a"]), grid = _React$useContext2.grid, itemLayout = _React$useContext2.itemLayout; var _React$useContext3 = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_6__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext3.getPrefixCls; var isItemContainsTextNodeAndNotSingular = function isItemContainsTextNodeAndNotSingular() { var result; react__WEBPACK_IMPORTED_MODULE_2__["Children"].forEach(children, function (element) { if (typeof element === 'string') { result = true; } }); return result && react__WEBPACK_IMPORTED_MODULE_2__["Children"].count(children) > 1; }; var isFlexMode = function isFlexMode() { if (itemLayout === 'vertical') { return !!extra; } return !isItemContainsTextNodeAndNotSingular(); }; var prefixCls = getPrefixCls('list', customizePrefixCls); var actionsContent = actions && actions.length > 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("ul", { className: "".concat(prefixCls, "-item-action"), key: "actions" }, actions.map(function (action, i) { return ( /*#__PURE__*/ // eslint-disable-next-line react/no-array-index-key react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("li", { key: "".concat(prefixCls, "-item-action-").concat(i) }, action, i !== actions.length - 1 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("em", { className: "".concat(prefixCls, "-item-action-split") })) ); })); var Element = grid ? 'div' : 'li'; var itemChildren = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Element, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, others, { // `li` element `onCopy` prop args is not same as `div` className: classnames__WEBPACK_IMPORTED_MODULE_3___default()("".concat(prefixCls, "-item"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(prefixCls, "-item-no-flex"), !isFlexMode()), className) }), itemLayout === 'vertical' && extra ? [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-item-main"), key: "content" }, children, actionsContent), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-item-extra"), key: "extra" }, extra)] : [children, actionsContent, Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_7__[/* cloneElement */ "a"])(extra, { key: 'extra' })]); return grid ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_grid__WEBPACK_IMPORTED_MODULE_5__[/* Col */ "a"], { flex: 1, style: colStyle }, itemChildren) : itemChildren; }; Item.Meta = Meta; /* harmony default export */ __webpack_exports__["a"] = (Item); /***/ }), /***/ "./components/list/index.tsx": /*!***********************************!*\ !*** ./components/list/index.tsx ***! \***********************************/ /*! exports provided: ListItemProps, ListItemMetaProps, ListContext, ListConsumer, default */ /*! exports used: ListContext, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ListContext; }); /* unused harmony export ListConsumer */ /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _spin__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../spin */ "./components/spin/index.tsx"); /* harmony import */ var _grid_hooks_useBreakpoint__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../grid/hooks/useBreakpoint */ "./components/grid/hooks/useBreakpoint.tsx"); /* harmony import */ var _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../_util/responsiveObserve */ "./components/_util/responsiveObserve.ts"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _pagination__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../pagination */ "./components/pagination/index.tsx"); /* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../grid */ "./components/grid/index.tsx"); /* harmony import */ var _Item__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Item */ "./components/list/Item.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var ListContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createContext"]({}); var ListConsumer = ListContext.Consumer; function List(_a) { var _classNames; var _a$pagination = _a.pagination, pagination = _a$pagination === void 0 ? false : _a$pagination, customizePrefixCls = _a.prefixCls, _a$bordered = _a.bordered, bordered = _a$bordered === void 0 ? false : _a$bordered, _a$split = _a.split, split = _a$split === void 0 ? true : _a$split, className = _a.className, children = _a.children, itemLayout = _a.itemLayout, loadMore = _a.loadMore, grid = _a.grid, _a$dataSource = _a.dataSource, dataSource = _a$dataSource === void 0 ? [] : _a$dataSource, size = _a.size, header = _a.header, footer = _a.footer, _a$loading = _a.loading, loading = _a$loading === void 0 ? false : _a$loading, rowKey = _a.rowKey, renderItem = _a.renderItem, locale = _a.locale, rest = __rest(_a, ["pagination", "prefixCls", "bordered", "split", "className", "children", "itemLayout", "loadMore", "grid", "dataSource", "size", "header", "footer", "loading", "rowKey", "renderItem", "locale"]); var paginationObj = pagination && Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(pagination) === 'object' ? pagination : {}; var _React$useState = react__WEBPACK_IMPORTED_MODULE_5__["useState"](paginationObj.defaultCurrent || 1), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_React$useState, 2), paginationCurrent = _React$useState2[0], setPaginationCurrent = _React$useState2[1]; var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_5__["useState"](paginationObj.defaultPageSize || 10), _React$useState4 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_React$useState3, 2), paginationSize = _React$useState4[0], setPaginationSize = _React$useState4[1]; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_5__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_10__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, renderEmpty = _React$useContext.renderEmpty, direction = _React$useContext.direction; var defaultPaginationProps = { current: 1, total: 0 }; var keys = {}; var triggerPaginationEvent = function triggerPaginationEvent(eventName) { return function (page, pageSize) { setPaginationCurrent(page); setPaginationSize(pageSize); if (pagination && pagination[eventName]) { pagination[eventName](page, pageSize); } }; }; var onPaginationChange = triggerPaginationEvent('onChange'); var onPaginationShowSizeChange = triggerPaginationEvent('onShowSizeChange'); var renderInnerItem = function renderInnerItem(item, index) { if (!renderItem) return null; var key; if (typeof rowKey === 'function') { key = rowKey(item); } else if (typeof rowKey === 'string') { key = item[rowKey]; } else { key = item.key; } if (!key) { key = "list-item-".concat(index); } keys[index] = key; return renderItem(item, index); }; var isSomethingAfterLastItem = function isSomethingAfterLastItem() { return !!(loadMore || pagination || footer); }; var renderEmptyFunc = function renderEmptyFunc(prefixCls, renderEmptyHandler) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("div", { className: "".concat(prefixCls, "-empty-text") }, locale && locale.emptyText || renderEmptyHandler('List')); }; var prefixCls = getPrefixCls('list', customizePrefixCls); var loadingProp = loading; if (typeof loadingProp === 'boolean') { loadingProp = { spinning: loadingProp }; } var isLoading = loadingProp && loadingProp.spinning; // large => lg // small => sm var sizeCls = ''; switch (size) { case 'large': sizeCls = 'lg'; break; case 'small': sizeCls = 'sm'; break; default: break; } var classString = classnames__WEBPACK_IMPORTED_MODULE_6___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-vertical"), itemLayout === 'vertical'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(sizeCls), sizeCls), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-split"), split), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-bordered"), bordered), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-loading"), isLoading), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-grid"), !!grid), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-something-after-last-item"), isSomethingAfterLastItem()), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className); var paginationProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, defaultPaginationProps), { total: dataSource.length, current: paginationCurrent, pageSize: paginationSize }), pagination || {}); var largestPage = Math.ceil(paginationProps.total / paginationProps.pageSize); if (paginationProps.current > largestPage) { paginationProps.current = largestPage; } var paginationContent = pagination ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("div", { className: "".concat(prefixCls, "-pagination") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_pagination__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, paginationProps, { onChange: onPaginationChange, onShowSizeChange: onPaginationShowSizeChange }))) : null; var splitDataSource = Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(dataSource); if (pagination) { if (dataSource.length > (paginationProps.current - 1) * paginationProps.pageSize) { splitDataSource = Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(dataSource).splice((paginationProps.current - 1) * paginationProps.pageSize, paginationProps.pageSize); } } var screens = Object(_grid_hooks_useBreakpoint__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(); var currentBreakpoint = react__WEBPACK_IMPORTED_MODULE_5__["useMemo"](function () { for (var i = 0; i < _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_9__[/* responsiveArray */ "b"].length; i += 1) { var breakpoint = _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_9__[/* responsiveArray */ "b"][i]; if (screens[breakpoint]) { return breakpoint; } } return undefined; }, [screens]); var colStyle = react__WEBPACK_IMPORTED_MODULE_5__["useMemo"](function () { if (!grid) { return undefined; } var columnCount = currentBreakpoint && grid[currentBreakpoint] ? grid[currentBreakpoint] : grid.column; if (columnCount) { return { width: "".concat(100 / columnCount, "%"), maxWidth: "".concat(100 / columnCount, "%") }; } }, [grid === null || grid === void 0 ? void 0 : grid.column, currentBreakpoint]); var childrenContent = isLoading && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("div", { style: { minHeight: 53 } }); if (splitDataSource.length > 0) { var items = splitDataSource.map(function (item, index) { return renderInnerItem(item, index); }); var childrenList = react__WEBPACK_IMPORTED_MODULE_5__["Children"].map(items, function (child, index) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("div", { key: keys[index], style: colStyle }, child); }); childrenContent = grid ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_grid__WEBPACK_IMPORTED_MODULE_12__[/* Row */ "b"], { gutter: grid.gutter }, childrenList) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("ul", { className: "".concat(prefixCls, "-items") }, items); } else if (!children && !isLoading) { childrenContent = renderEmptyFunc(prefixCls, renderEmpty); } var paginationPosition = paginationProps.position || 'bottom'; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](ListContext.Provider, { value: { grid: grid, itemLayout: itemLayout } }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ className: classString }, rest), (paginationPosition === 'top' || paginationPosition === 'both') && paginationContent, header && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("div", { className: "".concat(prefixCls, "-header") }, header), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_spin__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], loadingProp, childrenContent, children), footer && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("div", { className: "".concat(prefixCls, "-footer") }, footer), loadMore || (paginationPosition === 'bottom' || paginationPosition === 'both') && paginationContent)); } List.Item = _Item__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"]; /* harmony default export */ __webpack_exports__["b"] = (List); /***/ }), /***/ "./components/list/style/index.less": /*!******************************************!*\ !*** ./components/list/style/index.less ***! \******************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/list/style/index.tsx": /*!*****************************************!*\ !*** ./components/list/style/index.tsx ***! \*****************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/list/style/index.less"); /* harmony import */ var _empty_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../empty/style */ "./components/empty/style/index.tsx"); /* harmony import */ var _spin_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../spin/style */ "./components/spin/style/index.tsx"); /* harmony import */ var _pagination_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../pagination/style */ "./components/pagination/style/index.tsx"); /* harmony import */ var _grid_style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../grid/style */ "./components/grid/style/index.tsx"); // style dependencies /***/ }), /***/ "./components/locale-provider/LocaleReceiver.tsx": /*!*******************************************************!*\ !*** ./components/locale-provider/LocaleReceiver.tsx ***! \*******************************************************/ /*! exports provided: default, useLocaleReceiver */ /*! exports used: default, useLocaleReceiver */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LocaleReceiver; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return useLocaleReceiver; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _default__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./default */ "./components/locale-provider/default.tsx"); /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./context */ "./components/locale-provider/context.ts"); var LocaleReceiver = /*#__PURE__*/function (_React$Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(LocaleReceiver, _React$Component); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(LocaleReceiver); function LocaleReceiver() { Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, LocaleReceiver); return _super.apply(this, arguments); } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(LocaleReceiver, [{ key: "getLocale", value: function getLocale() { var _this$props = this.props, componentName = _this$props.componentName, defaultLocale = _this$props.defaultLocale; var locale = defaultLocale || _default__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"][componentName || 'global']; var antLocale = this.context; var localeFromContext = componentName && antLocale ? antLocale[componentName] : {}; return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, typeof locale === 'function' ? locale() : locale), localeFromContext || {}); } }, { key: "getLocaleCode", value: function getLocaleCode() { var antLocale = this.context; var localeCode = antLocale && antLocale.locale; // Had use LocaleProvide but didn't set locale if (antLocale && antLocale.exist && !localeCode) { return _default__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].locale; } return localeCode; } }, { key: "render", value: function render() { return this.props.children(this.getLocale(), this.getLocaleCode(), this.context); } }]); return LocaleReceiver; }(react__WEBPACK_IMPORTED_MODULE_5__["Component"]); LocaleReceiver.defaultProps = { componentName: 'global' }; LocaleReceiver.contextType = _context__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"]; function useLocaleReceiver(componentName, defaultLocale) { var antLocale = react__WEBPACK_IMPORTED_MODULE_5__["useContext"](_context__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"]); var componentLocale = react__WEBPACK_IMPORTED_MODULE_5__["useMemo"](function () { var locale = defaultLocale || _default__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"][componentName || 'global']; var localeFromContext = componentName && antLocale ? antLocale[componentName] : {}; return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, typeof locale === 'function' ? locale() : locale), localeFromContext || {}); }, [componentName, defaultLocale, antLocale]); return [componentLocale]; } /***/ }), /***/ "./components/locale-provider/context.ts": /*!***********************************************!*\ !*** ./components/locale-provider/context.ts ***! \***********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var LocaleContext = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createContext"])(undefined); /* harmony default export */ __webpack_exports__["a"] = (LocaleContext); /***/ }), /***/ "./components/locale-provider/default.tsx": /*!************************************************!*\ !*** ./components/locale-provider/default.tsx ***! \************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _locale_default__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../locale/default */ "./components/locale/default.tsx"); /* harmony default export */ __webpack_exports__["a"] = (_locale_default__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]); /***/ }), /***/ "./components/locale-provider/index.tsx": /*!**********************************************!*\ !*** ./components/locale-provider/index.tsx ***! \**********************************************/ /*! exports provided: ANT_MARK, default */ /*! exports used: ANT_MARK, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ANT_MARK; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return LocaleProvider; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _modal_locale__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../modal/locale */ "./components/modal/locale.tsx"); /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./context */ "./components/locale-provider/context.ts"); var ANT_MARK = 'internalMark'; var LocaleProvider = /*#__PURE__*/function (_React$Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(LocaleProvider, _React$Component); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(LocaleProvider); function LocaleProvider(props) { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, LocaleProvider); _this = _super.call(this, props); Object(_modal_locale__WEBPACK_IMPORTED_MODULE_7__[/* changeConfirmLocale */ "a"])(props.locale && props.locale.Modal); if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(props._ANT_MARK__ === ANT_MARK, 'LocaleProvider', '`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale'); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(LocaleProvider, [{ key: "componentDidMount", value: function componentDidMount() { Object(_modal_locale__WEBPACK_IMPORTED_MODULE_7__[/* changeConfirmLocale */ "a"])(this.props.locale && this.props.locale.Modal); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var locale = this.props.locale; if (prevProps.locale !== locale) { Object(_modal_locale__WEBPACK_IMPORTED_MODULE_7__[/* changeConfirmLocale */ "a"])(locale && locale.Modal); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { Object(_modal_locale__WEBPACK_IMPORTED_MODULE_7__[/* changeConfirmLocale */ "a"])(); } }, { key: "render", value: function render() { var _this$props = this.props, locale = _this$props.locale, children = _this$props.children; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_context__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].Provider, { value: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, locale), { exist: true }) }, children); } }]); return LocaleProvider; }(react__WEBPACK_IMPORTED_MODULE_5__["Component"]); LocaleProvider.defaultProps = { locale: {} }; /***/ }), /***/ "./components/locale-provider/style/index.less": /*!*****************************************************!*\ !*** ./components/locale-provider/style/index.less ***! \*****************************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/locale-provider/style/index.tsx": /*!****************************************************!*\ !*** ./components/locale-provider/style/index.tsx ***! \****************************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.less */ "./components/locale-provider/style/index.less"); /***/ }), /***/ "./components/locale/default.tsx": /*!***************************************!*\ !*** ./components/locale/default.tsx ***! \***************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var rc_pagination_es_locale_en_US__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-pagination/es/locale/en_US */ "./node_modules/rc-pagination/es/locale/en_US.js"); /* harmony import */ var _date_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../date-picker/locale/en_US */ "./components/date-picker/locale/en_US.tsx"); /* harmony import */ var _time_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../time-picker/locale/en_US */ "./components/time-picker/locale/en_US.tsx"); /* harmony import */ var _calendar_locale_en_US__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../calendar/locale/en_US */ "./components/calendar/locale/en_US.tsx"); /* eslint-disable no-template-curly-in-string */ var typeTemplate = '${label} is not a valid ${type}'; var localeValues = { locale: 'en', Pagination: rc_pagination_es_locale_en_US__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"], DatePicker: _date_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"], TimePicker: _time_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], Calendar: _calendar_locale_en_US__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], global: { placeholder: 'Please select' }, Table: { filterTitle: 'Filter menu', filterConfirm: 'OK', filterReset: 'Reset', filterEmptyText: 'No filters', emptyText: 'No data', selectAll: 'Select current page', selectInvert: 'Invert current page', selectNone: 'Clear all data', selectionAll: 'Select all data', sortTitle: 'Sort', expand: 'Expand row', collapse: 'Collapse row', triggerDesc: 'Click to sort descending', triggerAsc: 'Click to sort ascending', cancelSort: 'Click to cancel sorting' }, Modal: { okText: 'OK', cancelText: 'Cancel', justOkText: 'OK' }, Popconfirm: { okText: 'OK', cancelText: 'Cancel' }, Transfer: { titles: ['', ''], searchPlaceholder: 'Search here', itemUnit: 'item', itemsUnit: 'items', remove: 'Remove', selectCurrent: 'Select current page', removeCurrent: 'Remove current page', selectAll: 'Select all data', removeAll: 'Remove all data', selectInvert: 'Invert current page' }, Upload: { uploading: 'Uploading...', removeFile: 'Remove file', uploadError: 'Upload error', previewFile: 'Preview file', downloadFile: 'Download file' }, Empty: { description: 'No Data' }, Icon: { icon: 'icon' }, Text: { edit: 'Edit', copy: 'Copy', copied: 'Copied', expand: 'Expand' }, PageHeader: { back: 'Back' }, Form: { optional: '(optional)', defaultValidateMessages: { "default": 'Field validation error for ${label}', required: 'Please enter ${label}', "enum": '${label} must be one of [${enum}]', whitespace: '${label} cannot be a blank character', date: { format: '${label} date format is invalid', parse: '${label} cannot be converted to a date', invalid: '${label} is an invalid date' }, types: { string: typeTemplate, method: typeTemplate, array: typeTemplate, object: typeTemplate, number: typeTemplate, date: typeTemplate, "boolean": typeTemplate, integer: typeTemplate, "float": typeTemplate, regexp: typeTemplate, email: typeTemplate, url: typeTemplate, hex: typeTemplate }, string: { len: '${label} must be ${len} characters', min: '${label} must be at least ${min} characters', max: '${label} must be up to ${max} characters', range: '${label} must be between ${min}-${max} characters' }, number: { len: '${label} must be equal to ${len}', min: '${label} must be minimum ${min}', max: '${label} must be maximum ${max}', range: '${label} must be between ${min}-${max}' }, array: { len: 'Must be ${len} ${label}', min: 'At least ${min} ${label}', max: 'At most ${max} ${label}', range: 'The amount of ${label} must be between ${min}-${max}' }, pattern: { mismatch: '${label} does not match the pattern ${pattern}' } } }, Image: { preview: 'Preview' } }; /* harmony default export */ __webpack_exports__["a"] = (localeValues); /***/ }), /***/ "./components/locale/en_US.tsx": /*!*************************************!*\ !*** ./components/locale/en_US.tsx ***! \*************************************/ /*! exports provided: default */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _default__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./default */ "./components/locale/default.tsx"); /* harmony default export */ __webpack_exports__["default"] = (_default__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]); /***/ }), /***/ "./components/mentions/index.tsx": /*!***************************************!*\ !*** ./components/mentions/index.tsx ***! \***************************************/ /*! exports provided: Option, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export Option */ /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var rc_mentions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-mentions */ "./node_modules/rc-mentions/es/index.js"); /* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/ref */ "./node_modules/rc-util/es/ref.js"); /* harmony import */ var _spin__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../spin */ "./components/spin/index.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Option = rc_mentions__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].Option; function loadingFilterOption() { return true; } var InternalMentions = function InternalMentions(_a, ref) { var _classNames; var customizePrefixCls = _a.prefixCls, className = _a.className, disabled = _a.disabled, loading = _a.loading, filterOption = _a.filterOption, children = _a.children, notFoundContent = _a.notFoundContent, restProps = __rest(_a, ["prefixCls", "className", "disabled", "loading", "filterOption", "children", "notFoundContent"]); var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__["useState"](false), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_React$useState, 2), focused = _React$useState2[0], setFocused = _React$useState2[1]; var innerRef = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](); var mergedRef = Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_6__[/* composeRef */ "a"])(ref, innerRef); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_3__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_8__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, renderEmpty = _React$useContext.renderEmpty, direction = _React$useContext.direction; var onFocus = function onFocus() { if (restProps.onFocus) { restProps.onFocus.apply(restProps, arguments); } setFocused(true); }; var onBlur = function onBlur() { if (restProps.onBlur) { restProps.onBlur.apply(restProps, arguments); } setFocused(false); }; var getNotFoundContent = function getNotFoundContent() { if (notFoundContent !== undefined) { return notFoundContent; } return renderEmpty('Select'); }; var getOptions = function getOptions() { if (loading) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](Option, { value: "ANTD_SEARCHING", disabled: true }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_spin__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], { size: "small" })); } return children; }; var getFilterOption = function getFilterOption() { if (loading) { return loadingFilterOption; } return filterOption; }; var prefixCls = getPrefixCls('mentions', customizePrefixCls); var mergedClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-disabled"), disabled), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-focused"), focused), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](rc_mentions__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ prefixCls: prefixCls, notFoundContent: getNotFoundContent(), className: mergedClassName, disabled: disabled, direction: direction }, restProps, { filterOption: getFilterOption(), onFocus: onFocus, onBlur: onBlur, ref: mergedRef }), getOptions()); }; var Mentions = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](InternalMentions); Mentions.displayName = 'Mentions'; Mentions.Option = Option; Mentions.getMentions = function () { var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; var config = arguments.length > 1 ? arguments[1] : undefined; var _ref = config || {}, _ref$prefix = _ref.prefix, prefix = _ref$prefix === void 0 ? '@' : _ref$prefix, _ref$split = _ref.split, split = _ref$split === void 0 ? ' ' : _ref$split; var prefixList = Array.isArray(prefix) ? prefix : [prefix]; return value.split(split).map(function () { var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; var hitPrefix = null; prefixList.some(function (prefixStr) { var startStr = str.slice(0, prefixStr.length); if (startStr === prefixStr) { hitPrefix = prefixStr; return true; } return false; }); if (hitPrefix !== null) { return { prefix: hitPrefix, value: str.slice(hitPrefix.length) }; } return null; }).filter(function (entity) { return !!entity && !!entity.value; }); }; /* harmony default export */ __webpack_exports__["a"] = (Mentions); /***/ }), /***/ "./components/mentions/style/index.less": /*!**********************************************!*\ !*** ./components/mentions/style/index.less ***! \**********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/mentions/style/index.tsx": /*!*********************************************!*\ !*** ./components/mentions/style/index.tsx ***! \*********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.less */ "./components/mentions/style/index.less"); /* harmony import */ var _empty_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../empty/style */ "./components/empty/style/index.tsx"); /* harmony import */ var _spin_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../spin/style */ "./components/spin/style/index.tsx"); // style dependencies /***/ }), /***/ "./components/menu/MenuContext.tsx": /*!*****************************************!*\ !*** ./components/menu/MenuContext.tsx ***! \*****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var MenuContext = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createContext"])({ prefixCls: '', firstLevel: true, inlineCollapsed: false }); /* harmony default export */ __webpack_exports__["a"] = (MenuContext); /***/ }), /***/ "./components/menu/MenuItem.tsx": /*!**************************************!*\ !*** ./components/menu/MenuItem.tsx ***! \**************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MenuItem; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var rc_menu__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-menu */ "./node_modules/rc-menu/es/index.js"); /* harmony import */ var rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-util/es/Children/toArray */ "./node_modules/rc-util/es/Children/toArray.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _MenuContext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./MenuContext */ "./components/menu/MenuContext.tsx"); /* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../tooltip */ "./components/tooltip/index.tsx"); /* harmony import */ var _layout_Sider__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../layout/Sider */ "./components/layout/Sider.tsx"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var MenuItem = /*#__PURE__*/function (_React$Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(MenuItem, _React$Component); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(MenuItem); function MenuItem() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, MenuItem); _this = _super.apply(this, arguments); _this.renderItem = function (_ref) { var _classNames; var siderCollapsed = _ref.siderCollapsed; var _a; var _this$context = _this.context, prefixCls = _this$context.prefixCls, firstLevel = _this$context.firstLevel, inlineCollapsed = _this$context.inlineCollapsed, direction = _this$context.direction; var _this$props = _this.props, className = _this$props.className, children = _this$props.children; var _b = _this.props, title = _b.title, icon = _b.icon, danger = _b.danger, rest = __rest(_b, ["title", "icon", "danger"]); var tooltipTitle = title; if (typeof title === 'undefined') { tooltipTitle = firstLevel ? children : ''; } else if (title === false) { tooltipTitle = ''; } var tooltipProps = { title: tooltipTitle }; if (!siderCollapsed && !inlineCollapsed) { tooltipProps.title = null; // Reset `visible` to fix control mode tooltip display not correct // ref: https://github.com/ant-design/ant-design/issues/16742 tooltipProps.visible = false; } var childrenLength = Object(rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(children).length; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_tooltip__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, tooltipProps, { placement: direction === 'rtl' ? 'left' : 'right', overlayClassName: "".concat(prefixCls, "-inline-collapsed-tooltip") }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](rc_menu__WEBPACK_IMPORTED_MODULE_7__[/* Item */ "b"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, rest, { className: classnames__WEBPACK_IMPORTED_MODULE_9___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-item-danger"), danger), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-item-only-child"), (icon ? childrenLength + 1 : childrenLength) === 1), _classNames), className), title: typeof title === 'string' ? title : undefined }), Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_13__[/* cloneElement */ "a"])(icon, { className: classnames__WEBPACK_IMPORTED_MODULE_9___default()(Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_13__[/* isValidElement */ "b"])(icon) ? (_a = icon.props) === null || _a === void 0 ? void 0 : _a.className : '', "".concat(prefixCls, "-item-icon")) }), _this.renderItemChildren(inlineCollapsed))); }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(MenuItem, [{ key: "renderItemChildren", value: function renderItemChildren(inlineCollapsed) { var _this$context2 = this.context, prefixCls = _this$context2.prefixCls, firstLevel = _this$context2.firstLevel; var _this$props2 = this.props, icon = _this$props2.icon, children = _this$props2.children; var wrapNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("span", { className: "".concat(prefixCls, "-title-content") }, children); // inline-collapsed.md demo 依赖 span 来隐藏文字,有 icon 属性,则内部包裹一个 span // ref: https://github.com/ant-design/ant-design/pull/23456 if (!icon || Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_13__[/* isValidElement */ "b"])(children) && children.type === 'span') { if (children && inlineCollapsed && firstLevel && typeof children === 'string') { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", { className: "".concat(prefixCls, "-inline-collapsed-noicon") }, children.charAt(0)); } } return wrapNode; } }, { key: "render", value: function render() { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_layout_Sider__WEBPACK_IMPORTED_MODULE_12__[/* SiderContext */ "a"].Consumer, null, this.renderItem); } }]); return MenuItem; }(react__WEBPACK_IMPORTED_MODULE_6__["Component"]); MenuItem.contextType = _MenuContext__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"]; /***/ }), /***/ "./components/menu/SubMenu.tsx": /*!*************************************!*\ !*** ./components/menu/SubMenu.tsx ***! \*************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var rc_menu__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-menu */ "./node_modules/rc-menu/es/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var _MenuContext__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./MenuContext */ "./components/menu/MenuContext.tsx"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); function SubMenu(props) { var _a; var popupClassName = props.popupClassName, icon = props.icon, title = props.title; var context = react__WEBPACK_IMPORTED_MODULE_1__["useContext"](_MenuContext__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"]); var prefixCls = context.prefixCls, inlineCollapsed = context.inlineCollapsed, antdMenuTheme = context.antdMenuTheme; var parentPath = Object(rc_menu__WEBPACK_IMPORTED_MODULE_2__[/* useFullPath */ "g"])(); var titleNode; if (!icon) { titleNode = inlineCollapsed && !parentPath.length && title && typeof title === 'string' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(prefixCls, "-inline-collapsed-noicon") }, title.charAt(0)) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("span", { className: "".concat(prefixCls, "-title-content") }, title); } else { // inline-collapsed.md demo 依赖 span 来隐藏文字,有 icon 属性,则内部包裹一个 span // ref: https://github.com/ant-design/ant-design/pull/23456 var titleIsSpan = Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_6__[/* isValidElement */ "b"])(title) && title.type === 'span'; titleNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](react__WEBPACK_IMPORTED_MODULE_1__["Fragment"], null, Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_6__[/* cloneElement */ "a"])(icon, { className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_6__[/* isValidElement */ "b"])(icon) ? (_a = icon.props) === null || _a === void 0 ? void 0 : _a.className : '', "".concat(prefixCls, "-item-icon")) }), titleIsSpan ? title : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("span", { className: "".concat(prefixCls, "-title-content") }, title)); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_MenuContext__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].Provider, { value: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, context), { firstLevel: false }) }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](rc_menu__WEBPACK_IMPORTED_MODULE_2__[/* SubMenu */ "e"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(props, ['icon']), { title: titleNode, popupClassName: classnames__WEBPACK_IMPORTED_MODULE_3___default()(prefixCls, "".concat(prefixCls, "-").concat(antdMenuTheme), popupClassName) }))); } /* harmony default export */ __webpack_exports__["a"] = (SubMenu); /***/ }), /***/ "./components/menu/index.tsx": /*!***********************************!*\ !*** ./components/menu/index.tsx ***! \***********************************/ /*! exports provided: MenuItemGroupProps, MenuTheme, SubMenuProps, MenuItemProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var rc_menu__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-menu */ "./node_modules/rc-menu/es/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ant-design/icons */ "./node_modules/@ant-design/icons/es/index.js"); /* harmony import */ var _SubMenu__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./SubMenu */ "./components/menu/SubMenu.tsx"); /* harmony import */ var _MenuItem__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./MenuItem */ "./components/menu/MenuItem.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _layout_Sider__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../layout/Sider */ "./components/layout/Sider.tsx"); /* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../_util/motion */ "./components/_util/motion.tsx"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); /* harmony import */ var _MenuContext__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./MenuContext */ "./components/menu/MenuContext.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var InternalMenu = /*#__PURE__*/function (_React$Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(InternalMenu, _React$Component); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(InternalMenu); function InternalMenu(props) { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, InternalMenu); _this = _super.call(this, props); _this.renderMenu = function (_ref) { var getPopupContainer = _ref.getPopupContainer, getPrefixCls = _ref.getPrefixCls, direction = _ref.direction; var rootPrefixCls = getPrefixCls(); var _a = _this.props, customizePrefixCls = _a.prefixCls, className = _a.className, theme = _a.theme, expandIcon = _a.expandIcon, restProps = __rest(_a, ["prefixCls", "className", "theme", "expandIcon"]); var passedProps = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(restProps, ['siderCollapsed', 'collapsedWidth']); var inlineCollapsed = _this.getInlineCollapsed(); var defaultMotions = { horizontal: { motionName: "".concat(rootPrefixCls, "-slide-up") }, inline: _util_motion__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"], other: { motionName: "".concat(rootPrefixCls, "-zoom-big") } }; var prefixCls = getPrefixCls('menu', customizePrefixCls); var menuClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()("".concat(prefixCls, "-").concat(theme), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_MenuContext__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"].Provider, { value: { prefixCls: prefixCls, inlineCollapsed: inlineCollapsed || false, antdMenuTheme: theme, direction: direction, firstLevel: true } }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](rc_menu__WEBPACK_IMPORTED_MODULE_6__[/* default */ "f"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ getPopupContainer: getPopupContainer, overflowedIndicator: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_ant_design_icons__WEBPACK_IMPORTED_MODULE_9__[/* EllipsisOutlined */ "a"], null) }, passedProps, { inlineCollapsed: inlineCollapsed, className: menuClassName, prefixCls: prefixCls, direction: direction, defaultMotions: defaultMotions, expandIcon: Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_16__[/* cloneElement */ "a"])(expandIcon, { className: "".concat(prefixCls, "-submenu-expand-icon") }) }))); }; if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"])(!('inlineCollapsed' in props && props.mode !== 'inline'), 'Menu', '`inlineCollapsed` should only be used when `mode` is inline.'); Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"])(!(props.siderCollapsed !== undefined && 'inlineCollapsed' in props), 'Menu', '`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.'); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(InternalMenu, [{ key: "getInlineCollapsed", value: function getInlineCollapsed() { var _this$props = this.props, inlineCollapsed = _this$props.inlineCollapsed, siderCollapsed = _this$props.siderCollapsed; if (siderCollapsed !== undefined) { return siderCollapsed; } return inlineCollapsed; } }, { key: "render", value: function render() { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_12__[/* ConfigConsumer */ "a"], null, this.renderMenu); } }]); return InternalMenu; }(react__WEBPACK_IMPORTED_MODULE_5__["Component"]); InternalMenu.defaultProps = { theme: 'light' // or dark }; // We should keep this as ref-able var Menu = /*#__PURE__*/function (_React$Component2) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Menu, _React$Component2); var _super2 = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Menu); function Menu() { Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, Menu); return _super2.apply(this, arguments); } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Menu, [{ key: "render", value: function render() { var _this2 = this; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_layout_Sider__WEBPACK_IMPORTED_MODULE_14__[/* SiderContext */ "a"].Consumer, null, function (context) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](InternalMenu, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, _this2.props, context)); }); } }]); return Menu; }(react__WEBPACK_IMPORTED_MODULE_5__["Component"]); Menu.Divider = rc_menu__WEBPACK_IMPORTED_MODULE_6__[/* Divider */ "a"]; Menu.Item = _MenuItem__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"]; Menu.SubMenu = _SubMenu__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"]; Menu.ItemGroup = rc_menu__WEBPACK_IMPORTED_MODULE_6__[/* ItemGroup */ "c"]; /* harmony default export */ __webpack_exports__["a"] = (Menu); /***/ }), /***/ "./components/menu/style/index.less": /*!******************************************!*\ !*** ./components/menu/style/index.less ***! \******************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/menu/style/index.tsx": /*!*****************************************!*\ !*** ./components/menu/style/index.tsx ***! \*****************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/menu/style/index.less"); /* harmony import */ var _tooltip_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../tooltip/style */ "./components/tooltip/style/index.tsx"); // style dependencies // deps-lint-skip: layout /***/ }), /***/ "./components/message/hooks/useMessage.tsx": /*!*************************************************!*\ !*** ./components/message/hooks/useMessage.tsx ***! \*************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createUseMessage; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var rc_notification_es_useNotification__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-notification/es/useNotification */ "./node_modules/rc-notification/es/useNotification.js"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! .. */ "./components/message/index.tsx"); function createUseMessage(getRcNotificationInstance, getRCNoticeProps) { var useMessage = function useMessage() { // We can only get content by render var getPrefixCls; // We create a proxy to handle delay created instance var innerInstance = null; var proxy = { add: function add(noticeProps, holderCallback) { innerInstance === null || innerInstance === void 0 ? void 0 : innerInstance.component.add(noticeProps, holderCallback); } }; var _useRCNotification = Object(rc_notification_es_useNotification__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(proxy), _useRCNotification2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_useRCNotification, 2), hookNotify = _useRCNotification2[0], holder = _useRCNotification2[1]; function notify(args) { var customizePrefixCls = args.prefixCls; var mergedPrefixCls = getPrefixCls('message', customizePrefixCls); var rootPrefixCls = getPrefixCls(); var target = args.key || Object(___WEBPACK_IMPORTED_MODULE_5__[/* getKeyThenIncreaseKey */ "c"])(); var closePromise = new Promise(function (resolve) { var callback = function callback() { if (typeof args.onClose === 'function') { args.onClose(); } return resolve(true); }; getRcNotificationInstance(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, args), { prefixCls: mergedPrefixCls, rootPrefixCls: rootPrefixCls }), function (_ref) { var prefixCls = _ref.prefixCls, instance = _ref.instance; innerInstance = instance; hookNotify(getRCNoticeProps(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, args), { key: target, onClose: callback }), prefixCls)); }); }); var result = function result() { if (innerInstance) { innerInstance.removeNotice(target); } }; result.then = function (filled, rejected) { return closePromise.then(filled, rejected); }; result.promise = closePromise; return result; } // Fill functions var hookApiRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"]({}); hookApiRef.current.open = notify; ['success', 'info', 'warning', 'error', 'loading'].forEach(function (type) { return Object(___WEBPACK_IMPORTED_MODULE_5__[/* attachTypeApi */ "a"])(hookApiRef.current, type); }); return [hookApiRef.current, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_4__[/* ConfigConsumer */ "a"], { key: "holder" }, function (context) { getPrefixCls = context.getPrefixCls; return holder; })]; }; return useMessage; } /***/ }), /***/ "./components/message/index.tsx": /*!**************************************!*\ !*** ./components/message/index.tsx ***! \**************************************/ /*! exports provided: getKeyThenIncreaseKey, attachTypeApi, getInstance, default */ /*! exports used: attachTypeApi, default, getKeyThenIncreaseKey */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getKeyThenIncreaseKey; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return attachTypeApi; }); /* unused harmony export getInstance */ /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var rc_notification__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-notification */ "./node_modules/rc-notification/es/index.js"); /* harmony import */ var _ant_design_icons_es_icons_LoadingOutlined__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/icons/es/icons/LoadingOutlined */ "./node_modules/@ant-design/icons/es/icons/LoadingOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_ExclamationCircleFilled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ant-design/icons/es/icons/ExclamationCircleFilled */ "./node_modules/@ant-design/icons/es/icons/ExclamationCircleFilled.js"); /* harmony import */ var _ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseCircleFilled */ "./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js"); /* harmony import */ var _ant_design_icons_es_icons_CheckCircleFilled__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ant-design/icons/es/icons/CheckCircleFilled */ "./node_modules/@ant-design/icons/es/icons/CheckCircleFilled.js"); /* harmony import */ var _ant_design_icons_es_icons_InfoCircleFilled__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ant-design/icons/es/icons/InfoCircleFilled */ "./node_modules/@ant-design/icons/es/icons/InfoCircleFilled.js"); /* harmony import */ var _hooks_useMessage__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./hooks/useMessage */ "./components/message/hooks/useMessage.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var messageInstance; var defaultDuration = 3; var defaultTop; var key = 1; var localPrefixCls = ''; var transitionName = 'move-up'; var hasTransitionName = false; var getContainer; var maxCount; var rtl = false; function getKeyThenIncreaseKey() { return key++; } function setMessageConfig(options) { if (options.top !== undefined) { defaultTop = options.top; messageInstance = null; // delete messageInstance for new defaultTop } if (options.duration !== undefined) { defaultDuration = options.duration; } if (options.prefixCls !== undefined) { localPrefixCls = options.prefixCls; } if (options.getContainer !== undefined) { getContainer = options.getContainer; } if (options.transitionName !== undefined) { transitionName = options.transitionName; messageInstance = null; // delete messageInstance for new transitionName hasTransitionName = true; } if (options.maxCount !== undefined) { maxCount = options.maxCount; messageInstance = null; } if (options.rtl !== undefined) { rtl = options.rtl; } } function getRCNotificationInstance(args, callback) { var customizePrefixCls = args.prefixCls; var _globalConfig = Object(_config_provider__WEBPACK_IMPORTED_MODULE_11__[/* globalConfig */ "e"])(), getPrefixCls = _globalConfig.getPrefixCls, getRootPrefixCls = _globalConfig.getRootPrefixCls; var prefixCls = getPrefixCls('message', customizePrefixCls || localPrefixCls); var rootPrefixCls = getRootPrefixCls(args.rootPrefixCls, prefixCls); if (messageInstance) { callback({ prefixCls: prefixCls, rootPrefixCls: rootPrefixCls, instance: messageInstance }); return; } var instanceConfig = { prefixCls: prefixCls, transitionName: hasTransitionName ? transitionName : "".concat(rootPrefixCls, "-").concat(transitionName), style: { top: defaultTop }, getContainer: getContainer, maxCount: maxCount }; rc_notification__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].newInstance(instanceConfig, function (instance) { if (messageInstance) { callback({ prefixCls: prefixCls, rootPrefixCls: rootPrefixCls, instance: messageInstance }); return; } messageInstance = instance; if (false) {} callback({ prefixCls: prefixCls, rootPrefixCls: rootPrefixCls, instance: instance }); }); } var typeToIcon = { info: _ant_design_icons_es_icons_InfoCircleFilled__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], success: _ant_design_icons_es_icons_CheckCircleFilled__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], error: _ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], warning: _ant_design_icons_es_icons_ExclamationCircleFilled__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], loading: _ant_design_icons_es_icons_LoadingOutlined__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"] }; function getRCNoticeProps(args, prefixCls) { var _classNames; var duration = args.duration !== undefined ? args.duration : defaultDuration; var IconComponent = typeToIcon[args.type]; var messageClass = classnames__WEBPACK_IMPORTED_MODULE_3___default()("".concat(prefixCls, "-custom-content"), (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(args.type), args.type), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), rtl === true), _classNames)); return { key: args.key, duration: duration, style: args.style || {}, className: args.className, content: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: messageClass }, args.icon || IconComponent && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](IconComponent, null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", null, args.content)), onClose: args.onClose, onClick: args.onClick }; } function notice(args) { var target = args.key || key++; var closePromise = new Promise(function (resolve) { var callback = function callback() { if (typeof args.onClose === 'function') { args.onClose(); } return resolve(true); }; getRCNotificationInstance(args, function (_ref) { var prefixCls = _ref.prefixCls, instance = _ref.instance; instance.notice(getRCNoticeProps(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, args), { key: target, onClose: callback }), prefixCls)); }); }); var result = function result() { if (messageInstance) { messageInstance.removeNotice(target); } }; result.then = function (filled, rejected) { return closePromise.then(filled, rejected); }; result.promise = closePromise; return result; } function isArgsProps(content) { return Object.prototype.toString.call(content) === '[object Object]' && !!content.content; } var api = { open: notice, config: setMessageConfig, destroy: function destroy(messageKey) { if (messageInstance) { if (messageKey) { var _messageInstance = messageInstance, removeNotice = _messageInstance.removeNotice; removeNotice(messageKey); } else { var _messageInstance2 = messageInstance, destroy = _messageInstance2.destroy; destroy(); messageInstance = null; } } } }; function attachTypeApi(originalApi, type) { originalApi[type] = function (content, duration, onClose) { if (isArgsProps(content)) { return originalApi.open(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, content), { type: type })); } if (typeof duration === 'function') { onClose = duration; duration = undefined; } return originalApi.open({ content: content, duration: duration, type: type, onClose: onClose }); }; } ['success', 'info', 'warning', 'error', 'loading'].forEach(function (type) { return attachTypeApi(api, type); }); api.warn = api.warning; api.useMessage = Object(_hooks_useMessage__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(getRCNotificationInstance, getRCNoticeProps); /** @private test Only function. Not work on production */ var getInstance = function getInstance() { return false ? undefined : null; }; /* harmony default export */ __webpack_exports__["b"] = (api); /***/ }), /***/ "./components/message/style/index.less": /*!*********************************************!*\ !*** ./components/message/style/index.less ***! \*********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/message/style/index.tsx": /*!********************************************!*\ !*** ./components/message/style/index.tsx ***! \********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/message/style/index.less"); /***/ }), /***/ "./components/modal/ActionButton.tsx": /*!*******************************************!*\ !*** ./components/modal/ActionButton.tsx ***! \*******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../button */ "./components/button/index.tsx"); /* harmony import */ var _button_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../button/button */ "./components/button/button.tsx"); var ActionButton = function ActionButton(props) { var clickedRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](false); var ref = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](); var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"](false), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_React$useState, 2), loading = _React$useState2[0], setLoading = _React$useState2[1]; react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { var timeoutId; if (props.autoFocus) { var $this = ref.current; timeoutId = setTimeout(function () { return $this.focus(); }); } return function () { if (timeoutId) { clearTimeout(timeoutId); } }; }, []); var handlePromiseOnOk = function handlePromiseOnOk(returnValueOfOnOk) { var closeModal = props.closeModal; if (!returnValueOfOnOk || !returnValueOfOnOk.then) { return; } setLoading(true); returnValueOfOnOk.then(function () { // It's unnecessary to set loading=false, for the Modal will be unmounted after close. // setState({ loading: false }); closeModal.apply(void 0, arguments); }, function (e) { // Emit error when catch promise reject // eslint-disable-next-line no-console console.error(e); // See: https://github.com/ant-design/ant-design/issues/6183 setLoading(false); clickedRef.current = false; }); }; var onClick = function onClick() { var actionFn = props.actionFn, closeModal = props.closeModal; if (clickedRef.current) { return; } clickedRef.current = true; if (!actionFn) { closeModal(); return; } var returnValueOfOnOk; if (actionFn.length) { returnValueOfOnOk = actionFn(closeModal); // https://github.com/ant-design/ant-design/issues/23358 clickedRef.current = false; } else { returnValueOfOnOk = actionFn(); if (!returnValueOfOnOk) { closeModal(); return; } } handlePromiseOnOk(returnValueOfOnOk); }; var type = props.type, children = props.children, prefixCls = props.prefixCls, buttonProps = props.buttonProps; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_button__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, Object(_button_button__WEBPACK_IMPORTED_MODULE_4__[/* convertLegacyProps */ "a"])(type), { onClick: onClick, loading: loading, prefixCls: prefixCls }, buttonProps, { ref: ref }), children); }; /* harmony default export */ __webpack_exports__["a"] = (ActionButton); /***/ }), /***/ "./components/modal/ConfirmDialog.tsx": /*!********************************************!*\ !*** ./components/modal/ConfirmDialog.tsx ***! \********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _Modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Modal */ "./components/modal/Modal.tsx"); /* harmony import */ var _ActionButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ActionButton */ "./components/modal/ActionButton.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_util/motion */ "./components/_util/motion.tsx"); var ConfirmDialog = function ConfirmDialog(props) { var icon = props.icon, onCancel = props.onCancel, onOk = props.onOk, close = props.close, zIndex = props.zIndex, afterClose = props.afterClose, visible = props.visible, keyboard = props.keyboard, centered = props.centered, getContainer = props.getContainer, maskStyle = props.maskStyle, okText = props.okText, okButtonProps = props.okButtonProps, cancelText = props.cancelText, cancelButtonProps = props.cancelButtonProps, direction = props.direction, prefixCls = props.prefixCls, rootPrefixCls = props.rootPrefixCls, bodyStyle = props.bodyStyle, _props$closable = props.closable, closable = _props$closable === void 0 ? false : _props$closable, closeIcon = props.closeIcon, modalRender = props.modalRender, focusTriggerAfterClose = props.focusTriggerAfterClose; if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(!(typeof icon === 'string' && icon.length > 2), 'Modal', "`icon` is using ReactNode instead of string naming in v4. Please check `".concat(icon, "` at https://ant.design/components/icon")); // 支持传入{ icon: null }来隐藏`Modal.confirm`默认的Icon var okType = props.okType || 'primary'; var contentPrefixCls = "".concat(prefixCls, "-confirm"); // 默认为 true,保持向下兼容 var okCancel = 'okCancel' in props ? props.okCancel : true; var width = props.width || 416; var style = props.style || {}; var mask = props.mask === undefined ? true : props.mask; // 默认为 false,保持旧版默认行为 var maskClosable = props.maskClosable === undefined ? false : props.maskClosable; var autoFocusButton = props.autoFocusButton === null ? false : props.autoFocusButton || 'ok'; var classString = classnames__WEBPACK_IMPORTED_MODULE_2___default()(contentPrefixCls, "".concat(contentPrefixCls, "-").concat(props.type), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(contentPrefixCls, "-rtl"), direction === 'rtl'), props.className); var cancelButton = okCancel && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_ActionButton__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], { actionFn: onCancel, closeModal: close, autoFocus: autoFocusButton === 'cancel', buttonProps: cancelButtonProps, prefixCls: "".concat(rootPrefixCls, "-btn") }, cancelText); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_Modal__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], { prefixCls: prefixCls, className: classString, wrapClassName: classnames__WEBPACK_IMPORTED_MODULE_2___default()(Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(contentPrefixCls, "-centered"), !!props.centered)), onCancel: function onCancel() { return close({ triggerCancel: true }); }, visible: visible, title: "", footer: "", transitionName: Object(_util_motion__WEBPACK_IMPORTED_MODULE_7__[/* getTransitionName */ "b"])(rootPrefixCls, 'zoom', props.transitionName), maskTransitionName: Object(_util_motion__WEBPACK_IMPORTED_MODULE_7__[/* getTransitionName */ "b"])(rootPrefixCls, 'fade', props.maskTransitionName), mask: mask, maskClosable: maskClosable, maskStyle: maskStyle, style: style, width: width, zIndex: zIndex, afterClose: afterClose, keyboard: keyboard, centered: centered, getContainer: getContainer, closable: closable, closeIcon: closeIcon, modalRender: modalRender, focusTriggerAfterClose: focusTriggerAfterClose }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(contentPrefixCls, "-body-wrapper") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_6__[/* default */ "d"], { prefixCls: rootPrefixCls }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(contentPrefixCls, "-body"), style: bodyStyle }, icon, props.title === undefined ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("span", { className: "".concat(contentPrefixCls, "-title") }, props.title), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(contentPrefixCls, "-content") }, props.content))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(contentPrefixCls, "-btns") }, cancelButton, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_ActionButton__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], { type: okType, actionFn: onOk, closeModal: close, autoFocus: autoFocusButton === 'ok', buttonProps: okButtonProps, prefixCls: "".concat(rootPrefixCls, "-btn") }, okText)))); }; /* harmony default export */ __webpack_exports__["a"] = (ConfirmDialog); /***/ }), /***/ "./components/modal/Modal.tsx": /*!************************************!*\ !*** ./components/modal/Modal.tsx ***! \************************************/ /*! exports provided: destroyFns, default */ /*! exports used: default, destroyFns */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return destroyFns; }); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var rc_dialog__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-dialog */ "./node_modules/rc-dialog/es/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseOutlined */ "./node_modules/@ant-design/icons/es/icons/CloseOutlined.js"); /* harmony import */ var _useModal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./useModal */ "./components/modal/useModal/index.tsx"); /* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./locale */ "./components/modal/locale.tsx"); /* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../button */ "./components/button/index.tsx"); /* harmony import */ var _button_button__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../button/button */ "./components/button/button.tsx"); /* harmony import */ var _locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../locale-provider/LocaleReceiver */ "./components/locale-provider/LocaleReceiver.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_styleChecker__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../_util/styleChecker */ "./components/_util/styleChecker.tsx"); /* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../_util/motion */ "./components/_util/motion.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var mousePosition; var destroyFns = []; // ref: https://github.com/ant-design/ant-design/issues/15795 var getClickPosition = function getClickPosition(e) { mousePosition = { x: e.pageX, y: e.pageY }; // 100ms 内发生过点击事件,则从点击位置动画展示 // 否则直接 zoom 展示 // 这样可以兼容非点击方式展开 setTimeout(function () { mousePosition = null; }, 100); }; // 只有点击事件支持从鼠标位置动画展开 if (Object(_util_styleChecker__WEBPACK_IMPORTED_MODULE_12__[/* canUseDocElement */ "a"])()) { document.documentElement.addEventListener('click', getClickPosition, true); } var Modal = function Modal(props) { var _classNames; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_11__[/* ConfigContext */ "b"]), getContextPopupContainer = _React$useContext.getPopupContainer, getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var handleCancel = function handleCancel(e) { var onCancel = props.onCancel; onCancel === null || onCancel === void 0 ? void 0 : onCancel(e); }; var handleOk = function handleOk(e) { var onOk = props.onOk; onOk === null || onOk === void 0 ? void 0 : onOk(e); }; var renderFooter = function renderFooter(locale) { var okText = props.okText, okType = props.okType, cancelText = props.cancelText, confirmLoading = props.confirmLoading; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](react__WEBPACK_IMPORTED_MODULE_2__["Fragment"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_button__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ onClick: handleCancel }, props.cancelButtonProps), cancelText || locale.cancelText), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_button__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, Object(_button_button__WEBPACK_IMPORTED_MODULE_9__[/* convertLegacyProps */ "a"])(okType), { loading: confirmLoading, onClick: handleOk }, props.okButtonProps), okText || locale.okText)); }; var customizePrefixCls = props.prefixCls, footer = props.footer, visible = props.visible, wrapClassName = props.wrapClassName, centered = props.centered, getContainer = props.getContainer, closeIcon = props.closeIcon, _props$focusTriggerAf = props.focusTriggerAfterClose, focusTriggerAfterClose = _props$focusTriggerAf === void 0 ? true : _props$focusTriggerAf, restProps = __rest(props, ["prefixCls", "footer", "visible", "wrapClassName", "centered", "getContainer", "closeIcon", "focusTriggerAfterClose"]); var prefixCls = getPrefixCls('modal', customizePrefixCls); var rootPrefixCls = getPrefixCls(); var defaultFooter = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], { componentName: "Modal", defaultLocale: Object(_locale__WEBPACK_IMPORTED_MODULE_7__[/* getConfirmLocale */ "b"])() }, renderFooter); var closeIconToRender = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { className: "".concat(prefixCls, "-close-x") }, closeIcon || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], { className: "".concat(prefixCls, "-close-icon") })); var wrapClassNameExtended = classnames__WEBPACK_IMPORTED_MODULE_4___default()(wrapClassName, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-centered"), !!centered), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-wrap-rtl"), direction === 'rtl'), _classNames)); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](rc_dialog__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, restProps, { getContainer: getContainer === undefined ? getContextPopupContainer : getContainer, prefixCls: prefixCls, wrapClassName: wrapClassNameExtended, footer: footer === undefined ? defaultFooter : footer, visible: visible, mousePosition: mousePosition, onClose: handleCancel, closeIcon: closeIconToRender, focusTriggerAfterClose: focusTriggerAfterClose, transitionName: Object(_util_motion__WEBPACK_IMPORTED_MODULE_13__[/* getTransitionName */ "b"])(rootPrefixCls, 'zoom', props.transitionName), maskTransitionName: Object(_util_motion__WEBPACK_IMPORTED_MODULE_13__[/* getTransitionName */ "b"])(rootPrefixCls, 'fade', props.maskTransitionName) })); }; Modal.useModal = _useModal__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"]; Modal.defaultProps = { width: 520, confirmLoading: false, visible: false, okType: 'primary' }; /* harmony default export */ __webpack_exports__["a"] = (Modal); /***/ }), /***/ "./components/modal/confirm.tsx": /*!**************************************!*\ !*** ./components/modal/confirm.tsx ***! \**************************************/ /*! exports provided: default, withWarn, withInfo, withSuccess, withError, withConfirm, modalGlobalConfig */ /*! exports used: default, modalGlobalConfig, withConfirm, withError, withInfo, withSuccess, withWarn */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return confirm; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return withWarn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return withInfo; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return withSuccess; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return withError; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return withConfirm; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return modalGlobalConfig; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ "react-dom"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _ant_design_icons_es_icons_InfoCircleOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons/es/icons/InfoCircleOutlined */ "./node_modules/@ant-design/icons/es/icons/InfoCircleOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_CheckCircleOutlined__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ant-design/icons/es/icons/CheckCircleOutlined */ "./node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_CloseCircleOutlined__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseCircleOutlined */ "./node_modules/@ant-design/icons/es/icons/CloseCircleOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_ExclamationCircleOutlined__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ant-design/icons/es/icons/ExclamationCircleOutlined */ "./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js"); /* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./locale */ "./components/modal/locale.tsx"); /* harmony import */ var _Modal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Modal */ "./components/modal/Modal.tsx"); /* harmony import */ var _ConfirmDialog__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ConfirmDialog */ "./components/modal/ConfirmDialog.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var defaultRootPrefixCls = ''; function getRootPrefixCls() { return defaultRootPrefixCls; } function confirm(config) { var div = document.createElement('div'); document.body.appendChild(div); // eslint-disable-next-line @typescript-eslint/no-use-before-define var currentConfig = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, config), { close: close, visible: true }); function destroy() { var unmountResult = react_dom__WEBPACK_IMPORTED_MODULE_2__["unmountComponentAtNode"](div); if (unmountResult && div.parentNode) { div.parentNode.removeChild(div); } for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var triggerCancel = args.some(function (param) { return param && param.triggerCancel; }); if (config.onCancel && triggerCancel) { config.onCancel.apply(config, args); } for (var i = 0; i < _Modal__WEBPACK_IMPORTED_MODULE_8__[/* destroyFns */ "b"].length; i++) { var fn = _Modal__WEBPACK_IMPORTED_MODULE_8__[/* destroyFns */ "b"][i]; // eslint-disable-next-line @typescript-eslint/no-use-before-define if (fn === close) { _Modal__WEBPACK_IMPORTED_MODULE_8__[/* destroyFns */ "b"].splice(i, 1); break; } } } function render(_a) { var okText = _a.okText, cancelText = _a.cancelText, customizePrefixCls = _a.prefixCls, props = __rest(_a, ["okText", "cancelText", "prefixCls"]); /** * https://github.com/ant-design/ant-design/issues/23623 * * Sync render blocks React event. Let's make this async. */ setTimeout(function () { var runtimeLocale = Object(_locale__WEBPACK_IMPORTED_MODULE_7__[/* getConfirmLocale */ "b"])(); var _globalConfig = Object(_config_provider__WEBPACK_IMPORTED_MODULE_10__[/* globalConfig */ "e"])(), getPrefixCls = _globalConfig.getPrefixCls; // because Modal.config  set rootPrefixCls, which is different from other components var rootPrefixCls = getPrefixCls(undefined, getRootPrefixCls()); var prefixCls = customizePrefixCls || "".concat(rootPrefixCls, "-modal"); react_dom__WEBPACK_IMPORTED_MODULE_2__["render"]( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_ConfirmDialog__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, props, { prefixCls: prefixCls, rootPrefixCls: rootPrefixCls, okText: okText || (props.okCancel ? runtimeLocale.okText : runtimeLocale.justOkText), cancelText: cancelText || runtimeLocale.cancelText })), div); }); } function close() { var _this = this; for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } currentConfig = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, currentConfig), { visible: false, afterClose: function afterClose() { if (typeof config.afterClose === 'function') { config.afterClose(); } destroy.apply(_this, args); } }); render(currentConfig); } function update(configUpdate) { if (typeof configUpdate === 'function') { currentConfig = configUpdate(currentConfig); } else { currentConfig = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, currentConfig), configUpdate); } render(currentConfig); } render(currentConfig); _Modal__WEBPACK_IMPORTED_MODULE_8__[/* destroyFns */ "b"].push(close); return { destroy: close, update: update }; } function withWarn(props) { return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_ant_design_icons_es_icons_ExclamationCircleOutlined__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], null), okCancel: false }, props), { type: 'warning' }); } function withInfo(props) { return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_ant_design_icons_es_icons_InfoCircleOutlined__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], null), okCancel: false }, props), { type: 'info' }); } function withSuccess(props) { return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_ant_design_icons_es_icons_CheckCircleOutlined__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], null), okCancel: false }, props), { type: 'success' }); } function withError(props) { return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_ant_design_icons_es_icons_CloseCircleOutlined__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], null), okCancel: false }, props), { type: 'error' }); } function withConfirm(props) { return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_ant_design_icons_es_icons_ExclamationCircleOutlined__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], null), okCancel: true }, props), { type: 'confirm' }); } function modalGlobalConfig(_ref) { var rootPrefixCls = _ref.rootPrefixCls; if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"])(false, 'Modal', 'Modal.config is deprecated. Please use ConfigProvider.config instead.'); defaultRootPrefixCls = rootPrefixCls; } /***/ }), /***/ "./components/modal/index.tsx": /*!************************************!*\ !*** ./components/modal/index.tsx ***! \************************************/ /*! exports provided: ActionButtonProps, ModalProps, ModalFuncProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _Modal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Modal */ "./components/modal/Modal.tsx"); /* harmony import */ var _confirm__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./confirm */ "./components/modal/confirm.tsx"); /* harmony import */ var _ActionButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ActionButton */ "./components/modal/ActionButton.tsx"); function modalWarn(props) { return Object(_confirm__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_confirm__WEBPACK_IMPORTED_MODULE_1__[/* withWarn */ "g"])(props)); } var Modal = _Modal__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]; Modal.info = function infoFn(props) { return Object(_confirm__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_confirm__WEBPACK_IMPORTED_MODULE_1__[/* withInfo */ "e"])(props)); }; Modal.success = function successFn(props) { return Object(_confirm__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_confirm__WEBPACK_IMPORTED_MODULE_1__[/* withSuccess */ "f"])(props)); }; Modal.error = function errorFn(props) { return Object(_confirm__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_confirm__WEBPACK_IMPORTED_MODULE_1__[/* withError */ "d"])(props)); }; Modal.warning = modalWarn; Modal.warn = modalWarn; Modal.confirm = function confirmFn(props) { return Object(_confirm__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_confirm__WEBPACK_IMPORTED_MODULE_1__[/* withConfirm */ "c"])(props)); }; Modal.destroyAll = function destroyAllFn() { while (_Modal__WEBPACK_IMPORTED_MODULE_0__[/* destroyFns */ "b"].length) { var close = _Modal__WEBPACK_IMPORTED_MODULE_0__[/* destroyFns */ "b"].pop(); if (close) { close(); } } }; Modal.config = _confirm__WEBPACK_IMPORTED_MODULE_1__[/* modalGlobalConfig */ "b"]; /* harmony default export */ __webpack_exports__["a"] = (Modal); /***/ }), /***/ "./components/modal/locale.tsx": /*!*************************************!*\ !*** ./components/modal/locale.tsx ***! \*************************************/ /*! exports provided: changeConfirmLocale, getConfirmLocale */ /*! exports used: changeConfirmLocale, getConfirmLocale */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return changeConfirmLocale; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getConfirmLocale; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _locale_default__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../locale/default */ "./components/locale/default.tsx"); var runtimeLocale = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, _locale_default__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].Modal); function changeConfirmLocale(newLocale) { if (newLocale) { runtimeLocale = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, runtimeLocale), newLocale); } else { runtimeLocale = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, _locale_default__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].Modal); } } function getConfirmLocale() { return runtimeLocale; } /***/ }), /***/ "./components/modal/style/index.less": /*!*******************************************!*\ !*** ./components/modal/style/index.less ***! \*******************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/modal/style/index.tsx": /*!******************************************!*\ !*** ./components/modal/style/index.tsx ***! \******************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/modal/style/index.less"); /* harmony import */ var _button_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../button/style */ "./components/button/style/index.tsx"); // style dependencies /***/ }), /***/ "./components/modal/useModal/HookModal.tsx": /*!*************************************************!*\ !*** ./components/modal/useModal/HookModal.tsx ***! \*************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _ConfirmDialog__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ConfirmDialog */ "./components/modal/ConfirmDialog.tsx"); /* harmony import */ var _locale_default__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../locale/default */ "./components/locale/default.tsx"); /* harmony import */ var _locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../locale-provider/LocaleReceiver */ "./components/locale-provider/LocaleReceiver.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../config-provider */ "./components/config-provider/index.tsx"); var HookModal = function HookModal(_ref, ref) { var afterClose = _ref.afterClose, config = _ref.config; var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"](true), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_React$useState, 2), visible = _React$useState2[0], setVisible = _React$useState2[1]; var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_2__["useState"](config), _React$useState4 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_React$useState3, 2), innerConfig = _React$useState4[0], setInnerConfig = _React$useState4[1]; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_6__[/* ConfigContext */ "b"]), direction = _React$useContext.direction, getPrefixCls = _React$useContext.getPrefixCls; var prefixCls = getPrefixCls('modal'); var rootPrefixCls = getPrefixCls(); function close() { setVisible(false); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var triggerCancel = args.some(function (param) { return param && param.triggerCancel; }); if (innerConfig.onCancel && triggerCancel) { innerConfig.onCancel(); } } react__WEBPACK_IMPORTED_MODULE_2__["useImperativeHandle"](ref, function () { return { destroy: close, update: function update(newConfig) { setInnerConfig(function (originConfig) { return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, originConfig), newConfig); }); } }; }); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], { componentName: "Modal", defaultLocale: _locale_default__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].Modal }, function (modalLocale) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ConfirmDialog__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ prefixCls: prefixCls, rootPrefixCls: rootPrefixCls }, innerConfig, { close: close, visible: visible, afterClose: afterClose, okText: innerConfig.okText || (innerConfig.okCancel ? modalLocale.okText : modalLocale.justOkText), direction: direction, cancelText: innerConfig.cancelText || modalLocale.cancelText })); }); }; /* harmony default export */ __webpack_exports__["a"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](HookModal)); /***/ }), /***/ "./components/modal/useModal/index.tsx": /*!*********************************************!*\ !*** ./components/modal/useModal/index.tsx ***! \*********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useModal; }); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _util_hooks_usePatchElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../_util/hooks/usePatchElement */ "./components/_util/hooks/usePatchElement.tsx"); /* harmony import */ var _HookModal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./HookModal */ "./components/modal/useModal/HookModal.tsx"); /* harmony import */ var _confirm__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../confirm */ "./components/modal/confirm.tsx"); var uuid = 0; var ElementsHolder = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["memo"]( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function (_props, ref) { var _usePatchElement = Object(_util_hooks_usePatchElement__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(), _usePatchElement2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_usePatchElement, 2), elements = _usePatchElement2[0], patchElement = _usePatchElement2[1]; react__WEBPACK_IMPORTED_MODULE_2__["useImperativeHandle"](ref, function () { return { patchElement: patchElement }; }, []); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](react__WEBPACK_IMPORTED_MODULE_2__["Fragment"], null, elements); })); function useModal() { var holderRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](null); // ========================== Effect ========================== var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"]([]), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_React$useState, 2), actionQueue = _React$useState2[0], setActionQueue = _React$useState2[1]; react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { if (actionQueue.length) { var cloneQueue = Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(actionQueue); cloneQueue.forEach(function (action) { action(); }); setActionQueue([]); } }, [actionQueue]); // =========================== Hook =========================== var getConfirmFunc = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function (withFunc) { return function hookConfirm(config) { var _a; uuid += 1; var modalRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createRef"](); var closeFunc; var modal = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_HookModal__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], { key: "modal-".concat(uuid), config: withFunc(config), ref: modalRef, afterClose: function afterClose() { closeFunc(); } }); closeFunc = (_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.patchElement(modal); return { destroy: function destroy() { function destroyAction() { var _a; (_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.destroy(); } if (modalRef.current) { destroyAction(); } else { setActionQueue(function (prev) { return [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(prev), [destroyAction]); }); } }, update: function update(newConfig) { function updateAction() { var _a; (_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.update(newConfig); } if (modalRef.current) { updateAction(); } else { setActionQueue(function (prev) { return [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(prev), [updateAction]); }); } } }; }; }, []); var fns = react__WEBPACK_IMPORTED_MODULE_2__["useMemo"](function () { return { info: getConfirmFunc(_confirm__WEBPACK_IMPORTED_MODULE_5__[/* withInfo */ "e"]), success: getConfirmFunc(_confirm__WEBPACK_IMPORTED_MODULE_5__[/* withSuccess */ "f"]), error: getConfirmFunc(_confirm__WEBPACK_IMPORTED_MODULE_5__[/* withError */ "d"]), warning: getConfirmFunc(_confirm__WEBPACK_IMPORTED_MODULE_5__[/* withWarn */ "g"]), confirm: getConfirmFunc(_confirm__WEBPACK_IMPORTED_MODULE_5__[/* withConfirm */ "c"]) }; }, []); // eslint-disable-next-line react/jsx-key return [fns, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](ElementsHolder, { ref: holderRef })]; } /***/ }), /***/ "./components/notification/hooks/useNotification.tsx": /*!***********************************************************!*\ !*** ./components/notification/hooks/useNotification.tsx ***! \***********************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createUseNotification; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var rc_notification_es_useNotification__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-notification/es/useNotification */ "./node_modules/rc-notification/es/useNotification.js"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../config-provider */ "./components/config-provider/index.tsx"); function createUseNotification(getNotificationInstance, getRCNoticeProps) { var useNotification = function useNotification() { // We can only get content by render var getPrefixCls; // We create a proxy to handle delay created instance var innerInstance = null; var proxy = { add: function add(noticeProps, holderCallback) { innerInstance === null || innerInstance === void 0 ? void 0 : innerInstance.component.add(noticeProps, holderCallback); } }; var _useRCNotification = Object(rc_notification_es_useNotification__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(proxy), _useRCNotification2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_useRCNotification, 2), hookNotify = _useRCNotification2[0], holder = _useRCNotification2[1]; function notify(args) { var customizePrefixCls = args.prefixCls; var mergedPrefixCls = getPrefixCls('notification', customizePrefixCls); getNotificationInstance(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, args), { prefixCls: mergedPrefixCls }), function (_ref) { var prefixCls = _ref.prefixCls, instance = _ref.instance; innerInstance = instance; hookNotify(getRCNoticeProps(args, prefixCls)); }); } // Fill functions var hookApiRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"]({}); hookApiRef.current.open = notify; ['success', 'info', 'warning', 'error'].forEach(function (type) { hookApiRef.current[type] = function (args) { return hookApiRef.current.open(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, args), { type: type })); }; }); return [hookApiRef.current, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_4__[/* ConfigConsumer */ "a"], { key: "holder" }, function (context) { getPrefixCls = context.getPrefixCls; return holder; })]; }; return useNotification; } /***/ }), /***/ "./components/notification/index.tsx": /*!*******************************************!*\ !*** ./components/notification/index.tsx ***! \*******************************************/ /*! exports provided: getInstance, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export getInstance */ /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var rc_notification__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-notification */ "./node_modules/rc-notification/es/index.js"); /* harmony import */ var _ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseOutlined */ "./node_modules/@ant-design/icons/es/icons/CloseOutlined.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _ant_design_icons_es_icons_CheckCircleOutlined__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ant-design/icons/es/icons/CheckCircleOutlined */ "./node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_CloseCircleOutlined__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseCircleOutlined */ "./node_modules/@ant-design/icons/es/icons/CloseCircleOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_ExclamationCircleOutlined__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ant-design/icons/es/icons/ExclamationCircleOutlined */ "./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_InfoCircleOutlined__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @ant-design/icons/es/icons/InfoCircleOutlined */ "./node_modules/@ant-design/icons/es/icons/InfoCircleOutlined.js"); /* harmony import */ var _hooks_useNotification__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./hooks/useNotification */ "./components/notification/hooks/useNotification.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var notificationInstance = {}; var defaultDuration = 4.5; var defaultTop = 24; var defaultBottom = 24; var defaultPrefixCls = ''; var defaultPlacement = 'topRight'; var defaultGetContainer; var defaultCloseIcon; var rtl = false; function setNotificationConfig(options) { var duration = options.duration, placement = options.placement, bottom = options.bottom, top = options.top, getContainer = options.getContainer, closeIcon = options.closeIcon, prefixCls = options.prefixCls; if (prefixCls !== undefined) { defaultPrefixCls = prefixCls; } if (duration !== undefined) { defaultDuration = duration; } if (placement !== undefined) { defaultPlacement = placement; } else if (options.rtl) { defaultPlacement = 'topLeft'; } if (bottom !== undefined) { defaultBottom = bottom; } if (top !== undefined) { defaultTop = top; } if (getContainer !== undefined) { defaultGetContainer = getContainer; } if (closeIcon !== undefined) { defaultCloseIcon = closeIcon; } if (options.rtl !== undefined) { rtl = options.rtl; } } function getPlacementStyle(placement) { var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultTop; var bottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultBottom; var style; switch (placement) { case 'topLeft': style = { left: 0, top: top, bottom: 'auto' }; break; case 'topRight': style = { right: 0, top: top, bottom: 'auto' }; break; case 'bottomLeft': style = { left: 0, top: 'auto', bottom: bottom }; break; default: style = { right: 0, top: 'auto', bottom: bottom }; break; } return style; } function getNotificationInstance(args, callback) { var _args$placement = args.placement, placement = _args$placement === void 0 ? defaultPlacement : _args$placement, top = args.top, bottom = args.bottom, _args$getContainer = args.getContainer, getContainer = _args$getContainer === void 0 ? defaultGetContainer : _args$getContainer, _args$closeIcon = args.closeIcon, closeIcon = _args$closeIcon === void 0 ? defaultCloseIcon : _args$closeIcon, customizePrefixCls = args.prefixCls; var _globalConfig = Object(_config_provider__WEBPACK_IMPORTED_MODULE_12__[/* globalConfig */ "e"])(), getPrefixCls = _globalConfig.getPrefixCls; var prefixCls = getPrefixCls('notification', customizePrefixCls || defaultPrefixCls); var cacheKey = "".concat(prefixCls, "-").concat(placement); var cacheInstance = notificationInstance[cacheKey]; if (cacheInstance) { Promise.resolve(cacheInstance).then(function (instance) { callback({ prefixCls: "".concat(prefixCls, "-notice"), instance: instance }); }); return; } var closeIconToRender = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", { className: "".concat(prefixCls, "-close-x") }, closeIcon || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], { className: "".concat(prefixCls, "-close-icon") })); var notificationClass = classnames__WEBPACK_IMPORTED_MODULE_6___default()("".concat(prefixCls, "-").concat(placement), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(prefixCls, "-rtl"), rtl === true)); notificationInstance[cacheKey] = new Promise(function (resolve) { rc_notification__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].newInstance({ prefixCls: prefixCls, className: notificationClass, style: getPlacementStyle(placement, top, bottom), getContainer: getContainer, closeIcon: closeIconToRender }, function (notification) { resolve(notification); callback({ prefixCls: "".concat(prefixCls, "-notice"), instance: notification }); }); }); } var typeToIcon = { success: _ant_design_icons_es_icons_CheckCircleOutlined__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], info: _ant_design_icons_es_icons_InfoCircleOutlined__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], error: _ant_design_icons_es_icons_CloseCircleOutlined__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], warning: _ant_design_icons_es_icons_ExclamationCircleOutlined__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"] }; function getRCNoticeProps(args, prefixCls) { var durationArg = args.duration, icon = args.icon, type = args.type, description = args.description, message = args.message, btn = args.btn, onClose = args.onClose, onClick = args.onClick, key = args.key, style = args.style, className = args.className; var duration = durationArg === undefined ? defaultDuration : durationArg; var iconNode = null; if (icon) { iconNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", { className: "".concat(prefixCls, "-icon") }, args.icon); } else if (type) { iconNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](typeToIcon[type] || null, { className: "".concat(prefixCls, "-icon ").concat(prefixCls, "-icon-").concat(type) }); } var autoMarginTag = !description && iconNode ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", { className: "".concat(prefixCls, "-message-single-line-auto-margin") }) : null; return { content: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: iconNode ? "".concat(prefixCls, "-with-icon") : '', role: "alert" }, iconNode, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(prefixCls, "-message") }, autoMarginTag, message), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(prefixCls, "-description") }, description), btn ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", { className: "".concat(prefixCls, "-btn") }, btn) : null), duration: duration, closable: true, onClose: onClose, onClick: onClick, key: key, style: style || {}, className: classnames__WEBPACK_IMPORTED_MODULE_6___default()(className, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(prefixCls, "-").concat(type), !!type)) }; } function notice(args) { getNotificationInstance(args, function (_ref) { var prefixCls = _ref.prefixCls, instance = _ref.instance; instance.notice(getRCNoticeProps(args, prefixCls)); }); } var api = { open: notice, close: function close(key) { Object.keys(notificationInstance).forEach(function (cacheKey) { return Promise.resolve(notificationInstance[cacheKey]).then(function (instance) { instance.removeNotice(key); }); }); }, config: setNotificationConfig, destroy: function destroy() { Object.keys(notificationInstance).forEach(function (cacheKey) { Promise.resolve(notificationInstance[cacheKey]).then(function (instance) { instance.destroy(); }); delete notificationInstance[cacheKey]; // lgtm[js/missing-await] }); } }; ['success', 'info', 'warning', 'error'].forEach(function (type) { api[type] = function (args) { return api.open(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, args), { type: type })); }; }); api.warn = api.warning; api.useNotification = Object(_hooks_useNotification__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"])(getNotificationInstance, getRCNoticeProps); /** @private test Only function. Not work on production */ var getInstance = function getInstance(cacheKey) { return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee() { return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: return _context.abrupt("return", false ? undefined : null); case 1: case "end": return _context.stop(); } } }, _callee); })); }; /* harmony default export */ __webpack_exports__["a"] = (api); /***/ }), /***/ "./components/notification/style/index.less": /*!**************************************************!*\ !*** ./components/notification/style/index.less ***! \**************************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/notification/style/index.tsx": /*!*************************************************!*\ !*** ./components/notification/style/index.tsx ***! \*************************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/notification/style/index.less"); /***/ }), /***/ "./components/page-header/index.tsx": /*!******************************************!*\ !*** ./components/page-header/index.tsx ***! \******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _ant_design_icons_es_icons_ArrowLeftOutlined__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ant-design/icons/es/icons/ArrowLeftOutlined */ "./node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_ArrowRightOutlined__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/icons/es/icons/ArrowRightOutlined */ "./node_modules/@ant-design/icons/es/icons/ArrowRightOutlined.js"); /* harmony import */ var rc_resize_observer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-resize-observer */ "./node_modules/rc-resize-observer/es/index.js"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _breadcrumb__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../breadcrumb */ "./components/breadcrumb/index.tsx"); /* harmony import */ var _avatar__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../avatar */ "./components/avatar/index.tsx"); /* harmony import */ var _util_transButton__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../_util/transButton */ "./components/_util/transButton.tsx"); /* harmony import */ var _locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../locale-provider/LocaleReceiver */ "./components/locale-provider/LocaleReceiver.tsx"); var renderBack = function renderBack(prefixCls, backIcon, onBack) { if (!backIcon || !onBack) { return null; } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"], { componentName: "PageHeader" }, function (_ref) { var back = _ref.back; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-back") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_util_transButton__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], { onClick: function onClick(e) { onBack === null || onBack === void 0 ? void 0 : onBack(e); }, className: "".concat(prefixCls, "-back-button"), "aria-label": back }, backIcon)); }); }; var renderBreadcrumb = function renderBreadcrumb(breadcrumb) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_breadcrumb__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], breadcrumb); }; var getBackIcon = function getBackIcon(props) { var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'ltr'; if (props.backIcon !== undefined) { return props.backIcon; } return direction === 'rtl' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_ArrowRightOutlined__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_ArrowLeftOutlined__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], null); }; var renderTitle = function renderTitle(prefixCls, props) { var direction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'ltr'; var title = props.title, avatar = props.avatar, subTitle = props.subTitle, tags = props.tags, extra = props.extra, onBack = props.onBack; var headingPrefixCls = "".concat(prefixCls, "-heading"); var hasHeading = title || subTitle || tags || extra; // If there is nothing, return a null if (!hasHeading) { return null; } var backIcon = getBackIcon(props, direction); var backIconDom = renderBack(prefixCls, backIcon, onBack); var hasTitle = backIconDom || avatar || hasHeading; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: headingPrefixCls }, hasTitle && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(headingPrefixCls, "-left") }, backIconDom, avatar && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_avatar__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], avatar), title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { className: "".concat(headingPrefixCls, "-title"), title: typeof title === 'string' ? title : undefined }, title), subTitle && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { className: "".concat(headingPrefixCls, "-sub-title"), title: typeof subTitle === 'string' ? subTitle : undefined }, subTitle), tags && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { className: "".concat(headingPrefixCls, "-tags") }, tags)), extra && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { className: "".concat(headingPrefixCls, "-extra") }, extra)); }; var renderFooter = function renderFooter(prefixCls, footer) { if (footer) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-footer") }, footer); } return null; }; var renderChildren = function renderChildren(prefixCls, children) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-content") }, children); }; var PageHeader = function PageHeader(props) { var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"](false), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_React$useState, 2), compact = _React$useState2[0], updateCompact = _React$useState2[1]; var onResize = function onResize(_ref2) { var width = _ref2.width; updateCompact(width < 768); }; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_7__[/* ConfigConsumer */ "a"], null, function (_ref3) { var _classNames; var getPrefixCls = _ref3.getPrefixCls, pageHeader = _ref3.pageHeader, direction = _ref3.direction; var customizePrefixCls = props.prefixCls, style = props.style, footer = props.footer, children = props.children, breadcrumb = props.breadcrumb, breadcrumbRender = props.breadcrumbRender, customizeClassName = props.className; var ghost = true; // Use `ghost` from `props` or from `ConfigProvider` instead. if ('ghost' in props) { ghost = props.ghost; } else if (pageHeader && 'ghost' in pageHeader) { ghost = pageHeader.ghost; } var prefixCls = getPrefixCls('page-header', customizePrefixCls); var getDefaultBreadcrumbDom = function getDefaultBreadcrumbDom() { var _a; if ((_a = breadcrumb) === null || _a === void 0 ? void 0 : _a.routes) { return renderBreadcrumb(breadcrumb); } return null; }; var defaultBreadcrumbDom = getDefaultBreadcrumbDom(); var isBreadcrumbComponent = breadcrumb && 'props' in breadcrumb; // support breadcrumbRender function var breadcrumbRenderDomFromProps = (breadcrumbRender === null || breadcrumbRender === void 0 ? void 0 : breadcrumbRender(props, defaultBreadcrumbDom)) || defaultBreadcrumbDom; var breadcrumbDom = isBreadcrumbComponent ? breadcrumb : breadcrumbRenderDomFromProps; var className = classnames__WEBPACK_IMPORTED_MODULE_3___default()(prefixCls, customizeClassName, (_classNames = { 'has-breadcrumb': !!breadcrumbDom, 'has-footer': !!footer }, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-ghost"), ghost), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-compact"), compact), _classNames)); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](rc_resize_observer__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], { onResize: onResize }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: className, style: style }, breadcrumbDom, renderTitle(prefixCls, props, direction), children && renderChildren(prefixCls, children), renderFooter(prefixCls, footer))); }); }; /* harmony default export */ __webpack_exports__["a"] = (PageHeader); /***/ }), /***/ "./components/page-header/style/index.less": /*!*************************************************!*\ !*** ./components/page-header/style/index.less ***! \*************************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/page-header/style/index.tsx": /*!************************************************!*\ !*** ./components/page-header/style/index.tsx ***! \************************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.less */ "./components/page-header/style/index.less"); /* harmony import */ var _breadcrumb_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../breadcrumb/style */ "./components/breadcrumb/style/index.tsx"); /* harmony import */ var _avatar_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../avatar/style */ "./components/avatar/style/index.tsx"); // style dependencies /***/ }), /***/ "./components/pagination/MiniSelect.tsx": /*!**********************************************!*\ !*** ./components/pagination/MiniSelect.tsx ***! \**********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../select */ "./components/select/index.tsx"); var MiniSelect = function MiniSelect(props) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_select__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ size: "small" }, props)); }; MiniSelect.Option = _select__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].Option; /* harmony default export */ __webpack_exports__["a"] = (MiniSelect); /***/ }), /***/ "./components/pagination/Pagination.tsx": /*!**********************************************!*\ !*** ./components/pagination/Pagination.tsx ***! \**********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var rc_pagination__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-pagination */ "./node_modules/rc-pagination/es/index.js"); /* harmony import */ var rc_pagination_es_locale_en_US__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-pagination/es/locale/en_US */ "./node_modules/rc-pagination/es/locale/en_US.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _ant_design_icons_es_icons_LeftOutlined__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ant-design/icons/es/icons/LeftOutlined */ "./node_modules/@ant-design/icons/es/icons/LeftOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ant-design/icons/es/icons/RightOutlined */ "./node_modules/@ant-design/icons/es/icons/RightOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_DoubleLeftOutlined__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ant-design/icons/es/icons/DoubleLeftOutlined */ "./node_modules/@ant-design/icons/es/icons/DoubleLeftOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_DoubleRightOutlined__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ant-design/icons/es/icons/DoubleRightOutlined */ "./node_modules/@ant-design/icons/es/icons/DoubleRightOutlined.js"); /* harmony import */ var _MiniSelect__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./MiniSelect */ "./components/pagination/MiniSelect.tsx"); /* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../select */ "./components/select/index.tsx"); /* harmony import */ var _locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../locale-provider/LocaleReceiver */ "./components/locale-provider/LocaleReceiver.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _grid_hooks_useBreakpoint__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../grid/hooks/useBreakpoint */ "./components/grid/hooks/useBreakpoint.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Pagination = function Pagination(_a) { var customizePrefixCls = _a.prefixCls, customizeSelectPrefixCls = _a.selectPrefixCls, className = _a.className, size = _a.size, customLocale = _a.locale, restProps = __rest(_a, ["prefixCls", "selectPrefixCls", "className", "size", "locale"]); var _useBreakpoint = Object(_grid_hooks_useBreakpoint__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"])(), xs = _useBreakpoint.xs; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_13__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var prefixCls = getPrefixCls('pagination', customizePrefixCls); var getIconsProps = function getIconsProps() { var ellipsis = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { className: "".concat(prefixCls, "-item-ellipsis") }, "\u2022\u2022\u2022"); var prevIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("button", { className: "".concat(prefixCls, "-item-link"), type: "button", tabIndex: -1 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_LeftOutlined__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], null)); var nextIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("button", { className: "".concat(prefixCls, "-item-link"), type: "button", tabIndex: -1 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], null)); var jumpPrevIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("a", { className: "".concat(prefixCls, "-item-link") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-item-container") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_DoubleLeftOutlined__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], { className: "".concat(prefixCls, "-item-link-icon") }), ellipsis)); var jumpNextIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("a", { className: "".concat(prefixCls, "-item-link") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-item-container") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_DoubleRightOutlined__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], { className: "".concat(prefixCls, "-item-link-icon") }), ellipsis)); // change arrows direction in right-to-left direction if (direction === 'rtl') { var _ref = [nextIcon, prevIcon]; prevIcon = _ref[0]; nextIcon = _ref[1]; var _ref2 = [jumpNextIcon, jumpPrevIcon]; jumpPrevIcon = _ref2[0]; jumpNextIcon = _ref2[1]; } return { prevIcon: prevIcon, nextIcon: nextIcon, jumpPrevIcon: jumpPrevIcon, jumpNextIcon: jumpNextIcon }; }; var renderPagination = function renderPagination(contextLocale) { var locale = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, contextLocale), customLocale); var isSmall = size === 'small' || !!(xs && !size && restProps.responsive); var selectPrefixCls = getPrefixCls('select', customizeSelectPrefixCls); var extendedClassName = classnames__WEBPACK_IMPORTED_MODULE_5___default()(Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ mini: isSmall }, "".concat(prefixCls, "-rtl"), direction === 'rtl'), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](rc_pagination__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, restProps, { prefixCls: prefixCls, selectPrefixCls: selectPrefixCls }, getIconsProps(), { className: extendedClassName, selectComponentClass: isSmall ? _MiniSelect__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"] : _select__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"], locale: locale })); }; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"], { componentName: "Pagination", defaultLocale: rc_pagination_es_locale_en_US__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"] }, renderPagination); }; /* harmony default export */ __webpack_exports__["a"] = (Pagination); /***/ }), /***/ "./components/pagination/index.tsx": /*!*****************************************!*\ !*** ./components/pagination/index.tsx ***! \*****************************************/ /*! exports provided: PaginationProps, PaginationConfig, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _Pagination__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Pagination */ "./components/pagination/Pagination.tsx"); /* harmony default export */ __webpack_exports__["a"] = (_Pagination__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]); /***/ }), /***/ "./components/pagination/style/index.less": /*!************************************************!*\ !*** ./components/pagination/style/index.less ***! \************************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/pagination/style/index.tsx": /*!***********************************************!*\ !*** ./components/pagination/style/index.tsx ***! \***********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/pagination/style/index.less"); /* harmony import */ var _select_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../select/style */ "./components/select/style/index.tsx"); // style dependencies // deps-lint-skip: grid /***/ }), /***/ "./components/popconfirm/index.tsx": /*!*****************************************!*\ !*** ./components/popconfirm/index.tsx ***! \*****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-util/es/hooks/useMergedState */ "./node_modules/rc-util/es/hooks/useMergedState.js"); /* harmony import */ var _ant_design_icons_es_icons_ExclamationCircleFilled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/icons/es/icons/ExclamationCircleFilled */ "./node_modules/@ant-design/icons/es/icons/ExclamationCircleFilled.js"); /* harmony import */ var rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/KeyCode */ "./node_modules/rc-util/es/KeyCode.js"); /* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../tooltip */ "./components/tooltip/index.tsx"); /* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../button */ "./components/button/index.tsx"); /* harmony import */ var _button_button__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../button/button */ "./components/button/button.tsx"); /* harmony import */ var _locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../locale-provider/LocaleReceiver */ "./components/locale-provider/LocaleReceiver.tsx"); /* harmony import */ var _locale_default__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../locale/default */ "./components/locale/default.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../_util/getRenderPropValue */ "./components/_util/getRenderPropValue.ts"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); /* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../_util/motion */ "./components/_util/motion.tsx"); var _this = undefined; var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Popconfirm = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function (props, ref) { var _useMergedState = Object(rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(false, { value: props.visible, defaultValue: props.defaultVisible }), _useMergedState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_useMergedState, 2), visible = _useMergedState2[0], setVisible = _useMergedState2[1]; var settingVisible = function settingVisible(value, e) { var _a; setVisible(value); (_a = props.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(props, value, e); }; var onConfirm = function onConfirm(e) { var _a; settingVisible(false, e); (_a = props.onConfirm) === null || _a === void 0 ? void 0 : _a.call(_this, e); }; var onCancel = function onCancel(e) { var _a; settingVisible(false, e); (_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(_this, e); }; var _onKeyDown = function onKeyDown(e) { if (e.keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].ESC && visible) { settingVisible(false, e); } }; var onVisibleChange = function onVisibleChange(value) { var disabled = props.disabled; if (disabled) { return; } settingVisible(value); }; var renderOverlay = function renderOverlay(prefixCls, popconfirmLocale) { var okButtonProps = props.okButtonProps, cancelButtonProps = props.cancelButtonProps, title = props.title, cancelText = props.cancelText, okText = props.okText, okType = props.okType, icon = props.icon; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-inner-content") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-message") }, icon, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-message-title") }, Object(_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_13__[/* getRenderPropValue */ "a"])(title))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-buttons") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_button__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ onClick: onCancel, size: "small" }, cancelButtonProps), cancelText || popconfirmLocale.cancelText), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_button__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ onClick: onConfirm }, Object(_button_button__WEBPACK_IMPORTED_MODULE_9__[/* convertLegacyProps */ "a"])(okType), { size: "small" }, okButtonProps), okText || popconfirmLocale.okText))); }; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_12__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls; var customizePrefixCls = props.prefixCls, placement = props.placement, children = props.children, overlayClassName = props.overlayClassName, restProps = __rest(props, ["prefixCls", "placement", "children", "overlayClassName"]); var prefixCls = getPrefixCls('popover', customizePrefixCls); var prefixClsConfirm = getPrefixCls('popconfirm', customizePrefixCls); var overlayClassNames = classnames__WEBPACK_IMPORTED_MODULE_3___default()(prefixClsConfirm, overlayClassName); var overlay = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], { componentName: "Popconfirm", defaultLocale: _locale_default__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].Popconfirm }, function (popconfirmLocale) { return renderOverlay(prefixCls, popconfirmLocale); }); var rootPrefixCls = getPrefixCls(); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_tooltip__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, restProps, { prefixCls: prefixCls, placement: placement, onVisibleChange: onVisibleChange, visible: visible, overlay: overlay, overlayClassName: overlayClassNames, ref: ref, transitionName: Object(_util_motion__WEBPACK_IMPORTED_MODULE_15__[/* getTransitionName */ "b"])(rootPrefixCls, 'zoom-big', props.transitionName) }), Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_14__[/* cloneElement */ "a"])(children, { onKeyDown: function onKeyDown(e) { var _a, _b; if ( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["isValidElement"](children)) { (_b = children === null || children === void 0 ? void 0 : (_a = children.props).onKeyDown) === null || _b === void 0 ? void 0 : _b.call(_a, e); } _onKeyDown(e); } })); }); Popconfirm.defaultProps = { placement: 'top', trigger: 'click', okType: 'primary', icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_ExclamationCircleFilled__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], null), disabled: false }; /* harmony default export */ __webpack_exports__["a"] = (Popconfirm); /***/ }), /***/ "./components/popconfirm/style/index.less": /*!************************************************!*\ !*** ./components/popconfirm/style/index.less ***! \************************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/popconfirm/style/index.tsx": /*!***********************************************!*\ !*** ./components/popconfirm/style/index.tsx ***! \***********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _popover_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../popover/style */ "./components/popover/style/index.tsx"); /* harmony import */ var _button_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../button/style */ "./components/button/style/index.tsx"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./index.less */ "./components/popconfirm/style/index.less"); // style dependencies // deps-lint-skip: tooltip, popover /***/ }), /***/ "./components/popover/index.tsx": /*!**************************************!*\ !*** ./components/popover/index.tsx ***! \**************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../tooltip */ "./components/tooltip/index.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../_util/getRenderPropValue */ "./components/_util/getRenderPropValue.ts"); /* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../_util/motion */ "./components/_util/motion.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Popover = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["forwardRef"](function (_a, ref) { var customizePrefixCls = _a.prefixCls, title = _a.title, content = _a.content, otherProps = __rest(_a, ["prefixCls", "title", "content"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_1__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_3__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls; var getOverlay = function getOverlay(prefixCls) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](react__WEBPACK_IMPORTED_MODULE_1__["Fragment"], null, title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(prefixCls, "-title") }, Object(_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_4__[/* getRenderPropValue */ "a"])(title)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(prefixCls, "-inner-content") }, Object(_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_4__[/* getRenderPropValue */ "a"])(content))); }; var prefixCls = getPrefixCls('popover', customizePrefixCls); var rootPrefixCls = getPrefixCls(); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_tooltip__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, otherProps, { prefixCls: prefixCls, ref: ref, overlay: getOverlay(prefixCls), transitionName: Object(_util_motion__WEBPACK_IMPORTED_MODULE_5__[/* getTransitionName */ "b"])(rootPrefixCls, 'zoom-big', otherProps.transitionName) })); }); Popover.displayName = 'Popover'; Popover.defaultProps = { placement: 'top', trigger: 'hover', mouseEnterDelay: 0.1, mouseLeaveDelay: 0.1, overlayStyle: {} }; /* harmony default export */ __webpack_exports__["a"] = (Popover); /***/ }), /***/ "./components/popover/style/index.less": /*!*********************************************!*\ !*** ./components/popover/style/index.less ***! \*********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/popover/style/index.tsx": /*!********************************************!*\ !*** ./components/popover/style/index.tsx ***! \********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/popover/style/index.less"); // style dependencies // deps-lint-skip: tooltip /***/ }), /***/ "./components/progress/Circle.tsx": /*!****************************************!*\ !*** ./components/progress/Circle.tsx ***! \****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var rc_progress__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-progress */ "./node_modules/rc-progress/es/index.js"); /* harmony import */ var _ant_design_colors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/colors */ "./node_modules/@ant-design/colors/dist/index.esm.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ "./components/progress/utils.ts"); function getPercentage(_ref) { var percent = _ref.percent, success = _ref.success, successPercent = _ref.successPercent; var ptg = Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* validProgress */ "b"])(percent); var realSuccessPercent = Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* getSuccessPercent */ "a"])({ success: success, successPercent: successPercent }); if (!realSuccessPercent) { return ptg; } return [Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* validProgress */ "b"])(realSuccessPercent), Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* validProgress */ "b"])(ptg - Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* validProgress */ "b"])(realSuccessPercent))]; } function getStrokeColor(_ref2) { var success = _ref2.success, strokeColor = _ref2.strokeColor, successPercent = _ref2.successPercent; var color = strokeColor || null; var realSuccessPercent = Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* getSuccessPercent */ "a"])({ success: success, successPercent: successPercent }); if (!realSuccessPercent) { return color; } return [_ant_design_colors__WEBPACK_IMPORTED_MODULE_3__[/* presetPrimaryColors */ "b"].green, color]; } var Circle = function Circle(props) { var prefixCls = props.prefixCls, width = props.width, strokeWidth = props.strokeWidth, trailColor = props.trailColor, strokeLinecap = props.strokeLinecap, gapPosition = props.gapPosition, gapDegree = props.gapDegree, type = props.type, children = props.children; var circleSize = width || 120; var circleStyle = { width: circleSize, height: circleSize, fontSize: circleSize * 0.15 + 6 }; var circleWidth = strokeWidth || 6; var gapPos = gapPosition || type === 'dashboard' && 'bottom' || 'top'; var getGapDegree = function getGapDegree() { // Support gapDeg = 0 when type = 'dashboard' if (gapDegree || gapDegree === 0) { return gapDegree; } if (type === 'dashboard') { return 75; } return undefined; }; // using className to style stroke color var strokeColor = getStrokeColor(props); var isGradient = Object.prototype.toString.call(strokeColor) === '[object Object]'; var wrapperClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()("".concat(prefixCls, "-inner"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(prefixCls, "-circle-gradient"), isGradient)); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: wrapperClassName, style: circleStyle }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](rc_progress__WEBPACK_IMPORTED_MODULE_2__[/* Circle */ "a"], { percent: getPercentage(props), strokeWidth: circleWidth, trailWidth: circleWidth, strokeColor: strokeColor, strokeLinecap: strokeLinecap, trailColor: trailColor, prefixCls: prefixCls, gapDegree: getGapDegree(), gapPosition: gapPos }), children); }; /* harmony default export */ __webpack_exports__["a"] = (Circle); /***/ }), /***/ "./components/progress/Line.tsx": /*!**************************************!*\ !*** ./components/progress/Line.tsx ***! \**************************************/ /*! exports provided: sortGradient, handleGradient, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export sortGradient */ /* unused harmony export handleGradient */ /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _ant_design_colors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ant-design/colors */ "./node_modules/@ant-design/colors/dist/index.esm.js"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "./components/progress/utils.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; /** * @example * { * "0%": "#afc163", * "75%": "#009900", * "50%": "green", // ====> '#afc163 0%, #66FF00 25%, #00CC00 50%, #009900 75%, #ffffff 100%' * "25%": "#66FF00", * "100%": "#ffffff" * } */ var sortGradient = function sortGradient(gradients) { var tempArr = []; Object.keys(gradients).forEach(function (key) { var formattedKey = parseFloat(key.replace(/%/g, '')); if (!isNaN(formattedKey)) { tempArr.push({ key: formattedKey, value: gradients[key] }); } }); tempArr = tempArr.sort(function (a, b) { return a.key - b.key; }); return tempArr.map(function (_ref) { var key = _ref.key, value = _ref.value; return "".concat(value, " ").concat(key, "%"); }).join(', '); }; /** * Then this man came to realize the truth: Besides six pence, there is the moon. Besides bread and * butter, there is the bug. And... Besides women, there is the code. * * @example * { * "0%": "#afc163", * "25%": "#66FF00", * "50%": "#00CC00", // ====> linear-gradient(to right, #afc163 0%, #66FF00 25%, * "75%": "#009900", // #00CC00 50%, #009900 75%, #ffffff 100%) * "100%": "#ffffff" * } */ var handleGradient = function handleGradient(strokeColor, directionConfig) { var _strokeColor$from = strokeColor.from, from = _strokeColor$from === void 0 ? _ant_design_colors__WEBPACK_IMPORTED_MODULE_2__[/* presetPrimaryColors */ "b"].blue : _strokeColor$from, _strokeColor$to = strokeColor.to, to = _strokeColor$to === void 0 ? _ant_design_colors__WEBPACK_IMPORTED_MODULE_2__[/* presetPrimaryColors */ "b"].blue : _strokeColor$to, _strokeColor$directio = strokeColor.direction, direction = _strokeColor$directio === void 0 ? directionConfig === 'rtl' ? 'to left' : 'to right' : _strokeColor$directio, rest = __rest(strokeColor, ["from", "to", "direction"]); if (Object.keys(rest).length !== 0) { var sortedGradients = sortGradient(rest); return { backgroundImage: "linear-gradient(".concat(direction, ", ").concat(sortedGradients, ")") }; } return { backgroundImage: "linear-gradient(".concat(direction, ", ").concat(from, ", ").concat(to, ")") }; }; var Line = function Line(props) { var prefixCls = props.prefixCls, directionConfig = props.direction, percent = props.percent, strokeWidth = props.strokeWidth, size = props.size, strokeColor = props.strokeColor, strokeLinecap = props.strokeLinecap, children = props.children, trailColor = props.trailColor, success = props.success; var backgroundProps = strokeColor && typeof strokeColor !== 'string' ? handleGradient(strokeColor, directionConfig) : { background: strokeColor }; var trailStyle = trailColor ? { backgroundColor: trailColor } : undefined; var percentStyle = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ width: "".concat(Object(_utils__WEBPACK_IMPORTED_MODULE_3__[/* validProgress */ "b"])(percent), "%"), height: strokeWidth || (size === 'small' ? 6 : 8), borderRadius: strokeLinecap === 'square' ? 0 : '' }, backgroundProps); var successPercent = Object(_utils__WEBPACK_IMPORTED_MODULE_3__[/* getSuccessPercent */ "a"])(props); var successPercentStyle = { width: "".concat(Object(_utils__WEBPACK_IMPORTED_MODULE_3__[/* validProgress */ "b"])(successPercent), "%"), height: strokeWidth || (size === 'small' ? 6 : 8), borderRadius: strokeLinecap === 'square' ? 0 : '', backgroundColor: success === null || success === void 0 ? void 0 : success.strokeColor }; var successSegment = successPercent !== undefined ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(prefixCls, "-success-bg"), style: successPercentStyle }) : null; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](react__WEBPACK_IMPORTED_MODULE_1__["Fragment"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(prefixCls, "-outer") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(prefixCls, "-inner"), style: trailStyle }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(prefixCls, "-bg"), style: percentStyle }), successSegment)), children); }; /* harmony default export */ __webpack_exports__["a"] = (Line); /***/ }), /***/ "./components/progress/Steps.tsx": /*!***************************************!*\ !*** ./components/progress/Steps.tsx ***! \***************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); var Steps = function Steps(props) { var size = props.size, steps = props.steps, _props$percent = props.percent, percent = _props$percent === void 0 ? 0 : _props$percent, _props$strokeWidth = props.strokeWidth, strokeWidth = _props$strokeWidth === void 0 ? 8 : _props$strokeWidth, strokeColor = props.strokeColor, trailColor = props.trailColor, prefixCls = props.prefixCls, children = props.children; var current = Math.round(steps * (percent / 100)); var stepWidth = size === 'small' ? 2 : 14; var styledSteps = []; for (var i = 0; i < steps; i += 1) { styledSteps.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { key: i, className: classnames__WEBPACK_IMPORTED_MODULE_2___default()("".concat(prefixCls, "-steps-item"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(prefixCls, "-steps-item-active"), i <= current - 1)), style: { backgroundColor: i <= current - 1 ? strokeColor : trailColor, width: stepWidth, height: strokeWidth } })); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(prefixCls, "-steps-outer") }, styledSteps, children); }; /* harmony default export */ __webpack_exports__["a"] = (Steps); /***/ }), /***/ "./components/progress/index.tsx": /*!***************************************!*\ !*** ./components/progress/index.tsx ***! \***************************************/ /*! exports provided: ProgressProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _progress__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./progress */ "./components/progress/progress.tsx"); /* harmony default export */ __webpack_exports__["a"] = (_progress__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]); /***/ }), /***/ "./components/progress/progress.tsx": /*!******************************************!*\ !*** ./components/progress/progress.tsx ***! \******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Progress; }); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var _ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseOutlined */ "./node_modules/@ant-design/icons/es/icons/CloseOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_CheckOutlined__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @ant-design/icons/es/icons/CheckOutlined */ "./node_modules/@ant-design/icons/es/icons/CheckOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_CheckCircleFilled__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @ant-design/icons/es/icons/CheckCircleFilled */ "./node_modules/@ant-design/icons/es/icons/CheckCircleFilled.js"); /* harmony import */ var _ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseCircleFilled */ "./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_type__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../_util/type */ "./components/_util/type.ts"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _Line__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Line */ "./components/progress/Line.tsx"); /* harmony import */ var _Circle__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Circle */ "./components/progress/Circle.tsx"); /* harmony import */ var _Steps__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Steps */ "./components/progress/Steps.tsx"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./utils */ "./components/progress/utils.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var ProgressTypes = Object(_util_type__WEBPACK_IMPORTED_MODULE_15__[/* tuple */ "a"])('line', 'circle', 'dashboard'); var ProgressStatuses = Object(_util_type__WEBPACK_IMPORTED_MODULE_15__[/* tuple */ "a"])('normal', 'exception', 'active', 'success'); var Progress = /*#__PURE__*/function (_React$Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(Progress, _React$Component); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(Progress); function Progress() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, Progress); _this = _super.apply(this, arguments); _this.renderProgress = function (_ref) { var _classNames; var getPrefixCls = _ref.getPrefixCls, direction = _ref.direction; var _assertThisInitialize = Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(_this), props = _assertThisInitialize.props; var customizePrefixCls = props.prefixCls, className = props.className, size = props.size, type = props.type, steps = props.steps, showInfo = props.showInfo, strokeColor = props.strokeColor, restProps = __rest(props, ["prefixCls", "className", "size", "type", "steps", "showInfo", "strokeColor"]); var prefixCls = getPrefixCls('progress', customizePrefixCls); var progressStatus = _this.getProgressStatus(); var progressInfo = _this.renderProcessInfo(prefixCls, progressStatus); if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"])(!('successPercent' in props), 'Progress', '`successPercent` is deprecated. Please use `success.percent` instead.'); var progress; // Render progress shape if (type === 'line') { progress = steps ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_Steps__WEBPACK_IMPORTED_MODULE_19__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, _this.props, { strokeColor: typeof strokeColor === 'string' ? strokeColor : undefined, prefixCls: prefixCls, steps: steps }), progressInfo) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_Line__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, _this.props, { prefixCls: prefixCls, direction: direction }), progressInfo); } else if (type === 'circle' || type === 'dashboard') { progress = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_Circle__WEBPACK_IMPORTED_MODULE_18__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, _this.props, { prefixCls: prefixCls, progressStatus: progressStatus }), progressInfo); } var classString = classnames__WEBPACK_IMPORTED_MODULE_8___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(type === 'dashboard' && 'circle' || steps && 'steps' || type), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-status-").concat(progressStatus), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-show-info"), showInfo), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(size), size), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])(restProps, ['status', 'format', 'trailColor', 'strokeWidth', 'width', 'gapDegree', 'gapPosition', 'strokeLinecap', 'percent', 'success', 'successPercent']), { className: classString }), progress); }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Progress, [{ key: "getPercentNumber", value: function getPercentNumber() { var _this$props$percent = this.props.percent, percent = _this$props$percent === void 0 ? 0 : _this$props$percent; var successPercent = Object(_utils__WEBPACK_IMPORTED_MODULE_20__[/* getSuccessPercent */ "a"])(this.props); return parseInt(successPercent !== undefined ? successPercent.toString() : percent.toString(), 10); } }, { key: "getProgressStatus", value: function getProgressStatus() { var status = this.props.status; if (ProgressStatuses.indexOf(status) < 0 && this.getPercentNumber() >= 100) { return 'success'; } return status || 'normal'; } }, { key: "renderProcessInfo", value: function renderProcessInfo(prefixCls, progressStatus) { var _this$props = this.props, showInfo = _this$props.showInfo, format = _this$props.format, type = _this$props.type, percent = _this$props.percent; var successPercent = Object(_utils__WEBPACK_IMPORTED_MODULE_20__[/* getSuccessPercent */ "a"])(this.props); if (!showInfo) return null; var text; var textFormatter = format || function (percentNumber) { return "".concat(percentNumber, "%"); }; var isLineType = type === 'line'; if (format || progressStatus !== 'exception' && progressStatus !== 'success') { text = textFormatter(Object(_utils__WEBPACK_IMPORTED_MODULE_20__[/* validProgress */ "b"])(percent), Object(_utils__WEBPACK_IMPORTED_MODULE_20__[/* validProgress */ "b"])(successPercent)); } else if (progressStatus === 'exception') { text = isLineType ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"], null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], null); } else if (progressStatus === 'success') { text = isLineType ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_ant_design_icons_es_icons_CheckCircleFilled__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"], null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_ant_design_icons_es_icons_CheckOutlined__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"], null); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"]("span", { className: "".concat(prefixCls, "-text"), title: typeof text === 'string' ? text : undefined }, text); } }, { key: "render", value: function render() { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_14__[/* ConfigConsumer */ "a"], null, this.renderProgress); } }]); return Progress; }(react__WEBPACK_IMPORTED_MODULE_7__["Component"]); Progress.defaultProps = { type: 'line', percent: 0, showInfo: true, // null for different theme definition trailColor: null, size: 'default', gapDegree: undefined, strokeLinecap: 'round' }; /***/ }), /***/ "./components/progress/style/index.less": /*!**********************************************!*\ !*** ./components/progress/style/index.less ***! \**********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/progress/style/index.tsx": /*!*********************************************!*\ !*** ./components/progress/style/index.tsx ***! \*********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/progress/style/index.less"); /***/ }), /***/ "./components/progress/utils.ts": /*!**************************************!*\ !*** ./components/progress/utils.ts ***! \**************************************/ /*! exports provided: validProgress, getSuccessPercent */ /*! exports used: getSuccessPercent, validProgress */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return validProgress; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getSuccessPercent; }); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); function validProgress(progress) { if (!progress || progress < 0) { return 0; } if (progress > 100) { return 100; } return progress; } function getSuccessPercent(_ref) { var success = _ref.success, successPercent = _ref.successPercent; var percent = successPercent; /** @deprecated Use `percent` instead */ if (success && 'progress' in success) { if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(false, 'Progress', '`success.progress` is deprecated. Please use `success.percent` instead.'); percent = success.progress; } if (success && 'percent' in success) { percent = success.percent; } return percent; } /***/ }), /***/ "./components/radio/context.tsx": /*!**************************************!*\ !*** ./components/radio/context.tsx ***! \**************************************/ /*! exports provided: RadioGroupContextProvider, default */ /*! exports used: RadioGroupContextProvider, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return RadioGroupContextProvider; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var RadioGroupContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createContext"](null); var RadioGroupContextProvider = RadioGroupContext.Provider; /* harmony default export */ __webpack_exports__["b"] = (RadioGroupContext); /***/ }), /***/ "./components/radio/group.tsx": /*!************************************!*\ !*** ./components/radio/group.tsx ***! \************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/hooks/useMergedState */ "./node_modules/rc-util/es/hooks/useMergedState.js"); /* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./radio */ "./components/radio/radio.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config-provider/SizeContext */ "./components/config-provider/SizeContext.tsx"); /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./context */ "./components/radio/context.tsx"); /* harmony import */ var _util_getDataOrAriaProps__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../_util/getDataOrAriaProps */ "./components/_util/getDataOrAriaProps.ts"); var RadioGroup = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function (props, ref) { var _React$useContext = react__WEBPACK_IMPORTED_MODULE_3__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_7__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var size = react__WEBPACK_IMPORTED_MODULE_3__["useContext"](_config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_8__[/* default */ "b"]); var _useMergedState = Object(rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(props.defaultValue, { value: props.value }), _useMergedState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_useMergedState, 2), value = _useMergedState2[0], setValue = _useMergedState2[1]; var onRadioChange = function onRadioChange(ev) { var lastValue = value; var val = ev.target.value; if (!('value' in props)) { setValue(val); } var onChange = props.onChange; if (onChange && val !== lastValue) { onChange(ev); } }; var renderGroup = function renderGroup() { var _classNames; var customizePrefixCls = props.prefixCls, _props$className = props.className, className = _props$className === void 0 ? '' : _props$className, options = props.options, optionType = props.optionType, _props$buttonStyle = props.buttonStyle, buttonStyle = _props$buttonStyle === void 0 ? 'outline' : _props$buttonStyle, disabled = props.disabled, children = props.children, customizeSize = props.size, style = props.style, id = props.id, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave; var prefixCls = getPrefixCls('radio', customizePrefixCls); var groupPrefixCls = "".concat(prefixCls, "-group"); var childrenToRender = children; // 如果存在 options, 优先使用 if (options && options.length > 0) { var optionsPrefixCls = optionType === 'button' ? "".concat(prefixCls, "-button") : prefixCls; childrenToRender = options.map(function (option) { if (typeof option === 'string') { // 此处类型自动推导为 string return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_radio__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], { key: option, prefixCls: optionsPrefixCls, disabled: disabled, value: option, checked: value === option }, option); } // 此处类型自动推导为 { label: string value: string } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_radio__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], { key: "radio-group-value-options-".concat(option.value), prefixCls: optionsPrefixCls, disabled: option.disabled || disabled, value: option.value, checked: value === option.value, style: option.style }, option.label); }); } var mergedSize = customizeSize || size; var classString = classnames__WEBPACK_IMPORTED_MODULE_4___default()(groupPrefixCls, "".concat(groupPrefixCls, "-").concat(buttonStyle), (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(groupPrefixCls, "-").concat(mergedSize), mergedSize), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(groupPrefixCls, "-rtl"), direction === 'rtl'), _classNames), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, Object(_util_getDataOrAriaProps__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(props), { className: classString, style: style, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, id: id, ref: ref }), childrenToRender); }; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_context__WEBPACK_IMPORTED_MODULE_9__[/* RadioGroupContextProvider */ "a"], { value: { onChange: onRadioChange, value: value, disabled: props.disabled, name: props.name } }, renderGroup()); }); /* harmony default export */ __webpack_exports__["a"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["memo"](RadioGroup)); /***/ }), /***/ "./components/radio/index.tsx": /*!************************************!*\ !*** ./components/radio/index.tsx ***! \************************************/ /*! exports provided: RadioGroupButtonStyle, RadioGroupOptionType, RadioGroupProps, RadioGroupContextProps, RadioProps, RadioChangeEventTarget, RadioChangeEvent, Button, Group, default */ /*! exports used: Button, Group, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./radio */ "./components/radio/radio.tsx"); /* harmony import */ var _group__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./group */ "./components/radio/group.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _group__WEBPACK_IMPORTED_MODULE_1__["a"]; }); /* harmony import */ var _radioButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./radioButton */ "./components/radio/radioButton.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _radioButton__WEBPACK_IMPORTED_MODULE_2__["a"]; }); /* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interface */ "./components/radio/interface.tsx"); var Radio = _radio__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]; Radio.Button = _radioButton__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"]; Radio.Group = _group__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]; /* harmony default export */ __webpack_exports__["c"] = (Radio); /***/ }), /***/ "./components/radio/interface.tsx": /*!****************************************!*\ !*** ./components/radio/interface.tsx ***! \****************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /***/ }), /***/ "./components/radio/radio.tsx": /*!************************************!*\ !*** ./components/radio/radio.tsx ***! \************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var rc_checkbox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-checkbox */ "./node_modules/rc-checkbox/es/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/ref */ "./node_modules/rc-util/es/ref.js"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./context */ "./components/radio/context.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var InternalRadio = function InternalRadio(props, ref) { var _classNames; var context = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_context__WEBPACK_IMPORTED_MODULE_7__[/* default */ "b"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_6__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var innerRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](); var mergedRef = Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_5__[/* composeRef */ "a"])(ref, innerRef); react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(!('optionType' in props), 'Radio', '`optionType` is only support in Radio.Group.'); }, []); var onChange = function onChange(e) { var _a, _b; (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, e); (_b = context === null || context === void 0 ? void 0 : context.onChange) === null || _b === void 0 ? void 0 : _b.call(context, e); }; var customizePrefixCls = props.prefixCls, className = props.className, children = props.children, style = props.style, restProps = __rest(props, ["prefixCls", "className", "children", "style"]); var prefixCls = getPrefixCls('radio', customizePrefixCls); var radioProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, restProps); if (context) { radioProps.name = context.name; radioProps.onChange = onChange; radioProps.checked = props.value === context.value; radioProps.disabled = props.disabled || context.disabled; } var wrapperClassString = classnames__WEBPACK_IMPORTED_MODULE_4___default()("".concat(prefixCls, "-wrapper"), (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-wrapper-checked"), radioProps.checked), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-wrapper-disabled"), radioProps.disabled), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-wrapper-rtl"), direction === 'rtl'), _classNames), className); return ( /*#__PURE__*/ // eslint-disable-next-line jsx-a11y/label-has-associated-control react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("label", { className: wrapperClassString, style: style, onMouseEnter: props.onMouseEnter, onMouseLeave: props.onMouseLeave }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](rc_checkbox__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, radioProps, { prefixCls: prefixCls, ref: mergedRef })), children !== undefined ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", null, children) : null) ); }; var Radio = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](InternalRadio); Radio.displayName = 'Radio'; Radio.defaultProps = { type: 'radio' }; /* harmony default export */ __webpack_exports__["a"] = (Radio); /***/ }), /***/ "./components/radio/radioButton.tsx": /*!******************************************!*\ !*** ./components/radio/radioButton.tsx ***! \******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./radio */ "./components/radio/radio.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./context */ "./components/radio/context.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var RadioButton = function RadioButton(props, ref) { var radioGroupContext = react__WEBPACK_IMPORTED_MODULE_1__["useContext"](_context__WEBPACK_IMPORTED_MODULE_4__[/* default */ "b"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_1__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_3__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls; var customizePrefixCls = props.prefixCls, radioProps = __rest(props, ["prefixCls"]); var prefixCls = getPrefixCls('radio-button', customizePrefixCls); if (radioGroupContext) { radioProps.checked = props.value === radioGroupContext.value; radioProps.disabled = props.disabled || radioGroupContext.disabled; } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_radio__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ prefixCls: prefixCls }, radioProps, { type: "radio", ref: ref })); }; /* harmony default export */ __webpack_exports__["a"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["forwardRef"](RadioButton)); /***/ }), /***/ "./components/radio/style/index.less": /*!*******************************************!*\ !*** ./components/radio/style/index.less ***! \*******************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/radio/style/index.tsx": /*!******************************************!*\ !*** ./components/radio/style/index.tsx ***! \******************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/radio/style/index.less"); /***/ }), /***/ "./components/rate/index.tsx": /*!***********************************!*\ !*** ./components/rate/index.tsx ***! \***********************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var rc_rate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-rate */ "./node_modules/rc-rate/es/index.js"); /* harmony import */ var _ant_design_icons_es_icons_StarFilled__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons/es/icons/StarFilled */ "./node_modules/@ant-design/icons/es/icons/StarFilled.js"); /* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../tooltip */ "./components/tooltip/index.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Rate = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["forwardRef"](function (_a, ref) { var prefixCls = _a.prefixCls, tooltips = _a.tooltips, props = __rest(_a, ["prefixCls", "tooltips"]); var characterRender = function characterRender(node, _ref) { var index = _ref.index; if (!tooltips) return node; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_tooltip__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], { title: tooltips[index] }, node); }; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_1__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_5__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var ratePrefixCls = getPrefixCls('rate', prefixCls); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](rc_rate__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ ref: ref, characterRender: characterRender }, props, { prefixCls: ratePrefixCls, direction: direction })); }); Rate.displayName = 'Rate'; Rate.defaultProps = { character: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_ant_design_icons_es_icons_StarFilled__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], null) }; /* harmony default export */ __webpack_exports__["a"] = (Rate); /***/ }), /***/ "./components/rate/style/index.less": /*!******************************************!*\ !*** ./components/rate/style/index.less ***! \******************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/rate/style/index.tsx": /*!*****************************************!*\ !*** ./components/rate/style/index.tsx ***! \*****************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/rate/style/index.less"); /* harmony import */ var _tooltip_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../tooltip/style */ "./components/tooltip/style/index.tsx"); // style dependencies /***/ }), /***/ "./components/result/index.tsx": /*!*************************************!*\ !*** ./components/result/index.tsx ***! \*************************************/ /*! exports provided: IconMap, ExceptionMap, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export IconMap */ /* unused harmony export ExceptionMap */ /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _ant_design_icons_es_icons_CheckCircleFilled__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons/es/icons/CheckCircleFilled */ "./node_modules/@ant-design/icons/es/icons/CheckCircleFilled.js"); /* harmony import */ var _ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseCircleFilled */ "./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js"); /* harmony import */ var _ant_design_icons_es_icons_ExclamationCircleFilled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/icons/es/icons/ExclamationCircleFilled */ "./node_modules/@ant-design/icons/es/icons/ExclamationCircleFilled.js"); /* harmony import */ var _ant_design_icons_es_icons_WarningFilled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ant-design/icons/es/icons/WarningFilled */ "./node_modules/@ant-design/icons/es/icons/WarningFilled.js"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _noFound__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./noFound */ "./components/result/noFound.tsx"); /* harmony import */ var _serverError__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./serverError */ "./components/result/serverError.tsx"); /* harmony import */ var _unauthorized__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./unauthorized */ "./components/result/unauthorized.tsx"); var IconMap = { success: _ant_design_icons_es_icons_CheckCircleFilled__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], error: _ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], info: _ant_design_icons_es_icons_ExclamationCircleFilled__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], warning: _ant_design_icons_es_icons_WarningFilled__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"] }; var ExceptionMap = { '404': _noFound__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], '500': _serverError__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], '403': _unauthorized__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"] }; // ExceptionImageMap keys var ExceptionStatus = Object.keys(ExceptionMap); /** * Render icon if ExceptionStatus includes ,render svg image else render iconNode * * @param prefixCls * @param {status, icon} */ var renderIcon = function renderIcon(prefixCls, _ref) { var status = _ref.status, icon = _ref.icon; var className = classnames__WEBPACK_IMPORTED_MODULE_2___default()("".concat(prefixCls, "-icon")); if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(!(typeof icon === 'string' && icon.length > 2), 'Result', "`icon` is using ReactNode instead of string naming in v4. Please check `".concat(icon, "` at https://ant.design/components/icon")); if (ExceptionStatus.includes("".concat(status))) { var SVGComponent = ExceptionMap[status]; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(className, " ").concat(prefixCls, "-image") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](SVGComponent, null)); } var iconNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](IconMap[status]); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: className }, icon || iconNode); }; var renderExtra = function renderExtra(prefixCls, _ref2) { var extra = _ref2.extra; return extra && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(prefixCls, "-extra") }, extra); }; var Result = function Result(_ref3) { var customizePrefixCls = _ref3.prefixCls, customizeClassName = _ref3.className, subTitle = _ref3.subTitle, title = _ref3.title, style = _ref3.style, children = _ref3.children, _ref3$status = _ref3.status, status = _ref3$status === void 0 ? 'info' : _ref3$status, icon = _ref3.icon, extra = _ref3.extra; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_1__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_7__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var prefixCls = getPrefixCls('result', customizePrefixCls); var className = classnames__WEBPACK_IMPORTED_MODULE_2___default()(prefixCls, "".concat(prefixCls, "-").concat(status), customizeClassName, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(prefixCls, "-rtl"), direction === 'rtl')); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: className, style: style }, renderIcon(prefixCls, { status: status, icon: icon }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(prefixCls, "-title") }, title), subTitle && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(prefixCls, "-subtitle") }, subTitle), renderExtra(prefixCls, { extra: extra }), children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "".concat(prefixCls, "-content") }, children)); }; Result.PRESENTED_IMAGE_403 = ExceptionMap['403']; Result.PRESENTED_IMAGE_404 = ExceptionMap['404']; Result.PRESENTED_IMAGE_500 = ExceptionMap['500']; /* harmony default export */ __webpack_exports__["a"] = (Result); /***/ }), /***/ "./components/result/noFound.tsx": /*!***************************************!*\ !*** ./components/result/noFound.tsx ***! \***************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var NoFound = function NoFound() { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { width: "252", height: "294" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("defs", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M0 .387h251.772v251.772H0z" })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("g", { fill: "none", fillRule: "evenodd" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("g", { transform: "translate(0 .012)" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("mask", { fill: "#fff" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M0 127.32v-2.095C0 56.279 55.892.387 124.838.387h2.096c68.946 0 124.838 55.892 124.838 124.838v2.096c0 68.946-55.892 124.838-124.838 124.838h-2.096C55.892 252.16 0 196.267 0 127.321", fill: "#E4EBF7", mask: "url(#b)" })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M39.755 130.84a8.276 8.276 0 1 1-16.468-1.66 8.276 8.276 0 0 1 16.468 1.66", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M36.975 134.297l10.482 5.943M48.373 146.508l-12.648 10.788", stroke: "#FFF", strokeWidth: "2" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M39.875 159.352a5.667 5.667 0 1 1-11.277-1.136 5.667 5.667 0 0 1 11.277 1.136M57.588 143.247a5.708 5.708 0 1 1-11.358-1.145 5.708 5.708 0 0 1 11.358 1.145M99.018 26.875l29.82-.014a4.587 4.587 0 1 0-.003-9.175l-29.82.013a4.587 4.587 0 1 0 .003 9.176M110.424 45.211l29.82-.013a4.588 4.588 0 0 0-.004-9.175l-29.82.013a4.587 4.587 0 1 0 .004 9.175", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M112.798 26.861v-.002l15.784-.006a4.588 4.588 0 1 0 .003 9.175l-15.783.007v-.002a4.586 4.586 0 0 0-.004-9.172M184.523 135.668c-.553 5.485-5.447 9.483-10.931 8.93-5.485-.553-9.483-5.448-8.93-10.932.552-5.485 5.447-9.483 10.932-8.93 5.485.553 9.483 5.447 8.93 10.932", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M179.26 141.75l12.64 7.167M193.006 156.477l-15.255 13.011", stroke: "#FFF", strokeWidth: "2" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M184.668 170.057a6.835 6.835 0 1 1-13.6-1.372 6.835 6.835 0 0 1 13.6 1.372M203.34 153.325a6.885 6.885 0 1 1-13.7-1.382 6.885 6.885 0 0 1 13.7 1.382", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M151.931 192.324a2.222 2.222 0 1 1-4.444 0 2.222 2.222 0 0 1 4.444 0zM225.27 116.056a2.222 2.222 0 1 1-4.445 0 2.222 2.222 0 0 1 4.444 0zM216.38 151.08a2.223 2.223 0 1 1-4.446-.001 2.223 2.223 0 0 1 4.446 0zM176.917 107.636a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM195.291 92.165a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM202.058 180.711a2.223 2.223 0 1 1-4.446 0 2.223 2.223 0 0 1 4.446 0z", stroke: "#FFF", strokeWidth: "2" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { stroke: "#FFF", strokeWidth: "2", d: "M214.404 153.302l-1.912 20.184-10.928 5.99M173.661 174.792l-6.356 9.814h-11.36l-4.508 6.484M174.941 125.168v-15.804M220.824 117.25l-12.84 7.901-15.31-7.902V94.39" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M166.588 65.936h-3.951a4.756 4.756 0 0 1-4.743-4.742 4.756 4.756 0 0 1 4.743-4.743h3.951a4.756 4.756 0 0 1 4.743 4.743 4.756 4.756 0 0 1-4.743 4.742", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M174.823 30.03c0-16.281 13.198-29.48 29.48-29.48 16.28 0 29.48 13.199 29.48 29.48 0 16.28-13.2 29.48-29.48 29.48-16.282 0-29.48-13.2-29.48-29.48", fill: "#1890FF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M205.952 38.387c.5.5.785 1.142.785 1.928s-.286 1.465-.785 1.964c-.572.5-1.214.75-2 .75-.785 0-1.429-.285-1.929-.785-.572-.5-.82-1.143-.82-1.929s.248-1.428.82-1.928c.5-.5 1.144-.75 1.93-.75.785 0 1.462.25 1.999.75m4.285-19.463c1.428 1.249 2.143 2.963 2.143 5.142 0 1.712-.427 3.13-1.219 4.25-.067.096-.137.18-.218.265-.416.429-1.41 1.346-2.956 2.699a5.07 5.07 0 0 0-1.428 1.75 5.207 5.207 0 0 0-.536 2.357v.5h-4.107v-.5c0-1.357.215-2.536.714-3.5.464-.964 1.857-2.464 4.178-4.536l.43-.5c.643-.785.964-1.643.964-2.535 0-1.18-.358-2.108-1-2.785-.678-.68-1.643-1.001-2.858-1.001-1.536 0-2.642.464-3.357 1.43-.37.5-.621 1.135-.76 1.904a1.999 1.999 0 0 1-1.971 1.63h-.004c-1.277 0-2.257-1.183-1.98-2.43.337-1.518 1.02-2.78 2.073-3.784 1.536-1.5 3.607-2.25 6.25-2.25 2.32 0 4.214.607 5.642 1.894", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M52.04 76.131s21.81 5.36 27.307 15.945c5.575 10.74-6.352 9.26-15.73 4.935-10.86-5.008-24.7-11.822-11.577-20.88", fill: "#FFB594" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M90.483 67.504l-.449 2.893c-.753.49-4.748-2.663-4.748-2.663l-1.645.748-1.346-5.684s6.815-4.589 8.917-5.018c2.452-.501 9.884.94 10.7 2.278 0 0 1.32.486-2.227.69-3.548.203-5.043.447-6.79 3.132-1.747 2.686-2.412 3.624-2.412 3.624", fill: "#FFC6A0" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M128.055 111.367c-2.627-7.724-6.15-13.18-8.917-15.478-3.5-2.906-9.34-2.225-11.366-4.187-1.27-1.231-3.215-1.197-3.215-1.197s-14.98-3.158-16.828-3.479c-2.37-.41-2.124-.714-6.054-1.405-1.57-1.907-2.917-1.122-2.917-1.122l-7.11-1.383c-.853-1.472-2.423-1.023-2.423-1.023l-2.468-.897c-1.645 9.976-7.74 13.796-7.74 13.796 1.795 1.122 15.703 8.3 15.703 8.3l5.107 37.11s-3.321 5.694 1.346 9.109c0 0 19.883-3.743 34.921-.329 0 0 3.047-2.546.972-8.806.523-3.01 1.394-8.263 1.736-11.622.385.772 2.019 1.918 3.14 3.477 0 0 9.407-7.365 11.052-14.012-.832-.723-1.598-1.585-2.267-2.453-.567-.736-.358-2.056-.765-2.717-.669-1.084-1.804-1.378-1.907-1.682", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M101.09 289.998s4.295 2.041 7.354 1.021c2.821-.94 4.53.668 7.08 1.178 2.55.51 6.874 1.1 11.686-1.26-.103-5.51-6.889-3.98-11.96-6.713-2.563-1.38-3.784-4.722-3.598-8.799h-9.402s-1.392 10.52-1.16 14.573", fill: "#CBD1D1" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M101.067 289.826s2.428 1.271 6.759.653c3.058-.437 3.712.481 7.423 1.031 3.712.55 10.724-.069 11.823-.894.413 1.1-.343 2.063-.343 2.063s-1.512.603-4.812.824c-2.03.136-5.8.291-7.607-.503-1.787-1.375-5.247-1.903-5.728-.241-3.918.95-7.355-.286-7.355-.286l-.16-2.647z", fill: "#2B0849" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M108.341 276.044h3.094s-.103 6.702 4.536 8.558c-4.64.618-8.558-2.303-7.63-8.558", fill: "#A4AABA" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M57.542 272.401s-2.107 7.416-4.485 12.306c-1.798 3.695-4.225 7.492 5.465 7.492 6.648 0 8.953-.48 7.423-6.599-1.53-6.12.266-13.199.266-13.199h-8.669z", fill: "#CBD1D1" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M51.476 289.793s2.097 1.169 6.633 1.169c6.083 0 8.249-1.65 8.249-1.65s.602 1.114-.619 2.165c-.993.855-3.597 1.591-7.39 1.546-4.145-.048-5.832-.566-6.736-1.168-.825-.55-.687-1.58-.137-2.062", fill: "#2B0849" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M58.419 274.304s.033 1.519-.314 2.93c-.349 1.42-1.078 3.104-1.13 4.139-.058 1.151 4.537 1.58 5.155.034.62-1.547 1.294-6.427 1.913-7.252.619-.825-4.903-2.119-5.624.15", fill: "#A4AABA" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M99.66 278.514l13.378.092s1.298-54.52 1.853-64.403c.554-9.882 3.776-43.364 1.002-63.128l-12.547-.644-22.849.78s-.434 3.966-1.195 9.976c-.063.496-.682.843-.749 1.365-.075.585.423 1.354.32 1.966-2.364 14.08-6.377 33.104-8.744 46.677-.116.666-1.234 1.009-1.458 2.691-.04.302.211 1.525.112 1.795-6.873 18.744-10.949 47.842-14.277 61.885l14.607-.014s2.197-8.57 4.03-16.97c2.811-12.886 23.111-85.01 23.111-85.01l3.016-.521 1.043 46.35s-.224 1.234.337 2.02c.56.785-.56 1.123-.392 2.244l.392 1.794s-.449 7.178-.898 11.89c-.448 4.71-.092 39.165-.092 39.165", fill: "#7BB2F9" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M76.085 221.626c1.153.094 4.038-2.019 6.955-4.935M106.36 225.142s2.774-1.11 6.103-3.883", stroke: "#648BD8", strokeWidth: "1.051", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M107.275 222.1s2.773-1.11 6.102-3.884", stroke: "#648BD8", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M74.74 224.767s2.622-.591 6.505-3.365M86.03 151.634c-.27 3.106.3 8.525-4.336 9.123M103.625 149.88s.11 14.012-1.293 15.065c-2.219 1.664-2.99 1.944-2.99 1.944M99.79 150.438s.035 12.88-1.196 24.377M93.673 175.911s7.212-1.664 9.431-1.664M74.31 205.861a212.013 212.013 0 0 1-.979 4.56s-1.458 1.832-1.009 3.776c.449 1.944-.947 2.045-4.985 15.355-1.696 5.59-4.49 18.591-6.348 27.597l-.231 1.12M75.689 197.807a320.934 320.934 0 0 1-.882 4.754M82.591 152.233L81.395 162.7s-1.097.15-.5 2.244c.113 1.346-2.674 15.775-5.18 30.43M56.12 274.418h13.31", stroke: "#648BD8", strokeWidth: "1.051", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M116.241 148.22s-17.047-3.104-35.893.2c.158 2.514-.003 4.15-.003 4.15s14.687-2.818 35.67-.312c.252-2.355.226-4.038.226-4.038", fill: "#192064" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M106.322 151.165l.003-4.911a.81.81 0 0 0-.778-.815c-2.44-.091-5.066-.108-7.836-.014a.818.818 0 0 0-.789.815l-.003 4.906a.81.81 0 0 0 .831.813c2.385-.06 4.973-.064 7.73.017a.815.815 0 0 0 .842-.81", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M105.207 150.233l.002-3.076a.642.642 0 0 0-.619-.646 94.321 94.321 0 0 0-5.866-.01.65.65 0 0 0-.63.647v3.072a.64.64 0 0 0 .654.644 121.12 121.12 0 0 1 5.794.011c.362.01.665-.28.665-.642", fill: "#192064" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M100.263 275.415h12.338M101.436 270.53c.006 3.387.042 5.79.111 6.506M101.451 264.548a915.75 915.75 0 0 0-.015 4.337M100.986 174.965l.898 44.642s.673 1.57-.225 2.692c-.897 1.122 2.468.673.898 2.243-1.57 1.57.897 1.122 0 3.365-.596 1.489-.994 21.1-1.096 35.146", stroke: "#648BD8", strokeWidth: "1.051", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M46.876 83.427s-.516 6.045 7.223 5.552c11.2-.712 9.218-9.345 31.54-21.655-.786-2.708-2.447-4.744-2.447-4.744s-11.068 3.11-22.584 8.046c-6.766 2.9-13.395 6.352-13.732 12.801M104.46 91.057l.941-5.372-8.884-11.43-5.037 5.372-1.74 7.834a.321.321 0 0 0 .108.32c.965.8 6.5 5.013 14.347 3.544a.332.332 0 0 0 .264-.268", fill: "#FFC6A0" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M93.942 79.387s-4.533-2.853-2.432-6.855c1.623-3.09 4.513 1.133 4.513 1.133s.52-3.642 3.121-3.642c.52-1.04 1.561-4.162 1.561-4.162s11.445 2.601 13.526 3.121c0 5.203-2.304 19.424-7.84 19.861-8.892.703-12.449-9.456-12.449-9.456", fill: "#FFC6A0" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M113.874 73.446c2.601-2.081 3.47-9.722 3.47-9.722s-2.479-.49-6.64-2.05c-4.683-2.081-12.798-4.747-17.48.976-9.668 3.223-2.05 19.823-2.05 19.823l2.713-3.021s-3.935-3.287-2.08-6.243c2.17-3.462 3.92 1.073 3.92 1.073s.637-2.387 3.581-3.342c.355-.71 1.036-2.674 1.432-3.85a1.073 1.073 0 0 1 1.263-.704c2.4.558 8.677 2.019 11.356 2.662.522.125.871.615.82 1.15l-.305 3.248z", fill: "#520038" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M104.977 76.064c-.103.61-.582 1.038-1.07.956-.489-.083-.801-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.644.698 1.254M112.132 77.694c-.103.61-.582 1.038-1.07.956-.488-.083-.8-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.643.698 1.254", fill: "#552950" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { stroke: "#DB836E", strokeWidth: "1.118", strokeLinecap: "round", strokeLinejoin: "round", d: "M110.13 74.84l-.896 1.61-.298 4.357h-2.228" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M110.846 74.481s1.79-.716 2.506.537", stroke: "#5C2552", strokeWidth: "1.118", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M92.386 74.282s.477-1.114 1.113-.716c.637.398 1.274 1.433.558 1.99-.717.556.159 1.67.159 1.67", stroke: "#DB836E", strokeWidth: "1.118", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M103.287 72.93s1.83 1.113 4.137.954", stroke: "#5C2552", strokeWidth: "1.118", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M103.685 81.762s2.227 1.193 4.376 1.193M104.64 84.308s.954.398 1.511.318M94.693 81.205s2.308 7.4 10.424 7.639", stroke: "#DB836E", strokeWidth: "1.118", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M81.45 89.384s.45 5.647-4.935 12.787M69 82.654s-.726 9.282-8.204 14.206", stroke: "#E4EBF7", strokeWidth: "1.101", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M129.405 122.865s-5.272 7.403-9.422 10.768", stroke: "#E4EBF7", strokeWidth: "1.051", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M119.306 107.329s.452 4.366-2.127 32.062", stroke: "#E4EBF7", strokeWidth: "1.101", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M150.028 151.232h-49.837a1.01 1.01 0 0 1-1.01-1.01v-31.688c0-.557.452-1.01 1.01-1.01h49.837c.558 0 1.01.453 1.01 1.01v31.688a1.01 1.01 0 0 1-1.01 1.01", fill: "#F2D7AD" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M150.29 151.232h-19.863v-33.707h20.784v32.786a.92.92 0 0 1-.92.92", fill: "#F4D19D" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M123.554 127.896H92.917a.518.518 0 0 1-.425-.816l6.38-9.113c.193-.277.51-.442.85-.442h31.092l-7.26 10.371z", fill: "#F2D7AD" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { fill: "#CC9B6E", d: "M123.689 128.447H99.25v-.519h24.169l7.183-10.26.424.298z" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M158.298 127.896h-18.669a2.073 2.073 0 0 1-1.659-.83l-7.156-9.541h19.965c.49 0 .95.23 1.244.622l6.69 8.92a.519.519 0 0 1-.415.83", fill: "#F4D19D" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { fill: "#CC9B6E", d: "M157.847 128.479h-19.384l-7.857-10.475.415-.31 7.7 10.266h19.126zM130.554 150.685l-.032-8.177.519-.002.032 8.177z" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { fill: "#CC9B6E", d: "M130.511 139.783l-.08-21.414.519-.002.08 21.414zM111.876 140.932l-.498-.143 1.479-5.167.498.143zM108.437 141.06l-2.679-2.935 2.665-3.434.41.318-2.397 3.089 2.384 2.612zM116.607 141.06l-.383-.35 2.383-2.612-2.397-3.089.41-.318 2.665 3.434z" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M154.316 131.892l-3.114-1.96.038 3.514-1.043.092c-1.682.115-3.634.23-4.789.23-1.902 0-2.693 2.258 2.23 2.648l-2.645-.596s-2.168 1.317.504 2.3c0 0-1.58 1.217.561 2.58-.584 3.504 5.247 4.058 7.122 3.59 1.876-.47 4.233-2.359 4.487-5.16.28-3.085-.89-5.432-3.35-7.238", fill: "#FFC6A0" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M153.686 133.577s-6.522.47-8.36.372c-1.836-.098-1.904 2.19 2.359 2.264 3.739.15 5.451-.044 5.451-.044", stroke: "#DB836E", strokeWidth: "1.051", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M145.16 135.877c-1.85 1.346.561 2.355.561 2.355s3.478.898 6.73.617", stroke: "#DB836E", strokeWidth: "1.051", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M151.89 141.71s-6.28.111-6.73-2.132c-.223-1.346.45-1.402.45-1.402M146.114 140.868s-1.103 3.16 5.44 3.533M151.202 129.932v3.477M52.838 89.286c3.533-.337 8.423-1.248 13.582-7.754", stroke: "#DB836E", strokeWidth: "1.051", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M168.567 248.318a6.647 6.647 0 0 1-6.647-6.647v-66.466a6.647 6.647 0 1 1 13.294 0v66.466a6.647 6.647 0 0 1-6.647 6.647", fill: "#5BA02E" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M176.543 247.653a6.647 6.647 0 0 1-6.646-6.647v-33.232a6.647 6.647 0 1 1 13.293 0v33.232a6.647 6.647 0 0 1-6.647 6.647", fill: "#92C110" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M186.443 293.613H158.92a3.187 3.187 0 0 1-3.187-3.187v-46.134a3.187 3.187 0 0 1 3.187-3.187h27.524a3.187 3.187 0 0 1 3.187 3.187v46.134a3.187 3.187 0 0 1-3.187 3.187", fill: "#F2D7AD" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M88.979 89.48s7.776 5.384 16.6 2.842", stroke: "#E4EBF7", strokeWidth: "1.101", strokeLinecap: "round", strokeLinejoin: "round" }))); }; /* harmony default export */ __webpack_exports__["a"] = (NoFound); /***/ }), /***/ "./components/result/serverError.tsx": /*!*******************************************!*\ !*** ./components/result/serverError.tsx ***! \*******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var ServerError = function ServerError() { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { width: "254", height: "294" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("defs", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M0 .335h253.49v253.49H0z" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M0 293.665h253.49V.401H0z" })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("g", { fill: "none", fillRule: "evenodd" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("g", { transform: "translate(0 .067)" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("mask", { fill: "#fff" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M0 128.134v-2.11C0 56.608 56.273.334 125.69.334h2.11c69.416 0 125.69 56.274 125.69 125.69v2.11c0 69.417-56.274 125.69-125.69 125.69h-2.11C56.273 253.824 0 197.551 0 128.134", fill: "#E4EBF7", mask: "url(#b)" })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M39.989 132.108a8.332 8.332 0 1 1-16.581-1.671 8.332 8.332 0 0 1 16.58 1.671", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M37.19 135.59l10.553 5.983M48.665 147.884l-12.734 10.861", stroke: "#FFF", strokeWidth: "2" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M40.11 160.816a5.706 5.706 0 1 1-11.354-1.145 5.706 5.706 0 0 1 11.354 1.145M57.943 144.6a5.747 5.747 0 1 1-11.436-1.152 5.747 5.747 0 0 1 11.436 1.153M99.656 27.434l30.024-.013a4.619 4.619 0 1 0-.004-9.238l-30.024.013a4.62 4.62 0 0 0 .004 9.238M111.14 45.896l30.023-.013a4.62 4.62 0 1 0-.004-9.238l-30.024.013a4.619 4.619 0 1 0 .004 9.238", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M113.53 27.421v-.002l15.89-.007a4.619 4.619 0 1 0 .005 9.238l-15.892.007v-.002a4.618 4.618 0 0 0-.004-9.234M150.167 70.091h-3.979a4.789 4.789 0 0 1-4.774-4.775 4.788 4.788 0 0 1 4.774-4.774h3.979a4.789 4.789 0 0 1 4.775 4.774 4.789 4.789 0 0 1-4.775 4.775", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M171.687 30.234c0-16.392 13.289-29.68 29.681-29.68 16.392 0 29.68 13.288 29.68 29.68 0 16.393-13.288 29.681-29.68 29.681s-29.68-13.288-29.68-29.68", fill: "#FF603B" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M203.557 19.435l-.676 15.035a1.514 1.514 0 0 1-3.026 0l-.675-15.035a2.19 2.19 0 1 1 4.377 0m-.264 19.378c.513.477.77 1.1.77 1.87s-.257 1.393-.77 1.907c-.55.476-1.21.733-1.943.733a2.545 2.545 0 0 1-1.87-.77c-.55-.514-.806-1.136-.806-1.87 0-.77.256-1.393.806-1.87.513-.513 1.137-.733 1.87-.733.77 0 1.43.22 1.943.733", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M119.3 133.275c4.426-.598 3.612-1.204 4.079-4.778.675-5.18-3.108-16.935-8.262-25.118-1.088-10.72-12.598-11.24-12.598-11.24s4.312 4.895 4.196 16.199c1.398 5.243.804 14.45.804 14.45s5.255 11.369 11.78 10.487", fill: "#FFB594" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M100.944 91.61s1.463-.583 3.211.582c8.08 1.398 10.368 6.706 11.3 11.368 1.864 1.282 1.864 2.33 1.864 3.496.365.777 1.515 3.03 1.515 3.03s-7.225 1.748-10.954 6.758c-1.399-6.41-6.936-25.235-6.936-25.235", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M94.008 90.5l1.019-5.815-9.23-11.874-5.233 5.581-2.593 9.863s8.39 5.128 16.037 2.246", fill: "#FFB594" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M82.931 78.216s-4.557-2.868-2.445-6.892c1.632-3.107 4.537 1.139 4.537 1.139s.524-3.662 3.139-3.662c.523-1.046 1.569-4.184 1.569-4.184s11.507 2.615 13.6 3.138c-.001 5.23-2.317 19.529-7.884 19.969-8.94.706-12.516-9.508-12.516-9.508", fill: "#FFC6A0" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M102.971 72.243c2.616-2.093 3.489-9.775 3.489-9.775s-2.492-.492-6.676-2.062c-4.708-2.092-12.867-4.771-17.575.982-9.54 4.41-2.062 19.93-2.062 19.93l2.729-3.037s-3.956-3.304-2.092-6.277c2.183-3.48 3.943 1.08 3.943 1.08s.64-2.4 3.6-3.36c.356-.714 1.04-2.69 1.44-3.872a1.08 1.08 0 0 1 1.27-.707c2.41.56 8.723 2.03 11.417 2.676.524.126.876.619.825 1.156l-.308 3.266z", fill: "#520038" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M101.22 76.514c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.961.491.083.805.647.702 1.26M94.26 75.074c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.96.491.082.805.646.702 1.26", fill: "#552950" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { stroke: "#DB836E", strokeWidth: "1.063", strokeLinecap: "round", strokeLinejoin: "round", d: "M99.206 73.644l-.9 1.62-.3 4.38h-2.24" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M99.926 73.284s1.8-.72 2.52.54", stroke: "#5C2552", strokeWidth: "1.117", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M81.367 73.084s.48-1.12 1.12-.72c.64.4 1.28 1.44.56 2s.16 1.68.16 1.68", stroke: "#DB836E", strokeWidth: "1.117", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M92.326 71.724s1.84 1.12 4.16.96", stroke: "#5C2552", strokeWidth: "1.117", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M92.726 80.604s2.24 1.2 4.4 1.2M93.686 83.164s.96.4 1.52.32M83.687 80.044s1.786 6.547 9.262 7.954", stroke: "#DB836E", strokeWidth: "1.063", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M95.548 91.663s-1.068 2.821-8.298 2.105c-7.23-.717-10.29-5.044-10.29-5.044", stroke: "#E4EBF7", strokeWidth: "1.136", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M78.126 87.478s6.526 4.972 16.47 2.486c0 0 9.577 1.02 11.536 5.322 5.36 11.77.543 36.835 0 39.962 3.496 4.055-.466 8.483-.466 8.483-15.624-3.548-35.81-.6-35.81-.6-4.849-3.546-1.223-9.044-1.223-9.044L62.38 110.32c-2.485-15.227.833-19.803 3.549-20.743 3.03-1.049 8.04-1.282 8.04-1.282.496-.058 1.08-.076 1.37-.233 2.36-1.282 2.787-.583 2.787-.583", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M65.828 89.81s-6.875.465-7.59 8.156c-.466 8.857 3.03 10.954 3.03 10.954s6.075 22.102 16.796 22.957c8.39-2.176 4.758-6.702 4.661-11.42-.233-11.304-7.108-16.897-7.108-16.897s-4.212-13.75-9.789-13.75", fill: "#FFC6A0" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M71.716 124.225s.855 11.264 9.828 6.486c4.765-2.536 7.581-13.828 9.789-22.568 1.456-5.768 2.58-12.197 2.58-12.197l-4.973-1.709s-2.408 5.516-7.769 12.275c-4.335 5.467-9.144 11.11-9.455 17.713", fill: "#FFC6A0" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M108.463 105.191s1.747 2.724-2.331 30.535c2.376 2.216 1.053 6.012-.233 7.51", stroke: "#E4EBF7", strokeWidth: "1.085", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M123.262 131.527s-.427 2.732-11.77 1.981c-15.187-1.006-25.326-3.25-25.326-3.25l.933-5.8s.723.215 9.71-.068c11.887-.373 18.714-6.07 24.964-1.022 4.039 3.263 1.489 8.16 1.489 8.16", fill: "#FFC6A0" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M70.24 90.974s-5.593-4.739-11.054 2.68c-3.318 7.223.517 15.284 2.664 19.578-.31 3.729 2.33 4.311 2.33 4.311s.108.895 1.516 2.68c4.078-7.03 6.72-9.166 13.711-12.546-.328-.656-1.877-3.265-1.825-3.767.175-1.69-1.282-2.623-1.282-2.623s-.286-.156-1.165-2.738c-.788-2.313-2.036-5.177-4.895-7.575", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M90.232 288.027s4.855 2.308 8.313 1.155c3.188-1.063 5.12.755 8.002 1.331 2.881.577 7.769 1.243 13.207-1.424-.117-6.228-7.786-4.499-13.518-7.588-2.895-1.56-4.276-5.336-4.066-9.944H91.544s-1.573 11.89-1.312 16.47", fill: "#CBD1D1" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M90.207 287.833s2.745 1.437 7.639.738c3.456-.494 3.223.66 7.418 1.282 4.195.621 13.092-.194 14.334-1.126.466 1.242-.388 2.33-.388 2.33s-1.709.682-5.438.932c-2.295.154-8.098.276-10.14-.621-2.02-1.554-4.894-1.515-6.06-.234-4.427 1.075-7.184-.31-7.184-.31l-.181-2.991z", fill: "#2B0849" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M98.429 272.257h3.496s-.117 7.574 5.127 9.671c-5.244.7-9.672-2.602-8.623-9.671", fill: "#A4AABA" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M44.425 272.046s-2.208 7.774-4.702 12.899c-1.884 3.874-4.428 7.854 5.729 7.854 6.97 0 9.385-.503 7.782-6.917-1.604-6.415.279-13.836.279-13.836h-9.088z", fill: "#CBD1D1" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M38.066 290.277s2.198 1.225 6.954 1.225c6.376 0 8.646-1.73 8.646-1.73s.63 1.168-.649 2.27c-1.04.897-3.77 1.668-7.745 1.621-4.347-.05-6.115-.593-7.062-1.224-.864-.577-.72-1.657-.144-2.162", fill: "#2B0849" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M45.344 274.041s.035 1.592-.329 3.07c-.365 1.49-1.13 3.255-1.184 4.34-.061 1.206 4.755 1.657 5.403.036.65-1.622 1.357-6.737 2.006-7.602.648-.865-5.14-2.222-5.896.156", fill: "#A4AABA" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M89.476 277.57l13.899.095s1.349-56.643 1.925-66.909c.576-10.267 3.923-45.052 1.042-65.585l-13.037-.669-23.737.81s-.452 4.12-1.243 10.365c-.065.515-.708.874-.777 1.417-.078.608.439 1.407.332 2.044-2.455 14.627-5.797 32.736-8.256 46.837-.121.693-1.282 1.048-1.515 2.796-.042.314.22 1.584.116 1.865-7.14 19.473-12.202 52.601-15.66 67.19l15.176-.015s2.282-10.145 4.185-18.871c2.922-13.389 24.012-88.32 24.012-88.32l3.133-.954-.158 48.568s-.233 1.282.35 2.098c.583.815-.581 1.167-.408 2.331l.408 1.864s-.466 7.458-.932 12.352c-.467 4.895 1.145 40.69 1.145 40.69", fill: "#7BB2F9" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M64.57 218.881c1.197.099 4.195-2.097 7.225-5.127M96.024 222.534s2.881-1.152 6.34-4.034", stroke: "#648BD8", strokeWidth: "1.085", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M96.973 219.373s2.882-1.153 6.34-4.034", stroke: "#648BD8", strokeWidth: "1.032", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M63.172 222.144s2.724-.614 6.759-3.496M74.903 146.166c-.281 3.226.31 8.856-4.506 9.478M93.182 144.344s.115 14.557-1.344 15.65c-2.305 1.73-3.107 2.02-3.107 2.02M89.197 144.923s.269 13.144-1.01 25.088M83.525 170.71s6.81-1.051 9.116-1.051M46.026 270.045l-.892 4.538M46.937 263.289l-.815 4.157M62.725 202.503c-.33 1.618-.102 1.904-.449 3.438 0 0-2.756 1.903-2.29 3.923.466 2.02-.31 3.424-4.505 17.252-1.762 5.807-4.233 18.922-6.165 28.278-.03.144-.521 2.646-1.14 5.8M64.158 194.136c-.295 1.658-.6 3.31-.917 4.938M71.33 146.787l-1.244 10.877s-1.14.155-.519 2.33c.117 1.399-2.778 16.39-5.382 31.615M44.242 273.727H58.07", stroke: "#648BD8", strokeWidth: "1.085", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M106.18 142.117c-3.028-.489-18.825-2.744-36.219.2a.625.625 0 0 0-.518.644c.063 1.307.044 2.343.015 2.995a.617.617 0 0 0 .716.636c3.303-.534 17.037-2.412 35.664-.266.347.04.66-.214.692-.56.124-1.347.16-2.425.17-3.029a.616.616 0 0 0-.52-.62", fill: "#192064" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M96.398 145.264l.003-5.102a.843.843 0 0 0-.809-.847 114.104 114.104 0 0 0-8.141-.014.85.85 0 0 0-.82.847l-.003 5.097c0 .476.388.857.864.845 2.478-.064 5.166-.067 8.03.017a.848.848 0 0 0 .876-.843", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M95.239 144.296l.002-3.195a.667.667 0 0 0-.643-.672c-1.9-.061-3.941-.073-6.094-.01a.675.675 0 0 0-.654.672l-.002 3.192c0 .376.305.677.68.669 1.859-.042 3.874-.043 6.02.012.376.01.69-.291.691-.668", fill: "#192064" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M90.102 273.522h12.819M91.216 269.761c.006 3.519-.072 5.55 0 6.292M90.923 263.474c-.009 1.599-.016 2.558-.016 4.505M90.44 170.404l.932 46.38s.7 1.631-.233 2.796c-.932 1.166 2.564.7.932 2.33-1.63 1.633.933 1.166 0 3.497-.618 1.546-1.031 21.921-1.138 36.513", stroke: "#648BD8", strokeWidth: "1.085", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M73.736 98.665l2.214 4.312s2.098.816 1.865 2.68l.816 2.214M64.297 116.611c.233-.932 2.176-7.147 12.585-10.488M77.598 90.042s7.691 6.137 16.547 2.72", stroke: "#E4EBF7", strokeWidth: "1.085", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M91.974 86.954s5.476-.816 7.574-4.545c1.297-.345.72 2.212-.33 3.671-.7.971-1.01 1.554-1.01 1.554s.194.31.155.816c-.053.697-.175.653-.272 1.048-.081.335.108.657 0 1.049-.046.17-.198.5-.382.878-.12.249-.072.687-.2.948-.231.469-1.562 1.87-2.622 2.855-3.826 3.554-5.018 1.644-6.001-.408-.894-1.865-.661-5.127-.874-6.875-.35-2.914-2.622-3.03-1.923-4.429.343-.685 2.87.69 3.263 1.748.757 2.04 2.952 1.807 2.622 1.69", fill: "#FFC6A0" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M99.8 82.429c-.465.077-.35.272-.97 1.243-.622.971-4.817 2.932-6.39 3.224-2.589.48-2.278-1.56-4.254-2.855-1.69-1.107-3.562-.638-1.398 1.398.99.932.932 1.107 1.398 3.205.335 1.506-.64 3.67.7 5.593", stroke: "#DB836E", strokeWidth: ".774", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M79.543 108.673c-2.1 2.926-4.266 6.175-5.557 8.762", stroke: "#E59788", strokeWidth: ".774", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M87.72 124.768s-2.098-1.942-5.127-2.719c-3.03-.777-3.574-.155-5.516.078-1.942.233-3.885-.932-3.652.7.233 1.63 5.05 1.01 5.206 2.097.155 1.087-6.37 2.796-8.313 2.175-.777.777.466 1.864 2.02 2.175.233 1.554 2.253 1.554 2.253 1.554s.699 1.01 2.641 1.088c2.486 1.32 8.934-.7 10.954-1.554 2.02-.855-.466-5.594-.466-5.594", fill: "#FFC6A0" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M73.425 122.826s.66 1.127 3.167 1.418c2.315.27 2.563.583 2.563.583s-2.545 2.894-9.07 2.272M72.416 129.274s3.826.097 4.933-.718M74.98 130.75s1.961.136 3.36-.505M77.232 131.916s1.748.019 2.914-.505M73.328 122.321s-.595-1.032 1.262-.427c1.671.544 2.833.055 5.128.155 1.389.061 3.067-.297 3.982.15 1.606.784 3.632 2.181 3.632 2.181s10.526 1.204 19.033-1.127M78.864 108.104s-8.39 2.758-13.168 12.12", stroke: "#E59788", strokeWidth: ".774", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M109.278 112.533s3.38-3.613 7.575-4.662", stroke: "#E4EBF7", strokeWidth: "1.085", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M107.375 123.006s9.697-2.745 11.445-.88", stroke: "#E59788", strokeWidth: ".774", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M194.605 83.656l3.971-3.886M187.166 90.933l3.736-3.655M191.752 84.207l-4.462-4.56M198.453 91.057l-4.133-4.225M129.256 163.074l3.718-3.718M122.291 170.039l3.498-3.498M126.561 163.626l-4.27-4.27M132.975 170.039l-3.955-3.955", stroke: "#BFCDDD", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M190.156 211.779h-1.604a4.023 4.023 0 0 1-4.011-4.011V175.68a4.023 4.023 0 0 1 4.01-4.01h1.605a4.023 4.023 0 0 1 4.011 4.01v32.088a4.023 4.023 0 0 1-4.01 4.01", fill: "#A3B4C6" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M237.824 212.977a4.813 4.813 0 0 1-4.813 4.813h-86.636a4.813 4.813 0 0 1 0-9.626h86.636a4.813 4.813 0 0 1 4.813 4.813", fill: "#A3B4C6" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("mask", { fill: "#fff" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { fill: "#A3B4C6", mask: "url(#d)", d: "M154.098 190.096h70.513v-84.617h-70.513z" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M224.928 190.096H153.78a3.219 3.219 0 0 1-3.208-3.209V167.92a3.219 3.219 0 0 1 3.208-3.21h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.219 3.219 0 0 1-3.21 3.209M224.928 130.832H153.78a3.218 3.218 0 0 1-3.208-3.208v-18.968a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.218 3.218 0 0 1-3.21 3.208", fill: "#BFCDDD", mask: "url(#d)" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M159.563 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 120.546h-22.461a.802.802 0 0 1-.802-.802v-3.208c0-.443.359-.803.802-.803h22.46c.444 0 .803.36.803.803v3.208c0 .443-.36.802-.802.802", fill: "#FFF", mask: "url(#d)" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M224.928 160.464H153.78a3.218 3.218 0 0 1-3.208-3.209v-18.967a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.209v18.967a3.218 3.218 0 0 1-3.21 3.209", fill: "#BFCDDD", mask: "url(#d)" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M173.455 130.832h49.301M164.984 130.832h6.089M155.952 130.832h6.75M173.837 160.613h49.3M165.365 160.613h6.089M155.57 160.613h6.751", stroke: "#7C90A5", strokeWidth: "1.124", strokeLinecap: "round", strokeLinejoin: "round", mask: "url(#d)" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M159.563 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M166.98 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M174.397 151.038a2.407 2.407 0 1 1 .001-4.814 2.407 2.407 0 0 1 0 4.814M222.539 151.038h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802M159.563 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 179.987h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802", fill: "#FFF", mask: "url(#d)" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M203.04 221.108h-27.372a2.413 2.413 0 0 1-2.406-2.407v-11.448a2.414 2.414 0 0 1 2.406-2.407h27.372a2.414 2.414 0 0 1 2.407 2.407V218.7a2.413 2.413 0 0 1-2.407 2.407", fill: "#BFCDDD", mask: "url(#d)" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M177.259 207.217v11.52M201.05 207.217v11.52", stroke: "#A3B4C6", strokeWidth: "1.124", strokeLinecap: "round", strokeLinejoin: "round", mask: "url(#d)" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M162.873 267.894a9.422 9.422 0 0 1-9.422-9.422v-14.82a9.423 9.423 0 0 1 18.845 0v14.82a9.423 9.423 0 0 1-9.423 9.422", fill: "#5BA02E", mask: "url(#d)" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M171.22 267.83a9.422 9.422 0 0 1-9.422-9.423v-3.438a9.423 9.423 0 0 1 18.845 0v3.438a9.423 9.423 0 0 1-9.422 9.423", fill: "#92C110", mask: "url(#d)" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M181.31 293.666h-27.712a3.209 3.209 0 0 1-3.209-3.21V269.79a3.209 3.209 0 0 1 3.209-3.21h27.711a3.209 3.209 0 0 1 3.209 3.21v20.668a3.209 3.209 0 0 1-3.209 3.209", fill: "#F2D7AD", mask: "url(#d)" }))); }; /* harmony default export */ __webpack_exports__["a"] = (ServerError); /***/ }), /***/ "./components/result/style/index.less": /*!********************************************!*\ !*** ./components/result/style/index.less ***! \********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/result/style/index.tsx": /*!*******************************************!*\ !*** ./components/result/style/index.tsx ***! \*******************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/result/style/index.less"); /***/ }), /***/ "./components/result/unauthorized.tsx": /*!********************************************!*\ !*** ./components/result/unauthorized.tsx ***! \********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var Unauthorized = function Unauthorized() { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { width: "251", height: "294" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("g", { fill: "none", fillRule: "evenodd" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M0 129.023v-2.084C0 58.364 55.591 2.774 124.165 2.774h2.085c68.574 0 124.165 55.59 124.165 124.165v2.084c0 68.575-55.59 124.166-124.165 124.166h-2.085C55.591 253.189 0 197.598 0 129.023", fill: "#E4EBF7" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M41.417 132.92a8.231 8.231 0 1 1-16.38-1.65 8.231 8.231 0 0 1 16.38 1.65", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M38.652 136.36l10.425 5.91M49.989 148.505l-12.58 10.73", stroke: "#FFF", strokeWidth: "2" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M41.536 161.28a5.636 5.636 0 1 1-11.216-1.13 5.636 5.636 0 0 1 11.216 1.13M59.154 145.261a5.677 5.677 0 1 1-11.297-1.138 5.677 5.677 0 0 1 11.297 1.138M100.36 29.516l29.66-.013a4.562 4.562 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 0 0 .005 9.126M111.705 47.754l29.659-.013a4.563 4.563 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 1 0 .005 9.126", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M114.066 29.503V29.5l15.698-.007a4.563 4.563 0 1 0 .004 9.126l-15.698.007v-.002a4.562 4.562 0 0 0-.004-9.122M185.405 137.723c-.55 5.455-5.418 9.432-10.873 8.882-5.456-.55-9.432-5.418-8.882-10.873.55-5.455 5.418-9.432 10.873-8.882 5.455.55 9.432 5.418 8.882 10.873", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M180.17 143.772l12.572 7.129M193.841 158.42L178.67 171.36", stroke: "#FFF", strokeWidth: "2" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M185.55 171.926a6.798 6.798 0 1 1-13.528-1.363 6.798 6.798 0 0 1 13.527 1.363M204.12 155.285a6.848 6.848 0 1 1-13.627-1.375 6.848 6.848 0 0 1 13.626 1.375", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M152.988 194.074a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0zM225.931 118.217a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM217.09 153.051a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.42 0zM177.84 109.842a2.21 2.21 0 1 1-4.422 0 2.21 2.21 0 0 1 4.421 0zM196.114 94.454a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM202.844 182.523a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0z", stroke: "#FFF", strokeWidth: "2" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { stroke: "#FFF", strokeWidth: "2", d: "M215.125 155.262l-1.902 20.075-10.87 5.958M174.601 176.636l-6.322 9.761H156.98l-4.484 6.449M175.874 127.28V111.56M221.51 119.404l-12.77 7.859-15.228-7.86V96.668" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M180.68 29.32C180.68 13.128 193.806 0 210 0c16.193 0 29.32 13.127 29.32 29.32 0 16.194-13.127 29.322-29.32 29.322-16.193 0-29.32-13.128-29.32-29.321", fill: "#A26EF4" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M221.45 41.706l-21.563-.125a1.744 1.744 0 0 1-1.734-1.754l.071-12.23a1.744 1.744 0 0 1 1.754-1.734l21.562.125c.964.006 1.74.791 1.735 1.755l-.071 12.229a1.744 1.744 0 0 1-1.754 1.734", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M215.106 29.192c-.015 2.577-2.049 4.654-4.543 4.64-2.494-.014-4.504-2.115-4.489-4.693l.04-6.925c.016-2.577 2.05-4.654 4.543-4.64 2.494.015 4.504 2.116 4.49 4.693l-.04 6.925zm-4.53-14.074a6.877 6.877 0 0 0-6.916 6.837l-.043 7.368a6.877 6.877 0 0 0 13.754.08l.042-7.368a6.878 6.878 0 0 0-6.837-6.917zM167.566 68.367h-3.93a4.73 4.73 0 0 1-4.717-4.717 4.73 4.73 0 0 1 4.717-4.717h3.93a4.73 4.73 0 0 1 4.717 4.717 4.73 4.73 0 0 1-4.717 4.717", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M168.214 248.838a6.611 6.611 0 0 1-6.61-6.611v-66.108a6.611 6.611 0 0 1 13.221 0v66.108a6.611 6.611 0 0 1-6.61 6.61", fill: "#5BA02E" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M176.147 248.176a6.611 6.611 0 0 1-6.61-6.61v-33.054a6.611 6.611 0 1 1 13.221 0v33.053a6.611 6.611 0 0 1-6.61 6.611", fill: "#92C110" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M185.994 293.89h-27.376a3.17 3.17 0 0 1-3.17-3.17v-45.887a3.17 3.17 0 0 1 3.17-3.17h27.376a3.17 3.17 0 0 1 3.17 3.17v45.886a3.17 3.17 0 0 1-3.17 3.17", fill: "#F2D7AD" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M81.972 147.673s6.377-.927 17.566-1.28c11.729-.371 17.57 1.086 17.57 1.086s3.697-3.855.968-8.424c1.278-12.077 5.982-32.827.335-48.273-1.116-1.339-3.743-1.512-7.536-.62-1.337.315-7.147-.149-7.983-.1l-15.311-.347s-3.487-.17-8.035-.508c-1.512-.113-4.227-1.683-5.458-.338-.406.443-2.425 5.669-1.97 16.077l8.635 35.642s-3.141 3.61 1.219 7.085", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M75.768 73.325l-.9-6.397 11.982-6.52s7.302-.118 8.038 1.205c.737 1.324-5.616.993-5.616.993s-1.836 1.388-2.615 2.5c-1.654 2.363-.986 6.471-8.318 5.986-1.708.284-2.57 2.233-2.57 2.233", fill: "#FFC6A0" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M52.44 77.672s14.217 9.406 24.973 14.444c1.061.497-2.094 16.183-11.892 11.811-7.436-3.318-20.162-8.44-21.482-14.496-.71-3.258 2.543-7.643 8.401-11.76M141.862 80.113s-6.693 2.999-13.844 6.876c-3.894 2.11-10.137 4.704-12.33 7.988-6.224 9.314 3.536 11.22 12.947 7.503 6.71-2.651 28.999-12.127 13.227-22.367", fill: "#FFB594" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M76.166 66.36l3.06 3.881s-2.783 2.67-6.31 5.747c-7.103 6.195-12.803 14.296-15.995 16.44-3.966 2.662-9.754 3.314-12.177-.118-3.553-5.032.464-14.628 31.422-25.95", fill: "#FFC6A0" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M64.674 85.116s-2.34 8.413-8.912 14.447c.652.548 18.586 10.51 22.144 10.056 5.238-.669 6.417-18.968 1.145-20.531-.702-.208-5.901-1.286-8.853-2.167-.87-.26-1.611-1.71-3.545-.936l-1.98-.869zM128.362 85.826s5.318 1.956 7.325 13.734c-.546.274-17.55 12.35-21.829 7.805-6.534-6.94-.766-17.393 4.275-18.61 4.646-1.121 5.03-1.37 10.23-2.929", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M78.18 94.656s.911 7.41-4.914 13.078", stroke: "#E4EBF7", strokeWidth: "1.051", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M87.397 94.68s3.124 2.572 10.263 2.572c7.14 0 9.074-3.437 9.074-3.437", stroke: "#E4EBF7", strokeWidth: ".932", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M117.184 68.639l-6.781-6.177s-5.355-4.314-9.223-.893c-3.867 3.422 4.463 2.083 5.653 4.165 1.19 2.082.848 1.143-2.083.446-5.603-1.331-2.082.893 2.975 5.355 2.091 1.845 6.992.955 6.992.955l2.467-3.851z", fill: "#FFC6A0" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M105.282 91.315l-.297-10.937-15.918-.027-.53 10.45c-.026.403.17.788.515.999 2.049 1.251 9.387 5.093 15.799.424.287-.21.443-.554.431-.91", fill: "#FFB594" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M107.573 74.24c.817-1.147.982-9.118 1.015-11.928a1.046 1.046 0 0 0-.965-1.055l-4.62-.365c-7.71-1.044-17.071.624-18.253 6.346-5.482 5.813-.421 13.244-.421 13.244s1.963 3.566 4.305 6.791c.756 1.041.398-3.731 3.04-5.929 5.524-4.594 15.899-7.103 15.899-7.103", fill: "#5C2552" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M88.426 83.206s2.685 6.202 11.602 6.522c7.82.28 8.973-7.008 7.434-17.505l-.909-5.483c-6.118-2.897-15.478.54-15.478.54s-.576 2.044-.19 5.504c-2.276 2.066-1.824 5.618-1.824 5.618s-.905-1.922-1.98-2.321c-.86-.32-1.897.089-2.322 1.98-1.04 4.632 3.667 5.145 3.667 5.145", fill: "#FFC6A0" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { stroke: "#DB836E", strokeWidth: "1.145", strokeLinecap: "round", strokeLinejoin: "round", d: "M100.843 77.099l1.701-.928-1.015-4.324.674-1.406" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M105.546 74.092c-.022.713-.452 1.279-.96 1.263-.51-.016-.904-.607-.882-1.32.021-.713.452-1.278.96-1.263.51.016.904.607.882 1.32M97.592 74.349c-.022.713-.452 1.278-.961 1.263-.509-.016-.904-.607-.882-1.32.022-.713.452-1.279.961-1.263.51.016.904.606.882 1.32", fill: "#552950" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M91.132 86.786s5.269 4.957 12.679 2.327", stroke: "#DB836E", strokeWidth: "1.145", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M99.776 81.903s-3.592.232-1.44-2.79c1.59-1.496 4.897-.46 4.897-.46s1.156 3.906-3.457 3.25", fill: "#DB836E" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M102.88 70.6s2.483.84 3.402.715M93.883 71.975s2.492-1.144 4.778-1.073", stroke: "#5C2552", strokeWidth: "1.526", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M86.32 77.374s.961.879 1.458 2.106c-.377.48-1.033 1.152-.236 1.809M99.337 83.719s1.911.151 2.509-.254", stroke: "#DB836E", strokeWidth: "1.145", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M87.782 115.821l15.73-3.012M100.165 115.821l10.04-2.008", stroke: "#E4EBF7", strokeWidth: "1.051", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M66.508 86.763s-1.598 8.83-6.697 14.078", stroke: "#E4EBF7", strokeWidth: "1.114", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M128.31 87.934s3.013 4.121 4.06 11.785", stroke: "#E4EBF7", strokeWidth: "1.051", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M64.09 84.816s-6.03 9.912-13.607 9.903", stroke: "#DB836E", strokeWidth: ".795", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M112.366 65.909l-.142 5.32s5.993 4.472 11.945 9.202c4.482 3.562 8.888 7.455 10.985 8.662 4.804 2.766 8.9 3.355 11.076 1.808 4.071-2.894 4.373-9.878-8.136-15.263-4.271-1.838-16.144-6.36-25.728-9.73", fill: "#FFC6A0" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M130.532 85.488s4.588 5.757 11.619 6.214", stroke: "#DB836E", strokeWidth: ".75", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M121.708 105.73s-.393 8.564-1.34 13.612", stroke: "#E4EBF7", strokeWidth: "1.051", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M115.784 161.512s-3.57-1.488-2.678-7.14", stroke: "#648BD8", strokeWidth: "1.051", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M101.52 290.246s4.326 2.057 7.408 1.03c2.842-.948 4.564.673 7.132 1.186 2.57.514 6.925 1.108 11.772-1.269-.104-5.551-6.939-4.01-12.048-6.763-2.582-1.39-3.812-4.757-3.625-8.863h-9.471s-1.402 10.596-1.169 14.68", fill: "#CBD1D1" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M101.496 290.073s2.447 1.281 6.809.658c3.081-.44 3.74.485 7.479 1.039 3.739.554 10.802-.07 11.91-.9.415 1.108-.347 2.077-.347 2.077s-1.523.608-4.847.831c-2.045.137-5.843.293-7.663-.507-1.8-1.385-5.286-1.917-5.77-.243-3.947.958-7.41-.288-7.41-.288l-.16-2.667z", fill: "#2B0849" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M108.824 276.19h3.116s-.103 6.751 4.57 8.62c-4.673.624-8.62-2.32-7.686-8.62", fill: "#A4AABA" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M57.65 272.52s-2.122 7.47-4.518 12.396c-1.811 3.724-4.255 7.548 5.505 7.548 6.698 0 9.02-.483 7.479-6.648-1.541-6.164.268-13.296.268-13.296H57.65z", fill: "#CBD1D1" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M51.54 290.04s2.111 1.178 6.682 1.178c6.128 0 8.31-1.662 8.31-1.662s.605 1.122-.624 2.18c-1 .862-3.624 1.603-7.444 1.559-4.177-.049-5.876-.57-6.786-1.177-.831-.554-.692-1.593-.138-2.078", fill: "#2B0849" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M58.533 274.438s.034 1.529-.315 2.95c-.352 1.431-1.087 3.127-1.139 4.17-.058 1.16 4.57 1.592 5.194.035.623-1.559 1.303-6.475 1.927-7.306.622-.831-4.94-2.135-5.667.15", fill: "#A4AABA" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M100.885 277.015l13.306.092s1.291-54.228 1.843-64.056c.552-9.828 3.756-43.13.997-62.788l-12.48-.64-22.725.776s-.433 3.944-1.19 9.921c-.062.493-.677.838-.744 1.358-.075.582.42 1.347.318 1.956-2.35 14.003-6.343 32.926-8.697 46.425-.116.663-1.227 1.004-1.45 2.677-.04.3.21 1.516.112 1.785-6.836 18.643-10.89 47.584-14.2 61.551l14.528-.014s2.185-8.524 4.008-16.878c2.796-12.817 22.987-84.553 22.987-84.553l3-.517 1.037 46.1s-.223 1.228.334 2.008c.558.782-.556 1.117-.39 2.233l.39 1.784s-.446 7.14-.892 11.826c-.446 4.685-.092 38.954-.092 38.954", fill: "#7BB2F9" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M77.438 220.434c1.146.094 4.016-2.008 6.916-4.91M107.55 223.931s2.758-1.103 6.069-3.862", stroke: "#648BD8", strokeWidth: "1.051", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M108.459 220.905s2.759-1.104 6.07-3.863", stroke: "#648BD8", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M76.099 223.557s2.608-.587 6.47-3.346M87.33 150.82c-.27 3.088.297 8.478-4.315 9.073M104.829 149.075s.11 13.936-1.286 14.983c-2.207 1.655-2.975 1.934-2.975 1.934M101.014 149.63s.035 12.81-1.19 24.245M94.93 174.965s7.174-1.655 9.38-1.655M75.671 204.754c-.316 1.55-.64 3.067-.973 4.535 0 0-1.45 1.822-1.003 3.756.446 1.934-.943 2.034-4.96 15.273-1.686 5.559-4.464 18.49-6.313 27.447-.078.38-4.018 18.06-4.093 18.423M77.043 196.743a313.269 313.269 0 0 1-.877 4.729M83.908 151.414l-1.19 10.413s-1.091.148-.496 2.23c.111 1.34-2.66 15.692-5.153 30.267M57.58 272.94h13.238", stroke: "#648BD8", strokeWidth: "1.051", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M117.377 147.423s-16.955-3.087-35.7.199c.157 2.501-.002 4.128-.002 4.128s14.607-2.802 35.476-.31c.251-2.342.226-4.017.226-4.017", fill: "#192064" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M107.511 150.353l.004-4.885a.807.807 0 0 0-.774-.81c-2.428-.092-5.04-.108-7.795-.014a.814.814 0 0 0-.784.81l-.003 4.88c0 .456.371.82.827.808a140.76 140.76 0 0 1 7.688.017.81.81 0 0 0 .837-.806", fill: "#FFF" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M106.402 149.426l.002-3.06a.64.64 0 0 0-.616-.643 94.135 94.135 0 0 0-5.834-.009.647.647 0 0 0-.626.643l-.001 3.056c0 .36.291.648.651.64 1.78-.04 3.708-.041 5.762.012.36.009.662-.279.662-.64", fill: "#192064" }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M101.485 273.933h12.272M102.652 269.075c.006 3.368.04 5.759.11 6.47M102.667 263.125c-.009 1.53-.015 2.98-.016 4.313M102.204 174.024l.893 44.402s.669 1.561-.224 2.677c-.892 1.116 2.455.67.893 2.231-1.562 1.562.893 1.116 0 3.347-.592 1.48-.988 20.987-1.09 34.956", stroke: "#648BD8", strokeWidth: "1.051", strokeLinecap: "round", strokeLinejoin: "round" }))); }; /* harmony default export */ __webpack_exports__["a"] = (Unauthorized); /***/ }), /***/ "./components/row/index.tsx": /*!**********************************!*\ !*** ./components/row/index.tsx ***! \**********************************/ /*! exports provided: RowProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../grid */ "./components/grid/index.tsx"); /* harmony default export */ __webpack_exports__["a"] = (_grid__WEBPACK_IMPORTED_MODULE_0__[/* Row */ "b"]); /***/ }), /***/ "./components/row/style/index.tsx": /*!****************************************!*\ !*** ./components/row/style/index.tsx ***! \****************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _grid_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../grid/style */ "./components/grid/style/index.tsx"); // style dependencies // deps-lint-skip: grid /***/ }), /***/ "./components/select/index.tsx": /*!*************************************!*\ !*** ./components/select/index.tsx ***! \*************************************/ /*! exports provided: OptionProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var rc_select__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-select */ "./node_modules/rc-select/es/index.js"); /* harmony import */ var rc_select_es_Option__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-select/es/Option */ "./node_modules/rc-select/es/Option.js"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _utils_iconUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/iconUtil */ "./components/select/utils/iconUtil.tsx"); /* harmony import */ var _config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../config-provider/SizeContext */ "./components/config-provider/SizeContext.tsx"); /* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../_util/motion */ "./components/_util/motion.tsx"); // TODO: 4.0 - codemod should help to change `filterOption` to support node props. var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var SECRET_COMBOBOX_MODE_DO_NOT_USE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE'; var InternalSelect = function InternalSelect(_a, ref) { var _classNames2; var customizePrefixCls = _a.prefixCls, _a$bordered = _a.bordered, bordered = _a$bordered === void 0 ? true : _a$bordered, className = _a.className, getPopupContainer = _a.getPopupContainer, dropdownClassName = _a.dropdownClassName, _a$listHeight = _a.listHeight, listHeight = _a$listHeight === void 0 ? 256 : _a$listHeight, _a$listItemHeight = _a.listItemHeight, listItemHeight = _a$listItemHeight === void 0 ? 24 : _a$listItemHeight, customizeSize = _a.size, notFoundContent = _a.notFoundContent, props = __rest(_a, ["prefixCls", "bordered", "className", "getPopupContainer", "dropdownClassName", "listHeight", "listItemHeight", "size", "notFoundContent"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_7__[/* ConfigContext */ "b"]), getContextPopupContainer = _React$useContext.getPopupContainer, getPrefixCls = _React$useContext.getPrefixCls, renderEmpty = _React$useContext.renderEmpty, direction = _React$useContext.direction, virtual = _React$useContext.virtual, dropdownMatchSelectWidth = _React$useContext.dropdownMatchSelectWidth; var size = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_9__[/* default */ "b"]); var prefixCls = getPrefixCls('select', customizePrefixCls); var rootPrefixCls = getPrefixCls(); var mode = react__WEBPACK_IMPORTED_MODULE_2__["useMemo"](function () { var m = props.mode; if (m === 'combobox') { return undefined; } if (m === SECRET_COMBOBOX_MODE_DO_NOT_USE) { return 'combobox'; } return m; }, [props.mode]); var isMultiple = mode === 'multiple' || mode === 'tags'; // ===================== Empty ===================== var mergedNotFound; if (notFoundContent !== undefined) { mergedNotFound = notFoundContent; } else if (mode === 'combobox') { mergedNotFound = null; } else { mergedNotFound = renderEmpty('Select'); } // ===================== Icons ===================== var _getIcons = Object(_utils_iconUtil__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, props), { multiple: isMultiple, prefixCls: prefixCls })), suffixIcon = _getIcons.suffixIcon, itemIcon = _getIcons.itemIcon, removeIcon = _getIcons.removeIcon, clearIcon = _getIcons.clearIcon; var selectProps = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(props, ['suffixIcon', 'itemIcon']); var rcSelectRtlDropDownClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()(dropdownClassName, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(prefixCls, "-dropdown-").concat(direction), direction === 'rtl')); var mergedSize = customizeSize || size; var mergedClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()((_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-lg"), mergedSize === 'large'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-sm"), mergedSize === 'small'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-rtl"), direction === 'rtl'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-borderless"), !bordered), _classNames2), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](rc_select__WEBPACK_IMPORTED_MODULE_5__[/* default */ "c"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ ref: ref, virtual: virtual, dropdownMatchSelectWidth: dropdownMatchSelectWidth }, selectProps, { transitionName: Object(_util_motion__WEBPACK_IMPORTED_MODULE_10__[/* getTransitionName */ "b"])(rootPrefixCls, 'slide-up', props.transitionName), listHeight: listHeight, listItemHeight: listItemHeight, mode: mode, prefixCls: prefixCls, direction: direction, inputIcon: suffixIcon, menuItemSelectedIcon: itemIcon, removeIcon: removeIcon, clearIcon: clearIcon, notFoundContent: mergedNotFound, className: mergedClassName, getPopupContainer: getPopupContainer || getContextPopupContainer, dropdownClassName: rcSelectRtlDropDownClassName })); }; var SelectRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](InternalSelect); var Select = SelectRef; Select.SECRET_COMBOBOX_MODE_DO_NOT_USE = SECRET_COMBOBOX_MODE_DO_NOT_USE; Select.Option = rc_select__WEBPACK_IMPORTED_MODULE_5__[/* Option */ "b"]; Select.OptGroup = rc_select__WEBPACK_IMPORTED_MODULE_5__[/* OptGroup */ "a"]; /* harmony default export */ __webpack_exports__["a"] = (Select); /***/ }), /***/ "./components/select/style/index.less": /*!********************************************!*\ !*** ./components/select/style/index.less ***! \********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/select/style/index.tsx": /*!*******************************************!*\ !*** ./components/select/style/index.tsx ***! \*******************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/select/style/index.less"); /* harmony import */ var _empty_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../empty/style */ "./components/empty/style/index.tsx"); // style dependencies /***/ }), /***/ "./components/select/utils/iconUtil.tsx": /*!**********************************************!*\ !*** ./components/select/utils/iconUtil.tsx ***! \**********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getIcons; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _ant_design_icons_es_icons_DownOutlined__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/icons/es/icons/DownOutlined */ "./node_modules/@ant-design/icons/es/icons/DownOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_LoadingOutlined__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ant-design/icons/es/icons/LoadingOutlined */ "./node_modules/@ant-design/icons/es/icons/LoadingOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_CheckOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons/es/icons/CheckOutlined */ "./node_modules/@ant-design/icons/es/icons/CheckOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseOutlined */ "./node_modules/@ant-design/icons/es/icons/CloseOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseCircleFilled */ "./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js"); /* harmony import */ var _ant_design_icons_es_icons_SearchOutlined__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ant-design/icons/es/icons/SearchOutlined */ "./node_modules/@ant-design/icons/es/icons/SearchOutlined.js"); function getIcons(_ref) { var suffixIcon = _ref.suffixIcon, clearIcon = _ref.clearIcon, menuItemSelectedIcon = _ref.menuItemSelectedIcon, removeIcon = _ref.removeIcon, loading = _ref.loading, multiple = _ref.multiple, prefixCls = _ref.prefixCls; // Clear Icon var mergedClearIcon = clearIcon; if (!clearIcon) { mergedClearIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], null); } // Arrow item icon var mergedSuffixIcon = null; if (suffixIcon !== undefined) { mergedSuffixIcon = suffixIcon; } else if (loading) { mergedSuffixIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_ant_design_icons_es_icons_LoadingOutlined__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], { spin: true }); } else { var iconCls = "".concat(prefixCls, "-suffix"); mergedSuffixIcon = function mergedSuffixIcon(_ref2) { var open = _ref2.open, showSearch = _ref2.showSearch; if (open && showSearch) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_ant_design_icons_es_icons_SearchOutlined__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], { className: iconCls }); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_ant_design_icons_es_icons_DownOutlined__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"], { className: iconCls }); }; } // Checked item icon var mergedItemIcon = null; if (menuItemSelectedIcon !== undefined) { mergedItemIcon = menuItemSelectedIcon; } else if (multiple) { mergedItemIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_ant_design_icons_es_icons_CheckOutlined__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], null); } else { mergedItemIcon = null; } var mergedRemoveIcon = null; if (removeIcon !== undefined) { mergedRemoveIcon = removeIcon; } else { mergedRemoveIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], null); } return { clearIcon: mergedClearIcon, suffixIcon: mergedSuffixIcon, itemIcon: mergedItemIcon, removeIcon: mergedRemoveIcon }; } /***/ }), /***/ "./components/skeleton/Avatar.tsx": /*!****************************************!*\ !*** ./components/skeleton/Avatar.tsx ***! \****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _Element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Element */ "./components/skeleton/Element.tsx"); var SkeletonAvatar = function SkeletonAvatar(props) { var renderSkeletonAvatar = function renderSkeletonAvatar(_ref) { var getPrefixCls = _ref.getPrefixCls; var customizePrefixCls = props.prefixCls, className = props.className, active = props.active; var prefixCls = getPrefixCls('skeleton', customizePrefixCls); var otherProps = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(props, ['prefixCls']); var cls = classnames__WEBPACK_IMPORTED_MODULE_4___default()(prefixCls, "".concat(prefixCls, "-element"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(prefixCls, "-active"), active), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: cls }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Element__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ prefixCls: "".concat(prefixCls, "-avatar") }, otherProps))); }; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_5__[/* ConfigConsumer */ "a"], null, renderSkeletonAvatar); }; SkeletonAvatar.defaultProps = { size: 'default', shape: 'circle' }; /* harmony default export */ __webpack_exports__["a"] = (SkeletonAvatar); /***/ }), /***/ "./components/skeleton/Button.tsx": /*!****************************************!*\ !*** ./components/skeleton/Button.tsx ***! \****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _Element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Element */ "./components/skeleton/Element.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var SkeletonButton = function SkeletonButton(props) { var renderSkeletonButton = function renderSkeletonButton(_ref) { var getPrefixCls = _ref.getPrefixCls; var customizePrefixCls = props.prefixCls, className = props.className, active = props.active; var prefixCls = getPrefixCls('skeleton', customizePrefixCls); var otherProps = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(props, ['prefixCls']); var cls = classnames__WEBPACK_IMPORTED_MODULE_4___default()(prefixCls, "".concat(prefixCls, "-element"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(prefixCls, "-active"), active), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: cls }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Element__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ prefixCls: "".concat(prefixCls, "-button") }, otherProps))); }; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_6__[/* ConfigConsumer */ "a"], null, renderSkeletonButton); }; SkeletonButton.defaultProps = { size: 'default' }; /* harmony default export */ __webpack_exports__["a"] = (SkeletonButton); /***/ }), /***/ "./components/skeleton/Element.tsx": /*!*****************************************!*\ !*** ./components/skeleton/Element.tsx ***! \*****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); var Element = function Element(props) { var _classNames, _classNames2; var prefixCls = props.prefixCls, className = props.className, style = props.style, size = props.size, shape = props.shape; var sizeCls = classnames__WEBPACK_IMPORTED_MODULE_3___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-lg"), size === 'large'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-sm"), size === 'small'), _classNames)); var shapeCls = classnames__WEBPACK_IMPORTED_MODULE_3___default()((_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-circle"), shape === 'circle'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-square"), shape === 'square'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-round"), shape === 'round'), _classNames2)); var sizeStyle = typeof size === 'number' ? { width: size, height: size, lineHeight: "".concat(size, "px") } : {}; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(prefixCls, sizeCls, shapeCls, className), style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, sizeStyle), style) }); }; /* harmony default export */ __webpack_exports__["a"] = (Element); /***/ }), /***/ "./components/skeleton/Image.tsx": /*!***************************************!*\ !*** ./components/skeleton/Image.tsx ***! \***************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var path = 'M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z'; var SkeletonImage = function SkeletonImage(props) { var renderSkeletonImage = function renderSkeletonImage(_ref) { var getPrefixCls = _ref.getPrefixCls; var customizePrefixCls = props.prefixCls, className = props.className, style = props.style; var prefixCls = getPrefixCls('skeleton', customizePrefixCls); var cls = classnames__WEBPACK_IMPORTED_MODULE_1___default()(prefixCls, "".concat(prefixCls, "-element"), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cls }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: classnames__WEBPACK_IMPORTED_MODULE_1___default()("".concat(prefixCls, "-image"), className), style: style }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { viewBox: "0 0 1098 1024", xmlns: "http://www.w3.org/2000/svg", className: "".concat(prefixCls, "-image-svg") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: path, className: "".concat(prefixCls, "-image-path") })))); }; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_2__[/* ConfigConsumer */ "a"], null, renderSkeletonImage); }; /* harmony default export */ __webpack_exports__["a"] = (SkeletonImage); /***/ }), /***/ "./components/skeleton/Input.tsx": /*!***************************************!*\ !*** ./components/skeleton/Input.tsx ***! \***************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _Element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Element */ "./components/skeleton/Element.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var SkeletonInput = function SkeletonInput(props) { var renderSkeletonInput = function renderSkeletonInput(_ref) { var getPrefixCls = _ref.getPrefixCls; var customizePrefixCls = props.prefixCls, className = props.className, active = props.active; var prefixCls = getPrefixCls('skeleton', customizePrefixCls); var otherProps = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(props, ['prefixCls']); var cls = classnames__WEBPACK_IMPORTED_MODULE_4___default()(prefixCls, "".concat(prefixCls, "-element"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(prefixCls, "-active"), active), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: cls }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Element__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ prefixCls: "".concat(prefixCls, "-input") }, otherProps))); }; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_6__[/* ConfigConsumer */ "a"], null, renderSkeletonInput); }; SkeletonInput.defaultProps = { size: 'default' }; /* harmony default export */ __webpack_exports__["a"] = (SkeletonInput); /***/ }), /***/ "./components/skeleton/Paragraph.tsx": /*!*******************************************!*\ !*** ./components/skeleton/Paragraph.tsx ***! \*******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); var Paragraph = function Paragraph(props) { var getWidth = function getWidth(index) { var width = props.width, _props$rows = props.rows, rows = _props$rows === void 0 ? 2 : _props$rows; if (Array.isArray(width)) { return width[index]; } // last paragraph if (rows - 1 === index) { return width; } return undefined; }; var prefixCls = props.prefixCls, className = props.className, style = props.style, rows = props.rows; var rowList = Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Array(rows)).map(function (_, index) { return ( /*#__PURE__*/ // eslint-disable-next-line react/no-array-index-key react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("li", { key: index, style: { width: getWidth(index) } }) ); }); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("ul", { className: classnames__WEBPACK_IMPORTED_MODULE_2___default()(prefixCls, className), style: style }, rowList); }; /* harmony default export */ __webpack_exports__["a"] = (Paragraph); /***/ }), /***/ "./components/skeleton/Skeleton.tsx": /*!******************************************!*\ !*** ./components/skeleton/Skeleton.tsx ***! \******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _Title__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Title */ "./components/skeleton/Title.tsx"); /* harmony import */ var _Paragraph__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Paragraph */ "./components/skeleton/Paragraph.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _Element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Element */ "./components/skeleton/Element.tsx"); /* harmony import */ var _Avatar__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Avatar */ "./components/skeleton/Avatar.tsx"); /* harmony import */ var _Button__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Button */ "./components/skeleton/Button.tsx"); /* harmony import */ var _Input__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Input */ "./components/skeleton/Input.tsx"); /* harmony import */ var _Image__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Image */ "./components/skeleton/Image.tsx"); function getComponentProps(prop) { if (prop && Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(prop) === 'object') { return prop; } return {}; } function getAvatarBasicProps(hasTitle, hasParagraph) { if (hasTitle && !hasParagraph) { // Square avatar return { size: 'large', shape: 'square' }; } return { size: 'large', shape: 'circle' }; } function getTitleBasicProps(hasAvatar, hasParagraph) { if (!hasAvatar && hasParagraph) { return { width: '38%' }; } if (hasAvatar && hasParagraph) { return { width: '50%' }; } return {}; } function getParagraphBasicProps(hasAvatar, hasTitle) { var basicProps = {}; // Width if (!hasAvatar || !hasTitle) { basicProps.width = '61%'; } // Rows if (!hasAvatar && hasTitle) { basicProps.rows = 3; } else { basicProps.rows = 2; } return basicProps; } var Skeleton = function Skeleton(props) { var renderSkeleton = function renderSkeleton(_ref) { var getPrefixCls = _ref.getPrefixCls, direction = _ref.direction; var customizePrefixCls = props.prefixCls, loading = props.loading, className = props.className, children = props.children, avatar = props.avatar, title = props.title, paragraph = props.paragraph, active = props.active, round = props.round; var prefixCls = getPrefixCls('skeleton', customizePrefixCls); if (loading || !('loading' in props)) { var _classNames; var hasAvatar = !!avatar; var hasTitle = !!title; var hasParagraph = !!paragraph; // Avatar var avatarNode; if (hasAvatar) { var avatarProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ prefixCls: "".concat(prefixCls, "-avatar") }, getAvatarBasicProps(hasTitle, hasParagraph)), getComponentProps(avatar)); // We direct use SkeletonElement as avatar in skeleton internal. avatarNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(prefixCls, "-header") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_Element__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], avatarProps)); } var contentNode; if (hasTitle || hasParagraph) { // Title var $title; if (hasTitle) { var titleProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ prefixCls: "".concat(prefixCls, "-title") }, getTitleBasicProps(hasAvatar, hasParagraph)), getComponentProps(title)); $title = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_Title__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], titleProps); } // Paragraph var paragraphNode; if (hasParagraph) { var paragraphProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ prefixCls: "".concat(prefixCls, "-paragraph") }, getParagraphBasicProps(hasAvatar, hasTitle)), getComponentProps(paragraph)); paragraphNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_Paragraph__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], paragraphProps); } contentNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(prefixCls, "-content") }, $title, paragraphNode); } var cls = classnames__WEBPACK_IMPORTED_MODULE_4___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-with-avatar"), hasAvatar), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-active"), active), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-round"), round), _classNames), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: cls }, avatarNode, contentNode); } return children; }; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_7__[/* ConfigConsumer */ "a"], null, renderSkeleton); }; Skeleton.defaultProps = { avatar: false, title: true, paragraph: true }; Skeleton.Button = _Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"]; Skeleton.Avatar = _Avatar__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"]; Skeleton.Input = _Input__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"]; Skeleton.Image = _Image__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"]; /* harmony default export */ __webpack_exports__["a"] = (Skeleton); /***/ }), /***/ "./components/skeleton/Title.tsx": /*!***************************************!*\ !*** ./components/skeleton/Title.tsx ***! \***************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); /* eslint-disable jsx-a11y/heading-has-content */ var Title = function Title(_ref) { var prefixCls = _ref.prefixCls, className = _ref.className, width = _ref.width, style = _ref.style; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("h3", { className: classnames__WEBPACK_IMPORTED_MODULE_2___default()(prefixCls, className), style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ width: width }, style) }); }; /* harmony default export */ __webpack_exports__["a"] = (Title); /***/ }), /***/ "./components/skeleton/index.tsx": /*!***************************************!*\ !*** ./components/skeleton/index.tsx ***! \***************************************/ /*! exports provided: SkeletonProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _Skeleton__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Skeleton */ "./components/skeleton/Skeleton.tsx"); /* harmony default export */ __webpack_exports__["a"] = (_Skeleton__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]); /***/ }), /***/ "./components/skeleton/style/index.less": /*!**********************************************!*\ !*** ./components/skeleton/style/index.less ***! \**********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/skeleton/style/index.tsx": /*!*********************************************!*\ !*** ./components/skeleton/style/index.tsx ***! \*********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/skeleton/style/index.less"); /***/ }), /***/ "./components/slider/SliderTooltip.tsx": /*!*********************************************!*\ !*** ./components/slider/SliderTooltip.tsx ***! \*********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-util/es/ref */ "./node_modules/rc-util/es/ref.js"); /* harmony import */ var rc_util_es_raf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/es/raf */ "./node_modules/rc-util/es/raf.js"); /* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../tooltip */ "./components/tooltip/index.tsx"); var SliderTooltip = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["forwardRef"](function (props, ref) { var visible = props.visible; var innerRef = Object(react__WEBPACK_IMPORTED_MODULE_1__["useRef"])(null); var rafRef = Object(react__WEBPACK_IMPORTED_MODULE_1__["useRef"])(null); function cancelKeepAlign() { rc_util_es_raf__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].cancel(rafRef.current); rafRef.current = null; } function keepAlign() { rafRef.current = Object(rc_util_es_raf__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(function () { var _a; (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.forcePopupAlign(); rafRef.current = null; }); } react__WEBPACK_IMPORTED_MODULE_1__["useEffect"](function () { if (visible) { keepAlign(); } else { cancelKeepAlign(); } return cancelKeepAlign; }, [visible, props.title]); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_tooltip__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ ref: Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_2__[/* composeRef */ "a"])(innerRef, ref) }, props)); }); /* harmony default export */ __webpack_exports__["a"] = (SliderTooltip); /***/ }), /***/ "./components/slider/index.tsx": /*!*************************************!*\ !*** ./components/slider/index.tsx ***! \*************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var rc_slider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-slider */ "./node_modules/rc-slider/es/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _SliderTooltip__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./SliderTooltip */ "./components/slider/SliderTooltip.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Slider = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["forwardRef"](function (props, ref) { var _React$useContext = react__WEBPACK_IMPORTED_MODULE_4__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_8__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction, getPopupContainer = _React$useContext.getPopupContainer; var _React$useState = react__WEBPACK_IMPORTED_MODULE_4__["useState"]({}), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_React$useState, 2), visibles = _React$useState2[0], setVisibles = _React$useState2[1]; var toggleTooltipVisible = function toggleTooltipVisible(index, visible) { setVisibles(function (prev) { return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, prev), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, index, visible)); }); }; var getTooltipPlacement = function getTooltipPlacement(tooltipPlacement, vertical) { if (tooltipPlacement) { return tooltipPlacement; } if (!vertical) { return 'top'; } return direction === 'rtl' ? 'left' : 'right'; }; var handleWithTooltip = function handleWithTooltip(_a) { var tooltipPrefixCls = _a.tooltipPrefixCls, prefixCls = _a.prefixCls, _b = _a.info, value = _b.value, dragging = _b.dragging, index = _b.index, restProps = __rest(_b, ["value", "dragging", "index"]); var tipFormatter = props.tipFormatter, tooltipVisible = props.tooltipVisible, tooltipPlacement = props.tooltipPlacement, getTooltipPopupContainer = props.getTooltipPopupContainer, vertical = props.vertical; var isTipFormatter = tipFormatter ? visibles[index] || dragging : false; var visible = tooltipVisible || tooltipVisible === undefined && isTipFormatter; var rootPrefixCls = getPrefixCls(); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_SliderTooltip__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], { prefixCls: tooltipPrefixCls, title: tipFormatter ? tipFormatter(value) : '', visible: visible, placement: getTooltipPlacement(tooltipPlacement, vertical), transitionName: "".concat(rootPrefixCls, "-zoom-down"), key: index, overlayClassName: "".concat(prefixCls, "-tooltip"), getPopupContainer: getTooltipPopupContainer || getPopupContainer }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](rc_slider__WEBPACK_IMPORTED_MODULE_5__[/* Handle */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, restProps, { value: value, onMouseEnter: function onMouseEnter() { return toggleTooltipVisible(index, true); }, onMouseLeave: function onMouseLeave() { return toggleTooltipVisible(index, false); } }))); }; var customizePrefixCls = props.prefixCls, customizeTooltipPrefixCls = props.tooltipPrefixCls, range = props.range, className = props.className, restProps = __rest(props, ["prefixCls", "tooltipPrefixCls", "range", "className"]); var prefixCls = getPrefixCls('slider', customizePrefixCls); var tooltipPrefixCls = getPrefixCls('tooltip', customizeTooltipPrefixCls); var cls = classnames__WEBPACK_IMPORTED_MODULE_6___default()(className, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(prefixCls, "-rtl"), direction === 'rtl')); // make reverse default on rtl direction if (direction === 'rtl' && !restProps.vertical) { restProps.reverse = !restProps.reverse; } // extrack draggableTrack from range={{ ... }} var draggableTrack; if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(range) === 'object') { draggableTrack = range.draggableTrack; } if (range) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](rc_slider__WEBPACK_IMPORTED_MODULE_5__[/* Range */ "b"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, restProps, { step: restProps.step, draggableTrack: draggableTrack, className: cls, ref: ref, handle: function handle(info) { return handleWithTooltip({ tooltipPrefixCls: tooltipPrefixCls, prefixCls: prefixCls, info: info }); }, prefixCls: prefixCls })); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](rc_slider__WEBPACK_IMPORTED_MODULE_5__[/* default */ "c"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, restProps, { step: restProps.step, className: cls, ref: ref, handle: function handle(info) { return handleWithTooltip({ tooltipPrefixCls: tooltipPrefixCls, prefixCls: prefixCls, info: info }); }, prefixCls: prefixCls })); }); Slider.displayName = 'Slider'; Slider.defaultProps = { tipFormatter: function tipFormatter(value) { return typeof value === 'number' ? value.toString() : ''; } }; /* harmony default export */ __webpack_exports__["a"] = (Slider); /***/ }), /***/ "./components/slider/style/index.less": /*!********************************************!*\ !*** ./components/slider/style/index.less ***! \********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/slider/style/index.tsx": /*!*******************************************!*\ !*** ./components/slider/style/index.tsx ***! \*******************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/slider/style/index.less"); /* harmony import */ var _tooltip_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../tooltip/style */ "./components/tooltip/style/index.tsx"); // style dependencies /***/ }), /***/ "./components/space/Item.tsx": /*!***********************************!*\ !*** ./components/space/Item.tsx ***! \***********************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Item; }); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! . */ "./components/space/index.tsx"); function Item(_ref) { var className = _ref.className, direction = _ref.direction, index = _ref.index, marginDirection = _ref.marginDirection, children = _ref.children, split = _ref.split, wrap = _ref.wrap; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](___WEBPACK_IMPORTED_MODULE_3__[/* SpaceContext */ "a"]), horizontalSize = _React$useContext.horizontalSize, verticalSize = _React$useContext.verticalSize, latestIndex = _React$useContext.latestIndex, supportFlexGap = _React$useContext.supportFlexGap; var style = {}; if (!supportFlexGap) { if (direction === 'vertical') { if (index < latestIndex) { style = { marginBottom: horizontalSize / (split ? 2 : 1) }; } } else { style = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, index < latestIndex && Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, marginDirection, horizontalSize / (split ? 2 : 1))), wrap && { paddingBottom: verticalSize }); } } if (children === null || children === undefined) { return null; } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](react__WEBPACK_IMPORTED_MODULE_2__["Fragment"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: className, style: style }, children), index < latestIndex && split && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { className: "".concat(className, "-split"), style: style }, split)); } /***/ }), /***/ "./components/space/index.tsx": /*!************************************!*\ !*** ./components/space/index.tsx ***! \************************************/ /*! exports provided: SpaceContext, default */ /*! exports used: SpaceContext, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SpaceContext; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/Children/toArray */ "./node_modules/rc-util/es/Children/toArray.js"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _Item__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Item */ "./components/space/Item.tsx"); /* harmony import */ var _util_hooks_useFlexGapSupport__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../_util/hooks/useFlexGapSupport */ "./components/_util/hooks/useFlexGapSupport.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var SpaceContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createContext"]({ latestIndex: 0, horizontalSize: 0, verticalSize: 0, supportFlexGap: false }); var spaceSize = { small: 8, middle: 16, large: 24 }; function getNumberSize(size) { return typeof size === 'string' ? spaceSize[size] : size || 0; } var Space = function Space(props) { var _classNames; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_3__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_6__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, space = _React$useContext.space, directionConfig = _React$useContext.direction; var _props$size = props.size, size = _props$size === void 0 ? (space === null || space === void 0 ? void 0 : space.size) || 'small' : _props$size, align = props.align, className = props.className, children = props.children, _props$direction = props.direction, direction = _props$direction === void 0 ? 'horizontal' : _props$direction, customizePrefixCls = props.prefixCls, split = props.split, style = props.style, _props$wrap = props.wrap, wrap = _props$wrap === void 0 ? false : _props$wrap, otherProps = __rest(props, ["size", "align", "className", "children", "direction", "prefixCls", "split", "style", "wrap"]); var supportFlexGap = Object(_util_hooks_useFlexGapSupport__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(); var _React$useMemo = react__WEBPACK_IMPORTED_MODULE_3__["useMemo"](function () { return (Array.isArray(size) ? size : [size, size]).map(function (item) { return getNumberSize(item); }); }, [size]), _React$useMemo2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_React$useMemo, 2), horizontalSize = _React$useMemo2[0], verticalSize = _React$useMemo2[1]; var childNodes = Object(rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(children, { keepEmpty: true }); var mergedAlign = align === undefined && direction === 'horizontal' ? 'center' : align; var prefixCls = getPrefixCls('space', customizePrefixCls); var cn = classnames__WEBPACK_IMPORTED_MODULE_4___default()(prefixCls, "".concat(prefixCls, "-").concat(direction), (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), directionConfig === 'rtl'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-align-").concat(mergedAlign), mergedAlign), _classNames), className); var itemClassName = "".concat(prefixCls, "-item"); var marginDirection = directionConfig === 'rtl' ? 'marginLeft' : 'marginRight'; // Calculate latest one var latestIndex = 0; var nodes = childNodes.map(function (child, i) { if (child !== null && child !== undefined) { latestIndex = i; } /* eslint-disable react/no-array-index-key */ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_Item__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], { className: itemClassName, key: "".concat(itemClassName, "-").concat(i), direction: direction, index: i, marginDirection: marginDirection, split: split, wrap: wrap }, child); /* eslint-enable */ }); var spaceContext = react__WEBPACK_IMPORTED_MODULE_3__["useMemo"](function () { return { horizontalSize: horizontalSize, verticalSize: verticalSize, latestIndex: latestIndex, supportFlexGap: supportFlexGap }; }, [horizontalSize, verticalSize, latestIndex, supportFlexGap]); // =========================== Render =========================== if (childNodes.length === 0) { return null; } var gapStyle = {}; if (supportFlexGap) { gapStyle.columnGap = horizontalSize; gapStyle.rowGap = verticalSize; } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ className: cn, style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, gapStyle), wrap && { flexWrap: 'wrap', marginBottom: -verticalSize }), style) }, otherProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](SpaceContext.Provider, { value: spaceContext }, nodes)); }; /* harmony default export */ __webpack_exports__["b"] = (Space); /***/ }), /***/ "./components/space/style/index.less": /*!*******************************************!*\ !*** ./components/space/style/index.less ***! \*******************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/space/style/index.tsx": /*!******************************************!*\ !*** ./components/space/style/index.tsx ***! \******************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/space/style/index.less"); /***/ }), /***/ "./components/spin/index.tsx": /*!***********************************!*\ !*** ./components/spin/index.tsx ***! \***********************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash/debounce */ "./node_modules/lodash/debounce.js"); /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_type__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../_util/type */ "./components/_util/type.ts"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var SpinSizes = Object(_util_type__WEBPACK_IMPORTED_MODULE_11__[/* tuple */ "a"])('small', 'default', 'large'); // Render indicator var defaultIndicator = null; function renderIndicator(prefixCls, props) { var indicator = props.indicator; var dotClassName = "".concat(prefixCls, "-dot"); // should not be render default indicator when indicator value is null if (indicator === null) { return null; } if (Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_12__[/* isValidElement */ "b"])(indicator)) { return Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_12__[/* cloneElement */ "a"])(indicator, { className: classnames__WEBPACK_IMPORTED_MODULE_7___default()(indicator.props.className, dotClassName) }); } if (Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_12__[/* isValidElement */ "b"])(defaultIndicator)) { return Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_12__[/* cloneElement */ "a"])(defaultIndicator, { className: classnames__WEBPACK_IMPORTED_MODULE_7___default()(defaultIndicator.props.className, dotClassName) }); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("span", { className: classnames__WEBPACK_IMPORTED_MODULE_7___default()(dotClassName, "".concat(prefixCls, "-dot-spin")) }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("i", { className: "".concat(prefixCls, "-dot-item") }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("i", { className: "".concat(prefixCls, "-dot-item") }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("i", { className: "".concat(prefixCls, "-dot-item") }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("i", { className: "".concat(prefixCls, "-dot-item") })); } function shouldDelay(spinning, delay) { return !!spinning && !!delay && !isNaN(Number(delay)); } var Spin = /*#__PURE__*/function (_React$Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Spin, _React$Component); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(Spin); function Spin(props) { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, Spin); _this = _super.call(this, props); _this.debouncifyUpdateSpinning = function (props) { var _ref = props || _this.props, delay = _ref.delay; if (delay) { _this.cancelExistingSpin(); _this.updateSpinning = lodash_debounce__WEBPACK_IMPORTED_MODULE_9___default()(_this.originalUpdateSpinning, delay); } }; _this.updateSpinning = function () { var spinning = _this.props.spinning; var currentSpinning = _this.state.spinning; if (currentSpinning !== spinning) { _this.setState({ spinning: spinning }); } }; _this.renderSpin = function (_ref2) { var _classNames; var getPrefixCls = _ref2.getPrefixCls, direction = _ref2.direction; var _a = _this.props, customizePrefixCls = _a.prefixCls, className = _a.className, size = _a.size, tip = _a.tip, wrapperClassName = _a.wrapperClassName, style = _a.style, restProps = __rest(_a, ["prefixCls", "className", "size", "tip", "wrapperClassName", "style"]); var spinning = _this.state.spinning; var prefixCls = getPrefixCls('spin', customizePrefixCls); var spinClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-sm"), size === 'small'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-lg"), size === 'large'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-spinning"), spinning), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-show-text"), !!tip), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className); // fix https://fb.me/react-unknown-prop var divProps = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(restProps, ['spinning', 'delay', 'indicator']); var spinElement = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, divProps, { style: style, className: spinClassName }), renderIndicator(prefixCls, _this.props), tip ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", { className: "".concat(prefixCls, "-text") }, tip) : null); if (_this.isNestedPattern()) { var containerClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()("".concat(prefixCls, "-container"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(prefixCls, "-blur"), spinning)); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, divProps, { className: classnames__WEBPACK_IMPORTED_MODULE_7___default()("".concat(prefixCls, "-nested-loading"), wrapperClassName) }), spinning && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", { key: "loading" }, spinElement), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", { className: containerClassName, key: "container" }, _this.props.children)); } return spinElement; }; var spinning = props.spinning, delay = props.delay; var shouldBeDelayed = shouldDelay(spinning, delay); _this.state = { spinning: spinning && !shouldBeDelayed }; _this.originalUpdateSpinning = _this.updateSpinning; _this.debouncifyUpdateSpinning(props); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Spin, [{ key: "componentDidMount", value: function componentDidMount() { this.updateSpinning(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { this.debouncifyUpdateSpinning(); this.updateSpinning(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.cancelExistingSpin(); } }, { key: "cancelExistingSpin", value: function cancelExistingSpin() { var updateSpinning = this.updateSpinning; if (updateSpinning && updateSpinning.cancel) { updateSpinning.cancel(); } } }, { key: "isNestedPattern", value: function isNestedPattern() { return !!(this.props && typeof this.props.children !== 'undefined'); } }, { key: "render", value: function render() { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_10__[/* ConfigConsumer */ "a"], null, this.renderSpin); } }], [{ key: "setDefaultIndicator", value: function setDefaultIndicator(indicator) { defaultIndicator = indicator; } }]); return Spin; }(react__WEBPACK_IMPORTED_MODULE_6__["Component"]); Spin.defaultProps = { spinning: true, size: 'default', wrapperClassName: '' }; /* harmony default export */ __webpack_exports__["a"] = (Spin); /***/ }), /***/ "./components/spin/style/index.less": /*!******************************************!*\ !*** ./components/spin/style/index.less ***! \******************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/spin/style/index.tsx": /*!*****************************************!*\ !*** ./components/spin/style/index.tsx ***! \*****************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/spin/style/index.less"); /***/ }), /***/ "./components/statistic/Countdown.tsx": /*!********************************************!*\ !*** ./components/statistic/Countdown.tsx ***! \********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _Statistic__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Statistic */ "./components/statistic/Statistic.tsx"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils */ "./components/statistic/utils.tsx"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); var REFRESH_INTERVAL = 1000 / 30; function getTime(value) { return new Date(value).getTime(); } var Countdown = /*#__PURE__*/function (_React$Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Countdown, _React$Component); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Countdown); function Countdown() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, Countdown); _this = _super.apply(this, arguments); _this.syncTimer = function () { var value = _this.props.value; var timestamp = getTime(value); if (timestamp >= Date.now()) { _this.startTimer(); } else { _this.stopTimer(); } }; _this.startTimer = function () { if (_this.countdownId) return; var _this$props = _this.props, onChange = _this$props.onChange, value = _this$props.value; var timestamp = getTime(value); _this.countdownId = window.setInterval(function () { _this.forceUpdate(); if (onChange && timestamp > Date.now()) { onChange(timestamp - Date.now()); } }, REFRESH_INTERVAL); }; _this.stopTimer = function () { var _this$props2 = _this.props, onFinish = _this$props2.onFinish, value = _this$props2.value; if (_this.countdownId) { clearInterval(_this.countdownId); _this.countdownId = undefined; var timestamp = getTime(value); if (onFinish && timestamp < Date.now()) { onFinish(); } } }; _this.formatCountdown = function (value, config) { var format = _this.props.format; return Object(_utils__WEBPACK_IMPORTED_MODULE_7__[/* formatCountdown */ "a"])(value, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, config), { format: format })); }; // Countdown do not need display the timestamp _this.valueRender = function (node) { return Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_8__[/* cloneElement */ "a"])(node, { title: undefined }); }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Countdown, [{ key: "componentDidMount", value: function componentDidMount() { this.syncTimer(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { this.syncTimer(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.stopTimer(); } }, { key: "render", value: function render() { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_Statistic__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ valueRender: this.valueRender }, this.props, { formatter: this.formatCountdown })); } }]); return Countdown; }(react__WEBPACK_IMPORTED_MODULE_5__["Component"]); Countdown.defaultProps = { format: 'HH:mm:ss' }; /* harmony default export */ __webpack_exports__["a"] = (Countdown); /***/ }), /***/ "./components/statistic/Number.tsx": /*!*****************************************!*\ !*** ./components/statistic/Number.tsx ***! \*****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var lodash_padEnd__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/padEnd */ "./node_modules/lodash/padEnd.js"); /* harmony import */ var lodash_padEnd__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_padEnd__WEBPACK_IMPORTED_MODULE_1__); var StatisticNumber = function StatisticNumber(props) { var value = props.value, formatter = props.formatter, precision = props.precision, decimalSeparator = props.decimalSeparator, _props$groupSeparator = props.groupSeparator, groupSeparator = _props$groupSeparator === void 0 ? '' : _props$groupSeparator, prefixCls = props.prefixCls; var valueNode; if (typeof formatter === 'function') { // Customize formatter valueNode = formatter(value); } else { // Internal formatter var val = String(value); var cells = val.match(/^(-?)(\d*)(\.(\d+))?$/); // Process if illegal number if (!cells || val === '-') { valueNode = val; } else { var negative = cells[1]; var int = cells[2] || '0'; var decimal = cells[4] || ''; int = int.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator); if (typeof precision === 'number') { decimal = lodash_padEnd__WEBPACK_IMPORTED_MODULE_1___default()(decimal, precision, '0').slice(0, precision); } if (decimal) { decimal = "".concat(decimalSeparator).concat(decimal); } valueNode = [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { key: "int", className: "".concat(prefixCls, "-content-value-int") }, negative, int), decimal && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { key: "decimal", className: "".concat(prefixCls, "-content-value-decimal") }, decimal)]; } } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: "".concat(prefixCls, "-content-value") }, valueNode); }; /* harmony default export */ __webpack_exports__["a"] = (StatisticNumber); /***/ }), /***/ "./components/statistic/Statistic.tsx": /*!********************************************!*\ !*** ./components/statistic/Statistic.tsx ***! \********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _config_provider_context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config-provider/context */ "./components/config-provider/context.tsx"); /* harmony import */ var _skeleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../skeleton */ "./components/skeleton/index.tsx"); /* harmony import */ var _Number__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Number */ "./components/statistic/Number.tsx"); var Statistic = function Statistic(props) { var prefixCls = props.prefixCls, className = props.className, style = props.style, valueStyle = props.valueStyle, _props$value = props.value, value = _props$value === void 0 ? 0 : _props$value, title = props.title, valueRender = props.valueRender, prefix = props.prefix, suffix = props.suffix, loading = props.loading, direction = props.direction, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave; var valueNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Number__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, props, { value: value })); var cls = classnames__WEBPACK_IMPORTED_MODULE_3___default()(prefixCls, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: cls, style: style, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave }, title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-title") }, title), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_skeleton__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], { paragraph: false, loading: loading }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { style: valueStyle, className: "".concat(prefixCls, "-content") }, prefix && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { className: "".concat(prefixCls, "-content-prefix") }, prefix), valueRender ? valueRender(valueNode) : valueNode, suffix && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { className: "".concat(prefixCls, "-content-suffix") }, suffix)))); }; Statistic.defaultProps = { decimalSeparator: '.', groupSeparator: ',', loading: false }; var WrapperStatistic = Object(_config_provider_context__WEBPACK_IMPORTED_MODULE_4__[/* withConfigConsumer */ "c"])({ prefixCls: 'statistic' })(Statistic); /* harmony default export */ __webpack_exports__["a"] = (WrapperStatistic); /***/ }), /***/ "./components/statistic/index.tsx": /*!****************************************!*\ !*** ./components/statistic/index.tsx ***! \****************************************/ /*! exports provided: StatisticProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _Statistic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Statistic */ "./components/statistic/Statistic.tsx"); /* harmony import */ var _Countdown__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Countdown */ "./components/statistic/Countdown.tsx"); _Statistic__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].Countdown = _Countdown__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]; /* harmony default export */ __webpack_exports__["a"] = (_Statistic__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]); /***/ }), /***/ "./components/statistic/style/index.less": /*!***********************************************!*\ !*** ./components/statistic/style/index.less ***! \***********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/statistic/style/index.tsx": /*!**********************************************!*\ !*** ./components/statistic/style/index.tsx ***! \**********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/statistic/style/index.less"); /* harmony import */ var _skeleton_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../skeleton/style */ "./components/skeleton/style/index.tsx"); // style dependencies /***/ }), /***/ "./components/statistic/utils.tsx": /*!****************************************!*\ !*** ./components/statistic/utils.tsx ***! \****************************************/ /*! exports provided: formatTimeStr, formatCountdown */ /*! exports used: formatCountdown */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export formatTimeStr */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return formatCountdown; }); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var lodash_padStart__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/padStart */ "./node_modules/lodash/padStart.js"); /* harmony import */ var lodash_padStart__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_padStart__WEBPACK_IMPORTED_MODULE_1__); // Countdown var timeUnits = [['Y', 1000 * 60 * 60 * 24 * 365], ['M', 1000 * 60 * 60 * 24 * 30], ['D', 1000 * 60 * 60 * 24], ['H', 1000 * 60 * 60], ['m', 1000 * 60], ['s', 1000], ['S', 1] // million seconds ]; function formatTimeStr(duration, format) { var leftDuration = duration; var escapeRegex = /\[[^\]]*]/g; var keepList = (format.match(escapeRegex) || []).map(function (str) { return str.slice(1, -1); }); var templateText = format.replace(escapeRegex, '[]'); var replacedText = timeUnits.reduce(function (current, _ref) { var _ref2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_ref, 2), name = _ref2[0], unit = _ref2[1]; if (current.indexOf(name) !== -1) { var value = Math.floor(leftDuration / unit); leftDuration -= value * unit; return current.replace(new RegExp("".concat(name, "+"), 'g'), function (match) { var len = match.length; return lodash_padStart__WEBPACK_IMPORTED_MODULE_1___default()(value.toString(), len, '0'); }); } return current; }, templateText); var index = 0; return replacedText.replace(escapeRegex, function () { var match = keepList[index]; index += 1; return match; }); } function formatCountdown(value, config) { var _config$format = config.format, format = _config$format === void 0 ? '' : _config$format; var target = new Date(value).getTime(); var current = Date.now(); var diff = Math.max(target - current, 0); return formatTimeStr(diff, format); } /***/ }), /***/ "./components/steps/index.tsx": /*!************************************!*\ !*** ./components/steps/index.tsx ***! \************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var rc_steps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-steps */ "./node_modules/rc-steps/es/index.js"); /* harmony import */ var _ant_design_icons_es_icons_CheckOutlined__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/icons/es/icons/CheckOutlined */ "./node_modules/@ant-design/icons/es/icons/CheckOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseOutlined */ "./node_modules/@ant-design/icons/es/icons/CloseOutlined.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _progress__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../progress */ "./components/progress/index.tsx"); /* harmony import */ var _grid_hooks_useBreakpoint__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../grid/hooks/useBreakpoint */ "./components/grid/hooks/useBreakpoint.tsx"); var Steps = function Steps(props) { var _classNames; var percent = props.percent, size = props.size, className = props.className, direction = props.direction, responsive = props.responsive; var _useBreakpoint = Object(_grid_hooks_useBreakpoint__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(), xs = _useBreakpoint.xs; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_8__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, rtlDirection = _React$useContext.direction; var getDirection = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function () { return responsive && xs ? 'vertical' : direction; }, [xs, direction]); var prefixCls = getPrefixCls('steps', props.prefixCls); var iconPrefix = getPrefixCls('', props.iconPrefix); var stepsClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), rtlDirection === 'rtl'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-with-progress"), percent !== undefined), _classNames), className); var icons = { finish: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_CheckOutlined__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], { className: "".concat(prefixCls, "-finish-icon") }), error: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], { className: "".concat(prefixCls, "-error-icon") }) }; var stepIconRender = function stepIconRender(_ref) { var node = _ref.node, status = _ref.status; if (status === 'process' && percent !== undefined) { // currently it's hard-coded, since we can't easily read the actually width of icon var progressWidth = size === 'small' ? 32 : 40; var iconWithProgress = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-progress-icon") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_progress__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], { type: "circle", percent: percent, width: progressWidth, strokeWidth: 4, format: function format() { return null; } }), node); return iconWithProgress; } return node; }; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](rc_steps__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ icons: icons }, Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(props, ['percent', 'responsive']), { direction: getDirection(), stepIcon: stepIconRender, prefixCls: prefixCls, iconPrefix: iconPrefix, className: stepsClassName })); }; Steps.Step = rc_steps__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].Step; Steps.defaultProps = { current: 0 }; /* harmony default export */ __webpack_exports__["a"] = (Steps); /***/ }), /***/ "./components/steps/style/index.less": /*!*******************************************!*\ !*** ./components/steps/style/index.less ***! \*******************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/steps/style/index.tsx": /*!******************************************!*\ !*** ./components/steps/style/index.tsx ***! \******************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/steps/style/index.less"); /* harmony import */ var _progress_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../progress/style */ "./components/progress/style/index.tsx"); // style dependencies // deps-lint-skip: grid /***/ }), /***/ "./components/style/index.less": /*!*************************************!*\ !*** ./components/style/index.less ***! \*************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/switch/index.tsx": /*!*************************************!*\ !*** ./components/switch/index.tsx ***! \*************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var rc_switch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-switch */ "./node_modules/rc-switch/es/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _ant_design_icons_es_icons_LoadingOutlined__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/icons/es/icons/LoadingOutlined */ "./node_modules/@ant-design/icons/es/icons/LoadingOutlined.js"); /* harmony import */ var _util_wave__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../_util/wave */ "./components/_util/wave.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config-provider/SizeContext */ "./components/config-provider/SizeContext.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Switch = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function (_a, ref) { var _classNames; var customizePrefixCls = _a.prefixCls, customizeSize = _a.size, loading = _a.loading, _a$className = _a.className, className = _a$className === void 0 ? '' : _a$className, disabled = _a.disabled, props = __rest(_a, ["prefixCls", "size", "loading", "className", "disabled"]); if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])('checked' in props || !('value' in props), 'Switch', '`value` is not a valid prop, do you mean `checked`?'); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_7__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var size = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_8__[/* default */ "b"]); var prefixCls = getPrefixCls('switch', customizePrefixCls); var loadingIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-handle") }, loading && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_LoadingOutlined__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], { className: "".concat(prefixCls, "-loading-icon") })); var classes = classnames__WEBPACK_IMPORTED_MODULE_4___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-small"), (customizeSize || size) === 'small'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-loading"), loading), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_util_wave__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], { insertExtraNode: true }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](rc_switch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, props, { prefixCls: prefixCls, className: classes, disabled: disabled || loading, ref: ref, loadingIcon: loadingIcon }))); }); Switch.__ANT_SWITCH = true; Switch.displayName = 'Switch'; /* harmony default export */ __webpack_exports__["a"] = (Switch); /***/ }), /***/ "./components/switch/style/index.less": /*!********************************************!*\ !*** ./components/switch/style/index.less ***! \********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/switch/style/index.tsx": /*!*******************************************!*\ !*** ./components/switch/style/index.tsx ***! \*******************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/switch/style/index.less"); /***/ }), /***/ "./components/table/Column.tsx": /*!*************************************!*\ !*** ./components/table/Column.tsx ***! \*************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* istanbul ignore next */ /** This is a syntactic sugar for `columns` prop. So HOC will not work on this. */ // eslint-disable-next-line no-unused-vars function Column(_) { return null; } /* harmony default export */ __webpack_exports__["a"] = (Column); /***/ }), /***/ "./components/table/ColumnGroup.tsx": /*!******************************************!*\ !*** ./components/table/ColumnGroup.tsx ***! \******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* istanbul ignore next */ /** This is a syntactic sugar for `columns` prop. So HOC will not work on this. */ // eslint-disable-next-line no-unused-vars function ColumnGroup(_) { return null; } /* harmony default export */ __webpack_exports__["a"] = (ColumnGroup); /***/ }), /***/ "./components/table/ExpandIcon.tsx": /*!*****************************************!*\ !*** ./components/table/ExpandIcon.tsx ***! \*****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); function renderExpandIcon(locale) { return function expandIcon(_ref) { var _classNames; var prefixCls = _ref.prefixCls, onExpand = _ref.onExpand, record = _ref.record, expanded = _ref.expanded, expandable = _ref.expandable; var iconPrefix = "".concat(prefixCls, "-row-expand-icon"); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("button", { type: "button", onClick: function onClick(e) { onExpand(record, e); e.stopPropagation(); }, className: classnames__WEBPACK_IMPORTED_MODULE_2___default()(iconPrefix, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(iconPrefix, "-spaced"), !expandable), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(iconPrefix, "-expanded"), expandable && expanded), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(iconPrefix, "-collapsed"), expandable && !expanded), _classNames)), "aria-label": expanded ? locale.collapse : locale.expand }); }; } /* harmony default export */ __webpack_exports__["a"] = (renderExpandIcon); /***/ }), /***/ "./components/table/Table.tsx": /*!************************************!*\ !*** ./components/table/Table.tsx ***! \************************************/ /*! exports provided: ColumnsType, TablePaginationConfig, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var rc_table__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-table */ "./node_modules/rc-table/es/index.js"); /* harmony import */ var rc_table_es_Table__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-table/es/Table */ "./node_modules/rc-table/es/Table.js"); /* harmony import */ var rc_table_es_hooks_useColumns__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rc-table/es/hooks/useColumns */ "./node_modules/rc-table/es/hooks/useColumns.js"); /* harmony import */ var _spin__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../spin */ "./components/spin/index.tsx"); /* harmony import */ var _pagination__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../pagination */ "./components/pagination/index.tsx"); /* harmony import */ var _config_provider_context__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../config-provider/context */ "./components/config-provider/context.tsx"); /* harmony import */ var _hooks_usePagination__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./hooks/usePagination */ "./components/table/hooks/usePagination.ts"); /* harmony import */ var _hooks_useLazyKVMap__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./hooks/useLazyKVMap */ "./components/table/hooks/useLazyKVMap.ts"); /* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./interface */ "./components/table/interface.tsx"); /* harmony import */ var _hooks_useSelection__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./hooks/useSelection */ "./components/table/hooks/useSelection.tsx"); /* harmony import */ var _hooks_useSorter__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./hooks/useSorter */ "./components/table/hooks/useSorter.tsx"); /* harmony import */ var _hooks_useFilter__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./hooks/useFilter */ "./components/table/hooks/useFilter/index.tsx"); /* harmony import */ var _hooks_useTitleColumns__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./hooks/useTitleColumns */ "./components/table/hooks/useTitleColumns.tsx"); /* harmony import */ var _ExpandIcon__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./ExpandIcon */ "./components/table/ExpandIcon.tsx"); /* harmony import */ var _util_scrollTo__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../_util/scrollTo */ "./components/_util/scrollTo.ts"); /* harmony import */ var _locale_en_US__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../locale/en_US */ "./components/locale/en_US.tsx"); /* harmony import */ var _config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../config-provider/SizeContext */ "./components/config-provider/SizeContext.tsx"); /* harmony import */ var _Column__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./Column */ "./components/table/Column.tsx"); /* harmony import */ var _ColumnGroup__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./ColumnGroup */ "./components/table/ColumnGroup.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _grid_hooks_useBreakpoint__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../grid/hooks/useBreakpoint */ "./components/grid/hooks/useBreakpoint.tsx"); var EMPTY_LIST = []; function Table(props) { var _classNames3; var customizePrefixCls = props.prefixCls, className = props.className, style = props.style, customizeSize = props.size, bordered = props.bordered, customizeDropdownPrefixCls = props.dropdownPrefixCls, dataSource = props.dataSource, pagination = props.pagination, rowSelection = props.rowSelection, rowKey = props.rowKey, rowClassName = props.rowClassName, columns = props.columns, children = props.children, legacyChildrenColumnName = props.childrenColumnName, onChange = props.onChange, getPopupContainer = props.getPopupContainer, loading = props.loading, expandIcon = props.expandIcon, expandable = props.expandable, expandedRowRender = props.expandedRowRender, expandIconColumnIndex = props.expandIconColumnIndex, indentSize = props.indentSize, scroll = props.scroll, sortDirections = props.sortDirections, locale = props.locale, _props$showSorterTool = props.showSorterTooltip, showSorterTooltip = _props$showSorterTool === void 0 ? true : _props$showSorterTool; if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"])(!(typeof rowKey === 'function' && rowKey.length > 1), 'Table', '`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected.'); var screens = Object(_grid_hooks_useBreakpoint__WEBPACK_IMPORTED_MODULE_27__[/* default */ "a"])(); var mergedColumns = react__WEBPACK_IMPORTED_MODULE_4__["useMemo"](function () { var matched = new Set(Object.keys(screens).filter(function (m) { return screens[m]; })); return (columns || Object(rc_table_es_hooks_useColumns__WEBPACK_IMPORTED_MODULE_9__[/* convertChildrenToColumns */ "a"])(children)).filter(function (c) { return !c.responsive || c.responsive.some(function (r) { return matched.has(r); }); }); }, [children, columns, screens]); var tableProps = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(props, ['className', 'style', 'columns']); var size = react__WEBPACK_IMPORTED_MODULE_4__["useContext"](_config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_23__[/* default */ "b"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_4__["useContext"](_config_provider_context__WEBPACK_IMPORTED_MODULE_12__[/* ConfigContext */ "b"]), _React$useContext$loc = _React$useContext.locale, contextLocale = _React$useContext$loc === void 0 ? _locale_en_US__WEBPACK_IMPORTED_MODULE_22__["default"] : _React$useContext$loc, renderEmpty = _React$useContext.renderEmpty, direction = _React$useContext.direction; var mergedSize = customizeSize || size; var tableLocale = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, contextLocale.Table), locale); var rawData = dataSource || EMPTY_LIST; var _React$useContext2 = react__WEBPACK_IMPORTED_MODULE_4__["useContext"](_config_provider_context__WEBPACK_IMPORTED_MODULE_12__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext2.getPrefixCls; var prefixCls = getPrefixCls('table', customizePrefixCls); var dropdownPrefixCls = getPrefixCls('dropdown', customizeDropdownPrefixCls); var mergedExpandable = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({ childrenColumnName: legacyChildrenColumnName, expandIconColumnIndex: expandIconColumnIndex }, expandable); var _mergedExpandable$chi = mergedExpandable.childrenColumnName, childrenColumnName = _mergedExpandable$chi === void 0 ? 'children' : _mergedExpandable$chi; var expandType = react__WEBPACK_IMPORTED_MODULE_4__["useMemo"](function () { if (rawData.some(function (item) { var _a; return (_a = item) === null || _a === void 0 ? void 0 : _a[childrenColumnName]; })) { return 'nest'; } if (expandedRowRender || expandable && expandable.expandedRowRender) { return 'row'; } return null; }, [rawData]); var internalRefs = { body: react__WEBPACK_IMPORTED_MODULE_4__["useRef"]() }; // ============================ RowKey ============================ var getRowKey = react__WEBPACK_IMPORTED_MODULE_4__["useMemo"](function () { if (typeof rowKey === 'function') { return rowKey; } return function (record) { var _a; return (_a = record) === null || _a === void 0 ? void 0 : _a[rowKey]; }; }, [rowKey]); var _useLazyKVMap = Object(_hooks_useLazyKVMap__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"])(rawData, childrenColumnName, getRowKey), _useLazyKVMap2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_useLazyKVMap, 1), getRecordByKey = _useLazyKVMap2[0]; // ============================ Events ============================= var changeEventInfo = {}; var triggerOnChange = function triggerOnChange(info, action) { var reset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; var changeInfo = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, changeEventInfo), info); if (reset) { changeEventInfo.resetPagination(); // Reset event param if (changeInfo.pagination.current) { changeInfo.pagination.current = 1; } // Trigger pagination events if (pagination && pagination.onChange) { pagination.onChange(1, changeInfo.pagination.pageSize); } } if (scroll && scroll.scrollToFirstRowOnChange !== false && internalRefs.body.current) { Object(_util_scrollTo__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"])(0, { getContainer: function getContainer() { return internalRefs.body.current; } }); } onChange === null || onChange === void 0 ? void 0 : onChange(changeInfo.pagination, changeInfo.filters, changeInfo.sorter, { currentDataSource: Object(_hooks_useFilter__WEBPACK_IMPORTED_MODULE_18__[/* getFilterData */ "b"])(Object(_hooks_useSorter__WEBPACK_IMPORTED_MODULE_17__[/* getSortData */ "b"])(rawData, changeInfo.sorterStates, childrenColumnName), changeInfo.filterStates), action: action }); }; /** * Controlled state in `columns` is not a good idea that makes too many code (1000+ line?) to read * state out and then put it back to title render. Move these code into `hooks` but still too * complex. We should provides Table props like `sorter` & `filter` to handle control in next big version. */ // ============================ Sorter ============================= var onSorterChange = function onSorterChange(sorter, sorterStates) { triggerOnChange({ sorter: sorter, sorterStates: sorterStates }, 'sort', false); }; var _useSorter = Object(_hooks_useSorter__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"])({ prefixCls: prefixCls, mergedColumns: mergedColumns, onSorterChange: onSorterChange, sortDirections: sortDirections || ['ascend', 'descend'], tableLocale: tableLocale, showSorterTooltip: showSorterTooltip }), _useSorter2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_useSorter, 4), transformSorterColumns = _useSorter2[0], sortStates = _useSorter2[1], sorterTitleProps = _useSorter2[2], getSorters = _useSorter2[3]; var sortedData = react__WEBPACK_IMPORTED_MODULE_4__["useMemo"](function () { return Object(_hooks_useSorter__WEBPACK_IMPORTED_MODULE_17__[/* getSortData */ "b"])(rawData, sortStates, childrenColumnName); }, [rawData, sortStates]); changeEventInfo.sorter = getSorters(); changeEventInfo.sorterStates = sortStates; // ============================ Filter ============================ var onFilterChange = function onFilterChange(filters, filterStates) { triggerOnChange({ filters: filters, filterStates: filterStates }, 'filter', true); }; var _useFilter = Object(_hooks_useFilter__WEBPACK_IMPORTED_MODULE_18__[/* default */ "a"])({ prefixCls: prefixCls, locale: tableLocale, dropdownPrefixCls: dropdownPrefixCls, mergedColumns: mergedColumns, onFilterChange: onFilterChange, getPopupContainer: getPopupContainer }), _useFilter2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_useFilter, 3), transformFilterColumns = _useFilter2[0], filterStates = _useFilter2[1], getFilters = _useFilter2[2]; var mergedData = Object(_hooks_useFilter__WEBPACK_IMPORTED_MODULE_18__[/* getFilterData */ "b"])(sortedData, filterStates); changeEventInfo.filters = getFilters(); changeEventInfo.filterStates = filterStates; // ============================ Column ============================ var columnTitleProps = react__WEBPACK_IMPORTED_MODULE_4__["useMemo"](function () { return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, sorterTitleProps); }, [sorterTitleProps]); var _useTitleColumns = Object(_hooks_useTitleColumns__WEBPACK_IMPORTED_MODULE_19__[/* default */ "a"])(columnTitleProps), _useTitleColumns2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_useTitleColumns, 1), transformTitleColumns = _useTitleColumns2[0]; // ========================== Pagination ========================== var onPaginationChange = function onPaginationChange(current, pageSize) { triggerOnChange({ pagination: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, changeEventInfo.pagination), { current: current, pageSize: pageSize }) }, 'paginate'); }; var _usePagination = Object(_hooks_usePagination__WEBPACK_IMPORTED_MODULE_13__[/* default */ "b"])(mergedData.length, pagination, onPaginationChange), _usePagination2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_usePagination, 2), mergedPagination = _usePagination2[0], resetPagination = _usePagination2[1]; changeEventInfo.pagination = pagination === false ? {} : Object(_hooks_usePagination__WEBPACK_IMPORTED_MODULE_13__[/* getPaginationParam */ "c"])(pagination, mergedPagination); changeEventInfo.resetPagination = resetPagination; // ============================= Data ============================= var pageData = react__WEBPACK_IMPORTED_MODULE_4__["useMemo"](function () { if (pagination === false || !mergedPagination.pageSize) { return mergedData; } var _mergedPagination$cur = mergedPagination.current, current = _mergedPagination$cur === void 0 ? 1 : _mergedPagination$cur, total = mergedPagination.total, _mergedPagination$pag = mergedPagination.pageSize, pageSize = _mergedPagination$pag === void 0 ? _hooks_usePagination__WEBPACK_IMPORTED_MODULE_13__[/* DEFAULT_PAGE_SIZE */ "a"] : _mergedPagination$pag; Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"])(current > 0, 'Table', '`current` should be positive number.'); // Dynamic table data if (mergedData.length < total) { if (mergedData.length > pageSize) { Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"])(false, 'Table', '`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode.'); return mergedData.slice((current - 1) * pageSize, current * pageSize); } return mergedData; } return mergedData.slice((current - 1) * pageSize, current * pageSize); }, [!!pagination, mergedData, mergedPagination && mergedPagination.current, mergedPagination && mergedPagination.pageSize, mergedPagination && mergedPagination.total]); // ========================== Selections ========================== var _useSelection = Object(_hooks_useSelection__WEBPACK_IMPORTED_MODULE_16__[/* default */ "d"])(rowSelection, { prefixCls: prefixCls, data: mergedData, pageData: pageData, getRowKey: getRowKey, getRecordByKey: getRecordByKey, expandType: expandType, childrenColumnName: childrenColumnName, locale: tableLocale, expandIconColumnIndex: mergedExpandable.expandIconColumnIndex, getPopupContainer: getPopupContainer }), _useSelection2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_useSelection, 2), transformSelectionColumns = _useSelection2[0], selectedKeySet = _useSelection2[1]; var internalRowClassName = function internalRowClassName(record, index, indent) { var mergedRowClassName; if (typeof rowClassName === 'function') { mergedRowClassName = classnames__WEBPACK_IMPORTED_MODULE_5___default()(rowClassName(record, index, indent)); } else { mergedRowClassName = classnames__WEBPACK_IMPORTED_MODULE_5___default()(rowClassName); } return classnames__WEBPACK_IMPORTED_MODULE_5___default()(Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(prefixCls, "-row-selected"), selectedKeySet.has(getRowKey(record, index))), mergedRowClassName); }; // ========================== Expandable ========================== // Pass origin render status into `rc-table`, this can be removed when refactor with `rc-table` mergedExpandable.__PARENT_RENDER_ICON__ = mergedExpandable.expandIcon; // Customize expandable icon mergedExpandable.expandIcon = mergedExpandable.expandIcon || expandIcon || Object(_ExpandIcon__WEBPACK_IMPORTED_MODULE_20__[/* default */ "a"])(tableLocale); // Adjust expand icon index, no overwrite expandIconColumnIndex if set. if (expandType === 'nest' && mergedExpandable.expandIconColumnIndex === undefined) { mergedExpandable.expandIconColumnIndex = rowSelection ? 1 : 0; } else if (mergedExpandable.expandIconColumnIndex > 0 && rowSelection) { mergedExpandable.expandIconColumnIndex -= 1; } // Indent size if (typeof mergedExpandable.indentSize !== 'number') { mergedExpandable.indentSize = typeof indentSize === 'number' ? indentSize : 15; } // ============================ Render ============================ var transformColumns = react__WEBPACK_IMPORTED_MODULE_4__["useCallback"](function (innerColumns) { return transformTitleColumns(transformSelectionColumns(transformFilterColumns(transformSorterColumns(innerColumns)))); }, [transformSorterColumns, transformFilterColumns, transformSelectionColumns]); var topPaginationNode; var bottomPaginationNode; if (pagination !== false && (mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.total)) { var paginationSize; if (mergedPagination.size) { paginationSize = mergedPagination.size; } else { paginationSize = mergedSize === 'small' || mergedSize === 'middle' ? 'small' : undefined; } var renderPagination = function renderPagination(position) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_pagination__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({ className: "".concat(prefixCls, "-pagination ").concat(prefixCls, "-pagination-").concat(position) }, mergedPagination, { size: paginationSize })); }; var defaultPosition = direction === 'rtl' ? 'left' : 'right'; var position = mergedPagination.position; if (position !== null && Array.isArray(position)) { var topPos = position.find(function (p) { return p.indexOf('top') !== -1; }); var bottomPos = position.find(function (p) { return p.indexOf('bottom') !== -1; }); var isDisable = position.every(function (p) { return "".concat(p) === 'none'; }); if (!topPos && !bottomPos && !isDisable) { bottomPaginationNode = renderPagination(defaultPosition); } if (topPos) { topPaginationNode = renderPagination(topPos.toLowerCase().replace('top', '')); } if (bottomPos) { bottomPaginationNode = renderPagination(bottomPos.toLowerCase().replace('bottom', '')); } } else { bottomPaginationNode = renderPagination(defaultPosition); } } // >>>>>>>>> Spinning var spinProps; if (typeof loading === 'boolean') { spinProps = { spinning: loading }; } else if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(loading) === 'object') { spinProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({ spinning: true }, loading); } var wrapperClassNames = classnames__WEBPACK_IMPORTED_MODULE_5___default()("".concat(prefixCls, "-wrapper"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(prefixCls, "-wrapper-rtl"), direction === 'rtl'), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("div", { className: wrapperClassNames, style: style }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_spin__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({ spinning: false }, spinProps), topPaginationNode, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](rc_table__WEBPACK_IMPORTED_MODULE_7__[/* default */ "c"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, tableProps, { columns: mergedColumns, direction: direction, expandable: mergedExpandable, prefixCls: prefixCls, className: classnames__WEBPACK_IMPORTED_MODULE_5___default()((_classNames3 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-middle"), mergedSize === 'middle'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-small"), mergedSize === 'small'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-bordered"), bordered), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-empty"), rawData.length === 0), _classNames3)), data: pageData, rowKey: getRowKey, rowClassName: internalRowClassName, emptyText: locale && locale.emptyText || renderEmpty('Table') // Internal , internalHooks: rc_table_es_Table__WEBPACK_IMPORTED_MODULE_8__[/* INTERNAL_HOOKS */ "a"], internalRefs: internalRefs, transformColumns: transformColumns })), bottomPaginationNode)); } Table.defaultProps = { rowKey: 'key' }; Table.SELECTION_ALL = _hooks_useSelection__WEBPACK_IMPORTED_MODULE_16__[/* SELECTION_ALL */ "a"]; Table.SELECTION_INVERT = _hooks_useSelection__WEBPACK_IMPORTED_MODULE_16__[/* SELECTION_INVERT */ "b"]; Table.SELECTION_NONE = _hooks_useSelection__WEBPACK_IMPORTED_MODULE_16__[/* SELECTION_NONE */ "c"]; Table.Column = _Column__WEBPACK_IMPORTED_MODULE_24__[/* default */ "a"]; Table.ColumnGroup = _ColumnGroup__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"]; Table.Summary = rc_table__WEBPACK_IMPORTED_MODULE_7__[/* Summary */ "b"]; /* harmony default export */ __webpack_exports__["a"] = (Table); /***/ }), /***/ "./components/table/hooks/useFilter/FilterDropdown.tsx": /*!*************************************************************!*\ !*** ./components/table/hooks/useFilter/FilterDropdown.tsx ***! \*************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/isEqual */ "./node_modules/lodash/isEqual.js"); /* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_isEqual__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _ant_design_icons_es_icons_FilterFilled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/icons/es/icons/FilterFilled */ "./node_modules/@ant-design/icons/es/icons/FilterFilled.js"); /* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../button */ "./components/button/index.tsx"); /* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../menu */ "./components/menu/index.tsx"); /* harmony import */ var _checkbox__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../checkbox */ "./components/checkbox/index.tsx"); /* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../radio */ "./components/radio/index.tsx"); /* harmony import */ var _dropdown__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../dropdown */ "./components/dropdown/index.tsx"); /* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../empty */ "./components/empty/index.tsx"); /* harmony import */ var _FilterWrapper__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./FilterWrapper */ "./components/table/hooks/useFilter/FilterWrapper.tsx"); /* harmony import */ var _util_hooks_useSyncState__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../_util/hooks/useSyncState */ "./components/_util/hooks/useSyncState.ts"); /* harmony import */ var _config_provider_context__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../config-provider/context */ "./components/config-provider/context.tsx"); var SubMenu = _menu__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].SubMenu, MenuItem = _menu__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].Item; function hasSubMenu(filters) { return filters.some(function (_ref) { var children = _ref.children; return children; }); } function renderFilterItems(_ref2) { var filters = _ref2.filters, prefixCls = _ref2.prefixCls, filteredKeys = _ref2.filteredKeys, filterMultiple = _ref2.filterMultiple, locale = _ref2.locale; if (filters.length === 0) { // wrapped with
to avoid react warning // https://github.com/ant-design/ant-design/issues/25979 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](MenuItem, { key: "empty" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { style: { margin: '16px 0' } }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_empty__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"], { image: _empty__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].PRESENTED_IMAGE_SIMPLE, description: locale.filterEmptyText, imageStyle: { height: 24 } }))); } return filters.map(function (filter, index) { var key = String(filter.value); if (filter.children) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](SubMenu, { key: key || index, title: filter.text, popupClassName: "".concat(prefixCls, "-dropdown-submenu") }, renderFilterItems({ filters: filter.children, prefixCls: prefixCls, filteredKeys: filteredKeys, filterMultiple: filterMultiple, locale: locale })); } var Component = filterMultiple ? _checkbox__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"] : _radio__WEBPACK_IMPORTED_MODULE_9__[/* default */ "c"]; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](MenuItem, { key: filter.value !== undefined ? key : index }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, { checked: filteredKeys.includes(key) }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", null, filter.text)); }); } function FilterDropdown(props) { var _a; var tablePrefixCls = props.tablePrefixCls, prefixCls = props.prefixCls, column = props.column, dropdownPrefixCls = props.dropdownPrefixCls, columnKey = props.columnKey, filterMultiple = props.filterMultiple, filterState = props.filterState, triggerFilter = props.triggerFilter, locale = props.locale, children = props.children, getPopupContainer = props.getPopupContainer; var filterDropdownVisible = column.filterDropdownVisible, onFilterDropdownVisibleChange = column.onFilterDropdownVisibleChange; var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"](false), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_React$useState, 2), visible = _React$useState2[0], setVisible = _React$useState2[1]; var filtered = !!(filterState && (((_a = filterState.filteredKeys) === null || _a === void 0 ? void 0 : _a.length) || filterState.forceFiltered)); var triggerVisible = function triggerVisible(newVisible) { setVisible(newVisible); onFilterDropdownVisibleChange === null || onFilterDropdownVisibleChange === void 0 ? void 0 : onFilterDropdownVisibleChange(newVisible); }; var mergedVisible = typeof filterDropdownVisible === 'boolean' ? filterDropdownVisible : visible; // ===================== Select Keys ===================== var propFilteredKeys = filterState === null || filterState === void 0 ? void 0 : filterState.filteredKeys; var _useSyncState = Object(_util_hooks_useSyncState__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"])(propFilteredKeys || []), _useSyncState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_useSyncState, 2), getFilteredKeysSync = _useSyncState2[0], setFilteredKeysSync = _useSyncState2[1]; var onSelectKeys = function onSelectKeys(_ref3) { var selectedKeys = _ref3.selectedKeys; setFilteredKeysSync(selectedKeys); }; react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { onSelectKeys({ selectedKeys: propFilteredKeys || [] }); }, [propFilteredKeys]); // ====================== Open Keys ====================== var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_2__["useState"]([]), _React$useState4 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_React$useState3, 2), openKeys = _React$useState4[0], setOpenKeys = _React$useState4[1]; var openRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](); var onOpenChange = function onOpenChange(keys) { openRef.current = window.setTimeout(function () { setOpenKeys(keys); }); }; var onMenuClick = function onMenuClick() { window.clearTimeout(openRef.current); }; react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { return function () { window.clearTimeout(openRef.current); }; }, []); // ======================= Submit ======================== var internalTriggerFilter = function internalTriggerFilter(keys) { var mergedKeys = keys && keys.length ? keys : null; if (mergedKeys === null && (!filterState || !filterState.filteredKeys)) { return null; } if (lodash_isEqual__WEBPACK_IMPORTED_MODULE_4___default()(mergedKeys, filterState === null || filterState === void 0 ? void 0 : filterState.filteredKeys)) { return null; } triggerFilter({ column: column, key: columnKey, filteredKeys: mergedKeys }); }; var onConfirm = function onConfirm() { triggerVisible(false); internalTriggerFilter(getFilteredKeysSync()); }; var onReset = function onReset() { setFilteredKeysSync([]); triggerVisible(false); internalTriggerFilter([]); }; var doFilter = function doFilter() { var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { closeDropdown: true }, closeDropdown = _ref4.closeDropdown; if (closeDropdown) { triggerVisible(false); } internalTriggerFilter(getFilteredKeysSync()); }; var onVisibleChange = function onVisibleChange(newVisible) { if (newVisible && propFilteredKeys !== undefined) { // Sync filteredKeys on appear in controlled mode (propFilteredKeys !== undefiend) setFilteredKeysSync(propFilteredKeys || []); } triggerVisible(newVisible); // Default will filter when closed if (!newVisible && !column.filterDropdown) { onConfirm(); } }; // ======================== Style ======================== var dropdownMenuClass = classnames__WEBPACK_IMPORTED_MODULE_3___default()(Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(dropdownPrefixCls, "-menu-without-submenu"), !hasSubMenu(column.filters || []))); var dropdownContent; if (typeof column.filterDropdown === 'function') { dropdownContent = column.filterDropdown({ prefixCls: "".concat(dropdownPrefixCls, "-custom"), setSelectedKeys: function setSelectedKeys(selectedKeys) { return onSelectKeys({ selectedKeys: selectedKeys }); }, selectedKeys: getFilteredKeysSync(), confirm: doFilter, clearFilters: onReset, filters: column.filters, visible: mergedVisible }); } else if (column.filterDropdown) { dropdownContent = column.filterDropdown; } else { var selectedKeys = getFilteredKeysSync() || []; dropdownContent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](react__WEBPACK_IMPORTED_MODULE_2__["Fragment"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_menu__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], { multiple: filterMultiple, prefixCls: "".concat(dropdownPrefixCls, "-menu"), className: dropdownMenuClass, onClick: onMenuClick, onSelect: onSelectKeys, onDeselect: onSelectKeys, selectedKeys: selectedKeys, getPopupContainer: getPopupContainer, openKeys: openKeys, onOpenChange: onOpenChange }, renderFilterItems({ filters: column.filters || [], prefixCls: prefixCls, filteredKeys: getFilteredKeysSync(), filterMultiple: filterMultiple, locale: locale })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-dropdown-btns") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_button__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], { type: "link", size: "small", disabled: selectedKeys.length === 0, onClick: onReset }, locale.filterReset), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_button__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], { type: "primary", size: "small", onClick: onConfirm }, locale.filterConfirm))); } var menu = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_FilterWrapper__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"], { className: "".concat(prefixCls, "-dropdown") }, dropdownContent); var filterIcon; if (typeof column.filterIcon === 'function') { filterIcon = column.filterIcon(filtered); } else if (column.filterIcon) { filterIcon = column.filterIcon; } else { filterIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_FilterFilled__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], null); } var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider_context__WEBPACK_IMPORTED_MODULE_14__[/* ConfigContext */ "b"]), direction = _React$useContext.direction; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-column") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { className: "".concat(tablePrefixCls, "-column-title") }, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_dropdown__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], { overlay: menu, trigger: ['click'], visible: mergedVisible, onVisibleChange: onVisibleChange, getPopupContainer: getPopupContainer, placement: direction === 'rtl' ? 'bottomLeft' : 'bottomRight' }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { role: "button", tabIndex: -1, className: classnames__WEBPACK_IMPORTED_MODULE_3___default()("".concat(prefixCls, "-trigger"), { active: filtered }), onClick: function onClick(e) { e.stopPropagation(); } }, filterIcon))); } /* harmony default export */ __webpack_exports__["a"] = (FilterDropdown); /***/ }), /***/ "./components/table/hooks/useFilter/FilterWrapper.tsx": /*!************************************************************!*\ !*** ./components/table/hooks/useFilter/FilterWrapper.tsx ***! \************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var FilterDropdownMenuWrapper = function FilterDropdownMenuWrapper(props) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: props.className, onClick: function onClick(e) { return e.stopPropagation(); } }, props.children); }; /* harmony default export */ __webpack_exports__["a"] = (FilterDropdownMenuWrapper); /***/ }), /***/ "./components/table/hooks/useFilter/index.tsx": /*!****************************************************!*\ !*** ./components/table/hooks/useFilter/index.tsx ***! \****************************************************/ /*! exports provided: getFilterData, default */ /*! exports used: default, getFilterData */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getFilterData; }); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util */ "./components/table/util.ts"); /* harmony import */ var _FilterDropdown__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FilterDropdown */ "./components/table/hooks/useFilter/FilterDropdown.tsx"); function collectFilterStates(columns, init, pos) { var filterStates = []; (columns || []).forEach(function (column, index) { var _a; var columnPos = Object(_util__WEBPACK_IMPORTED_MODULE_4__[/* getColumnPos */ "b"])(index, pos); if ('children' in column) { filterStates = [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(filterStates), Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(collectFilterStates(column.children, init, columnPos))); } else if (column.filters || 'filterDropdown' in column || 'onFilter' in column) { if ('filteredValue' in column) { // Controlled var filteredValues = column.filteredValue; if (!('filterDropdown' in column)) { filteredValues = (_a = filteredValues === null || filteredValues === void 0 ? void 0 : filteredValues.map(String)) !== null && _a !== void 0 ? _a : filteredValues; } filterStates.push({ column: column, key: Object(_util__WEBPACK_IMPORTED_MODULE_4__[/* getColumnKey */ "a"])(column, columnPos), filteredKeys: filteredValues, forceFiltered: column.filtered }); } else { // Uncontrolled filterStates.push({ column: column, key: Object(_util__WEBPACK_IMPORTED_MODULE_4__[/* getColumnKey */ "a"])(column, columnPos), filteredKeys: init && column.defaultFilteredValue ? column.defaultFilteredValue : undefined, forceFiltered: column.filtered }); } } }); return filterStates; } function injectFilter(prefixCls, dropdownPrefixCls, columns, filterStates, triggerFilter, getPopupContainer, locale, pos) { return columns.map(function (column, index) { var columnPos = Object(_util__WEBPACK_IMPORTED_MODULE_4__[/* getColumnPos */ "b"])(index, pos); var _column$filterMultipl = column.filterMultiple, filterMultiple = _column$filterMultipl === void 0 ? true : _column$filterMultipl; var newColumn = column; if (newColumn.filters || newColumn.filterDropdown) { var columnKey = Object(_util__WEBPACK_IMPORTED_MODULE_4__[/* getColumnKey */ "a"])(newColumn, columnPos); var filterState = filterStates.find(function (_ref) { var key = _ref.key; return columnKey === key; }); newColumn = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, newColumn), { title: function title(renderProps) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_FilterDropdown__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], { tablePrefixCls: prefixCls, prefixCls: "".concat(prefixCls, "-filter"), dropdownPrefixCls: dropdownPrefixCls, column: newColumn, columnKey: columnKey, filterState: filterState, filterMultiple: filterMultiple, triggerFilter: triggerFilter, locale: locale, getPopupContainer: getPopupContainer }, Object(_util__WEBPACK_IMPORTED_MODULE_4__[/* renderColumnTitle */ "c"])(column.title, renderProps)); } }); } if ('children' in newColumn) { newColumn = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, newColumn), { children: injectFilter(prefixCls, dropdownPrefixCls, newColumn.children, filterStates, triggerFilter, getPopupContainer, locale, columnPos) }); } return newColumn; }); } function flattenKeys(filters) { var keys = []; (filters || []).forEach(function (_ref2) { var value = _ref2.value, children = _ref2.children; keys.push(value); if (children) { keys = [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(keys), Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(flattenKeys(children))); } }); return keys; } function generateFilterInfo(filterStates) { var currentFilters = {}; filterStates.forEach(function (_ref3) { var key = _ref3.key, filteredKeys = _ref3.filteredKeys, column = _ref3.column; var filters = column.filters, filterDropdown = column.filterDropdown; if (filterDropdown) { currentFilters[key] = filteredKeys || null; } else if (Array.isArray(filteredKeys)) { var keys = flattenKeys(filters); currentFilters[key] = keys.filter(function (originKey) { return filteredKeys.includes(String(originKey)); }); } else { currentFilters[key] = null; } }); return currentFilters; } function getFilterData(data, filterStates) { return filterStates.reduce(function (currentData, filterState) { var _filterState$column = filterState.column, onFilter = _filterState$column.onFilter, filters = _filterState$column.filters, filteredKeys = filterState.filteredKeys; if (onFilter && filteredKeys && filteredKeys.length) { return currentData.filter(function (record) { return filteredKeys.some(function (key) { var keys = flattenKeys(filters); var keyIndex = keys.findIndex(function (k) { return String(k) === String(key); }); var realKey = keyIndex !== -1 ? keys[keyIndex] : key; return onFilter(realKey, record); }); }); } return currentData; }, data); } function useFilter(_ref4) { var prefixCls = _ref4.prefixCls, dropdownPrefixCls = _ref4.dropdownPrefixCls, mergedColumns = _ref4.mergedColumns, onFilterChange = _ref4.onFilterChange, getPopupContainer = _ref4.getPopupContainer, tableLocale = _ref4.locale; var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__["useState"](collectFilterStates(mergedColumns, true)), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_React$useState, 2), filterStates = _React$useState2[0], setFilterStates = _React$useState2[1]; var mergedFilterStates = react__WEBPACK_IMPORTED_MODULE_3__["useMemo"](function () { var collectedStates = collectFilterStates(mergedColumns, false); // Return if not controlled if (collectedStates.every(function (_ref5) { var filteredKeys = _ref5.filteredKeys; return filteredKeys === undefined; })) { return filterStates; } return collectedStates; }, [mergedColumns, filterStates]); var getFilters = react__WEBPACK_IMPORTED_MODULE_3__["useCallback"](function () { return generateFilterInfo(mergedFilterStates); }, [mergedFilterStates]); var triggerFilter = function triggerFilter(filterState) { var newFilterStates = mergedFilterStates.filter(function (_ref6) { var key = _ref6.key; return key !== filterState.key; }); newFilterStates.push(filterState); setFilterStates(newFilterStates); onFilterChange(generateFilterInfo(newFilterStates), newFilterStates); }; var transformColumns = function transformColumns(innerColumns) { return injectFilter(prefixCls, dropdownPrefixCls, innerColumns, mergedFilterStates, triggerFilter, getPopupContainer, tableLocale); }; return [transformColumns, mergedFilterStates, getFilters]; } /* harmony default export */ __webpack_exports__["a"] = (useFilter); /***/ }), /***/ "./components/table/hooks/useLazyKVMap.ts": /*!************************************************!*\ !*** ./components/table/hooks/useLazyKVMap.ts ***! \************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useLazyKVMap; }); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); function useLazyKVMap(data, childrenColumnName, getRowKey) { var mapCacheRef = react__WEBPACK_IMPORTED_MODULE_1__["useRef"]({}); function getRecordByKey(key) { if (!mapCacheRef.current || mapCacheRef.current.data !== data || mapCacheRef.current.childrenColumnName !== childrenColumnName || mapCacheRef.current.getRowKey !== getRowKey) { var kvMap = new Map(); /* eslint-disable no-inner-declarations */ function dig(records) { records.forEach(function (record, index) { var rowKey = getRowKey(record, index); kvMap.set(rowKey, record); if (record && Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(record) === 'object' && childrenColumnName in record) { dig(record[childrenColumnName] || []); } }); } /* eslint-enable */ dig(data); mapCacheRef.current = { data: data, childrenColumnName: childrenColumnName, kvMap: kvMap, getRowKey: getRowKey }; } return mapCacheRef.current.kvMap.get(key); } return [getRecordByKey]; } /***/ }), /***/ "./components/table/hooks/usePagination.ts": /*!*************************************************!*\ !*** ./components/table/hooks/usePagination.ts ***! \*************************************************/ /*! exports provided: DEFAULT_PAGE_SIZE, getPaginationParam, default */ /*! exports used: DEFAULT_PAGE_SIZE, default, getPaginationParam */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DEFAULT_PAGE_SIZE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getPaginationParam; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return usePagination; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var DEFAULT_PAGE_SIZE = 10; function getPaginationParam(pagination, mergedPagination) { var param = { current: mergedPagination.current, pageSize: mergedPagination.pageSize }; var paginationObj = pagination && Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(pagination) === 'object' ? pagination : {}; Object.keys(paginationObj).forEach(function (pageProp) { var value = mergedPagination[pageProp]; if (typeof value !== 'function') { param[pageProp] = value; } }); return param; } function extendsObject() { var result = {}; for (var _len = arguments.length, list = new Array(_len), _key = 0; _key < _len; _key++) { list[_key] = arguments[_key]; } list.forEach(function (obj) { if (obj) { Object.keys(obj).forEach(function (key) { var val = obj[key]; if (val !== undefined) { result[key] = val; } }); } }); return result; } function usePagination(total, pagination, onChange) { var _a = pagination && Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(pagination) === 'object' ? pagination : {}, _a$total = _a.total, paginationTotal = _a$total === void 0 ? 0 : _a$total, paginationObj = __rest(_a, ["total"]); var _useState = Object(react__WEBPACK_IMPORTED_MODULE_3__["useState"])(function () { return { current: 'defaultCurrent' in paginationObj ? paginationObj.defaultCurrent : 1, pageSize: 'defaultPageSize' in paginationObj ? paginationObj.defaultPageSize : DEFAULT_PAGE_SIZE }; }), _useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_useState, 2), innerPagination = _useState2[0], setInnerPagination = _useState2[1]; // ============ Basic Pagination Config ============ var mergedPagination = extendsObject(innerPagination, paginationObj, { total: paginationTotal > 0 ? paginationTotal : total }); // Reset `current` if data length or pageSize changed var maxPage = Math.ceil((paginationTotal || total) / mergedPagination.pageSize); if (mergedPagination.current > maxPage) { // Prevent a maximum page count of 0 mergedPagination.current = maxPage || 1; } var refreshPagination = function refreshPagination() { var current = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; var pageSize = arguments.length > 1 ? arguments[1] : undefined; setInnerPagination({ current: current, pageSize: pageSize || mergedPagination.pageSize }); }; var onInternalChange = function onInternalChange(current, pageSize) { var _a; if (pagination) { (_a = pagination.onChange) === null || _a === void 0 ? void 0 : _a.call(pagination, current, pageSize); } refreshPagination(current, pageSize); onChange(current, pageSize || (mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.pageSize)); }; if (pagination === false) { return [{}, function () {}]; } return [Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, mergedPagination), { onChange: onInternalChange }), refreshPagination]; } /***/ }), /***/ "./components/table/hooks/useSelection.tsx": /*!*************************************************!*\ !*** ./components/table/hooks/useSelection.tsx ***! \*************************************************/ /*! exports provided: SELECTION_ALL, SELECTION_INVERT, SELECTION_NONE, default */ /*! exports used: SELECTION_ALL, SELECTION_INVERT, SELECTION_NONE, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SELECTION_ALL; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SELECTION_INVERT; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return SELECTION_NONE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return useSelection; }); /* harmony import */ var _babel_runtime_helpers_esm_toArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toArray */ "./node_modules/@babel/runtime/helpers/esm/toArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _ant_design_icons_es_icons_DownOutlined__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ant-design/icons/es/icons/DownOutlined */ "./node_modules/@ant-design/icons/es/icons/DownOutlined.js"); /* harmony import */ var rc_tree_es_utils_treeUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-tree/es/utils/treeUtil */ "./node_modules/rc-tree/es/utils/treeUtil.js"); /* harmony import */ var rc_tree_es_utils_conductUtil__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rc-tree/es/utils/conductUtil */ "./node_modules/rc-tree/es/utils/conductUtil.js"); /* harmony import */ var rc_tree_es_util__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rc-tree/es/util */ "./node_modules/rc-tree/es/util.js"); /* harmony import */ var rc_table__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rc-table */ "./node_modules/rc-table/es/index.js"); /* harmony import */ var rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! rc-util/es/hooks/useMergedState */ "./node_modules/rc-util/es/hooks/useMergedState.js"); /* harmony import */ var _checkbox__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../checkbox */ "./components/checkbox/index.tsx"); /* harmony import */ var _dropdown__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../dropdown */ "./components/dropdown/index.tsx"); /* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../menu */ "./components/menu/index.tsx"); /* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../radio */ "./components/radio/index.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../_util/devWarning */ "./components/_util/devWarning.ts"); // TODO: warning if use ajax!!! var SELECTION_ALL = 'SELECT_ALL'; var SELECTION_INVERT = 'SELECT_INVERT'; var SELECTION_NONE = 'SELECT_NONE'; function getFixedType(column) { return column && column.fixed; } function flattenData(data, childrenColumnName) { var list = []; (data || []).forEach(function (record) { list.push(record); if (record && Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(record) === 'object' && childrenColumnName in record) { list = [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(list), Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(flattenData(record[childrenColumnName], childrenColumnName))); } }); return list; } function useSelection(rowSelection, config) { var _ref = rowSelection || {}, preserveSelectedRowKeys = _ref.preserveSelectedRowKeys, selectedRowKeys = _ref.selectedRowKeys, defaultSelectedRowKeys = _ref.defaultSelectedRowKeys, getCheckboxProps = _ref.getCheckboxProps, onSelectionChange = _ref.onChange, onSelect = _ref.onSelect, onSelectAll = _ref.onSelectAll, onSelectInvert = _ref.onSelectInvert, onSelectNone = _ref.onSelectNone, onSelectMultiple = _ref.onSelectMultiple, selectionColWidth = _ref.columnWidth, selectionType = _ref.type, selections = _ref.selections, fixed = _ref.fixed, customizeRenderCell = _ref.renderCell, hideSelectAll = _ref.hideSelectAll, _ref$checkStrictly = _ref.checkStrictly, checkStrictly = _ref$checkStrictly === void 0 ? true : _ref$checkStrictly; var prefixCls = config.prefixCls, data = config.data, pageData = config.pageData, getRecordByKey = config.getRecordByKey, getRowKey = config.getRowKey, expandType = config.expandType, childrenColumnName = config.childrenColumnName, tableLocale = config.locale, expandIconColumnIndex = config.expandIconColumnIndex, getPopupContainer = config.getPopupContainer; // ======================== Caches ======================== var preserveRecordsRef = react__WEBPACK_IMPORTED_MODULE_6__["useRef"](new Map()); // ========================= Keys ========================= var _useMergedState = Object(rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"])(selectedRowKeys || defaultSelectedRowKeys || [], { value: selectedRowKeys }), _useMergedState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_useMergedState, 2), mergedSelectedKeys = _useMergedState2[0], setMergedSelectedKeys = _useMergedState2[1]; var _useMemo = Object(react__WEBPACK_IMPORTED_MODULE_6__["useMemo"])(function () { return checkStrictly ? { keyEntities: null } : Object(rc_tree_es_utils_treeUtil__WEBPACK_IMPORTED_MODULE_8__[/* convertDataToEntities */ "a"])(data, { externalGetKey: getRowKey, childrenPropName: childrenColumnName }); }, [data, getRowKey, checkStrictly, childrenColumnName]), keyEntities = _useMemo.keyEntities; // Get flatten data var flattedData = Object(react__WEBPACK_IMPORTED_MODULE_6__["useMemo"])(function () { return flattenData(pageData, childrenColumnName); }, [pageData, childrenColumnName]); // Get all checkbox props var checkboxPropsMap = Object(react__WEBPACK_IMPORTED_MODULE_6__["useMemo"])(function () { var map = new Map(); flattedData.forEach(function (record, index) { var key = getRowKey(record, index); var checkboxProps = (getCheckboxProps ? getCheckboxProps(record) : null) || {}; map.set(key, checkboxProps); if ( true && ('checked' in checkboxProps || 'defaultChecked' in checkboxProps)) { if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"])(false, 'Table', 'Do not set `checked` or `defaultChecked` in `getCheckboxProps`. Please use `selectedRowKeys` instead.'); } }); return map; }, [flattedData, getRowKey, getCheckboxProps]); var isCheckboxDisabled = Object(react__WEBPACK_IMPORTED_MODULE_6__["useCallback"])(function (r) { var _a; return !!((_a = checkboxPropsMap.get(getRowKey(r))) === null || _a === void 0 ? void 0 : _a.disabled); }, [checkboxPropsMap, getRowKey]); var _useMemo2 = Object(react__WEBPACK_IMPORTED_MODULE_6__["useMemo"])(function () { if (checkStrictly) { return [mergedSelectedKeys || [], []]; } var _conductCheck = Object(rc_tree_es_utils_conductUtil__WEBPACK_IMPORTED_MODULE_9__[/* conductCheck */ "a"])(mergedSelectedKeys, true, keyEntities, isCheckboxDisabled), checkedKeys = _conductCheck.checkedKeys, halfCheckedKeys = _conductCheck.halfCheckedKeys; return [checkedKeys || [], halfCheckedKeys]; }, [mergedSelectedKeys, checkStrictly, keyEntities, isCheckboxDisabled]), _useMemo3 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_useMemo2, 2), derivedSelectedKeys = _useMemo3[0], derivedHalfSelectedKeys = _useMemo3[1]; var derivedSelectedKeySet = Object(react__WEBPACK_IMPORTED_MODULE_6__["useMemo"])(function () { var keys = selectionType === 'radio' ? derivedSelectedKeys.slice(0, 1) : derivedSelectedKeys; return new Set(keys); }, [derivedSelectedKeys, selectionType]); var derivedHalfSelectedKeySet = Object(react__WEBPACK_IMPORTED_MODULE_6__["useMemo"])(function () { return selectionType === 'radio' ? new Set() : new Set(derivedHalfSelectedKeys); }, [derivedHalfSelectedKeys, selectionType]); // Save last selected key to enable range selection var _useState = Object(react__WEBPACK_IMPORTED_MODULE_6__["useState"])(null), _useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_useState, 2), lastSelectedKey = _useState2[0], setLastSelectedKey = _useState2[1]; // Reset if rowSelection reset react__WEBPACK_IMPORTED_MODULE_6__["useEffect"](function () { if (!rowSelection) { setMergedSelectedKeys([]); } }, [!!rowSelection]); var setSelectedKeys = Object(react__WEBPACK_IMPORTED_MODULE_6__["useCallback"])(function (keys) { var availableKeys; var records; if (preserveSelectedRowKeys) { // Keep key if mark as preserveSelectedRowKeys var newCache = new Map(); availableKeys = keys; records = keys.map(function (key) { var record = getRecordByKey(key); if (!record && preserveRecordsRef.current.has(key)) { record = preserveRecordsRef.current.get(key); } newCache.set(key, record); return record; }); // Refresh to new cache preserveRecordsRef.current = newCache; } else { // Filter key which not exist in the `dataSource` availableKeys = []; records = []; keys.forEach(function (key) { var record = getRecordByKey(key); if (record !== undefined) { availableKeys.push(key); records.push(record); } }); } setMergedSelectedKeys(availableKeys); onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(availableKeys, records); }, [setMergedSelectedKeys, getRecordByKey, onSelectionChange, preserveSelectedRowKeys]); // ====================== Selections ====================== // Trigger single `onSelect` event var triggerSingleSelection = Object(react__WEBPACK_IMPORTED_MODULE_6__["useCallback"])(function (key, selected, keys, event) { if (onSelect) { var rows = keys.map(function (k) { return getRecordByKey(k); }); onSelect(getRecordByKey(key), selected, rows, event); } setSelectedKeys(keys); }, [onSelect, getRecordByKey, setSelectedKeys]); var mergedSelections = Object(react__WEBPACK_IMPORTED_MODULE_6__["useMemo"])(function () { if (!selections || hideSelectAll) { return null; } var selectionList = selections === true ? [SELECTION_ALL, SELECTION_INVERT, SELECTION_NONE] : selections; return selectionList.map(function (selection) { if (selection === SELECTION_ALL) { return { key: 'all', text: tableLocale.selectionAll, onSelect: function onSelect() { setSelectedKeys(data.map(function (record, index) { return getRowKey(record, index); })); } }; } if (selection === SELECTION_INVERT) { return { key: 'invert', text: tableLocale.selectInvert, onSelect: function onSelect() { var keySet = new Set(derivedSelectedKeySet); pageData.forEach(function (record, index) { var key = getRowKey(record, index); if (keySet.has(key)) { keySet["delete"](key); } else { keySet.add(key); } }); var keys = Array.from(keySet); if (onSelectInvert) { Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"])(false, 'Table', '`onSelectInvert` will be removed in future. Please use `onChange` instead.'); onSelectInvert(keys); } setSelectedKeys(keys); } }; } if (selection === SELECTION_NONE) { return { key: 'none', text: tableLocale.selectNone, onSelect: function onSelect() { onSelectNone === null || onSelectNone === void 0 ? void 0 : onSelectNone(); setSelectedKeys([]); } }; } return selection; }); }, [selections, derivedSelectedKeySet, pageData, getRowKey, onSelectInvert, setSelectedKeys]); // ======================= Columns ======================== var transformColumns = Object(react__WEBPACK_IMPORTED_MODULE_6__["useCallback"])(function (columns) { if (!rowSelection) { return columns; } // Support selection var keySet = new Set(derivedSelectedKeySet); // Record key only need check with enabled var recordKeys = flattedData.map(getRowKey).filter(function (key) { return !checkboxPropsMap.get(key).disabled; }); var checkedCurrentAll = recordKeys.every(function (key) { return keySet.has(key); }); var checkedCurrentSome = recordKeys.some(function (key) { return keySet.has(key); }); var onSelectAllChange = function onSelectAllChange() { var changeKeys = []; if (checkedCurrentAll) { recordKeys.forEach(function (key) { keySet["delete"](key); changeKeys.push(key); }); } else { recordKeys.forEach(function (key) { if (!keySet.has(key)) { keySet.add(key); changeKeys.push(key); } }); } var keys = Array.from(keySet); onSelectAll === null || onSelectAll === void 0 ? void 0 : onSelectAll(!checkedCurrentAll, keys.map(function (k) { return getRecordByKey(k); }), changeKeys.map(function (k) { return getRecordByKey(k); })); setSelectedKeys(keys); }; // ===================== Render ===================== // Title Cell var title; if (selectionType !== 'radio') { var customizeSelections; if (mergedSelections) { var menu = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_menu__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"], { getPopupContainer: getPopupContainer }, mergedSelections.map(function (selection, index) { var key = selection.key, text = selection.text, onSelectionClick = selection.onSelect; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_menu__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].Item, { key: key || index, onClick: function onClick() { onSelectionClick === null || onSelectionClick === void 0 ? void 0 : onSelectionClick(recordKeys); } }, text); })); customizeSelections = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", { className: "".concat(prefixCls, "-selection-extra") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_dropdown__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"], { overlay: menu, getPopupContainer: getPopupContainer }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("span", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_ant_design_icons_es_icons_DownOutlined__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], null)))); } var allDisabled = flattedData.every(function (record, index) { var key = getRowKey(record, index); var checkboxProps = checkboxPropsMap.get(key) || {}; return checkboxProps.disabled; }); title = !hideSelectAll && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", { className: "".concat(prefixCls, "-selection") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_checkbox__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"], { checked: !allDisabled && !!flattedData.length && checkedCurrentAll, indeterminate: !checkedCurrentAll && checkedCurrentSome, onChange: onSelectAllChange, disabled: flattedData.length === 0 || allDisabled, skipGroup: true }), customizeSelections); } // Body Cell var renderCell; if (selectionType === 'radio') { renderCell = function renderCell(_, record, index) { var key = getRowKey(record, index); var checked = keySet.has(key); return { node: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_radio__WEBPACK_IMPORTED_MODULE_16__[/* default */ "c"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, checkboxPropsMap.get(key), { checked: checked, onClick: function onClick(e) { return e.stopPropagation(); }, onChange: function onChange(event) { if (!keySet.has(key)) { triggerSingleSelection(key, true, [key], event.nativeEvent); } } })), checked: checked }; }; } else { renderCell = function renderCell(_, record, index) { var _a; var key = getRowKey(record, index); var checked = keySet.has(key); var indeterminate = derivedHalfSelectedKeySet.has(key); var checkboxProps = checkboxPropsMap.get(key); var mergedIndeterminate; if (expandType === 'nest') { mergedIndeterminate = indeterminate; Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"])(typeof (checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.indeterminate) !== 'boolean', 'Table', 'set `indeterminate` using `rowSelection.getCheckboxProps` is not allowed with tree structured dataSource.'); } else { mergedIndeterminate = (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.indeterminate) !== null && _a !== void 0 ? _a : indeterminate; } // Record checked return { node: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_checkbox__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, checkboxProps, { indeterminate: mergedIndeterminate, checked: checked, skipGroup: true, onClick: function onClick(e) { return e.stopPropagation(); }, onChange: function onChange(_ref2) { var nativeEvent = _ref2.nativeEvent; var shiftKey = nativeEvent.shiftKey; var startIndex = -1; var endIndex = -1; // Get range of this if (shiftKey && checkStrictly) { var pointKeys = new Set([lastSelectedKey, key]); recordKeys.some(function (recordKey, recordIndex) { if (pointKeys.has(recordKey)) { if (startIndex === -1) { startIndex = recordIndex; } else { endIndex = recordIndex; return true; } } return false; }); } if (endIndex !== -1 && startIndex !== endIndex && checkStrictly) { // Batch update selections var rangeKeys = recordKeys.slice(startIndex, endIndex + 1); var changedKeys = []; if (checked) { rangeKeys.forEach(function (recordKey) { if (keySet.has(recordKey)) { changedKeys.push(recordKey); keySet["delete"](recordKey); } }); } else { rangeKeys.forEach(function (recordKey) { if (!keySet.has(recordKey)) { changedKeys.push(recordKey); keySet.add(recordKey); } }); } var keys = Array.from(keySet); onSelectMultiple === null || onSelectMultiple === void 0 ? void 0 : onSelectMultiple(!checked, keys.map(function (recordKey) { return getRecordByKey(recordKey); }), changedKeys.map(function (recordKey) { return getRecordByKey(recordKey); })); setSelectedKeys(keys); } else { // Single record selected var originCheckedKeys = derivedSelectedKeys; if (checkStrictly) { var checkedKeys = checked ? Object(rc_tree_es_util__WEBPACK_IMPORTED_MODULE_10__[/* arrDel */ "b"])(originCheckedKeys, key) : Object(rc_tree_es_util__WEBPACK_IMPORTED_MODULE_10__[/* arrAdd */ "a"])(originCheckedKeys, key); triggerSingleSelection(key, !checked, checkedKeys, nativeEvent); } else { // Always fill first var result = Object(rc_tree_es_utils_conductUtil__WEBPACK_IMPORTED_MODULE_9__[/* conductCheck */ "a"])([].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(originCheckedKeys), [key]), true, keyEntities, isCheckboxDisabled); var _checkedKeys = result.checkedKeys, halfCheckedKeys = result.halfCheckedKeys; var nextCheckedKeys = _checkedKeys; // If remove, we do it again to correction if (checked) { var tempKeySet = new Set(_checkedKeys); tempKeySet["delete"](key); nextCheckedKeys = Object(rc_tree_es_utils_conductUtil__WEBPACK_IMPORTED_MODULE_9__[/* conductCheck */ "a"])(Array.from(tempKeySet), { checked: false, halfCheckedKeys: halfCheckedKeys }, keyEntities, isCheckboxDisabled).checkedKeys; } triggerSingleSelection(key, !checked, nextCheckedKeys, nativeEvent); } } setLastSelectedKey(key); } })), checked: checked }; }; } var renderSelectionCell = function renderSelectionCell(_, record, index) { var _renderCell = renderCell(_, record, index), node = _renderCell.node, checked = _renderCell.checked; if (customizeRenderCell) { return customizeRenderCell(checked, record, index, node); } return node; }; // Columns var selectionColumn = Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ width: selectionColWidth, className: "".concat(prefixCls, "-selection-column"), title: rowSelection.columnTitle || title, render: renderSelectionCell }, rc_table__WEBPACK_IMPORTED_MODULE_11__[/* INTERNAL_COL_DEFINE */ "a"], { className: "".concat(prefixCls, "-selection-col") }); if (expandType === 'row' && columns.length && !expandIconColumnIndex) { var _columns = Object(_babel_runtime_helpers_esm_toArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(columns), expandColumn = _columns[0], restColumns = _columns.slice(1); var selectionFixed = fixed || getFixedType(restColumns[0]); if (selectionFixed) { expandColumn.fixed = selectionFixed; } return [expandColumn, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, selectionColumn), { fixed: selectionFixed })].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(restColumns)); } return [Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, selectionColumn), { fixed: fixed || getFixedType(columns[0]) })].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(columns)); }, [getRowKey, flattedData, rowSelection, derivedSelectedKeys, derivedSelectedKeySet, derivedHalfSelectedKeySet, selectionColWidth, mergedSelections, expandType, lastSelectedKey, checkboxPropsMap, onSelectMultiple, triggerSingleSelection, isCheckboxDisabled]); return [transformColumns, derivedSelectedKeySet]; } /***/ }), /***/ "./components/table/hooks/useSorter.tsx": /*!**********************************************!*\ !*** ./components/table/hooks/useSorter.tsx ***! \**********************************************/ /*! exports provided: getSortData, default */ /*! exports used: default, getSortData */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getSortData; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useFilterSorter; }); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _ant_design_icons_es_icons_CaretDownOutlined__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ant-design/icons/es/icons/CaretDownOutlined */ "./node_modules/@ant-design/icons/es/icons/CaretDownOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_CaretUpOutlined__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ant-design/icons/es/icons/CaretUpOutlined */ "./node_modules/@ant-design/icons/es/icons/CaretUpOutlined.js"); /* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../tooltip */ "./components/tooltip/index.tsx"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../util */ "./components/table/util.ts"); var ASCEND = 'ascend'; var DESCEND = 'descend'; function getMultiplePriority(column) { if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(column.sorter) === 'object' && typeof column.sorter.multiple === 'number') { return column.sorter.multiple; } return false; } function getSortFunction(sorter) { if (typeof sorter === 'function') { return sorter; } if (sorter && Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(sorter) === 'object' && sorter.compare) { return sorter.compare; } return false; } function nextSortDirection(sortDirections, current) { if (!current) { return sortDirections[0]; } return sortDirections[sortDirections.indexOf(current) + 1]; } function collectSortStates(columns, init, pos) { var sortStates = []; function pushState(column, columnPos) { sortStates.push({ column: column, key: Object(_util__WEBPACK_IMPORTED_MODULE_10__[/* getColumnKey */ "a"])(column, columnPos), multiplePriority: getMultiplePriority(column), sortOrder: column.sortOrder }); } (columns || []).forEach(function (column, index) { var columnPos = Object(_util__WEBPACK_IMPORTED_MODULE_10__[/* getColumnPos */ "b"])(index, pos); if (column.children) { if ('sortOrder' in column) { // Controlled pushState(column, columnPos); } sortStates = [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(sortStates), Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(collectSortStates(column.children, init, columnPos))); } else if (column.sorter) { if ('sortOrder' in column) { // Controlled pushState(column, columnPos); } else if (init && column.defaultSortOrder) { // Default sorter sortStates.push({ column: column, key: Object(_util__WEBPACK_IMPORTED_MODULE_10__[/* getColumnKey */ "a"])(column, columnPos), multiplePriority: getMultiplePriority(column), sortOrder: column.defaultSortOrder }); } } }); return sortStates; } function injectSorter(prefixCls, columns, sorterSates, triggerSorter, defaultSortDirections, tableLocale, tableShowSorterTooltip, pos) { return (columns || []).map(function (column, index) { var columnPos = Object(_util__WEBPACK_IMPORTED_MODULE_10__[/* getColumnPos */ "b"])(index, pos); var newColumn = column; if (newColumn.sorter) { var sortDirections = newColumn.sortDirections || defaultSortDirections; var showSorterTooltip = newColumn.showSorterTooltip === undefined ? tableShowSorterTooltip : newColumn.showSorterTooltip; var columnKey = Object(_util__WEBPACK_IMPORTED_MODULE_10__[/* getColumnKey */ "a"])(newColumn, columnPos); var sorterState = sorterSates.find(function (_ref) { var key = _ref.key; return key === columnKey; }); var sorterOrder = sorterState ? sorterState.sortOrder : null; var nextSortOrder = nextSortDirection(sortDirections, sorterOrder); var upNode = sortDirections.includes(ASCEND) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_ant_design_icons_es_icons_CaretUpOutlined__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], { className: classnames__WEBPACK_IMPORTED_MODULE_6___default()("".concat(prefixCls, "-column-sorter-up"), { active: sorterOrder === ASCEND }) }); var downNode = sortDirections.includes(DESCEND) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_ant_design_icons_es_icons_CaretDownOutlined__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], { className: classnames__WEBPACK_IMPORTED_MODULE_6___default()("".concat(prefixCls, "-column-sorter-down"), { active: sorterOrder === DESCEND }) }); var _ref2 = tableLocale || {}, cancelSort = _ref2.cancelSort, triggerAsc = _ref2.triggerAsc, triggerDesc = _ref2.triggerDesc; var sortTip = cancelSort; if (nextSortOrder === DESCEND) { sortTip = triggerDesc; } else if (nextSortOrder === ASCEND) { sortTip = triggerAsc; } var tooltipProps = Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(showSorterTooltip) === 'object' ? showSorterTooltip : { title: sortTip }; newColumn = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, newColumn), { className: classnames__WEBPACK_IMPORTED_MODULE_6___default()(newColumn.className, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(prefixCls, "-column-sort"), sorterOrder)), title: function title(renderProps) { var renderSortTitle = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("div", { className: "".concat(prefixCls, "-column-sorters") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("span", { className: "".concat(prefixCls, "-column-title") }, Object(_util__WEBPACK_IMPORTED_MODULE_10__[/* renderColumnTitle */ "c"])(column.title, renderProps)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("span", { className: classnames__WEBPACK_IMPORTED_MODULE_6___default()("".concat(prefixCls, "-column-sorter"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(prefixCls, "-column-sorter-full"), !!(upNode && downNode))) }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("span", { className: "".concat(prefixCls, "-column-sorter-inner") }, upNode, downNode))); return showSorterTooltip ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_tooltip__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], tooltipProps, renderSortTitle) : renderSortTitle; }, onHeaderCell: function onHeaderCell(col) { var cell = column.onHeaderCell && column.onHeaderCell(col) || {}; var originOnClick = cell.onClick; cell.onClick = function (event) { triggerSorter({ column: column, key: columnKey, sortOrder: nextSortOrder, multiplePriority: getMultiplePriority(column) }); if (originOnClick) { originOnClick(event); } }; cell.className = classnames__WEBPACK_IMPORTED_MODULE_6___default()(cell.className, "".concat(prefixCls, "-column-has-sorters")); return cell; } }); } if ('children' in newColumn) { newColumn = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, newColumn), { children: injectSorter(prefixCls, newColumn.children, sorterSates, triggerSorter, defaultSortDirections, tableLocale, tableShowSorterTooltip, columnPos) }); } return newColumn; }); } function stateToInfo(sorterStates) { var column = sorterStates.column, sortOrder = sorterStates.sortOrder; return { column: column, order: sortOrder, field: column.dataIndex, columnKey: column.key }; } function generateSorterInfo(sorterStates) { var list = sorterStates.filter(function (_ref3) { var sortOrder = _ref3.sortOrder; return sortOrder; }).map(stateToInfo); // =========== Legacy compatible support =========== // https://github.com/ant-design/ant-design/pull/19226 if (list.length === 0 && sorterStates.length) { return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, stateToInfo(sorterStates[sorterStates.length - 1])), { column: undefined }); } if (list.length <= 1) { return list[0] || {}; } return list; } function getSortData(data, sortStates, childrenColumnName) { var innerSorterStates = sortStates.slice().sort(function (a, b) { return b.multiplePriority - a.multiplePriority; }); var cloneData = data.slice(); var runningSorters = innerSorterStates.filter(function (_ref4) { var sorter = _ref4.column.sorter, sortOrder = _ref4.sortOrder; return getSortFunction(sorter) && sortOrder; }); // Skip if no sorter needed if (!runningSorters.length) { return cloneData; } return cloneData.sort(function (record1, record2) { for (var i = 0; i < runningSorters.length; i += 1) { var sorterState = runningSorters[i]; var sorter = sorterState.column.sorter, sortOrder = sorterState.sortOrder; var compareFn = getSortFunction(sorter); if (compareFn && sortOrder) { var compareResult = compareFn(record1, record2, sortOrder); if (compareResult !== 0) { return sortOrder === ASCEND ? compareResult : -compareResult; } } } return 0; }).map(function (record) { var subRecords = record[childrenColumnName]; if (subRecords) { return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, record), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, childrenColumnName, getSortData(subRecords, sortStates, childrenColumnName))); } return record; }); } function useFilterSorter(_ref5) { var prefixCls = _ref5.prefixCls, mergedColumns = _ref5.mergedColumns, onSorterChange = _ref5.onSorterChange, sortDirections = _ref5.sortDirections, tableLocale = _ref5.tableLocale, showSorterTooltip = _ref5.showSorterTooltip; var _React$useState = react__WEBPACK_IMPORTED_MODULE_5__["useState"](collectSortStates(mergedColumns, true)), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_React$useState, 2), sortStates = _React$useState2[0], setSortStates = _React$useState2[1]; var mergedSorterStates = react__WEBPACK_IMPORTED_MODULE_5__["useMemo"](function () { var validate = true; var collectedStates = collectSortStates(mergedColumns, false); // Return if not controlled if (!collectedStates.length) { return sortStates; } var validateStates = []; function patchStates(state) { if (validate) { validateStates.push(state); } else { validateStates.push(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, state), { sortOrder: null })); } } var multipleMode = null; collectedStates.forEach(function (state) { if (multipleMode === null) { patchStates(state); if (state.sortOrder) { if (state.multiplePriority === false) { validate = false; } else { multipleMode = true; } } } else if (multipleMode && state.multiplePriority !== false) { patchStates(state); } else { validate = false; patchStates(state); } }); return validateStates; }, [mergedColumns, sortStates]); // Get render columns title required props var columnTitleSorterProps = react__WEBPACK_IMPORTED_MODULE_5__["useMemo"](function () { var sortColumns = mergedSorterStates.map(function (_ref6) { var column = _ref6.column, sortOrder = _ref6.sortOrder; return { column: column, order: sortOrder }; }); return { sortColumns: sortColumns, // Legacy sortColumn: sortColumns[0] && sortColumns[0].column, sortOrder: sortColumns[0] && sortColumns[0].order }; }, [mergedSorterStates]); function triggerSorter(sortState) { var newSorterStates; if (sortState.multiplePriority === false || !mergedSorterStates.length || mergedSorterStates[0].multiplePriority === false) { newSorterStates = [sortState]; } else { newSorterStates = [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(mergedSorterStates.filter(function (_ref7) { var key = _ref7.key; return key !== sortState.key; })), [sortState]); } setSortStates(newSorterStates); onSorterChange(generateSorterInfo(newSorterStates), newSorterStates); } var transformColumns = function transformColumns(innerColumns) { return injectSorter(prefixCls, innerColumns, mergedSorterStates, triggerSorter, sortDirections, tableLocale, showSorterTooltip); }; var getSorters = function getSorters() { return generateSorterInfo(mergedSorterStates); }; return [transformColumns, mergedSorterStates, columnTitleSorterProps, getSorters]; } /***/ }), /***/ "./components/table/hooks/useTitleColumns.tsx": /*!****************************************************!*\ !*** ./components/table/hooks/useTitleColumns.tsx ***! \****************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useTitleColumns; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util */ "./components/table/util.ts"); function fillTitle(columns, columnTitleProps) { return columns.map(function (column) { var cloneColumn = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, column); cloneColumn.title = Object(_util__WEBPACK_IMPORTED_MODULE_2__[/* renderColumnTitle */ "c"])(column.title, columnTitleProps); if ('children' in cloneColumn) { cloneColumn.children = fillTitle(cloneColumn.children, columnTitleProps); } return cloneColumn; }); } function useTitleColumns(columnTitleProps) { var filledColumns = react__WEBPACK_IMPORTED_MODULE_1__["useCallback"](function (columns) { return fillTitle(columns, columnTitleProps); }, [columnTitleProps]); return [filledColumns]; } /***/ }), /***/ "./components/table/index.tsx": /*!************************************!*\ !*** ./components/table/index.tsx ***! \************************************/ /*! exports provided: ColumnProps, ColumnsType, ColumnType, ColumnGroupType, TableProps, TablePaginationConfig, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _Table__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Table */ "./components/table/Table.tsx"); /* harmony import */ var _Column__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Column */ "./components/table/Column.tsx"); /* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./interface */ "./components/table/interface.tsx"); /* harmony default export */ __webpack_exports__["a"] = (_Table__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]); /***/ }), /***/ "./components/table/interface.tsx": /*!****************************************!*\ !*** ./components/table/interface.tsx ***! \****************************************/ /*! exports provided: GetRowKey, ExpandableConfig */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var rc_table_es_interface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-table/es/interface */ "./node_modules/rc-table/es/interface.js"); /* harmony import */ var _util_type__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_util/type */ "./components/_util/type.ts"); // import { TableAction } from './Table'; var TableActions = Object(_util_type__WEBPACK_IMPORTED_MODULE_1__[/* tuple */ "a"])('paginate', 'sort', 'filter'); /***/ }), /***/ "./components/table/style/index.less": /*!*******************************************!*\ !*** ./components/table/style/index.less ***! \*******************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/table/style/index.tsx": /*!******************************************!*\ !*** ./components/table/style/index.tsx ***! \******************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/table/style/index.less"); /* harmony import */ var _button_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../button/style */ "./components/button/style/index.tsx"); /* harmony import */ var _empty_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../empty/style */ "./components/empty/style/index.tsx"); /* harmony import */ var _radio_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../radio/style */ "./components/radio/style/index.tsx"); /* harmony import */ var _checkbox_style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../checkbox/style */ "./components/checkbox/style/index.tsx"); /* harmony import */ var _dropdown_style__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../dropdown/style */ "./components/dropdown/style/index.tsx"); /* harmony import */ var _spin_style__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../spin/style */ "./components/spin/style/index.tsx"); /* harmony import */ var _pagination_style__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../pagination/style */ "./components/pagination/style/index.tsx"); /* harmony import */ var _tooltip_style__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../tooltip/style */ "./components/tooltip/style/index.tsx"); // style dependencies // deps-lint-skip: menu // deps-lint-skip: grid /***/ }), /***/ "./components/table/util.ts": /*!**********************************!*\ !*** ./components/table/util.ts ***! \**********************************/ /*! exports provided: getColumnKey, getColumnPos, renderColumnTitle */ /*! exports used: getColumnKey, getColumnPos, renderColumnTitle */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getColumnKey; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getColumnPos; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return renderColumnTitle; }); function getColumnKey(column, defaultKey) { if ('key' in column && column.key !== undefined && column.key !== null) { return column.key; } if (column.dataIndex) { return Array.isArray(column.dataIndex) ? column.dataIndex.join('.') : column.dataIndex; } return defaultKey; } function getColumnPos(index, pos) { return pos ? "".concat(pos, "-").concat(index) : "".concat(index); } function renderColumnTitle(title, props) { if (typeof title === 'function') { return title(props); } return title; } /***/ }), /***/ "./components/tabs/index.tsx": /*!***********************************!*\ !*** ./components/tabs/index.tsx ***! \***********************************/ /*! exports provided: TabPaneProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var rc_tabs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-tabs */ "./node_modules/rc-tabs/es/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _ant_design_icons_es_icons_EllipsisOutlined__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/icons/es/icons/EllipsisOutlined */ "./node_modules/@ant-design/icons/es/icons/EllipsisOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_PlusOutlined__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ant-design/icons/es/icons/PlusOutlined */ "./node_modules/@ant-design/icons/es/icons/PlusOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseOutlined */ "./node_modules/@ant-design/icons/es/icons/CloseOutlined.js"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../config-provider/SizeContext */ "./components/config-provider/SizeContext.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; function Tabs(_a) { var type = _a.type, className = _a.className, propSize = _a.size, _onEdit = _a.onEdit, hideAdd = _a.hideAdd, centered = _a.centered, addIcon = _a.addIcon, props = __rest(_a, ["type", "className", "size", "onEdit", "hideAdd", "centered", "addIcon"]); var customizePrefixCls = props.prefixCls, _props$moreIcon = props.moreIcon, moreIcon = _props$moreIcon === void 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_EllipsisOutlined__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], null) : _props$moreIcon; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_9__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var prefixCls = getPrefixCls('tabs', customizePrefixCls); var editable; if (type === 'editable-card') { editable = { onEdit: function onEdit(editType, _ref) { var key = _ref.key, event = _ref.event; _onEdit === null || _onEdit === void 0 ? void 0 : _onEdit(editType === 'add' ? event : key, editType); }, removeIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], null), addIcon: addIcon || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_PlusOutlined__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], null), showAdd: hideAdd !== true }; } var rootPrefixCls = getPrefixCls(); if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(!('onPrevClick' in props) && !('onNextClick' in props), 'Tabs', '`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead.'); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_10__[/* default */ "b"].Consumer, null, function (contextSize) { var _classNames; var size = propSize !== undefined ? propSize : contextSize; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](rc_tabs__WEBPACK_IMPORTED_MODULE_3__[/* default */ "b"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ direction: direction, moreTransitionName: "".concat(rootPrefixCls, "-slide-up") }, props, { className: classnames__WEBPACK_IMPORTED_MODULE_4___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(size), size), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-card"), ['card', 'editable-card'].includes(type)), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-editable-card"), type === 'editable-card'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-centered"), centered), _classNames), className), editable: editable, moreIcon: moreIcon, prefixCls: prefixCls })); }); } Tabs.TabPane = rc_tabs__WEBPACK_IMPORTED_MODULE_3__[/* TabPane */ "a"]; /* harmony default export */ __webpack_exports__["a"] = (Tabs); /***/ }), /***/ "./components/tabs/style/index.less": /*!******************************************!*\ !*** ./components/tabs/style/index.less ***! \******************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/tabs/style/index.tsx": /*!*****************************************!*\ !*** ./components/tabs/style/index.tsx ***! \*****************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/tabs/style/index.less"); /***/ }), /***/ "./components/tag/CheckableTag.tsx": /*!*****************************************!*\ !*** ./components/tag/CheckableTag.tsx ***! \*****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var CheckableTag = function CheckableTag(_a) { var _classNames; var customizePrefixCls = _a.prefixCls, className = _a.className, checked = _a.checked, onChange = _a.onChange, onClick = _a.onClick, restProps = __rest(_a, ["prefixCls", "className", "checked", "onChange", "onClick"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_4__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls; var handleClick = function handleClick(e) { onChange === null || onChange === void 0 ? void 0 : onChange(!checked); onClick === null || onClick === void 0 ? void 0 : onClick(e); }; var prefixCls = getPrefixCls('tag', customizePrefixCls); var cls = classnames__WEBPACK_IMPORTED_MODULE_3___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-checkable"), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-checkable-checked"), checked), _classNames), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, restProps, { className: cls, onClick: handleClick })); }; /* harmony default export */ __webpack_exports__["a"] = (CheckableTag); /***/ }), /***/ "./components/tag/index.tsx": /*!**********************************!*\ !*** ./components/tag/index.tsx ***! \**********************************/ /*! exports provided: CheckableTagProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var _ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseOutlined */ "./node_modules/@ant-design/icons/es/icons/CloseOutlined.js"); /* harmony import */ var _CheckableTag__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CheckableTag */ "./components/tag/CheckableTag.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_colors__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../_util/colors */ "./components/_util/colors.ts"); /* harmony import */ var _util_wave__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../_util/wave */ "./components/_util/wave.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var PresetColorRegex = new RegExp("^(".concat(_util_colors__WEBPACK_IMPORTED_MODULE_9__[/* PresetColorTypes */ "a"].join('|'), ")(-inverse)?$")); var PresetStatusColorRegex = new RegExp("^(".concat(_util_colors__WEBPACK_IMPORTED_MODULE_9__[/* PresetStatusColorTypes */ "b"].join('|'), ")$")); var InternalTag = function InternalTag(_a, ref) { var _classNames; var customizePrefixCls = _a.prefixCls, className = _a.className, style = _a.style, children = _a.children, icon = _a.icon, color = _a.color, onClose = _a.onClose, closeIcon = _a.closeIcon, _a$closable = _a.closable, closable = _a$closable === void 0 ? false : _a$closable, props = __rest(_a, ["prefixCls", "className", "style", "children", "icon", "color", "onClose", "closeIcon", "closable"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_3__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_8__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__["useState"](true), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_React$useState, 2), visible = _React$useState2[0], setVisible = _React$useState2[1]; react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { if ('visible' in props) { setVisible(props.visible); } }, [props.visible]); var isPresetColor = function isPresetColor() { if (!color) { return false; } return PresetColorRegex.test(color) || PresetStatusColorRegex.test(color); }; var tagStyle = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ backgroundColor: color && !isPresetColor() ? color : undefined }, style); var presetColor = isPresetColor(); var prefixCls = getPrefixCls('tag', customizePrefixCls); var tagClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(color), presetColor), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-has-color"), color && !presetColor), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-hidden"), !visible), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className); var handleCloseClick = function handleCloseClick(e) { e.stopPropagation(); onClose === null || onClose === void 0 ? void 0 : onClose(e); if (e.defaultPrevented) { return; } if (!('visible' in props)) { setVisible(false); } }; var renderCloseIcon = function renderCloseIcon() { if (closable) { return closeIcon ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", { className: "".concat(prefixCls, "-close-icon"), onClick: handleCloseClick }, closeIcon) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], { className: "".concat(prefixCls, "-close-icon"), onClick: handleCloseClick }); } return null; }; var isNeedWave = 'onClick' in props || children && children.type === 'a'; var tagProps = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(props, ['visible']); var iconNode = icon || null; var kids = iconNode ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](react__WEBPACK_IMPORTED_MODULE_3__["Fragment"], null, iconNode, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", null, children)) : children; var tagNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, tagProps, { ref: ref, className: tagClassName, style: tagStyle }), kids, renderCloseIcon()); return isNeedWave ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_util_wave__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], null, tagNode) : tagNode; }; var Tag = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](InternalTag); Tag.displayName = 'Tag'; Tag.CheckableTag = _CheckableTag__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"]; /* harmony default export */ __webpack_exports__["a"] = (Tag); /***/ }), /***/ "./components/tag/style/index.less": /*!*****************************************!*\ !*** ./components/tag/style/index.less ***! \*****************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/tag/style/index.tsx": /*!****************************************!*\ !*** ./components/tag/style/index.tsx ***! \****************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/tag/style/index.less"); /***/ }), /***/ "./components/time-picker/index.tsx": /*!******************************************!*\ !*** ./components/time-picker/index.tsx ***! \******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _date_picker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../date-picker */ "./components/date-picker/index.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var InternalTimePicker = _date_picker__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].TimePicker, InternalRangePicker = _date_picker__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].RangePicker; var RangePicker = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["forwardRef"](function (props, ref) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](InternalRangePicker, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, props, { dropdownClassName: props.popupClassName, picker: "time", mode: undefined, ref: ref })); }); var TimePicker = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["forwardRef"](function (_a, ref) { var addon = _a.addon, renderExtraFooter = _a.renderExtraFooter, popupClassName = _a.popupClassName, restProps = __rest(_a, ["addon", "renderExtraFooter", "popupClassName"]); var internalRenderExtraFooter = react__WEBPACK_IMPORTED_MODULE_1__["useMemo"](function () { if (renderExtraFooter) { return renderExtraFooter; } if (addon) { if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(false, 'TimePicker', '`addon` is deprecated. Please use `renderExtraFooter` instead.'); return addon; } return undefined; }, [addon, renderExtraFooter]); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](InternalTimePicker, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, restProps, { dropdownClassName: popupClassName, mode: undefined, ref: ref, renderExtraFooter: internalRenderExtraFooter })); }); TimePicker.displayName = 'TimePicker'; TimePicker.RangePicker = RangePicker; /* harmony default export */ __webpack_exports__["a"] = (TimePicker); /***/ }), /***/ "./components/time-picker/locale/en_US.tsx": /*!*************************************************!*\ !*** ./components/time-picker/locale/en_US.tsx ***! \*************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; var locale = { placeholder: 'Select time', rangePlaceholder: ['Start time', 'End time'] }; /* harmony default export */ __webpack_exports__["a"] = (locale); /***/ }), /***/ "./components/time-picker/style/index.less": /*!*************************************************!*\ !*** ./components/time-picker/style/index.less ***! \*************************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/time-picker/style/index.tsx": /*!************************************************!*\ !*** ./components/time-picker/style/index.tsx ***! \************************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/time-picker/style/index.less"); /* harmony import */ var _date_picker_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../date-picker/style */ "./components/date-picker/style/index.tsx"); // style dependencies /***/ }), /***/ "./components/timeline/Timeline.tsx": /*!******************************************!*\ !*** ./components/timeline/Timeline.tsx ***! \******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _ant_design_icons_es_icons_LoadingOutlined__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ant-design/icons/es/icons/LoadingOutlined */ "./node_modules/@ant-design/icons/es/icons/LoadingOutlined.js"); /* harmony import */ var _TimelineItem__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./TimelineItem */ "./components/timeline/TimelineItem.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Timeline = function Timeline(props) { var _classNames; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_6__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var customizePrefixCls = props.prefixCls, _props$pending = props.pending, pending = _props$pending === void 0 ? null : _props$pending, pendingDot = props.pendingDot, children = props.children, className = props.className, _props$reverse = props.reverse, reverse = _props$reverse === void 0 ? false : _props$reverse, _props$mode = props.mode, mode = _props$mode === void 0 ? '' : _props$mode, restProps = __rest(props, ["prefixCls", "pending", "pendingDot", "children", "className", "reverse", "mode"]); var prefixCls = getPrefixCls('timeline', customizePrefixCls); var pendingNode = typeof pending === 'boolean' ? null : pending; var pendingItem = pending ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_TimelineItem__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], { pending: !!pending, dot: pendingDot || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_LoadingOutlined__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], null) }, pendingNode) : null; var timeLineItems = react__WEBPACK_IMPORTED_MODULE_2__["Children"].toArray(children); timeLineItems.push(pendingItem); if (reverse) { timeLineItems.reverse(); } var getPositionCls = function getPositionCls(ele, idx) { if (mode === 'alternate') { if (ele.props.position === 'right') return "".concat(prefixCls, "-item-right"); if (ele.props.position === 'left') return "".concat(prefixCls, "-item-left"); return idx % 2 === 0 ? "".concat(prefixCls, "-item-left") : "".concat(prefixCls, "-item-right"); } if (mode === 'left') return "".concat(prefixCls, "-item-left"); if (mode === 'right') return "".concat(prefixCls, "-item-right"); if (ele.props.position === 'right') return "".concat(prefixCls, "-item-right"); return ''; }; // Remove falsy items var truthyItems = timeLineItems.filter(function (item) { return !!item; }); var itemsCount = react__WEBPACK_IMPORTED_MODULE_2__["Children"].count(truthyItems); var lastCls = "".concat(prefixCls, "-item-last"); var items = react__WEBPACK_IMPORTED_MODULE_2__["Children"].map(truthyItems, function (ele, idx) { var pendingClass = idx === itemsCount - 2 ? lastCls : ''; var readyClass = idx === itemsCount - 1 ? lastCls : ''; return Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_7__[/* cloneElement */ "a"])(ele, { className: classnames__WEBPACK_IMPORTED_MODULE_3___default()([ele.props.className, !reverse && !!pending ? pendingClass : readyClass, getPositionCls(ele, idx)]) }); }); var hasLabelItem = timeLineItems.some(function (item) { var _a; return !!((_a = item === null || item === void 0 ? void 0 : item.props) === null || _a === void 0 ? void 0 : _a.label); }); var classString = classnames__WEBPACK_IMPORTED_MODULE_3___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-pending"), !!pending), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-reverse"), !!reverse), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(mode), !!mode && !hasLabelItem), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-label"), hasLabelItem), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("ul", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, restProps, { className: classString }), items); }; Timeline.Item = _TimelineItem__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"]; /* harmony default export */ __webpack_exports__["a"] = (Timeline); /***/ }), /***/ "./components/timeline/TimelineItem.tsx": /*!**********************************************!*\ !*** ./components/timeline/TimelineItem.tsx ***! \**********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var TimelineItem = function TimelineItem(_a) { var _classNames, _classNames2; var customizePrefixCls = _a.prefixCls, className = _a.className, _a$color = _a.color, color = _a$color === void 0 ? 'blue' : _a$color, dot = _a.dot, _a$pending = _a.pending, pending = _a$pending === void 0 ? false : _a$pending, position = _a.position, label = _a.label, children = _a.children, restProps = __rest(_a, ["prefixCls", "className", "color", "dot", "pending", "position", "label", "children"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_4__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls; var prefixCls = getPrefixCls('timeline', customizePrefixCls); var itemClassName = classnames__WEBPACK_IMPORTED_MODULE_3___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-item"), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-item-pending"), pending), _classNames), className); var dotClassName = classnames__WEBPACK_IMPORTED_MODULE_3___default()((_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-item-head"), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-item-head-custom"), !!dot), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-item-head-").concat(color), true), _classNames2)); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("li", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, restProps, { className: itemClassName }), label && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-item-label") }, label), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-item-tail") }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: dotClassName, style: { borderColor: /blue|red|green|gray/.test(color || '') ? undefined : color } }, dot), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: "".concat(prefixCls, "-item-content") }, children)); }; /* harmony default export */ __webpack_exports__["a"] = (TimelineItem); /***/ }), /***/ "./components/timeline/index.tsx": /*!***************************************!*\ !*** ./components/timeline/index.tsx ***! \***************************************/ /*! exports provided: TimelineProps, TimelineItemProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _Timeline__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Timeline */ "./components/timeline/Timeline.tsx"); /* harmony import */ var _TimelineItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TimelineItem */ "./components/timeline/TimelineItem.tsx"); /* harmony default export */ __webpack_exports__["a"] = (_Timeline__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]); /***/ }), /***/ "./components/timeline/style/index.less": /*!**********************************************!*\ !*** ./components/timeline/style/index.less ***! \**********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/timeline/style/index.tsx": /*!*********************************************!*\ !*** ./components/timeline/style/index.tsx ***! \*********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/timeline/style/index.less"); /***/ }), /***/ "./components/tooltip/index.tsx": /*!**************************************!*\ !*** ./components/tooltip/index.tsx ***! \**************************************/ /*! exports provided: AdjustOverflow, PlacementsConfig, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var rc_tooltip__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-tooltip */ "./node_modules/rc-tooltip/es/index.js"); /* harmony import */ var rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/hooks/useMergedState */ "./node_modules/rc-util/es/hooks/useMergedState.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _placements__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./placements */ "./components/tooltip/placements.tsx"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_colors__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../_util/colors */ "./components/_util/colors.ts"); /* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../_util/motion */ "./components/_util/motion.tsx"); var splitObject = function splitObject(obj, keys) { var picked = {}; var omitted = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, obj); keys.forEach(function (key) { if (obj && key in obj) { picked[key] = obj[key]; delete omitted[key]; } }); return { picked: picked, omitted: omitted }; }; var PresetColorRegex = new RegExp("^(".concat(_util_colors__WEBPACK_IMPORTED_MODULE_10__[/* PresetColorTypes */ "a"].join('|'), ")(-inverse)?$")); // Fix Tooltip won't hide at disabled button // mouse events don't trigger at disabled button in Chrome // https://github.com/react-component/tooltip/issues/18 function getDisabledCompatibleChildren(element, prefixCls) { var elementType = element.type; if ((elementType.__ANT_BUTTON === true || elementType.__ANT_SWITCH === true || elementType.__ANT_CHECKBOX === true || element.type === 'button') && element.props.disabled) { // Pick some layout related style properties up to span // Prevent layout bugs like https://github.com/ant-design/ant-design/issues/5254 var _splitObject = splitObject(element.props.style, ['position', 'left', 'right', 'top', 'bottom', 'float', 'display', 'zIndex']), picked = _splitObject.picked, omitted = _splitObject.omitted; var spanStyle = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({ display: 'inline-block' }, picked), { cursor: 'not-allowed', width: element.props.block ? '100%' : null }); var buttonStyle = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, omitted), { pointerEvents: 'none' }); var child = Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_8__[/* cloneElement */ "a"])(element, { style: buttonStyle, className: null }); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", { style: spanStyle, className: classnames__WEBPACK_IMPORTED_MODULE_6___default()(element.props.className, "".concat(prefixCls, "-disabled-compatible-wrapper")) }, child); } return element; } var Tooltip = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function (props, ref) { var _classNames2; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_3__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_9__[/* ConfigContext */ "b"]), getContextPopupContainer = _React$useContext.getPopupContainer, getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var _useMergedState = Object(rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(false, { value: props.visible, defaultValue: props.defaultVisible }), _useMergedState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_useMergedState, 2), visible = _useMergedState2[0], setVisible = _useMergedState2[1]; var isNoTitle = function isNoTitle() { var title = props.title, overlay = props.overlay; return !title && !overlay && title !== 0; // overlay for old version compatibility }; var onVisibleChange = function onVisibleChange(vis) { var _a; setVisible(isNoTitle() ? false : vis); if (!isNoTitle()) { (_a = props.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(props, vis); } }; var getTooltipPlacements = function getTooltipPlacements() { var builtinPlacements = props.builtinPlacements, arrowPointAtCenter = props.arrowPointAtCenter, autoAdjustOverflow = props.autoAdjustOverflow; return builtinPlacements || Object(_placements__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])({ arrowPointAtCenter: arrowPointAtCenter, autoAdjustOverflow: autoAdjustOverflow }); }; // 动态设置动画点 var onPopupAlign = function onPopupAlign(domNode, align) { var placements = getTooltipPlacements(); // 当前返回的位置 var placement = Object.keys(placements).filter(function (key) { return placements[key].points[0] === align.points[0] && placements[key].points[1] === align.points[1]; })[0]; if (!placement) { return; } // 根据当前坐标设置动画点 var rect = domNode.getBoundingClientRect(); var transformOrigin = { top: '50%', left: '50%' }; if (placement.indexOf('top') >= 0 || placement.indexOf('Bottom') >= 0) { transformOrigin.top = "".concat(rect.height - align.offset[1], "px"); } else if (placement.indexOf('Top') >= 0 || placement.indexOf('bottom') >= 0) { transformOrigin.top = "".concat(-align.offset[1], "px"); } if (placement.indexOf('left') >= 0 || placement.indexOf('Right') >= 0) { transformOrigin.left = "".concat(rect.width - align.offset[0], "px"); } else if (placement.indexOf('right') >= 0 || placement.indexOf('Left') >= 0) { transformOrigin.left = "".concat(-align.offset[0], "px"); } domNode.style.transformOrigin = "".concat(transformOrigin.left, " ").concat(transformOrigin.top); }; var getOverlay = function getOverlay() { var title = props.title, overlay = props.overlay; if (title === 0) { return title; } return overlay || title || ''; }; var customizePrefixCls = props.prefixCls, openClassName = props.openClassName, getPopupContainer = props.getPopupContainer, getTooltipContainer = props.getTooltipContainer, overlayClassName = props.overlayClassName, color = props.color, overlayInnerStyle = props.overlayInnerStyle, children = props.children; var prefixCls = getPrefixCls('tooltip', customizePrefixCls); var rootPrefixCls = getPrefixCls(); var tempVisible = visible; // Hide tooltip when there is no title if (!('visible' in props) && isNoTitle()) { tempVisible = false; } var child = getDisabledCompatibleChildren(Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_8__[/* isValidElement */ "b"])(children) ? children : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", null, children), prefixCls); var childProps = child.props; var childCls = classnames__WEBPACK_IMPORTED_MODULE_6___default()(childProps.className, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, openClassName || "".concat(prefixCls, "-open"), true)); var customOverlayClassName = classnames__WEBPACK_IMPORTED_MODULE_6___default()(overlayClassName, (_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-rtl"), direction === 'rtl'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-").concat(color), color && PresetColorRegex.test(color)), _classNames2)); var formattedOverlayInnerStyle = overlayInnerStyle; var arrowContentStyle; if (color && !PresetColorRegex.test(color)) { formattedOverlayInnerStyle = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, overlayInnerStyle), { background: color }); arrowContentStyle = { background: color }; } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](rc_tooltip__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, props, { prefixCls: prefixCls, overlayClassName: customOverlayClassName, getTooltipContainer: getPopupContainer || getTooltipContainer || getContextPopupContainer, ref: ref, builtinPlacements: getTooltipPlacements(), overlay: getOverlay(), visible: tempVisible, onVisibleChange: onVisibleChange, onPopupAlign: onPopupAlign, overlayInnerStyle: formattedOverlayInnerStyle, arrowContent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", { className: "".concat(prefixCls, "-arrow-content"), style: arrowContentStyle }), motion: { motionName: Object(_util_motion__WEBPACK_IMPORTED_MODULE_11__[/* getTransitionName */ "b"])(rootPrefixCls, 'zoom-big-fast', props.transitionName), motionDeadline: 1000 } }), tempVisible ? Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_8__[/* cloneElement */ "a"])(child, { className: childCls }) : child); }); Tooltip.displayName = 'Tooltip'; Tooltip.defaultProps = { placement: 'top', mouseEnterDelay: 0.1, mouseLeaveDelay: 0.1, arrowPointAtCenter: false, autoAdjustOverflow: true }; /* harmony default export */ __webpack_exports__["a"] = (Tooltip); /***/ }), /***/ "./components/tooltip/placements.tsx": /*!*******************************************!*\ !*** ./components/tooltip/placements.tsx ***! \*******************************************/ /*! exports provided: getOverflowOptions, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export getOverflowOptions */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getPlacements; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var rc_tooltip_es_placements__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-tooltip/es/placements */ "./node_modules/rc-tooltip/es/placements.js"); var autoAdjustOverflowEnabled = { adjustX: 1, adjustY: 1 }; var autoAdjustOverflowDisabled = { adjustX: 0, adjustY: 0 }; var targetOffset = [0, 0]; function getOverflowOptions(autoAdjustOverflow) { if (typeof autoAdjustOverflow === 'boolean') { return autoAdjustOverflow ? autoAdjustOverflowEnabled : autoAdjustOverflowDisabled; } return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, autoAdjustOverflowDisabled), autoAdjustOverflow); } function getPlacements(config) { var _config$arrowWidth = config.arrowWidth, arrowWidth = _config$arrowWidth === void 0 ? 5 : _config$arrowWidth, _config$horizontalArr = config.horizontalArrowShift, horizontalArrowShift = _config$horizontalArr === void 0 ? 16 : _config$horizontalArr, _config$verticalArrow = config.verticalArrowShift, verticalArrowShift = _config$verticalArrow === void 0 ? 8 : _config$verticalArrow, autoAdjustOverflow = config.autoAdjustOverflow; var placementMap = { left: { points: ['cr', 'cl'], offset: [-4, 0] }, right: { points: ['cl', 'cr'], offset: [4, 0] }, top: { points: ['bc', 'tc'], offset: [0, -4] }, bottom: { points: ['tc', 'bc'], offset: [0, 4] }, topLeft: { points: ['bl', 'tc'], offset: [-(horizontalArrowShift + arrowWidth), -4] }, leftTop: { points: ['tr', 'cl'], offset: [-4, -(verticalArrowShift + arrowWidth)] }, topRight: { points: ['br', 'tc'], offset: [horizontalArrowShift + arrowWidth, -4] }, rightTop: { points: ['tl', 'cr'], offset: [4, -(verticalArrowShift + arrowWidth)] }, bottomRight: { points: ['tr', 'bc'], offset: [horizontalArrowShift + arrowWidth, 4] }, rightBottom: { points: ['bl', 'cr'], offset: [4, verticalArrowShift + arrowWidth] }, bottomLeft: { points: ['tl', 'bc'], offset: [-(horizontalArrowShift + arrowWidth), 4] }, leftBottom: { points: ['br', 'cl'], offset: [-4, verticalArrowShift + arrowWidth] } }; Object.keys(placementMap).forEach(function (key) { placementMap[key] = config.arrowPointAtCenter ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, placementMap[key]), { overflow: getOverflowOptions(autoAdjustOverflow), targetOffset: targetOffset }) : Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, rc_tooltip_es_placements__WEBPACK_IMPORTED_MODULE_1__[/* placements */ "a"][key]), { overflow: getOverflowOptions(autoAdjustOverflow) }); placementMap[key].ignoreShake = true; }); return placementMap; } /***/ }), /***/ "./components/tooltip/style/index.less": /*!*********************************************!*\ !*** ./components/tooltip/style/index.less ***! \*********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/tooltip/style/index.tsx": /*!********************************************!*\ !*** ./components/tooltip/style/index.tsx ***! \********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/tooltip/style/index.less"); /***/ }), /***/ "./components/transfer/ListBody.tsx": /*!******************************************!*\ !*** ./components/transfer/ListBody.tsx ***! \******************************************/ /*! exports provided: OmitProps, default */ /*! exports used: OmitProps, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return OmitProps; }); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _util_type__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../_util/type */ "./components/_util/type.ts"); /* harmony import */ var _pagination__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../pagination */ "./components/pagination/index.tsx"); /* harmony import */ var _ListItem__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./ListItem */ "./components/transfer/ListItem.tsx"); var OmitProps = Object(_util_type__WEBPACK_IMPORTED_MODULE_9__[/* tuple */ "a"])('handleFilter', 'handleClear', 'checkedKeys'); function parsePagination(pagination) { if (!pagination) { return null; } var defaultPagination = { pageSize: 10 }; if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(pagination) === 'object') { return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, defaultPagination), pagination); } return defaultPagination; } var ListBody = /*#__PURE__*/function (_React$Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(ListBody, _React$Component); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(ListBody); function ListBody() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, ListBody); _this = _super.apply(this, arguments); _this.state = { current: 1 }; _this.onItemSelect = function (item) { var _this$props = _this.props, onItemSelect = _this$props.onItemSelect, selectedKeys = _this$props.selectedKeys; var checked = selectedKeys.indexOf(item.key) >= 0; onItemSelect(item.key, !checked); }; _this.onItemRemove = function (item) { var onItemRemove = _this.props.onItemRemove; onItemRemove === null || onItemRemove === void 0 ? void 0 : onItemRemove([item.key]); }; _this.onPageChange = function (current) { _this.setState({ current: current }); }; _this.getItems = function () { var current = _this.state.current; var _this$props2 = _this.props, pagination = _this$props2.pagination, filteredRenderItems = _this$props2.filteredRenderItems; var mergedPagination = parsePagination(pagination); var displayItems = filteredRenderItems; if (mergedPagination) { displayItems = filteredRenderItems.slice((current - 1) * mergedPagination.pageSize, current * mergedPagination.pageSize); } return displayItems; }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(ListBody, [{ key: "render", value: function render() { var _this2 = this; var current = this.state.current; var _this$props3 = this.props, prefixCls = _this$props3.prefixCls, onScroll = _this$props3.onScroll, filteredRenderItems = _this$props3.filteredRenderItems, selectedKeys = _this$props3.selectedKeys, globalDisabled = _this$props3.disabled, showRemove = _this$props3.showRemove, pagination = _this$props3.pagination; var mergedPagination = parsePagination(pagination); var paginationNode = null; if (mergedPagination) { paginationNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_pagination__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], { simple: true, size: "small", disabled: globalDisabled, className: "".concat(prefixCls, "-pagination"), total: filteredRenderItems.length, pageSize: mergedPagination.pageSize, current: current, onChange: this.onPageChange }); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](react__WEBPACK_IMPORTED_MODULE_7__["Fragment"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"]("ul", { className: classnames__WEBPACK_IMPORTED_MODULE_8___default()("".concat(prefixCls, "-content"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(prefixCls, "-content-show-remove"), showRemove)), onScroll: onScroll }, this.getItems().map(function (_ref) { var renderedEl = _ref.renderedEl, renderedText = _ref.renderedText, item = _ref.item; var disabled = item.disabled; var checked = selectedKeys.indexOf(item.key) >= 0; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_ListItem__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"], { disabled: globalDisabled || disabled, key: item.key, item: item, renderedText: renderedText, renderedEl: renderedEl, checked: checked, prefixCls: prefixCls, onClick: _this2.onItemSelect, onRemove: _this2.onItemRemove, showRemove: showRemove }); })), paginationNode); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(_ref2, _ref3) { var filteredRenderItems = _ref2.filteredRenderItems, pagination = _ref2.pagination; var current = _ref3.current; var mergedPagination = parsePagination(pagination); if (mergedPagination) { // Calculate the page number var maxPageCount = Math.ceil(filteredRenderItems.length / mergedPagination.pageSize); if (current > maxPageCount) { return { current: maxPageCount }; } } return null; } }]); return ListBody; }(react__WEBPACK_IMPORTED_MODULE_7__["Component"]); /* harmony default export */ __webpack_exports__["b"] = (ListBody); /***/ }), /***/ "./components/transfer/ListItem.tsx": /*!******************************************!*\ !*** ./components/transfer/ListItem.tsx ***! \******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _ant_design_icons_es_icons_DeleteOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons/es/icons/DeleteOutlined */ "./node_modules/@ant-design/icons/es/icons/DeleteOutlined.js"); /* harmony import */ var _locale_default__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../locale/default */ "./components/locale/default.tsx"); /* harmony import */ var _checkbox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../checkbox */ "./components/checkbox/index.tsx"); /* harmony import */ var _util_transButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../_util/transButton */ "./components/_util/transButton.tsx"); /* harmony import */ var _locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../locale-provider/LocaleReceiver */ "./components/locale-provider/LocaleReceiver.tsx"); var ListItem = function ListItem(props) { var _classNames; var renderedText = props.renderedText, renderedEl = props.renderedEl, item = props.item, checked = props.checked, disabled = props.disabled, prefixCls = props.prefixCls, onClick = props.onClick, onRemove = props.onRemove, showRemove = props.showRemove; var className = classnames__WEBPACK_IMPORTED_MODULE_2___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-content-item"), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-content-item-disabled"), disabled || item.disabled), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-content-item-checked"), checked), _classNames)); var title; if (typeof renderedText === 'string' || typeof renderedText === 'number') { title = String(renderedText); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], { componentName: "Transfer", defaultLocale: _locale_default__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].Transfer }, function (transferLocale) { var liProps = { className: className, title: title }; var labelNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("span", { className: "".concat(prefixCls, "-content-item-text") }, renderedEl); // Show remove if (showRemove) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("li", liProps, labelNode, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_util_transButton__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], { disabled: disabled || item.disabled, className: "".concat(prefixCls, "-content-item-remove"), "aria-label": transferLocale.remove, onClick: function onClick() { onRemove === null || onRemove === void 0 ? void 0 : onRemove(item); } }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_ant_design_icons_es_icons_DeleteOutlined__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], null))); } // Default click to select liProps.onClick = disabled || item.disabled ? undefined : function () { return onClick(item); }; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("li", liProps, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_checkbox__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], { className: "".concat(prefixCls, "-checkbox"), checked: checked, disabled: disabled || item.disabled }), labelNode); }); }; /* harmony default export */ __webpack_exports__["a"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["memo"](ListItem)); /***/ }), /***/ "./components/transfer/index.tsx": /*!***************************************!*\ !*** ./components/transfer/index.tsx ***! \***************************************/ /*! exports provided: TransferListProps, TransferOperationProps, TransferSearchProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _list__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./list */ "./components/transfer/list.tsx"); /* harmony import */ var _operation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./operation */ "./components/transfer/operation.tsx"); /* harmony import */ var _search__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./search */ "./components/transfer/search.tsx"); /* harmony import */ var _locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../locale-provider/LocaleReceiver */ "./components/locale-provider/LocaleReceiver.tsx"); /* harmony import */ var _locale_default__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../locale/default */ "./components/locale/default.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); var Transfer = /*#__PURE__*/function (_React$Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(Transfer, _React$Component); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(Transfer); function Transfer(props) { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(this, Transfer); _this = _super.call(this, props); _this.separatedDataSource = null; _this.setStateKeys = function (direction, keys) { if (direction === 'left') { _this.setState(function (_ref) { var sourceSelectedKeys = _ref.sourceSelectedKeys; return { sourceSelectedKeys: typeof keys === 'function' ? keys(sourceSelectedKeys || []) : keys }; }); } else { _this.setState(function (_ref2) { var targetSelectedKeys = _ref2.targetSelectedKeys; return { targetSelectedKeys: typeof keys === 'function' ? keys(targetSelectedKeys || []) : keys }; }); } }; _this.getLocale = function (transferLocale, renderEmpty) { return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, transferLocale), { notFoundContent: renderEmpty('Transfer') }), _this.props.locale); }; _this.moveTo = function (direction) { var _this$props = _this.props, _this$props$targetKey = _this$props.targetKeys, targetKeys = _this$props$targetKey === void 0 ? [] : _this$props$targetKey, _this$props$dataSourc = _this$props.dataSource, dataSource = _this$props$dataSourc === void 0 ? [] : _this$props$dataSourc, onChange = _this$props.onChange; var _this$state = _this.state, sourceSelectedKeys = _this$state.sourceSelectedKeys, targetSelectedKeys = _this$state.targetSelectedKeys; var moveKeys = direction === 'right' ? sourceSelectedKeys : targetSelectedKeys; // filter the disabled options var newMoveKeys = moveKeys.filter(function (key) { return !dataSource.some(function (data) { return !!(key === data.key && data.disabled); }); }); // move items to target box var newTargetKeys = direction === 'right' ? newMoveKeys.concat(targetKeys) : targetKeys.filter(function (targetKey) { return newMoveKeys.indexOf(targetKey) === -1; }); // empty checked keys var oppositeDirection = direction === 'right' ? 'left' : 'right'; _this.setStateKeys(oppositeDirection, []); _this.handleSelectChange(oppositeDirection, []); onChange === null || onChange === void 0 ? void 0 : onChange(newTargetKeys, direction, newMoveKeys); }; _this.moveToLeft = function () { return _this.moveTo('left'); }; _this.moveToRight = function () { return _this.moveTo('right'); }; _this.onItemSelectAll = function (direction, selectedKeys, checkAll) { _this.setStateKeys(direction, function (prevKeys) { var mergedCheckedKeys = []; if (checkAll) { // Merge current keys with origin key mergedCheckedKeys = Array.from(new Set([].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(prevKeys), Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(selectedKeys)))); } else { // Remove current keys from origin keys mergedCheckedKeys = prevKeys.filter(function (key) { return selectedKeys.indexOf(key) === -1; }); } _this.handleSelectChange(direction, mergedCheckedKeys); return mergedCheckedKeys; }); }; _this.onLeftItemSelectAll = function (selectedKeys, checkAll) { return _this.onItemSelectAll('left', selectedKeys, checkAll); }; _this.onRightItemSelectAll = function (selectedKeys, checkAll) { return _this.onItemSelectAll('right', selectedKeys, checkAll); }; _this.handleFilter = function (direction, e) { var onSearch = _this.props.onSearch; var value = e.target.value; onSearch === null || onSearch === void 0 ? void 0 : onSearch(direction, value); }; _this.handleLeftFilter = function (e) { return _this.handleFilter('left', e); }; _this.handleRightFilter = function (e) { return _this.handleFilter('right', e); }; _this.handleClear = function (direction) { var onSearch = _this.props.onSearch; onSearch === null || onSearch === void 0 ? void 0 : onSearch(direction, ''); }; _this.handleLeftClear = function () { return _this.handleClear('left'); }; _this.handleRightClear = function () { return _this.handleClear('right'); }; _this.onItemSelect = function (direction, selectedKey, checked) { var _this$state2 = _this.state, sourceSelectedKeys = _this$state2.sourceSelectedKeys, targetSelectedKeys = _this$state2.targetSelectedKeys; var holder = direction === 'left' ? Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(sourceSelectedKeys) : Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(targetSelectedKeys); var index = holder.indexOf(selectedKey); if (index > -1) { holder.splice(index, 1); } if (checked) { holder.push(selectedKey); } _this.handleSelectChange(direction, holder); if (!_this.props.selectedKeys) { _this.setStateKeys(direction, holder); } }; _this.onLeftItemSelect = function (selectedKey, checked) { return _this.onItemSelect('left', selectedKey, checked); }; _this.onRightItemSelect = function (selectedKey, checked) { return _this.onItemSelect('right', selectedKey, checked); }; _this.onRightItemRemove = function (selectedKeys) { var _this$props2 = _this.props, _this$props2$targetKe = _this$props2.targetKeys, targetKeys = _this$props2$targetKe === void 0 ? [] : _this$props2$targetKe, onChange = _this$props2.onChange; _this.setStateKeys('right', []); onChange === null || onChange === void 0 ? void 0 : onChange(targetKeys.filter(function (key) { return !selectedKeys.includes(key); }), 'left', Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(selectedKeys)); }; _this.handleScroll = function (direction, e) { var onScroll = _this.props.onScroll; onScroll === null || onScroll === void 0 ? void 0 : onScroll(direction, e); }; _this.handleLeftScroll = function (e) { return _this.handleScroll('left', e); }; _this.handleRightScroll = function (e) { return _this.handleScroll('right', e); }; _this.handleListStyle = function (listStyle, direction) { if (typeof listStyle === 'function') { return listStyle({ direction: direction }); } return listStyle; }; _this.renderTransfer = function (transferLocale) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_14__[/* ConfigConsumer */ "a"], null, function (_ref3) { var _classNames; var getPrefixCls = _ref3.getPrefixCls, renderEmpty = _ref3.renderEmpty, direction = _ref3.direction; var _this$props3 = _this.props, customizePrefixCls = _this$props3.prefixCls, className = _this$props3.className, disabled = _this$props3.disabled, _this$props3$operatio = _this$props3.operations, operations = _this$props3$operatio === void 0 ? [] : _this$props3$operatio, showSearch = _this$props3.showSearch, footer = _this$props3.footer, style = _this$props3.style, listStyle = _this$props3.listStyle, operationStyle = _this$props3.operationStyle, filterOption = _this$props3.filterOption, render = _this$props3.render, children = _this$props3.children, showSelectAll = _this$props3.showSelectAll, oneWay = _this$props3.oneWay, pagination = _this$props3.pagination; var prefixCls = getPrefixCls('transfer', customizePrefixCls); var locale = _this.getLocale(transferLocale, renderEmpty); var _this$state3 = _this.state, sourceSelectedKeys = _this$state3.sourceSelectedKeys, targetSelectedKeys = _this$state3.targetSelectedKeys; var mergedPagination = !children && pagination; var _this$separateDataSou = _this.separateDataSource(), leftDataSource = _this$separateDataSou.leftDataSource, rightDataSource = _this$separateDataSou.rightDataSource; var leftActive = targetSelectedKeys.length > 0; var rightActive = sourceSelectedKeys.length > 0; var cls = classnames__WEBPACK_IMPORTED_MODULE_8___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-disabled"), disabled), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-customize-list"), !!children), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className); var titles = _this.getTitles(locale); var selectAllLabels = _this.props.selectAllLabels || []; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"]("div", { className: cls, style: style }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_list__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({ prefixCls: "".concat(prefixCls, "-list"), titleText: titles[0], dataSource: leftDataSource, filterOption: filterOption, style: _this.handleListStyle(listStyle, 'left'), checkedKeys: sourceSelectedKeys, handleFilter: _this.handleLeftFilter, handleClear: _this.handleLeftClear, onItemSelect: _this.onLeftItemSelect, onItemSelectAll: _this.onLeftItemSelectAll, render: render, showSearch: showSearch, renderList: children, footer: footer, onScroll: _this.handleLeftScroll, disabled: disabled, direction: "left", showSelectAll: showSelectAll, selectAllLabel: selectAllLabels[0], pagination: mergedPagination }, locale)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_operation__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], { className: "".concat(prefixCls, "-operation"), rightActive: rightActive, rightArrowText: operations[0], moveToRight: _this.moveToRight, leftActive: leftActive, leftArrowText: operations[1], moveToLeft: _this.moveToLeft, style: operationStyle, disabled: disabled, direction: direction, oneWay: oneWay }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_list__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({ prefixCls: "".concat(prefixCls, "-list"), titleText: titles[1], dataSource: rightDataSource, filterOption: filterOption, style: _this.handleListStyle(listStyle, 'right'), checkedKeys: targetSelectedKeys, handleFilter: _this.handleRightFilter, handleClear: _this.handleRightClear, onItemSelect: _this.onRightItemSelect, onItemSelectAll: _this.onRightItemSelectAll, onItemRemove: _this.onRightItemRemove, render: render, showSearch: showSearch, renderList: children, footer: footer, onScroll: _this.handleRightScroll, disabled: disabled, direction: "right", showSelectAll: showSelectAll, selectAllLabel: selectAllLabels[1], showRemove: oneWay, pagination: mergedPagination }, locale))); }); }; var _props$selectedKeys = props.selectedKeys, selectedKeys = _props$selectedKeys === void 0 ? [] : _props$selectedKeys, _props$targetKeys = props.targetKeys, targetKeys = _props$targetKeys === void 0 ? [] : _props$targetKeys; _this.state = { sourceSelectedKeys: selectedKeys.filter(function (key) { return targetKeys.indexOf(key) === -1; }), targetSelectedKeys: selectedKeys.filter(function (key) { return targetKeys.indexOf(key) > -1; }) }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Transfer, [{ key: "getTitles", value: function getTitles(transferLocale) { var titles = this.props.titles; if (titles) { return titles; } return transferLocale.titles; } }, { key: "handleSelectChange", value: function handleSelectChange(direction, holder) { var _this$state4 = this.state, sourceSelectedKeys = _this$state4.sourceSelectedKeys, targetSelectedKeys = _this$state4.targetSelectedKeys; var onSelectChange = this.props.onSelectChange; if (!onSelectChange) { return; } if (direction === 'left') { onSelectChange(holder, targetSelectedKeys); } else { onSelectChange(sourceSelectedKeys, holder); } } }, { key: "separateDataSource", value: function separateDataSource() { var _this$props4 = this.props, dataSource = _this$props4.dataSource, rowKey = _this$props4.rowKey, _this$props4$targetKe = _this$props4.targetKeys, targetKeys = _this$props4$targetKe === void 0 ? [] : _this$props4$targetKe; var leftDataSource = []; var rightDataSource = new Array(targetKeys.length); dataSource.forEach(function (record) { if (rowKey) { record = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, record), { key: rowKey(record) }); } // rightDataSource should be ordered by targetKeys // leftDataSource should be ordered by dataSource var indexOfKey = targetKeys.indexOf(record.key); if (indexOfKey !== -1) { rightDataSource[indexOfKey] = record; } else { leftDataSource.push(record); } }); return { leftDataSource: leftDataSource, rightDataSource: rightDataSource }; } }, { key: "render", value: function render() { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"], { componentName: "Transfer", defaultLocale: _locale_default__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].Transfer }, this.renderTransfer); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(_ref4) { var selectedKeys = _ref4.selectedKeys, targetKeys = _ref4.targetKeys, pagination = _ref4.pagination, children = _ref4.children; if (selectedKeys) { var mergedTargetKeys = targetKeys || []; return { sourceSelectedKeys: selectedKeys.filter(function (key) { return !mergedTargetKeys.includes(key); }), targetSelectedKeys: selectedKeys.filter(function (key) { return mergedTargetKeys.includes(key); }) }; } if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(!pagination || !children, 'Transfer', '`pagination` not support customize render list.'); return null; } }]); return Transfer; }(react__WEBPACK_IMPORTED_MODULE_7__["Component"]); // For high-level customized Transfer @dqaria Transfer.List = _list__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"]; Transfer.Operation = _operation__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"]; Transfer.Search = _search__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"]; Transfer.defaultProps = { dataSource: [], locale: {}, showSearch: false, listStyle: function listStyle() {} }; /* harmony default export */ __webpack_exports__["a"] = (Transfer); /***/ }), /***/ "./components/transfer/list.tsx": /*!**************************************!*\ !*** ./components/transfer/list.tsx ***! \**************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TransferList; }); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _ant_design_icons_es_icons_DownOutlined__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ant-design/icons/es/icons/DownOutlined */ "./node_modules/@ant-design/icons/es/icons/DownOutlined.js"); /* harmony import */ var _checkbox__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../checkbox */ "./components/checkbox/index.tsx"); /* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../menu */ "./components/menu/index.tsx"); /* harmony import */ var _dropdown__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../dropdown */ "./components/dropdown/index.tsx"); /* harmony import */ var _search__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./search */ "./components/transfer/search.tsx"); /* harmony import */ var _ListBody__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./ListBody */ "./components/transfer/ListBody.tsx"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts"); var defaultRender = function defaultRender() { return null; }; function isRenderResultPlainObject(result) { return result && !Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_15__[/* isValidElement */ "b"])(result) && Object.prototype.toString.call(result) === '[object Object]'; } function getEnabledItemKeys(items) { return items.filter(function (data) { return !data.disabled; }).map(function (data) { return data.key; }); } var TransferList = /*#__PURE__*/function (_React$PureComponent) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(TransferList, _React$PureComponent); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(TransferList); function TransferList(props) { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, TransferList); _this = _super.call(this, props); _this.defaultListBodyRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createRef"](); // =============================== Filter =============================== _this.handleFilter = function (e) { var handleFilter = _this.props.handleFilter; var filterValue = e.target.value; _this.setState({ filterValue: filterValue }); handleFilter(e); }; _this.handleClear = function () { var handleClear = _this.props.handleClear; _this.setState({ filterValue: '' }); handleClear(); }; _this.matchFilter = function (text, item) { var filterValue = _this.state.filterValue; var filterOption = _this.props.filterOption; if (filterOption) { return filterOption(filterValue, item); } return text.indexOf(filterValue) >= 0; }; _this.getCurrentPageItems = function () {}; // =============================== Render =============================== _this.renderListBody = function (renderList, props) { var bodyContent = renderList ? renderList(props) : null; var customize = !!bodyContent; if (!customize) { bodyContent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_ListBody__WEBPACK_IMPORTED_MODULE_14__[/* default */ "b"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ ref: _this.defaultListBodyRef }, props)); } return { customize: customize, bodyContent: bodyContent }; }; _this.renderItem = function (item) { var _this$props$render = _this.props.render, render = _this$props$render === void 0 ? defaultRender : _this$props$render; var renderResult = render(item); var isRenderResultPlain = isRenderResultPlainObject(renderResult); return { renderedText: isRenderResultPlain ? renderResult.value : renderResult, renderedEl: isRenderResultPlain ? renderResult.label : renderResult, item: item }; }; _this.getSelectAllLabel = function (selectedCount, totalCount) { var _this$props = _this.props, itemsUnit = _this$props.itemsUnit, itemUnit = _this$props.itemUnit, selectAllLabel = _this$props.selectAllLabel; if (selectAllLabel) { return typeof selectAllLabel === 'function' ? selectAllLabel({ selectedCount: selectedCount, totalCount: totalCount }) : selectAllLabel; } var unit = totalCount > 1 ? itemsUnit : itemUnit; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](react__WEBPACK_IMPORTED_MODULE_6__["Fragment"], null, (selectedCount > 0 ? "".concat(selectedCount, "/") : '') + totalCount, " ", unit); }; _this.state = { filterValue: '' }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(TransferList, [{ key: "componentWillUnmount", value: function componentWillUnmount() { clearTimeout(this.triggerScrollTimer); } }, { key: "getCheckStatus", value: function getCheckStatus(filteredItems) { var checkedKeys = this.props.checkedKeys; if (checkedKeys.length === 0) { return 'none'; } if (filteredItems.every(function (item) { return checkedKeys.indexOf(item.key) >= 0 || !!item.disabled; })) { return 'all'; } return 'part'; } // ================================ Item ================================ }, { key: "getFilteredItems", value: function getFilteredItems(dataSource, filterValue) { var _this2 = this; var filteredItems = []; var filteredRenderItems = []; dataSource.forEach(function (item) { var renderedItem = _this2.renderItem(item); var renderedText = renderedItem.renderedText; // Filter skip if (filterValue && !_this2.matchFilter(renderedText, item)) { return null; } filteredItems.push(item); filteredRenderItems.push(renderedItem); }); return { filteredItems: filteredItems, filteredRenderItems: filteredRenderItems }; } }, { key: "getListBody", value: function getListBody(prefixCls, searchPlaceholder, filterValue, filteredItems, notFoundContent, filteredRenderItems, checkedKeys, renderList, showSearch, disabled) { var search = showSearch ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", { className: "".concat(prefixCls, "-body-search-wrapper") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_search__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"], { prefixCls: "".concat(prefixCls, "-search"), onChange: this.handleFilter, handleClear: this.handleClear, placeholder: searchPlaceholder, value: filterValue, disabled: disabled })) : null; var _this$renderListBody = this.renderListBody(renderList, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(this.props, _ListBody__WEBPACK_IMPORTED_MODULE_14__[/* OmitProps */ "a"])), { filteredItems: filteredItems, filteredRenderItems: filteredRenderItems, selectedKeys: checkedKeys })), bodyContent = _this$renderListBody.bodyContent, customize = _this$renderListBody.customize; var bodyNode; // We should wrap customize list body in a classNamed div to use flex layout. if (customize) { bodyNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", { className: "".concat(prefixCls, "-body-customize-wrapper") }, bodyContent); } else { bodyNode = filteredItems.length ? bodyContent : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", { className: "".concat(prefixCls, "-body-not-found") }, notFoundContent); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", { className: classnames__WEBPACK_IMPORTED_MODULE_8___default()(showSearch ? "".concat(prefixCls, "-body ").concat(prefixCls, "-body-with-search") : "".concat(prefixCls, "-body")) }, search, bodyNode); } }, { key: "getCheckBox", value: function getCheckBox(filteredItems, onItemSelectAll, showSelectAll, disabled, prefixCls) { var checkStatus = this.getCheckStatus(filteredItems); var checkedAll = checkStatus === 'all'; var checkAllCheckbox = showSelectAll !== false && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_checkbox__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], { disabled: disabled, checked: checkedAll, indeterminate: checkStatus === 'part', className: "".concat(prefixCls, "-checkbox"), onChange: function onChange() { // Only select enabled items onItemSelectAll(filteredItems.filter(function (item) { return !item.disabled; }).map(function (_ref) { var key = _ref.key; return key; }), !checkedAll); } }); return checkAllCheckbox; } }, { key: "render", value: function render() { var _classNames, _this3 = this; var filterValue = this.state.filterValue; var _this$props2 = this.props, prefixCls = _this$props2.prefixCls, dataSource = _this$props2.dataSource, titleText = _this$props2.titleText, checkedKeys = _this$props2.checkedKeys, disabled = _this$props2.disabled, footer = _this$props2.footer, showSearch = _this$props2.showSearch, style = _this$props2.style, searchPlaceholder = _this$props2.searchPlaceholder, notFoundContent = _this$props2.notFoundContent, selectAll = _this$props2.selectAll, selectCurrent = _this$props2.selectCurrent, selectInvert = _this$props2.selectInvert, removeAll = _this$props2.removeAll, removeCurrent = _this$props2.removeCurrent, renderList = _this$props2.renderList, onItemSelectAll = _this$props2.onItemSelectAll, onItemRemove = _this$props2.onItemRemove, showSelectAll = _this$props2.showSelectAll, showRemove = _this$props2.showRemove, pagination = _this$props2.pagination; // Custom Layout var footerDom = footer && footer(this.props); var listCls = classnames__WEBPACK_IMPORTED_MODULE_8___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-with-pagination"), !!pagination), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-with-footer"), !!footerDom), _classNames)); // ====================== Get filtered, checked item list ====================== var _this$getFilteredItem = this.getFilteredItems(dataSource, filterValue), filteredItems = _this$getFilteredItem.filteredItems, filteredRenderItems = _this$getFilteredItem.filteredRenderItems; // ================================= List Body ================================= var listBody = this.getListBody(prefixCls, searchPlaceholder, filterValue, filteredItems, notFoundContent, filteredRenderItems, checkedKeys, renderList, showSearch, disabled); // ================================ List Footer ================================ var listFooter = footerDom ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", { className: "".concat(prefixCls, "-footer") }, footerDom) : null; var checkAllCheckbox = !showRemove && !pagination && this.getCheckBox(filteredItems, onItemSelectAll, showSelectAll, disabled, prefixCls); var menu = null; if (showRemove) { menu = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_menu__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"], null, pagination && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_menu__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].Item, { onClick: function onClick() { var _a; var pageKeys = getEnabledItemKeys((((_a = _this3.defaultListBodyRef.current) === null || _a === void 0 ? void 0 : _a.getItems()) || []).map(function (entity) { return entity.item; })); onItemRemove === null || onItemRemove === void 0 ? void 0 : onItemRemove(pageKeys); } }, removeCurrent), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_menu__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].Item, { onClick: function onClick() { onItemRemove === null || onItemRemove === void 0 ? void 0 : onItemRemove(getEnabledItemKeys(filteredItems)); } }, removeAll)); } else { menu = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_menu__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_menu__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].Item, { onClick: function onClick() { var keys = getEnabledItemKeys(filteredItems); onItemSelectAll(keys, keys.length !== checkedKeys.length); } }, selectAll), pagination && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_menu__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].Item, { onClick: function onClick() { var _a; var pageItems = ((_a = _this3.defaultListBodyRef.current) === null || _a === void 0 ? void 0 : _a.getItems()) || []; onItemSelectAll(getEnabledItemKeys(pageItems.map(function (entity) { return entity.item; })), true); } }, selectCurrent), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_menu__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].Item, { onClick: function onClick() { var _a; var availableKeys; if (pagination) { availableKeys = getEnabledItemKeys((((_a = _this3.defaultListBodyRef.current) === null || _a === void 0 ? void 0 : _a.getItems()) || []).map(function (entity) { return entity.item; })); } else { availableKeys = getEnabledItemKeys(filteredItems); } var checkedKeySet = new Set(checkedKeys); var newCheckedKeys = []; var newUnCheckedKeys = []; availableKeys.forEach(function (key) { if (checkedKeySet.has(key)) { newUnCheckedKeys.push(key); } else { newCheckedKeys.push(key); } }); onItemSelectAll(newCheckedKeys, true); onItemSelectAll(newUnCheckedKeys, false); } }, selectInvert)); } var dropdown = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_dropdown__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"], { className: "".concat(prefixCls, "-header-dropdown"), overlay: menu, disabled: disabled }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_ant_design_icons_es_icons_DownOutlined__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], null)); // ================================== Render =================================== return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", { className: listCls, style: style }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", { className: "".concat(prefixCls, "-header") }, checkAllCheckbox, dropdown, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("span", { className: "".concat(prefixCls, "-header-selected") }, this.getSelectAllLabel(checkedKeys.length, filteredItems.length)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("span", { className: "".concat(prefixCls, "-header-title") }, titleText)), listBody, listFooter); } }]); return TransferList; }(react__WEBPACK_IMPORTED_MODULE_6__["PureComponent"]); TransferList.defaultProps = { dataSource: [], titleText: '', showSearch: false }; /***/ }), /***/ "./components/transfer/operation.tsx": /*!*******************************************!*\ !*** ./components/transfer/operation.tsx ***! \*******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _ant_design_icons_es_icons_LeftOutlined__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/icons/es/icons/LeftOutlined */ "./node_modules/@ant-design/icons/es/icons/LeftOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ant-design/icons/es/icons/RightOutlined */ "./node_modules/@ant-design/icons/es/icons/RightOutlined.js"); /* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../button */ "./components/button/index.tsx"); var Operation = function Operation(_ref) { var disabled = _ref.disabled, moveToLeft = _ref.moveToLeft, moveToRight = _ref.moveToRight, _ref$leftArrowText = _ref.leftArrowText, leftArrowText = _ref$leftArrowText === void 0 ? '' : _ref$leftArrowText, _ref$rightArrowText = _ref.rightArrowText, rightArrowText = _ref$rightArrowText === void 0 ? '' : _ref$rightArrowText, leftActive = _ref.leftActive, rightActive = _ref.rightActive, className = _ref.className, style = _ref.style, direction = _ref.direction, oneWay = _ref.oneWay; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: className, style: style }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_button__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], { type: "primary", size: "small", disabled: disabled || !rightActive, onClick: moveToRight, icon: direction !== 'rtl' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_ant_design_icons_es_icons_LeftOutlined__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"], null) }, rightArrowText), !oneWay && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_button__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], { type: "primary", size: "small", disabled: disabled || !leftActive, onClick: moveToLeft, icon: direction !== 'rtl' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_ant_design_icons_es_icons_LeftOutlined__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"], null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], null) }, leftArrowText)); }; /* harmony default export */ __webpack_exports__["a"] = (Operation); /***/ }), /***/ "./components/transfer/search.tsx": /*!****************************************!*\ !*** ./components/transfer/search.tsx ***! \****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Search; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseCircleFilled */ "./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js"); /* harmony import */ var _ant_design_icons_es_icons_SearchOutlined__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ant-design/icons/es/icons/SearchOutlined */ "./node_modules/@ant-design/icons/es/icons/SearchOutlined.js"); /* harmony import */ var _input__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../input */ "./components/input/index.tsx"); function Search(props) { var _props$placeholder = props.placeholder, placeholder = _props$placeholder === void 0 ? '' : _props$placeholder, value = props.value, prefixCls = props.prefixCls, disabled = props.disabled, onChange = props.onChange, handleClear = props.handleClear; var handleChange = react__WEBPACK_IMPORTED_MODULE_0__["useCallback"](function (e) { onChange === null || onChange === void 0 ? void 0 : onChange(e); }, [onChange]); var handleClearFn = function handleClearFn(e) { e.preventDefault(); if (!disabled && handleClear) { handleClear(e); } }; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_input__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], { placeholder: placeholder, className: prefixCls, value: value, onChange: handleChange, disabled: disabled }), value && value.length > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("a", { className: "".concat(prefixCls, "-action"), onClick: handleClearFn }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"], null)) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: "".concat(prefixCls, "-action") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_ant_design_icons_es_icons_SearchOutlined__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], null))); } /***/ }), /***/ "./components/transfer/style/index.less": /*!**********************************************!*\ !*** ./components/transfer/style/index.less ***! \**********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/transfer/style/index.tsx": /*!*********************************************!*\ !*** ./components/transfer/style/index.tsx ***! \*********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/transfer/style/index.less"); /* harmony import */ var _empty_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../empty/style */ "./components/empty/style/index.tsx"); /* harmony import */ var _checkbox_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../checkbox/style */ "./components/checkbox/style/index.tsx"); /* harmony import */ var _button_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../button/style */ "./components/button/style/index.tsx"); /* harmony import */ var _input_style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../input/style */ "./components/input/style/index.tsx"); /* harmony import */ var _menu_style__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../menu/style */ "./components/menu/style/index.tsx"); /* harmony import */ var _dropdown_style__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../dropdown/style */ "./components/dropdown/style/index.tsx"); /* harmony import */ var _pagination_style__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../pagination/style */ "./components/pagination/style/index.tsx"); // style dependencies /***/ }), /***/ "./components/tree-select/index.tsx": /*!******************************************!*\ !*** ./components/tree-select/index.tsx ***! \******************************************/ /*! exports provided: TreeNode, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var rc_tree_select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-tree-select */ "./node_modules/rc-tree-select/es/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _select_utils_iconUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../select/utils/iconUtil */ "./components/select/utils/iconUtil.tsx"); /* harmony import */ var _tree_utils_iconUtil__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../tree/utils/iconUtil */ "./components/tree/utils/iconUtil.tsx"); /* harmony import */ var _config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../config-provider/SizeContext */ "./components/config-provider/SizeContext.tsx"); /* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../_util/motion */ "./components/_util/motion.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var InternalTreeSelect = function InternalTreeSelect(_a, ref) { var _classNames2; var customizePrefixCls = _a.prefixCls, customizeSize = _a.size, _a$bordered = _a.bordered, bordered = _a$bordered === void 0 ? true : _a$bordered, className = _a.className, treeCheckable = _a.treeCheckable, multiple = _a.multiple, _a$listHeight = _a.listHeight, listHeight = _a$listHeight === void 0 ? 256 : _a$listHeight, _a$listItemHeight = _a.listItemHeight, listItemHeight = _a$listItemHeight === void 0 ? 26 : _a$listItemHeight, notFoundContent = _a.notFoundContent, _switcherIcon = _a.switcherIcon, treeLine = _a.treeLine, getPopupContainer = _a.getPopupContainer, dropdownClassName = _a.dropdownClassName, _a$treeIcon = _a.treeIcon, treeIcon = _a$treeIcon === void 0 ? false : _a$treeIcon, transitionName = _a.transitionName, _a$choiceTransitionNa = _a.choiceTransitionName, choiceTransitionName = _a$choiceTransitionNa === void 0 ? '' : _a$choiceTransitionNa, props = __rest(_a, ["prefixCls", "size", "bordered", "className", "treeCheckable", "multiple", "listHeight", "listItemHeight", "notFoundContent", "switcherIcon", "treeLine", "getPopupContainer", "dropdownClassName", "treeIcon", "transitionName", "choiceTransitionName"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_6__[/* ConfigContext */ "b"]), getContextPopupContainer = _React$useContext.getPopupContainer, getPrefixCls = _React$useContext.getPrefixCls, renderEmpty = _React$useContext.renderEmpty, direction = _React$useContext.direction, virtual = _React$useContext.virtual, dropdownMatchSelectWidth = _React$useContext.dropdownMatchSelectWidth; var size = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_10__[/* default */ "b"]); if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(multiple !== false || !treeCheckable, 'TreeSelect', '`multiple` will alway be `true` when `treeCheckable` is true'); var prefixCls = getPrefixCls('select', customizePrefixCls); var treePrefixCls = getPrefixCls('select-tree', customizePrefixCls); var treeSelectPrefixCls = getPrefixCls('tree-select', customizePrefixCls); var mergedDropdownClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()(dropdownClassName, "".concat(treeSelectPrefixCls, "-dropdown"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(treeSelectPrefixCls, "-dropdown-rtl"), direction === 'rtl')); var isMultiple = !!(treeCheckable || multiple); // ===================== Icons ===================== var _getIcons = Object(_select_utils_iconUtil__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, props), { multiple: isMultiple, prefixCls: prefixCls })), suffixIcon = _getIcons.suffixIcon, removeIcon = _getIcons.removeIcon, clearIcon = _getIcons.clearIcon; // ===================== Empty ===================== var mergedNotFound; if (notFoundContent !== undefined) { mergedNotFound = notFoundContent; } else { mergedNotFound = renderEmpty('Select'); } // ==================== Render ===================== var selectProps = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(props, ['suffixIcon', 'itemIcon', 'removeIcon', 'clearIcon', 'switcherIcon']); var mergedSize = customizeSize || size; var mergedClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()(!customizePrefixCls && treeSelectPrefixCls, (_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-lg"), mergedSize === 'large'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-sm"), mergedSize === 'small'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-rtl"), direction === 'rtl'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-borderless"), !bordered), _classNames2), className); var rootPrefixCls = getPrefixCls(); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](rc_tree_select__WEBPACK_IMPORTED_MODULE_3__[/* default */ "e"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ virtual: virtual, dropdownMatchSelectWidth: dropdownMatchSelectWidth }, selectProps, { ref: ref, prefixCls: prefixCls, className: mergedClassName, listHeight: listHeight, listItemHeight: listItemHeight, treeCheckable: treeCheckable ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { className: "".concat(prefixCls, "-tree-checkbox-inner") }) : treeCheckable, inputIcon: suffixIcon, multiple: multiple, removeIcon: removeIcon, clearIcon: clearIcon, switcherIcon: function switcherIcon(nodeProps) { return Object(_tree_utils_iconUtil__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])(treePrefixCls, _switcherIcon, treeLine, nodeProps); }, showTreeIcon: treeIcon, notFoundContent: mergedNotFound, getPopupContainer: getPopupContainer || getContextPopupContainer, treeMotion: null, dropdownClassName: mergedDropdownClassName, choiceTransitionName: Object(_util_motion__WEBPACK_IMPORTED_MODULE_11__[/* getTransitionName */ "b"])(rootPrefixCls, '', choiceTransitionName), transitionName: Object(_util_motion__WEBPACK_IMPORTED_MODULE_11__[/* getTransitionName */ "b"])(rootPrefixCls, 'slide-up', transitionName) })); }; var TreeSelectRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](InternalTreeSelect); var TreeSelect = TreeSelectRef; TreeSelect.TreeNode = rc_tree_select__WEBPACK_IMPORTED_MODULE_3__[/* TreeNode */ "d"]; TreeSelect.SHOW_ALL = rc_tree_select__WEBPACK_IMPORTED_MODULE_3__[/* SHOW_ALL */ "a"]; TreeSelect.SHOW_PARENT = rc_tree_select__WEBPACK_IMPORTED_MODULE_3__[/* SHOW_PARENT */ "c"]; TreeSelect.SHOW_CHILD = rc_tree_select__WEBPACK_IMPORTED_MODULE_3__[/* SHOW_CHILD */ "b"]; /* harmony default export */ __webpack_exports__["a"] = (TreeSelect); /***/ }), /***/ "./components/tree-select/style/index.less": /*!*************************************************!*\ !*** ./components/tree-select/style/index.less ***! \*************************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/tree-select/style/index.tsx": /*!************************************************!*\ !*** ./components/tree-select/style/index.tsx ***! \************************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/tree-select/style/index.less"); /* harmony import */ var _select_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../select/style */ "./components/select/style/index.tsx"); /* harmony import */ var _empty_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../empty/style */ "./components/empty/style/index.tsx"); // style dependencies // deps-lint-skip: tree /***/ }), /***/ "./components/tree/DirectoryTree.tsx": /*!*******************************************!*\ !*** ./components/tree/DirectoryTree.tsx ***! \*******************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/debounce */ "./node_modules/lodash/debounce.js"); /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var rc_tree_es_util__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-tree/es/util */ "./node_modules/rc-tree/es/util.js"); /* harmony import */ var rc_tree_es_utils_treeUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-tree/es/utils/treeUtil */ "./node_modules/rc-tree/es/utils/treeUtil.js"); /* harmony import */ var _ant_design_icons_es_icons_FileOutlined__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ant-design/icons/es/icons/FileOutlined */ "./node_modules/@ant-design/icons/es/icons/FileOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_FolderOpenOutlined__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @ant-design/icons/es/icons/FolderOpenOutlined */ "./node_modules/@ant-design/icons/es/icons/FolderOpenOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_FolderOutlined__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @ant-design/icons/es/icons/FolderOutlined */ "./node_modules/@ant-design/icons/es/icons/FolderOutlined.js"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _Tree__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Tree */ "./components/tree/Tree.tsx"); /* harmony import */ var _utils_dictUtil__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utils/dictUtil */ "./components/tree/utils/dictUtil.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; function getIcon(props) { var isLeaf = props.isLeaf, expanded = props.expanded; if (isLeaf) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_ant_design_icons_es_icons_FileOutlined__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], null); } return expanded ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_ant_design_icons_es_icons_FolderOpenOutlined__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_ant_design_icons_es_icons_FolderOutlined__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"], null); } function getTreeData(_ref) { var treeData = _ref.treeData, children = _ref.children; return treeData || Object(rc_tree_es_utils_treeUtil__WEBPACK_IMPORTED_MODULE_8__[/* convertTreeToData */ "c"])(children); } var DirectoryTree = function DirectoryTree(_a, ref) { var defaultExpandAll = _a.defaultExpandAll, defaultExpandParent = _a.defaultExpandParent, defaultExpandedKeys = _a.defaultExpandedKeys, props = __rest(_a, ["defaultExpandAll", "defaultExpandParent", "defaultExpandedKeys"]); // Shift click usage var lastSelectedKey = react__WEBPACK_IMPORTED_MODULE_4__["useRef"](); var cachedSelectedKeys = react__WEBPACK_IMPORTED_MODULE_4__["useRef"](); var treeRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createRef"](); react__WEBPACK_IMPORTED_MODULE_4__["useImperativeHandle"](ref, function () { return treeRef.current; }); var getInitExpandedKeys = function getInitExpandedKeys() { var _convertDataToEntitie = Object(rc_tree_es_utils_treeUtil__WEBPACK_IMPORTED_MODULE_8__[/* convertDataToEntities */ "a"])(getTreeData(props)), keyEntities = _convertDataToEntitie.keyEntities; var initExpandedKeys; // Expanded keys if (defaultExpandAll) { initExpandedKeys = Object.keys(keyEntities); } else if (defaultExpandParent) { initExpandedKeys = Object(rc_tree_es_util__WEBPACK_IMPORTED_MODULE_7__[/* conductExpandParent */ "e"])(props.expandedKeys || defaultExpandedKeys, keyEntities); } else { initExpandedKeys = props.expandedKeys || defaultExpandedKeys; } return initExpandedKeys; }; var _React$useState = react__WEBPACK_IMPORTED_MODULE_4__["useState"](props.selectedKeys || props.defaultSelectedKeys || []), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_React$useState, 2), selectedKeys = _React$useState2[0], setSelectedKeys = _React$useState2[1]; var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_4__["useState"](getInitExpandedKeys()), _React$useState4 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_React$useState3, 2), expandedKeys = _React$useState4[0], setExpandedKeys = _React$useState4[1]; react__WEBPACK_IMPORTED_MODULE_4__["useEffect"](function () { if ('selectedKeys' in props) { setSelectedKeys(props.selectedKeys); } }, [props.selectedKeys]); react__WEBPACK_IMPORTED_MODULE_4__["useEffect"](function () { if ('expandedKeys' in props) { setExpandedKeys(props.expandedKeys); } }, [props.expandedKeys]); var expandFolderNode = function expandFolderNode(event, node) { var isLeaf = node.isLeaf; if (isLeaf || event.shiftKey || event.metaKey || event.ctrlKey) { return; } // Call internal rc-tree expand function // https://github.com/ant-design/ant-design/issues/12567 treeRef.current.onNodeExpand(event, node); }; var onDebounceExpand = lodash_debounce__WEBPACK_IMPORTED_MODULE_6___default()(expandFolderNode, 200, { leading: true }); var onExpand = function onExpand(keys, info) { var _a; if (!('expandedKeys' in props)) { setExpandedKeys(keys); } // Call origin function return (_a = props.onExpand) === null || _a === void 0 ? void 0 : _a.call(props, keys, info); }; var onClick = function onClick(event, node) { var _a; var expandAction = props.expandAction; // Expand the tree if (expandAction === 'click') { onDebounceExpand(event, node); } (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, event, node); }; var onDoubleClick = function onDoubleClick(event, node) { var _a; var expandAction = props.expandAction; // Expand the tree if (expandAction === 'doubleClick') { onDebounceExpand(event, node); } (_a = props.onDoubleClick) === null || _a === void 0 ? void 0 : _a.call(props, event, node); }; var onSelect = function onSelect(keys, event) { var _a; var multiple = props.multiple; var node = event.node, nativeEvent = event.nativeEvent; var _node$key = node.key, key = _node$key === void 0 ? '' : _node$key; var treeData = getTreeData(props); // const newState: DirectoryTreeState = {}; // We need wrap this event since some value is not same var newEvent = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, event), { selected: true }); // Windows / Mac single pick var ctrlPick = nativeEvent.ctrlKey || nativeEvent.metaKey; var shiftPick = nativeEvent.shiftKey; // Generate new selected keys var newSelectedKeys; if (multiple && ctrlPick) { // Control click newSelectedKeys = keys; lastSelectedKey.current = key; cachedSelectedKeys.current = newSelectedKeys; newEvent.selectedNodes = Object(_utils_dictUtil__WEBPACK_IMPORTED_MODULE_14__[/* convertDirectoryKeysToNodes */ "b"])(treeData, newSelectedKeys); } else if (multiple && shiftPick) { // Shift click newSelectedKeys = Array.from(new Set([].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(cachedSelectedKeys.current || []), Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_utils_dictUtil__WEBPACK_IMPORTED_MODULE_14__[/* calcRangeKeys */ "a"])({ treeData: treeData, expandedKeys: expandedKeys, startKey: key, endKey: lastSelectedKey.current }))))); newEvent.selectedNodes = Object(_utils_dictUtil__WEBPACK_IMPORTED_MODULE_14__[/* convertDirectoryKeysToNodes */ "b"])(treeData, newSelectedKeys); } else { // Single click newSelectedKeys = [key]; lastSelectedKey.current = key; cachedSelectedKeys.current = newSelectedKeys; newEvent.selectedNodes = Object(_utils_dictUtil__WEBPACK_IMPORTED_MODULE_14__[/* convertDirectoryKeysToNodes */ "b"])(treeData, newSelectedKeys); } (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, newSelectedKeys, newEvent); if (!('selectedKeys' in props)) { setSelectedKeys(newSelectedKeys); } }; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_4__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_12__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var customizePrefixCls = props.prefixCls, className = props.className, otherProps = __rest(props, ["prefixCls", "className"]); var prefixCls = getPrefixCls('tree', customizePrefixCls); var connectClassName = classnames__WEBPACK_IMPORTED_MODULE_5___default()("".concat(prefixCls, "-directory"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(prefixCls, "-directory-rtl"), direction === 'rtl'), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_Tree__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({ icon: getIcon, ref: treeRef, blockNode: true }, otherProps, { prefixCls: prefixCls, className: connectClassName, expandedKeys: expandedKeys, selectedKeys: selectedKeys, onSelect: onSelect, onClick: onClick, onDoubleClick: onDoubleClick, onExpand: onExpand })); }; var ForwardDirectoryTree = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["forwardRef"](DirectoryTree); ForwardDirectoryTree.displayName = 'DirectoryTree'; ForwardDirectoryTree.defaultProps = { showIcon: true, expandAction: 'click' }; /* harmony default export */ __webpack_exports__["a"] = (ForwardDirectoryTree); /***/ }), /***/ "./components/tree/Tree.tsx": /*!**********************************!*\ !*** ./components/tree/Tree.tsx ***! \**********************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var rc_tree__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-tree */ "./node_modules/rc-tree/es/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _DirectoryTree__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./DirectoryTree */ "./components/tree/DirectoryTree.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_util/motion */ "./components/_util/motion.tsx"); /* harmony import */ var _utils_iconUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/iconUtil */ "./components/tree/utils/iconUtil.tsx"); /* harmony import */ var _utils_dropIndicator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/dropIndicator */ "./components/tree/utils/dropIndicator.tsx"); var Tree = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function (props, ref) { var _classNames; var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_6__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction, virtual = _React$useContext.virtual; var customizePrefixCls = props.prefixCls, className = props.className, showIcon = props.showIcon, showLine = props.showLine, _switcherIcon = props.switcherIcon, blockNode = props.blockNode, children = props.children, checkable = props.checkable, selectable = props.selectable; var prefixCls = getPrefixCls('tree', customizePrefixCls); var newProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, props), { showLine: Boolean(showLine), dropIndicatorRender: _utils_dropIndicator__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"] }); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](rc_tree__WEBPACK_IMPORTED_MODULE_3__[/* default */ "b"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ itemHeight: 20, ref: ref, virtual: virtual }, newProps, { prefixCls: prefixCls, className: classnames__WEBPACK_IMPORTED_MODULE_4___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-icon-hide"), !showIcon), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-block-node"), blockNode), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-unselectable"), !selectable), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className), direction: direction, checkable: checkable ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { className: "".concat(prefixCls, "-checkbox-inner") }) : checkable, selectable: selectable, switcherIcon: function switcherIcon(nodeProps) { return Object(_utils_iconUtil__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(prefixCls, _switcherIcon, showLine, nodeProps); } }), children); }); Tree.TreeNode = rc_tree__WEBPACK_IMPORTED_MODULE_3__[/* TreeNode */ "a"]; Tree.DirectoryTree = _DirectoryTree__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"]; Tree.defaultProps = { checkable: false, selectable: true, showIcon: false, motion: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, _util_motion__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"]), { motionAppear: false }), blockNode: false }; /* harmony default export */ __webpack_exports__["a"] = (Tree); /***/ }), /***/ "./components/tree/index.tsx": /*!***********************************!*\ !*** ./components/tree/index.tsx ***! \***********************************/ /*! exports provided: EventDataNode, DataNode, TreeProps, AntTreeNode, AntTreeNodeMouseEvent, AntTreeNodeExpandedEvent, AntTreeNodeCheckedEvent, AntTreeNodeSelectedEvent, AntdTreeNodeAttribute, AntTreeNodeProps, DirectoryTreeExpandAction, DirectoryTreeProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _Tree__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Tree */ "./components/tree/Tree.tsx"); /* harmony import */ var rc_tree_es_interface__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-tree/es/interface */ "./node_modules/rc-tree/es/interface.js"); /* harmony import */ var _DirectoryTree__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DirectoryTree */ "./components/tree/DirectoryTree.tsx"); /* harmony default export */ __webpack_exports__["a"] = (_Tree__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]); /***/ }), /***/ "./components/tree/style/index.less": /*!******************************************!*\ !*** ./components/tree/style/index.less ***! \******************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/tree/style/index.tsx": /*!*****************************************!*\ !*** ./components/tree/style/index.tsx ***! \*****************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/tree/style/index.less"); /***/ }), /***/ "./components/tree/utils/dictUtil.ts": /*!*******************************************!*\ !*** ./components/tree/utils/dictUtil.ts ***! \*******************************************/ /*! exports provided: calcRangeKeys, convertDirectoryKeysToNodes */ /*! exports used: calcRangeKeys, convertDirectoryKeysToNodes */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return calcRangeKeys; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return convertDirectoryKeysToNodes; }); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); var Record; (function (Record) { Record[Record["None"] = 0] = "None"; Record[Record["Start"] = 1] = "Start"; Record[Record["End"] = 2] = "End"; })(Record || (Record = {})); function traverseNodesKey(treeData, callback) { function processNode(dataNode) { var key = dataNode.key, children = dataNode.children; if (callback(key, dataNode) !== false) { traverseNodesKey(children || [], callback); } } treeData.forEach(processNode); } /** 计算选中范围,只考虑expanded情况以优化性能 */ function calcRangeKeys(_ref) { var treeData = _ref.treeData, expandedKeys = _ref.expandedKeys, startKey = _ref.startKey, endKey = _ref.endKey; var keys = []; var record = Record.None; if (startKey && startKey === endKey) { return [startKey]; } if (!startKey || !endKey) { return []; } function matchKey(key) { return key === startKey || key === endKey; } traverseNodesKey(treeData, function (key) { if (record === Record.End) { return false; } if (matchKey(key)) { // Match test keys.push(key); if (record === Record.None) { record = Record.Start; } else if (record === Record.Start) { record = Record.End; return false; } } else if (record === Record.Start) { // Append selection keys.push(key); } if (expandedKeys.indexOf(key) === -1) { return false; } return true; }); return keys; } function convertDirectoryKeysToNodes(treeData, keys) { var restKeys = Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(keys); var nodes = []; traverseNodesKey(treeData, function (key, node) { var index = restKeys.indexOf(key); if (index !== -1) { nodes.push(node); restKeys.splice(index, 1); } return !!restKeys.length; }); return nodes; } /***/ }), /***/ "./components/tree/utils/dropIndicator.tsx": /*!*************************************************!*\ !*** ./components/tree/utils/dropIndicator.tsx ***! \*************************************************/ /*! exports provided: offset, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export offset */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return dropIndicatorRender; }); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); var offset = 4; function dropIndicatorRender(props) { var _style; var dropPosition = props.dropPosition, dropLevelOffset = props.dropLevelOffset, prefixCls = props.prefixCls, indent = props.indent, _props$direction = props.direction, direction = _props$direction === void 0 ? 'ltr' : _props$direction; var startPosition = direction === 'ltr' ? 'left' : 'right'; var endPosition = direction === 'ltr' ? 'right' : 'left'; var style = (_style = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_style, startPosition, -dropLevelOffset * indent + offset), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_style, endPosition, 0), _style); switch (dropPosition) { case -1: style.top = -3; break; case 1: style.bottom = -3; break; default: // dropPosition === 0 style.bottom = -3; style[startPosition] = indent + offset; break; } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("div", { style: style, className: "".concat(prefixCls, "-drop-indicator") }); } /***/ }), /***/ "./components/tree/utils/iconUtil.tsx": /*!********************************************!*\ !*** ./components/tree/utils/iconUtil.tsx ***! \********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return renderSwitcherIcon; }); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _ant_design_icons_es_icons_LoadingOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons/es/icons/LoadingOutlined */ "./node_modules/@ant-design/icons/es/icons/LoadingOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_FileOutlined__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ant-design/icons/es/icons/FileOutlined */ "./node_modules/@ant-design/icons/es/icons/FileOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_MinusSquareOutlined__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/icons/es/icons/MinusSquareOutlined */ "./node_modules/@ant-design/icons/es/icons/MinusSquareOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_PlusSquareOutlined__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ant-design/icons/es/icons/PlusSquareOutlined */ "./node_modules/@ant-design/icons/es/icons/PlusSquareOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_CaretDownFilled__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ant-design/icons/es/icons/CaretDownFilled */ "./node_modules/@ant-design/icons/es/icons/CaretDownFilled.js"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../_util/reactNode */ "./components/_util/reactNode.ts"); function renderSwitcherIcon(prefixCls, switcherIcon, showLine, _ref) { var isLeaf = _ref.isLeaf, expanded = _ref.expanded, loading = _ref.loading; if (loading) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_ant_design_icons_es_icons_LoadingOutlined__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], { className: "".concat(prefixCls, "-switcher-loading-icon") }); } var showLeafIcon; if (showLine && Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(showLine) === 'object') { showLeafIcon = showLine.showLeafIcon; } if (isLeaf) { if (showLine) { if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(showLine) === 'object' && !showLeafIcon) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("span", { className: "".concat(prefixCls, "-switcher-leaf-line") }); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_ant_design_icons_es_icons_FileOutlined__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], { className: "".concat(prefixCls, "-switcher-line-icon") }); } return null; } var switcherCls = "".concat(prefixCls, "-switcher-icon"); if (Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_8__[/* isValidElement */ "b"])(switcherIcon)) { return Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_8__[/* cloneElement */ "a"])(switcherIcon, { className: classnames__WEBPACK_IMPORTED_MODULE_2___default()(switcherIcon.props.className || '', switcherCls) }); } if (switcherIcon) { return switcherIcon; } if (showLine) { return expanded ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_ant_design_icons_es_icons_MinusSquareOutlined__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], { className: "".concat(prefixCls, "-switcher-line-icon") }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_ant_design_icons_es_icons_PlusSquareOutlined__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], { className: "".concat(prefixCls, "-switcher-line-icon") }); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_ant_design_icons_es_icons_CaretDownFilled__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], { className: switcherCls }); } /***/ }), /***/ "./components/typography/Base.tsx": /*!****************************************!*\ !*** ./components/typography/Base.tsx ***! \****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rc-util/es/Children/toArray */ "./node_modules/rc-util/es/Children/toArray.js"); /* harmony import */ var copy_to_clipboard__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! copy-to-clipboard */ "./node_modules/copy-to-clipboard/index.js"); /* harmony import */ var copy_to_clipboard__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(copy_to_clipboard__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var _ant_design_icons_es_icons_EditOutlined__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @ant-design/icons/es/icons/EditOutlined */ "./node_modules/@ant-design/icons/es/icons/EditOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_CheckOutlined__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @ant-design/icons/es/icons/CheckOutlined */ "./node_modules/@ant-design/icons/es/icons/CheckOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_CopyOutlined__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @ant-design/icons/es/icons/CopyOutlined */ "./node_modules/@ant-design/icons/es/icons/CopyOutlined.js"); /* harmony import */ var rc_resize_observer__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! rc-resize-observer */ "./node_modules/rc-resize-observer/es/index.js"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../locale-provider/LocaleReceiver */ "./components/locale-provider/LocaleReceiver.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _util_transButton__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../_util/transButton */ "./components/_util/transButton.tsx"); /* harmony import */ var _util_raf__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../_util/raf */ "./components/_util/raf.ts"); /* harmony import */ var _util_styleChecker__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../_util/styleChecker */ "./components/_util/styleChecker.tsx"); /* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../tooltip */ "./components/tooltip/index.tsx"); /* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./Typography */ "./components/typography/Typography.tsx"); /* harmony import */ var _Editable__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Editable */ "./components/typography/Editable.tsx"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./util */ "./components/typography/util.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var isLineClampSupport = Object(_util_styleChecker__WEBPACK_IMPORTED_MODULE_22__[/* isStyleSupport */ "c"])('webkitLineClamp'); var isTextOverflowSupport = Object(_util_styleChecker__WEBPACK_IMPORTED_MODULE_22__[/* isStyleSupport */ "c"])('textOverflow'); function wrapperDecorations(_ref, content) { var mark = _ref.mark, code = _ref.code, underline = _ref.underline, del = _ref["delete"], strong = _ref.strong, keyboard = _ref.keyboard, italic = _ref.italic; var currentContent = content; function wrap(needed, tag) { if (!needed) return; currentContent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](tag, {}, currentContent); } wrap(strong, 'strong'); wrap(underline, 'u'); wrap(del, 'del'); wrap(code, 'code'); wrap(mark, 'mark'); wrap(keyboard, 'kbd'); wrap(italic, 'i'); return currentContent; } var ELLIPSIS_STR = '...'; var Base = /*#__PURE__*/function (_React$Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(Base, _React$Component); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(Base); function Base() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(this, Base); _this = _super.apply(this, arguments); _this.contentRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createRef"](); _this.state = { edit: false, copied: false, ellipsisText: '', ellipsisContent: null, isEllipsis: false, expanded: false, clientRendered: false }; _this.getPrefixCls = function () { var customizePrefixCls = _this.props.prefixCls; var getPrefixCls = _this.context.getPrefixCls; return getPrefixCls('typography', customizePrefixCls); }; // =============== Expand =============== _this.onExpandClick = function (e) { var _a; var _this$getEllipsis = _this.getEllipsis(), onExpand = _this$getEllipsis.onExpand; _this.setState({ expanded: true }); (_a = onExpand) === null || _a === void 0 ? void 0 : _a(e); }; // ================ Edit ================ _this.onEditClick = function (e) { e.preventDefault(); _this.triggerEdit(true); }; _this.onEditChange = function (value) { var _this$getEditable = _this.getEditable(), onChange = _this$getEditable.onChange; onChange === null || onChange === void 0 ? void 0 : onChange(value); _this.triggerEdit(false); }; _this.onEditCancel = function () { var _a, _b; (_b = (_a = _this.getEditable()).onCancel) === null || _b === void 0 ? void 0 : _b.call(_a); _this.triggerEdit(false); }; // ================ Copy ================ _this.onCopyClick = function (e) { e.preventDefault(); var _this$props = _this.props, children = _this$props.children, copyable = _this$props.copyable; var copyConfig = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(copyable) === 'object' ? copyable : null); if (copyConfig.text === undefined) { copyConfig.text = String(children); } copy_to_clipboard__WEBPACK_IMPORTED_MODULE_11___default()(copyConfig.text || ''); _this.setState({ copied: true }, function () { if (copyConfig.onCopy) { copyConfig.onCopy(); } _this.copyId = window.setTimeout(function () { _this.setState({ copied: false }); }, 3000); }); }; _this.setEditRef = function (node) { _this.editIcon = node; }; _this.triggerEdit = function (edit) { var _this$getEditable2 = _this.getEditable(), onStart = _this$getEditable2.onStart; if (edit && onStart) { onStart(); } _this.setState({ edit: edit }, function () { if (!edit && _this.editIcon) { _this.editIcon.focus(); } }); }; // ============== Ellipsis ============== _this.resizeOnNextFrame = function () { _util_raf__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].cancel(_this.rafId); _this.rafId = Object(_util_raf__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"])(function () { // Do not bind `syncEllipsis`. It need for test usage on prototype _this.syncEllipsis(); }); }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(Base, [{ key: "componentDidMount", value: function componentDidMount() { this.setState({ clientRendered: true }); this.resizeOnNextFrame(); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var children = this.props.children; var ellipsis = this.getEllipsis(); var prevEllipsis = this.getEllipsis(prevProps); if (children !== prevProps.children || ellipsis.rows !== prevEllipsis.rows) { this.resizeOnNextFrame(); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { window.clearTimeout(this.copyId); _util_raf__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].cancel(this.rafId); } }, { key: "getEditable", value: function getEditable(props) { var edit = this.state.edit; var _ref2 = props || this.props, editable = _ref2.editable; if (!editable) return { editing: edit }; return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({ editing: edit }, Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(editable) === 'object' ? editable : null); } }, { key: "getEllipsis", value: function getEllipsis(props) { var _ref3 = props || this.props, ellipsis = _ref3.ellipsis; if (!ellipsis) return {}; return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({ rows: 1, expandable: false }, Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(ellipsis) === 'object' ? ellipsis : null); } }, { key: "canUseCSSEllipsis", value: function canUseCSSEllipsis() { var clientRendered = this.state.clientRendered; var _this$props2 = this.props, editable = _this$props2.editable, copyable = _this$props2.copyable; var _this$getEllipsis2 = this.getEllipsis(), rows = _this$getEllipsis2.rows, expandable = _this$getEllipsis2.expandable, suffix = _this$getEllipsis2.suffix, onEllipsis = _this$getEllipsis2.onEllipsis, tooltip = _this$getEllipsis2.tooltip; if (suffix || tooltip) return false; // Can't use css ellipsis since we need to provide the place for button if (editable || copyable || expandable || !clientRendered || onEllipsis) { return false; } if (rows === 1) { return isTextOverflowSupport; } return isLineClampSupport; } }, { key: "syncEllipsis", value: function syncEllipsis() { var _this$state = this.state, ellipsisText = _this$state.ellipsisText, isEllipsis = _this$state.isEllipsis, expanded = _this$state.expanded; var _this$getEllipsis3 = this.getEllipsis(), rows = _this$getEllipsis3.rows, suffix = _this$getEllipsis3.suffix, onEllipsis = _this$getEllipsis3.onEllipsis; var children = this.props.children; if (!rows || rows < 0 || !this.contentRef.current || expanded) return; // Do not measure if css already support ellipsis if (this.canUseCSSEllipsis()) return; Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_19__[/* default */ "a"])(Object(rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(children).every(function (child) { return typeof child === 'string'; }), 'Typography', '`ellipsis` should use string as children only.'); var _measure = Object(_util__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"])(this.contentRef.current, { rows: rows, suffix: suffix }, children, this.renderOperations(true), ELLIPSIS_STR), content = _measure.content, text = _measure.text, ellipsis = _measure.ellipsis; if (ellipsisText !== text || isEllipsis !== ellipsis) { this.setState({ ellipsisText: text, ellipsisContent: content, isEllipsis: ellipsis }); if (isEllipsis !== ellipsis && onEllipsis) { onEllipsis(ellipsis); } } } }, { key: "renderExpand", value: function renderExpand(forceRender) { var _this$getEllipsis4 = this.getEllipsis(), expandable = _this$getEllipsis4.expandable, symbol = _this$getEllipsis4.symbol; var _this$state2 = this.state, expanded = _this$state2.expanded, isEllipsis = _this$state2.isEllipsis; if (!expandable) return null; // force render expand icon for measure usage or it will cause dead loop if (!forceRender && (expanded || !isEllipsis)) return null; var expandContent; if (symbol) { expandContent = symbol; } else { expandContent = this.expandStr; } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"]("a", { key: "expand", className: "".concat(this.getPrefixCls(), "-expand"), onClick: this.onExpandClick, "aria-label": this.expandStr }, expandContent); } }, { key: "renderEdit", value: function renderEdit() { var editable = this.props.editable; if (!editable) return; var icon = editable.icon, tooltip = editable.tooltip; var title = Object(rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(tooltip)[0] || this.editStr; var ariaLabel = typeof title === 'string' ? title : ''; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](_tooltip__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"], { key: "edit", title: tooltip === false ? '' : title }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](_util_transButton__WEBPACK_IMPORTED_MODULE_20__[/* default */ "a"], { ref: this.setEditRef, className: "".concat(this.getPrefixCls(), "-edit"), onClick: this.onEditClick, "aria-label": ariaLabel }, icon || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](_ant_design_icons_es_icons_EditOutlined__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"], { role: "button" }))); } }, { key: "renderCopy", value: function renderCopy() { var copied = this.state.copied; var copyable = this.props.copyable; if (!copyable) return; var prefixCls = this.getPrefixCls(); var tooltips = copyable.tooltips; var tooltipNodes = Object(rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(tooltips); if (tooltipNodes.length === 0) { tooltipNodes = [this.copyStr, this.copiedStr]; } var title = copied ? tooltipNodes[1] : tooltipNodes[0]; var ariaLabel = typeof title === 'string' ? title : ''; var icons = Object(rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(copyable.icon); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](_tooltip__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"], { key: "copy", title: tooltips === false ? '' : title }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](_util_transButton__WEBPACK_IMPORTED_MODULE_20__[/* default */ "a"], { className: classnames__WEBPACK_IMPORTED_MODULE_9___default()("".concat(prefixCls, "-copy"), copied && "".concat(prefixCls, "-copy-success")), onClick: this.onCopyClick, "aria-label": ariaLabel }, copied ? icons[1] || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](_ant_design_icons_es_icons_CheckOutlined__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"], null) : icons[0] || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](_ant_design_icons_es_icons_CopyOutlined__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"], null))); } }, { key: "renderEditInput", value: function renderEditInput() { var _this$props3 = this.props, children = _this$props3.children, className = _this$props3.className, style = _this$props3.style; var direction = this.context.direction; var _this$getEditable3 = this.getEditable(), maxLength = _this$getEditable3.maxLength, autoSize = _this$getEditable3.autoSize, onEnd = _this$getEditable3.onEnd; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](_Editable__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"], { value: typeof children === 'string' ? children : '', onSave: this.onEditChange, onCancel: this.onEditCancel, onEnd: onEnd, prefixCls: this.getPrefixCls(), className: className, style: style, direction: direction, maxLength: maxLength, autoSize: autoSize }); } }, { key: "renderOperations", value: function renderOperations(forceRenderExpanded) { return [this.renderExpand(forceRenderExpanded), this.renderEdit(), this.renderCopy()].filter(function (node) { return node; }); } }, { key: "renderContent", value: function renderContent() { var _this2 = this; var _this$state3 = this.state, ellipsisContent = _this$state3.ellipsisContent, isEllipsis = _this$state3.isEllipsis, expanded = _this$state3.expanded; var _a = this.props, component = _a.component, children = _a.children, className = _a.className, type = _a.type, disabled = _a.disabled, style = _a.style, restProps = __rest(_a, ["component", "children", "className", "type", "disabled", "style"]); var direction = this.context.direction; var _this$getEllipsis5 = this.getEllipsis(), rows = _this$getEllipsis5.rows, suffix = _this$getEllipsis5.suffix, tooltip = _this$getEllipsis5.tooltip; var prefixCls = this.getPrefixCls(); var textProps = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"])(restProps, ['prefixCls', 'editable', 'copyable', 'ellipsis', 'mark', 'code', 'delete', 'underline', 'strong', 'keyboard'].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_config_provider__WEBPACK_IMPORTED_MODULE_17__[/* configConsumerProps */ "c"]))); var cssEllipsis = this.canUseCSSEllipsis(); var cssTextOverflow = rows === 1 && cssEllipsis; var cssLineClamp = rows && rows > 1 && cssEllipsis; var textNode = children; // Only use js ellipsis when css ellipsis not support if (rows && isEllipsis && !expanded && !cssEllipsis) { var title = restProps.title; var restContent = title || ''; if (!title && (typeof children === 'string' || typeof children === 'number')) { restContent = String(children); } // show rest content as title on symbol restContent = restContent.slice(String(ellipsisContent || '').length); // We move full content to outer element to avoid repeat read the content by accessibility textNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](react__WEBPACK_IMPORTED_MODULE_8__["Fragment"], null, ellipsisContent, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"]("span", { title: restContent, "aria-hidden": "true" }, ELLIPSIS_STR), suffix); // If provided tooltip, we need wrap with span to let Tooltip inject events if (tooltip) { textNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](_tooltip__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"], { title: tooltip === true ? children : tooltip }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"]("span", null, textNode)); } } else { textNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](react__WEBPACK_IMPORTED_MODULE_8__["Fragment"], null, children, suffix); } textNode = wrapperDecorations(this.props, textNode); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](_locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_18__[/* default */ "a"], { componentName: "Text" }, function (_ref4) { var _classNames; var edit = _ref4.edit, copyStr = _ref4.copy, copied = _ref4.copied, expand = _ref4.expand; _this2.editStr = edit; _this2.copyStr = copyStr; _this2.copiedStr = copied; _this2.expandStr = expand; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](rc_resize_observer__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"], { onResize: _this2.resizeOnNextFrame, disabled: cssEllipsis }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](_Typography__WEBPACK_IMPORTED_MODULE_24__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({ className: classnames__WEBPACK_IMPORTED_MODULE_9___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(type), type), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-disabled"), disabled), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-ellipsis"), rows), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-single-line"), rows === 1), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-ellipsis-single-line"), cssTextOverflow), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-ellipsis-multiple-line"), cssLineClamp), _classNames), className), style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, style), { WebkitLineClamp: cssLineClamp ? rows : undefined }), component: component, ref: _this2.contentRef, direction: direction }, textProps), textNode, _this2.renderOperations())); }); } }, { key: "render", value: function render() { var _this$getEditable4 = this.getEditable(), editing = _this$getEditable4.editing; if (editing) { return this.renderEditInput(); } return this.renderContent(); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps) { var children = nextProps.children, editable = nextProps.editable; if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_19__[/* default */ "a"])(!editable || typeof children === 'string', 'Typography', 'When `editable` is enabled, the `children` should use string.'); return {}; } }]); return Base; }(react__WEBPACK_IMPORTED_MODULE_8__["Component"]); Base.contextType = _config_provider__WEBPACK_IMPORTED_MODULE_17__[/* ConfigContext */ "b"]; Base.defaultProps = { children: '' }; /* harmony default export */ __webpack_exports__["a"] = (Base); /***/ }), /***/ "./components/typography/Editable.tsx": /*!********************************************!*\ !*** ./components/typography/Editable.tsx ***! \********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-util/es/KeyCode */ "./node_modules/rc-util/es/KeyCode.js"); /* harmony import */ var _ant_design_icons_es_icons_EnterOutlined__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ant-design/icons/es/icons/EnterOutlined */ "./node_modules/@ant-design/icons/es/icons/EnterOutlined.js"); /* harmony import */ var _input_TextArea__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../input/TextArea */ "./components/input/TextArea.tsx"); var Editable = function Editable(_ref) { var prefixCls = _ref.prefixCls, ariaLabel = _ref['aria-label'], className = _ref.className, style = _ref.style, direction = _ref.direction, maxLength = _ref.maxLength, _ref$autoSize = _ref.autoSize, autoSize = _ref$autoSize === void 0 ? true : _ref$autoSize, value = _ref.value, onSave = _ref.onSave, onCancel = _ref.onCancel, onEnd = _ref.onEnd; var ref = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](); var inComposition = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](false); var lastKeyCode = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](); var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"](value), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_React$useState, 2), current = _React$useState2[0], setCurrent = _React$useState2[1]; react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { setCurrent(value); }, [value]); react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { if (ref.current && ref.current.resizableTextArea) { var textArea = ref.current.resizableTextArea.textArea; textArea.focus(); var length = textArea.value.length; textArea.setSelectionRange(length, length); } }, []); var onChange = function onChange(_ref2) { var target = _ref2.target; setCurrent(target.value.replace(/[\n\r]/g, '')); }; var onCompositionStart = function onCompositionStart() { inComposition.current = true; }; var onCompositionEnd = function onCompositionEnd() { inComposition.current = false; }; var onKeyDown = function onKeyDown(_ref3) { var keyCode = _ref3.keyCode; // We don't record keyCode when IME is using if (inComposition.current) return; lastKeyCode.current = keyCode; }; var confirmChange = function confirmChange() { onSave(current.trim()); }; var onKeyUp = function onKeyUp(_ref4) { var keyCode = _ref4.keyCode, ctrlKey = _ref4.ctrlKey, altKey = _ref4.altKey, metaKey = _ref4.metaKey, shiftKey = _ref4.shiftKey; // Check if it's a real key if (lastKeyCode.current === keyCode && !inComposition.current && !ctrlKey && !altKey && !metaKey && !shiftKey) { if (keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].ENTER) { confirmChange(); onEnd === null || onEnd === void 0 ? void 0 : onEnd(); } else if (keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].ESC) { onCancel(); } } }; var onBlur = function onBlur() { confirmChange(); }; var textAreaClassName = classnames__WEBPACK_IMPORTED_MODULE_3___default()(prefixCls, "".concat(prefixCls, "-edit-content"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: textAreaClassName, style: style }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_input_TextArea__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], { ref: ref, maxLength: maxLength, value: current, onChange: onChange, onKeyDown: onKeyDown, onKeyUp: onKeyUp, onCompositionStart: onCompositionStart, onCompositionEnd: onCompositionEnd, onBlur: onBlur, "aria-label": ariaLabel, autoSize: autoSize }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ant_design_icons_es_icons_EnterOutlined__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], { className: "".concat(prefixCls, "-edit-content-confirm") })); }; /* harmony default export */ __webpack_exports__["a"] = (Editable); /***/ }), /***/ "./components/typography/Link.tsx": /*!****************************************!*\ !*** ./components/typography/Link.tsx ***! \****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Base */ "./components/typography/Base.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Link = function Link(_a, ref) { var ellipsis = _a.ellipsis, rel = _a.rel, restProps = __rest(_a, ["ellipsis", "rel"]); if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(ellipsis) !== 'object', 'Typography.Link', '`ellipsis` only supports boolean value.'); var baseRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](null); react__WEBPACK_IMPORTED_MODULE_2__["useImperativeHandle"](ref, function () { var _a; return (_a = baseRef.current) === null || _a === void 0 ? void 0 : _a.contentRef.current; }); var mergedProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, restProps), { rel: rel === undefined && restProps.target === '_blank' ? 'noopener noreferrer' : rel }); // https://github.com/ant-design/ant-design/issues/26622 // @ts-ignore delete mergedProps.navigate; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Base__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, mergedProps, { ref: baseRef, ellipsis: !!ellipsis, component: "a" })); }; /* harmony default export */ __webpack_exports__["a"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](Link)); /***/ }), /***/ "./components/typography/Paragraph.tsx": /*!*********************************************!*\ !*** ./components/typography/Paragraph.tsx ***! \*********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Base */ "./components/typography/Base.tsx"); var Paragraph = function Paragraph(props) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_Base__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, props, { component: "div" })); }; /* harmony default export */ __webpack_exports__["a"] = (Paragraph); /***/ }), /***/ "./components/typography/Text.tsx": /*!****************************************!*\ !*** ./components/typography/Text.tsx ***! \****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Base */ "./components/typography/Base.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Text = function Text(_a) { var ellipsis = _a.ellipsis, restProps = __rest(_a, ["ellipsis"]); var mergedEllipsis = react__WEBPACK_IMPORTED_MODULE_2__["useMemo"](function () { if (ellipsis && Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(ellipsis) === 'object') { return Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(ellipsis, ['expandable', 'rows']); } return ellipsis; }, [ellipsis]); if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(ellipsis) !== 'object' || !ellipsis || !('expandable' in ellipsis) && !('rows' in ellipsis), 'Typography.Text', '`ellipsis` do not support `expandable` or `rows` props.'); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Base__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, restProps, { ellipsis: mergedEllipsis, component: "span" })); }; /* harmony default export */ __webpack_exports__["a"] = (Text); /***/ }), /***/ "./components/typography/Title.tsx": /*!*****************************************!*\ !*** ./components/typography/Title.tsx ***! \*****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); /* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Base */ "./components/typography/Base.tsx"); /* harmony import */ var _util_type__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../_util/type */ "./components/_util/type.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var TITLE_ELE_LIST = Object(_util_type__WEBPACK_IMPORTED_MODULE_4__[/* tupleNum */ "b"])(1, 2, 3, 4, 5); var Title = function Title(props) { var _props$level = props.level, level = _props$level === void 0 ? 1 : _props$level, restProps = __rest(props, ["level"]); var component; if (TITLE_ELE_LIST.indexOf(level) !== -1) { component = "h".concat(level); } else { if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(false, 'Typography.Title', 'Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version.'); component = 'h1'; } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_Base__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, restProps, { component: component })); }; /* harmony default export */ __webpack_exports__["a"] = (Title); /***/ }), /***/ "./components/typography/Typography.tsx": /*!**********************************************!*\ !*** ./components/typography/Typography.tsx ***! \**********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-util/es/ref */ "./node_modules/rc-util/es/ref.js"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Typography = function Typography(_a, ref) { var customizePrefixCls = _a.prefixCls, _a$component = _a.component, component = _a$component === void 0 ? 'article' : _a$component, className = _a.className, ariaLabel = _a['aria-label'], setContentRef = _a.setContentRef, children = _a.children, restProps = __rest(_a, ["prefixCls", "component", "className", 'aria-label', "setContentRef", "children"]); var mergedRef = ref; if (setContentRef) { if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(false, 'Typography', '`setContentRef` is deprecated. Please use `ref` instead.'); mergedRef = Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_4__[/* composeRef */ "a"])(ref, setContentRef); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_5__[/* ConfigConsumer */ "a"], null, function (_ref) { var getPrefixCls = _ref.getPrefixCls, direction = _ref.direction; var Component = component; var prefixCls = getPrefixCls('typography', customizePrefixCls); var componentClassName = classnames__WEBPACK_IMPORTED_MODULE_3___default()(prefixCls, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ className: componentClassName, "aria-label": ariaLabel, ref: mergedRef }, restProps), children); }); }; var RefTypography = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](Typography); RefTypography.displayName = 'Typography'; // es default export should use const instead of let var ExportTypography = RefTypography; /* harmony default export */ __webpack_exports__["a"] = (ExportTypography); /***/ }), /***/ "./components/typography/index.tsx": /*!*****************************************!*\ !*** ./components/typography/index.tsx ***! \*****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Typography */ "./components/typography/Typography.tsx"); /* harmony import */ var _Text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Text */ "./components/typography/Text.tsx"); /* harmony import */ var _Link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Link */ "./components/typography/Link.tsx"); /* harmony import */ var _Title__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Title */ "./components/typography/Title.tsx"); /* harmony import */ var _Paragraph__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Paragraph */ "./components/typography/Paragraph.tsx"); var Typography = _Typography__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]; Typography.Text = _Text__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]; Typography.Link = _Link__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"]; Typography.Title = _Title__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"]; Typography.Paragraph = _Paragraph__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"]; /* harmony default export */ __webpack_exports__["a"] = (Typography); /***/ }), /***/ "./components/typography/style/index.less": /*!************************************************!*\ !*** ./components/typography/style/index.less ***! \************************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/typography/style/index.tsx": /*!***********************************************!*\ !*** ./components/typography/style/index.tsx ***! \***********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/typography/style/index.less"); /* harmony import */ var _tooltip_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../tooltip/style */ "./components/tooltip/style/index.tsx"); /* harmony import */ var _input_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../input/style */ "./components/input/style/index.tsx"); // style dependencies /***/ }), /***/ "./components/typography/util.tsx": /*!****************************************!*\ !*** ./components/typography/util.tsx ***! \****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-dom */ "react-dom"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-util/es/Children/toArray */ "./node_modules/rc-util/es/Children/toArray.js"); // We only handle element & text node. var ELEMENT_NODE = 1; var TEXT_NODE = 3; var COMMENT_NODE = 8; var ellipsisContainer; var wrapperStyle = { padding: 0, margin: 0, display: 'inline', lineHeight: 'inherit' }; function pxToNumber(value) { if (!value) return 0; var match = value.match(/^\d*(\.\d*)?/); return match ? Number(match[0]) : 0; } function styleToString(style) { // There are some different behavior between Firefox & Chrome. // We have to handle this ourself. var styleNames = Array.prototype.slice.apply(style); return styleNames.map(function (name) { return "".concat(name, ": ").concat(style.getPropertyValue(name), ";"); }).join(''); } function mergeChildren(children) { var childList = []; children.forEach(function (child) { var prevChild = childList[childList.length - 1]; if (typeof child === 'string' && typeof prevChild === 'string') { childList[childList.length - 1] += child; } else { childList.push(child); } }); return childList; } /* harmony default export */ __webpack_exports__["a"] = (function (originEle, option, content, fixedContent, ellipsisStr) { if (!ellipsisContainer) { ellipsisContainer = document.createElement('div'); ellipsisContainer.setAttribute('aria-hidden', 'true'); } // HMR will remove this from body which should patch back if (!ellipsisContainer.parentNode) { document.body.appendChild(ellipsisContainer); } var rows = option.rows, _option$suffix = option.suffix, suffix = _option$suffix === void 0 ? '' : _option$suffix; // Get origin style var originStyle = window.getComputedStyle(originEle); var originCSS = styleToString(originStyle); var lineHeight = pxToNumber(originStyle.lineHeight); var maxHeight = Math.round(lineHeight * (rows + 1) + pxToNumber(originStyle.paddingTop) + pxToNumber(originStyle.paddingBottom)); // Set shadow ellipsisContainer.setAttribute('style', originCSS); ellipsisContainer.style.position = 'fixed'; ellipsisContainer.style.left = '0'; ellipsisContainer.style.height = 'auto'; ellipsisContainer.style.minHeight = 'auto'; ellipsisContainer.style.maxHeight = 'auto'; ellipsisContainer.style.top = '-999999px'; ellipsisContainer.style.zIndex = '-1000'; // clean up css overflow ellipsisContainer.style.textOverflow = 'clip'; ellipsisContainer.style.whiteSpace = 'normal'; ellipsisContainer.style.webkitLineClamp = 'none'; // Render in the fake container var contentList = mergeChildren(Object(rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(content)); Object(react_dom__WEBPACK_IMPORTED_MODULE_0__["render"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { style: wrapperStyle }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("span", { style: wrapperStyle }, contentList, suffix), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("span", { style: wrapperStyle }, fixedContent)), ellipsisContainer); // wrap in an div for old version react // Check if ellipsis in measure div is height enough for content function inRange() { return ellipsisContainer.offsetHeight < maxHeight; } // Skip ellipsis if already match if (inRange()) { Object(react_dom__WEBPACK_IMPORTED_MODULE_0__["unmountComponentAtNode"])(ellipsisContainer); return { content: content, text: ellipsisContainer.innerHTML, ellipsis: false }; } // We should clone the childNode since they're controlled by React and we can't reuse it without warning var childNodes = Array.prototype.slice.apply(ellipsisContainer.childNodes[0].childNodes[0].cloneNode(true).childNodes).filter(function (_ref) { var nodeType = _ref.nodeType; return nodeType !== COMMENT_NODE; }); var fixedNodes = Array.prototype.slice.apply(ellipsisContainer.childNodes[0].childNodes[1].cloneNode(true).childNodes); Object(react_dom__WEBPACK_IMPORTED_MODULE_0__["unmountComponentAtNode"])(ellipsisContainer); // ========================= Find match ellipsis content ========================= var ellipsisChildren = []; ellipsisContainer.innerHTML = ''; // Create origin content holder var ellipsisContentHolder = document.createElement('span'); ellipsisContainer.appendChild(ellipsisContentHolder); var ellipsisTextNode = document.createTextNode(ellipsisStr + suffix); ellipsisContentHolder.appendChild(ellipsisTextNode); fixedNodes.forEach(function (childNode) { ellipsisContainer.appendChild(childNode); }); // Append before fixed nodes function appendChildNode(node) { ellipsisContentHolder.insertBefore(node, ellipsisTextNode); } // Get maximum text function measureText(textNode, fullText) { var startLoc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; var endLoc = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : fullText.length; var lastSuccessLoc = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0; var midLoc = Math.floor((startLoc + endLoc) / 2); var currentText = fullText.slice(0, midLoc); textNode.textContent = currentText; if (startLoc >= endLoc - 1) { // Loop when step is small for (var step = endLoc; step >= startLoc; step -= 1) { var currentStepText = fullText.slice(0, step); textNode.textContent = currentStepText; if (inRange() || !currentStepText) { return step === fullText.length ? { finished: false, reactNode: fullText } : { finished: true, reactNode: currentStepText }; } } } if (inRange()) { return measureText(textNode, fullText, midLoc, endLoc, midLoc); } return measureText(textNode, fullText, startLoc, midLoc, lastSuccessLoc); } function measureNode(childNode, index) { var type = childNode.nodeType; if (type === ELEMENT_NODE) { // We don't split element, it will keep if whole element can be displayed. appendChildNode(childNode); if (inRange()) { return { finished: false, reactNode: contentList[index] }; } // Clean up if can not pull in ellipsisContentHolder.removeChild(childNode); return { finished: true, reactNode: null }; } if (type === TEXT_NODE) { var fullText = childNode.textContent || ''; var textNode = document.createTextNode(fullText); appendChildNode(textNode); return measureText(textNode, fullText); } // Not handle other type of content // PS: This code should not be attached after react 16 /* istanbul ignore next */ return { finished: false, reactNode: null }; } childNodes.some(function (childNode, index) { var _measureNode = measureNode(childNode, index), finished = _measureNode.finished, reactNode = _measureNode.reactNode; if (reactNode) { ellipsisChildren.push(reactNode); } return finished; }); return { content: ellipsisChildren, text: ellipsisContainer.innerHTML, ellipsis: true }; }); /***/ }), /***/ "./components/upload/Dragger.tsx": /*!***************************************!*\ !*** ./components/upload/Dragger.tsx ***! \***************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _Upload__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Upload */ "./components/upload/Upload.tsx"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var InternalDragger = function InternalDragger(_a, ref) { var style = _a.style, height = _a.height, restProps = __rest(_a, ["style", "height"]); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_Upload__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ ref: ref }, restProps, { type: "drag", style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, style), { height: height }) })); }; var Dragger = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["forwardRef"](InternalDragger); Dragger.displayName = 'Dragger'; /* harmony default export */ __webpack_exports__["a"] = (Dragger); /***/ }), /***/ "./components/upload/Upload.tsx": /*!**************************************!*\ !*** ./components/upload/Upload.tsx ***! \**************************************/ /*! exports provided: UploadProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var rc_upload__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-upload */ "./node_modules/rc-upload/es/index.js"); /* harmony import */ var rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-util/es/hooks/useMergedState */ "./node_modules/rc-util/es/hooks/useMergedState.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _Dragger__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Dragger */ "./components/upload/Dragger.tsx"); /* harmony import */ var _UploadList__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./UploadList */ "./components/upload/UploadList/index.tsx"); /* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./interface */ "./components/upload/interface.tsx"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./utils */ "./components/upload/utils.tsx"); /* harmony import */ var _locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../locale-provider/LocaleReceiver */ "./components/locale-provider/LocaleReceiver.tsx"); /* harmony import */ var _locale_default__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../locale/default */ "./components/locale/default.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts"); var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var LIST_IGNORE = "__LIST_IGNORE_".concat(Date.now(), "__"); var InternalUpload = function InternalUpload(props, ref) { var _classNames2; var fileList = props.fileList, defaultFileList = props.defaultFileList, onRemove = props.onRemove, showUploadList = props.showUploadList, listType = props.listType, onPreview = props.onPreview, onDownload = props.onDownload, onChange = props.onChange, onDrop = props.onDrop, previewFile = props.previewFile, disabled = props.disabled, propLocale = props.locale, iconRender = props.iconRender, isImageUrl = props.isImageUrl, progress = props.progress, customizePrefixCls = props.prefixCls, className = props.className, type = props.type, children = props.children, style = props.style, itemRender = props.itemRender, maxCount = props.maxCount; var _useMergedState = Object(rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(defaultFileList || [], { value: fileList, postState: function postState(list) { return list !== null && list !== void 0 ? list : []; } }), _useMergedState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(_useMergedState, 2), mergedFileList = _useMergedState2[0], setMergedFileList = _useMergedState2[1]; var _React$useState = react__WEBPACK_IMPORTED_MODULE_6__["useState"]('drop'), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(_React$useState, 2), dragState = _React$useState2[0], setDragState = _React$useState2[1]; var upload = react__WEBPACK_IMPORTED_MODULE_6__["useRef"](); react__WEBPACK_IMPORTED_MODULE_6__["useEffect"](function () { if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"])('fileList' in props || !('value' in props), 'Upload', '`value` is not a valid prop, do you mean `fileList`?'); Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"])(!('transformFile' in props), 'Upload', '`transformFile` is deprecated. Please use `beforeUpload` directly.'); }, []); // Control mode will auto fill file uid if not provided react__WEBPACK_IMPORTED_MODULE_6__["useMemo"](function () { var timestamp = Date.now(); (fileList || []).forEach(function (file, index) { if (!file.uid && !Object.isFrozen(file)) { file.uid = "__AUTO__".concat(timestamp, "_").concat(index, "__"); } }); }, [fileList]); var onInternalChange = function onInternalChange(file, changedFileList, event) { var cloneList = Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(changedFileList); // Cut to match count if (maxCount === 1) { cloneList = cloneList.slice(-1); } else if (maxCount) { cloneList = cloneList.slice(0, maxCount); } setMergedFileList(cloneList); var changeInfo = { file: file, fileList: cloneList }; if (event) { changeInfo.event = event; } onChange === null || onChange === void 0 ? void 0 : onChange(changeInfo); }; var mergedBeforeUpload = function mergedBeforeUpload(file, fileListArgs) { return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee() { var beforeUpload, transformFile, parsedFile, result; return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: beforeUpload = props.beforeUpload, transformFile = props.transformFile; parsedFile = file; if (!beforeUpload) { _context.next = 13; break; } _context.next = 5; return beforeUpload(file, fileListArgs); case 5: result = _context.sent; if (!(result === false)) { _context.next = 8; break; } return _context.abrupt("return", false); case 8: // Hack for LIST_IGNORE, we add additional info to remove from the list delete file[LIST_IGNORE]; if (!(result === LIST_IGNORE)) { _context.next = 12; break; } Object.defineProperty(file, LIST_IGNORE, { value: true, configurable: true }); return _context.abrupt("return", false); case 12: if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(result) === 'object' && result) { parsedFile = result; } case 13: if (!transformFile) { _context.next = 17; break; } _context.next = 16; return transformFile(parsedFile); case 16: parsedFile = _context.sent; case 17: return _context.abrupt("return", parsedFile); case 18: case "end": return _context.stop(); } } }, _callee); })); }; var onBatchStart = function onBatchStart(batchFileInfoList) { // Skip file which marked as `LIST_IGNORE`, these file will not add to file list var filteredFileInfoList = batchFileInfoList.filter(function (info) { return !info.file[LIST_IGNORE]; }); // Nothing to do since no file need upload if (!filteredFileInfoList.length) { return; } var objectFileList = filteredFileInfoList.map(function (info) { return Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* file2Obj */ "a"])(info.file); }); // Concat new files with prev files var newFileList = Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(mergedFileList); objectFileList.forEach(function (fileObj) { // Replace file if exist newFileList = Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* updateFileList */ "f"])(fileObj, newFileList); }); objectFileList.forEach(function (fileObj, index) { // Repeat trigger `onChange` event for compatible var triggerFileObj = fileObj; if (!filteredFileInfoList[index].parsedFile) { // `beforeUpload` return false var originFileObj = fileObj.originFileObj; var clone; try { clone = new File([originFileObj], originFileObj.name, { type: originFileObj.type }); } catch (e) { clone = new Blob([originFileObj], { type: originFileObj.type }); clone.name = originFileObj.name; clone.lastModifiedDate = new Date(); clone.lastModified = new Date().getTime(); } clone.uid = fileObj.uid; triggerFileObj = clone; } else { // Inject `uploading` status fileObj.status = 'uploading'; } onInternalChange(triggerFileObj, newFileList); }); }; var onSuccess = function onSuccess(response, file, xhr) { try { if (typeof response === 'string') { response = JSON.parse(response); } } catch (e) { /* do nothing */ } // removed if (!Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* getFileItem */ "b"])(file, mergedFileList)) { return; } var targetItem = Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* file2Obj */ "a"])(file); targetItem.status = 'done'; targetItem.percent = 100; targetItem.response = response; targetItem.xhr = xhr; var nextFileList = Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* updateFileList */ "f"])(targetItem, mergedFileList); onInternalChange(targetItem, nextFileList); }; var onProgress = function onProgress(e, file) { // removed if (!Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* getFileItem */ "b"])(file, mergedFileList)) { return; } var targetItem = Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* file2Obj */ "a"])(file); targetItem.status = 'uploading'; targetItem.percent = e.percent; var nextFileList = Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* updateFileList */ "f"])(targetItem, mergedFileList); onInternalChange(targetItem, nextFileList, e); }; var onError = function onError(error, response, file) { // removed if (!Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* getFileItem */ "b"])(file, mergedFileList)) { return; } var targetItem = Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* file2Obj */ "a"])(file); targetItem.error = error; targetItem.response = response; targetItem.status = 'error'; var nextFileList = Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* updateFileList */ "f"])(targetItem, mergedFileList); onInternalChange(targetItem, nextFileList); }; var handleRemove = function handleRemove(file) { var currentFile; Promise.resolve(typeof onRemove === 'function' ? onRemove(file) : onRemove).then(function (ret) { var _a; // Prevent removing file if (ret === false) { return; } var removedFileList = Object(_utils__WEBPACK_IMPORTED_MODULE_13__[/* removeFileItem */ "e"])(file, mergedFileList); if (removedFileList) { currentFile = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, file), { status: 'removed' }); mergedFileList === null || mergedFileList === void 0 ? void 0 : mergedFileList.forEach(function (item) { var matchKey = currentFile.uid !== undefined ? 'uid' : 'name'; if (item[matchKey] === currentFile[matchKey] && !Object.isFrozen(item)) { item.status = 'removed'; } }); (_a = upload.current) === null || _a === void 0 ? void 0 : _a.abort(currentFile); onInternalChange(currentFile, removedFileList); } }); }; var onFileDrop = function onFileDrop(e) { setDragState(e.type); if (e.type === 'drop') { onDrop === null || onDrop === void 0 ? void 0 : onDrop(e); } }; // Test needs react__WEBPACK_IMPORTED_MODULE_6__["useImperativeHandle"](ref, function () { return { onBatchStart: onBatchStart, onSuccess: onSuccess, onProgress: onProgress, onError: onError, fileList: mergedFileList, upload: upload.current }; }); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_6__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_16__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; var prefixCls = getPrefixCls('upload', customizePrefixCls); var rcUploadProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ onBatchStart: onBatchStart, onError: onError, onProgress: onProgress, onSuccess: onSuccess }, props), { prefixCls: prefixCls, beforeUpload: mergedBeforeUpload, onChange: undefined }); delete rcUploadProps.className; delete rcUploadProps.style; // Remove id to avoid open by label when trigger is hidden // !children: https://github.com/ant-design/ant-design/issues/14298 // disabled: https://github.com/ant-design/ant-design/issues/16478 // https://github.com/ant-design/ant-design/issues/24197 if (!children || disabled) { delete rcUploadProps.id; } var renderUploadList = function renderUploadList(button) { return showUploadList ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"], { componentName: "Upload", defaultLocale: _locale_default__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].Upload }, function (locale) { var _ref = typeof showUploadList === 'boolean' ? {} : showUploadList, showRemoveIcon = _ref.showRemoveIcon, showPreviewIcon = _ref.showPreviewIcon, showDownloadIcon = _ref.showDownloadIcon, removeIcon = _ref.removeIcon, downloadIcon = _ref.downloadIcon; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_UploadList__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"], { listType: listType, items: mergedFileList, previewFile: previewFile, onPreview: onPreview, onDownload: onDownload, onRemove: handleRemove, showRemoveIcon: !disabled && showRemoveIcon, showPreviewIcon: showPreviewIcon, showDownloadIcon: showDownloadIcon, removeIcon: removeIcon, downloadIcon: downloadIcon, iconRender: iconRender, locale: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, locale), propLocale), isImageUrl: isImageUrl, progress: progress, appendAction: button, itemRender: itemRender }); }) : button; }; if (type === 'drag') { var _classNames; var dragCls = classnames__WEBPACK_IMPORTED_MODULE_9___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-drag"), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-drag-uploading"), mergedFileList.some(function (file) { return file.status === 'uploading'; })), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-drag-hover"), dragState === 'dragover'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-disabled"), disabled), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("span", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", { className: dragCls, onDrop: onFileDrop, onDragOver: onFileDrop, onDragLeave: onFileDrop, style: style }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](rc_upload__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, rcUploadProps, { ref: upload, className: "".concat(prefixCls, "-btn") }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", { className: "".concat(prefixCls, "-drag-container") }, children))), renderUploadList()); } var uploadButtonCls = classnames__WEBPACK_IMPORTED_MODULE_9___default()(prefixCls, (_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-select"), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-select-").concat(listType), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-disabled"), disabled), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames2)); var uploadButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", { className: uploadButtonCls, style: children ? undefined : { display: 'none' } }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](rc_upload__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, rcUploadProps, { ref: upload }))); if (listType === 'picture-card') { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("span", { className: classnames__WEBPACK_IMPORTED_MODULE_9___default()("".concat(prefixCls, "-picture-card-wrapper"), className) }, renderUploadList(uploadButton)); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("span", { className: className }, uploadButton, renderUploadList()); }; var Upload = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["forwardRef"](InternalUpload); Upload.Dragger = _Dragger__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"]; Upload.LIST_IGNORE = LIST_IGNORE; Upload.displayName = 'Upload'; Upload.defaultProps = { type: 'select', multiple: false, action: '', data: {}, accept: '', showUploadList: true, listType: 'text', className: '', disabled: false, supportServerRender: true }; /* harmony default export */ __webpack_exports__["a"] = (Upload); /***/ }), /***/ "./components/upload/UploadList/ListItem.tsx": /*!***************************************************!*\ !*** ./components/upload/UploadList/ListItem.tsx ***! \***************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var rc_motion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-motion */ "./node_modules/rc-motion/es/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _ant_design_icons_es_icons_EyeOutlined__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ant-design/icons/es/icons/EyeOutlined */ "./node_modules/@ant-design/icons/es/icons/EyeOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_DeleteOutlined__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ant-design/icons/es/icons/DeleteOutlined */ "./node_modules/@ant-design/icons/es/icons/DeleteOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_DownloadOutlined__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ant-design/icons/es/icons/DownloadOutlined */ "./node_modules/@ant-design/icons/es/icons/DownloadOutlined.js"); /* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../tooltip */ "./components/tooltip/index.tsx"); /* harmony import */ var _progress__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../progress */ "./components/progress/index.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../config-provider */ "./components/config-provider/index.tsx"); var ListItem = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function (_ref, ref) { var _classNames3; var prefixCls = _ref.prefixCls, className = _ref.className, style = _ref.style, locale = _ref.locale, listType = _ref.listType, file = _ref.file, items = _ref.items, progressProps = _ref.progress, iconRender = _ref.iconRender, actionIconRender = _ref.actionIconRender, itemRender = _ref.itemRender, isImgUrl = _ref.isImgUrl, showPreviewIcon = _ref.showPreviewIcon, showRemoveIcon = _ref.showRemoveIcon, showDownloadIcon = _ref.showDownloadIcon, customRemoveIcon = _ref.removeIcon, customDownloadIcon = _ref.downloadIcon, onPreview = _ref.onPreview, onDownload = _ref.onDownload, onClose = _ref.onClose; var _a, _b; // Delay to show the progress bar var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__["useState"](false), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_React$useState, 2), showProgress = _React$useState2[0], setShowProgress = _React$useState2[1]; var progressRafRef = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](); react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { progressRafRef.current = setTimeout(function () { setShowProgress(true); }, 300); return function () { window.clearTimeout(progressRafRef.current); }; }, []); // This is used for legacy span make scrollHeight the wrong value. // We will force these to be `display: block` with non `picture-card` var spanClassName = "".concat(prefixCls, "-span"); var iconNode = iconRender(file); var icon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(prefixCls, "-text-icon") }, iconNode); if (listType === 'picture' || listType === 'picture-card') { if (file.status === 'uploading' || !file.thumbUrl && !file.url) { var _classNames; var uploadingClassName = classnames__WEBPACK_IMPORTED_MODULE_5___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-list-item-thumbnail"), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-list-item-file"), file.status !== 'uploading'), _classNames)); icon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: uploadingClassName }, iconNode); } else { var _classNames2; var thumbnail = (isImgUrl === null || isImgUrl === void 0 ? void 0 : isImgUrl(file)) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("img", { src: file.thumbUrl || file.url, alt: file.name, className: "".concat(prefixCls, "-list-item-image") }) : iconNode; var aClassName = classnames__WEBPACK_IMPORTED_MODULE_5___default()((_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-list-item-thumbnail"), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-list-item-file"), isImgUrl && !isImgUrl(file)), _classNames2)); icon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("a", { className: aClassName, onClick: function onClick(e) { return onPreview(file, e); }, href: file.url || file.thumbUrl, target: "_blank", rel: "noopener noreferrer" }, thumbnail); } } var infoUploadingClass = classnames__WEBPACK_IMPORTED_MODULE_5___default()((_classNames3 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-list-item"), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-list-item-").concat(file.status), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-list-item-list-type-").concat(listType), true), _classNames3)); var linkProps = typeof file.linkProps === 'string' ? JSON.parse(file.linkProps) : file.linkProps; var removeIcon = showRemoveIcon ? actionIconRender((typeof customRemoveIcon === 'function' ? customRemoveIcon(file) : customRemoveIcon) || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_ant_design_icons_es_icons_DeleteOutlined__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], null), function () { return onClose(file); }, prefixCls, locale.removeFile) : null; var downloadIcon = showDownloadIcon && file.status === 'done' ? actionIconRender((typeof customDownloadIcon === 'function' ? customDownloadIcon(file) : customDownloadIcon) || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_ant_design_icons_es_icons_DownloadOutlined__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], null), function () { return onDownload(file); }, prefixCls, locale.downloadFile) : null; var downloadOrDelete = listType !== 'picture-card' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", { key: "download-delete", className: classnames__WEBPACK_IMPORTED_MODULE_5___default()("".concat(prefixCls, "-list-item-card-actions"), { picture: listType === 'picture' }) }, downloadIcon, removeIcon); var listItemNameClass = classnames__WEBPACK_IMPORTED_MODULE_5___default()("".concat(prefixCls, "-list-item-name")); var preview = file.url ? [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("a", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ key: "view", target: "_blank", rel: "noopener noreferrer", className: listItemNameClass, title: file.name }, linkProps, { href: file.url, onClick: function onClick(e) { return onPreview(file, e); } }), file.name), downloadOrDelete] : [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", { key: "view", className: listItemNameClass, onClick: function onClick(e) { return onPreview(file, e); }, title: file.name }, file.name), downloadOrDelete]; var previewStyle = { pointerEvents: 'none', opacity: 0.5 }; var previewIcon = showPreviewIcon ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("a", { href: file.url || file.thumbUrl, target: "_blank", rel: "noopener noreferrer", style: file.url || file.thumbUrl ? undefined : previewStyle, onClick: function onClick(e) { return onPreview(file, e); }, title: locale.previewFile }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_ant_design_icons_es_icons_EyeOutlined__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], null)) : null; var actions = listType === 'picture-card' && file.status !== 'uploading' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", { className: "".concat(prefixCls, "-list-item-actions") }, previewIcon, file.status === 'done' && downloadIcon, removeIcon); var message; if (file.response && typeof file.response === 'string') { message = file.response; } else { message = ((_a = file.error) === null || _a === void 0 ? void 0 : _a.statusText) || ((_b = file.error) === null || _b === void 0 ? void 0 : _b.message) || locale.uploadError; } var iconAndPreview = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", { className: spanClassName }, icon, preview); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_3__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_11__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls; var rootPrefixCls = getPrefixCls(); var dom = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: infoUploadingClass }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "".concat(prefixCls, "-list-item-info") }, iconAndPreview), actions, showProgress && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](rc_motion__WEBPACK_IMPORTED_MODULE_4__[/* default */ "b"], { motionName: "".concat(rootPrefixCls, "-fade"), visible: file.status === 'uploading', motionDeadline: 2000 }, function (_ref2) { var motionClassName = _ref2.className; // show loading icon if upload progress listener is disabled var loadingProgress = 'percent' in file ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_progress__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, progressProps, { type: "line", percent: file.percent })) : null; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: classnames__WEBPACK_IMPORTED_MODULE_5___default()("".concat(prefixCls, "-list-item-progress"), motionClassName) }, loadingProgress); })); var listContainerNameClass = classnames__WEBPACK_IMPORTED_MODULE_5___default()("".concat(prefixCls, "-list-").concat(listType, "-container"), className); var item = file.status === 'error' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_tooltip__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], { title: message, getPopupContainer: function getPopupContainer(node) { return node.parentNode; } }, dom) : dom; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: listContainerNameClass, style: style, ref: ref }, itemRender ? itemRender(item, file, items, { download: onDownload.bind(null, file), preview: onPreview.bind(null, file), remove: onClose.bind(null, file) }) : item); }); /* harmony default export */ __webpack_exports__["a"] = (ListItem); /***/ }), /***/ "./components/upload/UploadList/index.tsx": /*!************************************************!*\ !*** ./components/upload/UploadList/index.tsx ***! \************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var rc_motion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-motion */ "./node_modules/rc-motion/es/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _ant_design_icons_es_icons_LoadingOutlined__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ant-design/icons/es/icons/LoadingOutlined */ "./node_modules/@ant-design/icons/es/icons/LoadingOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_PaperClipOutlined__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ant-design/icons/es/icons/PaperClipOutlined */ "./node_modules/@ant-design/icons/es/icons/PaperClipOutlined.js"); /* harmony import */ var _ant_design_icons_es_icons_PictureTwoTone__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ant-design/icons/es/icons/PictureTwoTone */ "./node_modules/@ant-design/icons/es/icons/PictureTwoTone.js"); /* harmony import */ var _ant_design_icons_es_icons_FileTwoTone__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @ant-design/icons/es/icons/FileTwoTone */ "./node_modules/@ant-design/icons/es/icons/FileTwoTone.js"); /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../_util/reactNode */ "./components/_util/reactNode.ts"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils */ "./components/upload/utils.tsx"); /* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../_util/motion */ "./components/_util/motion.tsx"); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../config-provider */ "./components/config-provider/index.tsx"); /* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../button */ "./components/button/index.tsx"); /* harmony import */ var _util_hooks_useForceUpdate__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../_util/hooks/useForceUpdate */ "./components/_util/hooks/useForceUpdate.ts"); /* harmony import */ var _ListItem__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./ListItem */ "./components/upload/UploadList/ListItem.tsx"); var listItemMotion = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, _util_motion__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"]); delete listItemMotion.onAppearEnd; delete listItemMotion.onEnterEnd; delete listItemMotion.onLeaveEnd; var InternalUploadList = function InternalUploadList(_ref, ref) { var _classNames; var listType = _ref.listType, previewFile = _ref.previewFile, onPreview = _ref.onPreview, onDownload = _ref.onDownload, onRemove = _ref.onRemove, locale = _ref.locale, iconRender = _ref.iconRender, isImgUrl = _ref.isImageUrl, customizePrefixCls = _ref.prefixCls, _ref$items = _ref.items, items = _ref$items === void 0 ? [] : _ref$items, showPreviewIcon = _ref.showPreviewIcon, showRemoveIcon = _ref.showRemoveIcon, showDownloadIcon = _ref.showDownloadIcon, removeIcon = _ref.removeIcon, downloadIcon = _ref.downloadIcon, progress = _ref.progress, appendAction = _ref.appendAction, itemRender = _ref.itemRender; var forceUpdate = Object(_util_hooks_useForceUpdate__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"])(); var _React$useState = react__WEBPACK_IMPORTED_MODULE_4__["useState"](false), _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_React$useState, 2), motionAppear = _React$useState2[0], setMotionAppear = _React$useState2[1]; // ============================= Effect ============================= react__WEBPACK_IMPORTED_MODULE_4__["useEffect"](function () { if (listType !== 'picture' && listType !== 'picture-card') { return; } (items || []).forEach(function (file) { if (typeof document === 'undefined' || typeof window === 'undefined' || !window.FileReader || !window.File || !(file.originFileObj instanceof File || file.originFileObj instanceof Blob) || file.thumbUrl !== undefined) { return; } file.thumbUrl = ''; if (previewFile) { previewFile(file.originFileObj).then(function (previewDataUrl) { // Need append '' to avoid dead loop file.thumbUrl = previewDataUrl || ''; forceUpdate(); }); } }); }, [listType, items, previewFile]); react__WEBPACK_IMPORTED_MODULE_4__["useEffect"](function () { setMotionAppear(true); }, []); // ============================= Events ============================= var onInternalPreview = function onInternalPreview(file, e) { if (!onPreview) { return; } e === null || e === void 0 ? void 0 : e.preventDefault(); return onPreview(file); }; var onInternalDownload = function onInternalDownload(file) { if (typeof onDownload === 'function') { onDownload(file); } else if (file.url) { window.open(file.url); } }; var onInternalClose = function onInternalClose(file) { onRemove === null || onRemove === void 0 ? void 0 : onRemove(file); }; var internalIconRender = function internalIconRender(file) { if (iconRender) { return iconRender(file, listType); } var isLoading = file.status === 'uploading'; var fileIcon = isImgUrl && isImgUrl(file) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_ant_design_icons_es_icons_PictureTwoTone__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_ant_design_icons_es_icons_FileTwoTone__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], null); var icon = isLoading ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_ant_design_icons_es_icons_LoadingOutlined__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_ant_design_icons_es_icons_PaperClipOutlined__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], null); if (listType === 'picture') { icon = isLoading ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_ant_design_icons_es_icons_LoadingOutlined__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], null) : fileIcon; } else if (listType === 'picture-card') { icon = isLoading ? locale.uploading : fileIcon; } return icon; }; var actionIconRender = function actionIconRender(customIcon, callback, prefixCls, title) { var btnProps = { type: 'text', size: 'small', title: title, onClick: function onClick(e) { callback(); if (Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_11__[/* isValidElement */ "b"])(customIcon) && customIcon.props.onClick) { customIcon.props.onClick(e); } }, className: "".concat(prefixCls, "-list-item-card-actions-btn") }; if (Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_11__[/* isValidElement */ "b"])(customIcon)) { var btnIcon = Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_11__[/* cloneElement */ "a"])(customIcon, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, customIcon.props), { onClick: function onClick() {} })); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_button__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, btnProps, { icon: btnIcon })); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_button__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"], btnProps, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("span", null, customIcon)); }; // ============================== Ref =============================== // Test needs react__WEBPACK_IMPORTED_MODULE_4__["useImperativeHandle"](ref, function () { return { handlePreview: onInternalPreview, handleDownload: onInternalDownload }; }); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_4__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_14__[/* ConfigContext */ "b"]), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction; // ============================= Render ============================= var prefixCls = getPrefixCls('upload', customizePrefixCls); var listClassNames = classnames__WEBPACK_IMPORTED_MODULE_6___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-list"), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-list-").concat(listType), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-list-rtl"), direction === 'rtl'), _classNames)); // >>> Motion config var motionKeyList = Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(items.map(function (file) { return { key: file.uid, file: file }; })); var animationDirection = listType === 'picture-card' ? 'animate-inline' : 'animate'; // const transitionName = list.length === 0 ? '' : `${prefixCls}-${animationDirection}`; var motionConfig = { motionDeadline: 2000, motionName: "".concat(prefixCls, "-").concat(animationDirection), keys: motionKeyList, motionAppear: motionAppear }; if (listType !== 'picture-card') { motionConfig = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, listItemMotion), motionConfig); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("div", { className: listClassNames }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](rc_motion__WEBPACK_IMPORTED_MODULE_5__[/* CSSMotionList */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, motionConfig, { component: false }), function (_ref2) { var key = _ref2.key, file = _ref2.file, motionClassName = _ref2.className, motionStyle = _ref2.style; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_ListItem__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"], { key: key, locale: locale, prefixCls: prefixCls, className: motionClassName, style: motionStyle, file: file, items: items, progress: progress, listType: listType, isImgUrl: isImgUrl, showPreviewIcon: showPreviewIcon, showRemoveIcon: showRemoveIcon, showDownloadIcon: showDownloadIcon, removeIcon: removeIcon, downloadIcon: downloadIcon, iconRender: internalIconRender, actionIconRender: actionIconRender, itemRender: itemRender, onPreview: onInternalPreview, onDownload: onInternalDownload, onClose: onInternalClose }); }), appendAction && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](rc_motion__WEBPACK_IMPORTED_MODULE_5__[/* default */ "b"], motionConfig, function (_ref3) { var motionClassName = _ref3.className, motionStyle = _ref3.style; return Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_11__[/* cloneElement */ "a"])(appendAction, function (oriProps) { return { className: classnames__WEBPACK_IMPORTED_MODULE_6___default()(oriProps.className, motionClassName), style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, motionStyle), oriProps.style) }; }); })); }; var UploadList = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["forwardRef"](InternalUploadList); UploadList.displayName = 'UploadList'; UploadList.defaultProps = { listType: 'text', progress: { strokeWidth: 2, showInfo: false }, showRemoveIcon: true, showDownloadIcon: false, showPreviewIcon: true, previewFile: _utils__WEBPACK_IMPORTED_MODULE_12__[/* previewImage */ "d"], isImageUrl: _utils__WEBPACK_IMPORTED_MODULE_12__[/* isImageUrl */ "c"] }; /* harmony default export */ __webpack_exports__["a"] = (UploadList); /***/ }), /***/ "./components/upload/index.tsx": /*!*************************************!*\ !*** ./components/upload/index.tsx ***! \*************************************/ /*! exports provided: UploadProps, UploadListProps, UploadChangeParam, RcFile, DraggerProps, default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _Upload__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Upload */ "./components/upload/Upload.tsx"); /* harmony import */ var _Dragger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Dragger */ "./components/upload/Dragger.tsx"); /* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./interface */ "./components/upload/interface.tsx"); _Upload__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].Dragger = _Dragger__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]; /* harmony default export */ __webpack_exports__["a"] = (_Upload__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]); /***/ }), /***/ "./components/upload/interface.tsx": /*!*****************************************!*\ !*** ./components/upload/interface.tsx ***! \*****************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /***/ }), /***/ "./components/upload/style/index.less": /*!********************************************!*\ !*** ./components/upload/style/index.less ***! \********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // extracted by mini-css-extract-plugin /***/ }), /***/ "./components/upload/style/index.tsx": /*!*******************************************!*\ !*** ./components/upload/style/index.tsx ***! \*******************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/upload/style/index.less"); /* harmony import */ var _button_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../button/style */ "./components/button/style/index.tsx"); /* harmony import */ var _progress_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../progress/style */ "./components/progress/style/index.tsx"); /* harmony import */ var _tooltip_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../tooltip/style */ "./components/tooltip/style/index.tsx"); // style dependencies /***/ }), /***/ "./components/upload/utils.tsx": /*!*************************************!*\ !*** ./components/upload/utils.tsx ***! \*************************************/ /*! exports provided: file2Obj, updateFileList, getFileItem, removeFileItem, isImageUrl, previewImage */ /*! exports used: file2Obj, getFileItem, isImageUrl, previewImage, removeFileItem, updateFileList */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return file2Obj; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return updateFileList; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getFileItem; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return removeFileItem; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isImageUrl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return previewImage; }); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); function file2Obj(file) { return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, file), { lastModified: file.lastModified, lastModifiedDate: file.lastModifiedDate, name: file.name, size: file.size, type: file.type, uid: file.uid, percent: 0, originFileObj: file }); } /** Upload fileList. Replace file if exist or just push into it. */ function updateFileList(file, fileList) { var nextFileList = Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(fileList); var fileIndex = nextFileList.findIndex(function (_ref) { var uid = _ref.uid; return uid === file.uid; }); if (fileIndex === -1) { nextFileList.push(file); } else { nextFileList[fileIndex] = file; } return nextFileList; } function getFileItem(file, fileList) { var matchKey = file.uid !== undefined ? 'uid' : 'name'; return fileList.filter(function (item) { return item[matchKey] === file[matchKey]; })[0]; } function removeFileItem(file, fileList) { var matchKey = file.uid !== undefined ? 'uid' : 'name'; var removed = fileList.filter(function (item) { return item[matchKey] !== file[matchKey]; }); if (removed.length === fileList.length) { return null; } return removed; } // ==================== Default Image Preview ==================== var extname = function extname() { var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; var temp = url.split('/'); var filename = temp[temp.length - 1]; var filenameWithoutSuffix = filename.split(/#|\?/)[0]; return (/\.[^./\\]*$/.exec(filenameWithoutSuffix) || [''])[0]; }; var isImageFileType = function isImageFileType(type) { return type.indexOf('image/') === 0; }; var isImageUrl = function isImageUrl(file) { if (file.type && !file.thumbUrl) { return isImageFileType(file.type); } var url = file.thumbUrl || file.url || ''; var extension = extname(url); if (/^data:image\//.test(url) || /(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(extension)) { return true; } if (/^data:/.test(url)) { // other file types of base64 return false; } if (extension) { // other file types which have extension return false; } return true; }; var MEASURE_SIZE = 200; function previewImage(file) { return new Promise(function (resolve) { if (!file.type || !isImageFileType(file.type)) { resolve(''); return; } var canvas = document.createElement('canvas'); canvas.width = MEASURE_SIZE; canvas.height = MEASURE_SIZE; canvas.style.cssText = "position: fixed; left: 0; top: 0; width: ".concat(MEASURE_SIZE, "px; height: ").concat(MEASURE_SIZE, "px; z-index: 9999; display: none;"); document.body.appendChild(canvas); var ctx = canvas.getContext('2d'); var img = new Image(); img.onload = function () { var width = img.width, height = img.height; var drawWidth = MEASURE_SIZE; var drawHeight = MEASURE_SIZE; var offsetX = 0; var offsetY = 0; if (width > height) { drawHeight = height * (MEASURE_SIZE / width); offsetY = -(drawHeight - drawWidth) / 2; } else { drawWidth = width * (MEASURE_SIZE / height); offsetX = -(drawWidth - drawHeight) / 2; } ctx.drawImage(img, offsetX, offsetY, drawWidth, drawHeight); var dataURL = canvas.toDataURL(); document.body.removeChild(canvas); resolve(dataURL); }; img.src = window.URL.createObjectURL(file); }); } /***/ }), /***/ "./components/version/index.tsx": /*!**************************************!*\ !*** ./components/version/index.tsx ***! \**************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./version */ "./components/version/version.tsx"); /* eslint import/no-unresolved: 0 */ // @ts-ignore /* harmony default export */ __webpack_exports__["a"] = (_version__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]); /***/ }), /***/ "./components/version/style/index.tsx": /*!********************************************!*\ !*** ./components/version/style/index.tsx ***! \********************************************/ /*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less"); // empty file prevent babel-plugin-import error /***/ }), /***/ "./components/version/version.tsx": /*!****************************************!*\ !*** ./components/version/version.tsx ***! \****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony default export */ __webpack_exports__["a"] = ('4.16.1'); /***/ }), /***/ "./index.js": /*!******************!*\ !*** ./index.js ***! \******************/ /*! no static exports found */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { /* eslint no-console:0 */ function pascalCase(name) { return name.charAt(0).toUpperCase() + name.slice(1).replace(/-(\w)/g, function (m, n) { return n.toUpperCase(); }); } // Just import style for https://github.com/ant-design/ant-design/issues/3745 var req = __webpack_require__("./components sync recursive ^\\.\\/[^_][\\w-]+\\/style\\/index\\.tsx?$"); req.keys().forEach(function (mod) { var v = req(mod); if (v && v["default"]) { v = v["default"]; } var match = mod.match(/^\.\/([^_][\w-]+)\/index\.tsx?$/); if (match && match[1]) { if (match[1] === 'message' || match[1] === 'notification') { // message & notification should not be capitalized exports[match[1]] = v; } else { exports[pascalCase(match[1])] = v; } } }); module.exports = __webpack_require__(/*! ./components */ "./components/index.tsx"); /***/ }), /***/ "./node_modules/@ant-design/colors/dist/index.esm.js": /*!***********************************************************!*\ !*** ./node_modules/@ant-design/colors/dist/index.esm.js ***! \***********************************************************/ /*! exports provided: blue, cyan, geekblue, generate, gold, green, grey, lime, magenta, orange, presetDarkPalettes, presetPalettes, presetPrimaryColors, purple, red, volcano, yellow */ /*! exports used: generate, presetPrimaryColors */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export blue */ /* unused harmony export cyan */ /* unused harmony export geekblue */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return generate; }); /* unused harmony export gold */ /* unused harmony export green */ /* unused harmony export grey */ /* unused harmony export lime */ /* unused harmony export magenta */ /* unused harmony export orange */ /* unused harmony export presetDarkPalettes */ /* unused harmony export presetPalettes */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return presetPrimaryColors; }); /* unused harmony export purple */ /* unused harmony export red */ /* unused harmony export volcano */ /* unused harmony export yellow */ /* harmony import */ var _ctrl_tinycolor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ctrl/tinycolor */ "./node_modules/@ctrl/tinycolor/dist/module/public_api.js"); var hueStep = 2; // 色相阶梯 var saturationStep = 0.16; // 饱和度阶梯,浅色部分 var saturationStep2 = 0.05; // 饱和度阶梯,深色部分 var brightnessStep1 = 0.05; // 亮度阶梯,浅色部分 var brightnessStep2 = 0.15; // 亮度阶梯,深色部分 var lightColorCount = 5; // 浅色数量,主色上 var darkColorCount = 4; // 深色数量,主色下 // 暗色主题颜色映射关系表 var darkColorMap = [{ index: 7, opacity: 0.15 }, { index: 6, opacity: 0.25 }, { index: 5, opacity: 0.3 }, { index: 5, opacity: 0.45 }, { index: 5, opacity: 0.65 }, { index: 5, opacity: 0.85 }, { index: 4, opacity: 0.9 }, { index: 3, opacity: 0.95 }, { index: 2, opacity: 0.97 }, { index: 1, opacity: 0.98 }]; // Wrapper function ported from TinyColor.prototype.toHsv // Keep it here because of `hsv.h * 360` function toHsv(_ref) { var r = _ref.r, g = _ref.g, b = _ref.b; var hsv = Object(_ctrl_tinycolor__WEBPACK_IMPORTED_MODULE_0__[/* rgbToHsv */ "c"])(r, g, b); return { h: hsv.h * 360, s: hsv.s, v: hsv.v }; } // Wrapper function ported from TinyColor.prototype.toHexString // Keep it here because of the prefix `#` function toHex(_ref2) { var r = _ref2.r, g = _ref2.g, b = _ref2.b; return "#".concat(Object(_ctrl_tinycolor__WEBPACK_IMPORTED_MODULE_0__[/* rgbToHex */ "b"])(r, g, b, false)); } // Wrapper function ported from TinyColor.prototype.mix, not treeshakable. // Amount in range [0, 1] // Assume color1 & color2 has no alpha, since the following src code did so. function mix(rgb1, rgb2, amount) { var p = amount / 100; var rgb = { r: (rgb2.r - rgb1.r) * p + rgb1.r, g: (rgb2.g - rgb1.g) * p + rgb1.g, b: (rgb2.b - rgb1.b) * p + rgb1.b }; return rgb; } function getHue(hsv, i, light) { var hue; // 根据色相不同,色相转向不同 if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) { hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i; } else { hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i; } if (hue < 0) { hue += 360; } else if (hue >= 360) { hue -= 360; } return hue; } function getSaturation(hsv, i, light) { // grey color don't change saturation if (hsv.h === 0 && hsv.s === 0) { return hsv.s; } var saturation; if (light) { saturation = hsv.s - saturationStep * i; } else if (i === darkColorCount) { saturation = hsv.s + saturationStep; } else { saturation = hsv.s + saturationStep2 * i; } // 边界值修正 if (saturation > 1) { saturation = 1; } // 第一格的 s 限制在 0.06-0.1 之间 if (light && i === lightColorCount && saturation > 0.1) { saturation = 0.1; } if (saturation < 0.06) { saturation = 0.06; } return Number(saturation.toFixed(2)); } function getValue(hsv, i, light) { var value; if (light) { value = hsv.v + brightnessStep1 * i; } else { value = hsv.v - brightnessStep2 * i; } if (value > 1) { value = 1; } return Number(value.toFixed(2)); } function generate(color) { var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var patterns = []; var pColor = Object(_ctrl_tinycolor__WEBPACK_IMPORTED_MODULE_0__[/* inputToRGB */ "a"])(color); for (var i = lightColorCount; i > 0; i -= 1) { var hsv = toHsv(pColor); var colorString = toHex(Object(_ctrl_tinycolor__WEBPACK_IMPORTED_MODULE_0__[/* inputToRGB */ "a"])({ h: getHue(hsv, i, true), s: getSaturation(hsv, i, true), v: getValue(hsv, i, true) })); patterns.push(colorString); } patterns.push(toHex(pColor)); for (var _i = 1; _i <= darkColorCount; _i += 1) { var _hsv = toHsv(pColor); var _colorString = toHex(Object(_ctrl_tinycolor__WEBPACK_IMPORTED_MODULE_0__[/* inputToRGB */ "a"])({ h: getHue(_hsv, _i), s: getSaturation(_hsv, _i), v: getValue(_hsv, _i) })); patterns.push(_colorString); } // dark theme patterns if (opts.theme === 'dark') { return darkColorMap.map(function (_ref3) { var index = _ref3.index, opacity = _ref3.opacity; var darkColorString = toHex(mix(Object(_ctrl_tinycolor__WEBPACK_IMPORTED_MODULE_0__[/* inputToRGB */ "a"])(opts.backgroundColor || '#141414'), Object(_ctrl_tinycolor__WEBPACK_IMPORTED_MODULE_0__[/* inputToRGB */ "a"])(patterns[index]), opacity * 100)); return darkColorString; }); } return patterns; } var presetPrimaryColors = { red: '#F5222D', volcano: '#FA541C', orange: '#FA8C16', gold: '#FAAD14', yellow: '#FADB14', lime: '#A0D911', green: '#52C41A', cyan: '#13C2C2', blue: '#1890FF', geekblue: '#2F54EB', purple: '#722ED1', magenta: '#EB2F96', grey: '#666666' }; var presetPalettes = {}; var presetDarkPalettes = {}; Object.keys(presetPrimaryColors).forEach(function (key) { presetPalettes[key] = generate(presetPrimaryColors[key]); presetPalettes[key].primary = presetPalettes[key][5]; // dark presetPalettes presetDarkPalettes[key] = generate(presetPrimaryColors[key], { theme: 'dark', backgroundColor: '#141414' }); presetDarkPalettes[key].primary = presetDarkPalettes[key][5]; }); var red = presetPalettes.red; var volcano = presetPalettes.volcano; var gold = presetPalettes.gold; var orange = presetPalettes.orange; var yellow = presetPalettes.yellow; var lime = presetPalettes.lime; var green = presetPalettes.green; var cyan = presetPalettes.cyan; var blue = presetPalettes.blue; var geekblue = presetPalettes.geekblue; var purple = presetPalettes.purple; var magenta = presetPalettes.magenta; var grey = presetPalettes.grey; /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AccountBookFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AccountBookFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AccountBookFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zM648.3 426.8l-87.7 161.1h45.7c5.5 0 10 4.5 10 10v21.3c0 5.5-4.5 10-10 10h-63.4v29.7h63.4c5.5 0 10 4.5 10 10v21.3c0 5.5-4.5 10-10 10h-63.4V752c0 5.5-4.5 10-10 10h-41.3c-5.5 0-10-4.5-10-10v-51.8h-63.1c-5.5 0-10-4.5-10-10v-21.3c0-5.5 4.5-10 10-10h63.1v-29.7h-63.1c-5.5 0-10-4.5-10-10v-21.3c0-5.5 4.5-10 10-10h45.2l-88-161.1c-2.6-4.8-.9-10.9 4-13.6 1.5-.8 3.1-1.2 4.8-1.2h46c3.8 0 7.2 2.1 8.9 5.5l72.9 144.3 73.2-144.3a10 10 0 018.9-5.5h45c5.5 0 10 4.5 10 10 .1 1.7-.3 3.3-1.1 4.8z" } }] }, "name": "account-book", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (AccountBookFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AccountBookOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AccountBookOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AccountBookOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v584zM639.5 414h-45c-3 0-5.8 1.7-7.1 4.4L514 563.8h-2.8l-73.4-145.4a8 8 0 00-7.1-4.4h-46c-1.3 0-2.7.3-3.8 1-3.9 2.1-5.3 7-3.2 10.9l89.3 164h-48.6c-4.4 0-8 3.6-8 8v21.3c0 4.4 3.6 8 8 8h65.1v33.7h-65.1c-4.4 0-8 3.6-8 8v21.3c0 4.4 3.6 8 8 8h65.1V752c0 4.4 3.6 8 8 8h41.3c4.4 0 8-3.6 8-8v-53.8h65.4c4.4 0 8-3.6 8-8v-21.3c0-4.4-3.6-8-8-8h-65.4v-33.7h65.4c4.4 0 8-3.6 8-8v-21.3c0-4.4-3.6-8-8-8h-49.1l89.3-164.1c.6-1.2 1-2.5 1-3.8.1-4.4-3.4-8-7.9-8z" } }] }, "name": "account-book", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AccountBookOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AccountBookTwoTone.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AccountBookTwoTone.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AccountBookTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M712 304c0 4.4-3.6 8-8 8h-56c-4.4 0-8-3.6-8-8v-48H384v48c0 4.4-3.6 8-8 8h-56c-4.4 0-8-3.6-8-8v-48H184v584h656V256H712v48zm-65.6 121.8l-89.3 164.1h49.1c4.4 0 8 3.6 8 8v21.3c0 4.4-3.6 8-8 8h-65.4v33.7h65.4c4.4 0 8 3.6 8 8v21.3c0 4.4-3.6 8-8 8h-65.4V752c0 4.4-3.6 8-8 8h-41.3c-4.4 0-8-3.6-8-8v-53.8h-65.1c-4.4 0-8-3.6-8-8v-21.3c0-4.4 3.6-8 8-8h65.1v-33.7h-65.1c-4.4 0-8-3.6-8-8v-21.3c0-4.4 3.6-8 8-8H467l-89.3-164c-2.1-3.9-.7-8.8 3.2-10.9 1.1-.7 2.5-1 3.8-1h46a8 8 0 017.1 4.4l73.4 145.4h2.8l73.4-145.4c1.3-2.7 4.1-4.4 7.1-4.4h45c4.5 0 8 3.6 7.9 8 0 1.3-.4 2.6-1 3.8z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M639.5 414h-45c-3 0-5.8 1.7-7.1 4.4L514 563.8h-2.8l-73.4-145.4a8 8 0 00-7.1-4.4h-46c-1.3 0-2.7.3-3.8 1-3.9 2.1-5.3 7-3.2 10.9l89.3 164h-48.6c-4.4 0-8 3.6-8 8v21.3c0 4.4 3.6 8 8 8h65.1v33.7h-65.1c-4.4 0-8 3.6-8 8v21.3c0 4.4 3.6 8 8 8h65.1V752c0 4.4 3.6 8 8 8h41.3c4.4 0 8-3.6 8-8v-53.8h65.4c4.4 0 8-3.6 8-8v-21.3c0-4.4-3.6-8-8-8h-65.4v-33.7h65.4c4.4 0 8-3.6 8-8v-21.3c0-4.4-3.6-8-8-8h-49.1l89.3-164.1c.6-1.2 1-2.5 1-3.8.1-4.4-3.4-8-7.9-8z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v584z", "fill": primaryColor } }] }; }, "name": "account-book", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (AccountBookTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AimOutlined.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AimOutlined.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AimOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M952 474H829.8C812.5 327.6 696.4 211.5 550 194.2V72c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v122.2C327.6 211.5 211.5 327.6 194.2 474H72c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h122.2C211.5 696.4 327.6 812.5 474 829.8V952c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V829.8C696.4 812.5 812.5 696.4 829.8 550H952c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM512 756c-134.8 0-244-109.2-244-244s109.2-244 244-244 244 109.2 244 244-109.2 244-244 244z" } }, { "tag": "path", "attrs": { "d": "M512 392c-32.1 0-62.1 12.4-84.8 35.2-22.7 22.7-35.2 52.7-35.2 84.8s12.5 62.1 35.2 84.8C449.9 619.4 480 632 512 632s62.1-12.5 84.8-35.2C619.4 574.1 632 544 632 512s-12.5-62.1-35.2-84.8A118.57 118.57 0 00512 392z" } }] }, "name": "aim", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AimOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AlertFilled.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AlertFilled.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AlertFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 244c176.18 0 319 142.82 319 319v233a32 32 0 01-32 32H225a32 32 0 01-32-32V563c0-176.18 142.82-319 319-319zM484 68h56a8 8 0 018 8v96a8 8 0 01-8 8h-56a8 8 0 01-8-8V76a8 8 0 018-8zM177.25 191.66a8 8 0 0111.32 0l67.88 67.88a8 8 0 010 11.31l-39.6 39.6a8 8 0 01-11.31 0l-67.88-67.88a8 8 0 010-11.31l39.6-39.6zm669.6 0l39.6 39.6a8 8 0 010 11.3l-67.88 67.9a8 8 0 01-11.32 0l-39.6-39.6a8 8 0 010-11.32l67.89-67.88a8 8 0 0111.31 0zM192 892h640a32 32 0 0132 32v24a8 8 0 01-8 8H168a8 8 0 01-8-8v-24a32 32 0 0132-32zm148-317v253h64V575h-64z" } }] }, "name": "alert", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (AlertFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AlertOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AlertOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AlertOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M193 796c0 17.7 14.3 32 32 32h574c17.7 0 32-14.3 32-32V563c0-176.2-142.8-319-319-319S193 386.8 193 563v233zm72-233c0-136.4 110.6-247 247-247s247 110.6 247 247v193H404V585c0-5.5-4.5-10-10-10h-44c-5.5 0-10 4.5-10 10v171h-75V563zm-48.1-252.5l39.6-39.6c3.1-3.1 3.1-8.2 0-11.3l-67.9-67.9a8.03 8.03 0 00-11.3 0l-39.6 39.6a8.03 8.03 0 000 11.3l67.9 67.9c3.1 3.1 8.1 3.1 11.3 0zm669.6-79.2l-39.6-39.6a8.03 8.03 0 00-11.3 0l-67.9 67.9a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l67.9-67.9c3.1-3.2 3.1-8.2 0-11.3zM832 892H192c-17.7 0-32 14.3-32 32v24c0 4.4 3.6 8 8 8h688c4.4 0 8-3.6 8-8v-24c0-17.7-14.3-32-32-32zM484 180h56c4.4 0 8-3.6 8-8V76c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v96c0 4.4 3.6 8 8 8z" } }] }, "name": "alert", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AlertOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AlertTwoTone.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AlertTwoTone.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AlertTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M340 585c0-5.5 4.5-10 10-10h44c5.5 0 10 4.5 10 10v171h355V563c0-136.4-110.6-247-247-247S265 426.6 265 563v193h75V585z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M216.9 310.5l39.6-39.6c3.1-3.1 3.1-8.2 0-11.3l-67.9-67.9a8.03 8.03 0 00-11.3 0l-39.6 39.6a8.03 8.03 0 000 11.3l67.9 67.9c3.1 3.1 8.1 3.1 11.3 0zm669.6-79.2l-39.6-39.6a8.03 8.03 0 00-11.3 0l-67.9 67.9a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l67.9-67.9c3.1-3.2 3.1-8.2 0-11.3zM484 180h56c4.4 0 8-3.6 8-8V76c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v96c0 4.4 3.6 8 8 8zm348 712H192c-17.7 0-32 14.3-32 32v24c0 4.4 3.6 8 8 8h688c4.4 0 8-3.6 8-8v-24c0-17.7-14.3-32-32-32zm-639-96c0 17.7 14.3 32 32 32h574c17.7 0 32-14.3 32-32V563c0-176.2-142.8-319-319-319S193 386.8 193 563v233zm72-233c0-136.4 110.6-247 247-247s247 110.6 247 247v193H404V585c0-5.5-4.5-10-10-10h-44c-5.5 0-10 4.5-10 10v171h-75V563z", "fill": primaryColor } }] }; }, "name": "alert", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (AlertTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AlibabaOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AlibabaOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AlibabaOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M602.9 669.8c-37.2 2.6-33.6-17.3-11.5-46.2 50.4-67.2 143.7-158.5 147.9-225.2 5.8-86.6-81.3-113.4-171-113.4-62.4 1.6-127 18.9-171 34.6-151.6 53.5-246.6 137.5-306.9 232-62.4 93.4-43 183.2 91.8 185.8 101.8-4.2 170.5-32.5 239.7-68.2.5 0-192.5 55.1-263.9 14.7-7.9-4.2-15.7-10-17.8-26.2 0-33.1 54.6-67.7 86.6-78.7v-56.7c64.5 22.6 140.6 16.3 205.7-32 2.1 5.8 4.2 13.1 3.7 21h11c2.6-22.6-12.6-44.6-37.8-46.2 7.3 5.8 12.6 10.5 15.2 14.7l-1 1-.5.5c-83.9 58.8-165.3 31.5-173.1 29.9l46.7-45.7-13.1-33.1c92.9-32.5 169.5-56.2 296.9-78.7l-28.5-23 14.7-8.9c75.5 21 126.4 36.7 123.8 76.6-1 6.8-3.7 14.7-7.9 23.1C660.1 466.1 594 538 567.2 569c-17.3 20.5-34.6 39.4-46.7 58.3-13.6 19.4-20.5 37.3-21 53.5 2.6 131.8 391.4-61.9 468-112.9-111.7 47.8-232.9 93.5-364.6 101.9zm85-302.9c2.8 5.2 4.1 11.6 4.1 19.1-.1-6.8-1.4-13.3-4.1-19.1z" } }] }, "name": "alibaba", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AlibabaOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AlignCenterOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AlignCenterOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AlignCenterOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, "name": "align-center", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AlignCenterOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AlignLeftOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AlignLeftOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AlignLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, "name": "align-left", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AlignLeftOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AlignRightOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AlignRightOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AlignRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M904 158H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 424H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 212H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, "name": "align-right", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AlignRightOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AlipayCircleFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AlipayCircleFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AlipayCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M308.6 545.7c-19.8 2-57.1 10.7-77.4 28.6-61 53-24.5 150 99 150 71.8 0 143.5-45.7 199.8-119-80.2-38.9-148.1-66.8-221.4-59.6zm460.5 67c100.1 33.4 154.7 43 166.7 44.8A445.9 445.9 0 00960 512c0-247.4-200.6-448-448-448S64 264.6 64 512s200.6 448 448 448c155.9 0 293.2-79.7 373.5-200.5-75.6-29.8-213.6-85-286.8-120.1-69.9 85.7-160.1 137.8-253.7 137.8-158.4 0-212.1-138.1-137.2-229 16.3-19.8 44.2-38.7 87.3-49.4 67.5-16.5 175 10.3 275.7 43.4 18.1-33.3 33.4-69.9 44.7-108.9H305.1V402h160v-56.2H271.3v-31.3h193.8v-80.1s0-13.5 13.7-13.5H557v93.6h191.7v31.3H557.1V402h156.4c-15 61.1-37.7 117.4-66.2 166.8 47.5 17.1 90.1 33.3 121.8 43.9z" } }] }, "name": "alipay-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (AlipayCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AlipayCircleOutlined.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AlipayCircleOutlined.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AlipayCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M308.6 545.7c-19.8 2-57.1 10.7-77.4 28.6-61 53-24.5 150 99 150 71.8 0 143.5-45.7 199.8-119-80.2-38.9-148.1-66.8-221.4-59.6zm460.5 67c100.1 33.4 154.7 43 166.7 44.8A445.9 445.9 0 00960 512c0-247.4-200.6-448-448-448S64 264.6 64 512s200.6 448 448 448c155.9 0 293.2-79.7 373.5-200.5-75.6-29.8-213.6-85-286.8-120.1-69.9 85.7-160.1 137.8-253.7 137.8-158.4 0-212.1-138.1-137.2-229 16.3-19.8 44.2-38.7 87.3-49.4 67.5-16.5 175 10.3 275.7 43.4 18.1-33.3 33.4-69.9 44.7-108.9H305.1V402h160v-56.2H271.3v-31.3h193.8v-80.1s0-13.5 13.7-13.5H557v93.6h191.7v31.3H557.1V402h156.4c-15 61.1-37.7 117.4-66.2 166.8 47.5 17.1 90.1 33.3 121.8 43.9z" } }] }, "name": "alipay-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AlipayCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AlipayOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AlipayOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AlipayOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M789 610.3c-38.7-12.9-90.7-32.7-148.5-53.6 34.8-60.3 62.5-129 80.7-203.6H530.5v-68.6h233.6v-38.3H530.5V132h-95.4c-16.7 0-16.7 16.5-16.7 16.5v97.8H182.2v38.3h236.3v68.6H223.4v38.3h378.4a667.18 667.18 0 01-54.5 132.9c-122.8-40.4-253.8-73.2-336.1-53-52.6 13-86.5 36.1-106.5 60.3-91.4 111-25.9 279.6 167.2 279.6C386 811.2 496 747.6 581.2 643 708.3 704 960 808.7 960 808.7V659.4s-31.6-2.5-171-49.1zM253.9 746.6c-150.5 0-195-118.3-120.6-183.1 24.8-21.9 70.2-32.6 94.4-35 89.4-8.8 172.2 25.2 269.9 72.8-68.8 89.5-156.3 145.3-243.7 145.3z" } }] }, "name": "alipay", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AlipayOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AlipaySquareFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AlipaySquareFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AlipaySquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M308.6 545.7c-19.8 2-57.1 10.7-77.4 28.6-61 53-24.5 150 99 150 71.8 0 143.5-45.7 199.8-119-80.2-38.9-148.1-66.8-221.4-59.6zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm29.4 663.2S703 689.4 598.7 639.5C528.8 725.2 438.6 777.3 345 777.3c-158.4 0-212.1-138.1-137.2-229 16.3-19.8 44.2-38.7 87.3-49.4 67.5-16.5 175 10.3 275.7 43.4 18.1-33.3 33.4-69.9 44.7-108.9H305.1V402h160v-56.2H271.3v-31.3h193.8v-80.1s0-13.5 13.7-13.5H557v93.6h191.7v31.3H557.1V402h156.4c-15 61.1-37.7 117.4-66.2 166.8 47.5 17.1 90.1 33.3 121.8 43.9 114.3 38.2 140.2 40.2 140.2 40.2v122.3z" } }] }, "name": "alipay-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (AlipaySquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AliwangwangFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AliwangwangFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AliwangwangFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M868.2 377.4c-18.9-45.1-46.3-85.6-81.2-120.6a377.26 377.26 0 00-120.5-81.2A375.65 375.65 0 00519 145.8c-41.9 0-82.9 6.7-121.9 20C306 123.3 200.8 120 170.6 120c-2.2 0-7.4 0-9.4.2-11.9.4-22.8 6.5-29.2 16.4-6.5 9.9-7.7 22.4-3.4 33.5l64.3 161.6a378.59 378.59 0 00-52.8 193.2c0 51.4 10 101 29.8 147.6 18.9 45 46.2 85.6 81.2 120.5 34.7 34.8 75.4 62.1 120.5 81.2C418.3 894 467.9 904 519 904c51.3 0 100.9-10 147.7-29.8 44.9-18.9 85.5-46.3 120.4-81.2 34.7-34.8 62.1-75.4 81.2-120.6a376.5 376.5 0 0029.8-147.6c-.2-51.2-10.1-100.8-29.9-147.4zm-325.2 79c0 20.4-16.6 37.1-37.1 37.1-20.4 0-37.1-16.7-37.1-37.1v-55.1c0-20.4 16.6-37.1 37.1-37.1 20.4 0 37.1 16.6 37.1 37.1v55.1zm175.2 0c0 20.4-16.6 37.1-37.1 37.1S644 476.8 644 456.4v-55.1c0-20.4 16.7-37.1 37.1-37.1 20.4 0 37.1 16.6 37.1 37.1v55.1z" } }] }, "name": "aliwangwang", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (AliwangwangFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AliwangwangOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AliwangwangOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AliwangwangOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M868.2 377.4c-18.9-45.1-46.3-85.6-81.2-120.6a377.26 377.26 0 00-120.5-81.2A375.65 375.65 0 00519 145.8c-41.9 0-82.9 6.7-121.9 20C306 123.3 200.8 120 170.6 120c-2.2 0-7.4 0-9.4.2-11.9.4-22.8 6.5-29.2 16.4-6.5 9.9-7.7 22.4-3.4 33.5l64.3 161.6a378.59 378.59 0 00-52.8 193.2c0 51.4 10 101 29.8 147.6 18.9 45 46.2 85.6 81.2 120.5 34.7 34.8 75.4 62.1 120.5 81.2C418.3 894 467.9 904 519 904c51.3 0 100.9-10.1 147.7-29.8 44.9-18.9 85.5-46.3 120.4-81.2 34.7-34.8 62.1-75.4 81.2-120.6a376.5 376.5 0 0029.8-147.6c-.2-51.2-10.1-100.8-29.9-147.4zm-66.4 266.5a307.08 307.08 0 01-65.9 98c-28.4 28.5-61.3 50.7-97.7 65.9h-.1c-38 16-78.3 24.2-119.9 24.2a306.51 306.51 0 01-217.5-90.2c-28.4-28.5-50.6-61.4-65.8-97.8v-.1c-16-37.8-24.1-78.2-24.1-119.9 0-55.4 14.8-109.7 42.8-157l13.2-22.1-9.5-23.9L206 192c14.9.6 35.9 2.1 59.7 5.6 43.8 6.5 82.5 17.5 114.9 32.6l19 8.9 19.9-6.8c31.5-10.8 64.8-16.2 98.9-16.2a306.51 306.51 0 01217.5 90.2c28.4 28.5 50.6 61.4 65.8 97.8l.1.1.1.1c16 37.6 24.1 78 24.2 119.8-.1 41.7-8.3 82-24.3 119.8zM681.1 364.2c-20.4 0-37.1 16.7-37.1 37.1v55.1c0 20.4 16.6 37.1 37.1 37.1s37.1-16.7 37.1-37.1v-55.1c0-20.5-16.7-37.1-37.1-37.1zm-175.2 0c-20.5 0-37.1 16.7-37.1 37.1v55.1c0 20.4 16.7 37.1 37.1 37.1 20.5 0 37.1-16.7 37.1-37.1v-55.1c0-20.5-16.7-37.1-37.1-37.1z" } }] }, "name": "aliwangwang", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AliwangwangOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AliyunOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AliyunOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AliyunOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M959.2 383.9c-.3-82.1-66.9-148.6-149.1-148.6H575.9l21.6 85.2 201 43.7a42.58 42.58 0 0132.9 39.7c.1.5.1 216.1 0 216.6a42.58 42.58 0 01-32.9 39.7l-201 43.7-21.6 85.3h234.2c82.1 0 148.8-66.5 149.1-148.6V383.9zM225.5 660.4a42.58 42.58 0 01-32.9-39.7c-.1-.6-.1-216.1 0-216.6.8-19.4 14.6-35.5 32.9-39.7l201-43.7 21.6-85.2H213.8c-82.1 0-148.8 66.4-149.1 148.6V641c.3 82.1 67 148.6 149.1 148.6H448l-21.6-85.3-200.9-43.9zm200.9-158.8h171v21.3h-171z" } }] }, "name": "aliyun", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AliyunOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AmazonCircleFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AmazonCircleFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AmazonCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M485 467.5c-11.6 4.9-20.9 12.2-27.8 22-6.9 9.8-10.4 21.6-10.4 35.5 0 17.8 7.5 31.5 22.4 41.2 14.1 9.1 28.9 11.4 44.4 6.8 17.9-5.2 30-17.9 36.4-38.1 3-9.3 4.5-19.7 4.5-31.3v-50.2c-12.6.4-24.4 1.6-35.5 3.7-11.1 2.1-22.4 5.6-34 10.4zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm35.8 262.7c-7.2-10.9-20.1-16.4-38.7-16.4-1.3 0-3 .1-5.3.3-2.2.2-6.6 1.5-12.9 3.7a79.4 79.4 0 00-17.9 9.1c-5.5 3.8-11.5 10-18 18.4-6.4 8.5-11.5 18.4-15.3 29.8l-94-8.4c0-12.4 2.4-24.7 7-36.9 4.7-12.2 11.8-23.9 21.4-35 9.6-11.2 21.1-21 34.5-29.4 13.4-8.5 29.6-15.2 48.4-20.3 18.9-5.1 39.1-7.6 60.9-7.6 21.3 0 40.6 2.6 57.8 7.7 17.2 5.2 31.1 11.5 41.4 19.1a117 117 0 0125.9 25.7c6.9 9.6 11.7 18.5 14.4 26.7 2.7 8.2 4 15.7 4 22.8v182.5c0 6.4 1.4 13 4.3 19.8 2.9 6.8 6.3 12.8 10.2 18 3.9 5.2 7.9 9.9 12 14.3 4.1 4.3 7.6 7.7 10.6 9.9l4.1 3.4-72.5 69.4c-8.5-7.7-16.9-15.4-25.2-23.4-8.3-8-14.5-14-18.5-18.1l-6.1-6.2c-2.4-2.3-5-5.7-8-10.2-8.1 12.2-18.5 22.8-31.1 31.8-12.7 9-26.3 15.6-40.7 19.7-14.5 4.1-29.4 6.5-44.7 7.1-15.3.6-30-1.5-43.9-6.5-13.9-5-26.5-11.7-37.6-20.3-11.1-8.6-19.9-20.2-26.5-35-6.6-14.8-9.9-31.5-9.9-50.4 0-17.4 3-33.3 8.9-47.7 6-14.5 13.6-26.5 23-36.1 9.4-9.6 20.7-18.2 34-25.7s26.4-13.4 39.2-17.7c12.8-4.2 26.6-7.8 41.5-10.7 14.9-2.9 27.6-4.8 38.2-5.7 10.6-.9 21.2-1.6 31.8-2v-39.4c0-13.5-2.3-23.5-6.7-30.1zm180.5 379.6c-2.8 3.3-7.5 7.8-14.1 13.5s-16.8 12.7-30.5 21.1c-13.7 8.4-28.8 16-45 22.9-16.3 6.9-36.3 12.9-60.1 18-23.7 5.1-48.2 7.6-73.3 7.6-25.4 0-50.7-3.2-76.1-9.6-25.4-6.4-47.6-14.3-66.8-23.7-19.1-9.4-37.6-20.2-55.1-32.2-17.6-12.1-31.7-22.9-42.4-32.5-10.6-9.6-19.6-18.7-26.8-27.1-1.7-1.9-2.8-3.6-3.2-5.1-.4-1.5-.3-2.8.3-3.7.6-.9 1.5-1.6 2.6-2.2a7.42 7.42 0 017.4.8c40.9 24.2 72.9 41.3 95.9 51.4 82.9 36.4 168 45.7 255.3 27.9 40.5-8.3 82.1-22.2 124.9-41.8 3.2-1.2 6-1.5 8.3-.9 2.3.6 3.5 2.4 3.5 5.4 0 2.8-1.6 6.3-4.8 10.2zm59.9-29c-1.8 11.1-4.9 21.6-9.1 31.8-7.2 17.1-16.3 30-27.1 38.4-3.6 2.9-6.4 3.8-8.3 2.8-1.9-1-1.9-3.5 0-7.4 4.5-9.3 9.2-21.8 14.2-37.7 5-15.8 5.7-26 2.1-30.5-1.1-1.5-2.7-2.6-5-3.6-2.2-.9-5.1-1.5-8.6-1.9s-6.7-.6-9.4-.8c-2.8-.2-6.5-.2-11.2 0-4.7.2-8 .4-10.1.6a874.4 874.4 0 01-17.1 1.5c-1.3.2-2.7.4-4.1.5-1.5.1-2.7.2-3.5.3l-2.7.3c-1 .1-1.7.2-2.2.2h-3.2l-1-.2-.6-.5-.5-.9c-1.3-3.3 3.7-7.4 15-12.4s22.3-8.1 32.9-9.3c9.8-1.5 21.3-1.5 34.5-.3s21.3 3.7 24.3 7.4c2.3 3.5 2.5 10.7.7 21.7z" } }] }, "name": "amazon-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (AmazonCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AmazonOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AmazonOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AmazonOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M825 768.9c-3.3-.9-7.3-.4-11.9 1.3-61.6 28.2-121.5 48.3-179.7 60.2C507.7 856 385.2 842.6 266 790.3c-33.1-14.6-79.1-39.2-138-74a9.36 9.36 0 00-5.3-2c-2-.1-3.7.1-5.3.9-1.6.8-2.8 1.8-3.7 3.1-.9 1.3-1.1 3.1-.4 5.4.6 2.2 2.1 4.7 4.6 7.4 10.4 12.2 23.3 25.2 38.6 39s35.6 29.4 60.9 46.8c25.3 17.4 51.8 32.9 79.3 46.4 27.6 13.5 59.6 24.9 96.1 34.1s73 13.8 109.4 13.8c36.2 0 71.4-3.7 105.5-10.9 34.2-7.3 63-15.9 86.5-25.9 23.4-9.9 45-21 64.8-33 19.8-12 34.4-22.2 43.9-30.3 9.5-8.2 16.3-14.6 20.2-19.4 4.6-5.7 6.9-10.6 6.9-14.9.1-4.5-1.7-7.1-5-7.9zM527.4 348.1c-15.2 1.3-33.5 4.1-55 8.3-21.5 4.1-41.4 9.3-59.8 15.4s-37.2 14.6-56.3 25.4c-19.2 10.8-35.5 23.2-49 37s-24.5 31.1-33.1 52c-8.6 20.8-12.9 43.7-12.9 68.7 0 27.1 4.7 51.2 14.3 72.5 9.5 21.3 22.2 38 38.2 50.4 15.9 12.4 34 22.1 54 29.2 20 7.1 41.2 10.3 63.2 9.4 22-.9 43.5-4.3 64.4-10.3 20.8-5.9 40.4-15.4 58.6-28.3 18.2-12.9 33.1-28.2 44.8-45.7 4.3 6.6 8.1 11.5 11.5 14.7l8.7 8.9c5.8 5.9 14.7 14.6 26.7 26.1 11.9 11.5 24.1 22.7 36.3 33.7l104.4-99.9-6-4.9c-4.3-3.3-9.4-8-15.2-14.3-5.8-6.2-11.6-13.1-17.2-20.5-5.7-7.4-10.6-16.1-14.7-25.9-4.1-9.8-6.2-19.3-6.2-28.5V258.7c0-10.1-1.9-21-5.7-32.8-3.9-11.7-10.7-24.5-20.7-38.3-10-13.8-22.4-26.2-37.2-37-14.9-10.8-34.7-20-59.6-27.4-24.8-7.4-52.6-11.1-83.2-11.1-31.3 0-60.4 3.7-87.6 10.9-27.1 7.3-50.3 17-69.7 29.2-19.3 12.2-35.9 26.3-49.7 42.4-13.8 16.1-24.1 32.9-30.8 50.4-6.7 17.5-10.1 35.2-10.1 53.1L408 310c5.5-16.4 12.9-30.6 22-42.8 9.2-12.2 17.9-21 25.8-26.5 8-5.5 16.6-9.9 25.7-13.2 9.2-3.3 15.4-5 18.6-5.4 3.2-.3 5.7-.4 7.6-.4 26.7 0 45.2 7.9 55.6 23.6 6.5 9.5 9.7 23.9 9.7 43.3v56.6c-15.2.6-30.4 1.6-45.6 2.9zM573.1 500c0 16.6-2.2 31.7-6.5 45-9.2 29.1-26.7 47.4-52.4 54.8-22.4 6.6-43.7 3.3-63.9-9.8-21.5-14-32.2-33.8-32.2-59.3 0-19.9 5-36.9 15-51.1 10-14.1 23.3-24.7 40-31.7s33-12 49-14.9c15.9-3 33-4.8 51-5.4V500zm335.2 218.9c-4.3-5.4-15.9-8.9-34.9-10.7-19-1.8-35.5-1.7-49.7.4-15.3 1.8-31.1 6.2-47.3 13.4-16.3 7.1-23.4 13.1-21.6 17.8l.7 1.3.9.7 1.4.2h4.6c.8 0 1.8-.1 3.2-.2 1.4-.1 2.7-.3 3.9-.4 1.2-.1 2.9-.3 5.1-.4 2.1-.1 4.1-.4 6-.7.3 0 3.7-.3 10.3-.9 6.6-.6 11.4-1 14.3-1.3 2.9-.3 7.8-.6 14.5-.9 6.7-.3 12.1-.3 16.1 0 4 .3 8.5.7 13.6 1.1 5.1.4 9.2 1.3 12.4 2.7 3.2 1.3 5.6 3 7.1 5.1 5.2 6.6 4.2 21.2-3 43.9s-14 40.8-20.4 54.2c-2.8 5.7-2.8 9.2 0 10.7s6.7.1 11.9-4c15.6-12.2 28.6-30.6 39.1-55.3 6.1-14.6 10.5-29.8 13.1-45.7 2.4-15.9 2-26.2-1.3-31z" } }] }, "name": "amazon", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AmazonOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AmazonSquareFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AmazonSquareFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AmazonSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM547.8 326.7c-7.2-10.9-20.1-16.4-38.7-16.4-1.3 0-3 .1-5.3.3-2.2.2-6.6 1.5-12.9 3.7a79.4 79.4 0 00-17.9 9.1c-5.5 3.8-11.5 10-18 18.4-6.4 8.5-11.5 18.4-15.3 29.8l-94-8.4c0-12.4 2.4-24.7 7-36.9s11.8-23.9 21.4-35c9.6-11.2 21.1-21 34.5-29.4 13.4-8.5 29.6-15.2 48.4-20.3 18.9-5.1 39.1-7.6 60.9-7.6 21.3 0 40.6 2.6 57.8 7.7 17.2 5.2 31.1 11.5 41.4 19.1a117 117 0 0125.9 25.7c6.9 9.6 11.7 18.5 14.4 26.7 2.7 8.2 4 15.7 4 22.8v182.5c0 6.4 1.4 13 4.3 19.8 2.9 6.8 6.3 12.8 10.2 18 3.9 5.2 7.9 9.9 12 14.3 4.1 4.3 7.6 7.7 10.6 9.9l4.1 3.4-72.5 69.4c-8.5-7.7-16.9-15.4-25.2-23.4-8.3-8-14.5-14-18.5-18.1l-6.1-6.2c-2.4-2.3-5-5.7-8-10.2-8.1 12.2-18.5 22.8-31.1 31.8-12.7 9-26.3 15.6-40.7 19.7-14.5 4.1-29.4 6.5-44.7 7.1-15.3.6-30-1.5-43.9-6.5-13.9-5-26.5-11.7-37.6-20.3-11.1-8.6-19.9-20.2-26.5-35-6.6-14.8-9.9-31.5-9.9-50.4 0-17.4 3-33.3 8.9-47.7 6-14.5 13.6-26.5 23-36.1 9.4-9.6 20.7-18.2 34-25.7s26.4-13.4 39.2-17.7c12.8-4.2 26.6-7.8 41.5-10.7 14.9-2.9 27.6-4.8 38.2-5.7 10.6-.9 21.2-1.6 31.8-2v-39.4c0-13.5-2.3-23.5-6.7-30.1zm180.5 379.6c-2.8 3.3-7.5 7.8-14.1 13.5s-16.8 12.7-30.5 21.1c-13.7 8.4-28.8 16-45 22.9-16.3 6.9-36.3 12.9-60.1 18-23.7 5.1-48.2 7.6-73.3 7.6-25.4 0-50.7-3.2-76.1-9.6-25.4-6.4-47.6-14.3-66.8-23.7-19.1-9.4-37.6-20.2-55.1-32.2-17.6-12.1-31.7-22.9-42.4-32.5-10.6-9.6-19.6-18.7-26.8-27.1-1.7-1.9-2.8-3.6-3.2-5.1-.4-1.5-.3-2.8.3-3.7.6-.9 1.5-1.6 2.6-2.2a7.42 7.42 0 017.4.8c40.9 24.2 72.9 41.3 95.9 51.4 82.9 36.4 168 45.7 255.3 27.9 40.5-8.3 82.1-22.2 124.9-41.8 3.2-1.2 6-1.5 8.3-.9 2.3.6 3.5 2.4 3.5 5.4 0 2.8-1.6 6.3-4.8 10.2zm59.9-29c-1.8 11.1-4.9 21.6-9.1 31.8-7.2 17.1-16.3 30-27.1 38.4-3.6 2.9-6.4 3.8-8.3 2.8-1.9-1-1.9-3.5 0-7.4 4.5-9.3 9.2-21.8 14.2-37.7 5-15.8 5.7-26 2.1-30.5-1.1-1.5-2.7-2.6-5-3.6-2.2-.9-5.1-1.5-8.6-1.9s-6.7-.6-9.4-.8c-2.8-.2-6.5-.2-11.2 0-4.7.2-8 .4-10.1.6a874.4 874.4 0 01-17.1 1.5c-1.3.2-2.7.4-4.1.5-1.5.1-2.7.2-3.5.3l-2.7.3c-1 .1-1.7.2-2.2.2h-3.2l-1-.2-.6-.5-.5-.9c-1.3-3.3 3.7-7.4 15-12.4s22.3-8.1 32.9-9.3c9.8-1.5 21.3-1.5 34.5-.3s21.3 3.7 24.3 7.4c2.3 3.5 2.5 10.7.7 21.7zM485 467.5c-11.6 4.9-20.9 12.2-27.8 22-6.9 9.8-10.4 21.6-10.4 35.5 0 17.8 7.5 31.5 22.4 41.2 14.1 9.1 28.9 11.4 44.4 6.8 17.9-5.2 30-17.9 36.4-38.1 3-9.3 4.5-19.7 4.5-31.3v-50.2c-12.6.4-24.4 1.6-35.5 3.7-11.1 2.1-22.4 5.6-34 10.4z" } }] }, "name": "amazon-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (AmazonSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AndroidFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AndroidFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AndroidFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M270.1 741.7c0 23.4 19.1 42.5 42.6 42.5h48.7v120.4c0 30.5 24.5 55.4 54.6 55.4 30.2 0 54.6-24.8 54.6-55.4V784.1h85v120.4c0 30.5 24.5 55.4 54.6 55.4 30.2 0 54.6-24.8 54.6-55.4V784.1h48.7c23.5 0 42.6-19.1 42.6-42.5V346.4h-486v395.3zm357.1-600.1l44.9-65c2.6-3.8 2-8.9-1.5-11.4-3.5-2.4-8.5-1.2-11.1 2.6l-46.6 67.6c-30.7-12.1-64.9-18.8-100.8-18.8-35.9 0-70.1 6.7-100.8 18.8l-46.6-67.5c-2.6-3.8-7.6-5.1-11.1-2.6-3.5 2.4-4.1 7.4-1.5 11.4l44.9 65c-71.4 33.2-121.4 96.1-127.8 169.6h486c-6.6-73.6-56.7-136.5-128-169.7zM409.5 244.1a26.9 26.9 0 1126.9-26.9 26.97 26.97 0 01-26.9 26.9zm208.4 0a26.9 26.9 0 1126.9-26.9 26.97 26.97 0 01-26.9 26.9zm223.4 100.7c-30.2 0-54.6 24.8-54.6 55.4v216.4c0 30.5 24.5 55.4 54.6 55.4 30.2 0 54.6-24.8 54.6-55.4V400.1c.1-30.6-24.3-55.3-54.6-55.3zm-658.6 0c-30.2 0-54.6 24.8-54.6 55.4v216.4c0 30.5 24.5 55.4 54.6 55.4 30.2 0 54.6-24.8 54.6-55.4V400.1c0-30.6-24.5-55.3-54.6-55.3z" } }] }, "name": "android", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (AndroidFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AndroidOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AndroidOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AndroidOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M448.3 225.2c-18.6 0-32 13.4-32 31.9s13.5 31.9 32 31.9c18.6 0 32-13.4 32-31.9.1-18.4-13.4-31.9-32-31.9zm393.9 96.4c-13.8-13.8-32.7-21.5-53.2-21.5-3.9 0-7.4.4-10.7 1v-1h-3.6c-5.5-30.6-18.6-60.5-38.1-87.4-18.7-25.7-43-47.9-70.8-64.9l25.1-35.8v-3.3c0-.8.4-2.3.7-3.8.6-2.4 1.4-5.5 1.4-8.9 0-18.5-13.5-31.9-32-31.9-9.8 0-19.5 5.7-25.9 15.4l-29.3 42.1c-30-9.8-62.4-15-93.8-15-31.3 0-63.7 5.2-93.8 15L389 79.4c-6.6-9.6-16.1-15.4-26-15.4-18.6 0-32 13.4-32 31.9 0 6.2 2.5 12.8 6.7 17.4l22.6 32.3c-28.7 17-53.5 39.4-72.2 65.1-19.4 26.9-32 56.8-36.7 87.4h-5.5v1c-3.2-.6-6.7-1-10.7-1-20.3 0-39.2 7.5-53.1 21.3-13.8 13.8-21.5 32.6-21.5 53v235c0 20.3 7.5 39.1 21.4 52.9 13.8 13.8 32.8 21.5 53.2 21.5 3.9 0 7.4-.4 10.7-1v93.5c0 29.2 23.9 53.1 53.2 53.1H331v58.3c0 20.3 7.5 39.1 21.4 52.9 13.8 13.8 32.8 21.5 53.2 21.5 20.3 0 39.2-7.5 53.1-21.3 13.8-13.8 21.5-32.6 21.5-53v-58.2H544v58.1c0 20.3 7.5 39.1 21.4 52.9 13.8 13.8 32.8 21.5 53.2 21.5 20.4 0 39.2-7.5 53.1-21.6 13.8-13.8 21.5-32.6 21.5-53v-58.2h31.9c29.3 0 53.2-23.8 53.2-53.1v-91.4c3.2.6 6.7 1 10.7 1 20.3 0 39.2-7.5 53.1-21.3 13.8-13.8 21.5-32.6 21.5-53v-235c-.1-20.3-7.6-39-21.4-52.9zM246 609.6c0 6.8-3.9 10.6-10.7 10.6-6.8 0-10.7-3.8-10.7-10.6V374.5c0-6.8 3.9-10.6 10.7-10.6 6.8 0 10.7 3.8 10.7 10.6v235.1zm131.1-396.8c37.5-27.3 85.3-42.3 135-42.3s97.5 15.1 135 42.5c32.4 23.7 54.2 54.2 62.7 87.5H314.4c8.5-33.4 30.5-64 62.7-87.7zm39.3 674.7c-.6 5.6-4.4 8.7-10.5 8.7-6.8 0-10.7-3.8-10.7-10.6v-58.2h21.2v60.1zm202.3 8.7c-6.8 0-10.7-3.8-10.7-10.6v-58.2h21.2v60.1c-.6 5.6-4.3 8.7-10.5 8.7zm95.8-132.6H309.9V364h404.6v399.6zm85.2-154c0 6.8-3.9 10.6-10.7 10.6-6.8 0-10.7-3.8-10.7-10.6V374.5c0-6.8 3.9-10.6 10.7-10.6 6.8 0 10.7 3.8 10.7 10.6v235.1zM576.1 225.2c-18.6 0-32 13.4-32 31.9s13.5 31.9 32 31.9c18.6 0 32.1-13.4 32.1-32-.1-18.6-13.4-31.8-32.1-31.8z" } }] }, "name": "android", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AndroidOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AntCloudOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AntCloudOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AntCloudOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M378.9 738c-3.1 0-6.1-.5-8.8-1.5l4.4 30.7h26.3l-15.5-29.9c-2.1.5-4.2.7-6.4.7zm421-291.2c-12.6 0-24.8 1.5-36.5 4.2-21.4-38.4-62.3-64.3-109.3-64.3-6.9 0-13.6.6-20.2 1.6-35.4-77.4-113.4-131.1-203.9-131.1-112.3 0-205.3 82.6-221.6 190.4C127.3 455.5 64 523.8 64 607c0 88.4 71.6 160.1 160 160.2h50l13.2-27.6c-26.2-8.3-43.3-29-39.1-48.8 4.6-21.6 32.8-33.9 63.1-27.5 22.9 4.9 40.4 19.1 45.5 35.1a26.1 26.1 0 0122.1-12.4h.2c-.8-3.2-1.2-6.5-1.2-9.9 0-20.1 14.8-36.7 34.1-39.6v-25.4c0-4.4 3.6-8 8-8s8 3.6 8 8v26.3c4.6 1.2 8.8 3.2 12.6 5.8l19.5-21.4c3-3.3 8-3.5 11.3-.5 3.3 3 3.5 8 .5 11.3l-20 22-.2.2a40 40 0 01-46.9 59.2c-.4 5.6-2.6 10.7-6 14.8l20 38.4H804v-.1c86.5-2.2 156-73 156-160.1 0-88.5-71.7-160.2-160.1-160.2zM338.2 737.2l-4.3 30h24.4l-5.9-41.5c-3.5 4.6-8.3 8.5-14.2 11.5zM797.5 305a48 48 0 1096 0 48 48 0 10-96 0zm-65.7 61.3a24 24 0 1048 0 24 24 0 10-48 0zM303.4 742.9l-11.6 24.3h26l3.5-24.7c-5.7.8-11.7 1-17.9.4z" } }] }, "name": "ant-cloud", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AntCloudOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AntDesignOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AntDesignOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AntDesignOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M716.3 313.8c19-18.9 19-49.7 0-68.6l-69.9-69.9.1.1c-18.5-18.5-50.3-50.3-95.3-95.2-21.2-20.7-55.5-20.5-76.5.5L80.9 474.2a53.84 53.84 0 000 76.4L474.6 944a54.14 54.14 0 0076.5 0l165.1-165c19-18.9 19-49.7 0-68.6a48.7 48.7 0 00-68.7 0l-125 125.2c-5.2 5.2-13.3 5.2-18.5 0L189.5 521.4c-5.2-5.2-5.2-13.3 0-18.5l314.4-314.2c.4-.4.9-.7 1.3-1.1 5.2-4.1 12.4-3.7 17.2 1.1l125.2 125.1c19 19 49.8 19 68.7 0zM408.6 514.4a106.3 106.2 0 10212.6 0 106.3 106.2 0 10-212.6 0zm536.2-38.6L821.9 353.5c-19-18.9-49.8-18.9-68.7.1a48.4 48.4 0 000 68.6l83 82.9c5.2 5.2 5.2 13.3 0 18.5l-81.8 81.7a48.4 48.4 0 000 68.6 48.7 48.7 0 0068.7 0l121.8-121.7a53.93 53.93 0 00-.1-76.4z" } }] }, "name": "ant-design", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AntDesignOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ApartmentOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ApartmentOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ApartmentOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z" } }] }, "name": "apartment", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ApartmentOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ApiFilled.js": /*!****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ApiFilled.js ***! \****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ApiFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM578.9 546.7a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 68.9-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2z" } }] }, "name": "api", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (ApiFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ApiOutlined.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ApiOutlined.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ApiOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z" } }] }, "name": "api", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ApiOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ApiTwoTone.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ApiTwoTone.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ApiTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M148.2 674.6zm106.7-92.3c-25 25-38.7 58.1-38.7 93.4s13.8 68.5 38.7 93.4c25 25 58.1 38.7 93.4 38.7 35.3 0 68.5-13.8 93.4-38.7l59.4-59.4-186.8-186.8-59.4 59.4zm420.8-366.1c-35.3 0-68.5 13.8-93.4 38.7l-59.4 59.4 186.8 186.8 59.4-59.4c24.9-25 38.7-58.1 38.7-93.4s-13.8-68.5-38.7-93.4c-25-25-58.1-38.7-93.4-38.7z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M578.9 546.7a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2a199.45 199.45 0 00-58.6 140.4c-.2 39.5 11.2 79.1 34.3 113.1l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7-24.9-24.9-38.7-58.1-38.7-93.4s13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4zm476-620.3l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7s68.4 13.7 93.4 38.7c24.9 24.9 38.7 58.1 38.7 93.4s-13.8 68.4-38.7 93.4z", "fill": primaryColor } }] }; }, "name": "api", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (ApiTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AppleFilled.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AppleFilled.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AppleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z" } }] }, "name": "apple", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (AppleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AppleOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AppleOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AppleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-10.6 267c-14.3 19.9-28.7 35.6-41.9 45.7-10.5 8-18.6 11.4-24 11.6-9-.1-17.7-2.3-34.7-8.8-1.2-.5-2.5-1-4.2-1.6l-4.4-1.7c-17.4-6.7-27.8-10.3-41.1-13.8-18.6-4.8-37.1-7.4-56.9-7.4-20.2 0-39.2 2.5-58.1 7.2-13.9 3.5-25.6 7.4-42.7 13.8-.7.3-8.1 3.1-10.2 3.9-3.5 1.3-6.2 2.3-8.7 3.2-10.4 3.6-17 5.1-22.9 5.2-.7 0-1.3-.1-1.8-.2-1.1-.2-2.5-.6-4.1-1.3-4.5-1.8-9.9-5.1-16-9.8-14-10.9-29.4-28-45.1-49.9-27.5-38.6-53.5-89.8-66-125.7-15.4-44.8-23-87.7-23-128.6 0-60.2 17.8-106 48.4-137.1 26.3-26.6 61.7-41.5 97.8-42.3 5.9.1 14.5 1.5 25.4 4.5 8.6 2.3 18 5.4 30.7 9.9 3.8 1.4 16.9 6.1 18.5 6.7 7.7 2.8 13.5 4.8 19.2 6.6 18.2 5.8 32.3 9 47.6 9 15.5 0 28.8-3.3 47.7-9.8 7.1-2.4 32.9-12 37.5-13.6 25.6-9.1 44.5-14 60.8-15.2 4.8-.4 9.1-.4 13.2-.1 22.7 1.8 42.1 6.3 58.6 13.8-37.6 43.4-57 96.5-56.9 158.4-.3 14.7.9 31.7 5.1 51.8 6.4 30.5 18.6 60.7 37.9 89 14.7 21.5 32.9 40.9 54.7 57.8-11.5 23.7-25.6 48.2-40.4 68.8zm-94.5-572c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z" } }] }, "name": "apple", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AppleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AppstoreAddOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AppstoreAddOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AppstoreAddOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" } }] }, "name": "appstore-add", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AppstoreAddOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AppstoreFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AppstoreFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AppstoreFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M864 144H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm0 400H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zM464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm0 400H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16z" } }] }, "name": "appstore", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (AppstoreFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AppstoreOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AppstoreOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AppstoreOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z" } }] }, "name": "appstore", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AppstoreOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AppstoreTwoTone.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AppstoreTwoTone.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AppstoreTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M864 144H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm52-668H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M212 212h200v200H212zm400 0h200v200H612zM212 612h200v200H212zm400 0h200v200H612z", "fill": secondaryColor } }] }; }, "name": "appstore", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (AppstoreTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AreaChartOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AreaChartOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AreaChartOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-616-64h536c4.4 0 8-3.6 8-8V284c0-7.2-8.7-10.7-13.7-5.7L592 488.6l-125.4-124a8.03 8.03 0 00-11.3 0l-189 189.6a7.87 7.87 0 00-2.3 5.6V720c0 4.4 3.6 8 8 8z" } }] }, "name": "area-chart", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AreaChartOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ArrowDownOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ArrowDownOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ArrowDownOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z" } }] }, "name": "arrow-down", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ArrowDownOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ArrowLeftOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ArrowLeftOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ArrowLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, "name": "arrow-left", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ArrowLeftOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ArrowRightOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ArrowRightOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ArrowRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z" } }] }, "name": "arrow-right", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ArrowRightOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ArrowUpOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ArrowUpOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ArrowUpOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z" } }] }, "name": "arrow-up", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ArrowUpOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ArrowsAltOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ArrowsAltOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ArrowsAltOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L863.9 169a7.9 7.9 0 00-8.9-8.9zM416.6 562.3a8.03 8.03 0 00-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z" } }] }, "name": "arrows-alt", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ArrowsAltOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AudioFilled.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AudioFilled.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AudioFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm330-170c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1z" } }] }, "name": "audio", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (AudioFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AudioMutedOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AudioMutedOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AudioMutedOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M682 455V311l-76 76v68c-.1 50.7-42 92.1-94 92a95.8 95.8 0 01-52-15l-54 55c29.1 22.4 65.9 36 106 36 93.8 0 170-75.1 170-168z" } }, { "tag": "path", "attrs": { "d": "M833 446h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254-63 0-120.7-23-165-61l-54 54a334.01 334.01 0 00179 81v102H326c-13.9 0-24.9 14.3-25 32v36c.1 4.4 2.9 8 6 8h408c3.2 0 6-3.6 6-8v-36c0-17.7-11-32-25-32H547V782c165.3-17.9 294-157.9 294-328 0-4.4-3.6-8-8-8zm13.1-377.7l-43.5-41.9a8 8 0 00-11.2.1l-129 129C634.3 101.2 577 64 511 64c-93.9 0-170 75.3-170 168v224c0 6.7.4 13.3 1.2 19.8l-68 68A252.33 252.33 0 01258 454c-.2-4.4-3.8-8-8-8h-60c-4.4 0-8 3.6-8 8 0 53 12.5 103 34.6 147.4l-137 137a8.03 8.03 0 000 11.3l42.7 42.7c3.1 3.1 8.2 3.1 11.3 0L846.2 79.8l.1-.1c3.1-3.2 3-8.3-.2-11.4zM417 401V232c0-50.6 41.9-92 94-92 46 0 84.1 32.3 92.3 74.7L417 401z" } }] }, "name": "audio-muted", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AudioMutedOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AudioOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AudioOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AudioOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z" } }] }, "name": "audio", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AudioOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AudioTwoTone.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AudioTwoTone.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AudioTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 552c54.3 0 98-43.2 98-96V232c0-52.8-43.7-96-98-96s-98 43.2-98 96v224c0 52.8 43.7 96 98 96z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-98-392c0-52.8 43.7-96 98-96s98 43.2 98 96v224c0 52.8-43.7 96-98 96s-98-43.2-98-96V232z", "fill": primaryColor } }] }; }, "name": "audio", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (AudioTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/AuditOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/AuditOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var AuditOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M296 250c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm184 144H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 458H208V148h560v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm440-88H728v-36.6c46.3-13.8 80-56.6 80-107.4 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 50.7 33.7 93.6 80 107.4V764H520c-8.8 0-16 7.2-16 16v152c0 8.8 7.2 16 16 16h352c8.8 0 16-7.2 16-16V780c0-8.8-7.2-16-16-16zM646 620c0-27.6 22.4-50 50-50s50 22.4 50 50-22.4 50-50 50-50-22.4-50-50zm180 266H566v-60h260v60z" } }] }, "name": "audit", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (AuditOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BackwardFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BackwardFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BackwardFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M485.6 249.9L198.2 498c-8.3 7.1-8.3 20.8 0 27.9l287.4 248.2c10.7 9.2 26.4.9 26.4-14V263.8c0-14.8-15.7-23.2-26.4-13.9zm320 0L518.2 498a18.6 18.6 0 00-6.2 14c0 5.2 2.1 10.4 6.2 14l287.4 248.2c10.7 9.2 26.4.9 26.4-14V263.8c0-14.8-15.7-23.2-26.4-13.9z" } }] }, "name": "backward", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (BackwardFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BackwardOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BackwardOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BackwardOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M485.6 249.9L198.2 498c-8.3 7.1-8.3 20.8 0 27.9l287.4 248.2c10.7 9.2 26.4.9 26.4-14V263.8c0-14.8-15.7-23.2-26.4-13.9zm320 0L518.2 498a18.6 18.6 0 00-6.2 14c0 5.2 2.1 10.4 6.2 14l287.4 248.2c10.7 9.2 26.4.9 26.4-14V263.8c0-14.8-15.7-23.2-26.4-13.9z" } }] }, "name": "backward", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BackwardOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BankFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BankFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BankFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM381 836H264V462h117v374zm189 0H453V462h117v374zm190 0H642V462h118v374z" } }] }, "name": "bank", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (BankFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BankOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BankOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BankOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z" } }] }, "name": "bank", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BankOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BankTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BankTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BankTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M240.9 393.9h542.2L512 196.7z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM381 836H264V462h117v374zm189 0H453V462h117v374zm190 0H642V462h118v374zM240.9 393.9L512 196.7l271.1 197.2H240.9z", "fill": primaryColor } }] }; }, "name": "bank", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (BankTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BarChartOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BarChartOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BarChartOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z" } }] }, "name": "bar-chart", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BarChartOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BarcodeOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BarcodeOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BarcodeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M120 160H72c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V168c0-4.4-3.6-8-8-8zm833 0h-48c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V168c0-4.4-3.6-8-8-8zM200 736h112c4.4 0 8-3.6 8-8V168c0-4.4-3.6-8-8-8H200c-4.4 0-8 3.6-8 8v560c0 4.4 3.6 8 8 8zm321 0h48c4.4 0 8-3.6 8-8V168c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v560c0 4.4 3.6 8 8 8zm126 0h178c4.4 0 8-3.6 8-8V168c0-4.4-3.6-8-8-8H647c-4.4 0-8 3.6-8 8v560c0 4.4 3.6 8 8 8zm-255 0h48c4.4 0 8-3.6 8-8V168c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v560c0 4.4 3.6 8 8 8zm-79 64H201c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h112c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm257 0h-48c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm256 0H648c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h178c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-385 0h-48c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" } }] }, "name": "barcode", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BarcodeOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BarsOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BarsOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BarsOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, "name": "bars", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BarsOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BehanceCircleFilled.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BehanceCircleFilled.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BehanceCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M420.3 470.3c8.7-6.3 12.9-16.7 12.9-31 .3-6.8-1.1-13.5-4.1-19.6-2.7-4.9-6.7-9-11.6-11.9a44.8 44.8 0 00-16.6-6c-6.4-1.2-12.9-1.8-19.3-1.7h-70.3v79.7h76.1c13.1.1 24.2-3.1 32.9-9.5zm11.8 72c-9.8-7.5-22.9-11.2-39.2-11.2h-81.8v94h80.2c7.5 0 14.4-.7 21.1-2.1a50.5 50.5 0 0017.8-7.2c5.1-3.3 9.2-7.8 12.3-13.6 3-5.8 4.5-13.2 4.5-22.1 0-17.7-5-30.2-14.9-37.8zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm86.5 286.9h138.4v33.7H598.5v-33.7zM512 628.8a89.52 89.52 0 01-27 31c-11.8 8.2-24.9 14.2-38.8 17.7a167.4 167.4 0 01-44.6 5.7H236V342.1h161c16.3 0 31.1 1.5 44.6 4.3 13.4 2.8 24.8 7.6 34.4 14.1 9.5 6.5 17 15.2 22.3 26 5.2 10.7 7.9 24.1 7.9 40 0 17.2-3.9 31.4-11.7 42.9-7.9 11.5-19.3 20.8-34.8 28.1 21.1 6 36.6 16.7 46.8 31.7 10.4 15.2 15.5 33.4 15.5 54.8 0 17.4-3.3 32.3-10 44.8zM790.8 576H612.4c0 19.4 6.7 38 16.8 48 10.2 9.9 24.8 14.9 43.9 14.9 13.8 0 25.5-3.5 35.5-10.4 9.9-6.9 15.9-14.2 18.1-21.8h59.8c-9.6 29.7-24.2 50.9-44 63.7-19.6 12.8-43.6 19.2-71.5 19.2-19.5 0-37-3.2-52.7-9.3-15.1-5.9-28.7-14.9-39.9-26.5a121.2 121.2 0 01-25.1-41.2c-6.1-16.9-9.1-34.7-8.9-52.6 0-18.5 3.1-35.7 9.1-51.7 11.5-31.1 35.4-56 65.9-68.9 16.3-6.8 33.8-10.2 51.5-10 21 0 39.2 4 55 12.2a111.6 111.6 0 0138.6 32.8c10.1 13.7 17.2 29.3 21.7 46.9 4.3 17.3 5.8 35.5 4.6 54.7zm-122-95.6c-10.8 0-19.9 1.9-26.9 5.6-7 3.7-12.8 8.3-17.2 13.6a48.4 48.4 0 00-9.1 17.4c-1.6 5.3-2.7 10.7-3.1 16.2H723c-1.6-17.3-7.6-30.1-15.6-39.1-8.4-8.9-21.9-13.7-38.6-13.7z" } }] }, "name": "behance-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (BehanceCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BehanceOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BehanceOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BehanceOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M634 294.3h199.5v48.4H634zM434.1 485.8c44.1-21.1 67.2-53.2 67.2-102.8 0-98.1-73-121.9-157.3-121.9H112v492.4h238.5c89.4 0 173.3-43 173.3-143 0-61.8-29.2-107.5-89.7-124.7zM220.2 345.1h101.5c39.1 0 74.2 10.9 74.2 56.3 0 41.8-27.3 58.6-66 58.6H220.2V345.1zm115.5 324.8H220.1V534.3H338c47.6 0 77.7 19.9 77.7 70.3 0 49.6-35.9 65.3-80 65.3zm575.8-89.5c0-105.5-61.7-193.4-173.3-193.4-108.5 0-182.3 81.7-182.3 188.8 0 111 69.9 187.2 182.3 187.2 85.1 0 140.2-38.3 166.7-120h-86.3c-9.4 30.5-47.6 46.5-77.3 46.5-57.4 0-87.4-33.6-87.4-90.7h256.9c.3-5.9.7-12.1.7-18.4zM653.9 537c3.1-46.9 34.4-76.2 81.2-76.2 49.2 0 73.8 28.9 78.1 76.2H653.9z" } }] }, "name": "behance", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BehanceOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BehanceSquareFilled.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BehanceSquareFilled.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BehanceSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM598.5 350.9h138.4v33.7H598.5v-33.7zM512 628.8a89.52 89.52 0 01-27 31c-11.8 8.2-24.9 14.2-38.8 17.7a167.4 167.4 0 01-44.6 5.7H236V342.1h161c16.3 0 31.1 1.5 44.6 4.3 13.4 2.8 24.8 7.6 34.4 14.1 9.5 6.5 17 15.2 22.3 26 5.2 10.7 7.9 24.1 7.9 40 0 17.2-3.9 31.4-11.7 42.9-7.9 11.5-19.3 20.8-34.8 28.1 21.1 6 36.6 16.7 46.8 31.7 10.4 15.2 15.5 33.4 15.5 54.8 0 17.4-3.3 32.3-10 44.8zM790.8 576H612.4c0 19.4 6.7 38 16.8 48 10.2 9.9 24.8 14.9 43.9 14.9 13.8 0 25.5-3.5 35.5-10.4 9.9-6.9 15.9-14.2 18.1-21.8h59.8c-9.6 29.7-24.2 50.9-44 63.7-19.6 12.8-43.6 19.2-71.5 19.2-19.5 0-37-3.2-52.7-9.3-15.1-5.9-28.7-14.9-39.9-26.5a121.2 121.2 0 01-25.1-41.2c-6.1-16.9-9.1-34.7-8.9-52.6 0-18.5 3.1-35.7 9.1-51.7 11.5-31.1 35.4-56 65.9-68.9 16.3-6.8 33.8-10.2 51.5-10 21 0 39.2 4 55 12.2a111.6 111.6 0 0138.6 32.8c10.1 13.7 17.2 29.3 21.7 46.9 4.3 17.3 5.8 35.5 4.6 54.7zm-122-95.6c-10.8 0-19.9 1.9-26.9 5.6-7 3.7-12.8 8.3-17.2 13.6a48.4 48.4 0 00-9.1 17.4c-1.6 5.3-2.7 10.7-3.1 16.2H723c-1.6-17.3-7.6-30.1-15.6-39.1-8.4-8.9-21.9-13.7-38.6-13.7zm-248.5-10.1c8.7-6.3 12.9-16.7 12.9-31 .3-6.8-1.1-13.5-4.1-19.6-2.7-4.9-6.7-9-11.6-11.9a44.8 44.8 0 00-16.6-6c-6.4-1.2-12.9-1.8-19.3-1.7h-70.3v79.7h76.1c13.1.1 24.2-3.1 32.9-9.5zm11.8 72c-9.8-7.5-22.9-11.2-39.2-11.2h-81.8v94h80.2c7.5 0 14.4-.7 21.1-2.1s12.7-3.8 17.8-7.2c5.1-3.3 9.2-7.8 12.3-13.6 3-5.8 4.5-13.2 4.5-22.1 0-17.7-5-30.2-14.9-37.8z" } }] }, "name": "behance-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (BehanceSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BehanceSquareOutlined.js": /*!****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BehanceSquareOutlined.js ***! \****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BehanceSquareOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM598.5 350.9h138.4v33.7H598.5v-33.7zM512 628.8a89.52 89.52 0 01-27 31c-11.8 8.2-24.9 14.2-38.8 17.7a167.4 167.4 0 01-44.6 5.7H236V342.1h161c16.3 0 31.1 1.5 44.6 4.3 13.4 2.8 24.8 7.6 34.4 14.1 9.5 6.5 17 15.2 22.3 26 5.2 10.7 7.9 24.1 7.9 40 0 17.2-3.9 31.4-11.7 42.9-7.9 11.5-19.3 20.8-34.8 28.1 21.1 6 36.6 16.7 46.8 31.7 10.4 15.2 15.5 33.4 15.5 54.8 0 17.4-3.3 32.3-10 44.8zM790.8 576H612.4c0 19.4 6.7 38 16.8 48 10.2 9.9 24.8 14.9 43.9 14.9 13.8 0 25.5-3.5 35.5-10.4 9.9-6.9 15.9-14.2 18.1-21.8h59.8c-9.6 29.7-24.2 50.9-44 63.7-19.6 12.8-43.6 19.2-71.5 19.2-19.5 0-37-3.2-52.7-9.3-15.1-5.9-28.7-14.9-39.9-26.5a121.2 121.2 0 01-25.1-41.2c-6.1-16.9-9.1-34.7-8.9-52.6 0-18.5 3.1-35.7 9.1-51.7 11.5-31.1 35.4-56 65.9-68.9 16.3-6.8 33.8-10.2 51.5-10 21 0 39.2 4 55 12.2a111.6 111.6 0 0138.6 32.8c10.1 13.7 17.2 29.3 21.7 46.9 4.3 17.3 5.8 35.5 4.6 54.7zm-122-95.6c-10.8 0-19.9 1.9-26.9 5.6-7 3.7-12.8 8.3-17.2 13.6a48.4 48.4 0 00-9.1 17.4c-1.6 5.3-2.7 10.7-3.1 16.2H723c-1.6-17.3-7.6-30.1-15.6-39.1-8.4-8.9-21.9-13.7-38.6-13.7zm-248.5-10.1c8.7-6.3 12.9-16.7 12.9-31 .3-6.8-1.1-13.5-4.1-19.6-2.7-4.9-6.7-9-11.6-11.9a44.8 44.8 0 00-16.6-6c-6.4-1.2-12.9-1.8-19.3-1.7h-70.3v79.7h76.1c13.1.1 24.2-3.1 32.9-9.5zm11.8 72c-9.8-7.5-22.9-11.2-39.2-11.2h-81.8v94h80.2c7.5 0 14.4-.7 21.1-2.1s12.7-3.8 17.8-7.2c5.1-3.3 9.2-7.8 12.3-13.6 3-5.8 4.5-13.2 4.5-22.1 0-17.7-5-30.2-14.9-37.8z" } }] }, "name": "behance-square", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BehanceSquareOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BellFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BellFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BellFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M816 768h-24V428c0-141.1-104.3-257.8-240-277.2V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.8C336.3 170.2 232 286.9 232 428v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48z" } }] }, "name": "bell", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (BellFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BellOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BellOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BellOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M816 768h-24V428c0-141.1-104.3-257.7-240-277.1V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.9c-135.7 19.4-240 136-240 277.1v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48zM304 768V428c0-55.6 21.6-107.8 60.9-147.1S456.4 220 512 220c55.6 0 107.8 21.6 147.1 60.9S720 372.4 720 428v340H304z" } }] }, "name": "bell", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BellOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BellTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BellTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BellTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 220c-55.6 0-107.8 21.6-147.1 60.9S304 372.4 304 428v340h416V428c0-55.6-21.6-107.8-60.9-147.1S567.6 220 512 220zm280 208c0-141.1-104.3-257.8-240-277.2v.1c135.7 19.4 240 136 240 277.1zM472 150.9v-.1C336.3 170.2 232 286.9 232 428c0-141.1 104.3-257.7 240-277.1z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M816 768h-24V428c0-141.1-104.3-257.7-240-277.1V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.9c-135.7 19.4-240 136-240 277.1v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48zm208-120H304V428c0-55.6 21.6-107.8 60.9-147.1S456.4 220 512 220c55.6 0 107.8 21.6 147.1 60.9S720 372.4 720 428v340z", "fill": primaryColor } }] }; }, "name": "bell", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (BellTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BgColorsOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BgColorsOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BgColorsOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M766.4 744.3c43.7 0 79.4-36.2 79.4-80.5 0-53.5-79.4-140.8-79.4-140.8S687 610.3 687 663.8c0 44.3 35.7 80.5 79.4 80.5zm-377.1-44.1c7.1 7.1 18.6 7.1 25.6 0l256.1-256c7.1-7.1 7.1-18.6 0-25.6l-256-256c-.6-.6-1.3-1.2-2-1.7l-78.2-78.2a9.11 9.11 0 00-12.8 0l-48 48a9.11 9.11 0 000 12.8l67.2 67.2-207.8 207.9c-7.1 7.1-7.1 18.6 0 25.6l255.9 256zm12.9-448.6l178.9 178.9H223.4l178.8-178.9zM904 816H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8z" } }] }, "name": "bg-colors", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BgColorsOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BlockOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BlockOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BlockOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M856 376H648V168c0-8.8-7.2-16-16-16H168c-8.8 0-16 7.2-16 16v464c0 8.8 7.2 16 16 16h208v208c0 8.8 7.2 16 16 16h464c8.8 0 16-7.2 16-16V392c0-8.8-7.2-16-16-16zm-480 16v188H220V220h360v156H392c-8.8 0-16 7.2-16 16zm204 52v136H444V444h136zm224 360H444V648h188c8.8 0 16-7.2 16-16V444h156v360z" } }] }, "name": "block", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BlockOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BoldOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BoldOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BoldOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M697.8 481.4c33.6-35 54.2-82.3 54.2-134.3v-10.2C752 229.3 663.9 142 555.3 142H259.4c-15.1 0-27.4 12.3-27.4 27.4v679.1c0 16.3 13.2 29.5 29.5 29.5h318.7c117 0 211.8-94.2 211.8-210.5v-11c0-73-37.4-137.3-94.2-175.1zM328 238h224.7c57.1 0 103.3 44.4 103.3 99.3v9.5c0 54.8-46.3 99.3-103.3 99.3H328V238zm366.6 429.4c0 62.9-51.7 113.9-115.5 113.9H328V542.7h251.1c63.8 0 115.5 51 115.5 113.9v10.8z" } }] }, "name": "bold", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BoldOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BookFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BookFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BookFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zM668 345.9L621.5 312 572 347.4V124h96v221.9z" } }] }, "name": "book", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (BookFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BookOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BookOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BookOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z" } }] }, "name": "book", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BookOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BookTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BookTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BookTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-260 72h96v209.9L621.5 312 572 347.4V136zM232 888V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752H232z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M668 345.9V136h-96v211.4l49.5-35.4z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M727.9 136v296.5c0 8.8-7.2 16-16 16-3.4 0-6.7-1.1-9.4-3.1L621.1 386l-83.8 59.9a15.9 15.9 0 01-22.3-3.7c-2-2.7-3-6-3-9.3V136H232v752h559.9V136h-64z", "fill": secondaryColor } }] }; }, "name": "book", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (BookTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BorderBottomOutlined.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BorderBottomOutlined.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BorderBottomOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M872 808H152c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-720-94h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0-498h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 332h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0-166h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm166 166h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0-332h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm332 0h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 332h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm222-72h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-388 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm388-404h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-388 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm388 426h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-388 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm388-404h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-388 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8z" } }] }, "name": "border-bottom", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BorderBottomOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BorderHorizontalOutlined.js": /*!*******************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BorderHorizontalOutlined.js ***! \*******************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BorderHorizontalOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M540 144h-56c-4.4 0-8 3.6-8 8v720c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V152c0-4.4-3.6-8-8-8zm-166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm498 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-664 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm498 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM208 310h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm664 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-664 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm664 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM374 808h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, "name": "border-horizontal", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BorderHorizontalOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BorderInnerOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BorderInnerOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BorderInnerOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M872 476H548V144h-72v332H152c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h324v332h72V548h324c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 498h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-664h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 498h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM650 216h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm56 592h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-56-592h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-166 0h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm56 592h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-56-426h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm56 260h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, "name": "border-inner", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BorderInnerOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BorderLeftOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BorderLeftOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BorderLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M208 144h-56c-4.4 0-8 3.6-8 8v720c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V152c0-4.4-3.6-8-8-8zm166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm498 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM540 310h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM374 808h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, "name": "border-left", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BorderLeftOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BorderOuterOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BorderOuterOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BorderOuterOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656zM484 366h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zM302 548h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm364 0h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-182 0h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 182h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8z" } }] }, "name": "border-outer", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BorderOuterOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BorderOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BorderOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BorderOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, "name": "border", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BorderOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BorderRightOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BorderRightOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BorderRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M872 144h-56c-4.4 0-8 3.6-8 8v720c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V152c0-4.4-3.6-8-8-8zm-166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-498 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm166 166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM208 808h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm498 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM374 808h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, "name": "border-right", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BorderRightOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BorderTopOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BorderTopOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BorderTopOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M872 144H152c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM208 310h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 498h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm166-166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332-498h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, "name": "border-top", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BorderTopOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BorderVerticleOutlined.js": /*!*****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BorderVerticleOutlined.js ***! \*****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BorderVerticleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M872 476H152c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 498h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-664h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 498h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM650 216h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm56 592h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-56-592h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-166 0h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm332 0h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zM208 808h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM152 382h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm332 0h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zM208 642h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, "name": "border-verticle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BorderVerticleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BorderlessTableOutlined.js": /*!******************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BorderlessTableOutlined.js ***! \******************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BorderlessTableOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M117 368h231v64H117zm559 0h241v64H676zm-264 0h200v64H412zm0 224h200v64H412zm264 0h241v64H676zm-559 0h231v64H117zm295-160V179h-64v666h64V592zm264-64V179h-64v666h64V432z" } }] }, "name": "borderless-table", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BorderlessTableOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BoxPlotFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BoxPlotFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BoxPlotFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M952 224h-52c-4.4 0-8 3.6-8 8v248h-92V304c0-4.4-3.6-8-8-8H448v432h344c4.4 0 8-3.6 8-8V548h92v244c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8V232c0-4.4-3.6-8-8-8zm-728 80v176h-92V232c0-4.4-3.6-8-8-8H72c-4.4 0-8 3.6-8 8v560c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8V548h92v172c0 4.4 3.6 8 8 8h152V296H232c-4.4 0-8 3.6-8 8z" } }] }, "name": "box-plot", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (BoxPlotFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BoxPlotOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BoxPlotOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BoxPlotOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M952 224h-52c-4.4 0-8 3.6-8 8v248h-92V304c0-4.4-3.6-8-8-8H232c-4.4 0-8 3.6-8 8v176h-92V232c0-4.4-3.6-8-8-8H72c-4.4 0-8 3.6-8 8v560c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8V548h92v172c0 4.4 3.6 8 8 8h560c4.4 0 8-3.6 8-8V548h92v244c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8V232c0-4.4-3.6-8-8-8zM296 368h88v288h-88V368zm432 288H448V368h280v288z" } }] }, "name": "box-plot", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BoxPlotOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BoxPlotTwoTone.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BoxPlotTwoTone.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BoxPlotTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M296 368h88v288h-88zm152 0h280v288H448z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M952 224h-52c-4.4 0-8 3.6-8 8v248h-92V304c0-4.4-3.6-8-8-8H232c-4.4 0-8 3.6-8 8v176h-92V232c0-4.4-3.6-8-8-8H72c-4.4 0-8 3.6-8 8v560c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8V548h92v172c0 4.4 3.6 8 8 8h560c4.4 0 8-3.6 8-8V548h92v244c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8V232c0-4.4-3.6-8-8-8zM384 656h-88V368h88v288zm344 0H448V368h280v288z", "fill": primaryColor } }] }; }, "name": "box-plot", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (BoxPlotTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BranchesOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BranchesOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BranchesOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M740 161c-61.8 0-112 50.2-112 112 0 50.1 33.1 92.6 78.5 106.9v95.9L320 602.4V318.1c44.2-15 76-56.9 76-106.1 0-61.8-50.2-112-112-112s-112 50.2-112 112c0 49.2 31.8 91 76 106.1V706c-44.2 15-76 56.9-76 106.1 0 61.8 50.2 112 112 112s112-50.2 112-112c0-49.2-31.8-91-76-106.1v-27.8l423.5-138.7a50.52 50.52 0 0034.9-48.2V378.2c42.9-15.8 73.6-57 73.6-105.2 0-61.8-50.2-112-112-112zm-504 51a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm96 600a48.01 48.01 0 01-96 0 48.01 48.01 0 0196 0zm408-491a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "branches", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BranchesOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BugFilled.js": /*!****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BugFilled.js ***! \****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BugFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M304 280h416c4.4 0 8-3.6 8-8 0-40-8.8-76.7-25.9-108.1a184.31 184.31 0 00-74-74C596.7 72.8 560 64 520 64h-16c-40 0-76.7 8.8-108.1 25.9a184.31 184.31 0 00-74 74C304.8 195.3 296 232 296 272c0 4.4 3.6 8 8 8z" } }, { "tag": "path", "attrs": { "d": "M940 512H792V412c76.8 0 139-62.2 139-139 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8a63 63 0 01-63 63H232a63 63 0 01-63-63c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 76.8 62.2 139 139 139v100H84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h148v96c0 6.5.2 13 .7 19.3C164.1 728.6 116 796.7 116 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-44.2 23.9-82.9 59.6-103.7a273 273 0 0022.7 49c24.3 41.5 59 76.2 100.5 100.5 28.9 16.9 61 28.8 95.3 34.5 4.4 0 8-3.6 8-8V484c0-4.4 3.6-8 8-8h60c4.4 0 8 3.6 8 8v464.2c0 4.4 3.6 8 8 8 34.3-5.7 66.4-17.6 95.3-34.5a281.38 281.38 0 00123.2-149.5A120.4 120.4 0 01836 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-79.3-48.1-147.4-116.7-176.7.4-6.4.7-12.8.7-19.3v-96h148c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, "name": "bug", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (BugFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BugOutlined.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BugOutlined.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BugOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M304 280h56c4.4 0 8-3.6 8-8 0-28.3 5.9-53.2 17.1-73.5 10.6-19.4 26-34.8 45.4-45.4C450.9 142 475.7 136 504 136h16c28.3 0 53.2 5.9 73.5 17.1 19.4 10.6 34.8 26 45.4 45.4C650 218.9 656 243.7 656 272c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-40-8.8-76.7-25.9-108.1a184.31 184.31 0 00-74-74C596.7 72.8 560 64 520 64h-16c-40 0-76.7 8.8-108.1 25.9a184.31 184.31 0 00-74 74C304.8 195.3 296 232 296 272c0 4.4 3.6 8 8 8z" } }, { "tag": "path", "attrs": { "d": "M940 512H792V412c76.8 0 139-62.2 139-139 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8a63 63 0 01-63 63H232a63 63 0 01-63-63c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 76.8 62.2 139 139 139v100H84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h148v96c0 6.5.2 13 .7 19.3C164.1 728.6 116 796.7 116 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-44.2 23.9-82.9 59.6-103.7a273 273 0 0022.7 49c24.3 41.5 59 76.2 100.5 100.5S460.5 960 512 960s99.8-13.9 141.3-38.2a281.38 281.38 0 00123.2-149.5A120 120 0 01836 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-79.3-48.1-147.4-116.7-176.7.4-6.4.7-12.8.7-19.3v-96h148c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM716 680c0 36.8-9.7 72-27.8 102.9-17.7 30.3-43 55.6-73.3 73.3C584 874.3 548.8 884 512 884s-72-9.7-102.9-27.8c-30.3-17.7-55.6-43-73.3-73.3A202.75 202.75 0 01308 680V412h408v268z" } }] }, "name": "bug", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BugOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BugTwoTone.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BugTwoTone.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BugTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M308 412v268c0 36.78 9.68 71.96 27.8 102.9a205.39 205.39 0 0073.3 73.3A202.68 202.68 0 00512 884c36.78 0 71.96-9.68 102.9-27.8a205.39 205.39 0 0073.3-73.3A202.68 202.68 0 00716 680V412H308zm484 172v96c0 6.5-.22 12.95-.66 19.35C859.94 728.64 908 796.7 908 876a8 8 0 01-8 8h-56a8 8 0 01-8-8c0-44.24-23.94-82.89-59.57-103.7a278.63 278.63 0 01-22.66 49.02 281.39 281.39 0 01-100.45 100.45C611.84 946.07 563.55 960 512 960s-99.84-13.93-141.32-38.23a281.39 281.39 0 01-100.45-100.45 278.63 278.63 0 01-22.66-49.02A119.95 119.95 0 00188 876a8 8 0 01-8 8h-56a8 8 0 01-8-8c0-79.3 48.07-147.36 116.66-176.65A284.12 284.12 0 01232 680v-96H84a8 8 0 01-8-8v-56a8 8 0 018-8h148V412c-76.77 0-139-62.23-139-139a8 8 0 018-8h60a8 8 0 018 8 63 63 0 0063 63h560a63 63 0 0063-63 8 8 0 018-8h60a8 8 0 018 8c0 76.77-62.23 139-139 139v100h148a8 8 0 018 8v56a8 8 0 01-8 8H792zM368 272a8 8 0 01-8 8h-56a8 8 0 01-8-8c0-40.04 8.78-76.75 25.9-108.07a184.57 184.57 0 0174.03-74.03C427.25 72.78 463.96 64 504 64h16c40.04 0 76.75 8.78 108.07 25.9a184.57 184.57 0 0174.03 74.03C719.22 195.25 728 231.96 728 272a8 8 0 01-8 8h-56a8 8 0 01-8-8c0-28.33-5.94-53.15-17.08-73.53a112.56 112.56 0 00-45.39-45.4C573.15 141.95 548.33 136 520 136h-16c-28.33 0-53.15 5.94-73.53 17.08a112.56 112.56 0 00-45.4 45.39C373.95 218.85 368 243.67 368 272z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M308 412v268c0 36.78 9.68 71.96 27.8 102.9a205.39 205.39 0 0073.3 73.3A202.68 202.68 0 00512 884c36.78 0 71.96-9.68 102.9-27.8a205.39 205.39 0 0073.3-73.3A202.68 202.68 0 00716 680V412H308z", "fill": secondaryColor } }] }; }, "name": "bug", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (BugTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BuildFilled.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BuildFilled.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BuildFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M916 210H376c-17.7 0-32 14.3-32 32v236H108c-17.7 0-32 14.3-32 32v272c0 17.7 14.3 32 32 32h540c17.7 0 32-14.3 32-32V546h236c17.7 0 32-14.3 32-32V242c0-17.7-14.3-32-32-32zM612 746H412V546h200v200zm268-268H680V278h200v200z" } }] }, "name": "build", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (BuildFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BuildOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BuildOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BuildOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M916 210H376c-17.7 0-32 14.3-32 32v236H108c-17.7 0-32 14.3-32 32v272c0 17.7 14.3 32 32 32h540c17.7 0 32-14.3 32-32V546h236c17.7 0 32-14.3 32-32V242c0-17.7-14.3-32-32-32zm-504 68h200v200H412V278zm-68 468H144V546h200v200zm268 0H412V546h200v200zm268-268H680V278h200v200z" } }] }, "name": "build", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BuildOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BuildTwoTone.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BuildTwoTone.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BuildTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M144 546h200v200H144zm268-268h200v200H412z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M916 210H376c-17.7 0-32 14.3-32 32v236H108c-17.7 0-32 14.3-32 32v272c0 17.7 14.3 32 32 32h540c17.7 0 32-14.3 32-32V546h236c17.7 0 32-14.3 32-32V242c0-17.7-14.3-32-32-32zM344 746H144V546h200v200zm268 0H412V546h200v200zm0-268H412V278h200v200zm268 0H680V278h200v200z", "fill": primaryColor } }] }; }, "name": "build", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (BuildTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BulbFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BulbFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BulbFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M348 676.1C250 619.4 184 513.4 184 392c0-181.1 146.9-328 328-328s328 146.9 328 328c0 121.4-66 227.4-164 284.1V792c0 17.7-14.3 32-32 32H380c-17.7 0-32-14.3-32-32V676.1zM392 888h240c4.4 0 8 3.6 8 8v32c0 17.7-14.3 32-32 32H416c-17.7 0-32-14.3-32-32v-32c0-4.4 3.6-8 8-8z" } }] }, "name": "bulb", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (BulbFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BulbOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BulbOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BulbOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z" } }] }, "name": "bulb", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (BulbOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/BulbTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/BulbTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var BulbTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 136c-141.4 0-256 114.6-256 256 0 92.5 49.4 176.3 128.1 221.8l35.9 20.8V752h184V634.6l35.9-20.8C718.6 568.3 768 484.5 768 392c0-141.4-114.6-256-256-256z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z", "fill": primaryColor } }] }; }, "name": "bulb", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (BulbTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CalculatorFilled.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CalculatorFilled.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CalculatorFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM440.2 765h-50.8c-2.2 0-4.5-1.1-5.9-2.9L348 718.6l-35.5 43.5a7.38 7.38 0 01-5.9 2.9h-50.8c-6.6 0-10.2-7.9-5.8-13.1l62.7-76.8-61.2-74.9c-4.3-5.2-.7-13.1 5.9-13.1h50.9c2.2 0 4.5 1.1 5.9 2.9l34 41.6 34-41.6c1.5-1.9 3.6-2.9 5.9-2.9h50.8c6.6 0 10.2 7.9 5.9 13.1L383.5 675l62.7 76.8c4.2 5.3.6 13.2-6 13.2zm7.8-382c0 2.2-1.4 4-3.2 4H376v68.7c0 1.9-1.8 3.3-4 3.3h-48c-2.2 0-4-1.4-4-3.2V387h-68.8c-1.8 0-3.2-1.8-3.2-4v-48c0-2.2 1.4-4 3.2-4H320v-68.8c0-1.8 1.8-3.2 4-3.2h48c2.2 0 4 1.4 4 3.2V331h68.7c1.9 0 3.3 1.8 3.3 4v48zm328 369c0 2.2-1.4 4-3.2 4H579.2c-1.8 0-3.2-1.8-3.2-4v-48c0-2.2 1.4-4 3.2-4h193.5c1.9 0 3.3 1.8 3.3 4v48zm0-104c0 2.2-1.4 4-3.2 4H579.2c-1.8 0-3.2-1.8-3.2-4v-48c0-2.2 1.4-4 3.2-4h193.5c1.9 0 3.3 1.8 3.3 4v48zm0-265c0 2.2-1.4 4-3.2 4H579.2c-1.8 0-3.2-1.8-3.2-4v-48c0-2.2 1.4-4 3.2-4h193.5c1.9 0 3.3 1.8 3.3 4v48z" } }] }, "name": "calculator", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CalculatorFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CalculatorOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CalculatorOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CalculatorOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M251.2 387H320v68.8c0 1.8 1.8 3.2 4 3.2h48c2.2 0 4-1.4 4-3.3V387h68.8c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H376v-68.8c0-1.8-1.8-3.2-4-3.2h-48c-2.2 0-4 1.4-4 3.2V331h-68.8c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm328 0h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm0 265h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm0 104h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm-195.7-81l61.2-74.9c4.3-5.2.7-13.1-5.9-13.1H388c-2.3 0-4.5 1-5.9 2.9l-34 41.6-34-41.6a7.85 7.85 0 00-5.9-2.9h-50.9c-6.6 0-10.2 7.9-5.9 13.1l61.2 74.9-62.7 76.8c-4.4 5.2-.8 13.1 5.8 13.1h50.8c2.3 0 4.5-1 5.9-2.9l35.5-43.5 35.5 43.5c1.5 1.8 3.7 2.9 5.9 2.9h50.8c6.6 0 10.2-7.9 5.9-13.1L383.5 675zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-36 732H180V180h664v664z" } }] }, "name": "calculator", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CalculatorOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CalculatorTwoTone.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CalculatorTwoTone.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CalculatorTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M184 840h656V184H184v656zm256.2-75h-50.8c-2.2 0-4.5-1.1-5.9-2.9L348 718.6l-35.5 43.5a7.38 7.38 0 01-5.9 2.9h-50.8c-6.6 0-10.2-7.9-5.8-13.1l62.7-76.8-61.2-74.9c-4.3-5.2-.7-13.1 5.9-13.1h50.9c2.2 0 4.5 1.1 5.9 2.9l34 41.6 34-41.6c1.5-1.9 3.6-2.9 5.9-2.9h50.8c6.6 0 10.2 7.9 5.9 13.1L383.5 675l62.7 76.8c4.2 5.3.6 13.2-6 13.2zM576 335c0-2.2 1.4-4 3.2-4h193.5c1.9 0 3.3 1.8 3.3 4v48c0 2.2-1.4 4-3.2 4H579.2c-1.8 0-3.2-1.8-3.2-4v-48zm0 265c0-2.2 1.4-4 3.2-4h193.5c1.9 0 3.3 1.8 3.3 4v48c0 2.2-1.4 4-3.2 4H579.2c-1.8 0-3.2-1.8-3.2-4v-48zm0 104c0-2.2 1.4-4 3.2-4h193.5c1.9 0 3.3 1.8 3.3 4v48c0 2.2-1.4 4-3.2 4H579.2c-1.8 0-3.2-1.8-3.2-4v-48zM248 335c0-2.2 1.4-4 3.2-4H320v-68.8c0-1.8 1.8-3.2 4-3.2h48c2.2 0 4 1.4 4 3.2V331h68.7c1.9 0 3.3 1.8 3.3 4v48c0 2.2-1.4 4-3.2 4H376v68.7c0 1.9-1.8 3.3-4 3.3h-48c-2.2 0-4-1.4-4-3.2V387h-68.8c-1.8 0-3.2-1.8-3.2-4v-48z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M383.5 675l61.3-74.8c4.3-5.2.7-13.1-5.9-13.1h-50.8c-2.3 0-4.4 1-5.9 2.9l-34 41.6-34-41.6a7.69 7.69 0 00-5.9-2.9h-50.9c-6.6 0-10.2 7.9-5.9 13.1l61.2 74.9-62.7 76.8c-4.4 5.2-.8 13.1 5.8 13.1h50.8c2.3 0 4.4-1 5.9-2.9l35.5-43.5 35.5 43.5c1.4 1.8 3.7 2.9 5.9 2.9h50.8c6.6 0 10.2-7.9 6-13.2L383.5 675zM251.2 387H320v68.8c0 1.8 1.8 3.2 4 3.2h48c2.2 0 4-1.4 4-3.3V387h68.8c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H376v-68.8c0-1.8-1.8-3.2-4-3.2h-48c-2.2 0-4 1.4-4 3.2V331h-68.8c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm328 369h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm0-104h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4zm0-265h193.6c1.8 0 3.2-1.8 3.2-4v-48c0-2.2-1.4-4-3.3-4H579.2c-1.8 0-3.2 1.8-3.2 4v48c0 2.2 1.4 4 3.2 4z", "fill": primaryColor } }] }; }, "name": "calculator", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (CalculatorTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CalendarFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CalendarFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CalendarFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M112 880c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V460H112v420zm768-696H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v176h800V216c0-17.7-14.3-32-32-32z" } }] }, "name": "calendar", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CalendarFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CalendarOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CalendarOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CalendarOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z" } }] }, "name": "calendar", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CalendarOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CalendarTwoTone.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CalendarTwoTone.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CalendarTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M712 304c0 4.4-3.6 8-8 8h-56c-4.4 0-8-3.6-8-8v-48H384v48c0 4.4-3.6 8-8 8h-56c-4.4 0-8-3.6-8-8v-48H184v136h656V256H712v48z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zm0-448H184V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136z", "fill": primaryColor } }] }; }, "name": "calendar", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (CalendarTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CameraFilled.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CameraFilled.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CameraFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M864 260H728l-32.4-90.8a32.07 32.07 0 00-30.2-21.2H358.6c-13.5 0-25.6 8.5-30.1 21.2L296 260H160c-44.2 0-80 35.8-80 80v456c0 44.2 35.8 80 80 80h704c44.2 0 80-35.8 80-80V340c0-44.2-35.8-80-80-80zM512 716c-88.4 0-160-71.6-160-160s71.6-160 160-160 160 71.6 160 160-71.6 160-160 160zm-96-160a96 96 0 10192 0 96 96 0 10-192 0z" } }] }, "name": "camera", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CameraFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CameraOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CameraOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CameraOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M864 248H728l-32.4-90.8a32.07 32.07 0 00-30.2-21.2H358.6c-13.5 0-25.6 8.5-30.1 21.2L296 248H160c-44.2 0-80 35.8-80 80v456c0 44.2 35.8 80 80 80h704c44.2 0 80-35.8 80-80V328c0-44.2-35.8-80-80-80zm8 536c0 4.4-3.6 8-8 8H160c-4.4 0-8-3.6-8-8V328c0-4.4 3.6-8 8-8h186.7l17.1-47.8 22.9-64.2h250.5l22.9 64.2 17.1 47.8H864c4.4 0 8 3.6 8 8v456zM512 384c-88.4 0-160 71.6-160 160s71.6 160 160 160 160-71.6 160-160-71.6-160-160-160zm0 256c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96z" } }] }, "name": "camera", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CameraOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CameraTwoTone.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CameraTwoTone.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CameraTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M864 320H677.2l-17.1-47.8-22.9-64.2H386.7l-22.9 64.2-17.1 47.8H160c-4.4 0-8 3.6-8 8v456c0 4.4 3.6 8 8 8h704c4.4 0 8-3.6 8-8V328c0-4.4-3.6-8-8-8zM512 704c-88.4 0-160-71.6-160-160s71.6-160 160-160 160 71.6 160 160-71.6 160-160 160z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M512 384c-88.4 0-160 71.6-160 160s71.6 160 160 160 160-71.6 160-160-71.6-160-160-160zm0 256c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M864 248H728l-32.4-90.8a32.07 32.07 0 00-30.2-21.2H358.6c-13.5 0-25.6 8.5-30.1 21.2L296 248H160c-44.2 0-80 35.8-80 80v456c0 44.2 35.8 80 80 80h704c44.2 0 80-35.8 80-80V328c0-44.2-35.8-80-80-80zm8 536c0 4.4-3.6 8-8 8H160c-4.4 0-8-3.6-8-8V328c0-4.4 3.6-8 8-8h186.7l17.1-47.8 22.9-64.2h250.5l22.9 64.2 17.1 47.8H864c4.4 0 8 3.6 8 8v456z", "fill": primaryColor } }] }; }, "name": "camera", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (CameraTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CarFilled.js": /*!****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CarFilled.js ***! \****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CarFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M959 413.4L935.3 372a8 8 0 00-10.9-2.9l-50.7 29.6-78.3-216.2a63.9 63.9 0 00-60.9-44.4H301.2c-34.7 0-65.5 22.4-76.2 55.5l-74.6 205.2-50.8-29.6a8 8 0 00-10.9 2.9L65 413.4c-2.2 3.8-.9 8.6 2.9 10.8l60.4 35.2-14.5 40c-1.2 3.2-1.8 6.6-1.8 10v348.2c0 15.7 11.8 28.4 26.3 28.4h67.6c12.3 0 23-9.3 25.6-22.3l7.7-37.7h545.6l7.7 37.7c2.7 13 13.3 22.3 25.6 22.3h67.6c14.5 0 26.3-12.7 26.3-28.4V509.4c0-3.4-.6-6.8-1.8-10l-14.5-40 60.3-35.2a8 8 0 003-10.8zM264 621c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm388 75c0 4.4-3.6 8-8 8H380c-4.4 0-8-3.6-8-8v-84c0-4.4 3.6-8 8-8h40c4.4 0 8 3.6 8 8v36h168v-36c0-4.4 3.6-8 8-8h40c4.4 0 8 3.6 8 8v84zm108-75c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zM220 418l72.7-199.9.5-1.3.4-1.3c1.1-3.3 4.1-5.5 7.6-5.5h427.6l75.4 208H220z" } }] }, "name": "car", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CarFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CarOutlined.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CarOutlined.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CarOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M380 704h264c4.4 0 8-3.6 8-8v-84c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v36H428v-36c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v84c0 4.4 3.6 8 8 8zm340-123a40 40 0 1080 0 40 40 0 10-80 0zm239-167.6L935.3 372a8 8 0 00-10.9-2.9l-50.7 29.6-78.3-216.2a63.9 63.9 0 00-60.9-44.4H301.2c-34.7 0-65.5 22.4-76.2 55.5l-74.6 205.2-50.8-29.6a8 8 0 00-10.9 2.9L65 413.4c-2.2 3.8-.9 8.6 2.9 10.8l60.4 35.2-14.5 40c-1.2 3.2-1.8 6.6-1.8 10v348.2c0 15.7 11.8 28.4 26.3 28.4h67.6c12.3 0 23-9.3 25.6-22.3l7.7-37.7h545.6l7.7 37.7c2.7 13 13.3 22.3 25.6 22.3h67.6c14.5 0 26.3-12.7 26.3-28.4V509.4c0-3.4-.6-6.8-1.8-10l-14.5-40 60.3-35.2a8 8 0 003-10.8zM840 517v237H184V517l15.6-43h624.8l15.6 43zM292.7 218.1l.5-1.3.4-1.3c1.1-3.3 4.1-5.5 7.6-5.5h427.6l75.4 208H220l72.7-199.9zM224 581a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, "name": "car", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CarOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CarTwoTone.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CarTwoTone.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CarTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M199.6 474L184 517v237h656V517l-15.6-43H199.6zM264 621c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm388 75c0 4.4-3.6 8-8 8H380c-4.4 0-8-3.6-8-8v-84c0-4.4 3.6-8 8-8h40c4.4 0 8 3.6 8 8v36h168v-36c0-4.4 3.6-8 8-8h40c4.4 0 8 3.6 8 8v84zm108-75c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M720 581a40 40 0 1080 0 40 40 0 10-80 0z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M959 413.4L935.3 372a8 8 0 00-10.9-2.9l-50.7 29.6-78.3-216.2a63.9 63.9 0 00-60.9-44.4H301.2c-34.7 0-65.5 22.4-76.2 55.5l-74.6 205.2-50.8-29.6a8 8 0 00-10.9 2.9L65 413.4c-2.2 3.8-.9 8.6 2.9 10.8l60.4 35.2-14.5 40c-1.2 3.2-1.8 6.6-1.8 10v348.2c0 15.7 11.8 28.4 26.3 28.4h67.6c12.3 0 23-9.3 25.6-22.3l7.7-37.7h545.6l7.7 37.7c2.7 13 13.3 22.3 25.6 22.3h67.6c14.5 0 26.3-12.7 26.3-28.4V509.4c0-3.4-.6-6.8-1.8-10l-14.5-40 60.3-35.2a8 8 0 003-10.8zM292.7 218.1l.5-1.3.4-1.3c1.1-3.3 4.1-5.5 7.6-5.5h427.6l75.4 208H220l72.7-199.9zM840 754H184V517l15.6-43h624.8l15.6 43v237z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M224 581a40 40 0 1080 0 40 40 0 10-80 0zm420 23h-40c-4.4 0-8 3.6-8 8v36H428v-36c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v84c0 4.4 3.6 8 8 8h264c4.4 0 8-3.6 8-8v-84c0-4.4-3.6-8-8-8z", "fill": primaryColor } }] }; }, "name": "car", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (CarTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CaretDownFilled.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CaretDownFilled.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CaretDownFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z" } }] }, "name": "caret-down", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CaretDownFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CaretDownOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CaretDownOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CaretDownOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z" } }] }, "name": "caret-down", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CaretDownOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CaretLeftFilled.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CaretLeftFilled.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CaretLeftFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M689 165.1L308.2 493.5c-10.9 9.4-10.9 27.5 0 37L689 858.9c14.2 12.2 35 1.2 35-18.5V183.6c0-19.7-20.8-30.7-35-18.5z" } }] }, "name": "caret-left", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CaretLeftFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CaretLeftOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CaretLeftOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CaretLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M689 165.1L308.2 493.5c-10.9 9.4-10.9 27.5 0 37L689 858.9c14.2 12.2 35 1.2 35-18.5V183.6c0-19.7-20.8-30.7-35-18.5z" } }] }, "name": "caret-left", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CaretLeftOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CaretRightFilled.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CaretRightFilled.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CaretRightFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z" } }] }, "name": "caret-right", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CaretRightFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CaretRightOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CaretRightOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CaretRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z" } }] }, "name": "caret-right", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CaretRightOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CaretUpFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CaretUpFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CaretUpFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z" } }] }, "name": "caret-up", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CaretUpFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CaretUpOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CaretUpOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CaretUpOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z" } }] }, "name": "caret-up", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CaretUpOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CarryOutFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CarryOutFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CarryOutFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zM694.5 432.7L481.9 725.4a16.1 16.1 0 01-26 0l-126.4-174c-3.8-5.3 0-12.7 6.5-12.7h55.2c5.1 0 10 2.5 13 6.6l64.7 89 150.9-207.8c3-4.1 7.8-6.6 13-6.6H688c6.5.1 10.3 7.5 6.5 12.8z" } }] }, "name": "carry-out", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CarryOutFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CarryOutOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CarryOutOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CarryOutOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v584zM688 420h-55.2c-5.1 0-10 2.5-13 6.6L468.9 634.4l-64.7-89c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.4 0-12.8-6.5-12.8z" } }] }, "name": "carry-out", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CarryOutOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CarryOutTwoTone.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CarryOutTwoTone.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CarryOutTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v584z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M712 304c0 4.4-3.6 8-8 8h-56c-4.4 0-8-3.6-8-8v-48H384v48c0 4.4-3.6 8-8 8h-56c-4.4 0-8-3.6-8-8v-48H184v584h656V256H712v48zm-17.5 128.8L481.9 725.5a16.1 16.1 0 01-26 0l-126.4-174c-3.8-5.3 0-12.7 6.5-12.7h55.2c5.2 0 10 2.5 13 6.6l64.7 89 150.9-207.8c3-4.1 7.9-6.6 13-6.6H688c6.5 0 10.3 7.4 6.5 12.8z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M688 420h-55.2c-5.1 0-10 2.5-13 6.6L468.9 634.4l-64.7-89c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.4 0-12.8-6.5-12.8z", "fill": primaryColor } }] }; }, "name": "carry-out", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (CarryOutTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CheckCircleFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CheckCircleFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CheckCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, "name": "check-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CheckCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CheckCircleOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CheckCircleOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CheckCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "check-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CheckCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CheckCircleTwoTone.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CheckCircleTwoTone.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CheckCircleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm193.4 225.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.3 0 19.9 5 25.9 13.3l71.2 98.8 157.2-218c6-8.4 15.7-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.4 12.7z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z", "fill": primaryColor } }] }; }, "name": "check-circle", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (CheckCircleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CheckOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CheckOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CheckOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, "name": "check", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CheckOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CheckSquareFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CheckSquareFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CheckSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM695.5 365.7l-210.6 292a31.8 31.8 0 01-51.7 0L308.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H689c6.5 0 10.3 7.4 6.5 12.7z" } }] }, "name": "check-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CheckSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CheckSquareOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CheckSquareOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CheckSquareOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M433.1 657.7a31.8 31.8 0 0051.7 0l210.6-292c3.8-5.3 0-12.7-6.5-12.7H642c-10.2 0-19.9 4.9-25.9 13.3L459 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H315c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8z" } }, { "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, "name": "check-square", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CheckSquareOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CheckSquareTwoTone.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CheckSquareTwoTone.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CheckSquareTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M184 840h656V184H184v656zm130-367.8h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H688c6.5 0 10.3 7.4 6.5 12.7l-210.6 292a31.8 31.8 0 01-51.7 0L307.5 484.9c-3.8-5.3 0-12.7 6.5-12.7z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M432.2 657.7a31.8 31.8 0 0051.7 0l210.6-292c3.8-5.3 0-12.7-6.5-12.7h-46.9c-10.3 0-19.9 5-25.9 13.3L458 584.3l-71.2-98.8c-6-8.4-15.7-13.3-25.9-13.3H314c-6.5 0-10.3 7.4-6.5 12.7l124.7 172.8z", "fill": primaryColor } }] }; }, "name": "check-square", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (CheckSquareTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ChromeFilled.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ChromeFilled.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ChromeFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M371.8 512c0 77.5 62.7 140.2 140.2 140.2S652.2 589.5 652.2 512 589.5 371.8 512 371.8 371.8 434.4 371.8 512zM900 362.4l-234.3 12.1c63.6 74.3 64.6 181.5 11.1 263.7l-188 289.2c78 4.2 158.4-12.9 231.2-55.2 180-104 253-322.1 180-509.8zM320.3 591.9L163.8 284.1A415.35 415.35 0 0096 512c0 208 152.3 380.3 351.4 410.8l106.9-209.4c-96.6 18.2-189.9-34.8-234-121.5zm218.5-285.5l344.4 18.1C848 254.7 792.6 194 719.8 151.7 653.9 113.6 581.5 95.5 510.5 96c-122.5.5-242.2 55.2-322.1 154.5l128.2 196.9c32-91.9 124.8-146.7 222.2-141z" } }] }, "name": "chrome", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (ChromeFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ChromeOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ChromeOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ChromeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 512.3v-.3c0-229.8-186.2-416-416-416S96 282.2 96 512v.4c0 229.8 186.2 416 416 416s416-186.2 416-416v-.3.2zm-6.7-74.6l.6 3.3-.6-3.3zM676.7 638.2c53.5-82.2 52.5-189.4-11.1-263.7l162.4-8.4c20.5 44.4 32 93.8 32 145.9 0 185.2-144.6 336.6-327.1 347.4l143.8-221.2zM512 652.3c-77.5 0-140.2-62.7-140.2-140.2 0-77.7 62.7-140.2 140.2-140.2S652.2 434.5 652.2 512 589.5 652.3 512 652.3zm369.2-331.7l-3-5.7 3 5.7zM512 164c121.3 0 228.2 62.1 290.4 156.2l-263.6-13.9c-97.5-5.7-190.2 49.2-222.3 141.1L227.8 311c63.1-88.9 166.9-147 284.2-147zM102.5 585.8c26 145 127.1 264 261.6 315.1C229.6 850 128.5 731 102.5 585.8zM164 512c0-55.9 13.2-108.7 36.6-155.5l119.7 235.4c44.1 86.7 137.4 139.7 234 121.6l-74 145.1C302.9 842.5 164 693.5 164 512zm324.7 415.4c4 .2 8 .4 12 .5-4-.2-8-.3-12-.5z" } }] }, "name": "chrome", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ChromeOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CiCircleFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CiCircleFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CiCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-63.6 656c-103 0-162.4-68.6-162.4-182.6v-49C286 373.5 345.4 304 448.3 304c88.3 0 152.3 56.9 152.3 138.1 0 2.4-2 4.4-4.4 4.4h-52.6c-4.2 0-7.6-3.2-8-7.4-4-46.1-37.6-77.6-87-77.6-61.1 0-95.6 45.4-95.6 126.9v49.3c0 80.3 34.5 125.1 95.6 125.1 49.3 0 82.8-29.5 87-72.4.4-4.1 3.8-7.3 8-7.3h52.7c2.4 0 4.4 2 4.4 4.4 0 77.4-64.3 132.5-152.3 132.5zM738 704.1c0 4.4-3.6 8-8 8h-50.4c-4.4 0-8-3.6-8-8V319.9c0-4.4 3.6-8 8-8H730c4.4 0 8 3.6 8 8v384.2z" } }] }, "name": "ci-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CiCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CiCircleOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CiCircleOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CiCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm218-572.1h-50.4c-4.4 0-8 3.6-8 8v384.2c0 4.4 3.6 8 8 8H730c4.4 0 8-3.6 8-8V319.9c0-4.4-3.6-8-8-8zm-281.4 49.6c49.5 0 83.1 31.5 87 77.6.4 4.2 3.8 7.4 8 7.4h52.6c2.4 0 4.4-2 4.4-4.4 0-81.2-64-138.1-152.3-138.1C345.4 304 286 373.5 286 488.4v49c0 114 59.4 182.6 162.3 182.6 88 0 152.3-55.1 152.3-132.5 0-2.4-2-4.4-4.4-4.4h-52.7c-4.2 0-7.6 3.2-8 7.3-4.2 43-37.7 72.4-87 72.4-61.1 0-95.6-44.9-95.6-125.2v-49.3c.1-81.4 34.6-126.8 95.7-126.8z" } }] }, "name": "ci-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CiCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CiCircleTwoTone.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CiCircleTwoTone.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CiCircleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm-63.5 522.8c49.3 0 82.8-29.4 87-72.4.4-4.1 3.8-7.3 8-7.3h52.7c2.4 0 4.4 2 4.4 4.4 0 77.4-64.3 132.5-152.3 132.5C345.4 720 286 651.4 286 537.4v-49C286 373.5 345.4 304 448.3 304c88.3 0 152.3 56.9 152.3 138.1 0 2.4-2 4.4-4.4 4.4h-52.6c-4.2 0-7.6-3.2-8-7.4-3.9-46.1-37.5-77.6-87-77.6-61.1 0-95.6 45.4-95.7 126.8v49.3c0 80.3 34.5 125.2 95.6 125.2zM738 704.1c0 4.4-3.6 8-8 8h-50.4c-4.4 0-8-3.6-8-8V319.9c0-4.4 3.6-8 8-8H730c4.4 0 8 3.6 8 8v384.2z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M730 311.9h-50.4c-4.4 0-8 3.6-8 8v384.2c0 4.4 3.6 8 8 8H730c4.4 0 8-3.6 8-8V319.9c0-4.4-3.6-8-8-8zm-281.4 49.6c49.5 0 83.1 31.5 87 77.6.4 4.2 3.8 7.4 8 7.4h52.6c2.4 0 4.4-2 4.4-4.4 0-81.2-64-138.1-152.3-138.1C345.4 304 286 373.5 286 488.4v49c0 114 59.4 182.6 162.3 182.6 88 0 152.3-55.1 152.3-132.5 0-2.4-2-4.4-4.4-4.4h-52.7c-4.2 0-7.6 3.2-8 7.3-4.2 43-37.7 72.4-87 72.4-61.1 0-95.6-44.9-95.6-125.2v-49.3c.1-81.4 34.6-126.8 95.7-126.8z", "fill": primaryColor } }] }; }, "name": "ci-circle", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (CiCircleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CiOutlined.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CiOutlined.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CiOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm218-572.1h-50.4c-4.4 0-8 3.6-8 8v384.2c0 4.4 3.6 8 8 8H730c4.4 0 8-3.6 8-8V319.9c0-4.4-3.6-8-8-8zm-281.4 49.6c49.5 0 83.1 31.5 87 77.6.4 4.2 3.8 7.4 8 7.4h52.6c2.4 0 4.4-2 4.4-4.4 0-81.2-64-138.1-152.3-138.1C345.4 304 286 373.5 286 488.4v49c0 114 59.4 182.6 162.3 182.6 88 0 152.3-55.1 152.3-132.5 0-2.4-2-4.4-4.4-4.4h-52.7c-4.2 0-7.6 3.2-8 7.3-4.2 43-37.7 72.4-87 72.4-61.1 0-95.6-44.9-95.6-125.2v-49.3c.1-81.4 34.6-126.8 95.7-126.8z" } }] }, "name": "ci", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CiOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CiTwoTone.js": /*!****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CiTwoTone.js ***! \****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CiTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm-63.5 522.8c49.3 0 82.8-29.4 87-72.4.4-4.1 3.8-7.3 8-7.3h52.7c2.4 0 4.4 2 4.4 4.4 0 77.4-64.3 132.5-152.3 132.5C345.4 720 286 651.4 286 537.4v-49C286 373.5 345.4 304 448.3 304c88.3 0 152.3 56.9 152.3 138.1 0 2.4-2 4.4-4.4 4.4h-52.6c-4.2 0-7.6-3.2-8-7.4-3.9-46.1-37.5-77.6-87-77.6-61.1 0-95.6 45.4-95.7 126.8v49.3c0 80.3 34.5 125.2 95.6 125.2zM738 704.1c0 4.4-3.6 8-8 8h-50.4c-4.4 0-8-3.6-8-8V319.9c0-4.4 3.6-8 8-8H730c4.4 0 8 3.6 8 8v384.2z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M730 311.9h-50.4c-4.4 0-8 3.6-8 8v384.2c0 4.4 3.6 8 8 8H730c4.4 0 8-3.6 8-8V319.9c0-4.4-3.6-8-8-8zm-281.4 49.6c49.5 0 83.1 31.5 87 77.6.4 4.2 3.8 7.4 8 7.4h52.6c2.4 0 4.4-2 4.4-4.4 0-81.2-64-138.1-152.3-138.1C345.4 304 286 373.5 286 488.4v49c0 114 59.4 182.6 162.3 182.6 88 0 152.3-55.1 152.3-132.5 0-2.4-2-4.4-4.4-4.4h-52.7c-4.2 0-7.6 3.2-8 7.3-4.2 43-37.7 72.4-87 72.4-61.1 0-95.6-44.9-95.6-125.2v-49.3c.1-81.4 34.6-126.8 95.7-126.8z", "fill": primaryColor } }] }; }, "name": "ci", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (CiTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ClearOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ClearOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ClearOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z" } }] }, "name": "clear", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ClearOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ClockCircleFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ClockCircleFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ClockCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm176.5 585.7l-28.6 39a7.99 7.99 0 01-11.2 1.7L483.3 569.8a7.92 7.92 0 01-3.3-6.5V288c0-4.4 3.6-8 8-8h48.1c4.4 0 8 3.6 8 8v247.5l142.6 103.1c3.6 2.5 4.4 7.5 1.8 11.1z" } }] }, "name": "clock-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (ClockCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ClockCircleOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ClockCircleOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ClockCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z" } }] }, "name": "clock-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ClockCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ClockCircleTwoTone.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ClockCircleTwoTone.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ClockCircleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm176.5 509.7l-28.6 39a7.99 7.99 0 01-11.2 1.7L483.3 569.8a7.92 7.92 0 01-3.3-6.5V288c0-4.4 3.6-8 8-8h48.1c4.4 0 8 3.6 8 8v247.5l142.6 103.1c3.6 2.5 4.4 7.5 1.8 11.1z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.6-3.6 1.8-8.6-1.8-11.1z", "fill": primaryColor } }] }; }, "name": "clock-circle", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (ClockCircleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CloseCircleFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CloseCircleFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CloseCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z" } }] }, "name": "close-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CloseCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CloseCircleOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CloseCircleOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CloseCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M685.4 354.8c0-4.4-3.6-8-8-8l-66 .3L512 465.6l-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155L340.5 670a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3L512 564.4l99.3 118.4 66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z" } }, { "tag": "path", "attrs": { "d": "M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "close-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CloseCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CloseCircleTwoTone.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CloseCircleTwoTone.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CloseCircleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm171.8 527.1c1.2 1.5 1.9 3.3 1.9 5.2 0 4.5-3.6 8-8 8l-66-.3-99.3-118.4-99.3 118.5-66.1.3c-4.4 0-8-3.6-8-8 0-1.9.7-3.7 1.9-5.2L471 512.3l-130.1-155a8.32 8.32 0 01-1.9-5.2c0-4.5 3.6-8 8-8l66.1.3 99.3 118.4 99.4-118.5 66-.3c4.4 0 8 3.6 8 8 0 1.9-.6 3.8-1.8 5.2l-130.1 155 129.9 154.9z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M685.8 352c0-4.4-3.6-8-8-8l-66 .3-99.4 118.5-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155-130.1 154.9a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3 99.3-118.5L611.7 680l66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.9 512.2l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z", "fill": primaryColor } }] }; }, "name": "close-circle", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (CloseCircleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CloseOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CloseOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CloseOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z" } }] }, "name": "close", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CloseOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CloseSquareFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CloseSquareFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CloseSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM676.1 657.9c4.4 5.2.7 13.1-6.1 13.1h-58.9c-4.7 0-9.2-2.1-12.3-5.7L512 561.8l-86.8 103.5c-3 3.6-7.5 5.7-12.3 5.7H354c-6.8 0-10.5-7.9-6.1-13.1L470.2 512 347.9 366.1A7.95 7.95 0 01354 353h58.9c4.7 0 9.2 2.1 12.3 5.7L512 462.2l86.8-103.5c3-3.6 7.5-5.7 12.3-5.7H670c6.8 0 10.5 7.9 6.1 13.1L553.8 512l122.3 145.9z" } }] }, "name": "close-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CloseSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CloseSquareOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CloseSquareOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CloseSquareOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M354 671h58.9c4.7 0 9.2-2.1 12.3-5.7L512 561.8l86.8 103.5c3 3.6 7.5 5.7 12.3 5.7H670c6.8 0 10.5-7.9 6.1-13.1L553.8 512l122.4-145.9c4.4-5.2.7-13.1-6.1-13.1h-58.9c-4.7 0-9.2 2.1-12.3 5.7L512 462.2l-86.8-103.5c-3-3.6-7.5-5.7-12.3-5.7H354c-6.8 0-10.5 7.9-6.1 13.1L470.2 512 347.9 657.9A7.95 7.95 0 00354 671z" } }, { "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, "name": "close-square", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CloseSquareOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CloseSquareTwoTone.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CloseSquareTwoTone.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CloseSquareTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M184 840h656V184H184v656zm163.9-473.9A7.95 7.95 0 01354 353h58.9c4.7 0 9.2 2.1 12.3 5.7L512 462.2l86.8-103.5c3-3.6 7.5-5.7 12.3-5.7H670c6.8 0 10.5 7.9 6.1 13.1L553.8 512l122.3 145.9c4.4 5.2.7 13.1-6.1 13.1h-58.9c-4.7 0-9.2-2.1-12.3-5.7L512 561.8l-86.8 103.5c-3 3.6-7.5 5.7-12.3 5.7H354c-6.8 0-10.5-7.9-6.1-13.1L470.2 512 347.9 366.1z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M354 671h58.9c4.8 0 9.3-2.1 12.3-5.7L512 561.8l86.8 103.5c3.1 3.6 7.6 5.7 12.3 5.7H670c6.8 0 10.5-7.9 6.1-13.1L553.8 512l122.3-145.9c4.4-5.2.7-13.1-6.1-13.1h-58.9c-4.8 0-9.3 2.1-12.3 5.7L512 462.2l-86.8-103.5c-3.1-3.6-7.6-5.7-12.3-5.7H354c-6.8 0-10.5 7.9-6.1 13.1L470.2 512 347.9 657.9A7.95 7.95 0 00354 671z", "fill": primaryColor } }] }; }, "name": "close-square", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (CloseSquareTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CloudDownloadOutlined.js": /*!****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CloudDownloadOutlined.js ***! \****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CloudDownloadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M624 706.3h-74.1V464c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v242.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.7a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9z" } }, { "tag": "path", "attrs": { "d": "M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 01-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z" } }] }, "name": "cloud-download", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CloudDownloadOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CloudFilled.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CloudFilled.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CloudFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M811.4 418.7C765.6 297.9 648.9 212 512.2 212S258.8 297.8 213 418.6C127.3 441.1 64 519.1 64 612c0 110.5 89.5 200 199.9 200h496.2C870.5 812 960 722.5 960 612c0-92.7-63.1-170.7-148.6-193.3z" } }] }, "name": "cloud", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CloudFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CloudOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CloudOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CloudOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M811.4 418.7C765.6 297.9 648.9 212 512.2 212S258.8 297.8 213 418.6C127.3 441.1 64 519.1 64 612c0 110.5 89.5 200 199.9 200h496.2C870.5 812 960 722.5 960 612c0-92.7-63.1-170.7-148.6-193.3zm36.3 281a123.07 123.07 0 01-87.6 36.3H263.9c-33.1 0-64.2-12.9-87.6-36.3A123.3 123.3 0 01140 612c0-28 9.1-54.3 26.2-76.3a125.7 125.7 0 0166.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10c54.3 14.5 92.1 63.8 92.1 120 0 33.1-12.9 64.3-36.3 87.7z" } }] }, "name": "cloud", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CloudOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CloudServerOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CloudServerOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CloudServerOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z" } }, { "tag": "path", "attrs": { "d": "M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z" } }, { "tag": "path", "attrs": { "d": "M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z" } }] }, "name": "cloud-server", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CloudServerOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CloudSyncOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CloudSyncOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CloudSyncOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z" } }, { "tag": "path", "attrs": { "d": "M376.9 656.4c1.8-33.5 15.7-64.7 39.5-88.6 25.4-25.5 60-39.8 96-39.8 36.2 0 70.3 14.1 96 39.8 1.4 1.4 2.7 2.8 4.1 4.3l-25 19.6a8 8 0 003 14.1l98.2 24c5 1.2 9.9-2.6 9.9-7.7l.5-101.3c0-6.7-7.6-10.5-12.9-6.3L663 532.7c-36.6-42-90.4-68.6-150.5-68.6-107.4 0-195 85.1-199.4 191.7-.2 4.5 3.4 8.3 8 8.3H369c4.2-.1 7.7-3.4 7.9-7.7zM703 664h-47.9c-4.2 0-7.7 3.3-8 7.6-1.8 33.5-15.7 64.7-39.5 88.6-25.4 25.5-60 39.8-96 39.8-36.2 0-70.3-14.1-96-39.8-1.4-1.4-2.7-2.8-4.1-4.3l25-19.6a8 8 0 00-3-14.1l-98.2-24c-5-1.2-9.9 2.6-9.9 7.7l-.4 101.4c0 6.7 7.6 10.5 12.9 6.3l23.2-18.2c36.6 42 90.4 68.6 150.5 68.6 107.4 0 195-85.1 199.4-191.7.2-4.5-3.4-8.3-8-8.3z" } }] }, "name": "cloud-sync", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CloudSyncOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CloudTwoTone.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CloudTwoTone.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CloudTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M791.9 492l-37.8-10-13.8-36.5c-8.6-22.7-20.6-44.1-35.7-63.4a245.73 245.73 0 00-52.4-49.9c-41.1-28.9-89.5-44.2-140-44.2s-98.9 15.3-140 44.2a245.6 245.6 0 00-52.4 49.9 240.47 240.47 0 00-35.7 63.4l-13.9 36.6-37.9 9.9a125.7 125.7 0 00-66.1 43.7A123.1 123.1 0 00140 612c0 33.1 12.9 64.3 36.3 87.7 23.4 23.4 54.5 36.3 87.6 36.3h496.2c33.1 0 64.2-12.9 87.6-36.3A123.3 123.3 0 00884 612c0-56.2-37.8-105.5-92.1-120z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M811.4 418.7C765.6 297.9 648.9 212 512.2 212S258.8 297.8 213 418.6C127.3 441.1 64 519.1 64 612c0 110.5 89.5 200 199.9 200h496.2C870.5 812 960 722.5 960 612c0-92.7-63.1-170.7-148.6-193.3zm36.3 281a123.07 123.07 0 01-87.6 36.3H263.9c-33.1 0-64.2-12.9-87.6-36.3A123.3 123.3 0 01140 612c0-28 9.1-54.3 26.2-76.3a125.7 125.7 0 0166.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10c54.3 14.5 92.1 63.8 92.1 120 0 33.1-12.9 64.3-36.3 87.7z", "fill": primaryColor } }] }; }, "name": "cloud", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (CloudTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CloudUploadOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CloudUploadOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CloudUploadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M518.3 459a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V856c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V613.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 459z" } }, { "tag": "path", "attrs": { "d": "M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 01-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z" } }] }, "name": "cloud-upload", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CloudUploadOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ClusterOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ClusterOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ClusterOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M888 680h-54V540H546v-92h238c8.8 0 16-7.2 16-16V168c0-8.8-7.2-16-16-16H240c-8.8 0-16 7.2-16 16v264c0 8.8 7.2 16 16 16h238v92H190v140h-54c-4.4 0-8 3.6-8 8v176c0 4.4 3.6 8 8 8h176c4.4 0 8-3.6 8-8V688c0-4.4-3.6-8-8-8h-54v-72h220v72h-54c-4.4 0-8 3.6-8 8v176c0 4.4 3.6 8 8 8h176c4.4 0 8-3.6 8-8V688c0-4.4-3.6-8-8-8h-54v-72h220v72h-54c-4.4 0-8 3.6-8 8v176c0 4.4 3.6 8 8 8h176c4.4 0 8-3.6 8-8V688c0-4.4-3.6-8-8-8zM256 805.3c0 1.5-1.2 2.7-2.7 2.7h-58.7c-1.5 0-2.7-1.2-2.7-2.7v-58.7c0-1.5 1.2-2.7 2.7-2.7h58.7c1.5 0 2.7 1.2 2.7 2.7v58.7zm288 0c0 1.5-1.2 2.7-2.7 2.7h-58.7c-1.5 0-2.7-1.2-2.7-2.7v-58.7c0-1.5 1.2-2.7 2.7-2.7h58.7c1.5 0 2.7 1.2 2.7 2.7v58.7zM288 384V216h448v168H288zm544 421.3c0 1.5-1.2 2.7-2.7 2.7h-58.7c-1.5 0-2.7-1.2-2.7-2.7v-58.7c0-1.5 1.2-2.7 2.7-2.7h58.7c1.5 0 2.7 1.2 2.7 2.7v58.7zM360 300a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, "name": "cluster", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ClusterOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CodeFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CodeFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CodeFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM513.1 518.1l-192 161c-5.2 4.4-13.1.7-13.1-6.1v-62.7c0-2.3 1.1-4.6 2.9-6.1L420.7 512l-109.8-92.2a7.63 7.63 0 01-2.9-6.1V351c0-6.8 7.9-10.5 13.1-6.1l192 160.9c3.9 3.2 3.9 9.1 0 12.3zM716 673c0 4.4-3.4 8-7.5 8h-185c-4.1 0-7.5-3.6-7.5-8v-48c0-4.4 3.4-8 7.5-8h185c4.1 0 7.5 3.6 7.5 8v48z" } }] }, "name": "code", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CodeFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CodeOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CodeOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CodeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, "name": "code", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CodeOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CodeSandboxCircleFilled.js": /*!******************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CodeSandboxCircleFilled.js ***! \******************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CodeSandboxCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm243.7 589.2L512 794 268.3 653.2V371.8l110-63.6-.4-.2h.2L512 231l134 77h-.2l-.3.2 110.1 63.6v281.4zM307.9 536.7l87.6 49.9V681l96.7 55.9V524.8L307.9 418.4zm203.9-151.8L418 331l-91.1 52.6 185.2 107 185.2-106.9-91.4-52.8zm20 352l97.3-56.2v-94.1l87-49.5V418.5L531.8 525z" } }] }, "name": "code-sandbox-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CodeSandboxCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CodeSandboxOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CodeSandboxOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CodeSandboxOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M709.6 210l.4-.2h.2L512 96 313.9 209.8h-.2l.7.3L151.5 304v416L512 928l360.5-208V304l-162.9-94zM482.7 843.6L339.6 761V621.4L210 547.8V372.9l272.7 157.3v313.4zM238.2 321.5l134.7-77.8 138.9 79.7 139.1-79.9 135.2 78-273.9 158-274-158zM814 548.3l-128.8 73.1v139.1l-143.9 83V530.4L814 373.1v175.2z" } }] }, "name": "code-sandbox", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CodeSandboxOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CodeSandboxSquareFilled.js": /*!******************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CodeSandboxSquareFilled.js ***! \******************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CodeSandboxSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M307.9 536.7l87.6 49.9V681l96.7 55.9V524.8L307.9 418.4zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM755.7 653.2L512 794 268.3 653.2V371.8l110-63.6-.4-.2h.2L512 231l134 77h-.2l-.3.2 110.1 63.6v281.4zm-223.9 83.7l97.3-56.2v-94.1l87-49.5V418.5L531.8 525zm-20-352L418 331l-91.1 52.6 185.2 107 185.2-106.9-91.4-52.8z" } }] }, "name": "code-sandbox-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CodeSandboxSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CodeTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CodeTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CodeTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M184 840h656V184H184v656zm339.5-223h185c4.1 0 7.5 3.6 7.5 8v48c0 4.4-3.4 8-7.5 8h-185c-4.1 0-7.5-3.6-7.5-8v-48c0-4.4 3.4-8 7.5-8zM308 610.3c0-2.3 1.1-4.6 2.9-6.1L420.7 512l-109.8-92.2a7.63 7.63 0 01-2.9-6.1V351c0-6.8 7.9-10.5 13.1-6.1l192 160.9c3.9 3.2 3.9 9.1 0 12.3l-192 161c-5.2 4.4-13.1.7-13.1-6.1v-62.7z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M321.1 679.1l192-161c3.9-3.2 3.9-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48z", "fill": primaryColor } }] }; }, "name": "code", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (CodeTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CodepenCircleFilled.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CodepenCircleFilled.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CodepenCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M488.1 414.7V303.4L300.9 428l83.6 55.8zm254.1 137.7v-79.8l-59.8 39.9zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm278 533c0 1.1-.1 2.1-.2 3.1 0 .4-.1.7-.2 1a14.16 14.16 0 01-.8 3.2c-.2.6-.4 1.2-.6 1.7-.2.4-.4.8-.5 1.2-.3.5-.5 1.1-.8 1.6-.2.4-.4.7-.7 1.1-.3.5-.7 1-1 1.5-.3.4-.5.7-.8 1-.4.4-.8.9-1.2 1.3-.3.3-.6.6-1 .9-.4.4-.9.8-1.4 1.1-.4.3-.7.6-1.1.8-.1.1-.3.2-.4.3L525.2 786c-4 2.7-8.6 4-13.2 4-4.7 0-9.3-1.4-13.3-4L244.6 616.9c-.1-.1-.3-.2-.4-.3l-1.1-.8c-.5-.4-.9-.7-1.3-1.1-.3-.3-.6-.6-1-.9-.4-.4-.8-.8-1.2-1.3a7 7 0 01-.8-1c-.4-.5-.7-1-1-1.5-.2-.4-.5-.7-.7-1.1-.3-.5-.6-1.1-.8-1.6-.2-.4-.4-.8-.5-1.2-.2-.6-.4-1.2-.6-1.7-.1-.4-.3-.8-.4-1.2-.2-.7-.3-1.3-.4-2-.1-.3-.1-.7-.2-1-.1-1-.2-2.1-.2-3.1V427.9c0-1 .1-2.1.2-3.1.1-.3.1-.7.2-1a14.16 14.16 0 01.8-3.2c.2-.6.4-1.2.6-1.7.2-.4.4-.8.5-1.2.2-.5.5-1.1.8-1.6.2-.4.4-.7.7-1.1.6-.9 1.2-1.7 1.8-2.5.4-.4.8-.9 1.2-1.3.3-.3.6-.6 1-.9.4-.4.9-.8 1.3-1.1.4-.3.7-.6 1.1-.8.1-.1.3-.2.4-.3L498.7 239c8-5.3 18.5-5.3 26.5 0l254.1 169.1c.1.1.3.2.4.3l1.1.8 1.4 1.1c.3.3.6.6 1 .9.4.4.8.8 1.2 1.3.7.8 1.3 1.6 1.8 2.5.2.4.5.7.7 1.1.3.5.6 1 .8 1.6.2.4.4.8.5 1.2.2.6.4 1.2.6 1.7.1.4.3.8.4 1.2.2.7.3 1.3.4 2 .1.3.1.7.2 1 .1 1 .2 2.1.2 3.1V597zm-254.1 13.3v111.3L723.1 597l-83.6-55.8zM281.8 472.6v79.8l59.8-39.9zM512 456.1l-84.5 56.4 84.5 56.4 84.5-56.4zM723.1 428L535.9 303.4v111.3l103.6 69.1zM384.5 541.2L300.9 597l187.2 124.6V610.3l-103.6-69.1z" } }] }, "name": "codepen-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CodepenCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CodepenCircleOutlined.js": /*!****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CodepenCircleOutlined.js ***! \****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CodepenCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M488.1 414.7V303.4L300.9 428l83.6 55.8zm254.1 137.7v-79.8l-59.8 39.9zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm278 533c0 1.1-.1 2.1-.2 3.1 0 .4-.1.7-.2 1a14.16 14.16 0 01-.8 3.2c-.2.6-.4 1.2-.6 1.7-.2.4-.4.8-.5 1.2-.3.5-.5 1.1-.8 1.6-.2.4-.4.7-.7 1.1-.3.5-.7 1-1 1.5-.3.4-.5.7-.8 1-.4.4-.8.9-1.2 1.3-.3.3-.6.6-1 .9-.4.4-.9.8-1.4 1.1-.4.3-.7.6-1.1.8-.1.1-.3.2-.4.3L525.2 786c-4 2.7-8.6 4-13.2 4-4.7 0-9.3-1.4-13.3-4L244.6 616.9c-.1-.1-.3-.2-.4-.3l-1.1-.8c-.5-.4-.9-.7-1.3-1.1-.3-.3-.6-.6-1-.9-.4-.4-.8-.8-1.2-1.3a7 7 0 01-.8-1c-.4-.5-.7-1-1-1.5-.2-.4-.5-.7-.7-1.1-.3-.5-.6-1.1-.8-1.6-.2-.4-.4-.8-.5-1.2-.2-.6-.4-1.2-.6-1.7-.1-.4-.3-.8-.4-1.2-.2-.7-.3-1.3-.4-2-.1-.3-.1-.7-.2-1-.1-1-.2-2.1-.2-3.1V427.9c0-1 .1-2.1.2-3.1.1-.3.1-.7.2-1a14.16 14.16 0 01.8-3.2c.2-.6.4-1.2.6-1.7.2-.4.4-.8.5-1.2.2-.5.5-1.1.8-1.6.2-.4.4-.7.7-1.1.6-.9 1.2-1.7 1.8-2.5.4-.4.8-.9 1.2-1.3.3-.3.6-.6 1-.9.4-.4.9-.8 1.3-1.1.4-.3.7-.6 1.1-.8.1-.1.3-.2.4-.3L498.7 239c8-5.3 18.5-5.3 26.5 0l254.1 169.1c.1.1.3.2.4.3l1.1.8 1.4 1.1c.3.3.6.6 1 .9.4.4.8.8 1.2 1.3.7.8 1.3 1.6 1.8 2.5.2.4.5.7.7 1.1.3.5.6 1 .8 1.6.2.4.4.8.5 1.2.2.6.4 1.2.6 1.7.1.4.3.8.4 1.2.2.7.3 1.3.4 2 .1.3.1.7.2 1 .1 1 .2 2.1.2 3.1V597zm-254.1 13.3v111.3L723.1 597l-83.6-55.8zM281.8 472.6v79.8l59.8-39.9zM512 456.1l-84.5 56.4 84.5 56.4 84.5-56.4zM723.1 428L535.9 303.4v111.3l103.6 69.1zM384.5 541.2L300.9 597l187.2 124.6V610.3l-103.6-69.1z" } }] }, "name": "codepen-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CodepenCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CodepenOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CodepenOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CodepenOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M911.7 385.3l-.3-1.5c-.2-1-.3-1.9-.6-2.9-.2-.6-.4-1.1-.5-1.7-.3-.8-.5-1.7-.9-2.5-.2-.6-.5-1.1-.8-1.7-.4-.8-.8-1.5-1.2-2.3-.3-.5-.6-1.1-1-1.6-.8-1.2-1.7-2.4-2.6-3.6-.5-.6-1.1-1.3-1.7-1.9-.4-.5-.9-.9-1.4-1.3-.6-.6-1.3-1.1-1.9-1.6-.5-.4-1-.8-1.6-1.2-.2-.1-.4-.3-.6-.4L531.1 117.8a34.3 34.3 0 00-38.1 0L127.3 361.3c-.2.1-.4.3-.6.4-.5.4-1 .8-1.6 1.2-.7.5-1.3 1.1-1.9 1.6-.5.4-.9.9-1.4 1.3-.6.6-1.2 1.2-1.7 1.9-1 1.1-1.8 2.3-2.6 3.6-.3.5-.7 1-1 1.6-.4.7-.8 1.5-1.2 2.3-.3.5-.5 1.1-.8 1.7-.3.8-.6 1.7-.9 2.5-.2.6-.4 1.1-.5 1.7-.2.9-.4 1.9-.6 2.9l-.3 1.5c-.2 1.5-.3 3-.3 4.5v243.5c0 1.5.1 3 .3 4.5l.3 1.5.6 2.9c.2.6.3 1.1.5 1.7.3.9.6 1.7.9 2.5.2.6.5 1.1.8 1.7.4.8.7 1.5 1.2 2.3.3.5.6 1.1 1 1.6.5.7.9 1.4 1.5 2.1l1.2 1.5c.5.6 1.1 1.3 1.7 1.9.4.5.9.9 1.4 1.3.6.6 1.3 1.1 1.9 1.6.5.4 1 .8 1.6 1.2.2.1.4.3.6.4L493 905.7c5.6 3.8 12.3 5.8 19.1 5.8 6.6 0 13.3-1.9 19.1-5.8l365.6-243.5c.2-.1.4-.3.6-.4.5-.4 1-.8 1.6-1.2.7-.5 1.3-1.1 1.9-1.6.5-.4.9-.9 1.4-1.3.6-.6 1.2-1.2 1.7-1.9l1.2-1.5 1.5-2.1c.3-.5.7-1 1-1.6.4-.8.8-1.5 1.2-2.3.3-.5.5-1.1.8-1.7.3-.8.6-1.7.9-2.5.2-.5.4-1.1.5-1.7.3-.9.4-1.9.6-2.9l.3-1.5c.2-1.5.3-3 .3-4.5V389.8c-.3-1.5-.4-3-.6-4.5zM546.4 210.5l269.4 179.4-120.3 80.4-149-99.6V210.5zm-68.8 0v160.2l-149 99.6-120.3-80.4 269.3-179.4zM180.7 454.1l86 57.5-86 57.5v-115zm296.9 358.5L208.3 633.2l120.3-80.4 149 99.6v160.2zM512 592.8l-121.6-81.2L512 430.3l121.6 81.2L512 592.8zm34.4 219.8V652.4l149-99.6 120.3 80.4-269.3 179.4zM843.3 569l-86-57.5 86-57.5v115z" } }] }, "name": "codepen", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CodepenOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CodepenSquareFilled.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CodepenSquareFilled.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CodepenSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M723.1 428L535.9 303.4v111.3l103.6 69.1zM512 456.1l-84.5 56.4 84.5 56.4 84.5-56.4zm23.9 154.2v111.3L723.1 597l-83.6-55.8zm-151.4-69.1L300.9 597l187.2 124.6V610.3l-103.6-69.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-90 485c0 1.1-.1 2.1-.2 3.1 0 .4-.1.7-.2 1a14.16 14.16 0 01-.8 3.2c-.2.6-.4 1.2-.6 1.7-.2.4-.4.8-.5 1.2-.3.5-.5 1.1-.8 1.6-.2.4-.4.7-.7 1.1-.3.5-.7 1-1 1.5-.3.4-.5.7-.8 1-.4.4-.8.9-1.2 1.3-.3.3-.6.6-1 .9-.4.4-.9.8-1.4 1.1-.4.3-.7.6-1.1.8-.1.1-.3.2-.4.3L525.2 786c-4 2.7-8.6 4-13.2 4-4.7 0-9.3-1.4-13.3-4L244.6 616.9c-.1-.1-.3-.2-.4-.3l-1.1-.8c-.5-.4-.9-.7-1.3-1.1-.3-.3-.6-.6-1-.9-.4-.4-.8-.8-1.2-1.3a7 7 0 01-.8-1c-.4-.5-.7-1-1-1.5-.2-.4-.5-.7-.7-1.1-.3-.5-.6-1.1-.8-1.6-.2-.4-.4-.8-.5-1.2-.2-.6-.4-1.2-.6-1.7-.1-.4-.3-.8-.4-1.2-.2-.7-.3-1.3-.4-2-.1-.3-.1-.7-.2-1-.1-1-.2-2.1-.2-3.1V427.9c0-1 .1-2.1.2-3.1.1-.3.1-.7.2-1a14.16 14.16 0 01.8-3.2c.2-.6.4-1.2.6-1.7.2-.4.4-.8.5-1.2.2-.5.5-1.1.8-1.6.2-.4.4-.7.7-1.1.6-.9 1.2-1.7 1.8-2.5.4-.4.8-.9 1.2-1.3.3-.3.6-.6 1-.9.4-.4.9-.8 1.3-1.1.4-.3.7-.6 1.1-.8.1-.1.3-.2.4-.3L498.7 239c8-5.3 18.5-5.3 26.5 0l254.1 169.1c.1.1.3.2.4.3l1.1.8 1.4 1.1c.3.3.6.6 1 .9.4.4.8.8 1.2 1.3.7.8 1.3 1.6 1.8 2.5.2.4.5.7.7 1.1.3.5.6 1 .8 1.6.2.4.4.8.5 1.2.2.6.4 1.2.6 1.7.1.4.3.8.4 1.2.2.7.3 1.3.4 2 .1.3.1.7.2 1 .1 1 .2 2.1.2 3.1V597zm-47.8-44.6v-79.8l-59.8 39.9zm-460.4-79.8v79.8l59.8-39.9zm206.3-57.9V303.4L300.9 428l83.6 55.8z" } }] }, "name": "codepen-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CodepenSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CoffeeOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CoffeeOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CoffeeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M275 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm613 144H768c0-39.8-32.2-72-72-72H200c-39.8 0-72 32.2-72 72v248c0 3.4.2 6.7.7 9.9-.5 7-.7 14-.7 21.1 0 176.7 143.3 320 320 320 160.1 0 292.7-117.5 316.3-271H888c39.8 0 72-32.2 72-72V497c0-39.8-32.2-72-72-72zM696 681h-1.1c.7 7.6 1.1 15.2 1.1 23 0 137-111 248-248 248S200 841 200 704c0-7.8.4-15.4 1.1-23H200V425h496v256zm192-8H776V497h112v176zM613 281c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36zm-170 0c19.9 0 36-16.1 36-36V36c0-19.9-16.1-36-36-36s-36 16.1-36 36v209c0 19.9 16.1 36 36 36z" } }] }, "name": "coffee", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CoffeeOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ColumnHeightOutlined.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ColumnHeightOutlined.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ColumnHeightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M840 836H184c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h656c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm0-724H184c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h656c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM610.8 378c6 0 9.4-7 5.7-11.7L515.7 238.7a7.14 7.14 0 00-11.3 0L403.6 366.3a7.23 7.23 0 005.7 11.7H476v268h-62.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H548V378h62.8z" } }] }, "name": "column-height", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ColumnHeightOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ColumnWidthOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ColumnWidthOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ColumnWidthOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M180 176h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zm724 0h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zM785.3 504.3L657.7 403.6a7.23 7.23 0 00-11.7 5.7V476H378v-62.8c0-6-7-9.4-11.7-5.7L238.7 508.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h268v62.8c0 6 7 9.4 11.7 5.7l127.5-100.8c3.8-2.9 3.8-8.5.2-11.4z" } }] }, "name": "column-width", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ColumnWidthOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CommentOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CommentOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CommentOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M573 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40zm-280 0c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z" } }, { "tag": "path", "attrs": { "d": "M894 345a343.92 343.92 0 00-189-130v.1c-17.1-19-36.4-36.5-58-52.1-163.7-119-393.5-82.7-513 81-96.3 133-92.2 311.9 6 439l.8 132.6c0 3.2.5 6.4 1.5 9.4a31.95 31.95 0 0040.1 20.9L309 806c33.5 11.9 68.1 18.7 102.5 20.6l-.5.4c89.1 64.9 205.9 84.4 313 49l127.1 41.4c3.2 1 6.5 1.6 9.9 1.6 17.7 0 32-14.3 32-32V753c88.1-119.6 90.4-284.9 1-408zM323 735l-12-5-99 31-1-104-8-9c-84.6-103.2-90.2-251.9-11-361 96.4-132.2 281.2-161.4 413-66 132.2 96.1 161.5 280.6 66 412-80.1 109.9-223.5 150.5-348 102zm505-17l-8 10 1 104-98-33-12 5c-56 20.8-115.7 22.5-171 7l-.2-.1A367.31 367.31 0 00729 676c76.4-105.3 88.8-237.6 44.4-350.4l.6.4c23 16.5 44.1 37.1 62 62 72.6 99.6 68.5 235.2-8 330z" } }, { "tag": "path", "attrs": { "d": "M433 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z" } }] }, "name": "comment", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CommentOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CompassFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CompassFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CompassFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zM327.3 702.4c-2 .9-4.4 0-5.3-2.1-.4-1-.4-2.2 0-3.2l98.7-225.5 132.1 132.1-225.5 98.7zm375.1-375.1l-98.7 225.5-132.1-132.1L697.1 322c2-.9 4.4 0 5.3 2.1.4 1 .4 2.1 0 3.2z" } }] }, "name": "compass", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CompassFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CompassOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CompassOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CompassOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm198.4-588.1a32 32 0 00-24.5.5L414.9 415 296.4 686c-3.6 8.2-3.6 17.5 0 25.7 3.4 7.8 9.7 13.9 17.7 17 3.8 1.5 7.7 2.2 11.7 2.2 4.4 0 8.7-.9 12.8-2.7l271-118.6 118.5-271a32.06 32.06 0 00-17.7-42.7zM576.8 534.4l26.2 26.2-42.4 42.4-26.2-26.2L380 644.4 447.5 490 422 464.4l42.4-42.4 25.5 25.5L644.4 380l-67.6 154.4zM464.4 422L422 464.4l25.5 25.6 86.9 86.8 26.2 26.2 42.4-42.4-26.2-26.2-86.8-86.9z" } }] }, "name": "compass", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CompassOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CompassTwoTone.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CompassTwoTone.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CompassTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zM327.6 701.7c-2 .9-4.4 0-5.3-2.1-.4-1-.4-2.2 0-3.2L421 470.9 553.1 603l-225.5 98.7zm375.1-375.1L604 552.1 471.9 420l225.5-98.7c2-.9 4.4 0 5.3 2.1.4 1 .4 2.1 0 3.2z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M322.3 696.4c-.4 1-.4 2.2 0 3.2.9 2.1 3.3 3 5.3 2.1L553.1 603 421 470.9l-98.7 225.5zm375.1-375.1L471.9 420 604 552.1l98.7-225.5c.4-1.1.4-2.2 0-3.2-.9-2.1-3.3-3-5.3-2.1z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }] }; }, "name": "compass", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (CompassTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CompressOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CompressOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CompressOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M326 664H104c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h174v176c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V696c0-17.7-14.3-32-32-32zm16-576h-48c-8.8 0-16 7.2-16 16v176H104c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h222c17.7 0 32-14.3 32-32V104c0-8.8-7.2-16-16-16zm578 576H698c-17.7 0-32 14.3-32 32v224c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V744h174c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16zm0-384H746V104c0-8.8-7.2-16-16-16h-48c-8.8 0-16 7.2-16 16v224c0 17.7 14.3 32 32 32h222c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16z" } }] }, "name": "compress", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CompressOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ConsoleSqlOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ConsoleSqlOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ConsoleSqlOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M301.3 496.7c-23.8 0-40.2-10.5-41.6-26.9H205c.9 43.4 36.9 70.3 93.9 70.3 59.1 0 95-28.4 95-75.5 0-35.8-20-55.9-64.5-64.5l-29.1-5.6c-23.8-4.7-33.8-11.9-33.8-24.2 0-15 13.3-24.5 33.4-24.5 20.1 0 35.3 11.1 36.6 27h53c-.9-41.7-37.5-70.3-90.3-70.3-54.4 0-89.7 28.9-89.7 73 0 35.5 21.2 58 62.5 65.8l29.7 5.9c25.8 5.2 35.6 11.9 35.6 24.4.1 14.7-14.5 25.1-36 25.1z" } }, { "tag": "path", "attrs": { "d": "M928 140H96c-17.7 0-32 14.3-32 32v496c0 17.7 14.3 32 32 32h380v112H304c-8.8 0-16 7.2-16 16v48c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-48c0-8.8-7.2-16-16-16H548V700h380c17.7 0 32-14.3 32-32V172c0-17.7-14.3-32-32-32zm-40 488H136V212h752v416z" } }, { "tag": "path", "attrs": { "d": "M828.5 486.7h-95.8V308.5h-57.4V534h153.2zm-298.6 53.4c14.1 0 27.2-2 39.1-5.8l13.3 20.3h53.3L607.9 511c21.1-20 33-51.1 33-89.8 0-73.3-43.3-118.8-110.9-118.8s-111.2 45.3-111.2 118.8c-.1 73.7 43 118.9 111.1 118.9zm0-190c31.6 0 52.7 27.7 52.7 71.1 0 16.7-3.6 30.6-10 40.5l-5.2-6.9h-48.8L542 491c-3.9.9-8 1.4-12.2 1.4-31.7 0-52.8-27.5-52.8-71.2.1-43.6 21.2-71.1 52.9-71.1z" } }] }, "name": "console-sql", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ConsoleSqlOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ContactsFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ContactsFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ContactsFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 224H768v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H548v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H328v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H96c-17.7 0-32 14.3-32 32v576c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V256c0-17.7-14.3-32-32-32zM661 736h-43.9c-4.2 0-7.6-3.3-7.9-7.5-3.8-50.6-46-90.5-97.2-90.5s-93.4 40-97.2 90.5c-.3 4.2-3.7 7.5-7.9 7.5H363a8 8 0 01-8-8.4c2.8-53.3 32-99.7 74.6-126.1a111.8 111.8 0 01-29.1-75.5c0-61.9 49.9-112 111.4-112 61.5 0 111.4 50.1 111.4 112 0 29.1-11 55.5-29.1 75.5 42.7 26.5 71.8 72.8 74.6 126.1.4 4.6-3.2 8.4-7.8 8.4zM512 474c-28.5 0-51.7 23.3-51.7 52s23.2 52 51.7 52c28.5 0 51.7-23.3 51.7-52s-23.2-52-51.7-52z" } }] }, "name": "contacts", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (ContactsFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ContactsOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ContactsOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ContactsOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M594.3 601.5a111.8 111.8 0 0029.1-75.5c0-61.9-49.9-112-111.4-112s-111.4 50.1-111.4 112c0 29.1 11 55.5 29.1 75.5a158.09 158.09 0 00-74.6 126.1 8 8 0 008 8.4H407c4.2 0 7.6-3.3 7.9-7.5 3.8-50.6 46-90.5 97.2-90.5s93.4 40 97.2 90.5c.3 4.2 3.7 7.5 7.9 7.5H661a8 8 0 008-8.4c-2.8-53.3-32-99.7-74.7-126.1zM512 578c-28.5 0-51.7-23.3-51.7-52s23.2-52 51.7-52 51.7 23.3 51.7 52-23.2 52-51.7 52zm416-354H768v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H548v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H328v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H96c-17.7 0-32 14.3-32 32v576c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V256c0-17.7-14.3-32-32-32zm-40 568H136V296h120v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56h148v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56h148v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56h120v496z" } }] }, "name": "contacts", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ContactsOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ContactsTwoTone.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ContactsTwoTone.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ContactsTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M460.3 526a51.7 52 0 10103.4 0 51.7 52 0 10-103.4 0z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M768 352c0 4.4-3.6 8-8 8h-56c-4.4 0-8-3.6-8-8v-56H548v56c0 4.4-3.6 8-8 8h-56c-4.4 0-8-3.6-8-8v-56H328v56c0 4.4-3.6 8-8 8h-56c-4.4 0-8-3.6-8-8v-56H136v496h752V296H768v56zM661 736h-43.8c-4.2 0-7.6-3.3-7.9-7.5-3.8-50.5-46-90.5-97.2-90.5s-93.4 39.9-97.2 90.5c-.3 4.2-3.7 7.5-7.9 7.5h-43.9a8 8 0 01-8-8.4c2.8-53.3 31.9-99.6 74.6-126.1-18.1-20-29.1-46.4-29.1-75.5 0-61.9 49.9-112 111.4-112s111.4 50.1 111.4 112c0 29.1-11 55.6-29.1 75.5 42.7 26.4 71.9 72.8 74.7 126.1a8 8 0 01-8 8.4z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M594.3 601.5a111.8 111.8 0 0029.1-75.5c0-61.9-49.9-112-111.4-112s-111.4 50.1-111.4 112c0 29.1 11 55.5 29.1 75.5a158.09 158.09 0 00-74.6 126.1 8 8 0 008 8.4H407c4.2 0 7.6-3.3 7.9-7.5 3.8-50.6 46-90.5 97.2-90.5s93.4 40 97.2 90.5c.3 4.2 3.7 7.5 7.9 7.5H661a8 8 0 008-8.4c-2.8-53.3-32-99.7-74.7-126.1zM512 578c-28.5 0-51.7-23.3-51.7-52s23.2-52 51.7-52 51.7 23.3 51.7 52-23.2 52-51.7 52z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M928 224H768v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H548v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H328v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H96c-17.7 0-32 14.3-32 32v576c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V256c0-17.7-14.3-32-32-32zm-40 568H136V296h120v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56h148v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56h148v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56h120v496z", "fill": primaryColor } }] }; }, "name": "contacts", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (ContactsTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ContainerFilled.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ContainerFilled.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ContainerFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 64H192c-17.7 0-32 14.3-32 32v529c0-.6.4-1 1-1h219.3l5.2 24.7C397.6 708.5 450.8 752 512 752s114.4-43.5 126.4-103.3l5.2-24.7H863c.6 0 1 .4 1 1V96c0-17.7-14.3-32-32-32zM712 493c0 4.4-3.6 8-8 8H320c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h384c4.4 0 8 3.6 8 8v48zm0-160c0 4.4-3.6 8-8 8H320c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h384c4.4 0 8 3.6 8 8v48zm151 354H694.1c-11.6 32.8-32 62.3-59.1 84.7-34.5 28.6-78.2 44.3-123 44.3s-88.5-15.8-123-44.3a194.02 194.02 0 01-59.1-84.7H161c-.6 0-1-.4-1-1v242c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V686c0 .6-.4 1-1 1z" } }] }, "name": "container", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (ContainerFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ContainerOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ContainerOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ContainerOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-40 824H232V687h97.9c11.6 32.8 32 62.3 59.1 84.7 34.5 28.5 78.2 44.3 123 44.3s88.5-15.7 123-44.3c27.1-22.4 47.5-51.9 59.1-84.7H792v-63H643.6l-5.2 24.7C626.4 708.5 573.2 752 512 752s-114.4-43.5-126.5-103.3l-5.2-24.7H232V136h560v752zM320 341h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0 160h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z" } }] }, "name": "container", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ContainerOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ContainerTwoTone.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ContainerTwoTone.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ContainerTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M635 771.7c-34.5 28.6-78.2 44.3-123 44.3s-88.5-15.8-123-44.3a194.02 194.02 0 01-59.1-84.7H232v201h560V687h-97.9c-11.6 32.8-32 62.3-59.1 84.7z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M320 501h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-40 824H232V687h97.9c11.6 32.8 32 62.3 59.1 84.7 34.5 28.5 78.2 44.3 123 44.3s88.5-15.7 123-44.3c27.1-22.4 47.5-51.9 59.1-84.7H792v201zm0-264H643.6l-5.2 24.7C626.4 708.5 573.2 752 512 752s-114.4-43.5-126.5-103.3l-5.2-24.7H232V136h560v488z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M320 341h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z", "fill": primaryColor } }] }; }, "name": "container", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (ContainerTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ControlFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ControlFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ControlFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM404 683v77c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-77c-41.7-13.6-72-52.8-72-99s30.3-85.5 72-99V264c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v221c41.7 13.6 72 52.8 72 99s-30.3 85.5-72 99zm279.6-143.9c.2 0 .3-.1.4-.1v221c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V539c.2 0 .3.1.4.1-42-13.4-72.4-52.7-72.4-99.1 0-46.4 30.4-85.7 72.4-99.1-.2 0-.3.1-.4.1v-77c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v77c-.2 0-.3-.1-.4-.1 42 13.4 72.4 52.7 72.4 99.1 0 46.4-30.4 85.7-72.4 99.1zM616 440a36 36 0 1072 0 36 36 0 10-72 0zM403.4 566.5l-1.5-2.4c0-.1-.1-.1-.1-.2l-.9-1.2c-.1-.1-.2-.2-.2-.3-1-1.3-2-2.5-3.2-3.6l-.2-.2c-.4-.4-.8-.8-1.2-1.1-.8-.8-1.7-1.5-2.6-2.1h-.1l-1.2-.9c-.1-.1-.3-.2-.4-.3-1.2-.8-2.5-1.6-3.9-2.2-.2-.1-.5-.2-.7-.4-.4-.2-.7-.3-1.1-.5-.3-.1-.7-.3-1-.4-.5-.2-1-.4-1.5-.5-.4-.1-.9-.3-1.3-.4l-.9-.3-1.4-.3c-.2-.1-.5-.1-.7-.2-.7-.1-1.4-.3-2.1-.4-.2 0-.4 0-.6-.1-.6-.1-1.1-.1-1.7-.2-.2 0-.4 0-.7-.1-.8 0-1.5-.1-2.3-.1s-1.5 0-2.3.1c-.2 0-.4 0-.7.1-.6 0-1.2.1-1.7.2-.2 0-.4 0-.6.1-.7.1-1.4.2-2.1.4-.2.1-.5.1-.7.2l-1.4.3-.9.3c-.4.1-.9.3-1.3.4-.5.2-1 .4-1.5.5-.3.1-.7.3-1 .4-.4.2-.7.3-1.1.5-.2.1-.5.2-.7.4-1.3.7-2.6 1.4-3.9 2.2-.1.1-.3.2-.4.3l-1.2.9h-.1c-.9.7-1.8 1.4-2.6 2.1-.4.4-.8.7-1.2 1.1l-.2.2a54.8 54.8 0 00-3.2 3.6c-.1.1-.2.2-.2.3l-.9 1.2c0 .1-.1.1-.1.2l-1.5 2.4c-.1.2-.2.3-.3.5-2.7 5.1-4.3 10.9-4.3 17s1.6 12 4.3 17c.1.2.2.3.3.5l1.5 2.4c0 .1.1.1.1.2l.9 1.2c.1.1.2.2.2.3 1 1.3 2 2.5 3.2 3.6l.2.2c.4.4.8.8 1.2 1.1.8.8 1.7 1.5 2.6 2.1h.1l1.2.9c.1.1.3.2.4.3 1.2.8 2.5 1.6 3.9 2.2.2.1.5.2.7.4.4.2.7.3 1.1.5.3.1.7.3 1 .4.5.2 1 .4 1.5.5.4.1.9.3 1.3.4l.9.3 1.4.3c.2.1.5.1.7.2.7.1 1.4.3 2.1.4.2 0 .4 0 .6.1.6.1 1.1.1 1.7.2.2 0 .4 0 .7.1.8 0 1.5.1 2.3.1s1.5 0 2.3-.1c.2 0 .4 0 .7-.1.6 0 1.2-.1 1.7-.2.2 0 .4 0 .6-.1.7-.1 1.4-.2 2.1-.4.2-.1.5-.1.7-.2l1.4-.3.9-.3c.4-.1.9-.3 1.3-.4.5-.2 1-.4 1.5-.5.3-.1.7-.3 1-.4.4-.2.7-.3 1.1-.5.2-.1.5-.2.7-.4 1.3-.7 2.6-1.4 3.9-2.2.1-.1.3-.2.4-.3l1.2-.9h.1c.9-.7 1.8-1.4 2.6-2.1.4-.4.8-.7 1.2-1.1l.2-.2c1.1-1.1 2.2-2.4 3.2-3.6.1-.1.2-.2.2-.3l.9-1.2c0-.1.1-.1.1-.2l1.5-2.4c.1-.2.2-.3.3-.5 2.7-5.1 4.3-10.9 4.3-17s-1.6-12-4.3-17c-.1-.2-.2-.4-.3-.5z" } }] }, "name": "control", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (ControlFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ControlOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ControlOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ControlOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656zM340 683v77c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-77c-10.1 3.3-20.8 5-32 5s-21.9-1.8-32-5zm64-198V264c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v221c10.1-3.3 20.8-5 32-5s21.9 1.8 32 5zm-64 198c10.1 3.3 20.8 5 32 5s21.9-1.8 32-5c41.8-13.5 72-52.7 72-99s-30.2-85.5-72-99c-10.1-3.3-20.8-5-32-5s-21.9 1.8-32 5c-41.8 13.5-72 52.7-72 99s30.2 85.5 72 99zm.1-115.7c.3-.6.7-1.2 1-1.8v-.1l1.2-1.8c.1-.2.2-.3.3-.5.3-.5.7-.9 1-1.4.1-.1.2-.3.3-.4.5-.6.9-1.1 1.4-1.6l.3-.3 1.2-1.2.4-.4c.5-.5 1-.9 1.6-1.4.6-.5 1.1-.9 1.7-1.3.2-.1.3-.2.5-.3.5-.3.9-.7 1.4-1 .1-.1.3-.2.4-.3.6-.4 1.2-.7 1.9-1.1.1-.1.3-.1.4-.2.5-.3 1-.5 1.6-.8l.6-.3c.7-.3 1.3-.6 2-.8.7-.3 1.4-.5 2.1-.7.2-.1.4-.1.6-.2.6-.2 1.1-.3 1.7-.4.2 0 .3-.1.5-.1.7-.2 1.5-.3 2.2-.4.2 0 .3 0 .5-.1.6-.1 1.2-.1 1.8-.2h.6c.8 0 1.5-.1 2.3-.1s1.5 0 2.3.1h.6c.6 0 1.2.1 1.8.2.2 0 .3 0 .5.1.7.1 1.5.2 2.2.4.2 0 .3.1.5.1.6.1 1.2.3 1.7.4.2.1.4.1.6.2.7.2 1.4.4 2.1.7.7.2 1.3.5 2 .8l.6.3c.5.2 1.1.5 1.6.8.1.1.3.1.4.2.6.3 1.3.7 1.9 1.1.1.1.3.2.4.3.5.3 1 .6 1.4 1 .2.1.3.2.5.3.6.4 1.2.9 1.7 1.3s1.1.9 1.6 1.4l.4.4 1.2 1.2.3.3c.5.5 1 1.1 1.4 1.6.1.1.2.3.3.4.4.4.7.9 1 1.4.1.2.2.3.3.5l1.2 1.8s0 .1.1.1a36.18 36.18 0 015.1 18.5c0 6-1.5 11.7-4.1 16.7-.3.6-.7 1.2-1 1.8 0 0 0 .1-.1.1l-1.2 1.8c-.1.2-.2.3-.3.5-.3.5-.7.9-1 1.4-.1.1-.2.3-.3.4-.5.6-.9 1.1-1.4 1.6l-.3.3-1.2 1.2-.4.4c-.5.5-1 .9-1.6 1.4-.6.5-1.1.9-1.7 1.3-.2.1-.3.2-.5.3-.5.3-.9.7-1.4 1-.1.1-.3.2-.4.3-.6.4-1.2.7-1.9 1.1-.1.1-.3.1-.4.2-.5.3-1 .5-1.6.8l-.6.3c-.7.3-1.3.6-2 .8-.7.3-1.4.5-2.1.7-.2.1-.4.1-.6.2-.6.2-1.1.3-1.7.4-.2 0-.3.1-.5.1-.7.2-1.5.3-2.2.4-.2 0-.3 0-.5.1-.6.1-1.2.1-1.8.2h-.6c-.8 0-1.5.1-2.3.1s-1.5 0-2.3-.1h-.6c-.6 0-1.2-.1-1.8-.2-.2 0-.3 0-.5-.1-.7-.1-1.5-.2-2.2-.4-.2 0-.3-.1-.5-.1-.6-.1-1.2-.3-1.7-.4-.2-.1-.4-.1-.6-.2-.7-.2-1.4-.4-2.1-.7-.7-.2-1.3-.5-2-.8l-.6-.3c-.5-.2-1.1-.5-1.6-.8-.1-.1-.3-.1-.4-.2-.6-.3-1.3-.7-1.9-1.1-.1-.1-.3-.2-.4-.3-.5-.3-1-.6-1.4-1-.2-.1-.3-.2-.5-.3-.6-.4-1.2-.9-1.7-1.3s-1.1-.9-1.6-1.4l-.4-.4-1.2-1.2-.3-.3c-.5-.5-1-1.1-1.4-1.6-.1-.1-.2-.3-.3-.4-.4-.4-.7-.9-1-1.4-.1-.2-.2-.3-.3-.5l-1.2-1.8v-.1c-.4-.6-.7-1.2-1-1.8-2.6-5-4.1-10.7-4.1-16.7s1.5-11.7 4.1-16.7zM620 539v221c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V539c-10.1 3.3-20.8 5-32 5s-21.9-1.8-32-5zm64-198v-77c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v77c10.1-3.3 20.8-5 32-5s21.9 1.8 32 5zm-64 198c10.1 3.3 20.8 5 32 5s21.9-1.8 32-5c41.8-13.5 72-52.7 72-99s-30.2-85.5-72-99c-10.1-3.3-20.8-5-32-5s-21.9 1.8-32 5c-41.8 13.5-72 52.7-72 99s30.2 85.5 72 99zm.1-115.7c.3-.6.7-1.2 1-1.8v-.1l1.2-1.8c.1-.2.2-.3.3-.5.3-.5.7-.9 1-1.4.1-.1.2-.3.3-.4.5-.6.9-1.1 1.4-1.6l.3-.3 1.2-1.2.4-.4c.5-.5 1-.9 1.6-1.4.6-.5 1.1-.9 1.7-1.3.2-.1.3-.2.5-.3.5-.3.9-.7 1.4-1 .1-.1.3-.2.4-.3.6-.4 1.2-.7 1.9-1.1.1-.1.3-.1.4-.2.5-.3 1-.5 1.6-.8l.6-.3c.7-.3 1.3-.6 2-.8.7-.3 1.4-.5 2.1-.7.2-.1.4-.1.6-.2.6-.2 1.1-.3 1.7-.4.2 0 .3-.1.5-.1.7-.2 1.5-.3 2.2-.4.2 0 .3 0 .5-.1.6-.1 1.2-.1 1.8-.2h.6c.8 0 1.5-.1 2.3-.1s1.5 0 2.3.1h.6c.6 0 1.2.1 1.8.2.2 0 .3 0 .5.1.7.1 1.5.2 2.2.4.2 0 .3.1.5.1.6.1 1.2.3 1.7.4.2.1.4.1.6.2.7.2 1.4.4 2.1.7.7.2 1.3.5 2 .8l.6.3c.5.2 1.1.5 1.6.8.1.1.3.1.4.2.6.3 1.3.7 1.9 1.1.1.1.3.2.4.3.5.3 1 .6 1.4 1 .2.1.3.2.5.3.6.4 1.2.9 1.7 1.3s1.1.9 1.6 1.4l.4.4 1.2 1.2.3.3c.5.5 1 1.1 1.4 1.6.1.1.2.3.3.4.4.4.7.9 1 1.4.1.2.2.3.3.5l1.2 1.8v.1a36.18 36.18 0 015.1 18.5c0 6-1.5 11.7-4.1 16.7-.3.6-.7 1.2-1 1.8v.1l-1.2 1.8c-.1.2-.2.3-.3.5-.3.5-.7.9-1 1.4-.1.1-.2.3-.3.4-.5.6-.9 1.1-1.4 1.6l-.3.3-1.2 1.2-.4.4c-.5.5-1 .9-1.6 1.4-.6.5-1.1.9-1.7 1.3-.2.1-.3.2-.5.3-.5.3-.9.7-1.4 1-.1.1-.3.2-.4.3-.6.4-1.2.7-1.9 1.1-.1.1-.3.1-.4.2-.5.3-1 .5-1.6.8l-.6.3c-.7.3-1.3.6-2 .8-.7.3-1.4.5-2.1.7-.2.1-.4.1-.6.2-.6.2-1.1.3-1.7.4-.2 0-.3.1-.5.1-.7.2-1.5.3-2.2.4-.2 0-.3 0-.5.1-.6.1-1.2.1-1.8.2h-.6c-.8 0-1.5.1-2.3.1s-1.5 0-2.3-.1h-.6c-.6 0-1.2-.1-1.8-.2-.2 0-.3 0-.5-.1-.7-.1-1.5-.2-2.2-.4-.2 0-.3-.1-.5-.1-.6-.1-1.2-.3-1.7-.4-.2-.1-.4-.1-.6-.2-.7-.2-1.4-.4-2.1-.7-.7-.2-1.3-.5-2-.8l-.6-.3c-.5-.2-1.1-.5-1.6-.8-.1-.1-.3-.1-.4-.2-.6-.3-1.3-.7-1.9-1.1-.1-.1-.3-.2-.4-.3-.5-.3-1-.6-1.4-1-.2-.1-.3-.2-.5-.3-.6-.4-1.2-.9-1.7-1.3s-1.1-.9-1.6-1.4l-.4-.4-1.2-1.2-.3-.3c-.5-.5-1-1.1-1.4-1.6-.1-.1-.2-.3-.3-.4-.4-.4-.7-.9-1-1.4-.1-.2-.2-.3-.3-.5l-1.2-1.8v-.1c-.4-.6-.7-1.2-1-1.8-2.6-5-4.1-10.7-4.1-16.7s1.5-11.7 4.1-16.7z" } }] }, "name": "control", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ControlOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ControlTwoTone.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ControlTwoTone.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ControlTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M616 440a36 36 0 1072 0 36 36 0 10-72 0zM340.4 601.5l1.5 2.4c0 .1.1.1.1.2l.9 1.2c.1.1.2.2.2.3 1 1.3 2 2.5 3.2 3.6l.2.2c.4.4.8.8 1.2 1.1.8.8 1.7 1.5 2.6 2.1h.1l1.2.9c.1.1.3.2.4.3 1.2.8 2.5 1.6 3.9 2.2.2.1.5.2.7.4.4.2.7.3 1.1.5.3.1.7.3 1 .4.5.2 1 .4 1.5.5.4.1.9.3 1.3.4l.9.3 1.4.3c.2.1.5.1.7.2.7.1 1.4.3 2.1.4.2 0 .4 0 .6.1.6.1 1.1.1 1.7.2.2 0 .4 0 .7.1.8 0 1.5.1 2.3.1s1.5 0 2.3-.1c.2 0 .4 0 .7-.1.6 0 1.2-.1 1.7-.2.2 0 .4 0 .6-.1.7-.1 1.4-.2 2.1-.4.2-.1.5-.1.7-.2l1.4-.3.9-.3c.4-.1.9-.3 1.3-.4.5-.2 1-.4 1.5-.5.3-.1.7-.3 1-.4.4-.2.7-.3 1.1-.5.2-.1.5-.2.7-.4 1.3-.7 2.6-1.4 3.9-2.2.1-.1.3-.2.4-.3l1.2-.9h.1c.9-.7 1.8-1.4 2.6-2.1.4-.4.8-.7 1.2-1.1l.2-.2c1.1-1.1 2.2-2.4 3.2-3.6.1-.1.2-.2.2-.3l.9-1.2c0-.1.1-.1.1-.2l1.5-2.4c.1-.2.2-.3.3-.5 2.7-5.1 4.3-10.9 4.3-17s-1.6-12-4.3-17c-.1-.2-.2-.4-.3-.5l-1.5-2.4c0-.1-.1-.1-.1-.2l-.9-1.2c-.1-.1-.2-.2-.2-.3-1-1.3-2-2.5-3.2-3.6l-.2-.2c-.4-.4-.8-.8-1.2-1.1-.8-.8-1.7-1.5-2.6-2.1h-.1l-1.2-.9c-.1-.1-.3-.2-.4-.3-1.2-.8-2.5-1.6-3.9-2.2-.2-.1-.5-.2-.7-.4-.4-.2-.7-.3-1.1-.5-.3-.1-.7-.3-1-.4-.5-.2-1-.4-1.5-.5-.4-.1-.9-.3-1.3-.4l-.9-.3-1.4-.3c-.2-.1-.5-.1-.7-.2-.7-.1-1.4-.3-2.1-.4-.2 0-.4 0-.6-.1-.6-.1-1.1-.1-1.7-.2-.2 0-.4 0-.7-.1-.8 0-1.5-.1-2.3-.1s-1.5 0-2.3.1c-.2 0-.4 0-.7.1-.6 0-1.2.1-1.7.2-.2 0-.4 0-.6.1-.7.1-1.4.2-2.1.4-.2.1-.5.1-.7.2l-1.4.3-.9.3c-.4.1-.9.3-1.3.4-.5.2-1 .4-1.5.5-.3.1-.7.3-1 .4-.4.2-.7.3-1.1.5-.2.1-.5.2-.7.4-1.3.7-2.6 1.4-3.9 2.2-.1.1-.3.2-.4.3l-1.2.9h-.1c-.9.7-1.8 1.4-2.6 2.1-.4.4-.8.7-1.2 1.1l-.2.2a54.8 54.8 0 00-3.2 3.6c-.1.1-.2.2-.2.3l-.9 1.2c0 .1-.1.1-.1.2l-1.5 2.4c-.1.2-.2.3-.3.5-2.7 5.1-4.3 10.9-4.3 17s1.6 12 4.3 17c.1.2.2.3.3.5z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M184 840h656V184H184v656zm436.4-499.1c-.2 0-.3.1-.4.1v-77c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v77c-.2 0-.3-.1-.4-.1 42 13.4 72.4 52.7 72.4 99.1 0 46.4-30.4 85.7-72.4 99.1.2 0 .3-.1.4-.1v221c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V539c.2 0 .3.1.4.1-42-13.4-72.4-52.7-72.4-99.1 0-46.4 30.4-85.7 72.4-99.1zM340 485V264c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v221c41.7 13.6 72 52.8 72 99s-30.3 85.5-72 99v77c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-77c-41.7-13.6-72-52.8-72-99s30.3-85.5 72-99z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M340 683v77c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-77c41.7-13.5 72-52.8 72-99s-30.3-85.4-72-99V264c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v221c-41.7 13.5-72 52.8-72 99s30.3 85.4 72 99zm.1-116c.1-.2.2-.3.3-.5l1.5-2.4c0-.1.1-.1.1-.2l.9-1.2c0-.1.1-.2.2-.3 1-1.2 2.1-2.5 3.2-3.6l.2-.2c.4-.4.8-.7 1.2-1.1.8-.7 1.7-1.4 2.6-2.1h.1l1.2-.9c.1-.1.3-.2.4-.3 1.3-.8 2.6-1.5 3.9-2.2.2-.2.5-.3.7-.4.4-.2.7-.3 1.1-.5.3-.1.7-.3 1-.4.5-.1 1-.3 1.5-.5.4-.1.9-.3 1.3-.4l.9-.3 1.4-.3c.2-.1.5-.1.7-.2.7-.2 1.4-.3 2.1-.4.2-.1.4-.1.6-.1.5-.1 1.1-.2 1.7-.2.3-.1.5-.1.7-.1.8-.1 1.5-.1 2.3-.1s1.5.1 2.3.1c.3.1.5.1.7.1.6.1 1.1.1 1.7.2.2.1.4.1.6.1.7.1 1.4.3 2.1.4.2.1.5.1.7.2l1.4.3.9.3c.4.1.9.3 1.3.4.5.1 1 .3 1.5.5.3.1.7.3 1 .4.4.2.7.3 1.1.5.2.2.5.3.7.4 1.4.6 2.7 1.4 3.9 2.2.1.1.3.2.4.3l1.2.9h.1c.9.6 1.8 1.3 2.6 2.1.4.3.8.7 1.2 1.1l.2.2c1.2 1.1 2.2 2.3 3.2 3.6 0 .1.1.2.2.3l.9 1.2c0 .1.1.1.1.2l1.5 2.4A36.03 36.03 0 01408 584c0 6.1-1.6 11.9-4.3 17-.1.2-.2.3-.3.5l-1.5 2.4c0 .1-.1.1-.1.2l-.9 1.2c0 .1-.1.2-.2.3-1 1.2-2.1 2.5-3.2 3.6l-.2.2c-.4.4-.8.7-1.2 1.1-.8.7-1.7 1.4-2.6 2.1h-.1l-1.2.9c-.1.1-.3.2-.4.3-1.3.8-2.6 1.5-3.9 2.2-.2.2-.5.3-.7.4-.4.2-.7.3-1.1.5-.3.1-.7.3-1 .4-.5.1-1 .3-1.5.5-.4.1-.9.3-1.3.4l-.9.3-1.4.3c-.2.1-.5.1-.7.2-.7.2-1.4.3-2.1.4-.2.1-.4.1-.6.1-.5.1-1.1.2-1.7.2-.3.1-.5.1-.7.1-.8.1-1.5.1-2.3.1s-1.5-.1-2.3-.1c-.3-.1-.5-.1-.7-.1-.6-.1-1.1-.1-1.7-.2-.2-.1-.4-.1-.6-.1-.7-.1-1.4-.3-2.1-.4-.2-.1-.5-.1-.7-.2l-1.4-.3-.9-.3c-.4-.1-.9-.3-1.3-.4-.5-.1-1-.3-1.5-.5-.3-.1-.7-.3-1-.4-.4-.2-.7-.3-1.1-.5-.2-.2-.5-.3-.7-.4-1.4-.6-2.7-1.4-3.9-2.2-.1-.1-.3-.2-.4-.3l-1.2-.9h-.1c-.9-.6-1.8-1.3-2.6-2.1-.4-.3-.8-.7-1.2-1.1l-.2-.2c-1.2-1.1-2.2-2.3-3.2-3.6 0-.1-.1-.2-.2-.3l-.9-1.2c0-.1-.1-.1-.1-.2l-1.5-2.4c-.1-.2-.2-.3-.3-.5-2.7-5-4.3-10.9-4.3-17s1.6-11.9 4.3-17zm280.3-27.9c-.1 0-.2-.1-.4-.1v221c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V539c-.1 0-.2.1-.4.1 42-13.4 72.4-52.7 72.4-99.1 0-46.4-30.4-85.7-72.4-99.1.1 0 .2.1.4.1v-77c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v77c.1 0 .2-.1.4-.1-42 13.4-72.4 52.7-72.4 99.1 0 46.4 30.4 85.7 72.4 99.1zM652 404c19.9 0 36 16.1 36 36s-16.1 36-36 36-36-16.1-36-36 16.1-36 36-36z", "fill": primaryColor } }] }; }, "name": "control", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (ControlTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CopyFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CopyFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CopyFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM382 896h-.2L232 746.2v-.2h150v150z" } }] }, "name": "copy", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CopyFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CopyOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CopyOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CopyOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z" } }] }, "name": "copy", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CopyOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CopyTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CopyTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CopyTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M232 706h142c22.1 0 40 17.9 40 40v142h250V264H232v442z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z", "fill": primaryColor } }] }; }, "name": "copy", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (CopyTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CopyrightCircleFilled.js": /*!****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CopyrightCircleFilled.js ***! \****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CopyrightCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm5.4 670c-110 0-173.4-73.2-173.4-194.9v-52.3C344 364.2 407.4 290 517.3 290c94.3 0 162.7 60.7 162.7 147.4 0 2.6-2.1 4.7-4.7 4.7h-56.7c-4.2 0-7.6-3.2-8-7.4-4-49.5-40-83.4-93-83.4-65.3 0-102.1 48.5-102.1 135.5v52.6c0 85.7 36.9 133.6 102.1 133.6 52.8 0 88.7-31.7 93-77.8.4-4.1 3.8-7.3 8-7.3h56.8c2.6 0 4.7 2.1 4.7 4.7 0 82.6-68.7 141.4-162.7 141.4z" } }] }, "name": "copyright-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CopyrightCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CopyrightCircleOutlined.js": /*!******************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CopyrightCircleOutlined.js ***! \******************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CopyrightCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm5.6-532.7c53 0 89 33.8 93 83.4.3 4.2 3.8 7.4 8 7.4h56.7c2.6 0 4.7-2.1 4.7-4.7 0-86.7-68.4-147.4-162.7-147.4C407.4 290 344 364.2 344 486.8v52.3C344 660.8 407.4 734 517.3 734c94 0 162.7-58.8 162.7-141.4 0-2.6-2.1-4.7-4.7-4.7h-56.8c-4.2 0-7.6 3.2-8 7.3-4.2 46.1-40.1 77.8-93 77.8-65.3 0-102.1-47.9-102.1-133.6v-52.6c.1-87 37-135.5 102.2-135.5z" } }] }, "name": "copyright-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CopyrightCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CopyrightCircleTwoTone.js": /*!*****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CopyrightCircleTwoTone.js ***! \*****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CopyrightCircleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm5.5 533c52.9 0 88.8-31.7 93-77.8.4-4.1 3.8-7.3 8-7.3h56.8c2.6 0 4.7 2.1 4.7 4.7 0 82.6-68.7 141.4-162.7 141.4C407.4 734 344 660.8 344 539.1v-52.3C344 364.2 407.4 290 517.3 290c94.3 0 162.7 60.7 162.7 147.4 0 2.6-2.1 4.7-4.7 4.7h-56.7c-4.2 0-7.7-3.2-8-7.4-4-49.6-40-83.4-93-83.4-65.2 0-102.1 48.5-102.2 135.5v52.6c0 85.7 36.8 133.6 102.1 133.6z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M517.6 351.3c53 0 89 33.8 93 83.4.3 4.2 3.8 7.4 8 7.4h56.7c2.6 0 4.7-2.1 4.7-4.7 0-86.7-68.4-147.4-162.7-147.4C407.4 290 344 364.2 344 486.8v52.3C344 660.8 407.4 734 517.3 734c94 0 162.7-58.8 162.7-141.4 0-2.6-2.1-4.7-4.7-4.7h-56.8c-4.2 0-7.6 3.2-8 7.3-4.2 46.1-40.1 77.8-93 77.8-65.3 0-102.1-47.9-102.1-133.6v-52.6c.1-87 37-135.5 102.2-135.5z", "fill": primaryColor } }] }; }, "name": "copyright-circle", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (CopyrightCircleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CopyrightOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CopyrightOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CopyrightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm5.6-532.7c53 0 89 33.8 93 83.4.3 4.2 3.8 7.4 8 7.4h56.7c2.6 0 4.7-2.1 4.7-4.7 0-86.7-68.4-147.4-162.7-147.4C407.4 290 344 364.2 344 486.8v52.3C344 660.8 407.4 734 517.3 734c94 0 162.7-58.8 162.7-141.4 0-2.6-2.1-4.7-4.7-4.7h-56.8c-4.2 0-7.6 3.2-8 7.3-4.2 46.1-40.1 77.8-93 77.8-65.3 0-102.1-47.9-102.1-133.6v-52.6c.1-87 37-135.5 102.2-135.5z" } }] }, "name": "copyright", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CopyrightOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CopyrightTwoTone.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CopyrightTwoTone.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CopyrightTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm5.5 533c52.9 0 88.8-31.7 93-77.8.4-4.1 3.8-7.3 8-7.3h56.8c2.6 0 4.7 2.1 4.7 4.7 0 82.6-68.7 141.4-162.7 141.4C407.4 734 344 660.8 344 539.1v-52.3C344 364.2 407.4 290 517.3 290c94.3 0 162.7 60.7 162.7 147.4 0 2.6-2.1 4.7-4.7 4.7h-56.7c-4.2 0-7.7-3.2-8-7.4-4-49.6-40-83.4-93-83.4-65.2 0-102.1 48.5-102.2 135.5v52.6c0 85.7 36.8 133.6 102.1 133.6z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M517.6 351.3c53 0 89 33.8 93 83.4.3 4.2 3.8 7.4 8 7.4h56.7c2.6 0 4.7-2.1 4.7-4.7 0-86.7-68.4-147.4-162.7-147.4C407.4 290 344 364.2 344 486.8v52.3C344 660.8 407.4 734 517.3 734c94 0 162.7-58.8 162.7-141.4 0-2.6-2.1-4.7-4.7-4.7h-56.8c-4.2 0-7.6 3.2-8 7.3-4.2 46.1-40.1 77.8-93 77.8-65.3 0-102.1-47.9-102.1-133.6v-52.6c.1-87 37-135.5 102.2-135.5z", "fill": primaryColor } }] }; }, "name": "copyright", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (CopyrightTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CreditCardFilled.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CreditCardFilled.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CreditCardFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 160H96c-17.7 0-32 14.3-32 32v160h896V192c0-17.7-14.3-32-32-32zM64 832c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V440H64v392zm579-184c0-4.4 3.6-8 8-8h165c4.4 0 8 3.6 8 8v72c0 4.4-3.6 8-8 8H651c-4.4 0-8-3.6-8-8v-72z" } }] }, "name": "credit-card", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CreditCardFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CreditCardOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CreditCardOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CreditCardOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-792 72h752v120H136V232zm752 560H136V440h752v352zm-237-64h165c4.4 0 8-3.6 8-8v-72c0-4.4-3.6-8-8-8H651c-4.4 0-8 3.6-8 8v72c0 4.4 3.6 8 8 8z" } }] }, "name": "credit-card", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CreditCardOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CreditCardTwoTone.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CreditCardTwoTone.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CreditCardTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M136 792h752V440H136v352zm507-144c0-4.4 3.6-8 8-8h165c4.4 0 8 3.6 8 8v72c0 4.4-3.6 8-8 8H651c-4.4 0-8-3.6-8-8v-72zM136 232h752v120H136z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M651 728h165c4.4 0 8-3.6 8-8v-72c0-4.4-3.6-8-8-8H651c-4.4 0-8 3.6-8 8v72c0 4.4 3.6 8 8 8z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136V440h752v352zm0-440H136V232h752v120z", "fill": primaryColor } }] }; }, "name": "credit-card", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (CreditCardTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CrownFilled.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CrownFilled.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CrownFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zM512 734.2c-62.1 0-112.6-50.5-112.6-112.6S449.9 509 512 509s112.6 50.5 112.6 112.6S574.1 734.2 512 734.2zm0-160.9c-26.6 0-48.2 21.6-48.2 48.3 0 26.6 21.6 48.3 48.2 48.3s48.2-21.6 48.2-48.3c0-26.6-21.6-48.3-48.2-48.3z" } }] }, "name": "crown", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CrownFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CrownOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CrownOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CrownOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z" } }] }, "name": "crown", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CrownOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CrownTwoTone.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CrownTwoTone.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CrownTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M911.9 283.9v.5L835.5 865c-1 8-7.9 14-15.9 14H204.5c-8.1 0-14.9-6.1-16-14l-76.4-580.6v-.6 1.6L188.5 866c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.1-.5.1-1 0-1.5z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M773.6 810.6l53.9-409.4-139.8 86.1L512 252.9 336.3 487.3l-139.8-86.1 53.8 409.4h523.3zm-374.2-189c0-62.1 50.5-112.6 112.6-112.6s112.6 50.5 112.6 112.6v1c0 62.1-50.5 112.6-112.6 112.6s-112.6-50.5-112.6-112.6v-1z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M512 734.2c61.9 0 112.3-50.2 112.6-112.1v-.5c0-62.1-50.5-112.6-112.6-112.6s-112.6 50.5-112.6 112.6v.5c.3 61.9 50.7 112.1 112.6 112.1zm0-160.9c26.6 0 48.2 21.6 48.2 48.3 0 26.6-21.6 48.3-48.2 48.3s-48.2-21.6-48.2-48.3c0-26.6 21.6-48.3 48.2-48.3z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6v-.5c.3-6.4-6.7-10.8-12.3-7.4L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.5-3.4-12.6.9-12.2 7.3v.6L188.5 865zm147.8-377.7L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4H250.3l-53.8-409.4 139.8 86.1z", "fill": primaryColor } }] }; }, "name": "crown", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (CrownTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CustomerServiceFilled.js": /*!****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CustomerServiceFilled.js ***! \****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CustomerServiceFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 128c-212.1 0-384 171.9-384 384v360c0 13.3 10.7 24 24 24h184c35.3 0 64-28.7 64-64V624c0-35.3-28.7-64-64-64H200v-48c0-172.3 139.7-312 312-312s312 139.7 312 312v48H688c-35.3 0-64 28.7-64 64v208c0 35.3 28.7 64 64 64h184c13.3 0 24-10.7 24-24V512c0-212.1-171.9-384-384-384z" } }] }, "name": "customer-service", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (CustomerServiceFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CustomerServiceOutlined.js": /*!******************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CustomerServiceOutlined.js ***! \******************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CustomerServiceOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 128c-212.1 0-384 171.9-384 384v360c0 13.3 10.7 24 24 24h184c35.3 0 64-28.7 64-64V624c0-35.3-28.7-64-64-64H200v-48c0-172.3 139.7-312 312-312s312 139.7 312 312v48H688c-35.3 0-64 28.7-64 64v208c0 35.3 28.7 64 64 64h184c13.3 0 24-10.7 24-24V512c0-212.1-171.9-384-384-384zM328 632v192H200V632h128zm496 192H696V632h128v192z" } }] }, "name": "customer-service", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (CustomerServiceOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/CustomerServiceTwoTone.js": /*!*****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/CustomerServiceTwoTone.js ***! \*****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var CustomerServiceTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M696 632h128v192H696zm-496 0h128v192H200z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M512 128c-212.1 0-384 171.9-384 384v360c0 13.3 10.7 24 24 24h184c35.3 0 64-28.7 64-64V624c0-35.3-28.7-64-64-64H200v-48c0-172.3 139.7-312 312-312s312 139.7 312 312v48H688c-35.3 0-64 28.7-64 64v208c0 35.3 28.7 64 64 64h184c13.3 0 24-10.7 24-24V512c0-212.1-171.9-384-384-384zM328 632v192H200V632h128zm496 192H696V632h128v192z", "fill": primaryColor } }] }; }, "name": "customer-service", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (CustomerServiceTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DashOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DashOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DashOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M112 476h160v72H112zm320 0h160v72H432zm320 0h160v72H752z" } }] }, "name": "dash", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DashOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DashboardFilled.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DashboardFilled.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DashboardFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM482 232c0-4.4 3.6-8 8-8h44c4.4 0 8 3.6 8 8v80c0 4.4-3.6 8-8 8h-44c-4.4 0-8-3.6-8-8v-80zM270 582c0 4.4-3.6 8-8 8h-80c-4.4 0-8-3.6-8-8v-44c0-4.4 3.6-8 8-8h80c4.4 0 8 3.6 8 8v44zm90.7-204.5l-31.1 31.1a8.03 8.03 0 01-11.3 0L261.7 352a8.03 8.03 0 010-11.3l31.1-31.1c3.1-3.1 8.2-3.1 11.3 0l56.6 56.6c3.1 3.1 3.1 8.2 0 11.3zm291.1 83.6l-84.5 84.5c5 18.7.2 39.4-14.5 54.1a55.95 55.95 0 01-79.2 0 55.95 55.95 0 010-79.2 55.87 55.87 0 0154.1-14.5l84.5-84.5c3.1-3.1 8.2-3.1 11.3 0l28.3 28.3c3.1 3.1 3.1 8.1 0 11.3zm43-52.4l-31.1-31.1a8.03 8.03 0 010-11.3l56.6-56.6c3.1-3.1 8.2-3.1 11.3 0l31.1 31.1c3.1 3.1 3.1 8.2 0 11.3l-56.6 56.6a8.03 8.03 0 01-11.3 0zM846 582c0 4.4-3.6 8-8 8h-80c-4.4 0-8-3.6-8-8v-44c0-4.4 3.6-8 8-8h80c4.4 0 8 3.6 8 8v44z" } }] }, "name": "dashboard", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (DashboardFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DashboardOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DashboardOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DashboardOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z" } }] }, "name": "dashboard", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DashboardOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DashboardTwoTone.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DashboardTwoTone.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DashboardTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 188c-99.3 0-192.7 38.7-263 109-70.3 70.2-109 163.6-109 263 0 105.6 44.5 205.5 122.6 276h498.8A371.12 371.12 0 00884 560c0-99.3-38.7-192.7-109-263-70.2-70.3-163.6-109-263-109zm-30 44c0-4.4 3.6-8 8-8h44c4.4 0 8 3.6 8 8v80c0 4.4-3.6 8-8 8h-44c-4.4 0-8-3.6-8-8v-80zM270 582c0 4.4-3.6 8-8 8h-80c-4.4 0-8-3.6-8-8v-44c0-4.4 3.6-8 8-8h80c4.4 0 8 3.6 8 8v44zm90.7-204.4l-31.1 31.1a8.03 8.03 0 01-11.3 0l-56.6-56.6a8.03 8.03 0 010-11.3l31.1-31.1c3.1-3.1 8.2-3.1 11.3 0l56.6 56.6c3.1 3.1 3.1 8.2 0 11.3zm291.1 83.5l-84.5 84.5c5 18.7.2 39.4-14.5 54.1a55.95 55.95 0 01-79.2 0 55.95 55.95 0 010-79.2 55.87 55.87 0 0154.1-14.5l84.5-84.5c3.1-3.1 8.2-3.1 11.3 0l28.3 28.3c3.1 3.1 3.1 8.2 0 11.3zm43-52.4l-31.1-31.1a8.03 8.03 0 010-11.3l56.6-56.6c3.1-3.1 8.2-3.1 11.3 0l31.1 31.1c3.1 3.1 3.1 8.2 0 11.3l-56.6 56.6a8.03 8.03 0 01-11.3 0zM846 538v44c0 4.4-3.6 8-8 8h-80c-4.4 0-8-3.6-8-8v-44c0-4.4 3.6-8 8-8h80c4.4 0 8 3.6 8 8z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M762.7 340.8l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zM750 538v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zM304.1 309.7a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z", "fill": primaryColor } }] }; }, "name": "dashboard", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (DashboardTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DatabaseFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DatabaseFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DatabaseFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 64H192c-17.7 0-32 14.3-32 32v224h704V96c0-17.7-14.3-32-32-32zM288 232c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zM160 928c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V704H160v224zm128-136c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40zM160 640h704V384H160v256zm128-168c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40z" } }] }, "name": "database", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (DatabaseFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DatabaseOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DatabaseOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DatabaseOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, "name": "database", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DatabaseOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DatabaseTwoTone.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DatabaseTwoTone.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DatabaseTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M232 616h560V408H232v208zm112-144c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40zM232 888h560V680H232v208zm112-144c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40zM232 344h560V136H232v208zm112-144c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M304 512a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0-544a40 40 0 1080 0 40 40 0 10-80 0z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-40 824H232V680h560v208zm0-272H232V408h560v208zm0-272H232V136h560v208z", "fill": primaryColor } }] }; }, "name": "database", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (DatabaseTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DeleteColumnOutlined.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DeleteColumnOutlined.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DeleteColumnOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M651.1 641.9a7.84 7.84 0 00-5.1-1.9h-54.7c-2.4 0-4.6 1.1-6.1 2.9L512 730.7l-73.1-87.8a8.1 8.1 0 00-6.1-2.9H378c-1.9 0-3.7.7-5.1 1.9a7.97 7.97 0 00-1 11.3L474.2 776 371.8 898.9a8.06 8.06 0 006.1 13.2h54.7c2.4 0 4.6-1.1 6.1-2.9l73.1-87.8 73.1 87.8a8.1 8.1 0 006.1 2.9h55c1.9 0 3.7-.7 5.1-1.9 3.4-2.8 3.9-7.9 1-11.3L549.8 776l102.4-122.9c2.8-3.4 2.3-8.4-1.1-11.2zM472 544h80c4.4 0 8-3.6 8-8V120c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v416c0 4.4 3.6 8 8 8zM350 386H184V136c0-3.3-2.7-6-6-6h-60c-3.3 0-6 2.7-6 6v292c0 16.6 13.4 30 30 30h208c3.3 0 6-2.7 6-6v-60c0-3.3-2.7-6-6-6zm556-256h-60c-3.3 0-6 2.7-6 6v250H674c-3.3 0-6 2.7-6 6v60c0 3.3 2.7 6 6 6h208c16.6 0 30-13.4 30-30V136c0-3.3-2.7-6-6-6z" } }] }, "name": "delete-column", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DeleteColumnOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DeleteFilled.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DeleteFilled.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DeleteFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z" } }] }, "name": "delete", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (DeleteFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DeleteOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DeleteOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DeleteOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" } }] }, "name": "delete", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DeleteOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DeleteRowOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DeleteRowOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DeleteRowOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M819.8 512l102.4-122.9a8.06 8.06 0 00-6.1-13.2h-54.7c-2.4 0-4.6 1.1-6.1 2.9L782 466.7l-73.1-87.8a8.1 8.1 0 00-6.1-2.9H648c-1.9 0-3.7.7-5.1 1.9a7.97 7.97 0 00-1 11.3L744.2 512 641.8 634.9a8.06 8.06 0 006.1 13.2h54.7c2.4 0 4.6-1.1 6.1-2.9l73.1-87.8 73.1 87.8a8.1 8.1 0 006.1 2.9h55c1.9 0 3.7-.7 5.1-1.9 3.4-2.8 3.9-7.9 1-11.3L819.8 512zM536 464H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h416c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8zm-84 204h-60c-3.3 0-6 2.7-6 6v166H136c-3.3 0-6 2.7-6 6v60c0 3.3 2.7 6 6 6h292c16.6 0 30-13.4 30-30V674c0-3.3-2.7-6-6-6zM136 184h250v166c0 3.3 2.7 6 6 6h60c3.3 0 6-2.7 6-6V142c0-16.6-13.4-30-30-30H136c-3.3 0-6 2.7-6 6v60c0 3.3 2.7 6 6 6z" } }] }, "name": "delete-row", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DeleteRowOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DeleteTwoTone.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DeleteTwoTone.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DeleteTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M292.7 840h438.6l24.2-512h-487z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-504-72h304v72H360v-72zm371.3 656H292.7l-24.2-512h487l-24.2 512z", "fill": primaryColor } }] }; }, "name": "delete", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (DeleteTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DeliveredProcedureOutlined.js": /*!*********************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DeliveredProcedureOutlined.js ***! \*********************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DeliveredProcedureOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M632 698.3l141.9-112a8 8 0 000-12.6L632 461.7c-5.3-4.2-13-.4-13 6.3v76H295c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h324v76c0 6.7 7.8 10.4 13 6.3zm261.3-405L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v278c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V422c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-83.5c0-17-6.7-33.2-18.7-45.2zM640 288H384V184h256v104zm264 436h-56c-4.4 0-8 3.6-8 8v108H184V732c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v148c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V732c0-4.4-3.6-8-8-8z" } }] }, "name": "delivered-procedure", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DeliveredProcedureOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DeploymentUnitOutlined.js": /*!*****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DeploymentUnitOutlined.js ***! \*****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DeploymentUnitOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M888.3 693.2c-42.5-24.6-94.3-18-129.2 12.8l-53-30.7V523.6c0-15.7-8.4-30.3-22-38.1l-136-78.3v-67.1c44.2-15 76-56.8 76-106.1 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 49.3 31.8 91.1 76 106.1v67.1l-136 78.3c-13.6 7.8-22 22.4-22 38.1v151.6l-53 30.7c-34.9-30.8-86.8-37.4-129.2-12.8-53.5 31-71.7 99.4-41 152.9 30.8 53.5 98.9 71.9 152.2 41 42.5-24.6 62.7-73 53.6-118.8l48.7-28.3 140.6 81c6.8 3.9 14.4 5.9 22 5.9s15.2-2 22-5.9L674.5 740l48.7 28.3c-9.1 45.7 11.2 94.2 53.6 118.8 53.3 30.9 121.5 12.6 152.2-41 30.8-53.6 12.6-122-40.7-152.9zm-673 138.4a47.6 47.6 0 01-65.2-17.6c-13.2-22.9-5.4-52.3 17.5-65.5a47.6 47.6 0 0165.2 17.6c13.2 22.9 5.4 52.3-17.5 65.5zM522 463.8zM464 234a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm170 446.2l-122 70.3-122-70.3V539.8l122-70.3 122 70.3v140.4zm239.9 133.9c-13.2 22.9-42.4 30.8-65.2 17.6-22.8-13.2-30.7-42.6-17.5-65.5s42.4-30.8 65.2-17.6c22.9 13.2 30.7 42.5 17.5 65.5z" } }] }, "name": "deployment-unit", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DeploymentUnitOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DesktopOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DesktopOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DesktopOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 140H96c-17.7 0-32 14.3-32 32v496c0 17.7 14.3 32 32 32h380v112H304c-8.8 0-16 7.2-16 16v48c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-48c0-8.8-7.2-16-16-16H548V700h380c17.7 0 32-14.3 32-32V172c0-17.7-14.3-32-32-32zm-40 488H136V212h752v416z" } }] }, "name": "desktop", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DesktopOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DiffFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DiffFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DiffFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.2 306.6L611.3 72.9c-6-5.7-13.9-8.9-22.2-8.9H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h277l219 210.6V824c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V329.6c0-8.7-3.5-17-9.8-23zM553.4 201.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v704c0 17.7 14.3 32 32 32h512c17.7 0 32-14.3 32-32V397.3c0-8.5-3.4-16.6-9.4-22.6L553.4 201.4zM568 753c0 3.8-3.4 7-7.5 7h-225c-4.1 0-7.5-3.2-7.5-7v-42c0-3.8 3.4-7 7.5-7h225c4.1 0 7.5 3.2 7.5 7v42zm0-220c0 3.8-3.4 7-7.5 7H476v84.9c0 3.9-3.1 7.1-7 7.1h-42c-3.8 0-7-3.2-7-7.1V540h-84.5c-4.1 0-7.5-3.2-7.5-7v-42c0-3.9 3.4-7 7.5-7H420v-84.9c0-3.9 3.2-7.1 7-7.1h42c3.9 0 7 3.2 7 7.1V484h84.5c4.1 0 7.5 3.1 7.5 7v42z" } }] }, "name": "diff", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (DiffFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DiffOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DiffOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DiffOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M476 399.1c0-3.9-3.1-7.1-7-7.1h-42c-3.8 0-7 3.2-7 7.1V484h-84.5c-4.1 0-7.5 3.1-7.5 7v42c0 3.8 3.4 7 7.5 7H420v84.9c0 3.9 3.2 7.1 7 7.1h42c3.9 0 7-3.2 7-7.1V540h84.5c4.1 0 7.5-3.2 7.5-7v-42c0-3.9-3.4-7-7.5-7H476v-84.9zM560.5 704h-225c-4.1 0-7.5 3.2-7.5 7v42c0 3.8 3.4 7 7.5 7h225c4.1 0 7.5-3.2 7.5-7v-42c0-3.8-3.4-7-7.5-7zm-7.1-502.6c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v704c0 17.7 14.3 32 32 32h512c17.7 0 32-14.3 32-32V397.3c0-8.5-3.4-16.6-9.4-22.6L553.4 201.4zM664 888H232V264h282.2L664 413.8V888zm190.2-581.4L611.3 72.9c-6-5.7-13.9-8.9-22.2-8.9H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h277l219 210.6V824c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V329.6c0-8.7-3.5-17-9.8-23z" } }] }, "name": "diff", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DiffOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DiffTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DiffTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DiffTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M232 264v624h432V413.8L514.2 264H232zm336 489c0 3.8-3.4 7-7.5 7h-225c-4.1 0-7.5-3.2-7.5-7v-42c0-3.8 3.4-7 7.5-7h225c4.1 0 7.5 3.2 7.5 7v42zm0-262v42c0 3.8-3.4 7-7.5 7H476v84.9c0 3.9-3.1 7.1-7 7.1h-42c-3.8 0-7-3.2-7-7.1V540h-84.5c-4.1 0-7.5-3.2-7.5-7v-42c0-3.9 3.4-7 7.5-7H420v-84.9c0-3.9 3.2-7.1 7-7.1h42c3.9 0 7 3.2 7 7.1V484h84.5c4.1 0 7.5 3.1 7.5 7z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M854.2 306.6L611.3 72.9c-6-5.7-13.9-8.9-22.2-8.9H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h277l219 210.6V824c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V329.6c0-8.7-3.5-17-9.8-23z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M553.4 201.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v704c0 17.7 14.3 32 32 32h512c17.7 0 32-14.3 32-32V397.3c0-8.5-3.4-16.6-9.4-22.6L553.4 201.4zM664 888H232V264h282.2L664 413.8V888z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M476 399.1c0-3.9-3.1-7.1-7-7.1h-42c-3.8 0-7 3.2-7 7.1V484h-84.5c-4.1 0-7.5 3.1-7.5 7v42c0 3.8 3.4 7 7.5 7H420v84.9c0 3.9 3.2 7.1 7 7.1h42c3.9 0 7-3.2 7-7.1V540h84.5c4.1 0 7.5-3.2 7.5-7v-42c0-3.9-3.4-7-7.5-7H476v-84.9zM560.5 704h-225c-4.1 0-7.5 3.2-7.5 7v42c0 3.8 3.4 7 7.5 7h225c4.1 0 7.5-3.2 7.5-7v-42c0-3.8-3.4-7-7.5-7z", "fill": primaryColor } }] }; }, "name": "diff", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (DiffTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DingdingOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DingdingOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DingdingOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M573.7 252.5C422.5 197.4 201.3 96.7 201.3 96.7c-15.7-4.1-17.9 11.1-17.9 11.1-5 61.1 33.6 160.5 53.6 182.8 19.9 22.3 319.1 113.7 319.1 113.7S326 357.9 270.5 341.9c-55.6-16-37.9 17.8-37.9 17.8 11.4 61.7 64.9 131.8 107.2 138.4 42.2 6.6 220.1 4 220.1 4s-35.5 4.1-93.2 11.9c-42.7 5.8-97 12.5-111.1 17.8-33.1 12.5 24 62.6 24 62.6 84.7 76.8 129.7 50.5 129.7 50.5 33.3-10.7 61.4-18.5 85.2-24.2L565 743.1h84.6L603 928l205.3-271.9H700.8l22.3-38.7c.3.5.4.8.4.8S799.8 496.1 829 433.8l.6-1h-.1c5-10.8 8.6-19.7 10-25.8 17-71.3-114.5-99.4-265.8-154.5z" } }] }, "name": "dingding", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DingdingOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DingtalkCircleFilled.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DingtalkCircleFilled.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DingtalkCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm227 385.3c-1 4.2-3.5 10.4-7 17.8h.1l-.4.7c-20.3 43.1-73.1 127.7-73.1 127.7s-.1-.2-.3-.5l-15.5 26.8h74.5L575.1 810l32.3-128h-58.6l20.4-84.7c-16.5 3.9-35.9 9.4-59 16.8 0 0-31.2 18.2-89.9-35 0 0-39.6-34.7-16.6-43.4 9.8-3.7 47.4-8.4 77-12.3 40-5.4 64.6-8.2 64.6-8.2S422 517 392.7 512.5c-29.3-4.6-66.4-53.1-74.3-95.8 0 0-12.2-23.4 26.3-12.3 38.5 11.1 197.9 43.2 197.9 43.2s-207.4-63.3-221.2-78.7c-13.8-15.4-40.6-84.2-37.1-126.5 0 0 1.5-10.5 12.4-7.7 0 0 153.3 69.7 258.1 107.9 104.8 37.9 195.9 57.3 184.2 106.7z" } }] }, "name": "dingtalk-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (DingtalkCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DingtalkOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DingtalkOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DingtalkOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M573.7 252.5C422.5 197.4 201.3 96.7 201.3 96.7c-15.7-4.1-17.9 11.1-17.9 11.1-5 61.1 33.6 160.5 53.6 182.8 19.9 22.3 319.1 113.7 319.1 113.7S326 357.9 270.5 341.9c-55.6-16-37.9 17.8-37.9 17.8 11.4 61.7 64.9 131.8 107.2 138.4 42.2 6.6 220.1 4 220.1 4s-35.5 4.1-93.2 11.9c-42.7 5.8-97 12.5-111.1 17.8-33.1 12.5 24 62.6 24 62.6 84.7 76.8 129.7 50.5 129.7 50.5 33.3-10.7 61.4-18.5 85.2-24.2L565 743.1h84.6L603 928l205.3-271.9H700.8l22.3-38.7c.3.5.4.8.4.8S799.8 496.1 829 433.8l.6-1h-.1c5-10.8 8.6-19.7 10-25.8 17-71.3-114.5-99.4-265.8-154.5z" } }] }, "name": "dingtalk", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DingtalkOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DingtalkSquareFilled.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DingtalkSquareFilled.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DingtalkSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM739 449.3c-1 4.2-3.5 10.4-7 17.8h.1l-.4.7c-20.3 43.1-73.1 127.7-73.1 127.7s-.1-.2-.3-.5l-15.5 26.8h74.5L575.1 810l32.3-128h-58.6l20.4-84.7c-16.5 3.9-35.9 9.4-59 16.8 0 0-31.2 18.2-89.9-35 0 0-39.6-34.7-16.6-43.4 9.8-3.7 47.4-8.4 77-12.3 40-5.4 64.6-8.2 64.6-8.2S422 517 392.7 512.5c-29.3-4.6-66.4-53.1-74.3-95.8 0 0-12.2-23.4 26.3-12.3 38.5 11.1 197.9 43.2 197.9 43.2s-207.4-63.3-221.2-78.7c-13.8-15.4-40.6-84.2-37.1-126.5 0 0 1.5-10.5 12.4-7.7 0 0 153.3 69.7 258.1 107.9 104.8 37.9 195.9 57.3 184.2 106.7z" } }] }, "name": "dingtalk-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (DingtalkSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DisconnectOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DisconnectOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DisconnectOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832.6 191.4c-84.6-84.6-221.5-84.6-306 0l-96.9 96.9 51 51 96.9-96.9c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204l-96.9 96.9 51.1 51.1 96.9-96.9c84.4-84.6 84.4-221.5-.1-306.1zM446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l96.9-96.9-51.1-51.1-96.9 96.9c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l96.9-96.9-51-51-96.8 97zM260.3 209.4a8.03 8.03 0 00-11.3 0L209.4 249a8.03 8.03 0 000 11.3l554.4 554.4c3.1 3.1 8.2 3.1 11.3 0l39.6-39.6c3.1-3.1 3.1-8.2 0-11.3L260.3 209.4z" } }] }, "name": "disconnect", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DisconnectOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DislikeFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DislikeFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DislikeFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M885.9 490.3c3.6-12 5.4-24.4 5.4-37 0-28.3-9.3-55.5-26.1-77.7 3.6-12 5.4-24.4 5.4-37 0-28.3-9.3-55.5-26.1-77.7 3.6-12 5.4-24.4 5.4-37 0-51.6-30.7-98.1-78.3-118.4a66.1 66.1 0 00-26.5-5.4H273v428h.3l85.8 310.8C372.9 889 418.9 924 470.9 924c29.7 0 57.4-11.8 77.9-33.4 20.5-21.5 31-49.7 29.5-79.4l-6-122.9h239.9c12.1 0 23.9-3.2 34.3-9.3 40.4-23.5 65.5-66.1 65.5-111 0-28.3-9.3-55.5-26.1-77.7zM112 132v364c0 17.7 14.3 32 32 32h65V100h-65c-17.7 0-32 14.3-32 32z" } }] }, "name": "dislike", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (DislikeFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DislikeOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DislikeOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DislikeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M885.9 490.3c3.6-12 5.4-24.4 5.4-37 0-28.3-9.3-55.5-26.1-77.7 3.6-12 5.4-24.4 5.4-37 0-28.3-9.3-55.5-26.1-77.7 3.6-12 5.4-24.4 5.4-37 0-51.6-30.7-98.1-78.3-118.4a66.1 66.1 0 00-26.5-5.4H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h129.3l85.8 310.8C372.9 889 418.9 924 470.9 924c29.7 0 57.4-11.8 77.9-33.4 20.5-21.5 31-49.7 29.5-79.4l-6-122.9h239.9c12.1 0 23.9-3.2 34.3-9.3 40.4-23.5 65.5-66.1 65.5-111 0-28.3-9.3-55.5-26.1-77.7zM184 456V172h81v284h-81zm627.2 160.4H496.8l9.6 198.4c.6 11.9-4.7 23.1-14.6 30.5-6.1 4.5-13.6 6.8-21.1 6.7a44.28 44.28 0 01-42.2-32.3L329 459.2V172h415.4a56.85 56.85 0 0133.6 51.8c0 9.7-2.3 18.9-6.9 27.3l-13.9 25.4 21.9 19a56.76 56.76 0 0119.6 43c0 9.7-2.3 18.9-6.9 27.3l-13.9 25.4 21.9 19a56.76 56.76 0 0119.6 43c0 9.7-2.3 18.9-6.9 27.3l-14 25.5 21.9 19a56.76 56.76 0 0119.6 43c0 19.1-11 37.5-28.8 48.4z" } }] }, "name": "dislike", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DislikeOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DislikeTwoTone.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DislikeTwoTone.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DislikeTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M273 100.1v428h.3l-.3-428zM820.4 525l-21.9-19 14-25.5a56.2 56.2 0 006.9-27.3c0-16.5-7.1-32.2-19.6-43l-21.9-19 13.9-25.4a56.2 56.2 0 006.9-27.3c0-16.5-7.1-32.2-19.6-43l-21.9-19 13.9-25.4a56.2 56.2 0 006.9-27.3c0-22.4-13.2-42.6-33.6-51.8H345v345.2c18.6 67.2 46.4 168 83.5 302.5a44.28 44.28 0 0042.2 32.3c7.5.1 15-2.2 21.1-6.7 9.9-7.4 15.2-18.6 14.6-30.5l-9.6-198.4h314.4C829 605.5 840 587.1 840 568c0-16.5-7.1-32.2-19.6-43z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M112 132v364c0 17.7 14.3 32 32 32h65V100h-65c-17.7 0-32 14.3-32 32zm773.9 358.3c3.6-12 5.4-24.4 5.4-37 0-28.3-9.3-55.5-26.1-77.7 3.6-12 5.4-24.4 5.4-37 0-28.3-9.3-55.5-26.1-77.7 3.6-12 5.4-24.4 5.4-37 0-51.6-30.7-98.1-78.3-118.4a66.1 66.1 0 00-26.5-5.4H273l.3 428 85.8 310.8C372.9 889 418.9 924 470.9 924c29.7 0 57.4-11.8 77.9-33.4 20.5-21.5 31-49.7 29.5-79.4l-6-122.9h239.9c12.1 0 23.9-3.2 34.3-9.3 40.4-23.5 65.5-66.1 65.5-111 0-28.3-9.3-55.5-26.1-77.7zm-74.7 126.1H496.8l9.6 198.4c.6 11.9-4.7 23.1-14.6 30.5-6.1 4.5-13.6 6.8-21.1 6.7a44.28 44.28 0 01-42.2-32.3c-37.1-134.4-64.9-235.2-83.5-302.5V172h399.4a56.85 56.85 0 0133.6 51.8c0 9.7-2.3 18.9-6.9 27.3l-13.9 25.4 21.9 19a56.76 56.76 0 0119.6 43c0 9.7-2.3 18.9-6.9 27.3l-13.9 25.4 21.9 19a56.76 56.76 0 0119.6 43c0 9.7-2.3 18.9-6.9 27.3l-14 25.5 21.9 19a56.76 56.76 0 0119.6 43c0 19.1-11 37.5-28.8 48.4z", "fill": primaryColor } }] }; }, "name": "dislike", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (DislikeTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DollarCircleFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DollarCircleFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DollarCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm22.3 665.2l.2 31.7c0 4.4-3.6 8.1-8 8.1h-28.4c-4.4 0-8-3.6-8-8v-31.4C401.3 723 359.5 672.4 355 617.4c-.4-4.7 3.3-8.7 8-8.7h46.2c3.9 0 7.3 2.8 7.9 6.6 5.1 31.7 29.8 55.4 74.1 61.3V533.9l-24.7-6.3c-52.3-12.5-102.1-45.1-102.1-112.7 0-72.9 55.4-112.1 126.2-119v-33c0-4.4 3.6-8 8-8h28.1c4.4 0 8 3.6 8 8v32.7c68.5 6.9 119.9 46.9 125.9 109.2.5 4.7-3.2 8.8-8 8.8h-44.9c-4 0-7.4-3-7.9-6.9-4-29.2-27.4-53-65.5-58.2v134.3l25.4 5.9c64.8 16 108.9 47 108.9 116.4 0 75.3-56 117.3-134.3 124.1zM426.6 410.3c0 25.4 15.7 45.1 49.5 57.3 4.7 1.9 9.4 3.4 15 5v-124c-36.9 4.7-64.5 25.4-64.5 61.7zm116.5 135.2c-2.8-.6-5.6-1.3-8.8-2.2V677c42.6-3.8 72-27.2 72-66.4 0-30.7-15.9-50.7-63.2-65.1z" } }] }, "name": "dollar-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (DollarCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DollarCircleOutlined.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DollarCircleOutlined.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DollarCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm47.7-395.2l-25.4-5.9V348.6c38 5.2 61.5 29 65.5 58.2.5 4 3.9 6.9 7.9 6.9h44.9c4.7 0 8.4-4.1 8-8.8-6.1-62.3-57.4-102.3-125.9-109.2V263c0-4.4-3.6-8-8-8h-28.1c-4.4 0-8 3.6-8 8v33c-70.8 6.9-126.2 46-126.2 119 0 67.6 49.8 100.2 102.1 112.7l24.7 6.3v142.7c-44.2-5.9-69-29.5-74.1-61.3-.6-3.8-4-6.6-7.9-6.6H363c-4.7 0-8.4 4-8 8.7 4.5 55 46.2 105.6 135.2 112.1V761c0 4.4 3.6 8 8 8h28.4c4.4 0 8-3.6 8-8.1l-.2-31.7c78.3-6.9 134.3-48.8 134.3-124-.1-69.4-44.2-100.4-109-116.4zm-68.6-16.2c-5.6-1.6-10.3-3.1-15-5-33.8-12.2-49.5-31.9-49.5-57.3 0-36.3 27.5-57 64.5-61.7v124zM534.3 677V543.3c3.1.9 5.9 1.6 8.8 2.2 47.3 14.4 63.2 34.4 63.2 65.1 0 39.1-29.4 62.6-72 66.4z" } }] }, "name": "dollar-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DollarCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DollarCircleTwoTone.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DollarCircleTwoTone.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DollarCircleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M426.6 410.3c0 25.4 15.7 45.1 49.5 57.3 4.7 1.9 9.4 3.4 15 5v-124c-37 4.7-64.5 25.4-64.5 61.7zm116.5 135.2c-2.9-.6-5.7-1.3-8.8-2.2V677c42.6-3.8 72-27.3 72-66.4 0-30.7-15.9-50.7-63.2-65.1z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm22.4 589.2l.2 31.7c0 4.5-3.6 8.1-8 8.1h-28.4c-4.4 0-8-3.6-8-8v-31.4c-89-6.5-130.7-57.1-135.2-112.1-.4-4.7 3.3-8.7 8-8.7h46.2c3.9 0 7.3 2.8 7.9 6.6 5.1 31.8 29.9 55.4 74.1 61.3V534l-24.7-6.3c-52.3-12.5-102.1-45.1-102.1-112.7 0-73 55.4-112.1 126.2-119v-33c0-4.4 3.6-8 8-8h28.1c4.4 0 8 3.6 8 8v32.7c68.5 6.9 119.8 46.9 125.9 109.2a8.1 8.1 0 01-8 8.8h-44.9c-4 0-7.4-2.9-7.9-6.9-4-29.2-27.5-53-65.5-58.2v134.3l25.4 5.9c64.8 16 108.9 47 109 116.4 0 75.2-56 117.1-134.3 124z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M559.7 488.8l-25.4-5.9V348.6c38 5.2 61.5 29 65.5 58.2.5 4 3.9 6.9 7.9 6.9h44.9c4.7 0 8.4-4.1 8-8.8-6.1-62.3-57.4-102.3-125.9-109.2V263c0-4.4-3.6-8-8-8h-28.1c-4.4 0-8 3.6-8 8v33c-70.8 6.9-126.2 46-126.2 119 0 67.6 49.8 100.2 102.1 112.7l24.7 6.3v142.7c-44.2-5.9-69-29.5-74.1-61.3-.6-3.8-4-6.6-7.9-6.6H363c-4.7 0-8.4 4-8 8.7 4.5 55 46.2 105.6 135.2 112.1V761c0 4.4 3.6 8 8 8h28.4c4.4 0 8-3.6 8-8.1l-.2-31.7c78.3-6.9 134.3-48.8 134.3-124-.1-69.4-44.2-100.4-109-116.4zm-68.6-16.2c-5.6-1.6-10.3-3.1-15-5-33.8-12.2-49.5-31.9-49.5-57.3 0-36.3 27.5-57 64.5-61.7v124zM534.3 677V543.3c3.1.9 5.9 1.6 8.8 2.2 47.3 14.4 63.2 34.4 63.2 65.1 0 39.1-29.4 62.6-72 66.4z", "fill": primaryColor } }] }; }, "name": "dollar-circle", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (DollarCircleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DollarOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DollarOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DollarOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm47.7-395.2l-25.4-5.9V348.6c38 5.2 61.5 29 65.5 58.2.5 4 3.9 6.9 7.9 6.9h44.9c4.7 0 8.4-4.1 8-8.8-6.1-62.3-57.4-102.3-125.9-109.2V263c0-4.4-3.6-8-8-8h-28.1c-4.4 0-8 3.6-8 8v33c-70.8 6.9-126.2 46-126.2 119 0 67.6 49.8 100.2 102.1 112.7l24.7 6.3v142.7c-44.2-5.9-69-29.5-74.1-61.3-.6-3.8-4-6.6-7.9-6.6H363c-4.7 0-8.4 4-8 8.7 4.5 55 46.2 105.6 135.2 112.1V761c0 4.4 3.6 8 8 8h28.4c4.4 0 8-3.6 8-8.1l-.2-31.7c78.3-6.9 134.3-48.8 134.3-124-.1-69.4-44.2-100.4-109-116.4zm-68.6-16.2c-5.6-1.6-10.3-3.1-15-5-33.8-12.2-49.5-31.9-49.5-57.3 0-36.3 27.5-57 64.5-61.7v124zM534.3 677V543.3c3.1.9 5.9 1.6 8.8 2.2 47.3 14.4 63.2 34.4 63.2 65.1 0 39.1-29.4 62.6-72 66.4z" } }] }, "name": "dollar", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DollarOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DollarTwoTone.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DollarTwoTone.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DollarTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M426.6 410.3c0 25.4 15.7 45.1 49.5 57.3 4.7 1.9 9.4 3.4 15 5v-124c-37 4.7-64.5 25.4-64.5 61.7zm116.5 135.2c-2.9-.6-5.7-1.3-8.8-2.2V677c42.6-3.8 72-27.3 72-66.4 0-30.7-15.9-50.7-63.2-65.1z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm22.4 589.2l.2 31.7c0 4.5-3.6 8.1-8 8.1h-28.4c-4.4 0-8-3.6-8-8v-31.4c-89-6.5-130.7-57.1-135.2-112.1-.4-4.7 3.3-8.7 8-8.7h46.2c3.9 0 7.3 2.8 7.9 6.6 5.1 31.8 29.9 55.4 74.1 61.3V534l-24.7-6.3c-52.3-12.5-102.1-45.1-102.1-112.7 0-73 55.4-112.1 126.2-119v-33c0-4.4 3.6-8 8-8h28.1c4.4 0 8 3.6 8 8v32.7c68.5 6.9 119.8 46.9 125.9 109.2a8.1 8.1 0 01-8 8.8h-44.9c-4 0-7.4-2.9-7.9-6.9-4-29.2-27.5-53-65.5-58.2v134.3l25.4 5.9c64.8 16 108.9 47 109 116.4 0 75.2-56 117.1-134.3 124z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M559.7 488.8l-25.4-5.9V348.6c38 5.2 61.5 29 65.5 58.2.5 4 3.9 6.9 7.9 6.9h44.9c4.7 0 8.4-4.1 8-8.8-6.1-62.3-57.4-102.3-125.9-109.2V263c0-4.4-3.6-8-8-8h-28.1c-4.4 0-8 3.6-8 8v33c-70.8 6.9-126.2 46-126.2 119 0 67.6 49.8 100.2 102.1 112.7l24.7 6.3v142.7c-44.2-5.9-69-29.5-74.1-61.3-.6-3.8-4-6.6-7.9-6.6H363c-4.7 0-8.4 4-8 8.7 4.5 55 46.2 105.6 135.2 112.1V761c0 4.4 3.6 8 8 8h28.4c4.4 0 8-3.6 8-8.1l-.2-31.7c78.3-6.9 134.3-48.8 134.3-124-.1-69.4-44.2-100.4-109-116.4zm-68.6-16.2c-5.6-1.6-10.3-3.1-15-5-33.8-12.2-49.5-31.9-49.5-57.3 0-36.3 27.5-57 64.5-61.7v124zM534.3 677V543.3c3.1.9 5.9 1.6 8.8 2.2 47.3 14.4 63.2 34.4 63.2 65.1 0 39.1-29.4 62.6-72 66.4z", "fill": primaryColor } }] }; }, "name": "dollar", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (DollarTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DotChartOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DotChartOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DotChartOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM288 604a64 64 0 10128 0 64 64 0 10-128 0zm118-224a48 48 0 1096 0 48 48 0 10-96 0zm158 228a96 96 0 10192 0 96 96 0 10-192 0zm148-314a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, "name": "dot-chart", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DotChartOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DoubleLeftOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DoubleLeftOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DoubleLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z" } }] }, "name": "double-left", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DoubleLeftOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DoubleRightOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DoubleRightOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DoubleRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z" } }] }, "name": "double-right", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DoubleRightOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DownCircleFilled.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DownCircleFilled.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DownCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm184.5 353.7l-178 246a7.95 7.95 0 01-12.9 0l-178-246c-3.8-5.3 0-12.7 6.5-12.7H381c10.2 0 19.9 4.9 25.9 13.2L512 563.6l105.2-145.4c6-8.3 15.6-13.2 25.9-13.2H690c6.5 0 10.3 7.4 6.5 12.7z" } }] }, "name": "down-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (DownCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DownCircleOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DownCircleOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DownCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M690 405h-46.9c-10.2 0-19.9 4.9-25.9 13.2L512 563.6 406.8 418.2c-6-8.3-15.6-13.2-25.9-13.2H334c-6.5 0-10.3 7.4-6.5 12.7l178 246c3.2 4.4 9.7 4.4 12.9 0l178-246c3.9-5.3.1-12.7-6.4-12.7z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "down-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DownCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DownCircleTwoTone.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DownCircleTwoTone.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DownCircleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm184.4 277.7l-178 246a7.95 7.95 0 01-12.9 0l-178-246c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.3 0 19.9 4.9 25.9 13.2L512 563.6l105.2-145.4c6-8.3 15.7-13.2 25.9-13.2H690c6.5 0 10.3 7.4 6.4 12.7z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M690 405h-46.9c-10.2 0-19.9 4.9-25.9 13.2L512 563.6 406.8 418.2c-6-8.3-15.6-13.2-25.9-13.2H334c-6.5 0-10.3 7.4-6.5 12.7l178 246c3.2 4.4 9.7 4.4 12.9 0l178-246c3.9-5.3.1-12.7-6.4-12.7z", "fill": primaryColor } }] }; }, "name": "down-circle", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (DownCircleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DownOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DownOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DownOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, "name": "down", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DownOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DownSquareFilled.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DownSquareFilled.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DownSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM696.5 412.7l-178 246a7.95 7.95 0 01-12.9 0l-178-246c-3.8-5.3 0-12.7 6.5-12.7H381c10.2 0 19.9 4.9 25.9 13.2L512 558.6l105.2-145.4c6-8.3 15.6-13.2 25.9-13.2H690c6.5 0 10.3 7.4 6.5 12.7z" } }] }, "name": "down-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (DownSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DownSquareOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DownSquareOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DownSquareOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M505.5 658.7c3.2 4.4 9.7 4.4 12.9 0l178-246c3.8-5.3 0-12.7-6.5-12.7H643c-10.2 0-19.9 4.9-25.9 13.2L512 558.6 406.8 413.2c-6-8.3-15.6-13.2-25.9-13.2H334c-6.5 0-10.3 7.4-6.5 12.7l178 246z" } }, { "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, "name": "down-square", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DownSquareOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DownSquareTwoTone.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DownSquareTwoTone.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DownSquareTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M184 840h656V184H184v656zm150-440h46.9c10.3 0 19.9 4.9 25.9 13.2L512 558.6l105.2-145.4c6-8.3 15.7-13.2 25.9-13.2H690c6.5 0 10.3 7.4 6.4 12.7l-178 246a7.95 7.95 0 01-12.9 0l-178-246c-3.8-5.3 0-12.7 6.5-12.7z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M505.5 658.7c3.2 4.4 9.7 4.4 12.9 0l178-246c3.9-5.3.1-12.7-6.4-12.7h-46.9c-10.2 0-19.9 4.9-25.9 13.2L512 558.6 406.8 413.2c-6-8.3-15.6-13.2-25.9-13.2H334c-6.5 0-10.3 7.4-6.5 12.7l178 246z", "fill": primaryColor } }] }; }, "name": "down-square", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (DownSquareTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DownloadOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DownloadOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DownloadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" } }] }, "name": "download", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DownloadOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DragOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DragOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DragOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.3 506.3L781.7 405.6a7.23 7.23 0 00-11.7 5.7V476H548V254h64.8c6 0 9.4-7 5.7-11.7L517.7 114.7a7.14 7.14 0 00-11.3 0L405.6 242.3a7.23 7.23 0 005.7 11.7H476v222H254v-64.8c0-6-7-9.4-11.7-5.7L114.7 506.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h222v222h-64.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H548V548h222v64.8c0 6 7 9.4 11.7 5.7l127.5-100.8a7.3 7.3 0 00.1-11.4z" } }] }, "name": "drag", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DragOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DribbbleCircleFilled.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DribbbleCircleFilled.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DribbbleCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M675.1 328.3a245.2 245.2 0 00-220.8-55.1c6.8 9.1 51.5 69.9 91.8 144 87.5-32.8 124.5-82.6 129-88.9zM554 552.8c-138.7 48.3-188.6 144.6-193 153.6 41.7 32.5 94.1 51.9 151 51.9 34.1 0 66.6-6.9 96.1-19.5-3.7-21.6-17.9-96.8-52.5-186.6l-1.6.6zm47.7-11.9c32.2 88.4 45.3 160.4 47.8 175.4 55.2-37.3 94.5-96.4 105.4-164.9-8.4-2.6-76.1-22.8-153.2-10.5zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 736c-158.8 0-288-129.2-288-288s129.2-288 288-288 288 129.2 288 288-129.2 288-288 288zm53.1-346.2c5.7 11.7 11.2 23.6 16.3 35.6 1.8 4.2 3.6 8.4 5.3 12.7 81.8-10.3 163.2 6.2 171.3 7.9-.5-58.1-21.3-111.4-55.5-153.3-5.3 7.1-46.5 60-137.4 97.1zM498.6 432c-40.8-72.5-84.7-133.4-91.2-142.3-68.8 32.5-120.3 95.9-136.2 172.2 11 .2 112.4.7 227.4-29.9zm30.6 82.5c3.2-1 6.4-2 9.7-2.9-6.2-14-12.9-28-19.9-41.7-122.8 36.8-242.1 35.2-252.8 35-.1 2.5-.1 5-.1 7.5 0 63.2 23.9 120.9 63.2 164.5 5.5-9.6 73-121.4 199.9-162.4z" } }] }, "name": "dribbble-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (DribbbleCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DribbbleOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DribbbleOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DribbbleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 96C282.6 96 96 282.6 96 512s186.6 416 416 416 416-186.6 416-416S741.4 96 512 96zm275.1 191.8c49.5 60.5 79.5 137.5 80.2 221.4-11.7-2.5-129.2-26.3-247.4-11.4-2.5-6.1-5-12.2-7.6-18.3-7.4-17.3-15.3-34.6-23.6-51.5C720 374.3 779.6 298 787.1 287.8zM512 157.2c90.3 0 172.8 33.9 235.5 89.5-6.4 9.1-59.9 81-186.2 128.4-58.2-107-122.7-194.8-132.6-208 27.3-6.6 55.2-9.9 83.3-9.9zM360.9 191c9.4 12.8 72.9 100.9 131.7 205.5C326.4 440.6 180 440 164.1 439.8c23.1-110.3 97.4-201.9 196.8-248.8zM156.7 512.5c0-3.6.1-7.3.2-10.9 15.5.3 187.7 2.5 365.2-50.6 10.2 19.9 19.9 40.1 28.8 60.3-4.7 1.3-9.4 2.7-14 4.2C353.6 574.9 256.1 736.4 248 750.1c-56.7-63-91.3-146.3-91.3-237.6zM512 867.8c-82.2 0-157.9-28-218.1-75 6.4-13.1 78.3-152 278.7-221.9l2.3-.8c49.9 129.6 70.5 238.3 75.8 269.5A350.46 350.46 0 01512 867.8zm198.5-60.7c-3.6-21.6-22.5-125.6-69-253.3C752.9 536 850.7 565.2 862.8 569c-15.8 98.8-72.5 184.2-152.3 238.1z" } }] }, "name": "dribbble", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DribbbleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DribbbleSquareFilled.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DribbbleSquareFilled.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DribbbleSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M498.6 432c-40.8-72.5-84.7-133.4-91.2-142.3-68.8 32.5-120.3 95.9-136.2 172.2 11 .2 112.4.7 227.4-29.9zm66.5 21.8c5.7 11.7 11.2 23.6 16.3 35.6 1.8 4.2 3.6 8.4 5.3 12.7 81.8-10.3 163.2 6.2 171.3 7.9-.5-58.1-21.3-111.4-55.5-153.3-5.3 7.1-46.5 60-137.4 97.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM512 800c-158.8 0-288-129.2-288-288s129.2-288 288-288 288 129.2 288 288-129.2 288-288 288zm89.7-259.1c32.2 88.4 45.3 160.4 47.8 175.4 55.2-37.3 94.5-96.4 105.4-164.9-8.4-2.6-76.1-22.8-153.2-10.5zm-72.5-26.4c3.2-1 6.4-2 9.7-2.9-6.2-14-12.9-28-19.9-41.7-122.8 36.8-242.1 35.2-252.8 35-.1 2.5-.1 5-.1 7.5 0 63.2 23.9 120.9 63.2 164.5 5.5-9.6 73-121.4 199.9-162.4zm145.9-186.2a245.2 245.2 0 00-220.8-55.1c6.8 9.1 51.5 69.9 91.8 144 87.5-32.8 124.5-82.6 129-88.9zM554 552.8c-138.7 48.3-188.6 144.6-193 153.6 41.7 32.5 94.1 51.9 151 51.9 34.1 0 66.6-6.9 96.1-19.5-3.7-21.6-17.9-96.8-52.5-186.6l-1.6.6z" } }] }, "name": "dribbble-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (DribbbleSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DribbbleSquareOutlined.js": /*!*****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DribbbleSquareOutlined.js ***! \*****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DribbbleSquareOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M498.6 432c-40.8-72.5-84.7-133.4-91.2-142.3-68.8 32.5-120.3 95.9-136.2 172.2 11 .2 112.4.7 227.4-29.9zm66.5 21.8c5.7 11.7 11.2 23.6 16.3 35.6 1.8 4.2 3.6 8.4 5.3 12.7 81.8-10.3 163.2 6.2 171.3 7.9-.5-58.1-21.3-111.4-55.5-153.3-5.3 7.1-46.5 60-137.4 97.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM512 800c-158.8 0-288-129.2-288-288s129.2-288 288-288 288 129.2 288 288-129.2 288-288 288zm89.7-259.1c32.2 88.4 45.3 160.4 47.8 175.4 55.2-37.3 94.5-96.4 105.4-164.9-8.4-2.6-76.1-22.8-153.2-10.5zm-72.5-26.4c3.2-1 6.4-2 9.7-2.9-6.2-14-12.9-28-19.9-41.7-122.8 36.8-242.1 35.2-252.8 35-.1 2.5-.1 5-.1 7.5 0 63.2 23.9 120.9 63.2 164.5 5.5-9.6 73-121.4 199.9-162.4zm145.9-186.2a245.2 245.2 0 00-220.8-55.1c6.8 9.1 51.5 69.9 91.8 144 87.5-32.8 124.5-82.6 129-88.9zM554 552.8c-138.7 48.3-188.6 144.6-193 153.6 41.7 32.5 94.1 51.9 151 51.9 34.1 0 66.6-6.9 96.1-19.5-3.7-21.6-17.9-96.8-52.5-186.6l-1.6.6z" } }] }, "name": "dribbble-square", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DribbbleSquareOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DropboxCircleFilled.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DropboxCircleFilled.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DropboxCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M663.8 455.5zm-151.5-93.8l-151.8 93.8 151.8 93.9 151.5-93.9zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm151.2 595.5L512.6 750l-151-90.5v-33.1l45.4 29.4 105.6-87.7 105.6 87.7 45.1-29.4v33.1zm-45.6-22.4l-105.3-87.7L407 637.1l-151-99.2 104.5-82.4L256 371.2 407 274l105.3 87.7L617.6 274 768 372.1l-104.2 83.5L768 539l-150.4 98.1z" } }] }, "name": "dropbox-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (DropboxCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DropboxOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DropboxOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DropboxOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M64 556.9l264.2 173.5L512.5 577 246.8 412.7zm896-290.3zm0 0L696.8 95 512.5 248.5l265.2 164.2L512.5 577l184.3 153.4L960 558.8 777.7 412.7zM513 609.8L328.2 763.3l-79.4-51.5v57.8L513 928l263.7-158.4v-57.8l-78.9 51.5zM328.2 95L64 265.1l182.8 147.6 265.7-164.2zM64 556.9z" } }] }, "name": "dropbox", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (DropboxOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/DropboxSquareFilled.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/DropboxSquareFilled.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var DropboxSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM663.2 659.5L512.6 750l-151-90.5v-33.1l45.4 29.4 105.6-87.7 105.6 87.7 45.1-29.4v33.1zm-45.6-22.4l-105.3-87.7L407 637.1l-151-99.2 104.5-82.4L256 371.2 407 274l105.3 87.7L617.6 274 768 372.1l-104.2 83.5L768 539l-150.4 98.1zM512.3 361.7l-151.8 93.8 151.8 93.9 151.5-93.9zm151.5 93.8z" } }] }, "name": "dropbox-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (DropboxSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/EditFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/EditFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var EditFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32zm-622.3-84c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9z" } }] }, "name": "edit", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (EditFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/EditOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/EditOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var EditOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z" } }] }, "name": "edit", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (EditOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/EditTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/EditTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var EditTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M761.1 288.3L687.8 215 325.1 577.6l-15.6 89 88.9-15.7z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32zm-622.3-84c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89z", "fill": primaryColor } }] }; }, "name": "edit", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (EditTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/EllipsisOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/EllipsisOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var EllipsisOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, "name": "ellipsis", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (EllipsisOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/EnterOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/EnterOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var EnterOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z" } }] }, "name": "enter", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (EnterOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/EnvironmentFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/EnvironmentFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var EnvironmentFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 327c-29.9 0-58 11.6-79.2 32.8A111.6 111.6 0 00400 439c0 29.9 11.7 58 32.8 79.2A111.6 111.6 0 00512 551c29.9 0 58-11.7 79.2-32.8C612.4 497 624 468.9 624 439c0-29.9-11.6-58-32.8-79.2S541.9 327 512 327zm342.6-37.9a362.49 362.49 0 00-79.9-115.7 370.83 370.83 0 00-118.2-77.8C610.7 76.6 562.1 67 512 67c-50.1 0-98.7 9.6-144.5 28.5-44.3 18.3-84 44.5-118.2 77.8A363.6 363.6 0 00169.4 289c-19.5 45-29.4 92.8-29.4 142 0 70.6 16.9 140.9 50.1 208.7 26.7 54.5 64 107.6 111 158.1 80.3 86.2 164.5 138.9 188.4 153a43.9 43.9 0 0022.4 6.1c7.8 0 15.5-2 22.4-6.1 23.9-14.1 108.1-66.8 188.4-153 47-50.4 84.3-103.6 111-158.1C867.1 572 884 501.8 884 431.1c0-49.2-9.9-97-29.4-142zM512 615c-97.2 0-176-78.8-176-176s78.8-176 176-176 176 78.8 176 176-78.8 176-176 176z" } }] }, "name": "environment", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (EnvironmentFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/EnvironmentOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/EnvironmentOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var EnvironmentOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 289.1a362.49 362.49 0 00-79.9-115.7 370.83 370.83 0 00-118.2-77.8C610.7 76.6 562.1 67 512 67c-50.1 0-98.7 9.6-144.5 28.5-44.3 18.3-84 44.5-118.2 77.8A363.6 363.6 0 00169.4 289c-19.5 45-29.4 92.8-29.4 142 0 70.6 16.9 140.9 50.1 208.7 26.7 54.5 64 107.6 111 158.1 80.3 86.2 164.5 138.9 188.4 153a43.9 43.9 0 0022.4 6.1c7.8 0 15.5-2 22.4-6.1 23.9-14.1 108.1-66.8 188.4-153 47-50.4 84.3-103.6 111-158.1C867.1 572 884 501.8 884 431.1c0-49.2-9.9-97-29.4-142zM512 880.2c-65.9-41.9-300-207.8-300-449.1 0-77.9 31.1-151.1 87.6-206.3C356.3 169.5 431.7 139 512 139s155.7 30.5 212.4 85.9C780.9 280 812 353.2 812 431.1c0 241.3-234.1 407.2-300 449.1zm0-617.2c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 551c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 439c0-29.9 11.7-58 32.8-79.2C454 338.6 482.1 327 512 327c29.9 0 58 11.6 79.2 32.8C612.4 381 624 409.1 624 439c0 29.9-11.6 58-32.8 79.2z" } }] }, "name": "environment", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (EnvironmentOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/EnvironmentTwoTone.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/EnvironmentTwoTone.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var EnvironmentTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M724.4 224.9C667.7 169.5 592.3 139 512 139s-155.7 30.5-212.4 85.8C243.1 280 212 353.2 212 431.1c0 241.3 234.1 407.2 300 449.1 65.9-41.9 300-207.8 300-449.1 0-77.9-31.1-151.1-87.6-206.2zM512 615c-97.2 0-176-78.8-176-176s78.8-176 176-176 176 78.8 176 176-78.8 176-176 176z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M512 263c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 551c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 439c0-29.9 11.7-58 32.8-79.2C454 338.6 482.1 327 512 327c29.9 0 58 11.6 79.2 32.8S624 409.1 624 439c0 29.9-11.6 58-32.8 79.2z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M854.6 289.1a362.49 362.49 0 00-79.9-115.7 370.83 370.83 0 00-118.2-77.8C610.7 76.6 562.1 67 512 67c-50.1 0-98.7 9.6-144.5 28.5-44.3 18.3-84 44.5-118.2 77.8A363.6 363.6 0 00169.4 289c-19.5 45-29.4 92.8-29.4 142 0 70.6 16.9 140.9 50.1 208.7 26.7 54.5 64 107.6 111 158.1 80.3 86.2 164.5 138.9 188.4 153a43.9 43.9 0 0022.4 6.1c7.8 0 15.5-2 22.4-6.1 23.9-14.1 108.1-66.8 188.4-153 47-50.4 84.3-103.6 111-158.1C867.1 572 884 501.8 884 431.1c0-49.2-9.9-97-29.4-142zM512 880.2c-65.9-41.9-300-207.8-300-449.1 0-77.9 31.1-151.1 87.6-206.3C356.3 169.5 431.7 139 512 139s155.7 30.5 212.4 85.9C780.9 280 812 353.2 812 431.1c0 241.3-234.1 407.2-300 449.1z", "fill": primaryColor } }] }; }, "name": "environment", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (EnvironmentTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/EuroCircleFilled.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/EuroCircleFilled.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var EuroCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm63.5 375.8c4.4 0 8 3.6 8 8V475c0 4.4-3.6 8-8 8h-136c-.3 4.4-.3 9.1-.3 13.8v36h136.2c4.4 0 8 3.6 8 8V568c0 4.4-3.6 8-8 8H444.9c15.3 62 61.3 98.6 129.8 98.6 19.9 0 37.1-1.2 51.8-4.1 4.9-1 9.5 2.8 9.5 7.8v42.8c0 3.8-2.7 7-6.4 7.8-15.9 3.4-34.3 5.1-55.3 5.1-109.8 0-183-58.8-200.2-158H344c-4.4 0-8-3.6-8-8v-27.2c0-4.4 3.6-8 8-8h26.1v-36.9c0-4.4 0-8.8.3-12.8H344c-4.4 0-8-3.6-8-8v-27.2c0-4.4 3.6-8 8-8h31.7c19.7-94.2 92-149.9 198.6-149.9 20.9 0 39.4 1.9 55.3 5.4 3.7.8 6.3 4 6.3 7.8V346h.1c0 5.1-4.6 8.8-9.6 7.8-14.7-2.9-31.8-4.4-51.7-4.4-65.4 0-110.4 33.5-127.6 90.4h128.4z" } }] }, "name": "euro-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (EuroCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/EuroCircleOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/EuroCircleOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var EuroCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm117.7-588.6c-15.9-3.5-34.4-5.4-55.3-5.4-106.7 0-178.9 55.7-198.6 149.9H344c-4.4 0-8 3.6-8 8v27.2c0 4.4 3.6 8 8 8h26.4c-.3 4.1-.3 8.4-.3 12.8v36.9H344c-4.4 0-8 3.6-8 8V568c0 4.4 3.6 8 8 8h30.2c17.2 99.2 90.4 158 200.2 158 20.9 0 39.4-1.7 55.3-5.1 3.7-.8 6.4-4 6.4-7.8v-42.8c0-5-4.6-8.8-9.5-7.8-14.7 2.8-31.9 4.1-51.8 4.1-68.5 0-114.5-36.6-129.8-98.6h130.6c4.4 0 8-3.6 8-8v-27.2c0-4.4-3.6-8-8-8H439.2v-36c0-4.7 0-9.4.3-13.8h135.9c4.4 0 8-3.6 8-8v-27.2c0-4.4-3.6-8-8-8H447.1c17.2-56.9 62.3-90.4 127.6-90.4 19.9 0 37.1 1.5 51.7 4.4a8 8 0 009.6-7.8v-42.8c0-3.8-2.6-7-6.3-7.8z" } }] }, "name": "euro-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (EuroCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/EuroCircleTwoTone.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/EuroCircleTwoTone.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var EuroCircleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm117.1 581.1c0 3.8-2.7 7-6.4 7.8-15.9 3.4-34.4 5.1-55.3 5.1-109.8 0-183-58.8-200.2-158H337c-4.4 0-8-3.6-8-8v-27.2c0-4.4 3.6-8 8-8h26.1v-36.9c0-4.4 0-8.7.3-12.8H337c-4.4 0-8-3.6-8-8v-27.2c0-4.4 3.6-8 8-8h31.8C388.5 345.7 460.7 290 567.4 290c20.9 0 39.4 1.9 55.3 5.4 3.7.8 6.3 4 6.3 7.8V346a8 8 0 01-9.6 7.8c-14.6-2.9-31.8-4.4-51.7-4.4-65.3 0-110.4 33.5-127.6 90.4h128.3c4.4 0 8 3.6 8 8V475c0 4.4-3.6 8-8 8H432.5c-.3 4.4-.3 9.1-.3 13.8v36h136.4c4.4 0 8 3.6 8 8V568c0 4.4-3.6 8-8 8H438c15.3 62 61.3 98.6 129.8 98.6 19.9 0 37.1-1.3 51.8-4.1 4.9-1 9.5 2.8 9.5 7.8v42.8z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M619.6 670.5c-14.7 2.8-31.9 4.1-51.8 4.1-68.5 0-114.5-36.6-129.8-98.6h130.6c4.4 0 8-3.6 8-8v-27.2c0-4.4-3.6-8-8-8H432.2v-36c0-4.7 0-9.4.3-13.8h135.9c4.4 0 8-3.6 8-8v-27.2c0-4.4-3.6-8-8-8H440.1c17.2-56.9 62.3-90.4 127.6-90.4 19.9 0 37.1 1.5 51.7 4.4a8 8 0 009.6-7.8v-42.8c0-3.8-2.6-7-6.3-7.8-15.9-3.5-34.4-5.4-55.3-5.4-106.7 0-178.9 55.7-198.6 149.9H337c-4.4 0-8 3.6-8 8v27.2c0 4.4 3.6 8 8 8h26.4c-.3 4.1-.3 8.4-.3 12.8v36.9H337c-4.4 0-8 3.6-8 8V568c0 4.4 3.6 8 8 8h30.2c17.2 99.2 90.4 158 200.2 158 20.9 0 39.4-1.7 55.3-5.1 3.7-.8 6.4-4 6.4-7.8v-42.8c0-5-4.6-8.8-9.5-7.8z", "fill": primaryColor } }] }; }, "name": "euro-circle", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (EuroCircleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/EuroOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/EuroOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var EuroOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm117.7-588.6c-15.9-3.5-34.4-5.4-55.3-5.4-106.7 0-178.9 55.7-198.6 149.9H344c-4.4 0-8 3.6-8 8v27.2c0 4.4 3.6 8 8 8h26.4c-.3 4.1-.3 8.4-.3 12.8v36.9H344c-4.4 0-8 3.6-8 8V568c0 4.4 3.6 8 8 8h30.2c17.2 99.2 90.4 158 200.2 158 20.9 0 39.4-1.7 55.3-5.1 3.7-.8 6.4-4 6.4-7.8v-42.8c0-5-4.6-8.8-9.5-7.8-14.7 2.8-31.9 4.1-51.8 4.1-68.5 0-114.5-36.6-129.8-98.6h130.6c4.4 0 8-3.6 8-8v-27.2c0-4.4-3.6-8-8-8H439.2v-36c0-4.7 0-9.4.3-13.8h135.9c4.4 0 8-3.6 8-8v-27.2c0-4.4-3.6-8-8-8H447.1c17.2-56.9 62.3-90.4 127.6-90.4 19.9 0 37.1 1.5 51.7 4.4a8 8 0 009.6-7.8v-42.8c0-3.8-2.6-7-6.3-7.8z" } }] }, "name": "euro", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (EuroOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/EuroTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/EuroTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var EuroTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm117.1 581.1c0 3.8-2.7 7-6.4 7.8-15.9 3.4-34.4 5.1-55.3 5.1-109.8 0-183-58.8-200.2-158H337c-4.4 0-8-3.6-8-8v-27.2c0-4.4 3.6-8 8-8h26.1v-36.9c0-4.4 0-8.7.3-12.8H337c-4.4 0-8-3.6-8-8v-27.2c0-4.4 3.6-8 8-8h31.8C388.5 345.7 460.7 290 567.4 290c20.9 0 39.4 1.9 55.3 5.4 3.7.8 6.3 4 6.3 7.8V346a8 8 0 01-9.6 7.8c-14.6-2.9-31.8-4.4-51.7-4.4-65.3 0-110.4 33.5-127.6 90.4h128.3c4.4 0 8 3.6 8 8V475c0 4.4-3.6 8-8 8H432.5c-.3 4.4-.3 9.1-.3 13.8v36h136.4c4.4 0 8 3.6 8 8V568c0 4.4-3.6 8-8 8H438c15.3 62 61.3 98.6 129.8 98.6 19.9 0 37.1-1.3 51.8-4.1 4.9-1 9.5 2.8 9.5 7.8v42.8z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M619.6 670.5c-14.7 2.8-31.9 4.1-51.8 4.1-68.5 0-114.5-36.6-129.8-98.6h130.6c4.4 0 8-3.6 8-8v-27.2c0-4.4-3.6-8-8-8H432.2v-36c0-4.7 0-9.4.3-13.8h135.9c4.4 0 8-3.6 8-8v-27.2c0-4.4-3.6-8-8-8H440.1c17.2-56.9 62.3-90.4 127.6-90.4 19.9 0 37.1 1.5 51.7 4.4a8 8 0 009.6-7.8v-42.8c0-3.8-2.6-7-6.3-7.8-15.9-3.5-34.4-5.4-55.3-5.4-106.7 0-178.9 55.7-198.6 149.9H337c-4.4 0-8 3.6-8 8v27.2c0 4.4 3.6 8 8 8h26.4c-.3 4.1-.3 8.4-.3 12.8v36.9H337c-4.4 0-8 3.6-8 8V568c0 4.4 3.6 8 8 8h30.2c17.2 99.2 90.4 158 200.2 158 20.9 0 39.4-1.7 55.3-5.1 3.7-.8 6.4-4 6.4-7.8v-42.8c0-5-4.6-8.8-9.5-7.8z", "fill": primaryColor } }] }; }, "name": "euro", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (EuroTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ExceptionOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ExceptionOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ExceptionOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M688 312v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8zm-392 88c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm376 116c-119.3 0-216 96.7-216 216s96.7 216 216 216 216-96.7 216-216-96.7-216-216-216zm107.5 323.5C750.8 868.2 712.6 884 672 884s-78.8-15.8-107.5-44.5C535.8 810.8 520 772.6 520 732s15.8-78.8 44.5-107.5C593.2 595.8 631.4 580 672 580s78.8 15.8 107.5 44.5C808.2 653.2 824 691.4 824 732s-15.8 78.8-44.5 107.5zM640 812a32 32 0 1064 0 32 32 0 10-64 0zm12-64h40c4.4 0 8-3.6 8-8V628c0-4.4-3.6-8-8-8h-40c-4.4 0-8 3.6-8 8v112c0 4.4 3.6 8 8 8zM440 852H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, "name": "exception", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ExceptionOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ExclamationCircleFilled.js": /*!******************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ExclamationCircleFilled.js ***! \******************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ExclamationCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "exclamation-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (ExclamationCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ExclamationCircleOutlined.js": /*!********************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ExclamationCircleOutlined.js ***! \********************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ExclamationCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, "name": "exclamation-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ExclamationCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ExclamationCircleTwoTone.js": /*!*******************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ExclamationCircleTwoTone.js ***! \*******************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ExclamationCircleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm-32 156c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M488 576h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8zm-24 112a48 48 0 1096 0 48 48 0 10-96 0z", "fill": primaryColor } }] }; }, "name": "exclamation-circle", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (ExclamationCircleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ExclamationOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ExclamationOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ExclamationOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M448 804a64 64 0 10128 0 64 64 0 10-128 0zm32-168h64c4.4 0 8-3.6 8-8V164c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z" } }] }, "name": "exclamation", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ExclamationOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ExpandAltOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ExpandAltOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ExpandAltOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L863.9 169a7.9 7.9 0 00-8.9-8.9zM416.6 562.3a8.03 8.03 0 00-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z" } }] }, "name": "expand-alt", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ExpandAltOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ExpandOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ExpandOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ExpandOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M342 88H120c-17.7 0-32 14.3-32 32v224c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V168h174c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16zm578 576h-48c-8.8 0-16 7.2-16 16v176H682c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h222c17.7 0 32-14.3 32-32V680c0-8.8-7.2-16-16-16zM342 856H168V680c0-8.8-7.2-16-16-16h-48c-8.8 0-16 7.2-16 16v224c0 17.7 14.3 32 32 32h222c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16zM904 88H682c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h174v176c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V120c0-17.7-14.3-32-32-32z" } }] }, "name": "expand", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ExpandOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ExperimentFilled.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ExperimentFilled.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ExperimentFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M218.9 636.3l42.6 26.6c.1.1.3.2.4.3l12.7 8 .3.3a186.9 186.9 0 0094.1 25.1c44.9 0 87.2-15.7 121-43.8a256.27 256.27 0 01164.9-59.9c52.3 0 102.2 15.7 144.6 44.5l7.9 5-111.6-289V179.8h63.5c4.4 0 8-3.6 8-8V120c0-4.4-3.6-8-8-8H264.7c-4.4 0-8 3.6-8 8v51.9c0 4.4 3.6 8 8 8h63.5v173.6L218.9 636.3zm333-203.1c22 0 39.9 17.9 39.9 39.9S573.9 513 551.9 513 512 495.1 512 473.1s17.9-39.9 39.9-39.9zM878 825.1l-29.9-77.4-85.7-53.5-.1.1c-.7-.5-1.5-1-2.2-1.5l-8.1-5-.3-.3c-29-17.5-62.3-26.8-97-26.8-44.9 0-87.2 15.7-121 43.8a256.27 256.27 0 01-164.9 59.9c-53 0-103.5-16.1-146.2-45.6l-28.9-18.1L146 825.1c-2.8 7.4-4.3 15.2-4.3 23 0 35.2 28.6 63.8 63.8 63.8h612.9c7.9 0 15.7-1.5 23-4.3a63.6 63.6 0 0036.6-82.5z" } }] }, "name": "experiment", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (ExperimentFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ExperimentOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ExperimentOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ExperimentOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 472a40 40 0 1080 0 40 40 0 10-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 01-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z" } }] }, "name": "experiment", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ExperimentOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ExperimentTwoTone.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ExperimentTwoTone.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ExperimentTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M551.9 513c19.6 0 35.9-14.2 39.3-32.8A40.02 40.02 0 01552 512a40 40 0 01-40-39.4v.5c0 22 17.9 39.9 39.9 39.9zM752 687.8l-.3-.3c-29-17.5-62.3-26.8-97-26.8-44.9 0-87.2 15.7-121 43.8a256.27 256.27 0 01-164.9 59.9c-41.2 0-81-9.8-116.7-28L210.5 844h603l-59.9-155.2-1.6-1z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M879 824.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 01-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.6-107.6.1-.2c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1l.6 1.6L813.5 844h-603z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M552 512c19.3 0 35.4-13.6 39.2-31.8.6-2.7.8-5.4.8-8.2 0-22.1-17.9-40-40-40s-40 17.9-40 40v.6a40 40 0 0040 39.4z", "fill": primaryColor } }] }; }, "name": "experiment", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (ExperimentTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ExportOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ExportOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ExportOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M888.3 757.4h-53.8c-4.2 0-7.7 3.5-7.7 7.7v61.8H197.1V197.1h629.8v61.8c0 4.2 3.5 7.7 7.7 7.7h53.8c4.2 0 7.7-3.4 7.7-7.7V158.7c0-17-13.7-30.7-30.7-30.7H158.7c-17 0-30.7 13.7-30.7 30.7v706.6c0 17 13.7 30.7 30.7 30.7h706.6c17 0 30.7-13.7 30.7-30.7V765.1c0-4.3-3.5-7.7-7.7-7.7zm18.6-251.7L765 393.7c-5.3-4.2-13-.4-13 6.3v76H438c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z" } }] }, "name": "export", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ExportOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/EyeFilled.js": /*!****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/EyeFilled.js ***! \****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var EyeFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M396 512a112 112 0 10224 0 112 112 0 10-224 0zm546.2-25.8C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM508 688c-97.2 0-176-78.8-176-176s78.8-176 176-176 176 78.8 176 176-78.8 176-176 176z" } }] }, "name": "eye", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (EyeFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/EyeInvisibleFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/EyeInvisibleFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var EyeInvisibleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M508 624a112 112 0 00112-112c0-3.28-.15-6.53-.43-9.74L498.26 623.57c3.21.28 6.45.43 9.74.43zm370.72-458.44L836 122.88a8 8 0 00-11.31 0L715.37 232.23Q624.91 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.7 119.43 136.55 191.45L112.56 835a8 8 0 000 11.31L155.25 889a8 8 0 0011.31 0l712.16-712.12a8 8 0 000-11.32zM332 512a176 176 0 01258.88-155.28l-48.62 48.62a112.08 112.08 0 00-140.92 140.92l-48.62 48.62A175.09 175.09 0 01332 512z" } }, { "tag": "path", "attrs": { "d": "M942.2 486.2Q889.4 375 816.51 304.85L672.37 449A176.08 176.08 0 01445 676.37L322.74 798.63Q407.82 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5z" } }] }, "name": "eye-invisible", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (EyeInvisibleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/EyeInvisibleOutlined.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/EyeInvisibleOutlined.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var EyeInvisibleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { "tag": "path", "attrs": { "d": "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, "name": "eye-invisible", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (EyeInvisibleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/EyeInvisibleTwoTone.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/EyeInvisibleTwoTone.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var EyeInvisibleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M254.89 758.85l125.57-125.57a176 176 0 01248.82-248.82L757 256.72Q651.69 186.07 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q69.27 145.91 173.09 221.05zM942.2 486.2Q889.46 375.11 816.7 305L672.48 449.27a176.09 176.09 0 01-227.22 227.21L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zM878.63 165.56L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z", "fill": primaryColor } }] }; }, "name": "eye-invisible", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (EyeInvisibleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/EyeOutlined.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/EyeOutlined.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var EyeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, "name": "eye", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (EyeOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/EyeTwoTone.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/EyeTwoTone.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var EyeTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M81.8 537.8a60.3 60.3 0 010-51.5C176.6 286.5 319.8 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c-192.1 0-335.4-100.5-430.2-300.2z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M512 258c-161.3 0-279.4 81.8-362.7 254C232.6 684.2 350.7 766 512 766c161.4 0 279.5-81.8 362.7-254C791.4 339.8 673.3 258 512 258zm-4 430c-97.2 0-176-78.8-176-176s78.8-176 176-176 176 78.8 176 176-78.8 176-176 176z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258s279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M508 336c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z", "fill": primaryColor } }] }; }, "name": "eye", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (EyeTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FacebookFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FacebookFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FacebookFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-92.4 233.5h-63.9c-50.1 0-59.8 23.8-59.8 58.8v77.1h119.6l-15.6 120.7h-104V912H539.2V602.2H434.9V481.4h104.3v-89c0-103.3 63.1-159.6 155.3-159.6 44.2 0 82.1 3.3 93.2 4.8v107.9z" } }] }, "name": "facebook", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FacebookFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FacebookOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FacebookOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FacebookOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-32 736H663.9V602.2h104l15.6-120.7H663.9v-77.1c0-35 9.7-58.8 59.8-58.8h63.9v-108c-11.1-1.5-49-4.8-93.2-4.8-92.2 0-155.3 56.3-155.3 159.6v89H434.9v120.7h104.3V848H176V176h672v672z" } }] }, "name": "facebook", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FacebookOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FallOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FallOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FallOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M925.9 804l-24-199.2c-.8-6.6-8.9-9.4-13.6-4.7L829 659.5 557.7 388.3c-6.3-6.2-16.4-6.2-22.6 0L433.3 490 156.6 213.3a8.03 8.03 0 00-11.3 0l-45 45.2a8.03 8.03 0 000 11.3L422 591.7c6.2 6.3 16.4 6.3 22.6 0L546.4 490l226.1 226-59.3 59.3a8.01 8.01 0 004.7 13.6l199.2 24c5.1.7 9.5-3.7 8.8-8.9z" } }] }, "name": "fall", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FallOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FastBackwardFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FastBackwardFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FastBackwardFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M517.6 273.5L230.2 499.3a16.14 16.14 0 000 25.4l287.4 225.8c10.7 8.4 26.4.8 26.4-12.7V286.2c0-13.5-15.7-21.1-26.4-12.7zm320 0L550.2 499.3a16.14 16.14 0 000 25.4l287.4 225.8c10.7 8.4 26.4.8 26.4-12.7V286.2c0-13.5-15.7-21.1-26.4-12.7zm-620-25.5h-51.2c-3.5 0-6.4 2.7-6.4 6v516c0 3.3 2.9 6 6.4 6h51.2c3.5 0 6.4-2.7 6.4-6V254c0-3.3-2.9-6-6.4-6z" } }] }, "name": "fast-backward", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FastBackwardFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FastBackwardOutlined.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FastBackwardOutlined.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FastBackwardOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M517.6 273.5L230.2 499.3a16.14 16.14 0 000 25.4l287.4 225.8c10.7 8.4 26.4.8 26.4-12.7V286.2c0-13.5-15.7-21.1-26.4-12.7zm320 0L550.2 499.3a16.14 16.14 0 000 25.4l287.4 225.8c10.7 8.4 26.4.8 26.4-12.7V286.2c0-13.5-15.7-21.1-26.4-12.7zm-620-25.5h-51.2c-3.5 0-6.4 2.7-6.4 6v516c0 3.3 2.9 6 6.4 6h51.2c3.5 0 6.4-2.7 6.4-6V254c0-3.3-2.9-6-6.4-6z" } }] }, "name": "fast-backward", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FastBackwardOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FastForwardFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FastForwardFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FastForwardFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M793.8 499.3L506.4 273.5c-10.7-8.4-26.4-.8-26.4 12.7v451.6c0 13.5 15.7 21.1 26.4 12.7l287.4-225.8a16.14 16.14 0 000-25.4zm-320 0L186.4 273.5c-10.7-8.4-26.4-.8-26.4 12.7v451.5c0 13.5 15.7 21.1 26.4 12.7l287.4-225.8c4.1-3.2 6.2-8 6.2-12.7 0-4.6-2.1-9.4-6.2-12.6zM857.6 248h-51.2c-3.5 0-6.4 2.7-6.4 6v516c0 3.3 2.9 6 6.4 6h51.2c3.5 0 6.4-2.7 6.4-6V254c0-3.3-2.9-6-6.4-6z" } }] }, "name": "fast-forward", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FastForwardFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FastForwardOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FastForwardOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FastForwardOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M793.8 499.3L506.4 273.5c-10.7-8.4-26.4-.8-26.4 12.7v451.6c0 13.5 15.7 21.1 26.4 12.7l287.4-225.8a16.14 16.14 0 000-25.4zm-320 0L186.4 273.5c-10.7-8.4-26.4-.8-26.4 12.7v451.5c0 13.5 15.7 21.1 26.4 12.7l287.4-225.8c4.1-3.2 6.2-8 6.2-12.7 0-4.6-2.1-9.4-6.2-12.6zM857.6 248h-51.2c-3.5 0-6.4 2.7-6.4 6v516c0 3.3 2.9 6 6.4 6h51.2c3.5 0 6.4-2.7 6.4-6V254c0-3.3-2.9-6-6.4-6z" } }] }, "name": "fast-forward", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FastForwardOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FieldBinaryOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FieldBinaryOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FieldBinaryOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M600 395.4h91V649h79V267c0-4.4-3.6-8-8-8h-48.2c-3.7 0-7 2.6-7.7 6.3-2.6 12.1-6.9 22.3-12.9 30.9a86.14 86.14 0 01-26.3 24.4c-10.3 6.2-22 10.5-35 12.9-10.4 1.9-21 3-32 3.1a8 8 0 00-7.9 8v42.8c0 4.4 3.6 8 8 8zM871 702H567c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM443.9 312.7c-16.1-19-34.4-32.4-55.2-40.4-21.3-8.2-44.1-12.3-68.4-12.3-23.9 0-46.4 4.1-67.7 12.3-20.8 8-39 21.4-54.8 40.3-15.9 19.1-28.7 44.7-38.3 77-9.6 32.5-14.5 73-14.5 121.5 0 49.9 4.9 91.4 14.5 124.4 9.6 32.8 22.4 58.7 38.3 77.7 15.8 18.9 34 32.3 54.8 40.3 21.3 8.2 43.8 12.3 67.7 12.3 24.4 0 47.2-4.1 68.4-12.3 20.8-8 39.2-21.4 55.2-40.4 16.1-19 29-44.9 38.6-77.7 9.6-33 14.5-74.5 14.5-124.4 0-48.4-4.9-88.9-14.5-121.5-9.5-32.1-22.4-57.7-38.6-76.8zm-29.5 251.7c-1 21.4-4.2 42-9.5 61.9-5.5 20.7-14.5 38.5-27 53.4-13.6 16.3-33.2 24.3-57.6 24.3-24 0-43.2-8.1-56.7-24.4-12.2-14.8-21.1-32.6-26.6-53.3-5.3-19.9-8.5-40.6-9.5-61.9-1-20.8-1.5-38.5-1.5-53.2 0-8.8.1-19.4.4-31.8.2-12.7 1.1-25.8 2.6-39.2 1.5-13.6 4-27.1 7.6-40.5 3.7-13.8 8.8-26.3 15.4-37.4 6.9-11.6 15.8-21.1 26.7-28.3 11.4-7.6 25.3-11.3 41.5-11.3 16.1 0 30.1 3.7 41.7 11.2a87.94 87.94 0 0127.4 28.2c6.9 11.2 12.1 23.8 15.6 37.7 3.3 13.2 5.8 26.6 7.5 40.1 1.8 13.5 2.8 26.6 3 39.4.2 12.4.4 23 .4 31.8.1 14.8-.4 32.5-1.4 53.3z" } }] }, "name": "field-binary", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FieldBinaryOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FieldNumberOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FieldNumberOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FieldNumberOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M508 280h-63.3c-3.3 0-6 2.7-6 6v340.2H433L197.4 282.6c-1.1-1.6-3-2.6-4.9-2.6H126c-3.3 0-6 2.7-6 6v464c0 3.3 2.7 6 6 6h62.7c3.3 0 6-2.7 6-6V405.1h5.7l238.2 348.3c1.1 1.6 3 2.6 5 2.6H508c3.3 0 6-2.7 6-6V286c0-3.3-2.7-6-6-6zm378 413H582c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-152.2-63c52.9 0 95.2-17.2 126.2-51.7 29.4-32.9 44-75.8 44-128.8 0-53.1-14.6-96.5-44-129.3-30.9-34.8-73.2-52.2-126.2-52.2-53.7 0-95.9 17.5-126.3 52.8-29.2 33.1-43.4 75.9-43.4 128.7 0 52.4 14.3 95.2 43.5 128.3 30.6 34.7 73 52.2 126.2 52.2zm-71.5-263.7c16.9-20.6 40.3-30.9 71.4-30.9 31.5 0 54.8 9.6 71 29.1 16.4 20.3 24.9 48.6 24.9 84.9 0 36.3-8.4 64.1-24.8 83.9-16.5 19.4-40 29.2-71.1 29.2-31.2 0-55-10.3-71.4-30.4-16.3-20.1-24.5-47.3-24.5-82.6.1-35.8 8.2-63 24.5-83.2z" } }] }, "name": "field-number", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FieldNumberOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FieldStringOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FieldStringOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FieldStringOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M875.6 515.9c2.1.8 4.4-.3 5.2-2.4.2-.4.2-.9.2-1.4v-58.3c0-1.8-1.1-3.3-2.8-3.8-6-1.8-17.2-3-27.2-3-32.9 0-61.7 16.7-73.5 41.2v-28.6c0-4.4-3.6-8-8-8H717c-4.4 0-8 3.6-8 8V729c0 4.4 3.6 8 8 8h54.8c4.4 0 8-3.6 8-8V572.7c0-36.2 26.1-60.2 65.1-60.2 10.4.1 26.6 1.8 30.7 3.4zm-537-40.5l-54.7-12.6c-61.2-14.2-87.7-34.8-87.7-70.7 0-44.6 39.1-73.5 96.9-73.5 52.8 0 91.4 26.5 99.9 68.9h70C455.9 311.6 387.6 259 293.4 259c-103.3 0-171 55.5-171 139 0 68.6 38.6 109.5 122.2 128.5l61.6 14.3c63.6 14.9 91.6 37.1 91.6 75.1 0 44.1-43.5 75.2-102.5 75.2-60.6 0-104.5-27.2-112.8-70.5H111c7.2 79.9 75.6 130.4 179.1 130.4C402.3 751 471 695.2 471 605.3c0-70.2-38.6-108.5-132.4-129.9zM841 729a36 36 0 1072 0 36 36 0 10-72 0zM653 457.8h-51.4V396c0-4.4-3.6-8-8-8h-54.7c-4.4 0-8 3.6-8 8v61.8H495c-4.4 0-8 3.6-8 8v42.3c0 4.4 3.6 8 8 8h35.9v147.5c0 56.2 27.4 79.4 93.1 79.4 11.7 0 23.6-1.2 33.8-3.1 1.9-.3 3.2-2 3.2-3.9v-49.3c0-2.2-1.8-4-4-4h-.4c-4.9.5-6.2.6-8.3.8-4.1.3-7.8.5-12.6.5-24.1 0-34.1-10.3-34.1-35.6V516.1H653c4.4 0 8-3.6 8-8v-42.3c0-4.4-3.6-8-8-8z" } }] }, "name": "field-string", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FieldStringOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FieldTimeOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FieldTimeOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FieldTimeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M945 412H689c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h256c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM811 548H689c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h122c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM477.3 322.5H434c-6.2 0-11.2 5-11.2 11.2v248c0 3.6 1.7 6.9 4.6 9l148.9 108.6c5 3.6 12 2.6 15.6-2.4l25.7-35.1v-.1c3.6-5 2.5-12-2.5-15.6l-126.7-91.6V333.7c.1-6.2-5-11.2-11.1-11.2z" } }, { "tag": "path", "attrs": { "d": "M804.8 673.9H747c-5.6 0-10.9 2.9-13.9 7.7a321 321 0 01-44.5 55.7 317.17 317.17 0 01-101.3 68.3c-39.3 16.6-81 25-124 25-43.1 0-84.8-8.4-124-25-37.9-16-72-39-101.3-68.3s-52.3-63.4-68.3-101.3c-16.6-39.2-25-80.9-25-124 0-43.1 8.4-84.7 25-124 16-37.9 39-72 68.3-101.3 29.3-29.3 63.4-52.3 101.3-68.3 39.2-16.6 81-25 124-25 43.1 0 84.8 8.4 124 25 37.9 16 72 39 101.3 68.3a321 321 0 0144.5 55.7c3 4.8 8.3 7.7 13.9 7.7h57.8c6.9 0 11.3-7.2 8.2-13.3-65.2-129.7-197.4-214-345-215.7-216.1-2.7-395.6 174.2-396 390.1C71.6 727.5 246.9 903 463.2 903c149.5 0 283.9-84.6 349.8-215.8a9.18 9.18 0 00-8.2-13.3z" } }] }, "name": "field-time", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FieldTimeOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileAddFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileAddFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileAddFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M480 580H372a8 8 0 00-8 8v48a8 8 0 008 8h108v108a8 8 0 008 8h48a8 8 0 008-8V644h108a8 8 0 008-8v-48a8 8 0 00-8-8H544V472a8 8 0 00-8-8h-48a8 8 0 00-8 8v108zm374.6-291.3c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2z" } }] }, "name": "file-add", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FileAddFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileAddOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileAddOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileAddOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM544 472c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v108H372c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h108v108c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V644h108c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V472z" } }] }, "name": "file-add", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FileAddOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileAddTwoTone.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileAddTwoTone.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileAddTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M534 352V136H232v752h560V394H576a42 42 0 01-42-42zm126 236v48c0 4.4-3.6 8-8 8H544v108c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V644H372c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h108V472c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v108h108c4.4 0 8 3.6 8 8z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M544 472c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v108H372c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h108v108c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V644h108c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V472z", "fill": primaryColor } }] }; }, "name": "file-add", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (FileAddTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileDoneOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileDoneOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileDoneOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M688 312v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8zm-392 88c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm376 116c-119.3 0-216 96.7-216 216s96.7 216 216 216 216-96.7 216-216-96.7-216-216-216zm107.5 323.5C750.8 868.2 712.6 884 672 884s-78.8-15.8-107.5-44.5C535.8 810.8 520 772.6 520 732s15.8-78.8 44.5-107.5C593.2 595.8 631.4 580 672 580s78.8 15.8 107.5 44.5C808.2 653.2 824 691.4 824 732s-15.8 78.8-44.5 107.5zM761 656h-44.3c-2.6 0-5 1.2-6.5 3.3l-63.5 87.8-23.1-31.9a7.92 7.92 0 00-6.5-3.3H573c-6.5 0-10.3 7.4-6.5 12.7l73.8 102.1c3.2 4.4 9.7 4.4 12.9 0l114.2-158c3.9-5.3.1-12.7-6.4-12.7zM440 852H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, "name": "file-done", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FileDoneOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileExcelFilled.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileExcelFilled.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileExcelFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM575.34 477.84l-61.22 102.3L452.3 477.8a12 12 0 00-10.27-5.79h-38.44a12 12 0 00-6.4 1.85 12 12 0 00-3.75 16.56l82.34 130.42-83.45 132.78a12 12 0 00-1.84 6.39 12 12 0 0012 12h34.46a12 12 0 0010.21-5.7l62.7-101.47 62.3 101.45a12 12 0 0010.23 5.72h37.48a12 12 0 006.48-1.9 12 12 0 003.62-16.58l-83.83-130.55 85.3-132.47a12 12 0 001.9-6.5 12 12 0 00-12-12h-35.7a12 12 0 00-10.29 5.84z" } }] }, "name": "file-excel", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FileExcelFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileExcelOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileExcelOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileExcelOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM514.1 580.1l-61.8-102.4c-2.2-3.6-6.1-5.8-10.3-5.8h-38.4c-2.3 0-4.5.6-6.4 1.9-5.6 3.5-7.3 10.9-3.7 16.6l82.3 130.4-83.4 132.8a12.04 12.04 0 0010.2 18.4h34.5c4.2 0 8-2.2 10.2-5.7L510 664.8l62.3 101.4c2.2 3.6 6.1 5.7 10.2 5.7H620c2.3 0 4.5-.7 6.5-1.9 5.6-3.6 7.2-11 3.6-16.6l-84-130.4 85.3-132.5a12.04 12.04 0 00-10.1-18.5h-35.7c-4.2 0-8.1 2.2-10.3 5.8l-61.2 102.3z" } }] }, "name": "file-excel", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FileExcelOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileExcelTwoTone.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileExcelTwoTone.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileExcelTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M534 352V136H232v752h560V394H576a42 42 0 01-42-42zm51.6 120h35.7a12.04 12.04 0 0110.1 18.5L546.1 623l84 130.4c3.6 5.6 2 13-3.6 16.6-2 1.2-4.2 1.9-6.5 1.9h-37.5c-4.1 0-8-2.1-10.2-5.7L510 664.8l-62.7 101.5c-2.2 3.5-6 5.7-10.2 5.7h-34.5a12.04 12.04 0 01-10.2-18.4l83.4-132.8-82.3-130.4c-3.6-5.7-1.9-13.1 3.7-16.6 1.9-1.3 4.1-1.9 6.4-1.9H442c4.2 0 8.1 2.2 10.3 5.8l61.8 102.4 61.2-102.3c2.2-3.6 6.1-5.8 10.3-5.8z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M514.1 580.1l-61.8-102.4c-2.2-3.6-6.1-5.8-10.3-5.8h-38.4c-2.3 0-4.5.6-6.4 1.9-5.6 3.5-7.3 10.9-3.7 16.6l82.3 130.4-83.4 132.8a12.04 12.04 0 0010.2 18.4h34.5c4.2 0 8-2.2 10.2-5.7L510 664.8l62.3 101.4c2.2 3.6 6.1 5.7 10.2 5.7H620c2.3 0 4.5-.7 6.5-1.9 5.6-3.6 7.2-11 3.6-16.6l-84-130.4 85.3-132.5a12.04 12.04 0 00-10.1-18.5h-35.7c-4.2 0-8.1 2.2-10.3 5.8l-61.2 102.3z", "fill": primaryColor } }] }; }, "name": "file-excel", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (FileExcelTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileExclamationFilled.js": /*!****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileExclamationFilled.js ***! \****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileExclamationFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM512 784a40 40 0 100-80 40 40 0 000 80zm32-152V448a8 8 0 00-8-8h-48a8 8 0 00-8 8v184a8 8 0 008 8h48a8 8 0 008-8z" } }] }, "name": "file-exclamation", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FileExclamationFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileExclamationOutlined.js": /*!******************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileExclamationOutlined.js ***! \******************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileExclamationOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM472 744a40 40 0 1080 0 40 40 0 10-80 0zm16-104h48c4.4 0 8-3.6 8-8V448c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v184c0 4.4 3.6 8 8 8z" } }] }, "name": "file-exclamation", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FileExclamationOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileExclamationTwoTone.js": /*!*****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileExclamationTwoTone.js ***! \*****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileExclamationTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M534 352V136H232v752h560V394H576a42 42 0 01-42-42zm-54 96c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V448zm32 336c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M488 640h48c4.4 0 8-3.6 8-8V448c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v184c0 4.4 3.6 8 8 8zm-16 104a40 40 0 1080 0 40 40 0 10-80 0z", "fill": primaryColor } }] }; }, "name": "file-exclamation", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (FileExclamationTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2z" } }] }, "name": "file", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FileFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileGifOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileGifOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileGifOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M551.5 490.5H521c-4.6 0-8.4 3.7-8.4 8.4V720c0 4.6 3.7 8.4 8.4 8.4h30.5c4.6 0 8.4-3.7 8.4-8.4V498.9c-.1-4.6-3.8-8.4-8.4-8.4zM477.3 600h-88.1c-4.6 0-8.4 3.7-8.4 8.4v23.8c0 4.6 3.7 8.4 8.4 8.4h47.6v.7c-.6 29.9-23 49.8-56.5 49.8-39.2 0-63.6-30.7-63.6-81.4 0-50.1 23.9-80.6 62.3-80.6 28.1 0 47.5 13.5 55.4 38.3l.9 2.8h49.2l-.7-4.6C475.9 515.9 434.7 484 379 484c-68.8 0-113 49.4-113 125.9 0 77.5 43.7 126.1 113.6 126.1 64.4 0 106-40.3 106-102.9v-24.8c0-4.6-3.7-8.3-8.3-8.3z" } }, { "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z" } }, { "tag": "path", "attrs": { "d": "M608.2 727.8h32.3c4.6 0 8.4-3.7 8.4-8.4v-84.8h87.8c4.6 0 8.4-3.7 8.4-8.4v-25.5c0-4.6-3.7-8.4-8.4-8.4h-87.8v-58.9h96.8c4.6 0 8.4-3.7 8.4-8.4v-26.8c0-4.6-3.7-8.4-8.4-8.4H608.2c-4.6 0-8.4 3.7-8.4 8.4v221.1c0 4.8 3.8 8.5 8.4 8.5z" } }] }, "name": "file-gif", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FileGifOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileImageFilled.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileImageFilled.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileImageFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.7L639.4 73.4c-6-6-14.2-9.4-22.7-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.6-9.4-22.6zM400 402c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40zm296 294H328c-6.7 0-10.4-7.7-6.3-12.9l99.8-127.2a8 8 0 0112.6 0l41.1 52.4 77.8-99.2a8 8 0 0112.6 0l136.5 174c4.3 5.2.5 12.9-6.1 12.9zm-94-370V137.8L790.2 326H602z" } }] }, "name": "file-image", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FileImageFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileImageOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileImageOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileImageOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0zm494.6-153.4L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z" } }] }, "name": "file-image", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FileImageOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileImageTwoTone.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileImageTwoTone.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileImageTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M534 352V136H232v752h560V394H576a42 42 0 01-42-42zm-134 50c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40zm296 294H328.1c-6.7 0-10.4-7.7-6.3-12.9l99.8-127.2a8 8 0 0112.6 0l41.1 52.4 77.8-99.2a8.1 8.1 0 0112.7 0l136.5 174c4.1 5.2.4 12.9-6.3 12.9z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0z", "fill": primaryColor } }] }; }, "name": "file-image", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (FileImageTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileJpgOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileJpgOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileJpgOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M874.6 301.8L596.8 21.3c-4.5-4.5-9.4-8.3-14.7-11.5-1.4-.8-2.8-1.6-4.3-2.3-.9-.5-1.9-.9-2.8-1.3-9-4-18.9-6.2-29-6.2H201c-39.8 0-73 32.2-73 72v880c0 39.8 33.2 72 73 72h623c39.8 0 71-32.2 71-72V352.5c0-19-7-37.2-20.4-50.7zM583 110.4L783.8 312H583V110.4zM823 952H200V72h311v240c0 39.8 33.2 72 73 72h239v568zM350 696.5c0 24.2-7.5 31.4-21.9 31.4-9 0-18.4-5.8-24.8-18.5L272.9 732c13.4 22.9 32.3 34.2 61.3 34.2 41.6 0 60.8-29.9 60.8-66.2V577h-45v119.5zM501.3 577H437v186h44v-62h21.6c39.1 0 73.1-19.6 73.1-63.6 0-45.8-33.5-60.4-74.4-60.4zm-.8 89H481v-53h18.2c21.5 0 33.4 6.2 33.4 24.9 0 18.1-10.5 28.1-32.1 28.1zm182.5-9v36h30v30.1c-4 2.9-11 4.7-17.7 4.7-34.3 0-50.7-21.4-50.7-58.2 0-36.1 19.7-57.4 47.1-57.4 15.3 0 25 6.2 34 14.4l23.7-28.3c-12.7-12.8-32.1-24.2-59.2-24.2-49.6 0-91.1 35.3-91.1 97 0 62.7 40 95.1 91.5 95.1 25.9 0 49.2-10.2 61.5-22.6V657H683z" } }] }, "name": "file-jpg", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FileJpgOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileMarkdownFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileMarkdownFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileMarkdownFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM426.13 600.93l59.11 132.97a16 16 0 0014.62 9.5h24.06a16 16 0 0014.63-9.51l59.1-133.35V758a16 16 0 0016.01 16H641a16 16 0 0016-16V486a16 16 0 00-16-16h-34.75a16 16 0 00-14.67 9.62L512.1 662.2l-79.48-182.59a16 16 0 00-14.67-9.61H383a16 16 0 00-16 16v272a16 16 0 0016 16h27.13a16 16 0 0016-16V600.93z" } }] }, "name": "file-markdown", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FileMarkdownFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileMarkdownOutlined.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileMarkdownOutlined.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileMarkdownOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM429 481.2c-1.9-4.4-6.2-7.2-11-7.2h-35c-6.6 0-12 5.4-12 12v272c0 6.6 5.4 12 12 12h27.1c6.6 0 12-5.4 12-12V582.1l66.8 150.2a12 12 0 0011 7.1H524c4.7 0 9-2.8 11-7.1l66.8-150.6V758c0 6.6 5.4 12 12 12H641c6.6 0 12-5.4 12-12V486c0-6.6-5.4-12-12-12h-34.7c-4.8 0-9.1 2.8-11 7.2l-83.1 191-83.2-191z" } }] }, "name": "file-markdown", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FileMarkdownOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileMarkdownTwoTone.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileMarkdownTwoTone.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileMarkdownTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M534 352V136H232v752h560V394H576a42 42 0 01-42-42zm72.3 122H641c6.6 0 12 5.4 12 12v272c0 6.6-5.4 12-12 12h-27.2c-6.6 0-12-5.4-12-12V581.7L535 732.3c-2 4.3-6.3 7.1-11 7.1h-24.1a12 12 0 01-11-7.1l-66.8-150.2V758c0 6.6-5.4 12-12 12H383c-6.6 0-12-5.4-12-12V486c0-6.6 5.4-12 12-12h35c4.8 0 9.1 2.8 11 7.2l83.2 191 83.1-191c1.9-4.4 6.2-7.2 11-7.2z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M429 481.2c-1.9-4.4-6.2-7.2-11-7.2h-35c-6.6 0-12 5.4-12 12v272c0 6.6 5.4 12 12 12h27.1c6.6 0 12-5.4 12-12V582.1l66.8 150.2a12 12 0 0011 7.1H524c4.7 0 9-2.8 11-7.1l66.8-150.6V758c0 6.6 5.4 12 12 12H641c6.6 0 12-5.4 12-12V486c0-6.6-5.4-12-12-12h-34.7c-4.8 0-9.1 2.8-11 7.2l-83.1 191-83.2-191z", "fill": primaryColor } }] }; }, "name": "file-markdown", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (FileMarkdownTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z" } }] }, "name": "file", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FileOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FilePdfFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FilePdfFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FilePdfFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM633.22 637.26c-15.18-.5-31.32.67-49.65 2.96-24.3-14.99-40.66-35.58-52.28-65.83l1.07-4.38 1.24-5.18c4.3-18.13 6.61-31.36 7.3-44.7.52-10.07-.04-19.36-1.83-27.97-3.3-18.59-16.45-29.46-33.02-30.13-15.45-.63-29.65 8-33.28 21.37-5.91 21.62-2.45 50.07 10.08 98.59-15.96 38.05-37.05 82.66-51.2 107.54-18.89 9.74-33.6 18.6-45.96 28.42-16.3 12.97-26.48 26.3-29.28 40.3-1.36 6.49.69 14.97 5.36 21.92 5.3 7.88 13.28 13 22.85 13.74 24.15 1.87 53.83-23.03 86.6-79.26 3.29-1.1 6.77-2.26 11.02-3.7l11.9-4.02c7.53-2.54 12.99-4.36 18.39-6.11 23.4-7.62 41.1-12.43 57.2-15.17 27.98 14.98 60.32 24.8 82.1 24.8 17.98 0 30.13-9.32 34.52-23.99 3.85-12.88.8-27.82-7.48-36.08-8.56-8.41-24.3-12.43-45.65-13.12zM385.23 765.68v-.36l.13-.34a54.86 54.86 0 015.6-10.76c4.28-6.58 10.17-13.5 17.47-20.87 3.92-3.95 8-7.8 12.79-12.12 1.07-.96 7.91-7.05 9.19-8.25l11.17-10.4-8.12 12.93c-12.32 19.64-23.46 33.78-33 43-3.51 3.4-6.6 5.9-9.1 7.51a16.43 16.43 0 01-2.61 1.42c-.41.17-.77.27-1.13.3a2.2 2.2 0 01-1.12-.15 2.07 2.07 0 01-1.27-1.91zM511.17 547.4l-2.26 4-1.4-4.38c-3.1-9.83-5.38-24.64-6.01-38-.72-15.2.49-24.32 5.29-24.32 6.74 0 9.83 10.8 10.07 27.05.22 14.28-2.03 29.14-5.7 35.65zm-5.81 58.46l1.53-4.05 2.09 3.8c11.69 21.24 26.86 38.96 43.54 51.31l3.6 2.66-4.39.9c-16.33 3.38-31.54 8.46-52.34 16.85 2.17-.88-21.62 8.86-27.64 11.17l-5.25 2.01 2.8-4.88c12.35-21.5 23.76-47.32 36.05-79.77zm157.62 76.26c-7.86 3.1-24.78.33-54.57-12.39l-7.56-3.22 8.2-.6c23.3-1.73 39.8-.45 49.42 3.07 4.1 1.5 6.83 3.39 8.04 5.55a4.64 4.64 0 01-1.36 6.31 6.7 6.7 0 01-2.17 1.28z" } }] }, "name": "file-pdf", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FilePdfFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FilePdfOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FilePdfOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FilePdfOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M531.3 574.4l.3-1.4c5.8-23.9 13.1-53.7 7.4-80.7-3.8-21.3-19.5-29.6-32.9-30.2-15.8-.7-29.9 8.3-33.4 21.4-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.5-51.2 107.5-29.6 15.3-69.3 38.9-75.2 68.7-1.2 5.5.2 12.5 3.5 18.8 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-13.2-13-45.3-16.4-95.3-10.2-24.6-15-40.7-35.4-52.4-65.8zM421.6 726.3c-13.9 20.2-24.4 30.3-30.1 34.7 6.7-12.3 19.8-25.3 30.1-34.7zm87.6-235.5c5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4.8.1 1.5.7 2.2 2zm-1.6 120.5c10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4zm155.6 65.5c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4zm191.4-388.2L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z" } }] }, "name": "file-pdf", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FilePdfOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FilePdfTwoTone.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FilePdfTwoTone.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FilePdfTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M509.2 490.8c-.7-1.3-1.4-1.9-2.2-2-2.9 3.3-2.2 31.5 2.7 51.4 4-13.6 4.7-40.5-.5-49.4zm-1.6 120.5c-7.7 20-18.8 47.3-32.1 71.4 4-1.6 8.1-3.3 12.3-5 17.6-7.2 37.3-15.3 58.9-20.2-14.9-11.8-28.4-27.7-39.1-46.2z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M534 352V136H232v752h560V394H576a42 42 0 01-42-42zm55 287.6c16.1-1.9 30.6-2.8 44.3-2.3 12.8.4 23.6 2 32 5.1.2.1.3.1.5.2.4.2.8.3 1.2.5.5.2 1.1.4 1.6.7.1.1.3.1.4.2 4.1 1.8 7.5 4 10.1 6.6 9.1 9.1 11.8 26.1 6.2 39.6-3.2 7.7-11.7 20.5-33.3 20.5-21.8 0-53.9-9.7-82.1-24.8-25.5 4.3-53.7 13.9-80.9 23.1-5.8 2-11.8 4-17.6 5.9-38 65.2-66.5 79.4-84.1 79.4-4.2 0-7.8-.9-10.8-2-6.9-2.6-12.8-8-16.5-15-.9-1.7-1.6-3.4-2.2-5.2-1.6-4.8-2.1-9.6-1.3-13.6l.6-2.7c.1-.2.1-.4.2-.6.2-.7.4-1.4.7-2.1 0-.1.1-.2.1-.3 4.1-11.9 13.6-23.4 27.7-34.6 12.3-9.8 27.1-18.7 45.9-28.4 15.9-28 37.6-75.1 51.2-107.4-10.8-41.8-16.7-74.6-10.1-98.6.9-3.3 2.5-6.4 4.6-9.1.2-.2.3-.4.5-.6.1-.1.1-.2.2-.2 6.3-7.5 16.9-11.9 28.1-11.5 16.6.7 29.7 11.5 33 30.1 1.7 8 2.2 16.5 1.9 25.7v.7c0 .5 0 1-.1 1.5-.7 13.3-3 26.6-7.3 44.7-.4 1.6-.8 3.2-1.2 5.2l-1 4.1-.1.3c.1.2.1.3.2.5l1.8 4.5c.1.3.3.7.4 1 .7 1.6 1.4 3.3 2.1 4.8v.1c8.7 18.8 19.7 33.4 33.9 45.1 4.3 3.5 8.9 6.7 13.9 9.8 1.8-.5 3.5-.7 5.3-.9z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M391.5 761c5.7-4.4 16.2-14.5 30.1-34.7-10.3 9.4-23.4 22.4-30.1 34.7zm270.9-83l.2-.3h.2c.6-.4.5-.7.4-.9-.1-.1-4.5-9.3-45.1-7.4 35.3 13.9 43.5 9.1 44.3 8.6z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M535.9 585.3c-.8-1.7-1.5-3.3-2.2-4.9-.1-.3-.3-.7-.4-1l-1.8-4.5c-.1-.2-.1-.3-.2-.5l.1-.3.2-1.1c4-16.3 8.6-35.3 9.4-54.4v-.7c.3-8.6-.2-17.2-2-25.6-3.8-21.3-19.5-29.6-32.9-30.2-11.3-.5-21.8 4-28.1 11.4-.1.1-.1.2-.2.2-.2.2-.4.4-.5.6-2.1 2.7-3.7 5.8-4.6 9.1-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.4-51.2 107.4v.1c-27.7 14.3-64.1 35.8-73.6 62.9 0 .1-.1.2-.1.3-.2.7-.5 1.4-.7 2.1-.1.2-.1.4-.2.6-.2.9-.5 1.8-.6 2.7-.9 4-.4 8.8 1.3 13.6.6 1.8 1.3 3.5 2.2 5.2 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-2.6-2.6-6-4.8-10.1-6.6-.1-.1-.3-.1-.4-.2-.5-.2-1.1-.4-1.6-.7-.4-.2-.8-.3-1.2-.5-.2-.1-.3-.1-.5-.2-16.2-5.8-41.7-6.7-76.3-2.8l-5.3.6c-5-3-9.6-6.3-13.9-9.8-14.2-11.3-25.1-25.8-33.8-44.7zM391.5 761c6.7-12.3 19.8-25.3 30.1-34.7-13.9 20.2-24.4 30.3-30.1 34.7zM507 488.8c.8.1 1.5.7 2.2 2 5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4zm-19.2 188.9c-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4 10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2zm175.4-.9c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4z", "fill": primaryColor } }] }; }, "name": "file-pdf", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (FilePdfTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FilePptFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FilePptFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FilePptFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM468.53 760v-91.54h59.27c60.57 0 100.2-39.65 100.2-98.12 0-58.22-39.58-98.34-99.98-98.34H424a12 12 0 00-12 12v276a12 12 0 0012 12h32.53a12 12 0 0012-12zm0-139.33h34.9c47.82 0 67.19-12.93 67.19-50.33 0-32.05-18.12-50.12-49.87-50.12h-52.22v100.45z" } }] }, "name": "file-ppt", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FilePptFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FilePptOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FilePptOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FilePptOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M424 476c-4.4 0-8 3.6-8 8v276c0 4.4 3.6 8 8 8h32.5c4.4 0 8-3.6 8-8v-95.5h63.3c59.4 0 96.2-38.9 96.2-94.1 0-54.5-36.3-94.3-96-94.3H424zm150.6 94.3c0 43.4-26.5 54.3-71.2 54.3h-38.9V516.2h56.2c33.8 0 53.9 19.7 53.9 54.1zm280-281.7L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z" } }] }, "name": "file-ppt", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FilePptOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FilePptTwoTone.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FilePptTwoTone.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FilePptTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M464.5 516.2v108.4h38.9c44.7 0 71.2-10.9 71.2-54.3 0-34.4-20.1-54.1-53.9-54.1h-56.2z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M534 352V136H232v752h560V394H576a42 42 0 01-42-42zm90 218.4c0 55.2-36.8 94.1-96.2 94.1h-63.3V760c0 4.4-3.6 8-8 8H424c-4.4 0-8-3.6-8-8V484c0-4.4 3.6-8 8-8v.1h104c59.7 0 96 39.8 96 94.3z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M424 476.1c-4.4-.1-8 3.5-8 7.9v276c0 4.4 3.6 8 8 8h32.5c4.4 0 8-3.6 8-8v-95.5h63.3c59.4 0 96.2-38.9 96.2-94.1 0-54.5-36.3-94.3-96-94.3H424zm150.6 94.2c0 43.4-26.5 54.3-71.2 54.3h-38.9V516.2h56.2c33.8 0 53.9 19.7 53.9 54.1z", "fill": primaryColor } }] }; }, "name": "file-ppt", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (FilePptTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileProtectOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileProtectOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileProtectOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M644.7 669.2a7.92 7.92 0 00-6.5-3.3H594c-6.5 0-10.3 7.4-6.5 12.7l73.8 102.1c3.2 4.4 9.7 4.4 12.9 0l114.2-158c3.8-5.3 0-12.7-6.5-12.7h-44.3c-2.6 0-5 1.2-6.5 3.3l-63.5 87.8-22.9-31.9zM688 306v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8zm-392 88c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm184 458H208V148h560v296c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h312c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm402.6-320.8l-192-66.7c-.9-.3-1.7-.4-2.6-.4s-1.8.1-2.6.4l-192 66.7a7.96 7.96 0 00-5.4 7.5v251.1c0 2.5 1.1 4.8 3.1 6.3l192 150.2c1.4 1.1 3.2 1.7 4.9 1.7s3.5-.6 4.9-1.7l192-150.2c1.9-1.5 3.1-3.8 3.1-6.3V538.7c0-3.4-2.2-6.4-5.4-7.5zM826 763.7L688 871.6 550 763.7V577l138-48 138 48v186.7z" } }] }, "name": "file-protect", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FileProtectOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileSearchOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileSearchOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileSearchOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M688 312v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8zm-392 88c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm144 452H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm445.7 51.5l-93.3-93.3C814.7 780.7 828 743.9 828 704c0-97.2-78.8-176-176-176s-176 78.8-176 176 78.8 176 176 176c35.8 0 69-10.7 96.8-29l94.7 94.7c1.6 1.6 3.6 2.3 5.6 2.3s4.1-.8 5.6-2.3l31-31a7.9 7.9 0 000-11.2zM652 816c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, "name": "file-search", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FileSearchOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileSyncOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileSyncOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileSyncOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M296 256c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm192 200v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8zm-48 396H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm104.1-115.6c1.8-34.5 16.2-66.8 40.8-91.4 26.2-26.2 62-41 99.1-41 37.4 0 72.6 14.6 99.1 41 3.2 3.2 6.3 6.6 9.2 10.1L769.2 673a8 8 0 003 14.1l93.3 22.5c5 1.2 9.8-2.6 9.9-7.7l.6-95.4a8 8 0 00-12.9-6.4l-20.3 15.8C805.4 569.6 748.1 540 684 540c-109.9 0-199.6 86.9-204 195.7-.2 4.5 3.5 8.3 8 8.3h48.1c4.3 0 7.8-3.3 8-7.6zM880 744h-48.1c-4.3 0-7.8 3.3-8 7.6-1.8 34.5-16.2 66.8-40.8 91.4-26.2 26.2-62 41-99.1 41-37.4 0-72.6-14.6-99.1-41-3.2-3.2-6.3-6.6-9.2-10.1l23.1-17.9a8 8 0 00-3-14.1l-93.3-22.5c-5-1.2-9.8 2.6-9.9 7.7l-.6 95.4a8 8 0 0012.9 6.4l20.3-15.8C562.6 918.4 619.9 948 684 948c109.9 0 199.6-86.9 204-195.7.2-4.5-3.5-8.3-8-8.3z" } }] }, "name": "file-sync", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FileSyncOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileTextFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileTextFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileTextFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM320 482a8 8 0 00-8 8v48a8 8 0 008 8h384a8 8 0 008-8v-48a8 8 0 00-8-8H320zm0 136a8 8 0 00-8 8v48a8 8 0 008 8h184a8 8 0 008-8v-48a8 8 0 00-8-8H320z" } }] }, "name": "file-text", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FileTextFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileTextOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileTextOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileTextOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z" } }] }, "name": "file-text", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FileTextOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileTextTwoTone.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileTextTwoTone.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileTextTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M534 352V136H232v752h560V394H576a42 42 0 01-42-42zm-22 322c0 4.4-3.6 8-8 8H320c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h184c4.4 0 8 3.6 8 8v48zm200-184v48c0 4.4-3.6 8-8 8H320c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h384c4.4 0 8 3.6 8 8z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8zm192 128H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z", "fill": primaryColor } }] }; }, "name": "file-text", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (FileTextTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M534 352V136H232v752h560V394H576a42 42 0 01-42-42z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z", "fill": primaryColor } }] }; }, "name": "file", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (FileTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileUnknownFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileUnknownFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileUnknownFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM402 549c0 5.4 4.4 9.5 9.8 9.5h32.4c5.4 0 9.8-4.2 9.8-9.4 0-28.2 25.8-51.6 58-51.6s58 23.4 58 51.5c0 25.3-21 47.2-49.3 50.9-19.3 2.8-34.5 20.3-34.7 40.1v32c0 5.5 4.5 10 10 10h32c5.5 0 10-4.5 10-10v-12.2c0-6 4-11.5 9.7-13.3 44.6-14.4 75-54 74.3-98.9-.8-55.5-49.2-100.8-108.5-101.6-61.4-.7-111.5 45.6-111.5 103zm110 227a32 32 0 100-64 32 32 0 000 64z" } }] }, "name": "file-unknown", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FileUnknownFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileUnknownOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileUnknownOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileUnknownOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.7L639.4 73.4c-6-6-14.2-9.4-22.7-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.6-9.4-22.6zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM402 549c0 5.4 4.4 9.5 9.8 9.5h32.4c5.4 0 9.8-4.2 9.8-9.4 0-28.2 25.8-51.6 58-51.6s58 23.4 58 51.5c0 25.3-21 47.2-49.3 50.9-19.3 2.8-34.5 20.3-34.7 40.1v32c0 5.5 4.5 10 10 10h32c5.5 0 10-4.5 10-10v-12.2c0-6 4-11.5 9.7-13.3 44.6-14.4 75-54 74.3-98.9-.8-55.5-49.2-100.8-108.5-101.6-61.4-.7-111.5 45.6-111.5 103zm78 195a32 32 0 1064 0 32 32 0 10-64 0z" } }] }, "name": "file-unknown", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FileUnknownOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileUnknownTwoTone.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileUnknownTwoTone.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileUnknownTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M534 352V136H232v752h560V394H576a42 42 0 01-42-42zm-22 424c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm110-228.4c.7 44.9-29.7 84.5-74.3 98.9-5.7 1.8-9.7 7.3-9.7 13.3V672c0 5.5-4.5 10-10 10h-32c-5.5 0-10-4.5-10-10v-32c.2-19.8 15.4-37.3 34.7-40.1C549 596.2 570 574.3 570 549c0-28.1-25.8-51.5-58-51.5s-58 23.4-58 51.6c0 5.2-4.4 9.4-9.8 9.4h-32.4c-5.4 0-9.8-4.1-9.8-9.5 0-57.4 50.1-103.7 111.5-103 59.3.8 107.7 46.1 108.5 101.6z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M854.6 288.7L639.4 73.4c-6-6-14.2-9.4-22.7-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.6-9.4-22.6zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M480 744a32 32 0 1064 0 32 32 0 10-64 0zm-78-195c0 5.4 4.4 9.5 9.8 9.5h32.4c5.4 0 9.8-4.2 9.8-9.4 0-28.2 25.8-51.6 58-51.6s58 23.4 58 51.5c0 25.3-21 47.2-49.3 50.9-19.3 2.8-34.5 20.3-34.7 40.1v32c0 5.5 4.5 10 10 10h32c5.5 0 10-4.5 10-10v-12.2c0-6 4-11.5 9.7-13.3 44.6-14.4 75-54 74.3-98.9-.8-55.5-49.2-100.8-108.5-101.6-61.4-.7-111.5 45.6-111.5 103z", "fill": primaryColor } }] }; }, "name": "file-unknown", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (FileUnknownTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileWordFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileWordFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileWordFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM512 566.1l52.81 197a12 12 0 0011.6 8.9h31.77a12 12 0 0011.6-8.88l74.37-276a12 12 0 00.4-3.12 12 12 0 00-12-12h-35.57a12 12 0 00-11.7 9.31l-45.78 199.1-49.76-199.32A12 12 0 00528.1 472h-32.2a12 12 0 00-11.64 9.1L434.6 680.01 388.5 481.3a12 12 0 00-11.68-9.29h-35.39a12 12 0 00-3.11.41 12 12 0 00-8.47 14.7l74.17 276A12 12 0 00415.6 772h31.99a12 12 0 0011.59-8.9l52.81-197z" } }] }, "name": "file-word", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FileWordFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileWordOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileWordOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileWordOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM528.1 472h-32.2c-5.5 0-10.3 3.7-11.6 9.1L434.6 680l-46.1-198.7c-1.3-5.4-6.1-9.3-11.7-9.3h-35.4a12.02 12.02 0 00-11.6 15.1l74.2 276c1.4 5.2 6.2 8.9 11.6 8.9h32c5.4 0 10.2-3.6 11.6-8.9l52.8-197 52.8 197c1.4 5.2 6.2 8.9 11.6 8.9h31.8c5.4 0 10.2-3.6 11.6-8.9l74.4-276a12.04 12.04 0 00-11.6-15.1H647c-5.6 0-10.4 3.9-11.7 9.3l-45.8 199.1-49.8-199.3c-1.3-5.4-6.1-9.1-11.6-9.1z" } }] }, "name": "file-word", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FileWordOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileWordTwoTone.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileWordTwoTone.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileWordTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M534 352V136H232v752h560V394H576a42 42 0 01-42-42zm101.3 129.3c1.3-5.4 6.1-9.3 11.7-9.3h35.6a12.04 12.04 0 0111.6 15.1l-74.4 276c-1.4 5.3-6.2 8.9-11.6 8.9h-31.8c-5.4 0-10.2-3.7-11.6-8.9l-52.8-197-52.8 197c-1.4 5.3-6.2 8.9-11.6 8.9h-32c-5.4 0-10.2-3.7-11.6-8.9l-74.2-276a12.02 12.02 0 0111.6-15.1h35.4c5.6 0 10.4 3.9 11.7 9.3L434.6 680l49.7-198.9c1.3-5.4 6.1-9.1 11.6-9.1h32.2c5.5 0 10.3 3.7 11.6 9.1l49.8 199.3 45.8-199.1z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M528.1 472h-32.2c-5.5 0-10.3 3.7-11.6 9.1L434.6 680l-46.1-198.7c-1.3-5.4-6.1-9.3-11.7-9.3h-35.4a12.02 12.02 0 00-11.6 15.1l74.2 276c1.4 5.2 6.2 8.9 11.6 8.9h32c5.4 0 10.2-3.6 11.6-8.9l52.8-197 52.8 197c1.4 5.2 6.2 8.9 11.6 8.9h31.8c5.4 0 10.2-3.6 11.6-8.9l74.4-276a12.04 12.04 0 00-11.6-15.1H647c-5.6 0-10.4 3.9-11.7 9.3l-45.8 199.1-49.8-199.3c-1.3-5.4-6.1-9.1-11.6-9.1z", "fill": primaryColor } }] }; }, "name": "file-word", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (FileWordTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileZipFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileZipFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileZipFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM296 136v64h64v-64h-64zm64 64v64h64v-64h-64zm-64 64v64h64v-64h-64zm64 64v64h64v-64h-64zm-64 64v64h64v-64h-64zm64 64v64h64v-64h-64zm-64 64v64h64v-64h-64zm0 64v160h128V584H296zm48 48h32v64h-32v-64z" } }] }, "name": "file-zip", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FileZipFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileZipOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileZipOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileZipOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M296 392h64v64h-64zm0 190v160h128V582h-64v-62h-64v62zm80 48v64h-32v-64h32zm-16-302h64v64h-64zm-64-64h64v64h-64zm64 192h64v64h-64zm0-256h64v64h-64zm494.6 88.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h64v64h64v-64h174v216a42 42 0 0042 42h216v494z" } }] }, "name": "file-zip", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FileZipOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FileZipTwoTone.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FileZipTwoTone.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FileZipTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M344 630h32v2h-32z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M534 352V136H360v64h64v64h-64v64h64v64h-64v64h64v64h-64v62h64v160H296V520h64v-64h-64v-64h64v-64h-64v-64h64v-64h-64v-64h-64v752h560V394H576a42 42 0 01-42-42z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h64v64h64v-64h174v216a42 42 0 0042 42h216v494z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M296 392h64v64h-64zm0-128h64v64h-64zm0 318v160h128V582h-64v-62h-64v62zm48 50v-2h32v64h-32v-62zm16-432h64v64h-64zm0 256h64v64h-64zm0-128h64v64h-64z", "fill": primaryColor } }] }; }, "name": "file-zip", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (FileZipTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FilterFilled.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FilterFilled.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FilterFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z" } }] }, "name": "filter", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FilterFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FilterOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FilterOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FilterOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z" } }] }, "name": "filter", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FilterOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FilterTwoTone.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FilterTwoTone.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FilterTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M420.6 798h182.9V642H420.6zM411 561.4l9.5 16.6h183l9.5-16.6L811.3 226H212.7z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.5 798H420.6V642h182.9v156zm9.5-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z", "fill": primaryColor } }] }; }, "name": "filter", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (FilterTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FireFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FireFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FireFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9z" } }] }, "name": "fire", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FireFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FireOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FireOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FireOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9zM713 808.5c-53.7 53.2-125 82.4-201 82.4s-147.3-29.2-201-82.4c-53.5-53.1-83-123.5-83-198.4 0-43.5 9.8-85.2 29.1-124 18.8-37.9 46.8-71.8 80.8-97.9a349.6 349.6 0 0058.6-56.8c25-30.5 44.6-64.5 58.2-101a240 240 0 0012.1-46.5c24.1 22.2 44.3 49 61.2 80.4 33.4 62.6 48.8 118.3 45.8 165.7a74.01 74.01 0 0024.4 59.8 73.36 73.36 0 0053.4 18.8c19.7-1 37.8-9.7 51-24.4 13.3-14.9 24.8-30.1 34.4-45.6 14 17.9 25.7 37.4 35 58.4 15.9 35.8 24 73.9 24 113.1 0 74.9-29.5 145.4-83 198.4z" } }] }, "name": "fire", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FireOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FireTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FireTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FireTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M737 438.6c-9.6 15.5-21.1 30.7-34.4 45.6a73.1 73.1 0 01-51 24.4 73.36 73.36 0 01-53.4-18.8 74.01 74.01 0 01-24.4-59.8c3-47.4-12.4-103.1-45.8-165.7-16.9-31.4-37.1-58.2-61.2-80.4a240 240 0 01-12.1 46.5 354.26 354.26 0 01-58.2 101 349.6 349.6 0 01-58.6 56.8c-34 26.1-62 60-80.8 97.9a275.96 275.96 0 00-29.1 124c0 74.9 29.5 145.3 83 198.4 53.7 53.2 125 82.4 201 82.4s147.3-29.2 201-82.4c53.5-53 83-123.5 83-198.4 0-39.2-8.1-77.3-24-113.1-9.3-21-21-40.5-35-58.4z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9zM713 808.5c-53.7 53.2-125 82.4-201 82.4s-147.3-29.2-201-82.4c-53.5-53.1-83-123.5-83-198.4 0-43.5 9.8-85.2 29.1-124 18.8-37.9 46.8-71.8 80.8-97.9a349.6 349.6 0 0058.6-56.8c25-30.5 44.6-64.5 58.2-101a240 240 0 0012.1-46.5c24.1 22.2 44.3 49 61.2 80.4 33.4 62.6 48.8 118.3 45.8 165.7a74.01 74.01 0 0024.4 59.8 73.36 73.36 0 0053.4 18.8c19.7-1 37.8-9.7 51-24.4 13.3-14.9 24.8-30.1 34.4-45.6 14 17.9 25.7 37.4 35 58.4 15.9 35.8 24 73.9 24 113.1 0 74.9-29.5 145.4-83 198.4z", "fill": primaryColor } }] }; }, "name": "fire", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (FireTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FlagFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FlagFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FlagFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 305H624V192c0-17.7-14.3-32-32-32H184v-40c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v784c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V640h248v113c0 17.7 14.3 32 32 32h416c17.7 0 32-14.3 32-32V337c0-17.7-14.3-32-32-32z" } }] }, "name": "flag", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FlagFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FlagOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FlagOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FlagOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 305H624V192c0-17.7-14.3-32-32-32H184v-40c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v784c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V640h248v113c0 17.7 14.3 32 32 32h416c17.7 0 32-14.3 32-32V337c0-17.7-14.3-32-32-32zM184 568V232h368v336H184zm656 145H504v-73h112c4.4 0 8-3.6 8-8V377h216v336z" } }] }, "name": "flag", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FlagOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FlagTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FlagTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FlagTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M184 232h368v336H184z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M624 632c0 4.4-3.6 8-8 8H504v73h336V377H624v255z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M880 305H624V192c0-17.7-14.3-32-32-32H184v-40c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v784c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V640h248v113c0 17.7 14.3 32 32 32h416c17.7 0 32-14.3 32-32V337c0-17.7-14.3-32-32-32zM184 568V232h368v336H184zm656 145H504v-73h112c4.4 0 8-3.6 8-8V377h216v336z", "fill": primaryColor } }] }; }, "name": "flag", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (FlagTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FolderAddFilled.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FolderAddFilled.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FolderAddFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM632 577c0 3.8-3.4 7-7.5 7H540v84.9c0 3.9-3.2 7.1-7 7.1h-42c-3.8 0-7-3.2-7-7.1V584h-84.5c-4.1 0-7.5-3.2-7.5-7v-42c0-3.8 3.4-7 7.5-7H484v-84.9c0-3.9 3.2-7.1 7-7.1h42c3.8 0 7 3.2 7 7.1V528h84.5c4.1 0 7.5 3.2 7.5 7v42z" } }] }, "name": "folder-add", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FolderAddFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FolderAddOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FolderAddOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FolderAddOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M484 443.1V528h-84.5c-4.1 0-7.5 3.1-7.5 7v42c0 3.8 3.4 7 7.5 7H484v84.9c0 3.9 3.2 7.1 7 7.1h42c3.9 0 7-3.2 7-7.1V584h84.5c4.1 0 7.5-3.2 7.5-7v-42c0-3.9-3.4-7-7.5-7H540v-84.9c0-3.9-3.1-7.1-7-7.1h-42c-3.8 0-7 3.2-7 7.1zm396-144.7H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z" } }] }, "name": "folder-add", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FolderAddOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FolderAddTwoTone.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FolderAddTwoTone.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FolderAddTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M372.5 256H184v512h656V370.4H492.1L372.5 256zM540 443.1V528h84.5c4.1 0 7.5 3.1 7.5 7v42c0 3.8-3.4 7-7.5 7H540v84.9c0 3.9-3.1 7.1-7 7.1h-42c-3.8 0-7-3.2-7-7.1V584h-84.5c-4.1 0-7.5-3.2-7.5-7v-42c0-3.9 3.4-7 7.5-7H484v-84.9c0-3.9 3.2-7.1 7-7.1h42c3.9 0 7 3.2 7 7.1z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M484 443.1V528h-84.5c-4.1 0-7.5 3.1-7.5 7v42c0 3.8 3.4 7 7.5 7H484v84.9c0 3.9 3.2 7.1 7 7.1h42c3.9 0 7-3.2 7-7.1V584h84.5c4.1 0 7.5-3.2 7.5-7v-42c0-3.9-3.4-7-7.5-7H540v-84.9c0-3.9-3.1-7.1-7-7.1h-42c-3.8 0-7 3.2-7 7.1z", "fill": primaryColor } }] }; }, "name": "folder-add", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (FolderAddTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FolderFilled.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FolderFilled.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FolderFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32z" } }] }, "name": "folder", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FolderFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FolderOpenFilled.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FolderOpenFilled.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FolderOpenFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zm-180 0H238c-13 0-24.8 7.9-29.7 20L136 643.2V256h188.5l119.6 114.4H748V444z" } }] }, "name": "folder-open", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FolderOpenFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FolderOpenOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FolderOpenOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FolderOpenOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z" } }] }, "name": "folder-open", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FolderOpenOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FolderOpenTwoTone.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FolderOpenTwoTone.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FolderOpenTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M159 768h612.3l103.4-256H262.3z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z", "fill": primaryColor } }] }; }, "name": "folder-open", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (FolderOpenTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FolderOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FolderOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FolderOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z" } }] }, "name": "folder", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FolderOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FolderTwoTone.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FolderTwoTone.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FolderTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M372.5 256H184v512h656V370.4H492.1z", "fill": secondaryColor } }] }; }, "name": "folder", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (FolderTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FolderViewOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FolderViewOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FolderViewOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M309.1 554.3a42.92 42.92 0 000 36.4C353.3 684 421.6 732 512.5 732s159.2-48.1 203.4-141.3c5.4-11.5 5.4-24.8.1-36.3l-.1-.1-.1-.1C671.7 461 603.4 413 512.5 413s-159.2 48.1-203.4 141.3zM512.5 477c62.1 0 107.4 30 141.1 95.5C620 638 574.6 668 512.5 668s-107.4-30-141.1-95.5c33.7-65.5 79-95.5 141.1-95.5z" } }, { "tag": "path", "attrs": { "d": "M457 573a56 56 0 10112 0 56 56 0 10-112 0z" } }, { "tag": "path", "attrs": { "d": "M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z" } }] }, "name": "folder-view", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FolderViewOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FontColorsOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FontColorsOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FontColorsOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M904 816H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8zm-650.3-80h85c4.2 0 8-2.7 9.3-6.8l53.7-166h219.2l53.2 166c1.3 4 5 6.8 9.3 6.8h89.1c1.1 0 2.2-.2 3.2-.5a9.7 9.7 0 006-12.4L573.6 118.6a9.9 9.9 0 00-9.2-6.6H462.1c-4.2 0-7.9 2.6-9.2 6.6L244.5 723.1c-.4 1-.5 2.1-.5 3.2-.1 5.3 4.3 9.7 9.7 9.7zm255.9-516.1h4.1l83.8 263.8H424.9l84.7-263.8z" } }] }, "name": "font-colors", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FontColorsOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FontSizeOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FontSizeOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FontSizeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M920 416H616c-4.4 0-8 3.6-8 8v112c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-56h60v320h-46c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h164c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8h-46V480h60v56c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V424c0-4.4-3.6-8-8-8zM656 296V168c0-4.4-3.6-8-8-8H104c-4.4 0-8 3.6-8 8v128c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-64h168v560h-92c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-92V232h168v64c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8z" } }] }, "name": "font-size", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FontSizeOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ForkOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ForkOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ForkOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M752 100c-61.8 0-112 50.2-112 112 0 47.7 29.9 88.5 72 104.6v27.6L512 601.4 312 344.2v-27.6c42.1-16.1 72-56.9 72-104.6 0-61.8-50.2-112-112-112s-112 50.2-112 112c0 50.6 33.8 93.5 80 107.3v34.4c0 9.7 3.3 19.3 9.3 27L476 672.3v33.6c-44.2 15-76 56.9-76 106.1 0 61.8 50.2 112 112 112s112-50.2 112-112c0-49.2-31.8-91-76-106.1v-33.6l226.7-291.6c6-7.7 9.3-17.3 9.3-27v-34.4c46.2-13.8 80-56.7 80-107.3 0-61.8-50.2-112-112-112zM224 212a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm336 600a48.01 48.01 0 01-96 0 48.01 48.01 0 0196 0zm192-552a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "fork", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ForkOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FormOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FormOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FormOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z" } }, { "tag": "path", "attrs": { "d": "M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z" } }] }, "name": "form", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FormOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FormatPainterFilled.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FormatPainterFilled.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FormatPainterFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M840 192h-56v-72c0-13.3-10.7-24-24-24H168c-13.3 0-24 10.7-24 24v272c0 13.3 10.7 24 24 24h592c13.3 0 24-10.7 24-24V256h32v200H465c-22.1 0-40 17.9-40 40v136h-44c-4.4 0-8 3.6-8 8v228c0 1.1.2 2.2.6 3.1-.4 1.6-.6 3.2-.6 4.9 0 46.4 37.6 84 84 84s84-37.6 84-84c0-1.7-.2-3.3-.6-4.9.4-1 .6-2 .6-3.1V640c0-4.4-3.6-8-8-8h-44V520h351c22.1 0 40-17.9 40-40V232c0-22.1-17.9-40-40-40z" } }] }, "name": "format-painter", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FormatPainterFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FormatPainterOutlined.js": /*!****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FormatPainterOutlined.js ***! \****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FormatPainterOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M840 192h-56v-72c0-13.3-10.7-24-24-24H168c-13.3 0-24 10.7-24 24v272c0 13.3 10.7 24 24 24h592c13.3 0 24-10.7 24-24V256h32v200H465c-22.1 0-40 17.9-40 40v136h-44c-4.4 0-8 3.6-8 8v228c0 .6.1 1.3.2 1.9A83.99 83.99 0 00457 960c46.4 0 84-37.6 84-84 0-2.1-.1-4.1-.2-6.1.1-.6.2-1.2.2-1.9V640c0-4.4-3.6-8-8-8h-44V520h351c22.1 0 40-17.9 40-40V232c0-22.1-17.9-40-40-40zM720 352H208V160h512v192zM477 876c0 11-9 20-20 20s-20-9-20-20V696h40v180z" } }] }, "name": "format-painter", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FormatPainterOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ForwardFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ForwardFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ForwardFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M825.8 498L538.4 249.9c-10.7-9.2-26.4-.9-26.4 14v496.3c0 14.9 15.7 23.2 26.4 14L825.8 526c8.3-7.2 8.3-20.8 0-28zm-320 0L218.4 249.9c-10.7-9.2-26.4-.9-26.4 14v496.3c0 14.9 15.7 23.2 26.4 14L505.8 526c4.1-3.6 6.2-8.8 6.2-14 0-5.2-2.1-10.4-6.2-14z" } }] }, "name": "forward", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (ForwardFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ForwardOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ForwardOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ForwardOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M825.8 498L538.4 249.9c-10.7-9.2-26.4-.9-26.4 14v496.3c0 14.9 15.7 23.2 26.4 14L825.8 526c8.3-7.2 8.3-20.8 0-28zm-320 0L218.4 249.9c-10.7-9.2-26.4-.9-26.4 14v496.3c0 14.9 15.7 23.2 26.4 14L505.8 526c4.1-3.6 6.2-8.8 6.2-14 0-5.2-2.1-10.4-6.2-14z" } }] }, "name": "forward", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ForwardOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FrownFilled.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FrownFilled.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FrownFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zM288 421a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm376 272h-48.1c-4.2 0-7.8-3.2-8.1-7.4C604 636.1 562.5 597 512 597s-92.1 39.1-95.8 88.6c-.3 4.2-3.9 7.4-8.1 7.4H360a8 8 0 01-8-8.4c4.4-84.3 74.5-151.6 160-151.6s155.6 67.3 160 151.6a8 8 0 01-8 8.4zm24-224a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "frown", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FrownFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FrownOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FrownOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FrownOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM512 533c-85.5 0-155.6 67.3-160 151.6a8 8 0 008 8.4h48.1c4.2 0 7.8-3.2 8.1-7.4C420 636.1 461.5 597 512 597s92.1 39.1 95.8 88.6c.3 4.2 3.9 7.4 8.1 7.4H664a8 8 0 008-8.4C667.6 600.3 597.5 533 512 533z" } }] }, "name": "frown", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FrownOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FrownTwoTone.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FrownTwoTone.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FrownTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zM288 421a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm376 272h-48.1c-4.2 0-7.8-3.2-8.1-7.4C604 636.1 562.5 597 512 597s-92.1 39.1-95.8 88.6c-.3 4.2-3.9 7.4-8.1 7.4H360a8 8 0 01-8-8.4c4.4-84.3 74.5-151.6 160-151.6s155.6 67.3 160 151.6a8 8 0 01-8 8.4zm24-224a48.01 48.01 0 010-96 48.01 48.01 0 010 96z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M288 421a48 48 0 1096 0 48 48 0 10-96 0zm224 112c-85.5 0-155.6 67.3-160 151.6a8 8 0 008 8.4h48.1c4.2 0 7.8-3.2 8.1-7.4 3.7-49.5 45.3-88.6 95.8-88.6s92 39.1 95.8 88.6c.3 4.2 3.9 7.4 8.1 7.4H664a8 8 0 008-8.4C667.6 600.3 597.5 533 512 533zm128-112a48 48 0 1096 0 48 48 0 10-96 0z", "fill": primaryColor } }] }; }, "name": "frown", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (FrownTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FullscreenExitOutlined.js": /*!*****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FullscreenExitOutlined.js ***! \*****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FullscreenExitOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 000 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 00391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 00-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z" } }] }, "name": "fullscreen-exit", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FullscreenExitOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FullscreenOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FullscreenOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FullscreenOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M290 236.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0013.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 000 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 00-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z" } }] }, "name": "fullscreen", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FullscreenOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FunctionOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FunctionOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FunctionOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M841 370c3-3.3 2.7-8.3-.6-11.3a8.24 8.24 0 00-5.3-2.1h-72.6c-2.4 0-4.6 1-6.1 2.8L633.5 504.6a7.96 7.96 0 01-13.4-1.9l-63.5-141.3a7.9 7.9 0 00-7.3-4.7H380.7l.9-4.7 8-42.3c10.5-55.4 38-81.4 85.8-81.4 18.6 0 35.5 1.7 48.8 4.7l14.1-66.8c-22.6-4.7-35.2-6.1-54.9-6.1-103.3 0-156.4 44.3-175.9 147.3l-9.4 49.4h-97.6c-3.8 0-7.1 2.7-7.8 6.4L181.9 415a8.07 8.07 0 007.8 9.7H284l-89 429.9a8.07 8.07 0 007.8 9.7H269c3.8 0 7.1-2.7 7.8-6.4l89.7-433.1h135.8l68.2 139.1c1.4 2.9 1 6.4-1.2 8.8l-180.6 203c-2.9 3.3-2.6 8.4.7 11.3 1.5 1.3 3.4 2 5.3 2h72.7c2.4 0 4.6-1 6.1-2.8l123.7-146.7c2.8-3.4 7.9-3.8 11.3-1 .9.8 1.6 1.7 2.1 2.8L676.4 784c1.3 2.8 4.1 4.7 7.3 4.7h64.6a8.02 8.02 0 007.2-11.5l-95.2-198.9c-1.4-2.9-.9-6.4 1.3-8.8L841 370z" } }] }, "name": "function", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FunctionOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FundFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FundFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FundFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M926 164H94c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V196c0-17.7-14.3-32-32-32zm-92.3 194.4l-297 297.2a8.03 8.03 0 01-11.3 0L410.9 541.1 238.4 713.7a8.03 8.03 0 01-11.3 0l-36.8-36.8a8.03 8.03 0 010-11.3l214.9-215c3.1-3.1 8.2-3.1 11.3 0L531 565l254.5-254.6c3.1-3.1 8.2-3.1 11.3 0l36.8 36.8c3.2 3 3.2 8.1.1 11.2z" } }] }, "name": "fund", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FundFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FundOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FundOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FundOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M926 164H94c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V196c0-17.7-14.3-32-32-32zm-40 632H134V236h752v560zm-658.9-82.3c3.1 3.1 8.2 3.1 11.3 0l172.5-172.5 114.4 114.5c3.1 3.1 8.2 3.1 11.3 0l297-297.2c3.1-3.1 3.1-8.2 0-11.3l-36.8-36.8a8.03 8.03 0 00-11.3 0L531 565 416.6 450.5a8.03 8.03 0 00-11.3 0l-214.9 215a8.03 8.03 0 000 11.3l36.7 36.9z" } }] }, "name": "fund", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FundOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FundProjectionScreenOutlined.js": /*!***********************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FundProjectionScreenOutlined.js ***! \***********************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FundProjectionScreenOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M312.1 591.5c3.1 3.1 8.2 3.1 11.3 0l101.8-101.8 86.1 86.2c3.1 3.1 8.2 3.1 11.3 0l226.3-226.5c3.1-3.1 3.1-8.2 0-11.3l-36.8-36.8a8.03 8.03 0 00-11.3 0L517 485.3l-86.1-86.2a8.03 8.03 0 00-11.3 0L275.3 543.4a8.03 8.03 0 000 11.3l36.8 36.8z" } }, { "tag": "path", "attrs": { "d": "M904 160H548V96c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H120c-17.7 0-32 14.3-32 32v520c0 17.7 14.3 32 32 32h356.4v32L311.6 884.1a7.92 7.92 0 00-2.3 11l30.3 47.2v.1c2.4 3.7 7.4 4.7 11.1 2.3L512 838.9l161.3 105.8c3.7 2.4 8.7 1.4 11.1-2.3v-.1l30.3-47.2a8 8 0 00-2.3-11L548 776.3V744h356c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 512H160V232h704v440z" } }] }, "name": "fund-projection-screen", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FundProjectionScreenOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FundTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FundTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FundTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136V232h752v560z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M136 792h752V232H136v560zm56.4-130.5l214.9-215c3.1-3.1 8.2-3.1 11.3 0L533 561l254.5-254.6c3.1-3.1 8.2-3.1 11.3 0l36.8 36.8c3.1 3.1 3.1 8.2 0 11.3l-297 297.2a8.03 8.03 0 01-11.3 0L412.9 537.2 240.4 709.7a8.03 8.03 0 01-11.3 0l-36.7-36.9a8.03 8.03 0 010-11.3z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M229.1 709.7c3.1 3.1 8.2 3.1 11.3 0l172.5-172.5 114.4 114.5c3.1 3.1 8.2 3.1 11.3 0l297-297.2c3.1-3.1 3.1-8.2 0-11.3l-36.8-36.8a8.03 8.03 0 00-11.3 0L533 561 418.6 446.5a8.03 8.03 0 00-11.3 0l-214.9 215a8.03 8.03 0 000 11.3l36.7 36.9z", "fill": primaryColor } }] }; }, "name": "fund", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (FundTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FundViewOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FundViewOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FundViewOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M956 686.5l-.1-.1-.1-.1C911.7 593 843.4 545 752.5 545s-159.2 48.1-203.4 141.3v.1a42.92 42.92 0 000 36.4C593.3 816 661.6 864 752.5 864s159.2-48.1 203.4-141.3c5.4-11.5 5.4-24.8.1-36.2zM752.5 800c-62.1 0-107.4-30-141.1-95.5C645 639 690.4 609 752.5 609c62.1 0 107.4 30 141.1 95.5C860 770 814.6 800 752.5 800z" } }, { "tag": "path", "attrs": { "d": "M697 705a56 56 0 10112 0 56 56 0 10-112 0zM136 232h704v253h72V192c0-17.7-14.3-32-32-32H96c-17.7 0-32 14.3-32 32v520c0 17.7 14.3 32 32 32h352v-72H136V232z" } }, { "tag": "path", "attrs": { "d": "M724.9 338.1l-36.8-36.8a8.03 8.03 0 00-11.3 0L493 485.3l-86.1-86.2a8.03 8.03 0 00-11.3 0L251.3 543.4a8.03 8.03 0 000 11.3l36.8 36.8c3.1 3.1 8.2 3.1 11.3 0l101.8-101.8 86.1 86.2c3.1 3.1 8.2 3.1 11.3 0l226.3-226.5c3.2-3.1 3.2-8.2 0-11.3z" } }] }, "name": "fund-view", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FundViewOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FunnelPlotFilled.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FunnelPlotFilled.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FunnelPlotFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M336.7 586h350.6l84.9-148H251.8zm543.4-432H143.9c-24.5 0-39.8 26.7-27.5 48L215 374h594l98.7-172c12.2-21.3-3.1-48-27.6-48zM349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V650H349v188z" } }] }, "name": "funnel-plot", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (FunnelPlotFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FunnelPlotOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FunnelPlotOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FunnelPlotOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 607.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V607.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V650h182.9v148zm9.6-226.6l-8.4 14.6H419.3l-8.4-14.6L334.4 438h355.2L613 571.4zM726.3 374H297.7l-85-148h598.6l-85 148z" } }] }, "name": "funnel-plot", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (FunnelPlotOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/FunnelPlotTwoTone.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/FunnelPlotTwoTone.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var FunnelPlotTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M420.6 798h182.9V650H420.6zM297.7 374h428.6l85-148H212.7zm113.2 197.4l8.4 14.6h185.3l8.4-14.6L689.6 438H334.4z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 607.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V607.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.5 798H420.6V650h182.9v148zm9.5-226.6l-8.4 14.6H419.3l-8.4-14.6L334.4 438h355.2L613 571.4zM726.3 374H297.7l-85-148h598.6l-85 148z", "fill": primaryColor } }] }; }, "name": "funnel-plot", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (FunnelPlotTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/GatewayOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/GatewayOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var GatewayOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 392c8.8 0 16-7.2 16-16V192c0-8.8-7.2-16-16-16H744c-8.8 0-16 7.2-16 16v56H296v-56c0-8.8-7.2-16-16-16H96c-8.8 0-16 7.2-16 16v184c0 8.8 7.2 16 16 16h56v240H96c-8.8 0-16 7.2-16 16v184c0 8.8 7.2 16 16 16h184c8.8 0 16-7.2 16-16v-56h432v56c0 8.8 7.2 16 16 16h184c8.8 0 16-7.2 16-16V648c0-8.8-7.2-16-16-16h-56V392h56zM792 240h88v88h-88v-88zm-648 88v-88h88v88h-88zm88 456h-88v-88h88v88zm648-88v88h-88v-88h88zm-80-64h-56c-8.8 0-16 7.2-16 16v56H296v-56c0-8.8-7.2-16-16-16h-56V392h56c8.8 0 16-7.2 16-16v-56h432v56c0 8.8 7.2 16 16 16h56v240z" } }] }, "name": "gateway", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (GatewayOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/GifOutlined.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/GifOutlined.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var GifOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M944 299H692c-4.4 0-8 3.6-8 8v406c0 4.4 3.6 8 8 8h59.2c4.4 0 8-3.6 8-8V549.9h168.2c4.4 0 8-3.6 8-8V495c0-4.4-3.6-8-8-8H759.2V364.2H944c4.4 0 8-3.6 8-8V307c0-4.4-3.6-8-8-8zm-356 1h-56c-4.4 0-8 3.6-8 8v406c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V308c0-4.4-3.6-8-8-8zM452 500.9H290.5c-4.4 0-8 3.6-8 8v43.7c0 4.4 3.6 8 8 8h94.9l-.3 8.9c-1.2 58.8-45.6 98.5-110.9 98.5-76.2 0-123.9-59.7-123.9-156.7 0-95.8 46.8-155.2 121.5-155.2 54.8 0 93.1 26.9 108.5 75.4h76.2c-13.6-87.2-86-143.4-184.7-143.4C150 288 72 375.2 72 511.9 72 650.2 149.1 736 273 736c114.1 0 187-70.7 187-181.6v-45.5c0-4.4-3.6-8-8-8z" } }] }, "name": "gif", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (GifOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/GiftFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/GiftFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var GiftFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M160 894c0 17.7 14.3 32 32 32h286V550H160v344zm386 32h286c17.7 0 32-14.3 32-32V550H546v376zm334-616H732.4c13.6-21.4 21.6-46.8 21.6-74 0-76.1-61.9-138-138-138-41.4 0-78.7 18.4-104 47.4-25.3-29-62.6-47.4-104-47.4-76.1 0-138 61.9-138 138 0 27.2 7.9 52.6 21.6 74H144c-17.7 0-32 14.3-32 32v140h366V310h68v172h366V342c0-17.7-14.3-32-32-32zm-402-4h-70c-38.6 0-70-31.4-70-70s31.4-70 70-70 70 31.4 70 70v70zm138 0h-70v-70c0-38.6 31.4-70 70-70s70 31.4 70 70-31.4 70-70 70z" } }] }, "name": "gift", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (GiftFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/GiftOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/GiftOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var GiftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 310H732.4c13.6-21.4 21.6-46.8 21.6-74 0-76.1-61.9-138-138-138-41.4 0-78.7 18.4-104 47.4-25.3-29-62.6-47.4-104-47.4-76.1 0-138 61.9-138 138 0 27.2 7.9 52.6 21.6 74H144c-17.7 0-32 14.3-32 32v200c0 4.4 3.6 8 8 8h40v344c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V550h40c4.4 0 8-3.6 8-8V342c0-17.7-14.3-32-32-32zm-334-74c0-38.6 31.4-70 70-70s70 31.4 70 70-31.4 70-70 70h-70v-70zm-138-70c38.6 0 70 31.4 70 70v70h-70c-38.6 0-70-31.4-70-70s31.4-70 70-70zM180 482V378h298v104H180zm48 68h250v308H228V550zm568 308H546V550h250v308zm48-376H546V378h298v104z" } }] }, "name": "gift", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (GiftOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/GiftTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/GiftTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var GiftTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M546 378h298v104H546zM228 550h250v308H228zm-48-172h298v104H180zm366 172h250v308H546z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M880 310H732.4c13.6-21.4 21.6-46.8 21.6-74 0-76.1-61.9-138-138-138-41.4 0-78.7 18.4-104 47.4-25.3-29-62.6-47.4-104-47.4-76.1 0-138 61.9-138 138 0 27.2 7.9 52.6 21.6 74H144c-17.7 0-32 14.3-32 32v200c0 4.4 3.6 8 8 8h40v344c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V550h40c4.4 0 8-3.6 8-8V342c0-17.7-14.3-32-32-32zM478 858H228V550h250v308zm0-376H180V378h298v104zm0-176h-70c-38.6 0-70-31.4-70-70s31.4-70 70-70 70 31.4 70 70v70zm68-70c0-38.6 31.4-70 70-70s70 31.4 70 70-31.4 70-70 70h-70v-70zm250 622H546V550h250v308zm48-376H546V378h298v104z", "fill": primaryColor } }] }; }, "name": "gift", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (GiftTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/GithubFilled.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/GithubFilled.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var GithubFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z" } }] }, "name": "github", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (GithubFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/GithubOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/GithubOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var GithubOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z" } }] }, "name": "github", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (GithubOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/GitlabFilled.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/GitlabFilled.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var GitlabFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M910.5 553.2l-109-370.8c-6.8-20.4-23.1-34.1-44.9-34.1s-39.5 12.3-46.3 32.7l-72.2 215.4H386.2L314 181.1c-6.8-20.4-24.5-32.7-46.3-32.7s-39.5 13.6-44.9 34.1L113.9 553.2c-4.1 13.6 1.4 28.6 12.3 36.8l385.4 289 386.7-289c10.8-8.1 16.3-23.1 12.2-36.8z" } }] }, "name": "gitlab", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (GitlabFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/GitlabOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/GitlabOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var GitlabOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M913.9 552.2L805 181.4v-.1c-7.6-22.9-25.7-36.5-48.3-36.5-23.4 0-42.5 13.5-49.7 35.2l-71.4 213H388.8l-71.4-213c-7.2-21.7-26.3-35.2-49.7-35.2-23.1 0-42.5 14.8-48.4 36.6L110.5 552.2c-4.4 14.7 1.2 31.4 13.5 40.7l368.5 276.4c2.6 3.6 6.2 6.3 10.4 7.8l8.6 6.4 8.5-6.4c4.9-1.7 9-4.7 11.9-8.9l368.4-275.4c12.4-9.2 18-25.9 13.6-40.6zM751.7 193.4c1-1.8 2.9-1.9 3.5-1.9 1.1 0 2.5.3 3.4 3L818 394.3H684.5l67.2-200.9zm-487.4 1c.9-2.6 2.3-2.9 3.4-2.9 2.7 0 2.9.1 3.4 1.7l67.3 201.2H206.5l57.8-200zM158.8 558.7l28.2-97.3 202.4 270.2-230.6-172.9zm73.9-116.4h122.1l90.8 284.3-212.9-284.3zM512.9 776L405.7 442.3H620L512.9 776zm157.9-333.7h119.5L580 723.1l90.8-280.8zm-40.7 293.9l207.3-276.7 29.5 99.2-236.8 177.5z" } }] }, "name": "gitlab", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (GitlabOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/GlobalOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/GlobalOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var GlobalOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z" } }] }, "name": "global", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (GlobalOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/GoldFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/GoldFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var GoldFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M905.9 806.7l-40.2-248c-.6-3.9-4-6.7-7.9-6.7H596.2c-3.9 0-7.3 2.8-7.9 6.7l-40.2 248c-.1.4-.1.9-.1 1.3 0 4.4 3.6 8 8 8h342c.4 0 .9 0 1.3-.1 4.3-.7 7.3-4.8 6.6-9.2zm-470.2-248c-.6-3.9-4-6.7-7.9-6.7H166.2c-3.9 0-7.3 2.8-7.9 6.7l-40.2 248c-.1.4-.1.9-.1 1.3 0 4.4 3.6 8 8 8h342c.4 0 .9 0 1.3-.1 4.4-.7 7.3-4.8 6.6-9.2l-40.2-248zM342 472h342c.4 0 .9 0 1.3-.1 4.4-.7 7.3-4.8 6.6-9.2l-40.2-248c-.6-3.9-4-6.7-7.9-6.7H382.2c-3.9 0-7.3 2.8-7.9 6.7l-40.2 248c-.1.4-.1.9-.1 1.3 0 4.4 3.6 8 8 8z" } }] }, "name": "gold", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (GoldFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/GoldOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/GoldOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var GoldOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M342 472h342c.4 0 .9 0 1.3-.1 4.4-.7 7.3-4.8 6.6-9.2l-40.2-248c-.6-3.9-4-6.7-7.9-6.7H382.2c-3.9 0-7.3 2.8-7.9 6.7l-40.2 248c-.1.4-.1.9-.1 1.3 0 4.4 3.6 8 8 8zm91.2-196h159.5l20.7 128h-201l20.8-128zm2.5 282.7c-.6-3.9-4-6.7-7.9-6.7H166.2c-3.9 0-7.3 2.8-7.9 6.7l-40.2 248c-.1.4-.1.9-.1 1.3 0 4.4 3.6 8 8 8h342c.4 0 .9 0 1.3-.1 4.4-.7 7.3-4.8 6.6-9.2l-40.2-248zM196.5 748l20.7-128h159.5l20.7 128H196.5zm709.4 58.7l-40.2-248c-.6-3.9-4-6.7-7.9-6.7H596.2c-3.9 0-7.3 2.8-7.9 6.7l-40.2 248c-.1.4-.1.9-.1 1.3 0 4.4 3.6 8 8 8h342c.4 0 .9 0 1.3-.1 4.3-.7 7.3-4.8 6.6-9.2zM626.5 748l20.7-128h159.5l20.7 128H626.5z" } }] }, "name": "gold", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (GoldOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/GoldTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/GoldTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var GoldTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M435.7 558.7c-.6-3.9-4-6.7-7.9-6.7H166.2c-3.9 0-7.3 2.8-7.9 6.7l-40.2 248c-.1.4-.1.9-.1 1.3 0 4.4 3.6 8 8 8h342c.4 0 .9 0 1.3-.1 4.4-.7 7.3-4.8 6.6-9.2l-40.2-248zM196.5 748l20.7-128h159.5l20.7 128H196.5zm709.4 58.7l-40.2-248c-.6-3.9-4-6.7-7.9-6.7H596.2c-3.9 0-7.3 2.8-7.9 6.7l-40.2 248c-.1.4-.1.9-.1 1.3 0 4.4 3.6 8 8 8h342c.4 0 .9 0 1.3-.1 4.3-.7 7.3-4.8 6.6-9.2zM626.5 748l20.7-128h159.5l20.7 128H626.5zM342 472h342c.4 0 .9 0 1.3-.1 4.4-.7 7.3-4.8 6.6-9.2l-40.2-248c-.6-3.9-4-6.7-7.9-6.7H382.2c-3.9 0-7.3 2.8-7.9 6.7l-40.2 248c-.1.4-.1.9-.1 1.3 0 4.4 3.6 8 8 8zm91.2-196h159.5l20.7 128h-201l20.8-128z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M592.7 276H433.2l-20.8 128h201zM217.2 620l-20.7 128h200.9l-20.7-128zm430 0l-20.7 128h200.9l-20.7-128z", "fill": secondaryColor } }] }; }, "name": "gold", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (GoldTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/GoldenFilled.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/GoldenFilled.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var GoldenFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M905.9 806.7l-40.2-248c-.6-3.9-4-6.7-7.9-6.7H596.2c-3.9 0-7.3 2.8-7.9 6.7l-40.2 248c-.1.4-.1.9-.1 1.3 0 4.4 3.6 8 8 8h342c.4 0 .9 0 1.3-.1 4.3-.7 7.3-4.8 6.6-9.2zm-470.2-248c-.6-3.9-4-6.7-7.9-6.7H166.2c-3.9 0-7.3 2.8-7.9 6.7l-40.2 248c-.1.4-.1.9-.1 1.3 0 4.4 3.6 8 8 8h342c.4 0 .9 0 1.3-.1 4.4-.7 7.3-4.8 6.6-9.2l-40.2-248zM342 472h342c.4 0 .9 0 1.3-.1 4.4-.7 7.3-4.8 6.6-9.2l-40.2-248c-.6-3.9-4-6.7-7.9-6.7H382.2c-3.9 0-7.3 2.8-7.9 6.7l-40.2 248c-.1.4-.1.9-.1 1.3 0 4.4 3.6 8 8 8z" } }] }, "name": "golden", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (GoldenFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/GoogleCircleFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/GoogleCircleFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var GoogleCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm167 633.6C638.4 735 583 757 516.9 757c-95.7 0-178.5-54.9-218.8-134.9C281.5 589 272 551.6 272 512s9.5-77 26.1-110.1c40.3-80.1 123.1-135 218.8-135 66 0 121.4 24.3 163.9 63.8L610.6 401c-25.4-24.3-57.7-36.6-93.6-36.6-63.8 0-117.8 43.1-137.1 101-4.9 14.7-7.7 30.4-7.7 46.6s2.8 31.9 7.7 46.6c19.3 57.9 73.3 101 137 101 33 0 61-8.7 82.9-23.4 26-17.4 43.2-43.3 48.9-74H516.9v-94.8h230.7c2.9 16.1 4.4 32.8 4.4 50.1 0 74.7-26.7 137.4-73 180.1z" } }] }, "name": "google-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (GoogleCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/GoogleOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/GoogleOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var GoogleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M881 442.4H519.7v148.5h206.4c-8.9 48-35.9 88.6-76.6 115.8-34.4 23-78.3 36.6-129.9 36.6-99.9 0-184.4-67.5-214.6-158.2-7.6-23-12-47.6-12-72.9s4.4-49.9 12-72.9c30.3-90.6 114.8-158.1 214.7-158.1 56.3 0 106.8 19.4 146.6 57.4l110-110.1c-66.5-62-153.2-100-256.6-100-149.9 0-279.6 86-342.7 211.4-26 51.8-40.8 110.4-40.8 172.4S151 632.8 177 684.6C240.1 810 369.8 896 519.7 896c103.6 0 190.4-34.4 253.8-93 72.5-66.8 114.4-165.2 114.4-282.1 0-27.2-2.4-53.3-6.9-78.5z" } }] }, "name": "google", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (GoogleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/GooglePlusCircleFilled.js": /*!*****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/GooglePlusCircleFilled.js ***! \*****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var GooglePlusCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm36.5 558.8c-43.9 61.8-132.1 79.8-200.9 53.3-69-26.3-118-99.2-112.1-173.5 1.5-90.9 85.2-170.6 176.1-167.5 43.6-2 84.6 16.9 118 43.6-14.3 16.2-29 31.8-44.8 46.3-40.1-27.7-97.2-35.6-137.3-3.6-57.4 39.7-60 133.4-4.8 176.1 53.7 48.7 155.2 24.5 170.1-50.1-33.6-.5-67.4 0-101-1.1-.1-20.1-.2-40.1-.1-60.2 56.2-.2 112.5-.3 168.8.2 3.3 47.3-3 97.5-32 136.5zM791 536.5c-16.8.2-33.6.3-50.4.4-.2 16.8-.3 33.6-.3 50.4H690c-.2-16.8-.2-33.5-.3-50.3-16.8-.2-33.6-.3-50.4-.5v-50.1c16.8-.2 33.6-.3 50.4-.3.1-16.8.3-33.6.4-50.4h50.2l.3 50.4c16.8.2 33.6.2 50.4.3v50.1z" } }] }, "name": "google-plus-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (GooglePlusCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/GooglePlusOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/GooglePlusOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var GooglePlusOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M879.5 470.4c-.3-27-.4-54.2-.5-81.3h-80.8c-.3 27-.5 54.1-.7 81.3-27.2.1-54.2.3-81.2.6v80.9c27 .3 54.2.5 81.2.8.3 27 .3 54.1.5 81.1h80.9c.1-27 .3-54.1.5-81.3 27.2-.3 54.2-.4 81.2-.7v-80.9c-26.9-.2-54.1-.2-81.1-.5zm-530 .4c-.1 32.3 0 64.7.1 97 54.2 1.8 108.5 1 162.7 1.8-23.9 120.3-187.4 159.3-273.9 80.7-89-68.9-84.8-220 7.7-284 64.7-51.6 156.6-38.9 221.3 5.8 25.4-23.5 49.2-48.7 72.1-74.7-53.8-42.9-119.8-73.5-190-70.3-146.6-4.9-281.3 123.5-283.7 270.2-9.4 119.9 69.4 237.4 180.6 279.8 110.8 42.7 252.9 13.6 323.7-86 46.7-62.9 56.8-143.9 51.3-220-90.7-.7-181.3-.6-271.9-.3z" } }] }, "name": "google-plus", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (GooglePlusOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/GooglePlusSquareFilled.js": /*!*****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/GooglePlusSquareFilled.js ***! \*****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var GooglePlusSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM548.5 622.8c-43.9 61.8-132.1 79.8-200.9 53.3-69-26.3-118-99.2-112.1-173.5 1.5-90.9 85.2-170.6 176.1-167.5 43.6-2 84.6 16.9 118 43.6-14.3 16.2-29 31.8-44.8 46.3-40.1-27.7-97.2-35.6-137.3-3.6-57.4 39.7-60 133.4-4.8 176.1 53.7 48.7 155.2 24.5 170.1-50.1-33.6-.5-67.4 0-101-1.1-.1-20.1-.2-40.1-.1-60.2 56.2-.2 112.5-.3 168.8.2 3.3 47.3-3 97.5-32 136.5zM791 536.5c-16.8.2-33.6.3-50.4.4-.2 16.8-.3 33.6-.3 50.4H690c-.2-16.8-.2-33.5-.3-50.3-16.8-.2-33.6-.3-50.4-.5v-50.1c16.8-.2 33.6-.3 50.4-.3.1-16.8.3-33.6.4-50.4h50.2l.3 50.4c16.8.2 33.6.2 50.4.3v50.1z" } }] }, "name": "google-plus-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (GooglePlusSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/GoogleSquareFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/GoogleSquareFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var GoogleSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM679 697.6C638.4 735 583 757 516.9 757c-95.7 0-178.5-54.9-218.8-134.9A245.02 245.02 0 01272 512c0-39.6 9.5-77 26.1-110.1 40.3-80.1 123.1-135 218.8-135 66 0 121.4 24.3 163.9 63.8L610.6 401c-25.4-24.3-57.7-36.6-93.6-36.6-63.8 0-117.8 43.1-137.1 101-4.9 14.7-7.7 30.4-7.7 46.6s2.8 31.9 7.7 46.6c19.3 57.9 73.3 101 137 101 33 0 61-8.7 82.9-23.4 26-17.4 43.2-43.3 48.9-74H516.9v-94.8h230.7c2.9 16.1 4.4 32.8 4.4 50.1 0 74.7-26.7 137.4-73 180.1z" } }] }, "name": "google-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (GoogleSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/GroupOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/GroupOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var GroupOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M912 820.1V203.9c28-9.9 48-36.6 48-67.9 0-39.8-32.2-72-72-72-31.3 0-58 20-67.9 48H203.9C194 84 167.3 64 136 64c-39.8 0-72 32.2-72 72 0 31.3 20 58 48 67.9v616.2C84 830 64 856.7 64 888c0 39.8 32.2 72 72 72 31.3 0 58-20 67.9-48h616.2c9.9 28 36.6 48 67.9 48 39.8 0 72-32.2 72-72 0-31.3-20-58-48-67.9zM888 112c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zM136 912c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-752c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm704 680H184V184h656v656zm48 72c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24z" } }, { "tag": "path", "attrs": { "d": "M288 474h448c8.8 0 16-7.2 16-16V282c0-8.8-7.2-16-16-16H288c-8.8 0-16 7.2-16 16v176c0 8.8 7.2 16 16 16zm56-136h336v64H344v-64zm-56 420h448c8.8 0 16-7.2 16-16V566c0-8.8-7.2-16-16-16H288c-8.8 0-16 7.2-16 16v176c0 8.8 7.2 16 16 16zm56-136h336v64H344v-64z" } }] }, "name": "group", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (GroupOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/HddFilled.js": /*!****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/HddFilled.js ***! \****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var HddFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 64H192c-17.7 0-32 14.3-32 32v224h704V96c0-17.7-14.3-32-32-32zM456 216c0 4.4-3.6 8-8 8H264c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h184c4.4 0 8 3.6 8 8v48zM160 928c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V704H160v224zm576-136c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40zM160 640h704V384H160v256zm96-152c0-4.4 3.6-8 8-8h184c4.4 0 8 3.6 8 8v48c0 4.4-3.6 8-8 8H264c-4.4 0-8-3.6-8-8v-48z" } }] }, "name": "hdd", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (HddFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/HddOutlined.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/HddOutlined.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var HddOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM496 208H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 544h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm328 244a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, "name": "hdd", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (HddOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/HddTwoTone.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/HddTwoTone.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var HddTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M232 888h560V680H232v208zm448-140c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40zM232 616h560V408H232v208zm72-128c0-4.4 3.6-8 8-8h184c4.4 0 8 3.6 8 8v48c0 4.4-3.6 8-8 8H312c-4.4 0-8-3.6-8-8v-48zm-72-144h560V136H232v208zm72-128c0-4.4 3.6-8 8-8h184c4.4 0 8 3.6 8 8v48c0 4.4-3.6 8-8 8H312c-4.4 0-8-3.6-8-8v-48z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-40 824H232V680h560v208zm0-272H232V408h560v208zm0-272H232V136h560v208z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M312 544h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0-272h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm328 516a40 40 0 1080 0 40 40 0 10-80 0z", "fill": primaryColor } }] }; }, "name": "hdd", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (HddTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/HeartFilled.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/HeartFilled.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var HeartFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9z" } }] }, "name": "heart", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (HeartFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/HeartOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/HeartOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var HeartOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9zM512 814.8S156 586.7 156 385.5C156 283.6 240.3 201 344.3 201c73.1 0 136.5 40.8 167.7 100.4C543.2 241.8 606.6 201 679.7 201c104 0 188.3 82.6 188.3 184.5 0 201.2-356 429.3-356 429.3z" } }] }, "name": "heart", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (HeartOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/HeartTwoTone.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/HeartTwoTone.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var HeartTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9zM512 814.8S156 586.7 156 385.5C156 283.6 240.3 201 344.3 201c73.1 0 136.5 40.8 167.7 100.4C543.2 241.8 606.6 201 679.7 201c104 0 188.3 82.6 188.3 184.5 0 201.2-356 429.3-356 429.3z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M679.7 201c-73.1 0-136.5 40.8-167.7 100.4C480.8 241.8 417.4 201 344.3 201c-104 0-188.3 82.6-188.3 184.5 0 201.2 356 429.3 356 429.3s356-228.1 356-429.3C868 283.6 783.7 201 679.7 201z", "fill": secondaryColor } }] }; }, "name": "heart", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (HeartTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/HeatMapOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/HeatMapOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var HeatMapOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-790.4-23.9L512 231.9 858.7 832H165.3zm319-474.1l-228 394c-12.3 21.3 3.1 48 27.7 48h455.8c24.7 0 40.1-26.7 27.7-48L539.7 358c-6.2-10.7-17-16-27.7-16-10.8 0-21.6 5.3-27.7 16zm214 386H325.7L512 422l186.3 322zm-214-194.1l-57 98.4C415 669.5 430.4 696 455 696h114c24.6 0 39.9-26.5 27.7-47.7l-57-98.4c-6.1-10.6-16.9-15.9-27.7-15.9s-21.5 5.3-27.7 15.9zm57.1 98.4h-58.7l29.4-50.7 29.3 50.7z" } }] }, "name": "heat-map", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (HeatMapOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/HighlightFilled.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/HighlightFilled.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var HighlightFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M957.6 507.4L603.2 158.2a7.9 7.9 0 00-11.2 0L353.3 393.4a8.03 8.03 0 00-.1 11.3l.1.1 40 39.4-117.2 115.3a8.03 8.03 0 00-.1 11.3l.1.1 39.5 38.9-189.1 187H72.1c-4.4 0-8.1 3.6-8.1 8V860c0 4.4 3.6 8 8 8h344.9c2.1 0 4.1-.8 5.6-2.3l76.1-75.6 40.4 39.8a7.9 7.9 0 0011.2 0l117.1-115.6 40.1 39.5a7.9 7.9 0 0011.2 0l238.7-235.2c3.4-3 3.4-8 .3-11.2z" } }] }, "name": "highlight", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (HighlightFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/HighlightOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/HighlightOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var HighlightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M957.6 507.4L603.2 158.2a7.9 7.9 0 00-11.2 0L353.3 393.4a8.03 8.03 0 00-.1 11.3l.1.1 40 39.4-117.2 115.3a8.03 8.03 0 00-.1 11.3l.1.1 39.5 38.9-189.1 187H72.1c-4.4 0-8.1 3.6-8.1 8V860c0 4.4 3.6 8 8 8h344.9c2.1 0 4.1-.8 5.6-2.3l76.1-75.6 40.4 39.8a7.9 7.9 0 0011.2 0l117.1-115.6 40.1 39.5a7.9 7.9 0 0011.2 0l238.7-235.2c3.4-3 3.4-8 .3-11.2zM389.8 796.2H229.6l134.4-133 80.1 78.9-54.3 54.1zm154.8-62.1L373.2 565.2l68.6-67.6 171.4 168.9-68.6 67.6zM713.1 658L450.3 399.1 597.6 254l262.8 259-147.3 145z" } }] }, "name": "highlight", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (HighlightOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/HighlightTwoTone.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/HighlightTwoTone.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var HighlightTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M229.6 796.3h160.2l54.3-54.1-80.1-78.9zm220.7-397.1l262.8 258.9 147.3-145-262.8-259zm-77.1 166.1l171.4 168.9 68.6-67.6-171.4-168.9z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M957.6 507.5L603.2 158.3a7.9 7.9 0 00-11.2 0L353.3 393.5a8.03 8.03 0 00-.1 11.3l.1.1 40 39.4-117.2 115.3a8.03 8.03 0 00-.1 11.3l.1.1 39.5 38.9-189.1 187H72.1c-4.4 0-8.1 3.6-8.1 8v55.2c0 4.4 3.6 8 8 8h344.9c2.1 0 4.1-.8 5.6-2.3l76.1-75.6L539 830a7.9 7.9 0 0011.2 0l117.1-115.6 40.1 39.5a7.9 7.9 0 0011.2 0l238.7-235.2c3.4-3 3.4-8 .3-11.2zM389.8 796.3H229.6l134.4-133 80.1 78.9-54.3 54.1zm154.8-62.1L373.2 565.3l68.6-67.6 171.4 168.9-68.6 67.6zm168.5-76.1L450.3 399.2l147.3-145.1 262.8 259-147.3 145z", "fill": primaryColor } }] }; }, "name": "highlight", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (HighlightTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/HistoryOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/HistoryOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var HistoryOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z" } }] }, "name": "history", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (HistoryOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/HomeFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/HomeFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var HomeFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M946.5 505L534.6 93.4a31.93 31.93 0 00-45.2 0L77.5 505c-12 12-18.8 28.3-18.8 45.3 0 35.3 28.7 64 64 64h43.4V908c0 17.7 14.3 32 32 32H448V716h112v224h265.9c17.7 0 32-14.3 32-32V614.3h43.4c17 0 33.3-6.7 45.3-18.8 24.9-25 24.9-65.5-.1-90.5z" } }] }, "name": "home", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (HomeFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/HomeOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/HomeOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var HomeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z" } }] }, "name": "home", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (HomeOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/HomeTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/HomeTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var HomeTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512.1 172.6l-370 369.7h96V868H392V640c0-22.1 17.9-40 40-40h160c22.1 0 40 17.9 40 40v228h153.9V542.3H882L535.2 195.7l-23.1-23.1zm434.5 422.9c-6 6-13.1 10.8-20.8 13.9 7.7-3.2 14.8-7.9 20.8-13.9zm-887-34.7c5 30.3 31.4 53.5 63.1 53.5h.9c-31.9 0-58.9-23-64-53.5zm-.9-10.5v-1.9 1.9zm.1-2.6c.1-3.1.5-6.1 1-9.1-.6 2.9-.9 6-1 9.1z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M951 510c0-.1-.1-.1-.1-.2l-1.8-2.1c-.1-.1-.2-.3-.4-.4-.7-.8-1.5-1.6-2.2-2.4L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.6 63.6 0 00-16 26.6l-.6 2.1-.3 1.1-.3 1.2c-.2.7-.3 1.4-.4 2.1 0 .1 0 .3-.1.4-.6 3-.9 6-1 9.1v3.3c0 .5 0 1 .1 1.5 0 .5 0 .9.1 1.4 0 .5.1 1 .1 1.5 0 .6.1 1.2.2 1.8 0 .3.1.6.1.9l.3 2.5v.1c5.1 30.5 32.2 53.5 64 53.5h42.5V940h691.7V614.3h43.4c8.6 0 16.9-1.7 24.5-4.9s14.7-7.9 20.8-13.9a63.6 63.6 0 0018.7-45.3c0-14.7-5-28.8-14.3-40.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z", "fill": primaryColor } }] }; }, "name": "home", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (HomeTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/HourglassFilled.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/HourglassFilled.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var HourglassFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M742 318V184h86c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H196c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h86v134c0 81.5 42.4 153.2 106.4 194-64 40.8-106.4 112.5-106.4 194v134h-86c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h632c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-86V706c0-81.5-42.4-153.2-106.4-194 64-40.8 106.4-112.5 106.4-194z" } }] }, "name": "hourglass", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (HourglassFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/HourglassOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/HourglassOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var HourglassOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M742 318V184h86c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H196c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h86v134c0 81.5 42.4 153.2 106.4 194-64 40.8-106.4 112.5-106.4 194v134h-86c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h632c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-86V706c0-81.5-42.4-153.2-106.4-194 64-40.8 106.4-112.5 106.4-194zm-72 388v134H354V706c0-42.2 16.4-81.9 46.3-111.7C430.1 564.4 469.8 548 512 548s81.9 16.4 111.7 46.3C653.6 624.1 670 663.8 670 706zm0-388c0 42.2-16.4 81.9-46.3 111.7C593.9 459.6 554.2 476 512 476s-81.9-16.4-111.7-46.3A156.63 156.63 0 01354 318V184h316v134z" } }] }, "name": "hourglass", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (HourglassOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/HourglassTwoTone.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/HourglassTwoTone.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var HourglassTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 548c-42.2 0-81.9 16.4-111.7 46.3A156.63 156.63 0 00354 706v134h316V706c0-42.2-16.4-81.9-46.3-111.7A156.63 156.63 0 00512 548zM354 318c0 42.2 16.4 81.9 46.3 111.7C430.1 459.6 469.8 476 512 476s81.9-16.4 111.7-46.3C653.6 399.9 670 360.2 670 318V184H354v134z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M742 318V184h86c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H196c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h86v134c0 81.5 42.4 153.2 106.4 194-64 40.8-106.4 112.5-106.4 194v134h-86c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h632c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-86V706c0-81.5-42.4-153.2-106.4-194 64-40.8 106.4-112.5 106.4-194zm-72 388v134H354V706c0-42.2 16.4-81.9 46.3-111.7C430.1 564.4 469.8 548 512 548s81.9 16.4 111.7 46.3C653.6 624.1 670 663.8 670 706zm0-388c0 42.2-16.4 81.9-46.3 111.7C593.9 459.6 554.2 476 512 476s-81.9-16.4-111.7-46.3A156.63 156.63 0 01354 318V184h316v134z", "fill": primaryColor } }] }; }, "name": "hourglass", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (HourglassTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/Html5Filled.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/Html5Filled.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var Html5Filled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M145.2 96l66 746.6L512 928l299.6-85.4L878.9 96H145.2zm595 177.1l-4.8 47.2-1.7 19.5H382.3l8.2 94.2h335.1l-3.3 24.3-21.2 242.2-1.7 16.2-187 51.6v.3h-1.2l-.3.1v-.1h-.1l-188.6-52L310.8 572h91.1l6.5 73.2 102.4 27.7h.4l102-27.6 11.4-118.6H510.9v-.1H306l-22.8-253.5-1.7-24.3h460.3l-1.6 24.3z" } }] }, "name": "html5", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (Html5Filled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/Html5Outlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/Html5Outlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var Html5Outlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M145 96l66 746.6L511.8 928l299.6-85.4L878.7 96H145zm610.9 700.6l-244.1 69.6-245.2-69.6-56.7-641.2h603.8l-57.8 641.2zM281 249l1.7 24.3 22.7 253.5h206.5v-.1h112.9l-11.4 118.5L511 672.9v.2h-.8l-102.4-27.7-6.5-73.2h-91l11.3 144.7 188.6 52h1.7v-.4l187.7-51.7 1.7-16.3 21.2-242.2 3.2-24.3H511v.2H389.9l-8.2-94.2h352.1l1.7-19.5 4.8-47.2L742 249H511z" } }] }, "name": "html5", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (Html5Outlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/Html5TwoTone.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/Html5TwoTone.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var Html5TwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M145 96l66 746.6L511.8 928l299.6-85.4L878.7 96H145zm610.9 700.6l-244.1 69.6-245.2-69.6-56.7-641.2h603.8l-57.8 641.2z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M209.9 155.4l56.7 641.2 245.2 69.6 244.1-69.6 57.8-641.2H209.9zm530.4 117.9l-4.8 47.2-1.7 19.5H381.7l8.2 94.2H511v-.2h214.7l-3.2 24.3-21.2 242.2-1.7 16.3-187.7 51.7v.4h-1.7l-188.6-52-11.3-144.7h91l6.5 73.2 102.4 27.7h.8v-.2l102.4-27.7 11.4-118.5H511.9v.1H305.4l-22.7-253.5L281 249h461l-1.7 24.3z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M281 249l1.7 24.3 22.7 253.5h206.5v-.1h112.9l-11.4 118.5L511 672.9v.2h-.8l-102.4-27.7-6.5-73.2h-91l11.3 144.7 188.6 52h1.7v-.4l187.7-51.7 1.7-16.3 21.2-242.2 3.2-24.3H511v.2H389.9l-8.2-94.2h352.1l1.7-19.5 4.8-47.2L742 249H511z", "fill": primaryColor } }] }; }, "name": "html5", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (Html5TwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/IdcardFilled.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/IdcardFilled.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var IdcardFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M373 411c-28.5 0-51.7 23.3-51.7 52s23.2 52 51.7 52 51.7-23.3 51.7-52-23.2-52-51.7-52zm555-251H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zM608 420c0-4.4 1-8 2.3-8h123.4c1.3 0 2.3 3.6 2.3 8v48c0 4.4-1 8-2.3 8H610.3c-1.3 0-2.3-3.6-2.3-8v-48zm-86 253h-43.9c-4.2 0-7.6-3.3-7.9-7.5-3.8-50.5-46-90.5-97.2-90.5s-93.4 40-97.2 90.5c-.3 4.2-3.7 7.5-7.9 7.5H224a8 8 0 01-8-8.4c2.8-53.3 32-99.7 74.6-126.1a111.8 111.8 0 01-29.1-75.5c0-61.9 49.9-112 111.4-112s111.4 50.1 111.4 112c0 29.1-11 55.5-29.1 75.5 42.7 26.5 71.8 72.8 74.6 126.1.4 4.6-3.2 8.4-7.8 8.4zm278.9-53H615.1c-3.9 0-7.1-3.6-7.1-8v-48c0-4.4 3.2-8 7.1-8h185.7c3.9 0 7.1 3.6 7.1 8v48h.1c0 4.4-3.2 8-7.1 8z" } }] }, "name": "idcard", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (IdcardFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/IdcardOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/IdcardOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var IdcardOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136V232h752v560zM610.3 476h123.4c1.3 0 2.3-3.6 2.3-8v-48c0-4.4-1-8-2.3-8H610.3c-1.3 0-2.3 3.6-2.3 8v48c0 4.4 1 8 2.3 8zm4.8 144h185.7c3.9 0 7.1-3.6 7.1-8v-48c0-4.4-3.2-8-7.1-8H615.1c-3.9 0-7.1 3.6-7.1 8v48c0 4.4 3.2 8 7.1 8zM224 673h43.9c4.2 0 7.6-3.3 7.9-7.5 3.8-50.5 46-90.5 97.2-90.5s93.4 40 97.2 90.5c.3 4.2 3.7 7.5 7.9 7.5H522a8 8 0 008-8.4c-2.8-53.3-32-99.7-74.6-126.1a111.8 111.8 0 0029.1-75.5c0-61.9-49.9-112-111.4-112s-111.4 50.1-111.4 112c0 29.1 11 55.5 29.1 75.5a158.09 158.09 0 00-74.6 126.1c-.4 4.6 3.2 8.4 7.8 8.4zm149-262c28.5 0 51.7 23.3 51.7 52s-23.2 52-51.7 52-51.7-23.3-51.7-52 23.2-52 51.7-52z" } }] }, "name": "idcard", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (IdcardOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/IdcardTwoTone.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/IdcardTwoTone.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var IdcardTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136V232h752v560z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M136 792h752V232H136v560zm472-372c0-4.4 1-8 2.3-8h123.4c1.3 0 2.3 3.6 2.3 8v48c0 4.4-1 8-2.3 8H610.3c-1.3 0-2.3-3.6-2.3-8v-48zm0 144c0-4.4 3.2-8 7.1-8h185.7c3.9 0 7.1 3.6 7.1 8v48c0 4.4-3.2 8-7.1 8H615.1c-3.9 0-7.1-3.6-7.1-8v-48zM216.2 664.6c2.8-53.3 31.9-99.6 74.6-126.1-18.1-20-29.1-46.4-29.1-75.5 0-61.9 49.9-112 111.4-112s111.4 50.1 111.4 112c0 29.1-11 55.6-29.1 75.5 42.6 26.4 71.8 72.8 74.6 126.1a8 8 0 01-8 8.4h-43.9c-4.2 0-7.6-3.3-7.9-7.5-3.8-50.5-46-90.5-97.2-90.5s-93.4 40-97.2 90.5c-.3 4.2-3.7 7.5-7.9 7.5H224c-4.6 0-8.2-3.8-7.8-8.4z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M321.3 463a51.7 52 0 10103.4 0 51.7 52 0 10-103.4 0z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M610.3 476h123.4c1.3 0 2.3-3.6 2.3-8v-48c0-4.4-1-8-2.3-8H610.3c-1.3 0-2.3 3.6-2.3 8v48c0 4.4 1 8 2.3 8zm4.8 144h185.7c3.9 0 7.1-3.6 7.1-8v-48c0-4.4-3.2-8-7.1-8H615.1c-3.9 0-7.1 3.6-7.1 8v48c0 4.4 3.2 8 7.1 8zM224 673h43.9c4.2 0 7.6-3.3 7.9-7.5 3.8-50.5 46-90.5 97.2-90.5s93.4 40 97.2 90.5c.3 4.2 3.7 7.5 7.9 7.5H522a8 8 0 008-8.4c-2.8-53.3-32-99.7-74.6-126.1a111.8 111.8 0 0029.1-75.5c0-61.9-49.9-112-111.4-112s-111.4 50.1-111.4 112c0 29.1 11 55.5 29.1 75.5a158.09 158.09 0 00-74.6 126.1c-.4 4.6 3.2 8.4 7.8 8.4zm149-262c28.5 0 51.7 23.3 51.7 52s-23.2 52-51.7 52-51.7-23.3-51.7-52 23.2-52 51.7-52z", "fill": primaryColor } }] }; }, "name": "idcard", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (IdcardTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/IeCircleFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/IeCircleFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var IeCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M693.6 284.4c-24 0-51.1 11.7-72.6 22 46.3 18 86 57.3 112.3 99.6 7.1-18.9 14.6-47.9 14.6-67.9 0-32-22.8-53.7-54.3-53.7zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm253.9 492.9H437.1c0 100.4 144.3 136 196.8 47.4h120.8c-32.6 91.7-119.7 146-216.8 146-35.1 0-70.3-.1-101.7-15.6-87.4 44.5-180.3 56.6-180.3-42 0-45.8 23.2-107.1 44-145C335 484 381.3 422.8 435.6 374.5c-43.7 18.9-91.1 66.3-122 101.2 25.9-112.8 129.5-193.6 237.1-186.5 130-59.8 209.7-34.1 209.7 38.6 0 27.4-10.6 63.3-21.4 87.9 25.2 45.5 33.3 97.6 26.9 141.2zM540.5 399.1c-53.7 0-102 39.7-104 94.9h208c-2-55.1-50.6-94.9-104-94.9zM320.6 602.9c-73 152.4 11.5 172.2 100.3 123.3-46.6-27.5-82.6-72.2-100.3-123.3z" } }] }, "name": "ie-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (IeCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/IeOutlined.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/IeOutlined.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var IeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M852.6 367.6c16.3-36.9 32.1-90.7 32.1-131.8 0-109.1-119.5-147.6-314.5-57.9-161.4-10.8-316.8 110.5-355.6 279.7 46.3-52.3 117.4-123.4 183-151.7C316.1 378.3 246.7 470 194 565.6c-31.1 56.9-66 148.8-66 217.5 0 147.9 139.3 129.8 270.4 63 47.1 23.1 99.8 23.4 152.5 23.4 145.7 0 276.4-81.4 325.2-219H694.9c-78.8 132.9-295.2 79.5-295.2-71.2h493.2c9.6-65.4-2.5-143.6-40.3-211.7zM224.8 648.3c26.6 76.7 80.6 143.8 150.4 185-133.1 73.4-259.9 43.6-150.4-185zm174-163.3c3-82.7 75.4-142.3 156-142.3 80.1 0 153 59.6 156 142.3h-312zm276.8-281.4c32.1-15.4 72.8-33 108.8-33 47.1 0 81.4 32.6 81.4 80.6 0 30-11.1 73.5-21.9 101.8-39.3-63.5-98.9-122.4-168.3-149.4z" } }] }, "name": "ie", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (IeOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/IeSquareFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/IeSquareFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var IeSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM765.9 556.9H437.1c0 100.4 144.3 136 196.8 47.4h120.8c-32.6 91.7-119.7 146-216.8 146-35.1 0-70.3-.1-101.7-15.6-87.4 44.5-180.3 56.6-180.3-42 0-45.8 23.2-107.1 44-145C335 484 381.3 422.8 435.6 374.5c-43.7 18.9-91.1 66.3-122 101.2 25.9-112.8 129.5-193.6 237.1-186.5 130-59.8 209.7-34.1 209.7 38.6 0 27.4-10.6 63.3-21.4 87.9 25.2 45.5 33.3 97.6 26.9 141.2zm-72.3-272.5c-24 0-51.1 11.7-72.6 22 46.3 18 86 57.3 112.3 99.6 7.1-18.9 14.6-47.9 14.6-67.9 0-32-22.8-53.7-54.3-53.7zM540.5 399.1c-53.7 0-102 39.7-104 94.9h208c-2-55.1-50.6-94.9-104-94.9zM320.6 602.9c-73 152.4 11.5 172.2 100.3 123.3-46.6-27.5-82.6-72.2-100.3-123.3z" } }] }, "name": "ie-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (IeSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ImportOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ImportOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ImportOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M888.3 757.4h-53.8c-4.2 0-7.7 3.5-7.7 7.7v61.8H197.1V197.1h629.8v61.8c0 4.2 3.5 7.7 7.7 7.7h53.8c4.2 0 7.7-3.4 7.7-7.7V158.7c0-17-13.7-30.7-30.7-30.7H158.7c-17 0-30.7 13.7-30.7 30.7v706.6c0 17 13.7 30.7 30.7 30.7h706.6c17 0 30.7-13.7 30.7-30.7V765.1c0-4.3-3.5-7.7-7.7-7.7zM902 476H588v-76c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-76h314c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, "name": "import", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ImportOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/InboxOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/InboxOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var InboxOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z" } }] }, "name": "inbox", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (InboxOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/InfoCircleFilled.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/InfoCircleFilled.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var InfoCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "info-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (InfoCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/InfoCircleOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/InfoCircleOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var InfoCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z" } }] }, "name": "info-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (InfoCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/InfoCircleTwoTone.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/InfoCircleTwoTone.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var InfoCircleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm32 588c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z", "fill": primaryColor } }] }; }, "name": "info-circle", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (InfoCircleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/InfoOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/InfoOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var InfoOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M448 224a64 64 0 10128 0 64 64 0 10-128 0zm96 168h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V400c0-4.4-3.6-8-8-8z" } }] }, "name": "info", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (InfoOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/InsertRowAboveOutlined.js": /*!*****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/InsertRowAboveOutlined.js ***! \*****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var InsertRowAboveOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M878.7 336H145.3c-18.4 0-33.3 14.3-33.3 32v464c0 17.7 14.9 32 33.3 32h733.3c18.4 0 33.3-14.3 33.3-32V368c.1-17.7-14.8-32-33.2-32zM360 792H184V632h176v160zm0-224H184V408h176v160zm240 224H424V632h176v160zm0-224H424V408h176v160zm240 224H664V632h176v160zm0-224H664V408h176v160zm64-408H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8z" } }] }, "name": "insert-row-above", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (InsertRowAboveOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/InsertRowBelowOutlined.js": /*!*****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/InsertRowBelowOutlined.js ***! \*****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var InsertRowBelowOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M904 768H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8zm-25.3-608H145.3c-18.4 0-33.3 14.3-33.3 32v464c0 17.7 14.9 32 33.3 32h733.3c18.4 0 33.3-14.3 33.3-32V192c.1-17.7-14.8-32-33.2-32zM360 616H184V456h176v160zm0-224H184V232h176v160zm240 224H424V456h176v160zm0-224H424V232h176v160zm240 224H664V456h176v160zm0-224H664V232h176v160z" } }] }, "name": "insert-row-below", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (InsertRowBelowOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/InsertRowLeftOutlined.js": /*!****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/InsertRowLeftOutlined.js ***! \****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var InsertRowLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M248 112h-80c-4.4 0-8 3.6-8 8v784c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8V120c0-4.4-3.6-8-8-8zm584 0H368c-17.7 0-32 14.9-32 33.3v733.3c0 18.4 14.3 33.3 32 33.3h464c17.7 0 32-14.9 32-33.3V145.3c0-18.4-14.3-33.3-32-33.3zM568 840H408V664h160v176zm0-240H408V424h160v176zm0-240H408V184h160v176zm224 480H632V664h160v176zm0-240H632V424h160v176zm0-240H632V184h160v176z" } }] }, "name": "insert-row-left", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (InsertRowLeftOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/InsertRowRightOutlined.js": /*!*****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/InsertRowRightOutlined.js ***! \*****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var InsertRowRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M856 112h-80c-4.4 0-8 3.6-8 8v784c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8V120c0-4.4-3.6-8-8-8zm-200 0H192c-17.7 0-32 14.9-32 33.3v733.3c0 18.4 14.3 33.3 32 33.3h464c17.7 0 32-14.9 32-33.3V145.3c0-18.4-14.3-33.3-32-33.3zM392 840H232V664h160v176zm0-240H232V424h160v176zm0-240H232V184h160v176zm224 480H456V664h160v176zm0-240H456V424h160v176zm0-240H456V184h160v176z" } }] }, "name": "insert-row-right", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (InsertRowRightOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/InstagramFilled.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/InstagramFilled.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var InstagramFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 378.7c-73.4 0-133.3 59.9-133.3 133.3S438.6 645.3 512 645.3 645.3 585.4 645.3 512 585.4 378.7 512 378.7zM911.8 512c0-55.2.5-109.9-2.6-165-3.1-64-17.7-120.8-64.5-167.6-46.9-46.9-103.6-61.4-167.6-64.5-55.2-3.1-109.9-2.6-165-2.6-55.2 0-109.9-.5-165 2.6-64 3.1-120.8 17.7-167.6 64.5C132.6 226.3 118.1 283 115 347c-3.1 55.2-2.6 109.9-2.6 165s-.5 109.9 2.6 165c3.1 64 17.7 120.8 64.5 167.6 46.9 46.9 103.6 61.4 167.6 64.5 55.2 3.1 109.9 2.6 165 2.6 55.2 0 109.9.5 165-2.6 64-3.1 120.8-17.7 167.6-64.5 46.9-46.9 61.4-103.6 64.5-167.6 3.2-55.1 2.6-109.8 2.6-165zM512 717.1c-113.5 0-205.1-91.6-205.1-205.1S398.5 306.9 512 306.9 717.1 398.5 717.1 512 625.5 717.1 512 717.1zm213.5-370.7c-26.5 0-47.9-21.4-47.9-47.9s21.4-47.9 47.9-47.9 47.9 21.4 47.9 47.9a47.84 47.84 0 01-47.9 47.9z" } }] }, "name": "instagram", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (InstagramFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/InstagramOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/InstagramOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var InstagramOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 306.9c-113.5 0-205.1 91.6-205.1 205.1S398.5 717.1 512 717.1 717.1 625.5 717.1 512 625.5 306.9 512 306.9zm0 338.4c-73.4 0-133.3-59.9-133.3-133.3S438.6 378.7 512 378.7 645.3 438.6 645.3 512 585.4 645.3 512 645.3zm213.5-394.6c-26.5 0-47.9 21.4-47.9 47.9s21.4 47.9 47.9 47.9 47.9-21.3 47.9-47.9a47.84 47.84 0 00-47.9-47.9zM911.8 512c0-55.2.5-109.9-2.6-165-3.1-64-17.7-120.8-64.5-167.6-46.9-46.9-103.6-61.4-167.6-64.5-55.2-3.1-109.9-2.6-165-2.6-55.2 0-109.9-.5-165 2.6-64 3.1-120.8 17.7-167.6 64.5C132.6 226.3 118.1 283 115 347c-3.1 55.2-2.6 109.9-2.6 165s-.5 109.9 2.6 165c3.1 64 17.7 120.8 64.5 167.6 46.9 46.9 103.6 61.4 167.6 64.5 55.2 3.1 109.9 2.6 165 2.6 55.2 0 109.9.5 165-2.6 64-3.1 120.8-17.7 167.6-64.5 46.9-46.9 61.4-103.6 64.5-167.6 3.2-55.1 2.6-109.8 2.6-165zm-88 235.8c-7.3 18.2-16.1 31.8-30.2 45.8-14.1 14.1-27.6 22.9-45.8 30.2C695.2 844.7 570.3 840 512 840c-58.3 0-183.3 4.7-235.9-16.1-18.2-7.3-31.8-16.1-45.8-30.2-14.1-14.1-22.9-27.6-30.2-45.8C179.3 695.2 184 570.3 184 512c0-58.3-4.7-183.3 16.1-235.9 7.3-18.2 16.1-31.8 30.2-45.8s27.6-22.9 45.8-30.2C328.7 179.3 453.7 184 512 184s183.3-4.7 235.9 16.1c18.2 7.3 31.8 16.1 45.8 30.2 14.1 14.1 22.9 27.6 30.2 45.8C844.7 328.7 840 453.7 840 512c0 58.3 4.7 183.2-16.2 235.8z" } }] }, "name": "instagram", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (InstagramOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/InsuranceFilled.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/InsuranceFilled.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var InsuranceFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M519.9 358.8h97.9v41.6h-97.9zm347-188.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM411.3 656h-.2c0 4.4-3.6 8-8 8h-37.3c-4.4 0-8-3.6-8-8V471.4c-7.7 9.2-15.4 17.9-23.1 26a6.04 6.04 0 01-10.2-2.4l-13.2-43.5c-.6-2-.2-4.1 1.2-5.6 37-43.4 64.7-95.1 82.2-153.6 1.1-3.5 5-5.3 8.4-3.7l38.6 18.3c2.7 1.3 4.1 4.4 3.2 7.2a429.2 429.2 0 01-33.6 79V656zm296.5-49.2l-26.3 35.3a5.92 5.92 0 01-8.9.7c-30.6-29.3-56.8-65.2-78.1-106.9V656c0 4.4-3.6 8-8 8h-36.2c-4.4 0-8-3.6-8-8V536c-22 44.7-49 80.8-80.6 107.6a5.9 5.9 0 01-8.9-1.4L430 605.7a6 6 0 011.6-8.1c28.6-20.3 51.9-45.2 71-76h-55.1c-4.4 0-8-3.6-8-8V478c0-4.4 3.6-8 8-8h94.9v-18.6h-65.9c-4.4 0-8-3.6-8-8V316c0-4.4 3.6-8 8-8h184.7c4.4 0 8 3.6 8 8v127.2c0 4.4-3.6 8-8 8h-66.7v18.6h98.8c4.4 0 8 3.6 8 8v35.6c0 4.4-3.6 8-8 8h-59c18.1 29.1 41.8 54.3 72.3 76.9 2.6 2.1 3.2 5.9 1.2 8.5z" } }] }, "name": "insurance", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (InsuranceFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/InsuranceOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/InsuranceOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var InsuranceOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M441.6 306.8L403 288.6a6.1 6.1 0 00-8.4 3.7c-17.5 58.5-45.2 110.1-82.2 153.6a6.05 6.05 0 00-1.2 5.6l13.2 43.5c1.3 4.4 7 5.7 10.2 2.4 7.7-8.1 15.4-16.9 23.1-26V656c0 4.4 3.6 8 8 8H403c4.4 0 8-3.6 8-8V393.1a429.2 429.2 0 0033.6-79c1-2.9-.3-6-3-7.3zm26.8 9.2v127.2c0 4.4 3.6 8 8 8h65.9v18.6h-94.9c-4.4 0-8 3.6-8 8v35.6c0 4.4 3.6 8 8 8h55.1c-19.1 30.8-42.4 55.7-71 76a6 6 0 00-1.6 8.1l22.8 36.5c1.9 3.1 6.2 3.8 8.9 1.4 31.6-26.8 58.7-62.9 80.6-107.6v120c0 4.4 3.6 8 8 8h36.2c4.4 0 8-3.6 8-8V536c21.3 41.7 47.5 77.5 78.1 106.9 2.6 2.5 6.8 2.1 8.9-.7l26.3-35.3c2-2.7 1.4-6.5-1.2-8.4-30.5-22.6-54.2-47.8-72.3-76.9h59c4.4 0 8-3.6 8-8V478c0-4.4-3.6-8-8-8h-98.8v-18.6h66.7c4.4 0 8-3.6 8-8V316c0-4.4-3.6-8-8-8H476.4c-4.4 0-8 3.6-8 8zm51.5 42.8h97.9v41.6h-97.9v-41.6zm347-188.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6z" } }] }, "name": "insurance", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (InsuranceOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/InsuranceTwoTone.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/InsuranceTwoTone.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var InsuranceTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M521.9 358.8h97.9v41.6h-97.9z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M214 226.7v427.6l298 232.2 298-232.2V226.7L512 125.1 214 226.7zM413.3 656h-.2c0 4.4-3.6 8-8 8h-37.3c-4.4 0-8-3.6-8-8V471.4c-7.7 9.2-15.4 17.9-23.1 26a6.04 6.04 0 01-10.2-2.4l-13.2-43.5c-.6-2-.2-4.1 1.2-5.6 37-43.4 64.7-95.1 82.2-153.6 1.1-3.5 5-5.3 8.4-3.7l38.6 18.3c2.7 1.3 4.1 4.4 3.2 7.2a429.2 429.2 0 01-33.6 79V656zm257.9-340v127.2c0 4.4-3.6 8-8 8h-66.7v18.6h98.8c4.4 0 8 3.6 8 8v35.6c0 4.4-3.6 8-8 8h-59c18.1 29.1 41.8 54.3 72.3 76.9 2.6 2.1 3.2 5.9 1.2 8.5l-26.3 35.3a5.92 5.92 0 01-8.9.7c-30.6-29.3-56.8-65.2-78.1-106.9V656c0 4.4-3.6 8-8 8h-36.2c-4.4 0-8-3.6-8-8V536c-22 44.7-49 80.8-80.6 107.6a6.38 6.38 0 01-4.8 1.4c-1.7-.3-3.2-1.3-4.1-2.8L432 605.7a6 6 0 011.6-8.1c28.6-20.3 51.9-45.2 71-76h-55.1c-4.4 0-8-3.6-8-8V478c0-4.4 3.6-8 8-8h94.9v-18.6h-65.9c-4.4 0-8-3.6-8-8V316c0-4.4 3.6-8 8-8h184.7c4.4 0 8 3.6 8 8z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M443.7 306.9l-38.6-18.3c-3.4-1.6-7.3.2-8.4 3.7-17.5 58.5-45.2 110.2-82.2 153.6a5.7 5.7 0 00-1.2 5.6l13.2 43.5c1.4 4.5 7 5.8 10.2 2.4 7.7-8.1 15.4-16.8 23.1-26V656c0 4.4 3.6 8 8 8h37.3c4.4 0 8-3.6 8-8h.2V393.1a429.2 429.2 0 0033.6-79c.9-2.8-.5-5.9-3.2-7.2zm26.8 9.1v127.4c0 4.4 3.6 8 8 8h65.9V470h-94.9c-4.4 0-8 3.6-8 8v35.6c0 4.4 3.6 8 8 8h55.1c-19.1 30.8-42.4 55.7-71 76a6 6 0 00-1.6 8.1l22.8 36.5c.9 1.5 2.4 2.5 4.1 2.8 1.7.3 3.5-.2 4.8-1.4 31.6-26.8 58.6-62.9 80.6-107.6v120c0 4.4 3.6 8 8 8h36.2c4.4 0 8-3.6 8-8V535.9c21.3 41.7 47.5 77.6 78.1 106.9 2.6 2.5 6.7 2.2 8.9-.7l26.3-35.3c2-2.6 1.4-6.4-1.2-8.5-30.5-22.6-54.2-47.8-72.3-76.9h59c4.4 0 8-3.6 8-8v-35.6c0-4.4-3.6-8-8-8h-98.8v-18.6h66.7c4.4 0 8-3.6 8-8V316c0-4.4-3.6-8-8-8H478.5c-4.4 0-8 3.6-8 8zm51.4 42.8h97.9v41.6h-97.9v-41.6z", "fill": primaryColor } }] }; }, "name": "insurance", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (InsuranceTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/InteractionFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/InteractionFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var InteractionFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM726 585.7c0 55.3-44.7 100.1-99.7 100.1H420.6v53.4c0 5.7-6.5 8.8-10.9 5.3l-109.1-85.7c-3.5-2.7-3.5-8 0-10.7l109.1-85.7c4.4-3.5 10.9-.3 10.9 5.3v53.4h205.7c19.6 0 35.5-16 35.5-35.6v-78.9c0-3.7 3-6.8 6.8-6.8h50.7c3.7 0 6.8 3 6.8 6.8v79.1zm-2.6-209.9l-109.1 85.7c-4.4 3.5-10.9.3-10.9-5.3v-53.4H397.7c-19.6 0-35.5 16-35.5 35.6v78.9c0 3.7-3 6.8-6.8 6.8h-50.7c-3.7 0-6.8-3-6.8-6.8v-78.9c0-55.3 44.7-100.1 99.7-100.1h205.7v-53.4c0-5.7 6.5-8.8 10.9-5.3l109.1 85.7c3.6 2.5 3.6 7.8.1 10.5z" } }] }, "name": "interaction", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (InteractionFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/InteractionOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/InteractionOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var InteractionOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656zM304.8 524h50.7c3.7 0 6.8-3 6.8-6.8v-78.9c0-19.7 15.9-35.6 35.5-35.6h205.7v53.4c0 5.7 6.5 8.8 10.9 5.3l109.1-85.7c3.5-2.7 3.5-8 0-10.7l-109.1-85.7c-4.4-3.5-10.9-.3-10.9 5.3V338H397.7c-55.1 0-99.7 44.8-99.7 100.1V517c0 4 3 7 6.8 7zm-4.2 134.9l109.1 85.7c4.4 3.5 10.9.3 10.9-5.3v-53.4h205.7c55.1 0 99.7-44.8 99.7-100.1v-78.9c0-3.7-3-6.8-6.8-6.8h-50.7c-3.7 0-6.8 3-6.8 6.8v78.9c0 19.7-15.9 35.6-35.5 35.6H420.6V568c0-5.7-6.5-8.8-10.9-5.3l-109.1 85.7c-3.5 2.5-3.5 7.8 0 10.5z" } }] }, "name": "interaction", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (InteractionOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/InteractionTwoTone.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/InteractionTwoTone.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var InteractionTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M184 840h656V184H184v656zm114-401.9c0-55.3 44.6-100.1 99.7-100.1h205.8v-53.4c0-5.6 6.5-8.8 10.9-5.3L723.5 365c3.5 2.7 3.5 8 0 10.7l-109.1 85.7c-4.4 3.5-10.9.4-10.9-5.3v-53.4H397.8c-19.6 0-35.5 15.9-35.5 35.6v78.9c0 3.8-3.1 6.8-6.8 6.8h-50.7c-3.8 0-6.8-3-6.8-7v-78.9zm2.6 210.3l109.1-85.7c4.4-3.5 10.9-.4 10.9 5.3v53.4h205.6c19.6 0 35.5-15.9 35.5-35.6v-78.9c0-3.8 3.1-6.8 6.8-6.8h50.7c3.8 0 6.8 3.1 6.8 6.8v78.9c0 55.3-44.6 100.1-99.7 100.1H420.6v53.4c0 5.6-6.5 8.8-10.9 5.3l-109.1-85.7c-3.5-2.7-3.5-8 0-10.5z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M304.8 524h50.7c3.7 0 6.8-3 6.8-6.8v-78.9c0-19.7 15.9-35.6 35.5-35.6h205.7v53.4c0 5.7 6.5 8.8 10.9 5.3l109.1-85.7c3.5-2.7 3.5-8 0-10.7l-109.1-85.7c-4.4-3.5-10.9-.3-10.9 5.3V338H397.7c-55.1 0-99.7 44.8-99.7 100.1V517c0 4 3 7 6.8 7zm-4.2 134.9l109.1 85.7c4.4 3.5 10.9.3 10.9-5.3v-53.4h205.7c55.1 0 99.7-44.8 99.7-100.1v-78.9c0-3.7-3-6.8-6.8-6.8h-50.7c-3.7 0-6.8 3-6.8 6.8v78.9c0 19.7-15.9 35.6-35.5 35.6H420.6V568c0-5.7-6.5-8.8-10.9-5.3l-109.1 85.7c-3.5 2.5-3.5 7.8 0 10.5z", "fill": primaryColor } }] }; }, "name": "interaction", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (InteractionTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/IssuesCloseOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/IssuesCloseOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var IssuesCloseOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm72-112c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48zm400-188h-59.3c-2.6 0-5 1.2-6.5 3.3L763.7 538.1l-49.9-68.8a7.92 7.92 0 00-6.5-3.3H648c-6.5 0-10.3 7.4-6.5 12.7l109.2 150.7a16.1 16.1 0 0026 0l165.8-228.7c3.8-5.3 0-12.7-6.5-12.7zm-44 306h-64.2c-5.5 0-10.6 2.9-13.6 7.5a352.2 352.2 0 01-49.8 62.2A355.92 355.92 0 01651.1 840a355 355 0 01-138.7 27.9c-48.1 0-94.8-9.4-138.7-27.9a355.92 355.92 0 01-113.3-76.3A353.06 353.06 0 01184 650.5c-18.6-43.8-28-90.5-28-138.5s9.4-94.7 28-138.5c17.9-42.4 43.6-80.5 76.4-113.2 32.8-32.7 70.9-58.4 113.3-76.3a355 355 0 01138.7-27.9c48.1 0 94.8 9.4 138.7 27.9 42.4 17.9 80.5 43.6 113.3 76.3 19 19 35.6 39.8 49.8 62.2 2.9 4.7 8.1 7.5 13.6 7.5H892c6 0 9.8-6.3 7.2-11.6C828.8 178.5 684.7 82 517.7 80 278.9 77.2 80.5 272.5 80 511.2 79.5 750.1 273.3 944 512.4 944c169.2 0 315.6-97 386.7-238.4A8 8 0 00892 694z" } }] }, "name": "issues-close", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (IssuesCloseOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ItalicOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ItalicOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ItalicOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M798 160H366c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h181.2l-156 544H229c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8H474.4l156-544H798c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z" } }] }, "name": "italic", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ItalicOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/KeyOutlined.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/KeyOutlined.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var KeyOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5l-41.1 41.1-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-44.9 44.9-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-65.3 65.3a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6A304.06 304.06 0 00608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644c-60.9 0-118.2-23.7-161.2-66.8-43.1-43-66.8-100.3-66.8-161.2 0-60.9 23.7-118.2 66.8-161.2 43-43.1 100.3-66.8 161.2-66.8 60.9 0 118.2 23.7 161.2 66.8 43.1 43 66.8 100.3 66.8 161.2 0 60.9-23.7 118.2-66.8 161.2z" } }] }, "name": "key", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (KeyOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LaptopOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LaptopOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LaptopOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M956.9 845.1L896.4 632V168c0-17.7-14.3-32-32-32h-704c-17.7 0-32 14.3-32 32v464L67.9 845.1C60.4 866 75.8 888 98 888h828.8c22.2 0 37.6-22 30.1-42.9zM200.4 208h624v395h-624V208zm228.3 608l8.1-37h150.3l8.1 37H428.7zm224 0l-19.1-86.7c-.8-3.7-4.1-6.3-7.8-6.3H398.2c-3.8 0-7 2.6-7.8 6.3L371.3 816H151l42.3-149h638.2l42.3 149H652.7z" } }] }, "name": "laptop", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (LaptopOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LayoutFilled.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LayoutFilled.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LayoutFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M384 912h496c17.7 0 32-14.3 32-32V340H384v572zm496-800H384v164h528V144c0-17.7-14.3-32-32-32zm-768 32v736c0 17.7 14.3 32 32 32h176V112H144c-17.7 0-32 14.3-32 32z" } }] }, "name": "layout", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (LayoutFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LayoutOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LayoutOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LayoutOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-696 72h136v656H184V184zm656 656H384V384h456v456zM384 320V184h456v136H384z" } }] }, "name": "layout", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (LayoutOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LayoutTwoTone.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LayoutTwoTone.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LayoutTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M384 185h456v136H384zm-200 0h136v656H184zm696-73H144c-17.7 0-32 14.3-32 32v1c0-17.7 14.3-32 32-32h736c17.7 0 32 14.3 32 32v-1c0-17.7-14.3-32-32-32zM384 385h456v456H384z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M880 113H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V145c0-17.7-14.3-32-32-32zM320 841H184V185h136v656zm520 0H384V385h456v456zm0-520H384V185h456v136z", "fill": primaryColor } }] }; }, "name": "layout", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (LayoutTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LeftCircleFilled.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LeftCircleFilled.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LeftCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm104 316.9c0 10.2-4.9 19.9-13.2 25.9L457.4 512l145.4 105.2c8.3 6 13.2 15.6 13.2 25.9V690c0 6.5-7.4 10.3-12.7 6.5l-246-178a7.95 7.95 0 010-12.9l246-178a8 8 0 0112.7 6.5v46.8z" } }] }, "name": "left-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (LeftCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LeftCircleOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LeftCircleOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LeftCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M603.3 327.5l-246 178a7.95 7.95 0 000 12.9l246 178c5.3 3.8 12.7 0 12.7-6.5V643c0-10.2-4.9-19.9-13.2-25.9L457.4 512l145.4-105.2c8.3-6 13.2-15.6 13.2-25.9V334c0-6.5-7.4-10.3-12.7-6.5z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "left-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (LeftCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LeftCircleTwoTone.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LeftCircleTwoTone.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LeftCircleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm104 240.9c0 10.3-4.9 19.9-13.2 25.9L457.4 512l145.4 105.1c8.3 6 13.2 15.7 13.2 25.9v46.9c0 6.5-7.4 10.3-12.7 6.5l-246-178a7.95 7.95 0 010-12.9l246-178c5.3-3.8 12.7 0 12.7 6.5v46.9z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M603.3 327.5l-246 178a7.95 7.95 0 000 12.9l246 178c5.3 3.8 12.7 0 12.7-6.5V643c0-10.2-4.9-19.9-13.2-25.9L457.4 512l145.4-105.2c8.3-6 13.2-15.6 13.2-25.9V334c0-6.5-7.4-10.3-12.7-6.5z", "fill": primaryColor } }] }; }, "name": "left-circle", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (LeftCircleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LeftOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LeftOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" } }] }, "name": "left", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (LeftOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LeftSquareFilled.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LeftSquareFilled.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LeftSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM624 380.9c0 10.2-4.9 19.9-13.2 25.9L465.4 512l145.4 105.2c8.3 6 13.2 15.6 13.2 25.9V690c0 6.5-7.4 10.3-12.7 6.5l-246-178a7.95 7.95 0 010-12.9l246-178c5.3-3.8 12.7 0 12.7 6.5v46.8z" } }] }, "name": "left-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (LeftSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LeftSquareOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LeftSquareOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LeftSquareOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M365.3 518.5l246 178c5.3 3.8 12.7 0 12.7-6.5v-46.9c0-10.2-4.9-19.9-13.2-25.9L465.4 512l145.4-105.2c8.3-6 13.2-15.6 13.2-25.9V334c0-6.5-7.4-10.3-12.7-6.5l-246 178a8.05 8.05 0 000 13z" } }, { "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, "name": "left-square", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (LeftSquareOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LeftSquareTwoTone.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LeftSquareTwoTone.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LeftSquareTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M184 840h656V184H184v656zm181.3-334.5l246-178c5.3-3.8 12.7 0 12.7 6.5v46.9c0 10.3-4.9 19.9-13.2 25.9L465.4 512l145.4 105.2c8.3 6 13.2 15.7 13.2 25.9V690c0 6.5-7.4 10.3-12.7 6.4l-246-178a7.95 7.95 0 010-12.9z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M365.3 518.4l246 178c5.3 3.9 12.7.1 12.7-6.4v-46.9c0-10.2-4.9-19.9-13.2-25.9L465.4 512l145.4-105.2c8.3-6 13.2-15.6 13.2-25.9V334c0-6.5-7.4-10.3-12.7-6.5l-246 178a7.95 7.95 0 000 12.9z", "fill": primaryColor } }] }; }, "name": "left-square", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (LeftSquareTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LikeFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LikeFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LikeFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 00-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 00471 99.9c-52 0-98 35-111.8 85.1l-85.9 311h-.3v428h472.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM112 528v364c0 17.7 14.3 32 32 32h65V496h-65c-17.7 0-32 14.3-32 32z" } }] }, "name": "like", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (LikeFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LikeOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LikeOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LikeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 00-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 00471 99.9c-52 0-98 35-111.8 85.1l-85.9 311H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h601.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM184 852V568h81v284h-81zm636.4-353l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 22.4-13.2 42.6-33.6 51.8H329V564.8l99.5-360.5a44.1 44.1 0 0142.2-32.3c7.6 0 15.1 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.2 32.1-19.6 43z" } }] }, "name": "like", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (LikeOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LikeTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LikeTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LikeTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M273 495.9v428l.3-428zm538.2-88.3H496.8l9.6-198.4c.6-11.9-4.7-23.1-14.6-30.5-6.1-4.5-13.6-6.8-21.1-6.7-19.6.1-36.9 13.4-42.2 32.3-37.1 134.4-64.9 235.2-83.5 302.5V852h399.4a56.85 56.85 0 0033.6-51.8c0-9.7-2.3-18.9-6.9-27.3l-13.9-25.4 21.9-19a56.76 56.76 0 0019.6-43c0-9.7-2.3-18.9-6.9-27.3l-13.9-25.4 21.9-19a56.76 56.76 0 0019.6-43c0-9.7-2.3-18.9-6.9-27.3l-14-25.5 21.9-19a56.76 56.76 0 0019.6-43c0-19.1-11-37.5-28.8-48.4z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M112 528v364c0 17.7 14.3 32 32 32h65V496h-65c-17.7 0-32 14.3-32 32zm773.9 5.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.5-65.5-111a67.67 67.67 0 00-34.3-9.3H572.3l6-122.9c1.5-29.7-9-57.9-29.5-79.4a106.4 106.4 0 00-77.9-33.4c-52 0-98 35-111.8 85.1l-85.8 310.8-.3 428h472.1c9.3 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37zM820.4 499l-21.9 19 14 25.5a56.2 56.2 0 016.9 27.3c0 16.5-7.1 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.1 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 22.4-13.2 42.6-33.6 51.8H345V506.8c18.6-67.2 46.4-168 83.5-302.5a44.28 44.28 0 0142.2-32.3c7.5-.1 15 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.1 32.2-19.6 43z", "fill": primaryColor } }] }; }, "name": "like", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (LikeTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LineChartOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LineChartOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LineChartOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z" } }] }, "name": "line-chart", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (LineChartOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LineHeightOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LineHeightOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LineHeightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M648 160H104c-4.4 0-8 3.6-8 8v128c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-64h168v560h-92c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-92V232h168v64c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V168c0-4.4-3.6-8-8-8zm272.8 546H856V318h64.8c6 0 9.4-7 5.7-11.7L825.7 178.7a7.14 7.14 0 00-11.3 0L713.6 306.3a7.23 7.23 0 005.7 11.7H784v388h-64.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5a7.2 7.2 0 00-5.6-11.7z" } }] }, "name": "line-height", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (LineHeightOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LineOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LineOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LineOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M904 476H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, "name": "line", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (LineOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LinkOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LinkOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LinkOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z" } }] }, "name": "link", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (LinkOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LinkedinFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LinkedinFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LinkedinFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM349.3 793.7H230.6V411.9h118.7v381.8zm-59.3-434a68.8 68.8 0 1168.8-68.8c-.1 38-30.9 68.8-68.8 68.8zm503.7 434H675.1V608c0-44.3-.8-101.2-61.7-101.2-61.7 0-71.2 48.2-71.2 98v188.9H423.7V411.9h113.8v52.2h1.6c15.8-30 54.5-61.7 112.3-61.7 120.2 0 142.3 79.1 142.3 181.9v209.4z" } }] }, "name": "linkedin", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (LinkedinFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LinkedinOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LinkedinOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LinkedinOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M847.7 112H176.3c-35.5 0-64.3 28.8-64.3 64.3v671.4c0 35.5 28.8 64.3 64.3 64.3h671.4c35.5 0 64.3-28.8 64.3-64.3V176.3c0-35.5-28.8-64.3-64.3-64.3zm0 736c-447.8-.1-671.7-.2-671.7-.3.1-447.8.2-671.7.3-671.7 447.8.1 671.7.2 671.7.3-.1 447.8-.2 671.7-.3 671.7zM230.6 411.9h118.7v381.8H230.6zm59.4-52.2c37.9 0 68.8-30.8 68.8-68.8a68.8 68.8 0 10-137.6 0c-.1 38 30.7 68.8 68.8 68.8zm252.3 245.1c0-49.8 9.5-98 71.2-98 60.8 0 61.7 56.9 61.7 101.2v185.7h118.6V584.3c0-102.8-22.2-181.9-142.3-181.9-57.7 0-96.4 31.7-112.3 61.7h-1.6v-52.2H423.7v381.8h118.6V604.8z" } }] }, "name": "linkedin", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (LinkedinOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/Loading3QuartersOutlined.js": /*!*******************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/Loading3QuartersOutlined.js ***! \*******************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var Loading3QuartersOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 1024c-69.1 0-136.2-13.5-199.3-40.2C251.7 958 197 921 150 874c-47-47-84-101.7-109.8-162.7C13.5 648.2 0 581.1 0 512c0-19.9 16.1-36 36-36s36 16.1 36 36c0 59.4 11.6 117 34.6 171.3 22.2 52.4 53.9 99.5 94.3 139.9 40.4 40.4 87.5 72.2 139.9 94.3C395 940.4 452.6 952 512 952c59.4 0 117-11.6 171.3-34.6 52.4-22.2 99.5-53.9 139.9-94.3 40.4-40.4 72.2-87.5 94.3-139.9C940.4 629 952 571.4 952 512c0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.2C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3s-13.5 136.2-40.2 199.3C958 772.3 921 827 874 874c-47 47-101.8 83.9-162.7 109.7-63.1 26.8-130.2 40.3-199.3 40.3z" } }] }, "name": "loading-3-quarters", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (Loading3QuartersOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LoadingOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LoadingOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LoadingOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" } }] }, "name": "loading", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (LoadingOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LockFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LockFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LockFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM540 701v53c0 4.4-3.6 8-8 8h-40c-4.4 0-8-3.6-8-8v-53a48.01 48.01 0 1156 0zm152-237H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224z" } }] }, "name": "lock", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (LockFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LockOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LockOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LockOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z" } }] }, "name": "lock", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (LockOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LockTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LockTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LockTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M232 840h560V536H232v304zm280-226a48.01 48.01 0 0128 87v53c0 4.4-3.6 8-8 8h-40c-4.4 0-8-3.6-8-8v-53a48.01 48.01 0 0128-87z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z", "fill": primaryColor } }] }; }, "name": "lock", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (LockTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LoginOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LoginOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LoginOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M521.7 82c-152.5-.4-286.7 78.5-363.4 197.7-3.4 5.3.4 12.3 6.7 12.3h70.3c4.8 0 9.3-2.1 12.3-5.8 7-8.5 14.5-16.7 22.4-24.5 32.6-32.5 70.5-58.1 112.7-75.9 43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 32.6 32.5 58.1 70.4 76 112.5C865.7 417.8 875 464.1 875 512c0 47.9-9.4 94.2-27.8 137.8-17.8 42.1-43.4 80-76 112.5s-70.5 58.1-112.7 75.9A352.8 352.8 0 01520.6 866c-47.9 0-94.3-9.4-137.9-27.8A353.84 353.84 0 01270 762.3c-7.9-7.9-15.3-16.1-22.4-24.5-3-3.7-7.6-5.8-12.3-5.8H165c-6.3 0-10.2 7-6.7 12.3C234.9 863.2 368.5 942 520.6 942c236.2 0 428-190.1 430.4-425.6C953.4 277.1 761.3 82.6 521.7 82zM395.02 624v-76h-314c-4.4 0-8-3.6-8-8v-56c0-4.4 3.6-8 8-8h314v-76c0-6.7 7.8-10.5 13-6.3l141.9 112a8 8 0 010 12.6l-141.9 112c-5.2 4.1-13 .4-13-6.3z" } }] }, "name": "login", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (LoginOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/LogoutOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/LogoutOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var LogoutOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z" } }] }, "name": "logout", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (LogoutOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MacCommandFilled.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MacCommandFilled.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MacCommandFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M624 672a48.01 48.01 0 0096 0c0-26.5-21.5-48-48-48h-48v48zm96-320a48.01 48.01 0 00-96 0v48h48c26.5 0 48-21.5 48-48z" } }, { "tag": "path", "attrs": { "d": "M928 64H96c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zM672 560c61.9 0 112 50.1 112 112s-50.1 112-112 112-112-50.1-112-112v-48h-96v48c0 61.9-50.1 112-112 112s-112-50.1-112-112 50.1-112 112-112h48v-96h-48c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112v48h96v-48c0-61.9 50.1-112 112-112s112 50.1 112 112-50.1 112-112 112h-48v96h48z" } }, { "tag": "path", "attrs": { "d": "M464 464h96v96h-96zM352 304a48.01 48.01 0 000 96h48v-48c0-26.5-21.5-48-48-48zm-48 368a48.01 48.01 0 0096 0v-48h-48c-26.5 0-48 21.5-48 48z" } }] }, "name": "mac-command", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (MacCommandFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MacCommandOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MacCommandOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MacCommandOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }, { "tag": "path", "attrs": { "d": "M370.8 554.4c-54.6 0-98.8 44.2-98.8 98.8s44.2 98.8 98.8 98.8 98.8-44.2 98.8-98.8v-42.4h84.7v42.4c0 54.6 44.2 98.8 98.8 98.8s98.8-44.2 98.8-98.8-44.2-98.8-98.8-98.8h-42.4v-84.7h42.4c54.6 0 98.8-44.2 98.8-98.8 0-54.6-44.2-98.8-98.8-98.8s-98.8 44.2-98.8 98.8v42.4h-84.7v-42.4c0-54.6-44.2-98.8-98.8-98.8S272 316.2 272 370.8s44.2 98.8 98.8 98.8h42.4v84.7h-42.4zm42.4 98.8c0 23.4-19 42.4-42.4 42.4s-42.4-19-42.4-42.4 19-42.4 42.4-42.4h42.4v42.4zm197.6-282.4c0-23.4 19-42.4 42.4-42.4s42.4 19 42.4 42.4-19 42.4-42.4 42.4h-42.4v-42.4zm0 240h42.4c23.4 0 42.4 19 42.4 42.4s-19 42.4-42.4 42.4-42.4-19-42.4-42.4v-42.4zM469.6 469.6h84.7v84.7h-84.7v-84.7zm-98.8-56.4c-23.4 0-42.4-19-42.4-42.4s19-42.4 42.4-42.4 42.4 19 42.4 42.4v42.4h-42.4z" } }] }, "name": "mac-command", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (MacCommandOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MailFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MailFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MailFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-80.8 108.9L531.7 514.4c-7.8 6.1-18.7 6.1-26.5 0L189.6 268.9A7.2 7.2 0 01194 256h648.8a7.2 7.2 0 014.4 12.9z" } }] }, "name": "mail", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (MailFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MailOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MailOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MailOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z" } }] }, "name": "mail", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (MailOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MailTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MailTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MailTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M477.5 536.3L135.9 270.7l-27.5-21.4 27.6 21.5V792h752V270.8L546.2 536.3a55.99 55.99 0 01-68.7 0z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M876.3 198.8l39.3 50.5-27.6 21.5 27.7-21.5-39.3-50.5z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-94.5 72.1L512 482 190.5 232.1h643zm54.5 38.7V792H136V270.8l-27.6-21.5 27.5 21.4 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5h.1l39.3 50.5-27.7 21.5z", "fill": primaryColor } }] }; }, "name": "mail", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (MailTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ManOutlined.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ManOutlined.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ManOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M874 120H622c-3.3 0-6 2.7-6 6v56c0 3.3 2.7 6 6 6h160.4L583.1 387.3c-50-38.5-111-59.3-175.1-59.3-76.9 0-149.3 30-203.6 84.4S120 539.1 120 616s30 149.3 84.4 203.6C258.7 874 331.1 904 408 904s149.3-30 203.6-84.4C666 765.3 696 692.9 696 616c0-64.1-20.8-124.9-59.2-174.9L836 241.9V402c0 3.3 2.7 6 6 6h56c3.3 0 6-2.7 6-6V150c0-16.5-13.5-30-30-30zM408 828c-116.9 0-212-95.1-212-212s95.1-212 212-212 212 95.1 212 212-95.1 212-212 212z" } }] }, "name": "man", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ManOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MedicineBoxFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MedicineBoxFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MedicineBoxFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M839.2 278.1a32 32 0 00-30.4-22.1H736V144c0-17.7-14.3-32-32-32H320c-17.7 0-32 14.3-32 32v112h-72.8a31.9 31.9 0 00-30.4 22.1L112 502v378c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V502l-72.8-223.9zM660 628c0 4.4-3.6 8-8 8H544v108c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V636H372c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h108V464c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v108h108c4.4 0 8 3.6 8 8v48zm4-372H360v-72h304v72z" } }] }, "name": "medicine-box", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (MedicineBoxFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MedicineBoxOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MedicineBoxOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MedicineBoxOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M839.2 278.1a32 32 0 00-30.4-22.1H736V144c0-17.7-14.3-32-32-32H320c-17.7 0-32 14.3-32 32v112h-72.8a31.9 31.9 0 00-30.4 22.1L112 502v378c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V502l-72.8-223.9zM360 184h304v72H360v-72zm480 656H184V513.4L244.3 328h535.4L840 513.4V840zM652 572H544V464c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v108H372c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h108v108c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V636h108c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" } }] }, "name": "medicine-box", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (MedicineBoxOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MedicineBoxTwoTone.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MedicineBoxTwoTone.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MedicineBoxTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M244.3 328L184 513.4V840h656V513.4L779.7 328H244.3zM660 628c0 4.4-3.6 8-8 8H544v108c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V636H372c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h108V464c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v108h108c4.4 0 8 3.6 8 8v48z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M652 572H544V464c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v108H372c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h108v108c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V636h108c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M839.2 278.1a32 32 0 00-30.4-22.1H736V144c0-17.7-14.3-32-32-32H320c-17.7 0-32 14.3-32 32v112h-72.8a31.9 31.9 0 00-30.4 22.1L112 502v378c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V502l-72.8-223.9zM360 184h304v72H360v-72zm480 656H184V513.4L244.3 328h535.4L840 513.4V840z", "fill": primaryColor } }] }; }, "name": "medicine-box", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (MedicineBoxTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MediumCircleFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MediumCircleFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MediumCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm256 253.7l-40.8 39.1c-3.6 2.7-5.3 7.1-4.6 11.4v287.7c-.7 4.4 1 8.8 4.6 11.4l40 39.1v8.7H566.4v-8.3l41.3-40.1c4.1-4.1 4.1-5.3 4.1-11.4V422.5l-115 291.6h-15.5L347.5 422.5V618c-1.2 8.2 1.7 16.5 7.5 22.4l53.8 65.1v8.7H256v-8.7l53.8-65.1a26.1 26.1 0 007-22.4V392c.7-6.3-1.7-12.4-6.5-16.7l-47.8-57.6V309H411l114.6 251.5 100.9-251.3H768v8.5z" } }] }, "name": "medium-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (MediumCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MediumOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MediumOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MediumOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M834.7 279.8l61.3-58.9V208H683.7L532.4 586.4 360.3 208H137.7v12.9l71.6 86.6c7 6.4 10.6 15.8 9.7 25.2V673c2.2 12.3-1.7 24.8-10.3 33.7L128 805v12.7h228.6v-12.9l-80.6-98a39.99 39.99 0 01-11.1-33.7V378.7l200.7 439.2h23.3l172.6-439.2v349.9c0 9.2 0 11.1-6 17.2l-62.1 60.3V819h301.2v-12.9l-59.9-58.9c-5.2-4-7.9-10.7-6.8-17.2V297a18.1 18.1 0 016.8-17.2z" } }] }, "name": "medium", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (MediumOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MediumSquareFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MediumSquareFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MediumSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM768 317.7l-40.8 39.1c-3.6 2.7-5.3 7.1-4.6 11.4v287.7c-.7 4.4 1 8.8 4.6 11.4l40 39.1v8.7H566.4v-8.3l41.3-40.1c4.1-4.1 4.1-5.3 4.1-11.4V422.5l-115 291.6h-15.5L347.5 422.5V618c-1.2 8.2 1.7 16.5 7.5 22.4l53.8 65.1v8.7H256v-8.7l53.8-65.1a26.1 26.1 0 007-22.4V392c.7-6.3-1.7-12.4-6.5-16.7l-47.8-57.6V309H411l114.6 251.5 100.9-251.3H768v8.5z" } }] }, "name": "medium-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (MediumSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MediumWorkmarkOutlined.js": /*!*****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MediumWorkmarkOutlined.js ***! \*****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MediumWorkmarkOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M517.2 590.55c0 3.55 0 4.36 2.4 6.55l13.43 13.25v.57h-59.57v-25.47a41.44 41.44 0 01-39.5 27.65c-30.61 0-52.84-24.25-52.84-68.87 0-41.8 23.99-69.69 57.65-69.69a35.15 35.15 0 0134.61 21.67v-56.19a6.99 6.99 0 00-2.71-6.79l-12.8-12.45v-.56l59.33-7.04v177.37zm-43.74-8.09v-83.83a22.2 22.2 0 00-17.74-8.4c-14.48 0-28.47 13.25-28.47 52.62 0 36.86 12.07 49.88 27.1 49.88a23.91 23.91 0 0019.11-10.27zm83.23 28.46V497.74a7.65 7.65 0 00-2.4-6.79l-13.19-13.74v-.57h59.56v114.8c0 3.55 0 4.36 2.4 6.54l13.12 12.45v.57l-59.49-.08zm-2.16-175.67c0-13.4 10.74-24.25 23.99-24.25 13.25 0 23.98 10.86 23.98 24.25 0 13.4-10.73 24.25-23.98 24.25s-23.99-10.85-23.99-24.25zm206.83 155.06c0 3.55 0 4.6 2.4 6.79l13.43 13.25v.57h-59.88V581.9a43.4 43.4 0 01-41.01 31.2c-26.55 0-40.78-19.56-40.78-56.59 0-17.86 0-37.43.56-59.41a6.91 6.91 0 00-2.4-6.55L620.5 477.2v-.57h59.09v73.81c0 24.25 3.51 40.42 18.54 40.42a23.96 23.96 0 0019.35-12.2v-80.85a7.65 7.65 0 00-2.4-6.79l-13.27-13.82v-.57h59.56V590.3zm202.76 20.6c0-4.36.8-59.97.8-72.75 0-24.25-3.76-40.98-20.63-40.98a26.7 26.7 0 00-21.19 11.64 99.68 99.68 0 012.4 23.04c0 16.81-.56 38.23-.8 59.66a6.91 6.91 0 002.4 6.55l13.43 12.45v.56h-60.12c0-4.04.8-59.98.8-72.76 0-24.65-3.76-40.98-20.39-40.98-8.2.3-15.68 4.8-19.83 11.96v82.46c0 3.56 0 4.37 2.4 6.55l13.11 12.45v.56h-59.48V498.15a7.65 7.65 0 00-2.4-6.8l-13.19-14.14v-.57H841v28.78c5.53-19 23.13-31.76 42.7-30.96 19.82 0 33.26 11.16 38.93 32.34a46.41 46.41 0 0144.77-32.34c26.55 0 41.58 19.8 41.58 57.23 0 17.87-.56 38.24-.8 59.66a6.5 6.5 0 002.72 6.55l13.11 12.45v.57h-59.88zM215.87 593.3l17.66 17.05v.57h-89.62v-.57l17.99-17.05a6.91 6.91 0 002.4-6.55V477.69c0-4.6 0-10.83.8-16.16L104.66 613.1h-.72l-62.6-139.45c-1.37-3.47-1.77-3.72-2.65-6.06v91.43a32.08 32.08 0 002.96 17.87l25.19 33.46v.57H0v-.57l25.18-33.55a32.16 32.16 0 002.96-17.78V457.97A19.71 19.71 0 0024 444.15L6.16 420.78v-.56h63.96l53.56 118.1 47.17-118.1h62.6v.56l-17.58 19.8a6.99 6.99 0 00-2.72 6.8v139.37a6.5 6.5 0 002.72 6.55zm70.11-54.65v.56c0 34.6 17.67 48.5 38.38 48.5a43.5 43.5 0 0040.77-24.97h.56c-7.2 34.2-28.14 50.36-59.48 50.36-33.82 0-65.72-20.61-65.72-68.39 0-50.2 31.98-70.25 67.32-70.25 28.46 0 58.76 13.58 58.76 57.24v6.95h-80.59zm0-6.95h39.42v-7.04c0-35.57-7.28-45.03-18.23-45.03-13.27 0-21.35 14.15-21.35 52.07h.16z" } }] }, "name": "medium-workmark", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (MediumWorkmarkOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MehFilled.js": /*!****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MehFilled.js ***! \****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MehFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zM288 421a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm384 200c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h304c4.4 0 8 3.6 8 8v48zm16-152a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "meh", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (MehFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MehOutlined.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MehOutlined.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MehOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 565H360c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" } }] }, "name": "meh", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (MehOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MehTwoTone.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MehTwoTone.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MehTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zM288 421a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm384 200c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h304c4.4 0 8 3.6 8 8v48zm16-152a48.01 48.01 0 010-96 48.01 48.01 0 010 96z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M288 421a48 48 0 1096 0 48 48 0 10-96 0zm376 144H360c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-24-144a48 48 0 1096 0 48 48 0 10-96 0z", "fill": primaryColor } }] }; }, "name": "meh", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (MehTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MenuFoldOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MenuFoldOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MenuFoldOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 000 13.8z" } }] }, "name": "menu-fold", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (MenuFoldOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MenuOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MenuOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MenuOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z" } }] }, "name": "menu", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (MenuOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MenuUnfoldOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MenuUnfoldOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MenuUnfoldOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 000-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0014.4 7z" } }] }, "name": "menu-unfold", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (MenuUnfoldOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MergeCellsOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MergeCellsOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MergeCellsOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M482.2 508.4L331.3 389c-3-2.4-7.3-.2-7.3 3.6V478H184V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H144c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H184V546h140v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4a4.5 4.5 0 000-7.2zM880 116H596c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H700v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4a4.52 4.52 0 000 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h140v294H636V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z" } }] }, "name": "merge-cells", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (MergeCellsOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MessageFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MessageFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MessageFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M924.3 338.4a447.57 447.57 0 00-96.1-143.3 443.09 443.09 0 00-143-96.3A443.91 443.91 0 00512 64h-2c-60.5.3-119 12.3-174.1 35.9a444.08 444.08 0 00-141.7 96.5 445 445 0 00-95 142.8A449.89 449.89 0 0065 514.1c.3 69.4 16.9 138.3 47.9 199.9v152c0 25.4 20.6 46 45.9 46h151.8a447.72 447.72 0 00199.5 48h2.1c59.8 0 117.7-11.6 172.3-34.3A443.2 443.2 0 00827 830.5c41.2-40.9 73.6-88.7 96.3-142 23.5-55.2 35.5-113.9 35.8-174.5.2-60.9-11.6-120-34.8-175.6zM312.4 560c-26.4 0-47.9-21.5-47.9-48s21.5-48 47.9-48 47.9 21.5 47.9 48-21.4 48-47.9 48zm199.6 0c-26.4 0-47.9-21.5-47.9-48s21.5-48 47.9-48 47.9 21.5 47.9 48-21.5 48-47.9 48zm199.6 0c-26.4 0-47.9-21.5-47.9-48s21.5-48 47.9-48 47.9 21.5 47.9 48-21.5 48-47.9 48z" } }] }, "name": "message", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (MessageFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MessageOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MessageOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MessageOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z" } }] }, "name": "message", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (MessageOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MessageTwoTone.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MessageTwoTone.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MessageTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M775.3 248.9a369.62 369.62 0 00-119-80A370.2 370.2 0 00512.1 140h-1.7c-99.7.4-193 39.4-262.8 109.9-69.9 70.5-108 164.1-107.6 263.8.3 60.3 15.3 120.2 43.5 173.1l4.5 8.4V836h140.8l8.4 4.5c52.9 28.2 112.8 43.2 173.1 43.5h1.7c99 0 192-38.2 262.1-107.6 70.4-69.8 109.5-163.1 110.1-262.7.2-50.6-9.5-99.6-28.9-145.8a370.15 370.15 0 00-80-119zM312 560a48.01 48.01 0 010-96 48.01 48.01 0 010 96zm200 0a48.01 48.01 0 010-96 48.01 48.01 0 010 96zm200 0a48.01 48.01 0 010-96 48.01 48.01 0 010 96z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M664 512a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M925.2 338.4c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M464 512a48 48 0 1096 0 48 48 0 10-96 0z", "fill": primaryColor } }] }; }, "name": "message", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (MessageTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MinusCircleFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MinusCircleFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MinusCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm192 472c0 4.4-3.6 8-8 8H328c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h368c4.4 0 8 3.6 8 8v48z" } }] }, "name": "minus-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (MinusCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MinusCircleOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MinusCircleOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MinusCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "minus-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (MinusCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MinusCircleTwoTone.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MinusCircleTwoTone.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MinusCircleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm192 396c0 4.4-3.6 8-8 8H328c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h368c4.4 0 8 3.6 8 8v48z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z", "fill": primaryColor } }] }; }, "name": "minus-circle", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (MinusCircleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MinusOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MinusOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MinusOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, "name": "minus", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (MinusOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MinusSquareFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MinusSquareFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MinusSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM704 536c0 4.4-3.6 8-8 8H328c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h368c4.4 0 8 3.6 8 8v48z" } }] }, "name": "minus-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (MinusSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MinusSquareOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MinusSquareOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MinusSquareOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z" } }, { "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, "name": "minus-square", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (MinusSquareOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MinusSquareTwoTone.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MinusSquareTwoTone.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MinusSquareTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M184 840h656V184H184v656zm136-352c0-4.4 3.6-8 8-8h368c4.4 0 8 3.6 8 8v48c0 4.4-3.6 8-8 8H328c-4.4 0-8-3.6-8-8v-48z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z", "fill": primaryColor } }] }; }, "name": "minus-square", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (MinusSquareTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MobileFilled.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MobileFilled.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MobileFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zM512 824c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40z" } }] }, "name": "mobile", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (MobileFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MobileOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MobileOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MobileOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zm-8 824H288V134h448v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, "name": "mobile", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (MobileOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MobileTwoTone.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MobileTwoTone.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MobileTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M744 64H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V128c0-35.3-28.7-64-64-64zm-8 824H288V136h448v752z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M288 888h448V136H288v752zm224-142c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M472 786a40 40 0 1080 0 40 40 0 10-80 0z", "fill": primaryColor } }] }; }, "name": "mobile", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (MobileTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MoneyCollectFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MoneyCollectFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MoneyCollectFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M911.5 699.7a8 8 0 00-10.3-4.8L840 717.2V179c0-37.6-30.4-68-68-68H252c-37.6 0-68 30.4-68 68v538.2l-61.3-22.3c-.9-.3-1.8-.5-2.7-.5-4.4 0-8 3.6-8 8V762c0 3.3 2.1 6.3 5.3 7.5L501 909.1c7.1 2.6 14.8 2.6 21.9 0l383.8-139.5c3.2-1.2 5.3-4.2 5.3-7.5v-59.6c0-1-.2-1.9-.5-2.8zm-243.8-377L564 514.3h57.6c4.4 0 8 3.6 8 8v27.1c0 4.4-3.6 8-8 8h-76.3v39h76.3c4.4 0 8 3.6 8 8v27.1c0 4.4-3.6 8-8 8h-76.3V703c0 4.4-3.6 8-8 8h-49.9c-4.4 0-8-3.6-8-8v-63.4h-76c-4.4 0-8-3.6-8-8v-27.1c0-4.4 3.6-8 8-8h76v-39h-76c-4.4 0-8-3.6-8-8v-27.1c0-4.4 3.6-8 8-8h57L356.5 322.8c-2.1-3.8-.7-8.7 3.2-10.8 1.2-.7 2.5-1 3.8-1h55.7a8 8 0 017.1 4.4L511 484.2h3.3L599 315.4c1.3-2.7 4.1-4.4 7.1-4.4h54.5c4.4 0 8 3.6 8.1 7.9 0 1.3-.4 2.6-1 3.8z" } }] }, "name": "money-collect", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (MoneyCollectFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MoneyCollectOutlined.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MoneyCollectOutlined.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MoneyCollectOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M911.5 700.7a8 8 0 00-10.3-4.8L840 718.2V180c0-37.6-30.4-68-68-68H252c-37.6 0-68 30.4-68 68v538.2l-61.3-22.3c-.9-.3-1.8-.5-2.7-.5-4.4 0-8 3.6-8 8V763c0 3.3 2.1 6.3 5.3 7.5L501 910.1c7.1 2.6 14.8 2.6 21.9 0l383.8-139.5c3.2-1.2 5.3-4.2 5.3-7.5v-59.6c0-1-.2-1.9-.5-2.8zM512 837.5l-256-93.1V184h512v560.4l-256 93.1zM660.6 312h-54.5c-3 0-5.8 1.7-7.1 4.4l-84.7 168.8H511l-84.7-168.8a8 8 0 00-7.1-4.4h-55.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.8l103.9 191.6h-57c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76v39h-76c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76V704c0 4.4 3.6 8 8 8h49.9c4.4 0 8-3.6 8-8v-63.5h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8h-76.3v-39h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8H564l103.7-191.6c.6-1.2 1-2.5 1-3.8-.1-4.3-3.7-7.9-8.1-7.9z" } }] }, "name": "money-collect", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (MoneyCollectOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MoneyCollectTwoTone.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MoneyCollectTwoTone.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MoneyCollectTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M256 744.4l256 93.1 256-93.1V184H256v560.4zM359.7 313c1.2-.7 2.5-1 3.8-1h55.7a8 8 0 017.1 4.4L511 485.2h3.3L599 316.4c1.3-2.7 4.1-4.4 7.1-4.4h54.5c4.4 0 8 3.6 8.1 7.9 0 1.3-.4 2.6-1 3.8L564 515.3h57.6c4.4 0 8 3.6 8 8v27.1c0 4.4-3.6 8-8 8h-76.3v39h76.3c4.4 0 8 3.6 8 8v27.1c0 4.4-3.6 8-8 8h-76.3V704c0 4.4-3.6 8-8 8h-49.9c-4.4 0-8-3.6-8-8v-63.4h-76c-4.4 0-8-3.6-8-8v-27.1c0-4.4 3.6-8 8-8h76v-39h-76c-4.4 0-8-3.6-8-8v-27.1c0-4.4 3.6-8 8-8h57L356.5 323.8c-2.1-3.8-.7-8.7 3.2-10.8z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M911.5 700.7a8 8 0 00-10.3-4.8L840 718.2V180c0-37.6-30.4-68-68-68H252c-37.6 0-68 30.4-68 68v538.2l-61.3-22.3c-.9-.3-1.8-.5-2.7-.5-4.4 0-8 3.6-8 8V763c0 3.3 2.1 6.3 5.3 7.5L501 910.1c7.1 2.6 14.8 2.6 21.9 0l383.8-139.5c3.2-1.2 5.3-4.2 5.3-7.5v-59.6c0-1-.2-1.9-.5-2.8zM768 744.4l-256 93.1-256-93.1V184h512v560.4z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M460.4 515.4h-57c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76v39h-76c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76V704c0 4.4 3.6 8 8 8h49.9c4.4 0 8-3.6 8-8v-63.5h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8h-76.3v-39h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8H564l103.7-191.6c.6-1.2 1-2.5 1-3.8-.1-4.3-3.7-7.9-8.1-7.9h-54.5c-3 0-5.8 1.7-7.1 4.4l-84.7 168.8H511l-84.7-168.8a8 8 0 00-7.1-4.4h-55.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.8l103.9 191.6z", "fill": primaryColor } }] }; }, "name": "money-collect", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (MoneyCollectTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MonitorOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MonitorOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MonitorOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M692.8 412.7l.2-.2-34.6-44.3a7.97 7.97 0 00-11.2-1.4l-50.4 39.3-70.5-90.1a7.97 7.97 0 00-11.2-1.4l-37.9 29.7a7.97 7.97 0 00-1.4 11.2l70.5 90.2-.2.1 34.6 44.3c2.7 3.5 7.7 4.1 11.2 1.4l50.4-39.3 64.1 82c2.7 3.5 7.7 4.1 11.2 1.4l37.9-29.6c3.5-2.7 4.1-7.7 1.4-11.2l-64.1-82.1zM608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5L114.3 856.1a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6C473 696.1 537.7 720 608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644s-118.2-23.7-161.2-66.8C403.7 534.2 380 476.9 380 416s23.7-118.2 66.8-161.2c43-43.1 100.3-66.8 161.2-66.8s118.2 23.7 161.2 66.8c43.1 43 66.8 100.3 66.8 161.2s-23.7 118.2-66.8 161.2z" } }] }, "name": "monitor", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (MonitorOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/MoreOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/MoreOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var MoreOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M456 231a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, "name": "more", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (MoreOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/NodeCollapseOutlined.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/NodeCollapseOutlined.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var NodeCollapseOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M952 612c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H298a95.92 95.92 0 00-89-60c-53 0-96 43-96 96s43 96 96 96c40.3 0 74.8-24.8 89-60h150.3v152c0 55.2 44.8 100 100 100H952c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H548.3c-15.5 0-28-12.5-28-28V612H952zM451.7 313.7l172.5 136.2c6.3 5.1 15.8.5 15.8-7.7V344h264c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8H640v-98.2c0-8.1-9.4-12.8-15.8-7.7L451.7 298.3a9.9 9.9 0 000 15.4z" } }] }, "name": "node-collapse", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (NodeCollapseOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/NodeExpandOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/NodeExpandOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var NodeExpandOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M952 612c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H298a95.92 95.92 0 00-89-60c-53 0-96 43-96 96s43 96 96 96c40.3 0 74.8-24.8 89-60h150.3v152c0 55.2 44.8 100 100 100H952c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H548.3c-15.5 0-28-12.5-28-28V612H952zM456 344h264v98.2c0 8.1 9.5 12.8 15.8 7.7l172.5-136.2c5-3.9 5-11.4 0-15.3L735.8 162.1c-6.4-5.1-15.8-.5-15.8 7.7V268H456c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8z" } }] }, "name": "node-expand", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (NodeExpandOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/NodeIndexOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/NodeIndexOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var NodeIndexOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M843.5 737.4c-12.4-75.2-79.2-129.1-155.3-125.4S550.9 676 546 752c-153.5-4.8-208-40.7-199.1-113.7 3.3-27.3 19.8-41.9 50.1-49 18.4-4.3 38.8-4.9 57.3-3.2 1.7.2 3.5.3 5.2.5 11.3 2.7 22.8 5 34.3 6.8 34.1 5.6 68.8 8.4 101.8 6.6 92.8-5 156-45.9 159.2-132.7 3.1-84.1-54.7-143.7-147.9-183.6-29.9-12.8-61.6-22.7-93.3-30.2-14.3-3.4-26.3-5.7-35.2-7.2-7.9-75.9-71.5-133.8-147.8-134.4-76.3-.6-140.9 56.1-150.1 131.9s40 146.3 114.2 163.9c74.2 17.6 149.9-23.3 175.7-95.1 9.4 1.7 18.7 3.6 28 5.8 28.2 6.6 56.4 15.4 82.4 26.6 70.7 30.2 109.3 70.1 107.5 119.9-1.6 44.6-33.6 65.2-96.2 68.6-27.5 1.5-57.6-.9-87.3-5.8-8.3-1.4-15.9-2.8-22.6-4.3-3.9-.8-6.6-1.5-7.8-1.8l-3.1-.6c-2.2-.3-5.9-.8-10.7-1.3-25-2.3-52.1-1.5-78.5 4.6-55.2 12.9-93.9 47.2-101.1 105.8-15.7 126.2 78.6 184.7 276 188.9 29.1 70.4 106.4 107.9 179.6 87 73.3-20.9 119.3-93.4 106.9-168.6zM329.1 345.2a83.3 83.3 0 11.01-166.61 83.3 83.3 0 01-.01 166.61zM695.6 845a83.3 83.3 0 11.01-166.61A83.3 83.3 0 01695.6 845z" } }] }, "name": "node-index", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (NodeIndexOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/NotificationFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/NotificationFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var NotificationFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112c-3.8 0-7.7.7-11.6 2.3L292 345.9H128c-8.8 0-16 7.4-16 16.6v299c0 9.2 7.2 16.6 16 16.6h101.6c-3.7 11.6-5.6 23.9-5.6 36.4 0 65.9 53.8 119.5 120 119.5 55.4 0 102.1-37.6 115.9-88.4l408.6 164.2c3.9 1.5 7.8 2.3 11.6 2.3 16.9 0 32-14.2 32-33.2V145.2C912 126.2 897 112 880 112zM344 762.3c-26.5 0-48-21.4-48-47.8 0-11.2 3.9-21.9 11-30.4l84.9 34.1c-2 24.6-22.7 44.1-47.9 44.1z" } }] }, "name": "notification", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (NotificationFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/NotificationOutlined.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/NotificationOutlined.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var NotificationOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112c-3.8 0-7.7.7-11.6 2.3L292 345.9H128c-8.8 0-16 7.4-16 16.6v299c0 9.2 7.2 16.6 16 16.6h101.7c-3.7 11.6-5.7 23.9-5.7 36.4 0 65.9 53.8 119.5 120 119.5 55.4 0 102.1-37.6 115.9-88.4l408.6 164.2c3.9 1.5 7.8 2.3 11.6 2.3 16.9 0 32-14.2 32-33.2V145.2C912 126.2 897 112 880 112zM344 762.3c-26.5 0-48-21.4-48-47.8 0-11.2 3.9-21.9 11-30.4l84.9 34.1c-2 24.6-22.7 44.1-47.9 44.1zm496 58.4L318.8 611.3l-12.9-5.2H184V417.9h121.9l12.9-5.2L840 203.3v617.4z" } }] }, "name": "notification", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (NotificationOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/NotificationTwoTone.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/NotificationTwoTone.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var NotificationTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M229.6 678.1c-3.7 11.6-5.6 23.9-5.6 36.4 0-12.5 2-24.8 5.7-36.4h-.1zm76.3-260.2H184v188.2h121.9l12.9 5.2L840 820.7V203.3L318.8 412.7z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M880 112c-3.8 0-7.7.7-11.6 2.3L292 345.9H128c-8.8 0-16 7.4-16 16.6v299c0 9.2 7.2 16.6 16 16.6h101.7c-3.7 11.6-5.7 23.9-5.7 36.4 0 65.9 53.8 119.5 120 119.5 55.4 0 102.1-37.6 115.9-88.4l408.6 164.2c3.9 1.5 7.8 2.3 11.6 2.3 16.9 0 32-14.2 32-33.2V145.2C912 126.2 897 112 880 112zM344 762.3c-26.5 0-48-21.4-48-47.8 0-11.2 3.9-21.9 11-30.4l84.9 34.1c-2 24.6-22.7 44.1-47.9 44.1zm496 58.4L318.8 611.3l-12.9-5.2H184V417.9h121.9l12.9-5.2L840 203.3v617.4z", "fill": primaryColor } }] }; }, "name": "notification", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (NotificationTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/NumberOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/NumberOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var NumberOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M872 394c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8H708V152c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v166H400V152c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v166H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h168v236H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h168v166c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V706h228v166c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V706h164c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8H708V394h164zM628 630H400V394h228v236z" } }] }, "name": "number", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (NumberOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/OneToOneOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/OneToOneOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var OneToOneOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M316 672h60c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8zm196-50c22.1 0 40-17.9 40-39 0-23.1-17.9-41-40-41s-40 17.9-40 41c0 21.1 17.9 39 40 39zm0-140c22.1 0 40-17.9 40-39 0-23.1-17.9-41-40-41s-40 17.9-40 41c0 21.1 17.9 39 40 39z" } }, { "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }, { "tag": "path", "attrs": { "d": "M648 672h60c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8z" } }] }, "name": "one-to-one", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (OneToOneOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/OrderedListOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/OrderedListOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var OrderedListOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M920 760H336c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-568H336c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H336c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM216 712H100c-2.2 0-4 1.8-4 4v34c0 2.2 1.8 4 4 4h72.4v20.5h-35.7c-2.2 0-4 1.8-4 4v34c0 2.2 1.8 4 4 4h35.7V838H100c-2.2 0-4 1.8-4 4v34c0 2.2 1.8 4 4 4h116c2.2 0 4-1.8 4-4V716c0-2.2-1.8-4-4-4zM100 188h38v120c0 2.2 1.8 4 4 4h40c2.2 0 4-1.8 4-4V152c0-4.4-3.6-8-8-8h-78c-2.2 0-4 1.8-4 4v36c0 2.2 1.8 4 4 4zm116 240H100c-2.2 0-4 1.8-4 4v36c0 2.2 1.8 4 4 4h68.4l-70.3 77.7a8.3 8.3 0 00-2.1 5.4V592c0 2.2 1.8 4 4 4h116c2.2 0 4-1.8 4-4v-36c0-2.2-1.8-4-4-4h-68.4l70.3-77.7a8.3 8.3 0 002.1-5.4V432c0-2.2-1.8-4-4-4z" } }] }, "name": "ordered-list", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (OrderedListOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PaperClipOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PaperClipOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PaperClipOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z" } }] }, "name": "paper-clip", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PaperClipOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PartitionOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PartitionOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PartitionOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M640.6 429.8h257.1c7.9 0 14.3-6.4 14.3-14.3V158.3c0-7.9-6.4-14.3-14.3-14.3H640.6c-7.9 0-14.3 6.4-14.3 14.3v92.9H490.6c-3.9 0-7.1 3.2-7.1 7.1v221.5h-85.7v-96.5c0-7.9-6.4-14.3-14.3-14.3H126.3c-7.9 0-14.3 6.4-14.3 14.3v257.2c0 7.9 6.4 14.3 14.3 14.3h257.1c7.9 0 14.3-6.4 14.3-14.3V544h85.7v221.5c0 3.9 3.2 7.1 7.1 7.1h135.7v92.9c0 7.9 6.4 14.3 14.3 14.3h257.1c7.9 0 14.3-6.4 14.3-14.3v-257c0-7.9-6.4-14.3-14.3-14.3h-257c-7.9 0-14.3 6.4-14.3 14.3v100h-78.6v-393h78.6v100c0 7.9 6.4 14.3 14.3 14.3zm53.5-217.9h150V362h-150V211.9zM329.9 587h-150V437h150v150zm364.2 75.1h150v150.1h-150V662.1z" } }] }, "name": "partition", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PartitionOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PauseCircleFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PauseCircleFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PauseCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-80 600c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V360c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v304zm224 0c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V360c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v304z" } }] }, "name": "pause-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (PauseCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PauseCircleOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PauseCircleOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PauseCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm-88-532h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8zm224 0h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8z" } }] }, "name": "pause-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PauseCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PauseCircleTwoTone.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PauseCircleTwoTone.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PauseCircleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm-80 524c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V360c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v304zm224 0c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V360c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v304z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M424 352h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8zm224 0h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8z", "fill": primaryColor } }] }; }, "name": "pause-circle", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (PauseCircleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PauseOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PauseOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PauseOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M304 176h80v672h-80zm408 0h-64c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8z" } }] }, "name": "pause", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PauseOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PayCircleFilled.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PayCircleFilled.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PayCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm166.6 246.8L567.5 515.6h62c4.4 0 8 3.6 8 8v29.9c0 4.4-3.6 8-8 8h-82V603h82c4.4 0 8 3.6 8 8v29.9c0 4.4-3.6 8-8 8h-82V717c0 4.4-3.6 8-8 8h-54.3c-4.4 0-8-3.6-8-8v-68.1h-81.7c-4.4 0-8-3.6-8-8V611c0-4.4 3.6-8 8-8h81.7v-41.5h-81.7c-4.4 0-8-3.6-8-8v-29.9c0-4.4 3.6-8 8-8h61.4L345.4 310.8a8.07 8.07 0 017-11.9h60.7c3 0 5.8 1.7 7.1 4.4l90.6 180h3.4l90.6-180a8 8 0 017.1-4.4h59.5c4.4 0 8 3.6 8 8 .2 1.4-.2 2.7-.8 3.9z" } }] }, "name": "pay-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (PayCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PayCircleOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PayCircleOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PayCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm159.6-585h-59.5c-3 0-5.8 1.7-7.1 4.4l-90.6 180H511l-90.6-180a8 8 0 00-7.1-4.4h-60.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.9L457 515.7h-61.4c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V603h-81.7c-4.4 0-8 3.6-8 8v29.9c0 4.4 3.6 8 8 8h81.7V717c0 4.4 3.6 8 8 8h54.3c4.4 0 8-3.6 8-8v-68.1h82c4.4 0 8-3.6 8-8V611c0-4.4-3.6-8-8-8h-82v-41.5h82c4.4 0 8-3.6 8-8v-29.9c0-4.4-3.6-8-8-8h-62l111.1-204.8c.6-1.2 1-2.5 1-3.8-.1-4.4-3.7-8-8.1-8z" } }] }, "name": "pay-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PayCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PercentageOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PercentageOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PercentageOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M855.7 210.8l-42.4-42.4a8.03 8.03 0 00-11.3 0L168.3 801.9a8.03 8.03 0 000 11.3l42.4 42.4c3.1 3.1 8.2 3.1 11.3 0L855.6 222c3.2-3 3.2-8.1.1-11.2zM304 448c79.4 0 144-64.6 144-144s-64.6-144-144-144-144 64.6-144 144 64.6 144 144 144zm0-216c39.7 0 72 32.3 72 72s-32.3 72-72 72-72-32.3-72-72 32.3-72 72-72zm416 344c-79.4 0-144 64.6-144 144s64.6 144 144 144 144-64.6 144-144-64.6-144-144-144zm0 216c-39.7 0-72-32.3-72-72s32.3-72 72-72 72 32.3 72 72-32.3 72-72 72z" } }] }, "name": "percentage", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PercentageOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PhoneFilled.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PhoneFilled.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PhoneFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M885.6 230.2L779.1 123.8a80.83 80.83 0 00-57.3-23.8c-21.7 0-42.1 8.5-57.4 23.8L549.8 238.4a80.83 80.83 0 00-23.8 57.3c0 21.7 8.5 42.1 23.8 57.4l83.8 83.8A393.82 393.82 0 01553.1 553 395.34 395.34 0 01437 633.8L353.2 550a80.83 80.83 0 00-57.3-23.8c-21.7 0-42.1 8.5-57.4 23.8L123.8 664.5a80.89 80.89 0 00-23.8 57.4c0 21.7 8.5 42.1 23.8 57.4l106.3 106.3c24.4 24.5 58.1 38.4 92.7 38.4 7.3 0 14.3-.6 21.2-1.8 134.8-22.2 268.5-93.9 376.4-201.7C828.2 612.8 899.8 479.2 922.3 344c6.8-41.3-6.9-83.8-36.7-113.8z" } }] }, "name": "phone", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (PhoneFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PhoneOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PhoneOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PhoneOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M877.1 238.7L770.6 132.3c-13-13-30.4-20.3-48.8-20.3s-35.8 7.2-48.8 20.3L558.3 246.8c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l89.6 89.7a405.46 405.46 0 01-86.4 127.3c-36.7 36.9-79.6 66-127.2 86.6l-89.6-89.7c-13-13-30.4-20.3-48.8-20.3a68.2 68.2 0 00-48.8 20.3L132.3 673c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l106.4 106.4c22.2 22.2 52.8 34.9 84.2 34.9 6.5 0 12.8-.5 19.2-1.6 132.4-21.8 263.8-92.3 369.9-198.3C818 606 888.4 474.6 910.4 342.1c6.3-37.6-6.3-76.3-33.3-103.4zm-37.6 91.5c-19.5 117.9-82.9 235.5-178.4 331s-213 158.9-330.9 178.4c-14.8 2.5-30-2.5-40.8-13.2L184.9 721.9 295.7 611l119.8 120 .9.9 21.6-8a481.29 481.29 0 00285.7-285.8l8-21.6-120.8-120.7 110.8-110.9 104.5 104.5c10.8 10.8 15.8 26 13.3 40.8z" } }] }, "name": "phone", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PhoneOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PhoneTwoTone.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PhoneTwoTone.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PhoneTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M721.7 184.9L610.9 295.8l120.8 120.7-8 21.6A481.29 481.29 0 01438 723.9l-21.6 8-.9-.9-119.8-120-110.8 110.9 104.5 104.5c10.8 10.7 26 15.7 40.8 13.2 117.9-19.5 235.4-82.9 330.9-178.4s158.9-213.1 178.4-331c2.5-14.8-2.5-30-13.3-40.8L721.7 184.9z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M877.1 238.7L770.6 132.3c-13-13-30.4-20.3-48.8-20.3s-35.8 7.2-48.8 20.3L558.3 246.8c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l89.6 89.7a405.46 405.46 0 01-86.4 127.3c-36.7 36.9-79.6 66-127.2 86.6l-89.6-89.7c-13-13-30.4-20.3-48.8-20.3a68.2 68.2 0 00-48.8 20.3L132.3 673c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l106.4 106.4c22.2 22.2 52.8 34.9 84.2 34.9 6.5 0 12.8-.5 19.2-1.6 132.4-21.8 263.8-92.3 369.9-198.3C818 606 888.4 474.6 910.4 342.1c6.3-37.6-6.3-76.3-33.3-103.4zm-37.6 91.5c-19.5 117.9-82.9 235.5-178.4 331s-213 158.9-330.9 178.4c-14.8 2.5-30-2.5-40.8-13.2L184.9 721.9 295.7 611l119.8 120 .9.9 21.6-8a481.29 481.29 0 00285.7-285.8l8-21.6-120.8-120.7 110.8-110.9 104.5 104.5c10.8 10.8 15.8 26 13.3 40.8z", "fill": primaryColor } }] }; }, "name": "phone", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (PhoneTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PicCenterOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PicCenterOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PicCenterOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M952 792H72c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h880c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-632H72c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h880c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM848 660c8.8 0 16-7.2 16-16V380c0-8.8-7.2-16-16-16H176c-8.8 0-16 7.2-16 16v264c0 8.8 7.2 16 16 16h672zM232 436h560v152H232V436z" } }] }, "name": "pic-center", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PicCenterOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PicLeftOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PicLeftOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PicLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M952 792H72c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h880c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-632H72c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h880c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM608 660c8.8 0 16-7.2 16-16V380c0-8.8-7.2-16-16-16H96c-8.8 0-16 7.2-16 16v264c0 8.8 7.2 16 16 16h512zM152 436h400v152H152V436zm552 210c0 4.4 3.6 8 8 8h224c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H712c-4.4 0-8 3.6-8 8v56zm8-204h224c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H712c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8z" } }] }, "name": "pic-left", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PicLeftOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PicRightOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PicRightOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PicRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M952 792H72c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h880c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-632H72c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h880c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-24 500c8.8 0 16-7.2 16-16V380c0-8.8-7.2-16-16-16H416c-8.8 0-16 7.2-16 16v264c0 8.8 7.2 16 16 16h512zM472 436h400v152H472V436zM80 646c0 4.4 3.6 8 8 8h224c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H88c-4.4 0-8 3.6-8 8v56zm8-204h224c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H88c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8z" } }] }, "name": "pic-right", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PicRightOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PictureFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PictureFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PictureFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zM338 304c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zm513.9 437.1a8.11 8.11 0 01-5.2 1.9H177.2c-4.4 0-8-3.6-8-8 0-1.9.7-3.7 1.9-5.2l170.3-202c2.8-3.4 7.9-3.8 11.3-1 .3.3.7.6 1 1l99.4 118 158.1-187.5c2.8-3.4 7.9-3.8 11.3-1 .3.3.7.6 1 1l229.6 271.6c2.6 3.3 2.2 8.4-1.2 11.2z" } }] }, "name": "picture", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (PictureFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PictureOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PictureOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PictureOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z" } }] }, "name": "picture", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PictureOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PictureTwoTone.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PictureTwoTone.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PictureTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M276 368a28 28 0 1056 0 28 28 0 10-56 0z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z", "fill": primaryColor } }] }; }, "name": "picture", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (PictureTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PieChartFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PieChartFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PieChartFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M863.1 518.5H505.5V160.9c0-4.4-3.6-8-8-8h-26a398.57 398.57 0 00-282.5 117 397.47 397.47 0 00-85.6 127C82.6 446.2 72 498.5 72 552.5S82.6 658.7 103.4 708c20.1 47.5 48.9 90.3 85.6 127 36.7 36.7 79.4 65.5 127 85.6a396.64 396.64 0 00155.6 31.5 398.57 398.57 0 00282.5-117c36.7-36.7 65.5-79.4 85.6-127a396.64 396.64 0 0031.5-155.6v-26c-.1-4.4-3.7-8-8.1-8zM951 463l-2.6-28.2c-8.5-92-49.3-178.8-115.1-244.3A398.5 398.5 0 00588.4 75.6L560.1 73c-4.7-.4-8.7 3.2-8.7 7.9v383.7c0 4.4 3.6 8 8 8l383.6-1c4.7-.1 8.4-4 8-8.6z" } }] }, "name": "pie-chart", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (PieChartFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PieChartOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PieChartOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PieChartOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M864 518H506V160c0-4.4-3.6-8-8-8h-26a398.46 398.46 0 00-282.8 117.1 398.19 398.19 0 00-85.7 127.1A397.61 397.61 0 0072 552a398.46 398.46 0 00117.1 282.8c36.7 36.7 79.5 65.6 127.1 85.7A397.61 397.61 0 00472 952a398.46 398.46 0 00282.8-117.1c36.7-36.7 65.6-79.5 85.7-127.1A397.61 397.61 0 00872 552v-26c0-4.4-3.6-8-8-8zM705.7 787.8A331.59 331.59 0 01470.4 884c-88.1-.4-170.9-34.9-233.2-97.2C174.5 724.1 140 640.7 140 552c0-88.7 34.5-172.1 97.2-234.8 54.6-54.6 124.9-87.9 200.8-95.5V586h364.3c-7.7 76.3-41.3 147-96.6 201.8zM952 462.4l-2.6-28.2c-8.5-92.1-49.4-179-115.2-244.6A399.4 399.4 0 00589 74.6L560.7 72c-4.7-.4-8.7 3.2-8.7 7.9V464c0 4.4 3.6 8 8 8l384-1c4.7 0 8.4-4 8-8.6zm-332.2-58.2V147.6a332.24 332.24 0 01166.4 89.8c45.7 45.6 77 103.6 90 166.1l-256.4.7z" } }] }, "name": "pie-chart", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PieChartOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PieChartTwoTone.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PieChartTwoTone.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PieChartTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M316.2 920.5c-47.6-20.1-90.4-49-127.1-85.7a398.19 398.19 0 01-85.7-127.1A397.12 397.12 0 0172 552.2v.2a398.57 398.57 0 00117 282.5c36.7 36.7 79.4 65.5 127 85.6A396.64 396.64 0 00471.6 952c27 0 53.6-2.7 79.7-7.9-25.9 5.2-52.4 7.8-79.3 7.8-54 .1-106.4-10.5-155.8-31.4zM560 472c-4.4 0-8-3.6-8-8V79.9c0-1.3.3-2.5.9-3.6-.9 1.3-1.5 2.9-1.5 4.6v383.7c0 4.4 3.6 8 8 8l383.6-1c1.6 0 3.1-.5 4.4-1.3-1 .5-2.2.7-3.4.7l-384 1z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M619.8 147.6v256.6l256.4-.7c-13-62.5-44.3-120.5-90-166.1a332.24 332.24 0 00-166.4-89.8z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M438 221.7c-75.9 7.6-146.2 40.9-200.8 95.5C174.5 379.9 140 463.3 140 552s34.5 172.1 97.2 234.8c62.3 62.3 145.1 96.8 233.2 97.2 88.2.4 172.7-34.1 235.3-96.2C761 733 794.6 662.3 802.3 586H438V221.7z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M864 518H506V160c0-4.4-3.6-8-8-8h-26a398.46 398.46 0 00-282.8 117.1 398.19 398.19 0 00-85.7 127.1A397.61 397.61 0 0072 552v.2c0 53.9 10.6 106.2 31.4 155.5 20.1 47.6 49 90.4 85.7 127.1 36.7 36.7 79.5 65.6 127.1 85.7A397.61 397.61 0 00472 952c26.9 0 53.4-2.6 79.3-7.8 26.1-5.3 51.7-13.1 76.4-23.6 47.6-20.1 90.4-49 127.1-85.7 36.7-36.7 65.6-79.5 85.7-127.1A397.61 397.61 0 00872 552v-26c0-4.4-3.6-8-8-8zM705.7 787.8A331.59 331.59 0 01470.4 884c-88.1-.4-170.9-34.9-233.2-97.2C174.5 724.1 140 640.7 140 552s34.5-172.1 97.2-234.8c54.6-54.6 124.9-87.9 200.8-95.5V586h364.3c-7.7 76.3-41.3 147-96.6 201.8z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M952 462.4l-2.6-28.2c-8.5-92.1-49.4-179-115.2-244.6A399.4 399.4 0 00589 74.6L560.7 72c-3.4-.3-6.4 1.5-7.8 4.3a8.7 8.7 0 00-.9 3.6V464c0 4.4 3.6 8 8 8l384-1c1.2 0 2.3-.3 3.4-.7a8.1 8.1 0 004.6-7.9zm-332.2-58.2V147.6a332.24 332.24 0 01166.4 89.8c45.7 45.6 77 103.6 90 166.1l-256.4.7z", "fill": primaryColor } }] }; }, "name": "pie-chart", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (PieChartTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PlayCircleFilled.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PlayCircleFilled.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PlayCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm144.1 454.9L437.7 677.8a8.02 8.02 0 01-12.7-6.5V353.7a8 8 0 0112.7-6.5L656.1 506a7.9 7.9 0 010 12.9z" } }] }, "name": "play-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (PlayCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PlayCircleOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PlayCircleOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PlayCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z" } }] }, "name": "play-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PlayCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PlayCircleTwoTone.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PlayCircleTwoTone.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PlayCircleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm164.1 378.2L457.7 677.1a8.02 8.02 0 01-12.7-6.5V353a8 8 0 0112.7-6.5l218.4 158.8a7.9 7.9 0 010 12.9z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M676.1 505.3L457.7 346.5A8 8 0 00445 353v317.6a8.02 8.02 0 0012.7 6.5l218.4-158.9a7.9 7.9 0 000-12.9z", "fill": primaryColor } }] }; }, "name": "play-circle", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (PlayCircleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PlaySquareFilled.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PlaySquareFilled.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PlaySquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM641.7 520.8L442.3 677.6c-7.4 5.8-18.3.6-18.3-8.8V355.3c0-9.4 10.9-14.7 18.3-8.8l199.4 156.7a11.2 11.2 0 010 17.6z" } }] }, "name": "play-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (PlaySquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PlaySquareOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PlaySquareOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PlaySquareOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M442.3 677.6l199.4-156.7a11.3 11.3 0 000-17.7L442.3 346.4c-7.4-5.8-18.3-.6-18.3 8.8v313.5c0 9.4 10.9 14.7 18.3 8.9z" } }, { "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, "name": "play-square", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PlaySquareOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PlaySquareTwoTone.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PlaySquareTwoTone.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PlaySquareTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M184 840h656V184H184v656zm240-484.7c0-9.4 10.9-14.7 18.3-8.8l199.4 156.7a11.2 11.2 0 010 17.6L442.3 677.6c-7.4 5.8-18.3.6-18.3-8.8V355.3z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M442.3 677.6l199.4-156.8a11.2 11.2 0 000-17.6L442.3 346.5c-7.4-5.9-18.3-.6-18.3 8.8v313.5c0 9.4 10.9 14.6 18.3 8.8z", "fill": primaryColor } }] }; }, "name": "play-square", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (PlaySquareTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PlusCircleFilled.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PlusCircleFilled.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PlusCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm192 472c0 4.4-3.6 8-8 8H544v152c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V544H328c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h152V328c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v152h152c4.4 0 8 3.6 8 8v48z" } }] }, "name": "plus-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (PlusCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PlusCircleOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PlusCircleOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PlusCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "plus-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PlusCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PlusCircleTwoTone.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PlusCircleTwoTone.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PlusCircleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm192 396c0 4.4-3.6 8-8 8H544v152c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V544H328c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h152V328c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v152h152c4.4 0 8 3.6 8 8v48z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z", "fill": primaryColor } }] }; }, "name": "plus-circle", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (PlusCircleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PlusOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PlusOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PlusOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { "tag": "path", "attrs": { "d": "M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z" } }] }, "name": "plus", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PlusOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PlusSquareFilled.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PlusSquareFilled.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PlusSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM704 536c0 4.4-3.6 8-8 8H544v152c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V544H328c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h152V328c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v152h152c4.4 0 8 3.6 8 8v48z" } }] }, "name": "plus-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (PlusSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PlusSquareOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PlusSquareOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PlusSquareOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z" } }, { "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, "name": "plus-square", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PlusSquareOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PlusSquareTwoTone.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PlusSquareTwoTone.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PlusSquareTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M184 840h656V184H184v656zm136-352c0-4.4 3.6-8 8-8h152V328c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v152h152c4.4 0 8 3.6 8 8v48c0 4.4-3.6 8-8 8H544v152c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V544H328c-4.4 0-8-3.6-8-8v-48z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z", "fill": primaryColor } }] }; }, "name": "plus-square", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (PlusSquareTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PoundCircleFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PoundCircleFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PoundCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm146 658c0 4.4-3.6 8-8 8H376.2c-4.4 0-8-3.6-8-8v-38.5c0-3.7 2.5-6.9 6.1-7.8 44-10.9 72.8-49 72.8-94.2 0-14.7-2.5-29.4-5.9-44.2H374c-4.4 0-8-3.6-8-8v-30c0-4.4 3.6-8 8-8h53.7c-7.8-25.1-14.6-50.7-14.6-77.1 0-75.8 58.6-120.3 151.5-120.3 26.5 0 51.4 5.5 70.3 12.7 3.1 1.2 5.2 4.2 5.2 7.5v39.5a8 8 0 01-10.6 7.6c-17.9-6.4-39-10.5-60.4-10.5-53.3 0-87.3 26.6-87.3 70.2 0 24.7 6.2 47.9 13.4 70.5h112c4.4 0 8 3.6 8 8v30c0 4.4-3.6 8-8 8h-98.6c3.1 13.2 5.3 26.9 5.3 41 0 40.7-16.5 73.9-43.9 91.1v4.7h180c4.4 0 8 3.6 8 8V722z" } }] }, "name": "pound-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (PoundCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PoundCircleOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PoundCircleOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PoundCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm138-209.8H469.8v-4.7c27.4-17.2 43.9-50.4 43.9-91.1 0-14.1-2.2-27.9-5.3-41H607c4.4 0 8-3.6 8-8v-30c0-4.4-3.6-8-8-8H495c-7.2-22.6-13.4-45.7-13.4-70.5 0-43.5 34-70.2 87.3-70.2 21.5 0 42.5 4.1 60.4 10.5 5.2 1.9 10.6-2 10.6-7.6v-39.5c0-3.3-2.1-6.3-5.2-7.5-18.8-7.2-43.8-12.7-70.3-12.7-92.9 0-151.5 44.5-151.5 120.3 0 26.3 6.9 52 14.6 77.1H374c-4.4 0-8 3.6-8 8v30c0 4.4 3.6 8 8 8h67.1c3.4 14.7 5.9 29.4 5.9 44.2 0 45.2-28.8 83.3-72.8 94.2-3.6.9-6.1 4.1-6.1 7.8V722c0 4.4 3.6 8 8 8H650c4.4 0 8-3.6 8-8v-39.8c0-4.4-3.6-8-8-8z" } }] }, "name": "pound-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PoundCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PoundCircleTwoTone.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PoundCircleTwoTone.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PoundCircleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm146 582.1c0 4.4-3.6 8-8 8H376.2c-4.4 0-8-3.6-8-8v-38.5c0-3.7 2.5-6.9 6.1-7.8 44-10.9 72.8-49 72.8-94.2 0-14.7-2.5-29.4-5.9-44.2H374c-4.4 0-8-3.6-8-8v-30c0-4.4 3.6-8 8-8h53.7c-7.8-25.1-14.6-50.7-14.6-77.1 0-75.8 58.6-120.3 151.5-120.3 26.5 0 51.4 5.5 70.3 12.7 3.1 1.2 5.2 4.2 5.2 7.5v39.5a8 8 0 01-10.6 7.6c-17.9-6.4-39-10.5-60.4-10.5-53.3 0-87.3 26.6-87.3 70.2 0 24.7 6.2 47.9 13.4 70.5h112c4.4 0 8 3.6 8 8v30c0 4.4-3.6 8-8 8h-98.6c3.1 13.2 5.3 26.9 5.3 41 0 40.7-16.5 73.9-43.9 91.1v4.7h180c4.4 0 8 3.6 8 8v39.8z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M650 674.3H470v-4.7c27.4-17.2 43.9-50.4 43.9-91.1 0-14.1-2.2-27.8-5.3-41h98.6c4.4 0 8-3.6 8-8v-30c0-4.4-3.6-8-8-8h-112c-7.2-22.6-13.4-45.8-13.4-70.5 0-43.6 34-70.2 87.3-70.2 21.4 0 42.5 4.1 60.4 10.5a8 8 0 0010.6-7.6v-39.5c0-3.3-2.1-6.3-5.2-7.5-18.9-7.2-43.8-12.7-70.3-12.7-92.9 0-151.5 44.5-151.5 120.3 0 26.4 6.8 52 14.6 77.1H374c-4.4 0-8 3.6-8 8v30c0 4.4 3.6 8 8 8h67.2c3.4 14.8 5.9 29.5 5.9 44.2 0 45.2-28.8 83.3-72.8 94.2-3.6.9-6.1 4.1-6.1 7.8v38.5c0 4.4 3.6 8 8 8H650c4.4 0 8-3.6 8-8v-39.8c0-4.4-3.6-8-8-8z", "fill": primaryColor } }] }; }, "name": "pound-circle", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (PoundCircleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PoundOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PoundOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PoundOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm138-209.8H469.8v-4.7c27.4-17.2 43.9-50.4 43.9-91.1 0-14.1-2.2-27.9-5.3-41H607c4.4 0 8-3.6 8-8v-30c0-4.4-3.6-8-8-8H495c-7.2-22.6-13.4-45.7-13.4-70.5 0-43.5 34-70.2 87.3-70.2 21.5 0 42.5 4.1 60.4 10.5 5.2 1.9 10.6-2 10.6-7.6v-39.5c0-3.3-2.1-6.3-5.2-7.5-18.8-7.2-43.8-12.7-70.3-12.7-92.9 0-151.5 44.5-151.5 120.3 0 26.3 6.9 52 14.6 77.1H374c-4.4 0-8 3.6-8 8v30c0 4.4 3.6 8 8 8h67.1c3.4 14.7 5.9 29.4 5.9 44.2 0 45.2-28.8 83.3-72.8 94.2-3.6.9-6.1 4.1-6.1 7.8V722c0 4.4 3.6 8 8 8H650c4.4 0 8-3.6 8-8v-39.8c0-4.4-3.6-8-8-8z" } }] }, "name": "pound", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PoundOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PoweroffOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PoweroffOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PoweroffOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z" } }] }, "name": "poweroff", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PoweroffOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PrinterFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PrinterFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PrinterFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M732 120c0-4.4-3.6-8-8-8H300c-4.4 0-8 3.6-8 8v148h440V120zm120 212H172c-44.2 0-80 35.8-80 80v328c0 17.7 14.3 32 32 32h168v132c0 4.4 3.6 8 8 8h424c4.4 0 8-3.6 8-8V772h168c17.7 0 32-14.3 32-32V412c0-44.2-35.8-80-80-80zM664 844H360V568h304v276zm164-360c0 4.4-3.6 8-8 8h-40c-4.4 0-8-3.6-8-8v-40c0-4.4 3.6-8 8-8h40c4.4 0 8 3.6 8 8v40z" } }] }, "name": "printer", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (PrinterFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PrinterOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PrinterOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PrinterOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M820 436h-40c-4.4 0-8 3.6-8 8v40c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-40c0-4.4-3.6-8-8-8zm32-104H732V120c0-4.4-3.6-8-8-8H300c-4.4 0-8 3.6-8 8v212H172c-44.2 0-80 35.8-80 80v328c0 17.7 14.3 32 32 32h168v132c0 4.4 3.6 8 8 8h424c4.4 0 8-3.6 8-8V772h168c17.7 0 32-14.3 32-32V412c0-44.2-35.8-80-80-80zM360 180h304v152H360V180zm304 664H360V568h304v276zm200-140H732V500H292v204H160V412c0-6.6 5.4-12 12-12h680c6.6 0 12 5.4 12 12v292z" } }] }, "name": "printer", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PrinterOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PrinterTwoTone.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PrinterTwoTone.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PrinterTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M360 180h304v152H360zm492 220H172c-6.6 0-12 5.4-12 12v292h132V500h440v204h132V412c0-6.6-5.4-12-12-12zm-24 84c0 4.4-3.6 8-8 8h-40c-4.4 0-8-3.6-8-8v-40c0-4.4 3.6-8 8-8h40c4.4 0 8 3.6 8 8v40z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M852 332H732V120c0-4.4-3.6-8-8-8H300c-4.4 0-8 3.6-8 8v212H172c-44.2 0-80 35.8-80 80v328c0 17.7 14.3 32 32 32h168v132c0 4.4 3.6 8 8 8h424c4.4 0 8-3.6 8-8V772h168c17.7 0 32-14.3 32-32V412c0-44.2-35.8-80-80-80zM360 180h304v152H360V180zm304 664H360V568h304v276zm200-140H732V500H292v204H160V412c0-6.6 5.4-12 12-12h680c6.6 0 12 5.4 12 12v292z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M820 436h-40c-4.4 0-8 3.6-8 8v40c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-40c0-4.4-3.6-8-8-8z", "fill": primaryColor } }] }; }, "name": "printer", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (PrinterTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ProfileFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ProfileFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ProfileFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM380 696c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm0-144c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm0-144c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm304 272c0 4.4-3.6 8-8 8H492c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h184c4.4 0 8 3.6 8 8v48zm0-144c0 4.4-3.6 8-8 8H492c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h184c4.4 0 8 3.6 8 8v48zm0-144c0 4.4-3.6 8-8 8H492c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h184c4.4 0 8 3.6 8 8v48z" } }] }, "name": "profile", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (ProfileFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ProfileOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ProfileOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ProfileOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656zM492 400h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0 144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0 144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zM340 368a40 40 0 1080 0 40 40 0 10-80 0zm0 144a40 40 0 1080 0 40 40 0 10-80 0zm0 144a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, "name": "profile", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ProfileOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ProfileTwoTone.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ProfileTwoTone.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ProfileTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M184 840h656V184H184v656zm300-496c0-4.4 3.6-8 8-8h184c4.4 0 8 3.6 8 8v48c0 4.4-3.6 8-8 8H492c-4.4 0-8-3.6-8-8v-48zm0 144c0-4.4 3.6-8 8-8h184c4.4 0 8 3.6 8 8v48c0 4.4-3.6 8-8 8H492c-4.4 0-8-3.6-8-8v-48zm0 144c0-4.4 3.6-8 8-8h184c4.4 0 8 3.6 8 8v48c0 4.4-3.6 8-8 8H492c-4.4 0-8-3.6-8-8v-48zM380 328c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40zm0 144c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40zm0 144c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M340 656a40 40 0 1080 0 40 40 0 10-80 0zm0-144a40 40 0 1080 0 40 40 0 10-80 0zm0-144a40 40 0 1080 0 40 40 0 10-80 0zm152 320h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0-144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0-144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z", "fill": primaryColor } }] }; }, "name": "profile", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (ProfileTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ProjectFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ProjectFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ProjectFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM368 744c0 4.4-3.6 8-8 8h-80c-4.4 0-8-3.6-8-8V280c0-4.4 3.6-8 8-8h80c4.4 0 8 3.6 8 8v464zm192-280c0 4.4-3.6 8-8 8h-80c-4.4 0-8-3.6-8-8V280c0-4.4 3.6-8 8-8h80c4.4 0 8 3.6 8 8v184zm192 72c0 4.4-3.6 8-8 8h-80c-4.4 0-8-3.6-8-8V280c0-4.4 3.6-8 8-8h80c4.4 0 8 3.6 8 8v256z" } }] }, "name": "project", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (ProjectFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ProjectOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ProjectOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ProjectOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M280 752h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8zm192-280h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v184c0 4.4 3.6 8 8 8zm192 72h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v256c0 4.4 3.6 8 8 8zm216-432H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, "name": "project", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ProjectOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ProjectTwoTone.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ProjectTwoTone.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ProjectTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M184 840h656V184H184v656zm472-560c0-4.4 3.6-8 8-8h80c4.4 0 8 3.6 8 8v256c0 4.4-3.6 8-8 8h-80c-4.4 0-8-3.6-8-8V280zm-192 0c0-4.4 3.6-8 8-8h80c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-80c-4.4 0-8-3.6-8-8V280zm-192 0c0-4.4 3.6-8 8-8h80c4.4 0 8 3.6 8 8v464c0 4.4-3.6 8-8 8h-80c-4.4 0-8-3.6-8-8V280z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M280 752h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8zm192-280h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v184c0 4.4 3.6 8 8 8zm192 72h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v256c0 4.4 3.6 8 8 8z", "fill": primaryColor } }] }; }, "name": "project", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (ProjectTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PropertySafetyFilled.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PropertySafetyFilled.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PropertySafetyFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM648.3 332.8l-87.7 161.1h45.7c5.5 0 10 4.5 10 10v21.3c0 5.5-4.5 10-10 10h-63.4v29.7h63.4c5.5 0 10 4.5 10 10v21.3c0 5.5-4.5 10-10 10h-63.4V658c0 5.5-4.5 10-10 10h-41.3c-5.5 0-10-4.5-10-10v-51.8h-63.1c-5.5 0-10-4.5-10-10v-21.3c0-5.5 4.5-10 10-10h63.1v-29.7h-63.1c-5.5 0-10-4.5-10-10v-21.3c0-5.5 4.5-10 10-10h45.2l-88-161.1c-2.6-4.8-.9-10.9 4-13.6 1.5-.8 3.1-1.2 4.8-1.2h46c3.8 0 7.2 2.1 8.9 5.5l72.9 144.3 73.2-144.3a10 10 0 018.9-5.5h45c5.5 0 10 4.5 10 10 .1 1.7-.3 3.3-1.1 4.8z" } }] }, "name": "property-safety", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (PropertySafetyFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PropertySafetyOutlined.js": /*!*****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PropertySafetyOutlined.js ***! \*****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PropertySafetyOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zM430.5 318h-46c-1.7 0-3.3.4-4.8 1.2a10.1 10.1 0 00-4 13.6l88 161.1h-45.2c-5.5 0-10 4.5-10 10v21.3c0 5.5 4.5 10 10 10h63.1v29.7h-63.1c-5.5 0-10 4.5-10 10v21.3c0 5.5 4.5 10 10 10h63.1V658c0 5.5 4.5 10 10 10h41.3c5.5 0 10-4.5 10-10v-51.8h63.4c5.5 0 10-4.5 10-10v-21.3c0-5.5-4.5-10-10-10h-63.4v-29.7h63.4c5.5 0 10-4.5 10-10v-21.3c0-5.5-4.5-10-10-10h-45.7l87.7-161.1a10.05 10.05 0 00-8.8-14.8h-45c-3.8 0-7.2 2.1-8.9 5.5l-73.2 144.3-72.9-144.3c-1.7-3.4-5.2-5.5-9-5.5z" } }] }, "name": "property-safety", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PropertySafetyOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PropertySafetyTwoTone.js": /*!****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PropertySafetyTwoTone.js ***! \****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PropertySafetyTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M214 226.7v427.6l298 232.2 298-232.2V226.7L512 125.1 214 226.7zM593.9 318h45c5.5 0 10 4.5 10 10 .1 1.7-.3 3.3-1.1 4.8l-87.7 161.1h45.7c5.5 0 10 4.5 10 10v21.3c0 5.5-4.5 10-10 10h-63.4v29.7h63.4c5.5 0 10 4.5 10 10v21.3c0 5.5-4.5 10-10 10h-63.4V658c0 5.5-4.5 10-10 10h-41.3c-5.5 0-10-4.5-10-10v-51.8H418c-5.5 0-10-4.5-10-10v-21.3c0-5.5 4.5-10 10-10h63.1v-29.7H418c-5.5 0-10-4.5-10-10v-21.3c0-5.5 4.5-10 10-10h45.2l-88-161.1c-2.6-4.8-.9-10.9 4-13.6 1.5-.8 3.1-1.2 4.8-1.2h46c3.8 0 7.2 2.1 8.9 5.5l72.9 144.3L585 323.5a10 10 0 018.9-5.5z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M438.9 323.5a9.88 9.88 0 00-8.9-5.5h-46c-1.7 0-3.3.4-4.8 1.2-4.9 2.7-6.6 8.8-4 13.6l88 161.1H418c-5.5 0-10 4.5-10 10v21.3c0 5.5 4.5 10 10 10h63.1v29.7H418c-5.5 0-10 4.5-10 10v21.3c0 5.5 4.5 10 10 10h63.1V658c0 5.5 4.5 10 10 10h41.3c5.5 0 10-4.5 10-10v-51.8h63.4c5.5 0 10-4.5 10-10v-21.3c0-5.5-4.5-10-10-10h-63.4v-29.7h63.4c5.5 0 10-4.5 10-10v-21.3c0-5.5-4.5-10-10-10h-45.7l87.7-161.1c.8-1.5 1.2-3.1 1.1-4.8 0-5.5-4.5-10-10-10h-45a10 10 0 00-8.9 5.5l-73.2 144.3-72.9-144.3z", "fill": primaryColor } }] }; }, "name": "property-safety", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (PropertySafetyTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PullRequestOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PullRequestOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PullRequestOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M788 705.9V192c0-8.8-7.2-16-16-16H602v-68.8c0-6-7-9.4-11.7-5.7L462.7 202.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V240h114v465.9c-44.2 15-76 56.9-76 106.1 0 61.8 50.2 112 112 112s112-50.2 112-112c.1-49.2-31.7-91-75.9-106.1zM752 860a48.01 48.01 0 010-96 48.01 48.01 0 010 96zM384 212c0-61.8-50.2-112-112-112s-112 50.2-112 112c0 49.2 31.8 91 76 106.1V706c-44.2 15-76 56.9-76 106.1 0 61.8 50.2 112 112 112s112-50.2 112-112c0-49.2-31.8-91-76-106.1V318.1c44.2-15.1 76-56.9 76-106.1zm-160 0a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm96 600a48.01 48.01 0 01-96 0 48.01 48.01 0 0196 0z" } }] }, "name": "pull-request", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PullRequestOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PushpinFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PushpinFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PushpinFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3-15.4 12.3-16.6 35.4-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8z" } }] }, "name": "pushpin", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (PushpinFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PushpinOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PushpinOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PushpinOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z" } }] }, "name": "pushpin", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (PushpinOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/PushpinTwoTone.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/PushpinTwoTone.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var PushpinTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M474.8 357.7l-24.5 24.5-34.4-3.8c-9.6-1.1-19.3-1.6-28.9-1.6-29 0-57.5 4.7-84.7 14.1-14 4.8-27.4 10.8-40.3 17.9l353.1 353.3a259.92 259.92 0 0030.4-153.9l-3.8-34.4 24.5-24.5L800 415.5 608.5 224 474.8 357.7z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z", "fill": primaryColor } }] }; }, "name": "pushpin", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (PushpinTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/QqCircleFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/QqCircleFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var QqCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm210.5 612.4c-11.5 1.4-44.9-52.7-44.9-52.7 0 31.3-16.2 72.2-51.1 101.8 16.9 5.2 54.9 19.2 45.9 34.4-7.3 12.3-125.6 7.9-159.8 4-34.2 3.8-152.5 8.3-159.8-4-9.1-15.2 28.9-29.2 45.8-34.4-35-29.5-51.1-70.4-51.1-101.8 0 0-33.4 54.1-44.9 52.7-5.4-.7-12.4-29.6 9.4-99.7 10.3-33 22-60.5 40.2-105.8-3.1-116.9 45.3-215 160.4-215 113.9 0 163.3 96.1 160.4 215 18.1 45.2 29.9 72.8 40.2 105.8 21.7 70.1 14.6 99.1 9.3 99.7z" } }] }, "name": "qq-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (QqCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/QqOutlined.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/QqOutlined.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var QqOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M824.8 613.2c-16-51.4-34.4-94.6-62.7-165.3C766.5 262.2 689.3 112 511.5 112 331.7 112 256.2 265.2 261 447.9c-28.4 70.8-46.7 113.7-62.7 165.3-34 109.5-23 154.8-14.6 155.8 18 2.2 70.1-82.4 70.1-82.4 0 49 25.2 112.9 79.8 159-26.4 8.1-85.7 29.9-71.6 53.8 11.4 19.3 196.2 12.3 249.5 6.3 53.3 6 238.1 13 249.5-6.3 14.1-23.8-45.3-45.7-71.6-53.8 54.6-46.2 79.8-110.1 79.8-159 0 0 52.1 84.6 70.1 82.4 8.5-1.1 19.5-46.4-14.5-155.8z" } }] }, "name": "qq", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (QqOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/QqSquareFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/QqSquareFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var QqSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM722.5 676.4c-11.5 1.4-44.9-52.7-44.9-52.7 0 31.3-16.2 72.2-51.1 101.8 16.9 5.2 54.9 19.2 45.9 34.4-7.3 12.3-125.6 7.9-159.8 4-34.2 3.8-152.5 8.3-159.8-4-9.1-15.2 28.9-29.2 45.8-34.4-35-29.5-51.1-70.4-51.1-101.8 0 0-33.4 54.1-44.9 52.7-5.4-.7-12.4-29.6 9.4-99.7 10.3-33 22-60.5 40.2-105.8-3.1-116.9 45.3-215 160.4-215 113.9 0 163.3 96.1 160.4 215 18.1 45.2 29.9 72.8 40.2 105.8 21.7 70.1 14.6 99.1 9.3 99.7z" } }] }, "name": "qq-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (QqSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/QrcodeOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/QrcodeOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var QrcodeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M468 128H160c-17.7 0-32 14.3-32 32v308c0 4.4 3.6 8 8 8h332c4.4 0 8-3.6 8-8V136c0-4.4-3.6-8-8-8zm-56 284H192V192h220v220zm-138-74h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm194 210H136c-4.4 0-8 3.6-8 8v308c0 17.7 14.3 32 32 32h308c4.4 0 8-3.6 8-8V556c0-4.4-3.6-8-8-8zm-56 284H192V612h220v220zm-138-74h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm590-630H556c-4.4 0-8 3.6-8 8v332c0 4.4 3.6 8 8 8h332c4.4 0 8-3.6 8-8V160c0-17.7-14.3-32-32-32zm-32 284H612V192h220v220zm-138-74h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm194 210h-48c-4.4 0-8 3.6-8 8v134h-78V556c0-4.4-3.6-8-8-8H556c-4.4 0-8 3.6-8 8v332c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V644h78v102c0 4.4 3.6 8 8 8h190c4.4 0 8-3.6 8-8V556c0-4.4-3.6-8-8-8zM746 832h-48c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm142 0h-48c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" } }] }, "name": "qrcode", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (QrcodeOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/QuestionCircleFilled.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/QuestionCircleFilled.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var QuestionCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 00-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z" } }] }, "name": "question-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (QuestionCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/QuestionCircleOutlined.js": /*!*****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/QuestionCircleOutlined.js ***! \*****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var QuestionCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, "name": "question-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (QuestionCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/QuestionCircleTwoTone.js": /*!****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/QuestionCircleTwoTone.js ***! \****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var QuestionCircleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm0 632c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 00-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M472 732a40 40 0 1080 0 40 40 0 10-80 0zm151.6-415.3C593.6 290.5 554 276 512 276s-81.6 14.4-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.2 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5 0-39.3-17.2-76-48.4-103.3z", "fill": primaryColor } }] }; }, "name": "question-circle", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (QuestionCircleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/QuestionOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/QuestionOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var QuestionOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M764 280.9c-14-30.6-33.9-58.1-59.3-81.6C653.1 151.4 584.6 125 512 125s-141.1 26.4-192.7 74.2c-25.4 23.6-45.3 51-59.3 81.7-14.6 32-22 65.9-22 100.9v27c0 6.2 5 11.2 11.2 11.2h54c6.2 0 11.2-5 11.2-11.2v-27c0-99.5 88.6-180.4 197.6-180.4s197.6 80.9 197.6 180.4c0 40.8-14.5 79.2-42 111.2-27.2 31.7-65.6 54.4-108.1 64-24.3 5.5-46.2 19.2-61.7 38.8a110.85 110.85 0 00-23.9 68.6v31.4c0 6.2 5 11.2 11.2 11.2h54c6.2 0 11.2-5 11.2-11.2v-31.4c0-15.7 10.9-29.5 26-32.9 58.4-13.2 111.4-44.7 149.3-88.7 19.1-22.3 34-47.1 44.3-74 10.7-27.9 16.1-57.2 16.1-87 0-35-7.4-69-22-100.9zM512 787c-30.9 0-56 25.1-56 56s25.1 56 56 56 56-25.1 56-56-25.1-56-56-56z" } }] }, "name": "question", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (QuestionOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RadarChartOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RadarChartOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RadarChartOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M926.8 397.1l-396-288a31.81 31.81 0 00-37.6 0l-396 288a31.99 31.99 0 00-11.6 35.8l151.3 466a32 32 0 0030.4 22.1h489.5c13.9 0 26.1-8.9 30.4-22.1l151.3-466c4.2-13.2-.5-27.6-11.7-35.8zM838.6 417l-98.5 32-200-144.7V199.9L838.6 417zM466 567.2l-89.1 122.3-55.2-169.2L466 567.2zm-116.3-96.8L484 373.3v140.8l-134.3-43.7zM512 599.2l93.9 128.9H418.1L512 599.2zm28.1-225.9l134.2 97.1L540.1 514V373.3zM558 567.2l144.3-46.9-55.2 169.2L558 567.2zm-74-367.3v104.4L283.9 449l-98.5-32L484 199.9zM169.3 470.8l86.5 28.1 80.4 246.4-53.8 73.9-113.1-348.4zM327.1 853l50.3-69h269.3l50.3 69H327.1zm414.5-33.8l-53.8-73.9 80.4-246.4 86.5-28.1-113.1 348.4z" } }] }, "name": "radar-chart", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (RadarChartOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RadiusBottomleftOutlined.js": /*!*******************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RadiusBottomleftOutlined.js ***! \*******************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RadiusBottomleftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M712 824h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm2-696h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM136 374h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0-174h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm752 624h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-348 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-230 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm230 624H358c-87.3 0-158-70.7-158-158V484c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v182c0 127 103 230 230 230h182c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, "name": "radius-bottomleft", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (RadiusBottomleftOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RadiusBottomrightOutlined.js": /*!********************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RadiusBottomrightOutlined.js ***! \********************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RadiusBottomrightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M368 824h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-58-624h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm578 102h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM192 824h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm292 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm174 0h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm230 276h-56c-4.4 0-8 3.6-8 8v182c0 87.3-70.7 158-158 158H484c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h182c127 0 230-103 230-230V484c0-4.4-3.6-8-8-8z" } }] }, "name": "radius-bottomright", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (RadiusBottomrightOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RadiusSettingOutlined.js": /*!****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RadiusSettingOutlined.js ***! \****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RadiusSettingOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M396 140h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-44 684h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm524-204h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM192 344h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 160h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 160h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 160h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm320 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm160 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm140-284c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V370c0-127-103-230-230-230H484c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h170c87.3 0 158 70.7 158 158v170zM236 96H92c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8h144c4.4 0 8-3.6 8-8V104c0-4.4-3.6-8-8-8zm-48 101.6c0 1.3-1.1 2.4-2.4 2.4h-43.2c-1.3 0-2.4-1.1-2.4-2.4v-43.2c0-1.3 1.1-2.4 2.4-2.4h43.2c1.3 0 2.4 1.1 2.4 2.4v43.2zM920 780H776c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8h144c4.4 0 8-3.6 8-8V788c0-4.4-3.6-8-8-8zm-48 101.6c0 1.3-1.1 2.4-2.4 2.4h-43.2c-1.3 0-2.4-1.1-2.4-2.4v-43.2c0-1.3 1.1-2.4 2.4-2.4h43.2c1.3 0 2.4 1.1 2.4 2.4v43.2z" } }] }, "name": "radius-setting", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (RadiusSettingOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RadiusUpleftOutlined.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RadiusUpleftOutlined.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RadiusUpleftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M656 200h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm58 624h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM192 650h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm696-696h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-348 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-174 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm174-696H358c-127 0-230 103-230 230v182c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V358c0-87.3 70.7-158 158-158h182c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, "name": "radius-upleft", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (RadiusUpleftOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RadiusUprightOutlined.js": /*!****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RadiusUprightOutlined.js ***! \****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RadiusUprightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M368 128h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-2 696h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm522-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM192 128h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm348 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm174 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-48-696H484c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h182c87.3 0 158 70.7 158 158v182c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V358c0-127-103-230-230-230z" } }] }, "name": "radius-upright", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (RadiusUprightOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ReadFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ReadFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ReadFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 161H699.2c-49.1 0-97.1 14.1-138.4 40.7L512 233l-48.8-31.3A255.2 255.2 0 00324.8 161H96c-17.7 0-32 14.3-32 32v568c0 17.7 14.3 32 32 32h228.8c49.1 0 97.1 14.1 138.4 40.7l44.4 28.6c1.3.8 2.8 1.3 4.3 1.3s3-.4 4.3-1.3l44.4-28.6C602 807.1 650.1 793 699.2 793H928c17.7 0 32-14.3 32-32V193c0-17.7-14.3-32-32-32zM404 553.5c0 4.1-3.2 7.5-7.1 7.5H211.1c-3.9 0-7.1-3.4-7.1-7.5v-45c0-4.1 3.2-7.5 7.1-7.5h185.7c3.9 0 7.1 3.4 7.1 7.5v45zm0-140c0 4.1-3.2 7.5-7.1 7.5H211.1c-3.9 0-7.1-3.4-7.1-7.5v-45c0-4.1 3.2-7.5 7.1-7.5h185.7c3.9 0 7.1 3.4 7.1 7.5v45zm416 140c0 4.1-3.2 7.5-7.1 7.5H627.1c-3.9 0-7.1-3.4-7.1-7.5v-45c0-4.1 3.2-7.5 7.1-7.5h185.7c3.9 0 7.1 3.4 7.1 7.5v45zm0-140c0 4.1-3.2 7.5-7.1 7.5H627.1c-3.9 0-7.1-3.4-7.1-7.5v-45c0-4.1 3.2-7.5 7.1-7.5h185.7c3.9 0 7.1 3.4 7.1 7.5v45z" } }] }, "name": "read", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (ReadFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ReadOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ReadOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ReadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 161H699.2c-49.1 0-97.1 14.1-138.4 40.7L512 233l-48.8-31.3A255.2 255.2 0 00324.8 161H96c-17.7 0-32 14.3-32 32v568c0 17.7 14.3 32 32 32h228.8c49.1 0 97.1 14.1 138.4 40.7l44.4 28.6c1.3.8 2.8 1.3 4.3 1.3s3-.4 4.3-1.3l44.4-28.6C602 807.1 650.1 793 699.2 793H928c17.7 0 32-14.3 32-32V193c0-17.7-14.3-32-32-32zM324.8 721H136V233h188.8c35.4 0 69.8 10.1 99.5 29.2l48.8 31.3 6.9 4.5v462c-47.6-25.6-100.8-39-155.2-39zm563.2 0H699.2c-54.4 0-107.6 13.4-155.2 39V298l6.9-4.5 48.8-31.3c29.7-19.1 64.1-29.2 99.5-29.2H888v488zM396.9 361H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm223.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c0-4.1-3.2-7.5-7.1-7.5H627.1c-3.9 0-7.1 3.4-7.1 7.5zM396.9 501H211.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5zm416 0H627.1c-3.9 0-7.1 3.4-7.1 7.5v45c0 4.1 3.2 7.5 7.1 7.5h185.7c3.9 0 7.1-3.4 7.1-7.5v-45c.1-4.1-3.1-7.5-7-7.5z" } }] }, "name": "read", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ReadOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ReconciliationFilled.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ReconciliationFilled.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ReconciliationFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M676 623c-18.8 0-34 15.2-34 34s15.2 34 34 34 34-15.2 34-34-15.2-34-34-34zm204-455H668c0-30.9-25.1-56-56-56h-80c-30.9 0-56 25.1-56 56H264c-17.7 0-32 14.3-32 32v200h-88c-17.7 0-32 14.3-32 32v448c0 17.7 14.3 32 32 32h336c17.7 0 32-14.3 32-32v-16h368c17.7 0 32-14.3 32-32V200c0-17.7-14.3-32-32-32zM448 848H176V616h272v232zm0-296H176v-88h272v88zm20-272v-48h72v-56h64v56h72v48H468zm180 168v56c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-56c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8zm28 301c-50.8 0-92-41.2-92-92s41.2-92 92-92 92 41.2 92 92-41.2 92-92 92zm92-245c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-96c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v96zm-92 61c-50.8 0-92 41.2-92 92s41.2 92 92 92 92-41.2 92-92-41.2-92-92-92zm0 126c-18.8 0-34-15.2-34-34s15.2-34 34-34 34 15.2 34 34-15.2 34-34 34z" } }] }, "name": "reconciliation", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (ReconciliationFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ReconciliationOutlined.js": /*!*****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ReconciliationOutlined.js ***! \*****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ReconciliationOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M676 565c-50.8 0-92 41.2-92 92s41.2 92 92 92 92-41.2 92-92-41.2-92-92-92zm0 126c-18.8 0-34-15.2-34-34s15.2-34 34-34 34 15.2 34 34-15.2 34-34 34zm204-523H668c0-30.9-25.1-56-56-56h-80c-30.9 0-56 25.1-56 56H264c-17.7 0-32 14.3-32 32v200h-88c-17.7 0-32 14.3-32 32v448c0 17.7 14.3 32 32 32h336c17.7 0 32-14.3 32-32v-16h368c17.7 0 32-14.3 32-32V200c0-17.7-14.3-32-32-32zm-412 64h72v-56h64v56h72v48H468v-48zm-20 616H176V616h272v232zm0-296H176v-88h272v88zm392 240H512V432c0-17.7-14.3-32-32-32H304V240h100v104h336V240h100v552zM704 408v96c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-96c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zM592 512h48c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8z" } }] }, "name": "reconciliation", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ReconciliationOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ReconciliationTwoTone.js": /*!****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ReconciliationTwoTone.js ***! \****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ReconciliationTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M740 344H404V240H304v160h176c17.7 0 32 14.3 32 32v360h328V240H740v104zM584 448c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-56zm92 301c-50.8 0-92-41.2-92-92s41.2-92 92-92 92 41.2 92 92-41.2 92-92 92zm92-341v96c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-96c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M642 657a34 34 0 1068 0 34 34 0 10-68 0z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M592 512h48c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm112-104v96c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-96c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M880 168H668c0-30.9-25.1-56-56-56h-80c-30.9 0-56 25.1-56 56H264c-17.7 0-32 14.3-32 32v200h-88c-17.7 0-32 14.3-32 32v448c0 17.7 14.3 32 32 32h336c17.7 0 32-14.3 32-32v-16h368c17.7 0 32-14.3 32-32V200c0-17.7-14.3-32-32-32zm-412 64h72v-56h64v56h72v48H468v-48zm-20 616H176V616h272v232zm0-296H176v-88h272v88zm392 240H512V432c0-17.7-14.3-32-32-32H304V240h100v104h336V240h100v552z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M676 565c-50.8 0-92 41.2-92 92s41.2 92 92 92 92-41.2 92-92-41.2-92-92-92zm0 126c-18.8 0-34-15.2-34-34s15.2-34 34-34 34 15.2 34 34-15.2 34-34 34z", "fill": primaryColor } }] }; }, "name": "reconciliation", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (ReconciliationTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RedEnvelopeFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RedEnvelopeFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RedEnvelopeFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zM647 470.4l-87.2 161h45.9c4.6 0 8.4 3.8 8.4 8.4v25.1c0 4.6-3.8 8.4-8.4 8.4h-63.3v28.6h63.3c4.6 0 8.4 3.8 8.4 8.4v25c.2 4.6-3.6 8.5-8.2 8.5h-63.3v49.9c0 4.6-3.8 8.4-8.4 8.4h-43.7c-4.6 0-8.4-3.8-8.4-8.4v-49.9h-63c-4.6 0-8.4-3.8-8.4-8.4v-25.1c0-4.6 3.8-8.4 8.4-8.4h63v-28.6h-63c-4.6 0-8.4-3.8-8.4-8.4v-25.1c0-4.6 3.8-8.4 8.4-8.4h45.4l-87.5-161c-2.2-4.1-.7-9.1 3.4-11.4 1.3-.6 2.6-1 3.9-1h48.8c3.2 0 6.1 1.8 7.5 4.6l71.9 141.8 71.9-141.9a8.5 8.5 0 017.5-4.6h47.8c4.6 0 8.4 3.8 8.4 8.4-.1 1.5-.5 2.9-1.1 4.1zM512.6 323L289 148h446L512.6 323z" } }] }, "name": "red-envelope", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (RedEnvelopeFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RedEnvelopeOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RedEnvelopeOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RedEnvelopeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M440.6 462.6a8.38 8.38 0 00-7.5-4.6h-48.8c-1.3 0-2.6.4-3.9 1a8.4 8.4 0 00-3.4 11.4l87.4 161.1H419c-4.6 0-8.4 3.8-8.4 8.4V665c0 4.6 3.8 8.4 8.4 8.4h63V702h-63c-4.6 0-8.4 3.8-8.4 8.4v25.1c0 4.6 3.8 8.4 8.4 8.4h63v49.9c0 4.6 3.8 8.4 8.4 8.4h43.7c4.6 0 8.4-3.8 8.4-8.4v-49.9h63.3c4.7 0 8.4-3.8 8.2-8.5v-25c0-4.6-3.8-8.4-8.4-8.4h-63.3v-28.6h63.3c4.6 0 8.4-3.8 8.4-8.4v-25.1c0-4.6-3.8-8.4-8.4-8.4h-45.9l87.2-161a8.45 8.45 0 00-7.4-12.4h-47.8c-3.1 0-6 1.8-7.5 4.6l-71.9 141.9-71.7-142zM832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-40 824H232V193.1l260.3 204.1c11.6 9.1 27.9 9.1 39.5 0L792 193.1V888zm0-751.3h-31.7L512 331.3 263.7 136.7H232v-.7h560v.7z" } }] }, "name": "red-envelope", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (RedEnvelopeOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RedEnvelopeTwoTone.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RedEnvelopeTwoTone.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RedEnvelopeTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-40 824H232V193.1l260.3 204.1c11.6 9.1 27.9 9.1 39.5 0L792 193.1V888zm0-751.3h-31.7L512 331.3 263.7 136.7H232v-.7h560v.7z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M492.3 397.2L232 193.1V888h560V193.1L531.8 397.2a31.99 31.99 0 01-39.5 0zm99.4 60.9h47.8a8.45 8.45 0 017.4 12.4l-87.2 161h45.9c4.6 0 8.4 3.8 8.4 8.4V665c0 4.6-3.8 8.4-8.4 8.4h-63.3V702h63.3c4.6 0 8.4 3.8 8.4 8.4v25c.2 4.7-3.5 8.5-8.2 8.5h-63.3v49.9c0 4.6-3.8 8.4-8.4 8.4h-43.7c-4.6 0-8.4-3.8-8.4-8.4v-49.9h-63c-4.6 0-8.4-3.8-8.4-8.4v-25.1c0-4.6 3.8-8.4 8.4-8.4h63v-28.6h-63c-4.6 0-8.4-3.8-8.4-8.4v-25.1c0-4.6 3.8-8.4 8.4-8.4h45.4L377 470.4a8.4 8.4 0 013.4-11.4c1.3-.6 2.6-1 3.9-1h48.8c3.2 0 6.1 1.8 7.5 4.6l71.7 142 71.9-141.9a8.6 8.6 0 017.5-4.6z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M232 136.7h31.7L512 331.3l248.3-194.6H792v-.7H232z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M440.6 462.6a8.38 8.38 0 00-7.5-4.6h-48.8c-1.3 0-2.6.4-3.9 1a8.4 8.4 0 00-3.4 11.4l87.4 161.1H419c-4.6 0-8.4 3.8-8.4 8.4V665c0 4.6 3.8 8.4 8.4 8.4h63V702h-63c-4.6 0-8.4 3.8-8.4 8.4v25.1c0 4.6 3.8 8.4 8.4 8.4h63v49.9c0 4.6 3.8 8.4 8.4 8.4h43.7c4.6 0 8.4-3.8 8.4-8.4v-49.9h63.3c4.7 0 8.4-3.8 8.2-8.5v-25c0-4.6-3.8-8.4-8.4-8.4h-63.3v-28.6h63.3c4.6 0 8.4-3.8 8.4-8.4v-25.1c0-4.6-3.8-8.4-8.4-8.4h-45.9l87.2-161a8.45 8.45 0 00-7.4-12.4h-47.8c-3.1 0-6 1.8-7.5 4.6l-71.9 141.9-71.7-142z", "fill": primaryColor } }] }; }, "name": "red-envelope", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (RedEnvelopeTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RedditCircleFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RedditCircleFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RedditCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M584 548a36 36 0 1072 0 36 36 0 10-72 0zm144-108a35.9 35.9 0 00-32.5 20.6c18.8 14.3 34.4 30.7 45.9 48.8A35.98 35.98 0 00728 440zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm245 477.9c4.6 13.5 7 27.6 7 42.1 0 99.4-112.8 180-252 180s-252-80.6-252-180c0-14.5 2.4-28.6 7-42.1A72.01 72.01 0 01296 404c27.1 0 50.6 14.9 62.9 37 36.2-19.8 80.2-32.8 128.1-36.1l58.4-131.1c4.3-9.8 15.2-14.8 25.5-11.8l91.6 26.5a54.03 54.03 0 01101.6 25.6c0 29.8-24.2 54-54 54-23.5 0-43.5-15.1-50.9-36.1L577 308.3l-43 96.5c49.1 3 94.2 16.1 131.2 36.3 12.3-22.1 35.8-37 62.9-37 39.8 0 72 32.2 72 72-.1 29.3-17.8 54.6-43.1 65.8zm-171.3 83c-14.9 11.7-44.3 24.3-73.7 24.3s-58.9-12.6-73.7-24.3c-9.3-7.3-22.7-5.7-30 3.6-7.3 9.3-5.7 22.7 3.6 30 25.7 20.4 65 33.5 100.1 33.5 35.1 0 74.4-13.1 100.2-33.5 9.3-7.3 10.9-20.8 3.6-30a21.46 21.46 0 00-30.1-3.6zM296 440a35.98 35.98 0 00-13.4 69.4c11.5-18.1 27.1-34.5 45.9-48.8A35.9 35.9 0 00296 440zm72 108a36 36 0 1072 0 36 36 0 10-72 0z" } }] }, "name": "reddit-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (RedditCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RedditOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RedditOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RedditOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M288 568a56 56 0 10112 0 56 56 0 10-112 0zm338.7 119.7c-23.1 18.2-68.9 37.8-114.7 37.8s-91.6-19.6-114.7-37.8c-14.4-11.3-35.3-8.9-46.7 5.5s-8.9 35.3 5.5 46.7C396.3 771.6 457.5 792 512 792s115.7-20.4 155.9-52.1a33.25 33.25 0 10-41.2-52.2zM960 456c0-61.9-50.1-112-112-112-42.1 0-78.7 23.2-97.9 57.6-57.6-31.5-127.7-51.8-204.1-56.5L612.9 195l127.9 36.9c11.5 32.6 42.6 56.1 79.2 56.1 46.4 0 84-37.6 84-84s-37.6-84-84-84c-32 0-59.8 17.9-74 44.2L603.5 123a33.2 33.2 0 00-39.6 18.4l-90.8 203.9c-74.5 5.2-142.9 25.4-199.2 56.2A111.94 111.94 0 00176 344c-61.9 0-112 50.1-112 112 0 45.8 27.5 85.1 66.8 102.5-7.1 21-10.8 43-10.8 65.5 0 154.6 175.5 280 392 280s392-125.4 392-280c0-22.6-3.8-44.5-10.8-65.5C932.5 541.1 960 501.8 960 456zM820 172.5a31.5 31.5 0 110 63 31.5 31.5 0 010-63zM120 456c0-30.9 25.1-56 56-56a56 56 0 0150.6 32.1c-29.3 22.2-53.5 47.8-71.5 75.9a56.23 56.23 0 01-35.1-52zm392 381.5c-179.8 0-325.5-95.6-325.5-213.5S332.2 410.5 512 410.5 837.5 506.1 837.5 624 691.8 837.5 512 837.5zM868.8 508c-17.9-28.1-42.2-53.7-71.5-75.9 9-18.9 28.3-32.1 50.6-32.1 30.9 0 56 25.1 56 56 .1 23.5-14.5 43.7-35.1 52zM624 568a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, "name": "reddit", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (RedditOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RedditSquareFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RedditSquareFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RedditSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M296 440a35.98 35.98 0 00-13.4 69.4c11.5-18.1 27.1-34.5 45.9-48.8A35.9 35.9 0 00296 440zm289.7 184.9c-14.9 11.7-44.3 24.3-73.7 24.3s-58.9-12.6-73.7-24.3c-9.3-7.3-22.7-5.7-30 3.6-7.3 9.3-5.7 22.7 3.6 30 25.7 20.4 65 33.5 100.1 33.5 35.1 0 74.4-13.1 100.2-33.5 9.3-7.3 10.9-20.8 3.6-30a21.46 21.46 0 00-30.1-3.6zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM757 541.9c4.6 13.5 7 27.6 7 42.1 0 99.4-112.8 180-252 180s-252-80.6-252-180c0-14.5 2.4-28.6 7-42.1A72.01 72.01 0 01296 404c27.1 0 50.6 14.9 62.9 37 36.2-19.8 80.2-32.8 128.1-36.1l58.4-131.1c4.3-9.8 15.2-14.8 25.5-11.8l91.6 26.5a54.03 54.03 0 01101.6 25.6c0 29.8-24.2 54-54 54-23.5 0-43.5-15.1-50.9-36.1L577 308.3l-43 96.5c49.1 3 94.2 16.1 131.2 36.3 12.3-22.1 35.8-37 62.9-37 39.8 0 72 32.2 72 72-.1 29.3-17.8 54.6-43.1 65.8zM584 548a36 36 0 1072 0 36 36 0 10-72 0zm144-108a35.9 35.9 0 00-32.5 20.6c18.8 14.3 34.4 30.7 45.9 48.8A35.98 35.98 0 00728 440zM368 548a36 36 0 1072 0 36 36 0 10-72 0z" } }] }, "name": "reddit-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (RedditSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RedoOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RedoOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RedoOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 00-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z" } }] }, "name": "redo", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (RedoOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ReloadOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ReloadOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ReloadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z" } }] }, "name": "reload", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ReloadOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RestFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RestFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RestFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 256h-28.1l-35.7-120.9c-4-13.7-16.5-23.1-30.7-23.1h-451c-14.3 0-26.8 9.4-30.7 23.1L220.1 256H192c-17.7 0-32 14.3-32 32v28c0 4.4 3.6 8 8 8h45.8l47.7 558.7a32 32 0 0031.9 29.3h429.2a32 32 0 0031.9-29.3L802.2 324H856c4.4 0 8-3.6 8-8v-28c0-17.7-14.3-32-32-32zM508 704c-79.5 0-144-64.5-144-144s64.5-144 144-144 144 64.5 144 144-64.5 144-144 144zM291 256l22.4-76h397.2l22.4 76H291zm137 304a80 80 0 10160 0 80 80 0 10-160 0z" } }] }, "name": "rest", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (RestFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RestOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RestOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RestOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M508 704c79.5 0 144-64.5 144-144s-64.5-144-144-144-144 64.5-144 144 64.5 144 144 144zm0-224c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z" } }, { "tag": "path", "attrs": { "d": "M832 256h-28.1l-35.7-120.9c-4-13.7-16.5-23.1-30.7-23.1h-451c-14.3 0-26.8 9.4-30.7 23.1L220.1 256H192c-17.7 0-32 14.3-32 32v28c0 4.4 3.6 8 8 8h45.8l47.7 558.7a32 32 0 0031.9 29.3h429.2a32 32 0 0031.9-29.3L802.2 324H856c4.4 0 8-3.6 8-8v-28c0-17.7-14.3-32-32-32zm-518.6-76h397.2l22.4 76H291l22.4-76zm376.2 664H326.4L282 324h451.9l-44.3 520z" } }] }, "name": "rest", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (RestOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RestTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RestTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RestTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M326.4 844h363.2l44.3-520H282l44.4 520zM508 416c79.5 0 144 64.5 144 144s-64.5 144-144 144-144-64.5-144-144 64.5-144 144-144z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M508 704c79.5 0 144-64.5 144-144s-64.5-144-144-144-144 64.5-144 144 64.5 144 144 144zm0-224c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M832 256h-28.1l-35.7-120.9c-4-13.7-16.5-23.1-30.7-23.1h-451c-14.3 0-26.8 9.4-30.7 23.1L220.1 256H192c-17.7 0-32 14.3-32 32v28c0 4.4 3.6 8 8 8h45.8l47.7 558.7a32 32 0 0031.9 29.3h429.2a32 32 0 0031.9-29.3L802.2 324H856c4.4 0 8-3.6 8-8v-28c0-17.7-14.3-32-32-32zm-518.6-76h397.2l22.4 76H291l22.4-76zm376.2 664H326.4L282 324h451.9l-44.3 520z", "fill": primaryColor } }] }; }, "name": "rest", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (RestTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RetweetOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RetweetOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RetweetOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M136 552h63.6c4.4 0 8-3.6 8-8V288.7h528.6v72.6c0 1.9.6 3.7 1.8 5.2a8.3 8.3 0 0011.7 1.4L893 255.4c4.3-5 3.6-10.3 0-13.2L749.7 129.8a8.22 8.22 0 00-5.2-1.8c-4.6 0-8.4 3.8-8.4 8.4V209H199.7c-39.5 0-71.7 32.2-71.7 71.8V544c0 4.4 3.6 8 8 8zm752-80h-63.6c-4.4 0-8 3.6-8 8v255.3H287.8v-72.6c0-1.9-.6-3.7-1.8-5.2a8.3 8.3 0 00-11.7-1.4L131 768.6c-4.3 5-3.6 10.3 0 13.2l143.3 112.4c1.5 1.2 3.3 1.8 5.2 1.8 4.6 0 8.4-3.8 8.4-8.4V815h536.6c39.5 0 71.7-32.2 71.7-71.8V480c-.2-4.4-3.8-8-8.2-8z" } }] }, "name": "retweet", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (RetweetOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RightCircleFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RightCircleFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RightCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm154.7 454.5l-246 178c-5.3 3.8-12.7 0-12.7-6.5v-46.9c0-10.2 4.9-19.9 13.2-25.9L566.6 512 421.2 406.8c-8.3-6-13.2-15.6-13.2-25.9V334c0-6.5 7.4-10.3 12.7-6.5l246 178c4.4 3.2 4.4 9.8 0 13z" } }] }, "name": "right-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (RightCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RightCircleOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RightCircleOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RightCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M666.7 505.5l-246-178A8 8 0 00408 334v46.9c0 10.2 4.9 19.9 13.2 25.9L566.6 512 421.2 617.2c-8.3 6-13.2 15.6-13.2 25.9V690c0 6.5 7.4 10.3 12.7 6.5l246-178c4.4-3.2 4.4-9.8 0-13z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "right-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (RightCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RightCircleTwoTone.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RightCircleTwoTone.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RightCircleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm154.7 378.4l-246 178c-5.3 3.8-12.7 0-12.7-6.5V643c0-10.2 4.9-19.9 13.2-25.9L566.6 512 421.2 406.8c-8.3-6-13.2-15.6-13.2-25.9V334c0-6.5 7.4-10.3 12.7-6.5l246 178c4.4 3.2 4.4 9.7 0 12.9z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M666.7 505.5l-246-178c-5.3-3.8-12.7 0-12.7 6.5v46.9c0 10.3 4.9 19.9 13.2 25.9L566.6 512 421.2 617.1c-8.3 6-13.2 15.7-13.2 25.9v46.9c0 6.5 7.4 10.3 12.7 6.5l246-178c4.4-3.2 4.4-9.7 0-12.9z", "fill": primaryColor } }] }; }, "name": "right-circle", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (RightCircleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RightOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RightOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" } }] }, "name": "right", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (RightOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RightSquareFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RightSquareFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RightSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM658.7 518.5l-246 178c-5.3 3.8-12.7 0-12.7-6.5v-46.9c0-10.2 4.9-19.9 13.2-25.9L558.6 512 413.2 406.8c-8.3-6-13.2-15.6-13.2-25.9V334c0-6.5 7.4-10.3 12.7-6.5l246 178c4.4 3.2 4.4 9.8 0 13z" } }] }, "name": "right-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (RightSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RightSquareOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RightSquareOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RightSquareOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M412.7 696.5l246-178c4.4-3.2 4.4-9.7 0-12.9l-246-178c-5.3-3.8-12.7 0-12.7 6.5V381c0 10.2 4.9 19.9 13.2 25.9L558.6 512 413.2 617.2c-8.3 6-13.2 15.6-13.2 25.9V690c0 6.5 7.4 10.3 12.7 6.5z" } }, { "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, "name": "right-square", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (RightSquareOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RightSquareTwoTone.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RightSquareTwoTone.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RightSquareTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M184 840h656V184H184v656zm216-196.9c0-10.2 4.9-19.9 13.2-25.9L558.6 512 413.2 406.8c-8.3-6-13.2-15.6-13.2-25.9V334c0-6.5 7.4-10.3 12.7-6.5l246 178c4.4 3.2 4.4 9.7 0 12.9l-246 178c-5.3 3.9-12.7.1-12.7-6.4v-46.9z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M412.7 696.4l246-178c4.4-3.2 4.4-9.7 0-12.9l-246-178c-5.3-3.8-12.7 0-12.7 6.5v46.9c0 10.3 4.9 19.9 13.2 25.9L558.6 512 413.2 617.2c-8.3 6-13.2 15.7-13.2 25.9V690c0 6.5 7.4 10.3 12.7 6.4z", "fill": primaryColor } }] }; }, "name": "right-square", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (RightSquareTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RiseOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RiseOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RiseOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M917 211.1l-199.2 24c-6.6.8-9.4 8.9-4.7 13.6l59.3 59.3-226 226-101.8-101.7c-6.3-6.3-16.4-6.2-22.6 0L100.3 754.1a8.03 8.03 0 000 11.3l45 45.2c3.1 3.1 8.2 3.1 11.3 0L433.3 534 535 635.7c6.3 6.2 16.4 6.2 22.6 0L829 364.5l59.3 59.3a8.01 8.01 0 0013.6-4.7l24-199.2c.7-5.1-3.7-9.5-8.9-8.8z" } }] }, "name": "rise", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (RiseOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RobotFilled.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RobotFilled.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RobotFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zM300 328c0-33.1 26.9-60 60-60s60 26.9 60 60-26.9 60-60 60-60-26.9-60-60zm372 248c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-60c0-4.4 3.6-8 8-8h304c4.4 0 8 3.6 8 8v60zm-8-188c-33.1 0-60-26.9-60-60s26.9-60 60-60 60 26.9 60 60-26.9 60-60 60zm135 476H225c-13.8 0-25 14.3-25 32v56c0 4.4 2.8 8 6.2 8h611.5c3.4 0 6.2-3.6 6.2-8v-56c.1-17.7-11.1-32-24.9-32z" } }] }, "name": "robot", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (RobotFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RobotOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RobotOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RobotOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, "name": "robot", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (RobotOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RocketFilled.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RocketFilled.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RocketFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 00-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0043.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0043.1-30.5 97.52 97.52 0 0021.4-60.8c0-8.4-1.1-16.4-3.1-23.8L864 736zM512 352a48.01 48.01 0 010 96 48.01 48.01 0 010-96zm116.1 432.2c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5s-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 01-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5z" } }] }, "name": "rocket", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (RocketFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RocketOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RocketOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RocketOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 00-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0043.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0043.1-30.5 97.52 97.52 0 0021.4-60.8c0-8.4-1.1-16.4-3.1-23.8H864zM762.3 621.4c9.4 14.6 17 30.3 22.5 46.6H700V558.7a211.6 211.6 0 0162.3 62.7zM388 483.1V318.8l124-147 124 147V668H388V483.1zM239.2 668c5.5-16.3 13.1-32 22.5-46.6 16.3-25.2 37.5-46.5 62.3-62.7V668h-84.8zm388.9 116.2c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5-38.3 0-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 01-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5zM464 400a48 48 0 1096 0 48 48 0 10-96 0z" } }] }, "name": "rocket", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (RocketOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RocketTwoTone.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RocketTwoTone.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RocketTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M261.7 621.4c-9.4 14.6-17 30.3-22.5 46.6H324V558.7c-24.8 16.2-46 37.5-62.3 62.7zM700 558.7V668h84.8c-5.5-16.3-13.1-32-22.5-46.6a211.6 211.6 0 00-62.3-62.7zm-64-239.9l-124-147-124 147V668h248V318.8zM512 448a48.01 48.01 0 010-96 48.01 48.01 0 010 96z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 00-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0043.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0043.1-30.5 97.52 97.52 0 0021.4-60.8c0-8.4-1.1-16.4-3.1-23.8L864 736zm-540-68h-84.8c5.5-16.3 13.1-32 22.5-46.6 16.3-25.2 37.5-46.5 62.3-62.7V668zm64-184.9V318.8l124-147 124 147V668H388V483.1zm240.1 301.1c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5s-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 01-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5zM700 668V558.7a211.6 211.6 0 0162.3 62.7c9.4 14.6 17 30.3 22.5 46.6H700z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M464 400a48 48 0 1096 0 48 48 0 10-96 0z", "fill": primaryColor } }] }; }, "name": "rocket", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (RocketTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RollbackOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RollbackOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RollbackOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M793 242H366v-74c0-6.7-7.7-10.4-12.9-6.3l-142 112a8 8 0 000 12.6l142 112c5.2 4.1 12.9.4 12.9-6.3v-74h415v470H175c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h618c35.3 0 64-28.7 64-64V306c0-35.3-28.7-64-64-64z" } }] }, "name": "rollback", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (RollbackOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RotateLeftOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RotateLeftOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RotateLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z" } }, { "tag": "path", "attrs": { "d": "M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z" } }] }, "name": "rotate-left", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (RotateLeftOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/RotateRightOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/RotateRightOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var RotateRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z" } }, { "tag": "path", "attrs": { "d": "M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z" } }] }, "name": "rotate-right", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (RotateRightOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SafetyCertificateFilled.js": /*!******************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SafetyCertificateFilled.js ***! \******************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SafetyCertificateFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM694.5 340.7L481.9 633.4a16.1 16.1 0 01-26 0l-126.4-174c-3.8-5.3 0-12.7 6.5-12.7h55.2c5.1 0 10 2.5 13 6.6l64.7 89 150.9-207.8c3-4.1 7.8-6.6 13-6.6H688c6.5.1 10.3 7.5 6.5 12.8z" } }] }, "name": "safety-certificate", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (SafetyCertificateFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SafetyCertificateOutlined.js": /*!********************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SafetyCertificateOutlined.js ***! \********************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SafetyCertificateOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z" } }] }, "name": "safety-certificate", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SafetyCertificateOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SafetyCertificateTwoTone.js": /*!*******************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SafetyCertificateTwoTone.js ***! \*******************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SafetyCertificateTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M214 226.7v427.6l298 232.2 298-232.2V226.7L512 125.1 214 226.7zM632.8 328H688c6.5 0 10.3 7.4 6.5 12.7L481.9 633.4a16.1 16.1 0 01-26 0l-126.4-174c-3.8-5.3 0-12.7 6.5-12.7h55.2c5.2 0 10 2.5 13 6.6l64.7 89.1 150.9-207.8c3-4.1 7.9-6.6 13-6.6z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M404.2 453.3c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z", "fill": primaryColor } }] }; }, "name": "safety-certificate", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (SafetyCertificateTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SafetyOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SafetyOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SafetyOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z" } }, { "tag": "path", "attrs": { "d": "M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z" } }] }, "name": "safety", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SafetyOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SaveFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SaveFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SaveFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M893.3 293.3L730.7 130.7c-12-12-28.3-18.7-45.3-18.7H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 176h256v112H384V176zm128 554c-79.5 0-144-64.5-144-144s64.5-144 144-144 144 64.5 144 144-64.5 144-144 144zm0-224c-44.2 0-80 35.8-80 80s35.8 80 80 80 80-35.8 80-80-35.8-80-80-80z" } }] }, "name": "save", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (SaveFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SaveOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SaveOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SaveOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z" } }] }, "name": "save", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SaveOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SaveTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SaveTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SaveTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M704 320c0 17.7-14.3 32-32 32H352c-17.7 0-32-14.3-32-32V184H184v656h656V341.8l-136-136V320zM512 730c-79.5 0-144-64.5-144-144s64.5-144 144-144 144 64.5 144 144-64.5 144-144 144z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M893.3 293.3L730.7 130.7c-.7-.7-1.4-1.3-2.1-2-.1-.1-.3-.2-.4-.3-.7-.7-1.5-1.3-2.2-1.9a64 64 0 00-22-11.7V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840z", "fill": primaryColor } }] }; }, "name": "save", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (SaveTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ScanOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ScanOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ScanOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M136 384h56c4.4 0 8-3.6 8-8V200h176c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H196c-37.6 0-68 30.4-68 68v180c0 4.4 3.6 8 8 8zm512-184h176v176c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V196c0-37.6-30.4-68-68-68H648c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zM376 824H200V648c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v180c0 37.6 30.4 68 68 68h180c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm512-184h-56c-4.4 0-8 3.6-8 8v176H648c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h180c37.6 0 68-30.4 68-68V648c0-4.4-3.6-8-8-8zm16-164H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, "name": "scan", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ScanOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ScheduleFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ScheduleFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ScheduleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 224H768v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H548v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H328v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H96c-17.7 0-32 14.3-32 32v576c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V256c0-17.7-14.3-32-32-32zM424 688c0 4.4-3.6 8-8 8H232c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h184c4.4 0 8 3.6 8 8v48zm0-136c0 4.4-3.6 8-8 8H232c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h184c4.4 0 8 3.6 8 8v48zm374.5-91.3l-165 228.7a15.9 15.9 0 01-25.8 0L493.5 531.2c-3.8-5.3 0-12.7 6.5-12.7h54.9c5.1 0 9.9 2.5 12.9 6.6l52.8 73.1 103.7-143.7c3-4.2 7.8-6.6 12.9-6.6H792c6.5.1 10.3 7.5 6.5 12.8z" } }] }, "name": "schedule", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (ScheduleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ScheduleOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ScheduleOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ScheduleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 224H768v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H548v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H328v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H96c-17.7 0-32 14.3-32 32v576c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V256c0-17.7-14.3-32-32-32zm-40 568H136V296h120v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56h148v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56h148v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56h120v496zM416 496H232c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm0 136H232c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm308.2-177.4L620.6 598.3l-52.8-73.1c-3-4.2-7.8-6.6-12.9-6.6H500c-6.5 0-10.3 7.4-6.5 12.7l114.1 158.2a15.9 15.9 0 0025.8 0l165-228.7c3.8-5.3 0-12.7-6.5-12.7H737c-5-.1-9.8 2.4-12.8 6.5z" } }] }, "name": "schedule", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ScheduleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ScheduleTwoTone.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ScheduleTwoTone.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ScheduleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M768 352c0 4.4-3.6 8-8 8h-56c-4.4 0-8-3.6-8-8v-56H548v56c0 4.4-3.6 8-8 8h-56c-4.4 0-8-3.6-8-8v-56H328v56c0 4.4-3.6 8-8 8h-56c-4.4 0-8-3.6-8-8v-56H136v496h752V296H768v56zM424 688c0 4.4-3.6 8-8 8H232c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h184c4.4 0 8 3.6 8 8v48zm0-136c0 4.4-3.6 8-8 8H232c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h184c4.4 0 8 3.6 8 8v48zm374.4-91.2l-165 228.7a15.9 15.9 0 01-25.8 0L493.5 531.3c-3.8-5.3 0-12.7 6.5-12.7h54.9c5.1 0 9.9 2.4 12.9 6.6l52.8 73.1 103.6-143.7c3-4.1 7.8-6.6 12.8-6.5h54.9c6.5 0 10.3 7.4 6.5 12.7z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M724.2 454.6L620.6 598.3l-52.8-73.1c-3-4.2-7.8-6.6-12.9-6.6H500c-6.5 0-10.3 7.4-6.5 12.7l114.1 158.2a15.9 15.9 0 0025.8 0l165-228.7c3.8-5.3 0-12.7-6.5-12.7H737c-5-.1-9.8 2.4-12.8 6.5zM416 496H232c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M928 224H768v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H548v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H328v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H96c-17.7 0-32 14.3-32 32v576c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V256c0-17.7-14.3-32-32-32zm-40 568H136V296h120v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56h148v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56h148v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56h120v496z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M416 632H232c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z", "fill": primaryColor } }] }; }, "name": "schedule", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (ScheduleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ScissorOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ScissorOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ScissorOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M567.1 512l318.5-319.3c5-5 1.5-13.7-5.6-13.7h-90.5c-2.1 0-4.2.8-5.6 2.3l-273.3 274-90.2-90.5c12.5-22.1 19.7-47.6 19.7-74.8 0-83.9-68.1-152-152-152s-152 68.1-152 152 68.1 152 152 152c27.7 0 53.6-7.4 75.9-20.3l90 90.3-90.1 90.3A151.04 151.04 0 00288 582c-83.9 0-152 68.1-152 152s68.1 152 152 152 152-68.1 152-152c0-27.2-7.2-52.7-19.7-74.8l90.2-90.5 273.3 274c1.5 1.5 3.5 2.3 5.6 2.3H880c7.1 0 10.7-8.6 5.6-13.7L567.1 512zM288 370c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80zm0 444c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z" } }] }, "name": "scissor", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ScissorOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SearchOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SearchOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SearchOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, "name": "search", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SearchOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SecurityScanFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SecurityScanFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SecurityScanFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM626.8 554c-48.5 48.5-123 55.2-178.6 20.1l-77.5 77.5a8.03 8.03 0 01-11.3 0l-34-34a8.03 8.03 0 010-11.3l77.5-77.5c-35.1-55.7-28.4-130.1 20.1-178.6 56.3-56.3 147.5-56.3 203.8 0 56.3 56.3 56.3 147.5 0 203.8zm-158.54-45.27a80.1 80.1 0 10113.27-113.28 80.1 80.1 0 10-113.27 113.28z" } }] }, "name": "security-scan", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (SecurityScanFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SecurityScanOutlined.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SecurityScanOutlined.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SecurityScanOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zM402.9 528.8l-77.5 77.5a8.03 8.03 0 000 11.3l34 34c3.1 3.1 8.2 3.1 11.3 0l77.5-77.5c55.7 35.1 130.1 28.4 178.6-20.1 56.3-56.3 56.3-147.5 0-203.8-56.3-56.3-147.5-56.3-203.8 0-48.5 48.5-55.2 123-20.1 178.6zm65.4-133.3c31.3-31.3 82-31.3 113.2 0 31.3 31.3 31.3 82 0 113.2-31.3 31.3-82 31.3-113.2 0s-31.3-81.9 0-113.2z" } }] }, "name": "security-scan", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SecurityScanOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SecurityScanTwoTone.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SecurityScanTwoTone.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SecurityScanTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M460.7 451.1a80.1 80.1 0 10160.2 0 80.1 80.1 0 10-160.2 0z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M214 226.7v427.6l298 232.2 298-232.2V226.7L512 125.1 214 226.7zm428.7 122.5c56.3 56.3 56.3 147.5 0 203.8-48.5 48.5-123 55.2-178.6 20.1l-77.5 77.5a8.03 8.03 0 01-11.3 0l-34-34a8.03 8.03 0 010-11.3l77.5-77.5c-35.1-55.7-28.4-130.1 20.1-178.6 56.3-56.3 147.5-56.3 203.8 0z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M418.8 527.8l-77.5 77.5a8.03 8.03 0 000 11.3l34 34c3.1 3.1 8.2 3.1 11.3 0l77.5-77.5c55.6 35.1 130.1 28.4 178.6-20.1 56.3-56.3 56.3-147.5 0-203.8-56.3-56.3-147.5-56.3-203.8 0-48.5 48.5-55.2 122.9-20.1 178.6zm65.4-133.3a80.1 80.1 0 01113.3 0 80.1 80.1 0 010 113.3c-31.3 31.3-82 31.3-113.3 0s-31.3-82 0-113.3z", "fill": primaryColor } }] }; }, "name": "security-scan", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (SecurityScanTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SelectOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SelectOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SelectOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h360c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H184V184h656v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V144c0-17.7-14.3-32-32-32zM653.3 599.4l52.2-52.2a8.01 8.01 0 00-4.7-13.6l-179.4-21c-5.1-.6-9.5 3.7-8.9 8.9l21 179.4c.8 6.6 8.9 9.4 13.6 4.7l52.4-52.4 256.2 256.2c3.1 3.1 8.2 3.1 11.3 0l42.4-42.4c3.1-3.1 3.1-8.2 0-11.3L653.3 599.4z" } }] }, "name": "select", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SelectOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SendOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SendOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SendOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z" } }] }, "name": "send", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SendOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SettingFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SettingFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SettingFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512.5 390.6c-29.9 0-57.9 11.6-79.1 32.8-21.1 21.2-32.8 49.2-32.8 79.1 0 29.9 11.7 57.9 32.8 79.1 21.2 21.1 49.2 32.8 79.1 32.8 29.9 0 57.9-11.7 79.1-32.8 21.1-21.2 32.8-49.2 32.8-79.1 0-29.9-11.7-57.9-32.8-79.1a110.96 110.96 0 00-79.1-32.8zm412.3 235.5l-65.4-55.9c3.1-19 4.7-38.4 4.7-57.7s-1.6-38.8-4.7-57.7l65.4-55.9a32.03 32.03 0 009.3-35.2l-.9-2.6a442.5 442.5 0 00-79.6-137.7l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.2 28.9c-30-24.6-63.4-44-99.6-57.5l-15.7-84.9a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52-9.4-106.8-9.4-158.8 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.3a353.44 353.44 0 00-98.9 57.3l-81.8-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a445.93 445.93 0 00-79.6 137.7l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.2 56.5c-3.1 18.8-4.6 38-4.6 57 0 19.2 1.5 38.4 4.6 57l-66 56.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.3 44.8 96.8 79.6 137.7l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.8-29.1c29.8 24.5 63 43.9 98.9 57.3l15.8 85.3a32.05 32.05 0 0025.8 25.7l2.7.5a448.27 448.27 0 00158.8 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-84.9c36.2-13.6 69.6-32.9 99.6-57.5l81.2 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.5-87.4 79.6-137.7l.9-2.6c4.3-12.4.6-26.3-9.5-35zm-412.3 52.2c-97.1 0-175.8-78.7-175.8-175.8s78.7-175.8 175.8-175.8 175.8 78.7 175.8 175.8-78.7 175.8-175.8 175.8z" } }] }, "name": "setting", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (SettingFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SettingOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SettingOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SettingOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z" } }] }, "name": "setting", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SettingOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SettingTwoTone.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SettingTwoTone.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SettingTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M859.3 569.7l.2.1c3.1-18.9 4.6-38.2 4.6-57.3 0-17.1-1.3-34.3-3.7-51.1 2.4 16.7 3.6 33.6 3.6 50.5 0 19.4-1.6 38.8-4.7 57.8zM99 398.1c-.5-.4-.9-.8-1.4-1.3.7.7 1.4 1.4 2.2 2.1l65.5 55.9v-.1L99 398.1zm536.6-216h.1l-15.5-83.8c-.2-1-.4-1.9-.7-2.8.1.5.3 1.1.4 1.6l15.7 85zm54 546.5l31.4-25.8 92.8 32.9c17-22.9 31.3-47.5 42.6-73.6l-74.7-63.9 6.6-40.1c2.5-15.1 3.8-30.6 3.8-46.1s-1.3-31-3.8-46.1l-6.5-39.9 74.7-63.9c-11.4-26-25.6-50.7-42.6-73.6l-92.8 32.9-31.4-25.8c-23.9-19.6-50.6-35-79.3-45.8l-38.1-14.3-17.9-97a377.5 377.5 0 00-85 0l-17.9 97.2-37.9 14.3c-28.5 10.8-55 26.2-78.7 45.7l-31.4 25.9-93.4-33.2c-17 22.9-31.3 47.5-42.6 73.6l75.5 64.5-6.5 40c-2.5 14.9-3.7 30.2-3.7 45.5 0 15.2 1.3 30.6 3.7 45.5l6.5 40-75.5 64.5c11.4 26 25.6 50.7 42.6 73.6l93.4-33.2 31.4 25.9c23.7 19.5 50.2 34.9 78.7 45.7l37.8 14.5 17.9 97.2c28.2 3.2 56.9 3.2 85 0l17.9-97 38.1-14.3c28.8-10.8 55.4-26.2 79.3-45.8zm-177.1-50.3c-30.5 0-59.2-7.8-84.3-21.5C373.3 627 336 568.9 336 502c0-97.2 78.8-176 176-176 66.9 0 125 37.3 154.8 92.2 13.7 25 21.5 53.7 21.5 84.3 0 97.1-78.7 175.8-175.8 175.8zM207.2 812.8c-5.5 1.9-11.2 2.3-16.6 1.2 5.7 1.2 11.7 1 17.5-1l81.4-29c-.1-.1-.3-.2-.4-.3l-81.9 29.1zm717.6-414.7l-65.5 56c0 .2.1.5.1.7l65.4-55.9c7.1-6.1 11.1-14.9 11.2-24-.3 8.8-4.3 17.3-11.2 23.2z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M935.8 646.6c.5 4.7 0 9.5-1.7 14.1l-.9 2.6a446.02 446.02 0 01-79.7 137.9l-1.8 2.1a32 32 0 01-35.1 9.5l-81.3-28.9a350 350 0 01-99.7 57.6l-15.7 85a32.05 32.05 0 01-25.8 25.7l-2.7.5a445.2 445.2 0 01-79.2 7.1h.3c26.7 0 53.4-2.4 79.4-7.1l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-84.9c36.2-13.6 69.6-32.9 99.6-57.5l81.2 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.5-87.4 79.6-137.7l.9-2.6c1.6-4.7 2.1-9.7 1.5-14.5z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M688 502c0-30.3-7.7-58.9-21.2-83.8C637 363.3 578.9 326 512 326c-97.2 0-176 78.8-176 176 0 66.9 37.3 125 92.2 154.8 24.9 13.5 53.4 21.2 83.8 21.2 97.2 0 176-78.8 176-176zm-288 0c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M594.1 952.2a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c1.7-4.6 2.2-9.4 1.7-14.1-.9-7.9-4.7-15.4-11-20.9l-65.3-55.9-.2-.1c3.1-19 4.7-38.4 4.7-57.8 0-16.9-1.2-33.9-3.6-50.5-.3-2.2-.7-4.4-1-6.6 0-.2-.1-.5-.1-.7l65.5-56c6.9-5.9 10.9-14.4 11.2-23.2.1-4-.5-8.1-1.9-12l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.4-44-99.6-57.6h-.1l-15.7-85c-.1-.5-.2-1.1-.4-1.6a32.08 32.08 0 00-25.4-24.1l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6a32.09 32.09 0 007.9 33.9c.5.4.9.9 1.4 1.3l66.3 56.6v.1c-3.1 18.8-4.6 37.9-4.6 57 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1c4.9 5.7 11.4 9.4 18.5 10.7 5.4 1 11.1.7 16.6-1.2l81.9-29.1c.1.1.3.2.4.3 29.7 24.3 62.8 43.6 98.6 57.1l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5c26.1 4.7 52.8 7.1 79.5 7.1h.3c26.6 0 53.3-2.4 79.2-7.1l2.7-.5zm-39.8-66.5a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97z", "fill": primaryColor } }] }; }, "name": "setting", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (SettingTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ShakeOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ShakeOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ShakeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M324 666a48 48 0 1096 0 48 48 0 10-96 0zm616.7-309.6L667.6 83.2C655.2 70.9 638.7 64 621.1 64s-34.1 6.8-46.5 19.2L83.3 574.5a65.85 65.85 0 000 93.1l273.2 273.2c12.3 12.3 28.9 19.2 46.5 19.2s34.1-6.8 46.5-19.2l491.3-491.3c25.6-25.7 25.6-67.5-.1-93.1zM403 880.1L143.9 621l477.2-477.2 259 259.2L403 880.1zM152.8 373.7a7.9 7.9 0 0011.2 0L373.7 164a7.9 7.9 0 000-11.2l-38.4-38.4a7.9 7.9 0 00-11.2 0L114.3 323.9a7.9 7.9 0 000 11.2l38.5 38.6zm718.6 276.6a7.9 7.9 0 00-11.2 0L650.3 860.1a7.9 7.9 0 000 11.2l38.4 38.4a7.9 7.9 0 0011.2 0L909.7 700a7.9 7.9 0 000-11.2l-38.3-38.5z" } }] }, "name": "shake", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ShakeOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ShareAltOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ShareAltOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ShareAltOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M752 664c-28.5 0-54.8 10-75.4 26.7L469.4 540.8a160.68 160.68 0 000-57.6l207.2-149.9C697.2 350 723.5 360 752 360c66.2 0 120-53.8 120-120s-53.8-120-120-120-120 53.8-120 120c0 11.6 1.6 22.7 4.7 33.3L439.9 415.8C410.7 377.1 364.3 352 312 352c-88.4 0-160 71.6-160 160s71.6 160 160 160c52.3 0 98.7-25.1 127.9-63.8l196.8 142.5c-3.1 10.6-4.7 21.8-4.7 33.3 0 66.2 53.8 120 120 120s120-53.8 120-120-53.8-120-120-120zm0-476c28.7 0 52 23.3 52 52s-23.3 52-52 52-52-23.3-52-52 23.3-52 52-52zM312 600c-48.5 0-88-39.5-88-88s39.5-88 88-88 88 39.5 88 88-39.5 88-88 88zm440 236c-28.7 0-52-23.3-52-52s23.3-52 52-52 52 23.3 52 52-23.3 52-52 52z" } }] }, "name": "share-alt", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ShareAltOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ShopFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ShopFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ShopFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M882 272.1V144c0-17.7-14.3-32-32-32H174c-17.7 0-32 14.3-32 32v128.1c-16.7 1-30 14.9-30 31.9v131.7a177 177 0 0014.4 70.4c4.3 10.2 9.6 19.8 15.6 28.9v345c0 17.6 14.3 32 32 32h274V736h128v176h274c17.7 0 32-14.3 32-32V535a175 175 0 0015.6-28.9c9.5-22.3 14.4-46 14.4-70.4V304c0-17-13.3-30.9-30-31.9zm-72 568H640V704c0-17.7-14.3-32-32-32H416c-17.7 0-32 14.3-32 32v136.1H214V597.9c2.9 1.4 5.9 2.8 9 4 22.3 9.4 46 14.1 70.4 14.1s48-4.7 70.4-14.1c13.8-5.8 26.8-13.2 38.7-22.1.2-.1.4-.1.6 0a180.4 180.4 0 0038.7 22.1c22.3 9.4 46 14.1 70.4 14.1 24.4 0 48-4.7 70.4-14.1 13.8-5.8 26.8-13.2 38.7-22.1.2-.1.4-.1.6 0a180.4 180.4 0 0038.7 22.1c22.3 9.4 46 14.1 70.4 14.1 24.4 0 48-4.7 70.4-14.1 3-1.3 6-2.6 9-4v242.2zm0-568.1H214v-88h596v88z" } }] }, "name": "shop", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (ShopFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ShopOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ShopOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ShopOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M882 272.1V144c0-17.7-14.3-32-32-32H174c-17.7 0-32 14.3-32 32v128.1c-16.7 1-30 14.9-30 31.9v131.7a177 177 0 0014.4 70.4c4.3 10.2 9.6 19.8 15.6 28.9v345c0 17.6 14.3 32 32 32h676c17.7 0 32-14.3 32-32V535a175 175 0 0015.6-28.9c9.5-22.3 14.4-46 14.4-70.4V304c0-17-13.3-30.9-30-31.9zM214 184h596v88H214v-88zm362 656.1H448V736h128v104.1zm234 0H640V704c0-17.7-14.3-32-32-32H416c-17.7 0-32 14.3-32 32v136.1H214V597.9c2.9 1.4 5.9 2.8 9 4 22.3 9.4 46 14.1 70.4 14.1s48-4.7 70.4-14.1c13.8-5.8 26.8-13.2 38.7-22.1.2-.1.4-.1.6 0a180.4 180.4 0 0038.7 22.1c22.3 9.4 46 14.1 70.4 14.1 24.4 0 48-4.7 70.4-14.1 13.8-5.8 26.8-13.2 38.7-22.1.2-.1.4-.1.6 0a180.4 180.4 0 0038.7 22.1c22.3 9.4 46 14.1 70.4 14.1 24.4 0 48-4.7 70.4-14.1 3-1.3 6-2.6 9-4v242.2zm30-404.4c0 59.8-49 108.3-109.3 108.3-40.8 0-76.4-22.1-95.2-54.9-2.9-5-8.1-8.1-13.9-8.1h-.6c-5.7 0-11 3.1-13.9 8.1A109.24 109.24 0 01512 544c-40.7 0-76.2-22-95-54.7-3-5.1-8.4-8.3-14.3-8.3s-11.4 3.2-14.3 8.3a109.63 109.63 0 01-95.1 54.7C233 544 184 495.5 184 435.7v-91.2c0-.3.2-.5.5-.5h655c.3 0 .5.2.5.5v91.2z" } }] }, "name": "shop", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ShopOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ShopTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ShopTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ShopTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M839.5 344h-655c-.3 0-.5.2-.5.5v91.2c0 59.8 49 108.3 109.3 108.3 40.7 0 76.2-22 95.1-54.7 2.9-5.1 8.4-8.3 14.3-8.3s11.3 3.2 14.3 8.3c18.8 32.7 54.3 54.7 95 54.7 40.8 0 76.4-22.1 95.1-54.9 2.9-5 8.2-8.1 13.9-8.1h.6c5.8 0 11 3.1 13.9 8.1 18.8 32.8 54.4 54.9 95.2 54.9C791 544 840 495.5 840 435.7v-91.2c0-.3-.2-.5-.5-.5z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M882 272.1V144c0-17.7-14.3-32-32-32H174c-17.7 0-32 14.3-32 32v128.1c-16.7 1-30 14.9-30 31.9v131.7a177 177 0 0014.4 70.4c4.3 10.2 9.6 19.8 15.6 28.9v345c0 17.6 14.3 32 32 32h676c17.7 0 32-14.3 32-32V535a175 175 0 0015.6-28.9c9.5-22.3 14.4-46 14.4-70.4V304c0-17-13.3-30.9-30-31.9zM214 184h596v88H214v-88zm362 656.1H448V736h128v104.1zm234.4 0H640V704c0-17.7-14.3-32-32-32H416c-17.7 0-32 14.3-32 32v136.1H214V597.9c2.9 1.4 5.9 2.8 9 4 22.3 9.4 46 14.1 70.4 14.1 24.4 0 48-4.7 70.4-14.1 13.8-5.8 26.8-13.2 38.7-22.1.2-.1.4-.1.6 0a180.4 180.4 0 0038.7 22.1c22.3 9.4 46 14.1 70.4 14.1s48-4.7 70.4-14.1c13.8-5.8 26.8-13.2 38.7-22.1.2-.1.4-.1.6 0a180.4 180.4 0 0038.7 22.1c22.3 9.4 46 14.1 70.4 14.1s48-4.7 70.4-14.1c3-1.3 6-2.6 9-4v242.2zM840 435.7c0 59.8-49 108.3-109.3 108.3-40.8 0-76.4-22.1-95.2-54.9-2.9-5-8.1-8.1-13.9-8.1h-.6c-5.7 0-11 3.1-13.9 8.1A109.24 109.24 0 01512 544c-40.7 0-76.2-22-95-54.7-3-5.1-8.4-8.3-14.3-8.3s-11.4 3.2-14.3 8.3a109.63 109.63 0 01-95.1 54.7C233 544 184 495.5 184 435.7v-91.2c0-.3.2-.5.5-.5h655c.3 0 .5.2.5.5v91.2z", "fill": primaryColor } }] }; }, "name": "shop", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (ShopTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ShoppingCartOutlined.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ShoppingCartOutlined.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ShoppingCartOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z" } }] }, "name": "shopping-cart", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ShoppingCartOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ShoppingFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ShoppingFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ShoppingFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 312H696v-16c0-101.6-82.4-184-184-184s-184 82.4-184 184v16H192c-17.7 0-32 14.3-32 32v536c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V344c0-17.7-14.3-32-32-32zm-208 0H400v-16c0-61.9 50.1-112 112-112s112 50.1 112 112v16z" } }] }, "name": "shopping", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (ShoppingFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ShoppingOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ShoppingOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ShoppingOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 312H696v-16c0-101.6-82.4-184-184-184s-184 82.4-184 184v16H192c-17.7 0-32 14.3-32 32v536c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V344c0-17.7-14.3-32-32-32zm-432-16c0-61.9 50.1-112 112-112s112 50.1 112 112v16H400v-16zm392 544H232V384h96v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h224v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h96v456z" } }] }, "name": "shopping", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ShoppingOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ShoppingTwoTone.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ShoppingTwoTone.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ShoppingTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M696 472c0 4.4-3.6 8-8 8h-56c-4.4 0-8-3.6-8-8v-88H400v88c0 4.4-3.6 8-8 8h-56c-4.4 0-8-3.6-8-8v-88h-96v456h560V384h-96v88z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M832 312H696v-16c0-101.6-82.4-184-184-184s-184 82.4-184 184v16H192c-17.7 0-32 14.3-32 32v536c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V344c0-17.7-14.3-32-32-32zm-432-16c0-61.9 50.1-112 112-112s112 50.1 112 112v16H400v-16zm392 544H232V384h96v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h224v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h96v456z", "fill": primaryColor } }] }; }, "name": "shopping", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (ShoppingTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ShrinkOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ShrinkOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ShrinkOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M881.7 187.4l-45.1-45.1a8.03 8.03 0 00-11.3 0L667.8 299.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L576.1 439c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 157.6-157.6c3-3 3-8.1-.1-11.2zM439 576.1l-189.2 23.5c-6.6.8-9.3 8.9-4.7 13.5l54.7 54.7-157.5 157.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l157.6-157.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L447.9 585a7.9 7.9 0 00-8.9-8.9z" } }] }, "name": "shrink", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ShrinkOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SignalFilled.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SignalFilled.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SignalFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M584 352H440c-17.7 0-32 14.3-32 32v544c0 17.7 14.3 32 32 32h144c17.7 0 32-14.3 32-32V384c0-17.7-14.3-32-32-32zM892 64H748c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h144c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zM276 640H132c-17.7 0-32 14.3-32 32v256c0 17.7 14.3 32 32 32h144c17.7 0 32-14.3 32-32V672c0-17.7-14.3-32-32-32z" } }] }, "name": "signal", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (SignalFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SisternodeOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SisternodeOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SisternodeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M672 432c-120.3 0-219.9 88.5-237.3 204H320c-15.5 0-28-12.5-28-28V244h291c14.2 35.2 48.7 60 89 60 53 0 96-43 96-96s-43-96-96-96c-40.3 0-74.8 24.8-89 60H112v72h108v364c0 55.2 44.8 100 100 100h114.7c17.4 115.5 117 204 237.3 204 132.5 0 240-107.5 240-240S804.5 432 672 432zm128 266c0 4.4-3.6 8-8 8h-86v86c0 4.4-3.6 8-8 8h-52c-4.4 0-8-3.6-8-8v-86h-86c-4.4 0-8-3.6-8-8v-52c0-4.4 3.6-8 8-8h86v-86c0-4.4 3.6-8 8-8h52c4.4 0 8 3.6 8 8v86h86c4.4 0 8 3.6 8 8v52z" } }] }, "name": "sisternode", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SisternodeOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SketchCircleFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SketchCircleFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SketchCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M582.3 625.6l147.9-166.3h-63.4zm90-202.3h62.5l-92.1-115.1zm-274.7 36L512 684.5l114.4-225.2zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm286.7 380.2L515.8 762.3c-1 1.1-2.4 1.7-3.8 1.7s-2.8-.6-3.8-1.7L225.3 444.2a5.14 5.14 0 01-.2-6.6L365.6 262c1-1.2 2.4-1.9 4-1.9h284.6c1.6 0 3 .7 4 1.9l140.5 175.6a4.9 4.9 0 010 6.6zm-190.5-20.9L512 326.1l-96.2 97.2zM420.3 301.1l-23.1 89.8 88.8-89.8zm183.4 0H538l88.8 89.8zm-222.4 7.1l-92.1 115.1h62.5zm-87.5 151.1l147.9 166.3-84.5-166.3z" } }] }, "name": "sketch-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (SketchCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SketchOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SketchOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SketchOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M925.6 405.1l-203-253.7a6.5 6.5 0 00-5-2.4H306.4c-1.9 0-3.8.9-5 2.4l-203 253.7a6.5 6.5 0 00.2 8.3l408.6 459.5c1.2 1.4 3 2.1 4.8 2.1 1.8 0 3.5-.8 4.8-2.1l408.6-459.5a6.5 6.5 0 00.2-8.3zM645.2 206.4l34.4 133.9-132.5-133.9h98.1zm8.2 178.5H370.6L512 242l141.4 142.9zM378.8 206.4h98.1L344.3 340.3l34.5-133.9zm-53.4 7l-44.1 171.5h-93.1l137.2-171.5zM194.6 434.9H289l125.8 247.7-220.2-247.7zM512 763.4L345.1 434.9h333.7L512 763.4zm97.1-80.8L735 434.9h94.4L609.1 682.6zm133.6-297.7l-44.1-171.5 137.2 171.5h-93.1z" } }] }, "name": "sketch", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SketchOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SketchSquareFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SketchSquareFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SketchSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M608.2 423.3L512 326.1l-96.2 97.2zm-25.9 202.3l147.9-166.3h-63.4zm90-202.3h62.5l-92.1-115.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-81.3 332.2L515.8 762.3c-1 1.1-2.4 1.7-3.8 1.7s-2.8-.6-3.8-1.7L225.3 444.2a5.14 5.14 0 01-.2-6.6L365.6 262c1-1.2 2.4-1.9 4-1.9h284.6c1.6 0 3 .7 4 1.9l140.5 175.6a4.9 4.9 0 010 6.6zm-401.1 15.1L512 684.5l114.4-225.2zm-16.3-151.1l-92.1 115.1h62.5zm-87.5 151.1l147.9 166.3-84.5-166.3zm126.5-158.2l-23.1 89.8 88.8-89.8zm183.4 0H538l88.8 89.8z" } }] }, "name": "sketch-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (SketchSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SkinFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SkinFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SkinFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M870 126H663.8c-17.4 0-32.9 11.9-37 29.3C614.3 208.1 567 246 512 246s-102.3-37.9-114.8-90.7a37.93 37.93 0 00-37-29.3H154a44 44 0 00-44 44v252a44 44 0 0044 44h75v388a44 44 0 0044 44h478a44 44 0 0044-44V466h75a44 44 0 0044-44V170a44 44 0 00-44-44z" } }] }, "name": "skin", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (SkinFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SkinOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SkinOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SkinOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M870 126H663.8c-17.4 0-32.9 11.9-37 29.3C614.3 208.1 567 246 512 246s-102.3-37.9-114.8-90.7a37.93 37.93 0 00-37-29.3H154a44 44 0 00-44 44v252a44 44 0 0044 44h75v388a44 44 0 0044 44h478a44 44 0 0044-44V466h75a44 44 0 0044-44V170a44 44 0 00-44-44zm-28 268H723v432H301V394H182V198h153.3c28.2 71.2 97.5 120 176.7 120s148.5-48.8 176.7-120H842v196z" } }] }, "name": "skin", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SkinOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SkinTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SkinTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SkinTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 318c-79.2 0-148.5-48.8-176.7-120H182v196h119v432h422V394h119V198H688.7c-28.2 71.2-97.5 120-176.7 120z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M870 126H663.8c-17.4 0-32.9 11.9-37 29.3C614.3 208.1 567 246 512 246s-102.3-37.9-114.8-90.7a37.93 37.93 0 00-37-29.3H154a44 44 0 00-44 44v252a44 44 0 0044 44h75v388a44 44 0 0044 44h478a44 44 0 0044-44V466h75a44 44 0 0044-44V170a44 44 0 00-44-44zm-28 268H723v432H301V394H182V198h153.3c28.2 71.2 97.5 120 176.7 120s148.5-48.8 176.7-120H842v196z", "fill": primaryColor } }] }; }, "name": "skin", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (SkinTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SkypeFilled.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SkypeFilled.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SkypeFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M883.7 578.6c4.1-22.5 6.3-45.5 6.3-68.5 0-51-10-100.5-29.7-147-19-45-46.3-85.4-81-120.1a375.79 375.79 0 00-120.1-80.9c-46.6-19.7-96-29.7-147-29.7-24 0-48.1 2.3-71.5 6.8A225.1 225.1 0 00335.6 113c-59.7 0-115.9 23.3-158.1 65.5A222.25 222.25 0 00112 336.6c0 38 9.8 75.4 28.1 108.4-3.7 21.4-5.7 43.3-5.7 65.1 0 51 10 100.5 29.7 147 19 45 46.2 85.4 80.9 120.1 34.7 34.7 75.1 61.9 120.1 80.9 46.6 19.7 96 29.7 147 29.7 22.2 0 44.4-2 66.2-5.9 33.5 18.9 71.3 29 110 29 59.7 0 115.9-23.2 158.1-65.5 42.3-42.2 65.5-98.4 65.5-158.1.1-38-9.7-75.5-28.2-108.7zm-370 162.9c-134.2 0-194.2-66-194.2-115.4 0-25.4 18.7-43.1 44.5-43.1 57.4 0 42.6 82.5 149.7 82.5 54.9 0 85.2-29.8 85.2-60.3 0-18.3-9-38.7-45.2-47.6l-119.4-29.8c-96.1-24.1-113.6-76.1-113.6-124.9 0-101.4 95.5-139.5 185.2-139.5 82.6 0 180 45.7 180 106.5 0 26.1-22.6 41.2-48.4 41.2-49 0-40-67.8-138.7-67.8-49 0-76.1 22.2-76.1 53.9s38.7 41.8 72.3 49.5l88.4 19.6c96.8 21.6 121.3 78.1 121.3 131.3 0 82.3-63.3 143.9-191 143.9z" } }] }, "name": "skype", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (SkypeFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SkypeOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SkypeOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SkypeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M883.7 578.6c4.1-22.5 6.3-45.5 6.3-68.5 0-51-10-100.5-29.7-147-19-45-46.3-85.4-81-120.1a375.79 375.79 0 00-120.1-80.9c-46.6-19.7-96-29.7-147-29.7-24 0-48.1 2.3-71.5 6.8A225.1 225.1 0 00335.6 113c-59.7 0-115.9 23.3-158.1 65.5A222.25 222.25 0 00112 336.6c0 38 9.8 75.4 28.1 108.4-3.7 21.4-5.7 43.3-5.7 65.1 0 51 10 100.5 29.7 147 19 45 46.2 85.4 80.9 120.1 34.7 34.7 75.1 61.9 120.1 80.9 46.6 19.7 96 29.7 147 29.7 22.2 0 44.4-2 66.2-5.9 33.5 18.9 71.3 29 110 29 59.7 0 115.9-23.2 158.1-65.5 42.3-42.2 65.5-98.4 65.5-158.1.1-38-9.7-75.5-28.2-108.7zm-88.1 216C766.9 823.4 729 839 688.4 839c-26.1 0-51.8-6.8-74.6-19.7l-22.5-12.7-25.5 4.5c-17.8 3.2-35.8 4.8-53.6 4.8-41.4 0-81.3-8.1-119.1-24.1-36.3-15.3-69-37.3-97.2-65.5a304.29 304.29 0 01-65.5-97.1c-16-37.7-24-77.6-24-119 0-17.4 1.6-35.2 4.6-52.8l4.4-25.1L203 410a151.02 151.02 0 01-19.1-73.4c0-40.6 15.7-78.5 44.4-107.2C257.1 200.7 295 185 335.6 185a153 153 0 0171.4 17.9l22.4 11.8 24.8-4.8c18.9-3.6 38.4-5.5 58-5.5 41.4 0 81.3 8.1 119 24 36.5 15.4 69.1 37.4 97.2 65.5 28.2 28.1 50.2 60.8 65.6 97.2 16 37.7 24 77.6 24 119 0 18.4-1.7 37-5.1 55.5l-4.7 25.5 12.6 22.6c12.6 22.5 19.2 48 19.2 73.7 0 40.7-15.7 78.5-44.4 107.2zM583.4 466.2L495 446.6c-33.6-7.7-72.3-17.8-72.3-49.5s27.1-53.9 76.1-53.9c98.7 0 89.7 67.8 138.7 67.8 25.8 0 48.4-15.2 48.4-41.2 0-60.8-97.4-106.5-180-106.5-89.7 0-185.2 38.1-185.2 139.5 0 48.8 17.4 100.8 113.6 124.9l119.4 29.8c36.1 8.9 45.2 29.2 45.2 47.6 0 30.5-30.3 60.3-85.2 60.3-107.2 0-92.3-82.5-149.7-82.5-25.8 0-44.5 17.8-44.5 43.1 0 49.4 60 115.4 194.2 115.4 127.7 0 191-61.5 191-144 0-53.1-24.5-109.6-121.3-131.2z" } }] }, "name": "skype", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SkypeOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SlackCircleFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SlackCircleFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SlackCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zM361.5 580.2c0 27.8-22.5 50.4-50.3 50.4a50.35 50.35 0 01-50.3-50.4c0-27.8 22.5-50.4 50.3-50.4h50.3v50.4zm134 134.4c0 27.8-22.5 50.4-50.3 50.4-27.8 0-50.3-22.6-50.3-50.4V580.2c0-27.8 22.5-50.4 50.3-50.4a50.35 50.35 0 0150.3 50.4v134.4zm-50.2-218.4h-134c-27.8 0-50.3-22.6-50.3-50.4 0-27.8 22.5-50.4 50.3-50.4h134c27.8 0 50.3 22.6 50.3 50.4-.1 27.9-22.6 50.4-50.3 50.4zm0-134.4c-13.3 0-26.1-5.3-35.6-14.8S395 324.8 395 311.4c0-27.8 22.5-50.4 50.3-50.4 27.8 0 50.3 22.6 50.3 50.4v50.4h-50.3zm83.7-50.4c0-27.8 22.5-50.4 50.3-50.4 27.8 0 50.3 22.6 50.3 50.4v134.4c0 27.8-22.5 50.4-50.3 50.4-27.8 0-50.3-22.6-50.3-50.4V311.4zM579.3 765c-27.8 0-50.3-22.6-50.3-50.4v-50.4h50.3c27.8 0 50.3 22.6 50.3 50.4 0 27.8-22.5 50.4-50.3 50.4zm134-134.4h-134c-13.3 0-26.1-5.3-35.6-14.8S529 593.6 529 580.2c0-27.8 22.5-50.4 50.3-50.4h134c27.8 0 50.3 22.6 50.3 50.4 0 27.8-22.5 50.4-50.3 50.4zm0-134.4H663v-50.4c0-27.8 22.5-50.4 50.3-50.4s50.3 22.6 50.3 50.4c0 27.8-22.5 50.4-50.3 50.4z" } }] }, "name": "slack-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (SlackCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SlackOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SlackOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SlackOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M409.4 128c-42.4 0-76.7 34.4-76.7 76.8 0 20.3 8.1 39.9 22.4 54.3a76.74 76.74 0 0054.3 22.5h76.7v-76.8c0-42.3-34.3-76.7-76.7-76.8zm0 204.8H204.7c-42.4 0-76.7 34.4-76.7 76.8s34.4 76.8 76.7 76.8h204.6c42.4 0 76.7-34.4 76.7-76.8.1-42.4-34.3-76.8-76.6-76.8zM614 486.4c42.4 0 76.8-34.4 76.7-76.8V204.8c0-42.4-34.3-76.8-76.7-76.8-42.4 0-76.7 34.4-76.7 76.8v204.8c0 42.5 34.3 76.8 76.7 76.8zm281.4-76.8c0-42.4-34.4-76.8-76.7-76.8S742 367.2 742 409.6v76.8h76.7c42.3 0 76.7-34.4 76.7-76.8zm-76.8 128H614c-42.4 0-76.7 34.4-76.7 76.8 0 20.3 8.1 39.9 22.4 54.3a76.74 76.74 0 0054.3 22.5h204.6c42.4 0 76.7-34.4 76.7-76.8.1-42.4-34.3-76.7-76.7-76.8zM614 742.4h-76.7v76.8c0 42.4 34.4 76.8 76.7 76.8 42.4 0 76.8-34.4 76.7-76.8.1-42.4-34.3-76.7-76.7-76.8zM409.4 537.6c-42.4 0-76.7 34.4-76.7 76.8v204.8c0 42.4 34.4 76.8 76.7 76.8 42.4 0 76.8-34.4 76.7-76.8V614.4c0-20.3-8.1-39.9-22.4-54.3a76.92 76.92 0 00-54.3-22.5zM128 614.4c0 20.3 8.1 39.9 22.4 54.3a76.74 76.74 0 0054.3 22.5c42.4 0 76.8-34.4 76.7-76.8v-76.8h-76.7c-42.3 0-76.7 34.4-76.7 76.8z" } }] }, "name": "slack", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SlackOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SlackSquareFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SlackSquareFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SlackSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM529 311.4c0-27.8 22.5-50.4 50.3-50.4 27.8 0 50.3 22.6 50.3 50.4v134.4c0 27.8-22.5 50.4-50.3 50.4-27.8 0-50.3-22.6-50.3-50.4V311.4zM361.5 580.2c0 27.8-22.5 50.4-50.3 50.4a50.35 50.35 0 01-50.3-50.4c0-27.8 22.5-50.4 50.3-50.4h50.3v50.4zm134 134.4c0 27.8-22.5 50.4-50.3 50.4-27.8 0-50.3-22.6-50.3-50.4V580.2c0-27.8 22.5-50.4 50.3-50.4a50.35 50.35 0 0150.3 50.4v134.4zm-50.2-218.4h-134c-27.8 0-50.3-22.6-50.3-50.4 0-27.8 22.5-50.4 50.3-50.4h134c27.8 0 50.3 22.6 50.3 50.4-.1 27.9-22.6 50.4-50.3 50.4zm0-134.4c-13.3 0-26.1-5.3-35.6-14.8S395 324.8 395 311.4c0-27.8 22.5-50.4 50.3-50.4 27.8 0 50.3 22.6 50.3 50.4v50.4h-50.3zm134 403.2c-27.8 0-50.3-22.6-50.3-50.4v-50.4h50.3c27.8 0 50.3 22.6 50.3 50.4 0 27.8-22.5 50.4-50.3 50.4zm134-134.4h-134a50.35 50.35 0 01-50.3-50.4c0-27.8 22.5-50.4 50.3-50.4h134c27.8 0 50.3 22.6 50.3 50.4 0 27.8-22.5 50.4-50.3 50.4zm0-134.4H663v-50.4c0-27.8 22.5-50.4 50.3-50.4s50.3 22.6 50.3 50.4c0 27.8-22.5 50.4-50.3 50.4z" } }] }, "name": "slack-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (SlackSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SlackSquareOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SlackSquareOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SlackSquareOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM529 311.4c0-27.8 22.5-50.4 50.3-50.4 27.8 0 50.3 22.6 50.3 50.4v134.4c0 27.8-22.5 50.4-50.3 50.4-27.8 0-50.3-22.6-50.3-50.4V311.4zM361.5 580.2c0 27.8-22.5 50.4-50.3 50.4a50.35 50.35 0 01-50.3-50.4c0-27.8 22.5-50.4 50.3-50.4h50.3v50.4zm134 134.4c0 27.8-22.5 50.4-50.3 50.4-27.8 0-50.3-22.6-50.3-50.4V580.2c0-27.8 22.5-50.4 50.3-50.4a50.35 50.35 0 0150.3 50.4v134.4zm-50.2-218.4h-134c-27.8 0-50.3-22.6-50.3-50.4 0-27.8 22.5-50.4 50.3-50.4h134c27.8 0 50.3 22.6 50.3 50.4-.1 27.9-22.6 50.4-50.3 50.4zm0-134.4c-13.3 0-26.1-5.3-35.6-14.8S395 324.8 395 311.4c0-27.8 22.5-50.4 50.3-50.4 27.8 0 50.3 22.6 50.3 50.4v50.4h-50.3zm134 403.2c-27.8 0-50.3-22.6-50.3-50.4v-50.4h50.3c27.8 0 50.3 22.6 50.3 50.4 0 27.8-22.5 50.4-50.3 50.4zm134-134.4h-134a50.35 50.35 0 01-50.3-50.4c0-27.8 22.5-50.4 50.3-50.4h134c27.8 0 50.3 22.6 50.3 50.4 0 27.8-22.5 50.4-50.3 50.4zm0-134.4H663v-50.4c0-27.8 22.5-50.4 50.3-50.4s50.3 22.6 50.3 50.4c0 27.8-22.5 50.4-50.3 50.4z" } }] }, "name": "slack-square", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SlackSquareOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SlidersFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SlidersFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SlidersFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M904 296h-66v-96c0-4.4-3.6-8-8-8h-52c-4.4 0-8 3.6-8 8v96h-66c-4.4 0-8 3.6-8 8v416c0 4.4 3.6 8 8 8h66v96c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8v-96h66c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8zm-584-72h-66v-56c0-4.4-3.6-8-8-8h-52c-4.4 0-8 3.6-8 8v56h-66c-4.4 0-8 3.6-8 8v560c0 4.4 3.6 8 8 8h66v56c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8v-56h66c4.4 0 8-3.6 8-8V232c0-4.4-3.6-8-8-8zm292 180h-66V232c0-4.4-3.6-8-8-8h-52c-4.4 0-8 3.6-8 8v172h-66c-4.4 0-8 3.6-8 8v200c0 4.4 3.6 8 8 8h66v172c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8V620h66c4.4 0 8-3.6 8-8V412c0-4.4-3.6-8-8-8z" } }] }, "name": "sliders", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (SlidersFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SlidersOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SlidersOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SlidersOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M320 224h-66v-56c0-4.4-3.6-8-8-8h-52c-4.4 0-8 3.6-8 8v56h-66c-4.4 0-8 3.6-8 8v560c0 4.4 3.6 8 8 8h66v56c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8v-56h66c4.4 0 8-3.6 8-8V232c0-4.4-3.6-8-8-8zm-60 508h-80V292h80v440zm644-436h-66v-96c0-4.4-3.6-8-8-8h-52c-4.4 0-8 3.6-8 8v96h-66c-4.4 0-8 3.6-8 8v416c0 4.4 3.6 8 8 8h66v96c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8v-96h66c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8zm-60 364h-80V364h80v296zM612 404h-66V232c0-4.4-3.6-8-8-8h-52c-4.4 0-8 3.6-8 8v172h-66c-4.4 0-8 3.6-8 8v200c0 4.4 3.6 8 8 8h66v172c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8V620h66c4.4 0 8-3.6 8-8V412c0-4.4-3.6-8-8-8zm-60 145a3 3 0 01-3 3h-74a3 3 0 01-3-3v-74a3 3 0 013-3h74a3 3 0 013 3v74z" } }] }, "name": "sliders", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SlidersOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SlidersTwoTone.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SlidersTwoTone.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SlidersTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M180 292h80v440h-80zm369 180h-74a3 3 0 00-3 3v74a3 3 0 003 3h74a3 3 0 003-3v-74a3 3 0 00-3-3zm215-108h80v296h-80z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M904 296h-66v-96c0-4.4-3.6-8-8-8h-52c-4.4 0-8 3.6-8 8v96h-66c-4.4 0-8 3.6-8 8v416c0 4.4 3.6 8 8 8h66v96c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8v-96h66c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8zm-60 364h-80V364h80v296zM612 404h-66V232c0-4.4-3.6-8-8-8h-52c-4.4 0-8 3.6-8 8v172h-66c-4.4 0-8 3.6-8 8v200c0 4.4 3.6 8 8 8h66v172c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8V620h66c4.4 0 8-3.6 8-8V412c0-4.4-3.6-8-8-8zm-60 145a3 3 0 01-3 3h-74a3 3 0 01-3-3v-74a3 3 0 013-3h74a3 3 0 013 3v74zM320 224h-66v-56c0-4.4-3.6-8-8-8h-52c-4.4 0-8 3.6-8 8v56h-66c-4.4 0-8 3.6-8 8v560c0 4.4 3.6 8 8 8h66v56c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8v-56h66c4.4 0 8-3.6 8-8V232c0-4.4-3.6-8-8-8zm-60 508h-80V292h80v440z", "fill": primaryColor } }] }; }, "name": "sliders", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (SlidersTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SmallDashOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SmallDashOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SmallDashOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M112 476h72v72h-72zm182 0h72v72h-72zm364 0h72v72h-72zm182 0h72v72h-72zm-364 0h72v72h-72z" } }] }, "name": "small-dash", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SmallDashOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SmileFilled.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SmileFilled.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SmileFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zM288 421a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm224 272c-85.5 0-155.6-67.3-160-151.6a8 8 0 018-8.4h48.1c4.2 0 7.8 3.2 8.1 7.4C420 589.9 461.5 629 512 629s92.1-39.1 95.8-88.6c.3-4.2 3.9-7.4 8.1-7.4H664a8 8 0 018 8.4C667.6 625.7 597.5 693 512 693zm176-224a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "smile", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (SmileFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SmileOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SmileOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SmileOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z" } }] }, "name": "smile", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SmileOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SmileTwoTone.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SmileTwoTone.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SmileTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zM288 421a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm224 272c-85.5 0-155.6-67.3-160-151.6a8 8 0 018-8.4h48.1c4.2 0 7.8 3.2 8.1 7.4C420 589.9 461.5 629 512 629s92.1-39.1 95.8-88.6c.3-4.2 3.9-7.4 8.1-7.4H664a8 8 0 018 8.4C667.6 625.7 597.5 693 512 693zm176-224a48.01 48.01 0 010-96 48.01 48.01 0 010 96z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M288 421a48 48 0 1096 0 48 48 0 10-96 0zm376 112h-48.1c-4.2 0-7.8 3.2-8.1 7.4-3.7 49.5-45.3 88.6-95.8 88.6s-92-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4zm-24-112a48 48 0 1096 0 48 48 0 10-96 0z", "fill": primaryColor } }] }; }, "name": "smile", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (SmileTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SnippetsFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SnippetsFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SnippetsFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 112H724V72c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v40H500V72c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v40H320c-17.7 0-32 14.3-32 32v120h-96c-17.7 0-32 14.3-32 32v632c0 17.7 14.3 32 32 32h512c17.7 0 32-14.3 32-32v-96h96c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM664 486H514V336h.2L664 485.8v.2zm128 274h-56V456L544 264H360v-80h68v32c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-32h152v32c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-32h68v576z" } }] }, "name": "snippets", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (SnippetsFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SnippetsOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SnippetsOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SnippetsOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 112H724V72c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v40H500V72c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v40H320c-17.7 0-32 14.3-32 32v120h-96c-17.7 0-32 14.3-32 32v632c0 17.7 14.3 32 32 32h512c17.7 0 32-14.3 32-32v-96h96c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM664 888H232V336h218v174c0 22.1 17.9 40 40 40h174v338zm0-402H514V336h.2L664 485.8v.2zm128 274h-56V456L544 264H360v-80h68v32c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-32h152v32c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-32h68v576z" } }] }, "name": "snippets", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SnippetsOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SnippetsTwoTone.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SnippetsTwoTone.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SnippetsTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M450 510V336H232v552h432V550H490c-22.1 0-40-17.9-40-40z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M832 112H724V72c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v40H500V72c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v40H320c-17.7 0-32 14.3-32 32v120h-96c-17.7 0-32 14.3-32 32v632c0 17.7 14.3 32 32 32h512c17.7 0 32-14.3 32-32v-96h96c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM664 888H232V336h218v174c0 22.1 17.9 40 40 40h174v338zm0-402H514V336h.2L664 485.8v.2zm128 274h-56V456L544 264H360v-80h68v32c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-32h152v32c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-32h68v576z", "fill": primaryColor } }] }; }, "name": "snippets", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (SnippetsTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SolutionOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SolutionOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SolutionOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M688 264c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48zm-8 136H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM480 544H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 308H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm356.8-74.4c29-26.3 47.2-64.3 47.2-106.6 0-79.5-64.5-144-144-144s-144 64.5-144 144c0 42.3 18.2 80.3 47.2 106.6-57 32.5-96.2 92.7-99.2 162.1-.2 4.5 3.5 8.3 8 8.3h48.1c4.2 0 7.7-3.3 8-7.6C564 871.2 621.7 816 692 816s128 55.2 131.9 124.4c.2 4.2 3.7 7.6 8 7.6H880c4.6 0 8.2-3.8 8-8.3-2.9-69.5-42.2-129.6-99.2-162.1zM692 591c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z" } }] }, "name": "solution", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SolutionOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SortAscendingOutlined.js": /*!****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SortAscendingOutlined.js ***! \****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SortAscendingOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M839.6 433.8L749 150.5a9.24 9.24 0 00-8.9-6.5h-77.4c-4.1 0-7.6 2.6-8.9 6.5l-91.3 283.3c-.3.9-.5 1.9-.5 2.9 0 5.1 4.2 9.3 9.3 9.3h56.4c4.2 0 7.8-2.8 9-6.8l17.5-61.6h89l17.3 61.5c1.1 4 4.8 6.8 9 6.8h61.2c1 0 1.9-.1 2.8-.4 2.4-.8 4.3-2.4 5.5-4.6 1.1-2.2 1.3-4.7.6-7.1zM663.3 325.5l32.8-116.9h6.3l32.1 116.9h-71.2zm143.5 492.9H677.2v-.4l132.6-188.9c1.1-1.6 1.7-3.4 1.7-5.4v-36.4c0-5.1-4.2-9.3-9.3-9.3h-204c-5.1 0-9.3 4.2-9.3 9.3v43c0 5.1 4.2 9.3 9.3 9.3h122.6v.4L587.7 828.9a9.35 9.35 0 00-1.7 5.4v36.4c0 5.1 4.2 9.3 9.3 9.3h211.4c5.1 0 9.3-4.2 9.3-9.3v-43a9.2 9.2 0 00-9.2-9.3zM416 702h-76V172c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v530h-76c-6.7 0-10.5 7.8-6.3 13l112 141.9a8 8 0 0012.6 0l112-141.9c4.1-5.2.4-13-6.3-13z" } }] }, "name": "sort-ascending", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SortAscendingOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SortDescendingOutlined.js": /*!*****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SortDescendingOutlined.js ***! \*****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SortDescendingOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M839.6 433.8L749 150.5a9.24 9.24 0 00-8.9-6.5h-77.4c-4.1 0-7.6 2.6-8.9 6.5l-91.3 283.3c-.3.9-.5 1.9-.5 2.9 0 5.1 4.2 9.3 9.3 9.3h56.4c4.2 0 7.8-2.8 9-6.8l17.5-61.6h89l17.3 61.5c1.1 4 4.8 6.8 9 6.8h61.2c1 0 1.9-.1 2.8-.4 2.4-.8 4.3-2.4 5.5-4.6 1.1-2.2 1.3-4.7.6-7.1zM663.3 325.5l32.8-116.9h6.3l32.1 116.9h-71.2zm143.5 492.9H677.2v-.4l132.6-188.9c1.1-1.6 1.7-3.4 1.7-5.4v-36.4c0-5.1-4.2-9.3-9.3-9.3h-204c-5.1 0-9.3 4.2-9.3 9.3v43c0 5.1 4.2 9.3 9.3 9.3h122.6v.4L587.7 828.9a9.35 9.35 0 00-1.7 5.4v36.4c0 5.1 4.2 9.3 9.3 9.3h211.4c5.1 0 9.3-4.2 9.3-9.3v-43a9.2 9.2 0 00-9.2-9.3zM310.3 167.1a8 8 0 00-12.6 0L185.7 309c-4.2 5.3-.4 13 6.3 13h76v530c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V322h76c6.7 0 10.5-7.8 6.3-13l-112-141.9z" } }] }, "name": "sort-descending", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SortDescendingOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SoundFilled.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SoundFilled.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SoundFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M892.1 737.8l-110.3-63.7a15.9 15.9 0 00-21.7 5.9l-19.9 34.5c-4.4 7.6-1.8 17.4 5.8 21.8L856.3 800a15.9 15.9 0 0021.7-5.9l19.9-34.5c4.4-7.6 1.7-17.4-5.8-21.8zM760 344a15.9 15.9 0 0021.7 5.9L892 286.2c7.6-4.4 10.2-14.2 5.8-21.8L878 230a15.9 15.9 0 00-21.7-5.9L746 287.8a15.99 15.99 0 00-5.8 21.8L760 344zm174 132H806c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16zM625.9 115c-5.9 0-11.9 1.6-17.4 5.3L254 352H90c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h164l354.5 231.7c5.5 3.6 11.6 5.3 17.4 5.3 16.7 0 32.1-13.3 32.1-32.1V147.1c0-18.8-15.4-32.1-32.1-32.1z" } }] }, "name": "sound", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (SoundFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SoundOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SoundOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SoundOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M625.9 115c-5.9 0-11.9 1.6-17.4 5.3L254 352H90c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h164l354.5 231.7c5.5 3.6 11.6 5.3 17.4 5.3 16.7 0 32.1-13.3 32.1-32.1V147.1c0-18.8-15.4-32.1-32.1-32.1zM586 803L293.4 611.7l-18-11.7H146V424h129.4l17.9-11.7L586 221v582zm348-327H806c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16zm-41.9 261.8l-110.3-63.7a15.9 15.9 0 00-21.7 5.9l-19.9 34.5c-4.4 7.6-1.8 17.4 5.8 21.8L856.3 800a15.9 15.9 0 0021.7-5.9l19.9-34.5c4.4-7.6 1.7-17.4-5.8-21.8zM760 344a15.9 15.9 0 0021.7 5.9L892 286.2c7.6-4.4 10.2-14.2 5.8-21.8L878 230a15.9 15.9 0 00-21.7-5.9L746 287.8a15.99 15.99 0 00-5.8 21.8L760 344z" } }] }, "name": "sound", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SoundOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SoundTwoTone.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SoundTwoTone.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SoundTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M275.4 424H146v176h129.4l18 11.7L586 803V221L293.3 412.3z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M892.1 737.8l-110.3-63.7a15.9 15.9 0 00-21.7 5.9l-19.9 34.5c-4.4 7.6-1.8 17.4 5.8 21.8L856.3 800a15.9 15.9 0 0021.7-5.9l19.9-34.5c4.4-7.6 1.7-17.4-5.8-21.8zM934 476H806c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16zM760 344a15.9 15.9 0 0021.7 5.9L892 286.2c7.6-4.4 10.2-14.2 5.8-21.8L878 230a15.9 15.9 0 00-21.7-5.9L746 287.8a15.99 15.99 0 00-5.8 21.8L760 344zM625.9 115c-5.9 0-11.9 1.6-17.4 5.3L254 352H90c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h164l354.5 231.7c5.5 3.6 11.6 5.3 17.4 5.3 16.7 0 32.1-13.3 32.1-32.1V147.1c0-18.8-15.4-32.1-32.1-32.1zM586 803L293.4 611.7l-18-11.7H146V424h129.4l17.9-11.7L586 221v582z", "fill": primaryColor } }] }; }, "name": "sound", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (SoundTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SplitCellsOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SplitCellsOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SplitCellsOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M938.2 508.4L787.3 389c-3-2.4-7.3-.2-7.3 3.6V478H636V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H596c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H636V546h144v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4a4.5 4.5 0 000-7.2zM428 116H144c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H244v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4a4.52 4.52 0 000 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h144v294H184V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z" } }] }, "name": "split-cells", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SplitCellsOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/StarFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/StarFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var StarFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z" } }] }, "name": "star", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (StarFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/StarOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/StarOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var StarOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z" } }] }, "name": "star", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (StarOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/StarTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/StarTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var StarTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512.5 190.4l-94.4 191.3-211.2 30.7 152.8 149-36.1 210.3 188.9-99.3 188.9 99.2-36.1-210.3 152.8-148.9-211.2-30.7z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M908.6 352.8l-253.9-36.9L541.2 85.8c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L370.3 315.9l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1L239 839.4a31.95 31.95 0 0046.4 33.7l227.1-119.4 227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM665.3 561.3l36.1 210.3-188.9-99.2-188.9 99.3 36.1-210.3-152.8-149 211.2-30.7 94.4-191.3 94.4 191.3 211.2 30.7-152.8 148.9z", "fill": primaryColor } }] }; }, "name": "star", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (StarTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/StepBackwardFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/StepBackwardFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var StepBackwardFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M347.6 528.95l383.2 301.02c14.25 11.2 35.2 1.1 35.2-16.95V210.97c0-18.05-20.95-28.14-35.2-16.94L347.6 495.05a21.53 21.53 0 000 33.9M330 864h-64a8 8 0 01-8-8V168a8 8 0 018-8h64a8 8 0 018 8v688a8 8 0 01-8 8" } }] }, "name": "step-backward", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (StepBackwardFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/StepBackwardOutlined.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/StepBackwardOutlined.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var StepBackwardOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M347.6 528.95l383.2 301.02c14.25 11.2 35.2 1.1 35.2-16.95V210.97c0-18.05-20.95-28.14-35.2-16.94L347.6 495.05a21.53 21.53 0 000 33.9M330 864h-64a8 8 0 01-8-8V168a8 8 0 018-8h64a8 8 0 018 8v688a8 8 0 01-8 8" } }] }, "name": "step-backward", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (StepBackwardOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/StepForwardFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/StepForwardFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var StepForwardFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M676.4 528.95L293.2 829.97c-14.25 11.2-35.2 1.1-35.2-16.95V210.97c0-18.05 20.95-28.14 35.2-16.94l383.2 301.02a21.53 21.53 0 010 33.9M694 864h64a8 8 0 008-8V168a8 8 0 00-8-8h-64a8 8 0 00-8 8v688a8 8 0 008 8" } }] }, "name": "step-forward", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (StepForwardFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/StepForwardOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/StepForwardOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var StepForwardOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M676.4 528.95L293.2 829.97c-14.25 11.2-35.2 1.1-35.2-16.95V210.97c0-18.05 20.95-28.14 35.2-16.94l383.2 301.02a21.53 21.53 0 010 33.9M694 864h64a8 8 0 008-8V168a8 8 0 00-8-8h-64a8 8 0 00-8 8v688a8 8 0 008 8" } }] }, "name": "step-forward", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (StepForwardOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/StockOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/StockOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var StockOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M904 747H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM165.7 621.8l39.7 39.5c3.1 3.1 8.2 3.1 11.3 0l234.7-233.9 97.6 97.3a32.11 32.11 0 0045.2 0l264.2-263.2c3.1-3.1 3.1-8.2 0-11.3l-39.7-39.6a8.03 8.03 0 00-11.3 0l-235.7 235-97.7-97.3a32.11 32.11 0 00-45.2 0L165.7 610.5a7.94 7.94 0 000 11.3z" } }] }, "name": "stock", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (StockOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/StopFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/StopFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var StopFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm234.8 736.5L223.5 277.2c16-19.7 34-37.7 53.7-53.7l523.3 523.3c-16 19.6-34 37.7-53.7 53.7z" } }] }, "name": "stop", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (StopFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/StopOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/StopOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var StopOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z" } }] }, "name": "stop", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (StopOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/StopTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/StopTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var StopTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm288.5 682.8L277.7 224C258 240 240 258 224 277.7l522.8 522.8C682.8 852.7 601 884 512 884c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372c0 89-31.3 170.8-83.5 234.8z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372c89 0 170.8-31.3 234.8-83.5L224 277.7c16-19.7 34-37.7 53.7-53.7l522.8 522.8C852.7 682.8 884 601 884 512c0-205.4-166.6-372-372-372z", "fill": secondaryColor } }] }; }, "name": "stop", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (StopTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/StrikethroughOutlined.js": /*!****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/StrikethroughOutlined.js ***! \****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var StrikethroughOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M952 474H569.9c-10-2-20.5-4-31.6-6-15.9-2.9-22.2-4.1-30.8-5.8-51.3-10-82.2-20-106.8-34.2-35.1-20.5-52.2-48.3-52.2-85.1 0-37 15.2-67.7 44-89 28.4-21 68.8-32.1 116.8-32.1 54.8 0 97.1 14.4 125.8 42.8 14.6 14.4 25.3 32.1 31.8 52.6 1.3 4.1 2.8 10 4.3 17.8.9 4.8 5.2 8.2 9.9 8.2h72.8c5.6 0 10.1-4.6 10.1-10.1v-1c-.7-6.8-1.3-12.1-2-16-7.3-43.5-28-81.7-59.7-110.3-44.4-40.5-109.7-61.8-188.7-61.8-72.3 0-137.4 18.1-183.3 50.9-25.6 18.4-45.4 41.2-58.6 67.7-13.5 27.1-20.3 58.4-20.3 92.9 0 29.5 5.7 54.5 17.3 76.5 8.3 15.7 19.6 29.5 34.1 42H72c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h433.2c2.1.4 3.9.8 5.9 1.2 30.9 6.2 49.5 10.4 66.6 15.2 23 6.5 40.6 13.3 55.2 21.5 35.8 20.2 53.3 49.2 53.3 89 0 35.3-15.5 66.8-43.6 88.8-30.5 23.9-75.6 36.4-130.5 36.4-43.7 0-80.7-8.5-110.2-25-29.1-16.3-49.1-39.8-59.7-69.5-.8-2.2-1.7-5.2-2.7-9-1.2-4.4-5.3-7.5-9.7-7.5h-79.7c-5.6 0-10.1 4.6-10.1 10.1v1c.2 2.3.4 4.2.6 5.7 6.5 48.8 30.3 88.8 70.7 118.8 47.1 34.8 113.4 53.2 191.8 53.2 84.2 0 154.8-19.8 204.2-57.3 25-18.9 44.2-42.2 57.1-69 13-27.1 19.7-57.9 19.7-91.5 0-31.8-5.8-58.4-17.8-81.4-5.8-11.2-13.1-21.5-21.8-30.8H952c4.4 0 8-3.6 8-8v-60a8 8 0 00-8-7.9z" } }] }, "name": "strikethrough", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (StrikethroughOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SubnodeOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SubnodeOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SubnodeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M688 240c-138 0-252 102.8-269.6 236H249a95.92 95.92 0 00-89-60c-53 0-96 43-96 96s43 96 96 96c40.3 0 74.8-24.8 89-60h169.3C436 681.2 550 784 688 784c150.2 0 272-121.8 272-272S838.2 240 688 240zm128 298c0 4.4-3.6 8-8 8h-86v86c0 4.4-3.6 8-8 8h-52c-4.4 0-8-3.6-8-8v-86h-86c-4.4 0-8-3.6-8-8v-52c0-4.4 3.6-8 8-8h86v-86c0-4.4 3.6-8 8-8h52c4.4 0 8 3.6 8 8v86h86c4.4 0 8 3.6 8 8v52z" } }] }, "name": "subnode", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SubnodeOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SwapLeftOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SwapLeftOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SwapLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M872 572H266.8l144.3-183c4.1-5.2.4-13-6.3-13H340c-9.8 0-19.1 4.5-25.1 12.2l-164 208c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, "name": "swap-left", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SwapLeftOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SwapOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SwapOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SwapOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, "name": "swap", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SwapOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SwapRightOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SwapRightOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SwapRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z" } }] }, "name": "swap-right", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SwapRightOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SwitcherFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SwitcherFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SwitcherFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M752 240H144c-17.7 0-32 14.3-32 32v608c0 17.7 14.3 32 32 32h608c17.7 0 32-14.3 32-32V272c0-17.7-14.3-32-32-32zM596 606c0 4.4-3.6 8-8 8H308c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h280c4.4 0 8 3.6 8 8v48zm284-494H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h576v576c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V144c0-17.7-14.3-32-32-32z" } }] }, "name": "switcher", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (SwitcherFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SwitcherOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SwitcherOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SwitcherOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M752 240H144c-17.7 0-32 14.3-32 32v608c0 17.7 14.3 32 32 32h608c17.7 0 32-14.3 32-32V272c0-17.7-14.3-32-32-32zm-40 600H184V312h528v528zm168-728H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h576v576c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V144c0-17.7-14.3-32-32-32zM300 550h296v64H300z" } }] }, "name": "switcher", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SwitcherOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SwitcherTwoTone.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SwitcherTwoTone.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SwitcherTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M184 840h528V312H184v528zm116-290h296v64H300v-64z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M880 112H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h576v576c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V144c0-17.7-14.3-32-32-32z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M752 240H144c-17.7 0-32 14.3-32 32v608c0 17.7 14.3 32 32 32h608c17.7 0 32-14.3 32-32V272c0-17.7-14.3-32-32-32zm-40 600H184V312h528v528z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M300 550h296v64H300z", "fill": primaryColor } }] }; }, "name": "switcher", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (SwitcherTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/SyncOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/SyncOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var SyncOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z" } }] }, "name": "sync", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (SyncOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TableOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TableOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TableOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 208H676V232h212v136zm0 224H676V432h212v160zM412 432h200v160H412V432zm200-64H412V232h200v136zm-476 64h212v160H136V432zm0-200h212v136H136V232zm0 424h212v136H136V656zm276 0h200v136H412V656zm476 136H676V656h212v136z" } }] }, "name": "table", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (TableOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TabletFilled.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TabletFilled.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TabletFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M800 64H224c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h576c35.3 0 64-28.7 64-64V128c0-35.3-28.7-64-64-64zM512 824c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40z" } }] }, "name": "tablet", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (TabletFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TabletOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TabletOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TabletOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M800 64H224c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h576c35.3 0 64-28.7 64-64V128c0-35.3-28.7-64-64-64zm-8 824H232V136h560v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, "name": "tablet", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (TabletOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TabletTwoTone.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TabletTwoTone.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TabletTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M800 64H224c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h576c35.3 0 64-28.7 64-64V128c0-35.3-28.7-64-64-64zm-8 824H232V136h560v752z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M232 888h560V136H232v752zm280-144c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M472 784a40 40 0 1080 0 40 40 0 10-80 0z", "fill": primaryColor } }] }; }, "name": "tablet", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (TabletTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TagFilled.js": /*!****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TagFilled.js ***! \****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TagFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M938 458.8l-29.6-312.6c-1.5-16.2-14.4-29-30.6-30.6L565.2 86h-.4c-3.2 0-5.7 1-7.6 2.9L88.9 557.2a9.96 9.96 0 000 14.1l363.8 363.8c1.9 1.9 4.4 2.9 7.1 2.9s5.2-1 7.1-2.9l468.3-468.3c2-2.1 3-5 2.8-8zM699 387c-35.3 0-64-28.7-64-64s28.7-64 64-64 64 28.7 64 64-28.7 64-64 64z" } }] }, "name": "tag", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (TagFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TagOutlined.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TagOutlined.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TagOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M938 458.8l-29.6-312.6c-1.5-16.2-14.4-29-30.6-30.6L565.2 86h-.4c-3.2 0-5.7 1-7.6 2.9L88.9 557.2a9.96 9.96 0 000 14.1l363.8 363.8c1.9 1.9 4.4 2.9 7.1 2.9s5.2-1 7.1-2.9l468.3-468.3c2-2.1 3-5 2.8-8zM459.7 834.7L189.3 564.3 589 164.6 836 188l23.4 247-399.7 399.7zM680 256c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm0 120c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z" } }] }, "name": "tag", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (TagOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TagTwoTone.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TagTwoTone.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TagTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M589 164.6L189.3 564.3l270.4 270.4L859.4 435 836 188l-247-23.4zM680 432c-48.5 0-88-39.5-88-88s39.5-88 88-88 88 39.5 88 88-39.5 88-88 88z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M680 256c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm0 120c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M938 458.8l-29.6-312.6c-1.5-16.2-14.4-29-30.6-30.6L565.2 86h-.4c-3.2 0-5.7 1-7.6 2.9L88.9 557.2a9.96 9.96 0 000 14.1l363.8 363.8a9.9 9.9 0 007.1 2.9c2.7 0 5.2-1 7.1-2.9l468.3-468.3c2-2.1 3-5 2.8-8zM459.7 834.7L189.3 564.3 589 164.6 836 188l23.4 247-399.7 399.7z", "fill": primaryColor } }] }; }, "name": "tag", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (TagTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TagsFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TagsFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TagsFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M483.2 790.3L861.4 412c1.7-1.7 2.5-4 2.3-6.3l-25.5-301.4c-.7-7.8-6.8-13.9-14.6-14.6L522.2 64.3c-2.3-.2-4.7.6-6.3 2.3L137.7 444.8a8.03 8.03 0 000 11.3l334.2 334.2c3.1 3.2 8.2 3.2 11.3 0zm122.7-533.4c18.7-18.7 49.1-18.7 67.9 0 18.7 18.7 18.7 49.1 0 67.9-18.7 18.7-49.1 18.7-67.9 0-18.7-18.7-18.7-49.1 0-67.9zm283.8 282.9l-39.6-39.5a8.03 8.03 0 00-11.3 0l-362 361.3-237.6-237a8.03 8.03 0 00-11.3 0l-39.6 39.5a8.03 8.03 0 000 11.3l243.2 242.8 39.6 39.5c3.1 3.1 8.2 3.1 11.3 0l407.3-406.6c3.1-3.1 3.1-8.2 0-11.3z" } }] }, "name": "tags", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (TagsFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TagsOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TagsOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TagsOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M483.2 790.3L861.4 412c1.7-1.7 2.5-4 2.3-6.3l-25.5-301.4c-.7-7.8-6.8-13.9-14.6-14.6L522.2 64.3c-2.3-.2-4.7.6-6.3 2.3L137.7 444.8a8.03 8.03 0 000 11.3l334.2 334.2c3.1 3.2 8.2 3.2 11.3 0zm62.6-651.7l224.6 19 19 224.6L477.5 694 233.9 450.5l311.9-311.9zm60.16 186.23a48 48 0 1067.88-67.89 48 48 0 10-67.88 67.89zM889.7 539.8l-39.6-39.5a8.03 8.03 0 00-11.3 0l-362 361.3-237.6-237a8.03 8.03 0 00-11.3 0l-39.6 39.5a8.03 8.03 0 000 11.3l243.2 242.8 39.6 39.5c3.1 3.1 8.2 3.1 11.3 0l407.3-406.6c3.1-3.1 3.1-8.2 0-11.3z" } }] }, "name": "tags", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (TagsOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TagsTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TagsTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TagsTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M477.5 694l311.9-311.8-19-224.6-224.6-19-311.9 311.9L477.5 694zm116-415.5a47.81 47.81 0 0133.9-33.9c16.6-4.4 34.2.3 46.4 12.4a47.93 47.93 0 0112.4 46.4 47.81 47.81 0 01-33.9 33.9c-16.6 4.4-34.2-.3-46.4-12.4a48.3 48.3 0 01-12.4-46.4z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M476.6 792.6c-1.7-.2-3.4-1-4.7-2.3L137.7 456.1a8.03 8.03 0 010-11.3L515.9 66.6c1.2-1.3 2.9-2.1 4.7-2.3h-.4c-2.3-.2-4.7.6-6.3 2.3L135.7 444.8a8.03 8.03 0 000 11.3l334.2 334.2c1.8 1.9 4.3 2.6 6.7 2.3z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M889.7 539.8l-39.6-39.5a8.03 8.03 0 00-11.3 0l-362 361.3-237.6-237a8.03 8.03 0 00-11.3 0l-39.6 39.5a8.03 8.03 0 000 11.3l243.2 242.8 39.6 39.5c3.1 3.1 8.2 3.1 11.3 0l407.3-406.6c3.1-3.1 3.1-8.2 0-11.3zM652.3 337.3a47.81 47.81 0 0033.9-33.9c4.4-16.6-.3-34.2-12.4-46.4a47.93 47.93 0 00-46.4-12.4 47.81 47.81 0 00-33.9 33.9c-4.4 16.6.3 34.2 12.4 46.4a48.3 48.3 0 0046.4 12.4z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M137.7 444.8a8.03 8.03 0 000 11.3l334.2 334.2c1.3 1.3 2.9 2.1 4.7 2.3 2.4.3 4.8-.5 6.6-2.3L861.4 412c1.7-1.7 2.5-4 2.3-6.3l-25.5-301.4c-.7-7.8-6.8-13.9-14.6-14.6L522.2 64.3h-1.6c-1.8.2-3.4 1-4.7 2.3L137.7 444.8zm408.1-306.2l224.6 19 19 224.6L477.5 694 233.9 450.5l311.9-311.9z", "fill": primaryColor } }] }; }, "name": "tags", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (TagsTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TaobaoCircleFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TaobaoCircleFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TaobaoCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zM315.7 291.5c27.3 0 49.5 22.1 49.5 49.4s-22.1 49.4-49.5 49.4a49.4 49.4 0 110-98.8zM366.9 578c-13.6 42.3-10.2 26.7-64.4 144.5l-78.5-49s87.7-79.8 105.6-116.2c19.2-38.4-21.1-58.9-21.1-58.9l-60.2-37.5 32.7-50.2c45.4 33.7 48.7 36.6 79.2 67.2 23.8 23.9 20.7 56.8 6.7 100.1zm427.2 55c-15.3 143.8-202.4 90.3-202.4 90.3l10.2-41.1 43.3 9.3c80 5 72.3-64.9 72.3-64.9V423c.6-77.3-72.6-85.4-204.2-38.3l30.6 8.3c-2.5 9-12.5 23.2-25.2 38.6h176v35.6h-99.1v44.5h98.7v35.7h-98.7V622c14.9-4.8 28.6-11.5 40.5-20.5l-8.7-32.5 46.5-14.4 38.8 94.9-57.3 23.9-10.2-37.8c-25.6 19.5-78.8 48-171.8 45.4-99.2 2.6-73.7-112-73.7-112l2.5-1.3H472c-.5 14.7-6.6 38.7 1.7 51.8 6.8 10.8 24.2 12.6 35.3 13.1 1.3.1 2.6.1 3.9.1v-85.3h-101v-35.7h101v-44.5H487c-22.7 24.1-43.5 44.1-43.5 44.1l-30.6-26.7c21.7-22.9 43.3-59.1 56.8-83.2-10.9 4.4-22 9.2-33.6 14.2-11.2 14.3-24.2 29-38.7 43.5.5.8-50-28.4-50-28.4 52.2-44.4 81.4-139.9 81.4-139.9l72.5 20.4s-5.9 14-18.4 35.6c290.3-82.3 307.4 50.5 307.4 50.5s19.1 91.8 3.8 235.7z" } }] }, "name": "taobao-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (TaobaoCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TaobaoCircleOutlined.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TaobaoCircleOutlined.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TaobaoCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zM315.7 291.5c27.3 0 49.5 22.1 49.5 49.4s-22.1 49.4-49.5 49.4a49.4 49.4 0 110-98.8zM366.9 578c-13.6 42.3-10.2 26.7-64.4 144.5l-78.5-49s87.7-79.8 105.6-116.2c19.2-38.4-21.1-58.9-21.1-58.9l-60.2-37.5 32.7-50.2c45.4 33.7 48.7 36.6 79.2 67.2 23.8 23.9 20.7 56.8 6.7 100.1zm427.2 55c-15.3 143.8-202.4 90.3-202.4 90.3l10.2-41.1 43.3 9.3c80 5 72.3-64.9 72.3-64.9V423c.6-77.3-72.6-85.4-204.2-38.3l30.6 8.3c-2.5 9-12.5 23.2-25.2 38.6h176v35.6h-99.1v44.5h98.7v35.7h-98.7V622c14.9-4.8 28.6-11.5 40.5-20.5l-8.7-32.5 46.5-14.4 38.8 94.9-57.3 23.9-10.2-37.8c-25.6 19.5-78.8 48-171.8 45.4-99.2 2.6-73.7-112-73.7-112l2.5-1.3H472c-.5 14.7-6.6 38.7 1.7 51.8 6.8 10.8 24.2 12.6 35.3 13.1 1.3.1 2.6.1 3.9.1v-85.3h-101v-35.7h101v-44.5H487c-22.7 24.1-43.5 44.1-43.5 44.1l-30.6-26.7c21.7-22.9 43.3-59.1 56.8-83.2-10.9 4.4-22 9.2-33.6 14.2-11.2 14.3-24.2 29-38.7 43.5.5.8-50-28.4-50-28.4 52.2-44.4 81.4-139.9 81.4-139.9l72.5 20.4s-5.9 14-18.4 35.6c290.3-82.3 307.4 50.5 307.4 50.5s19.1 91.8 3.8 235.7z" } }] }, "name": "taobao-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (TaobaoCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TaobaoOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TaobaoOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TaobaoOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M168.5 273.7a68.7 68.7 0 10137.4 0 68.7 68.7 0 10-137.4 0zm730 79.2s-23.7-184.4-426.9-70.1c17.3-30 25.6-49.5 25.6-49.5L396.4 205s-40.6 132.6-113 194.4c0 0 70.1 40.6 69.4 39.4 20.1-20.1 38.2-40.6 53.7-60.4 16.1-7 31.5-13.6 46.7-19.8-18.6 33.5-48.7 83.8-78.8 115.6l42.4 37s28.8-27.7 60.4-61.2h36v61.8H372.9v49.5h140.3v118.5c-1.7 0-3.6 0-5.4-.2-15.4-.7-39.5-3.3-49-18.2-11.5-18.1-3-51.5-2.4-71.9h-97l-3.4 1.8s-35.5 159.1 102.3 155.5c129.1 3.6 203-36 238.6-63.1l14.2 52.6 79.6-33.2-53.9-131.9-64.6 20.1 12.1 45.2c-16.6 12.4-35.6 21.7-56.2 28.4V561.3h137.1v-49.5H628.1V450h137.6v-49.5H521.3c17.6-21.4 31.5-41.1 35-53.6l-42.5-11.6c182.8-65.5 284.5-54.2 283.6 53.2v282.8s10.8 97.1-100.4 90.1l-60.2-12.9-14.2 57.1S882.5 880 903.7 680.2c21.3-200-5.2-327.3-5.2-327.3zm-707.4 18.3l-45.4 69.7 83.6 52.1s56 28.5 29.4 81.9C233.8 625.5 112 736.3 112 736.3l109 68.1c75.4-163.7 70.5-142 89.5-200.7 19.5-60.1 23.7-105.9-9.4-139.1-42.4-42.6-47-46.6-110-93.4z" } }] }, "name": "taobao", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (TaobaoOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TaobaoSquareFilled.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TaobaoSquareFilled.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TaobaoSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM315.7 291.5c27.3 0 49.5 22.1 49.5 49.4s-22.1 49.4-49.5 49.4a49.4 49.4 0 110-98.8zM366.9 578c-13.6 42.3-10.2 26.7-64.4 144.5l-78.5-49s87.7-79.8 105.6-116.2c19.2-38.4-21.1-58.9-21.1-58.9l-60.2-37.5 32.7-50.2c45.4 33.7 48.7 36.6 79.2 67.2 23.8 23.9 20.7 56.8 6.7 100.1zm427.2 55c-15.3 143.8-202.4 90.3-202.4 90.3l10.2-41.1 43.3 9.3c80 5 72.3-64.9 72.3-64.9V423c.6-77.3-72.6-85.4-204.2-38.3l30.6 8.3c-2.5 9-12.5 23.2-25.2 38.6h176v35.6h-99.1v44.5h98.7v35.7h-98.7V622c14.9-4.8 28.6-11.5 40.5-20.5l-8.7-32.5 46.5-14.4 38.8 94.9-57.3 23.9-10.2-37.8c-25.6 19.5-78.8 48-171.8 45.4-99.2 2.6-73.7-112-73.7-112l2.5-1.3H472c-.5 14.7-6.6 38.7 1.7 51.8 6.8 10.8 24.2 12.6 35.3 13.1 1.3.1 2.6.1 3.9.1v-85.3h-101v-35.7h101v-44.5H487c-22.7 24.1-43.5 44.1-43.5 44.1l-30.6-26.7c21.7-22.9 43.3-59.1 56.8-83.2-10.9 4.4-22 9.2-33.6 14.2-11.2 14.3-24.2 29-38.7 43.5.5.8-50-28.4-50-28.4 52.2-44.4 81.4-139.9 81.4-139.9l72.5 20.4s-5.9 14-18.4 35.6c290.3-82.3 307.4 50.5 307.4 50.5s19.1 91.8 3.8 235.7z" } }] }, "name": "taobao-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (TaobaoSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TeamOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TeamOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TeamOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z" } }] }, "name": "team", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (TeamOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ThunderboltFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ThunderboltFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ThunderboltFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7z" } }] }, "name": "thunderbolt", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (ThunderboltFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ThunderboltOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ThunderboltOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ThunderboltOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z" } }] }, "name": "thunderbolt", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ThunderboltOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ThunderboltTwoTone.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ThunderboltTwoTone.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ThunderboltTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M695.4 164.1H470.8L281.2 491.5h157.4l-60.3 241 319.8-305.1h-211z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M848.1 359.3H627.8L825.9 109c4.1-5.3.4-13-6.3-13H436.1c-2.8 0-5.5 1.5-6.9 4L170.1 547.5c-3.1 5.3.7 12 6.9 12h174.4L262 917.1c-1.9 7.8 7.5 13.3 13.3 7.7L853.6 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.3 732.5l60.3-241H281.2l189.6-327.4h224.6L487.1 427.4h211L378.3 732.5z", "fill": primaryColor } }] }; }, "name": "thunderbolt", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (ThunderboltTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ToTopOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ToTopOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ToTopOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M885 780H165c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM400 325.7h73.9V664c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V325.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 171a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13z" } }] }, "name": "to-top", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ToTopOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ToolFilled.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ToolFilled.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ToolFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M865.3 244.7c-.3-.3-61.1 59.8-182.1 180.6l-84.9-84.9 180.9-180.9c-95.2-57.3-217.5-42.6-296.8 36.7A244.42 244.42 0 00419 432l1.8 6.7-283.5 283.4c-6.2 6.2-6.2 16.4 0 22.6l141.4 141.4c6.2 6.2 16.4 6.2 22.6 0l283.3-283.3 6.7 1.8c83.7 22.3 173.6-.9 236-63.3 79.4-79.3 94.1-201.6 38-296.6z" } }] }, "name": "tool", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (ToolFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ToolOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ToolOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ToolOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z" } }] }, "name": "tool", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ToolOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ToolTwoTone.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ToolTwoTone.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ToolTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M706.8 488.7a32.05 32.05 0 01-45.3 0L537 364.2a32.05 32.05 0 010-45.3l132.9-132.8a184.2 184.2 0 00-144 53.5c-58.1 58.1-69.3 145.3-33.6 214.6L439.5 507c-.1 0-.1-.1-.1-.1L209.3 737l79.2 79.2 274-274.1.1.1 8.8-8.8c69.3 35.7 156.5 24.5 214.6-33.6 39.2-39.1 57.3-92.1 53.6-143.9L706.8 488.7z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z", "fill": primaryColor } }] }; }, "name": "tool", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (ToolTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TrademarkCircleFilled.js": /*!****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TrademarkCircleFilled.js ***! \****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TrademarkCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm164.7 660.2c-1.1.5-2.3.8-3.5.8h-62c-3.1 0-5.9-1.8-7.2-4.6l-74.6-159.2h-88.7V717c0 4.4-3.6 8-8 8H378c-4.4 0-8-3.6-8-8V307c0-4.4 3.6-8 8-8h155.6c98.8 0 144.2 59.9 144.2 131.1 0 70.2-43.6 106.4-78.4 119.2l80.8 164.2c2.1 3.9.4 8.7-3.5 10.7zM523.9 357h-83.4v148H522c53 0 82.8-25.6 82.8-72.4 0-50.3-32.9-75.6-80.9-75.6z" } }] }, "name": "trademark-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (TrademarkCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TrademarkCircleOutlined.js": /*!******************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TrademarkCircleOutlined.js ***! \******************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TrademarkCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm87.5-334.7c34.8-12.8 78.4-49 78.4-119.2 0-71.2-45.5-131.1-144.2-131.1H378c-4.4 0-8 3.6-8 8v410c0 4.4 3.6 8 8 8h54.5c4.4 0 8-3.6 8-8V561.2h88.7l74.6 159.2c1.3 2.8 4.1 4.6 7.2 4.6h62a7.9 7.9 0 007.1-11.5l-80.6-164.2zM522 505h-81.5V357h83.4c48 0 80.9 25.3 80.9 75.5 0 46.9-29.8 72.5-82.8 72.5z" } }] }, "name": "trademark-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (TrademarkCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TrademarkCircleTwoTone.js": /*!*****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TrademarkCircleTwoTone.js ***! \*****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TrademarkCircleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm170.7 584.2c-1.1.5-2.3.8-3.5.8h-62c-3.1 0-5.9-1.8-7.2-4.6l-74.6-159.2h-88.7V717c0 4.4-3.6 8-8 8H384c-4.4 0-8-3.6-8-8V307c0-4.4 3.6-8 8-8h155.6c98.8 0 144.2 59.9 144.2 131.1 0 70.2-43.6 106.4-78.4 119.2l80.8 164.2c2.1 3.9.4 8.7-3.5 10.7z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M529.9 357h-83.4v148H528c53 0 82.8-25.6 82.8-72.4 0-50.3-32.9-75.6-80.9-75.6z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M605.4 549.3c34.8-12.8 78.4-49 78.4-119.2 0-71.2-45.4-131.1-144.2-131.1H384c-4.4 0-8 3.6-8 8v410c0 4.4 3.6 8 8 8h54.7c4.4 0 8-3.6 8-8V561.2h88.7L610 720.4c1.3 2.8 4.1 4.6 7.2 4.6h62c1.2 0 2.4-.3 3.5-.8 3.9-2 5.6-6.8 3.5-10.7l-80.8-164.2zM528 505h-81.5V357h83.4c48 0 80.9 25.3 80.9 75.6 0 46.8-29.8 72.4-82.8 72.4z", "fill": primaryColor } }] }; }, "name": "trademark-circle", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (TrademarkCircleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TrademarkOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TrademarkOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TrademarkOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm87.5-334.7c34.8-12.8 78.4-49 78.4-119.2 0-71.2-45.5-131.1-144.2-131.1H378c-4.4 0-8 3.6-8 8v410c0 4.4 3.6 8 8 8h54.5c4.4 0 8-3.6 8-8V561.2h88.7l74.6 159.2c1.3 2.8 4.1 4.6 7.2 4.6h62a7.9 7.9 0 007.1-11.5l-80.6-164.2zM522 505h-81.5V357h83.4c48 0 80.9 25.3 80.9 75.5 0 46.9-29.8 72.5-82.8 72.5z" } }] }, "name": "trademark", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (TrademarkOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TransactionOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TransactionOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TransactionOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M668.6 320c0-4.4-3.6-8-8-8h-54.5c-3 0-5.8 1.7-7.1 4.4l-84.7 168.8H511l-84.7-168.8a8 8 0 00-7.1-4.4h-55.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.8l103.9 191.6h-57c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76v39h-76c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76V704c0 4.4 3.6 8 8 8h49.9c4.4 0 8-3.6 8-8v-63.5h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8h-76.3v-39h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8H564l103.7-191.6c.5-1.1.9-2.4.9-3.7zM157.9 504.2a352.7 352.7 0 01103.5-242.4c32.5-32.5 70.3-58.1 112.4-75.9 43.6-18.4 89.9-27.8 137.6-27.8 47.8 0 94.1 9.3 137.6 27.8 42.1 17.8 79.9 43.4 112.4 75.9 10 10 19.3 20.5 27.9 31.4l-50 39.1a8 8 0 003 14.1l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3l-47.8 37.4C770.7 146.3 648.6 82 511.5 82 277 82 86.3 270.1 82 503.8a8 8 0 008 8.2h60c4.3 0 7.8-3.5 7.9-7.8zM934 512h-60c-4.3 0-7.9 3.5-8 7.8a352.7 352.7 0 01-103.5 242.4 352.57 352.57 0 01-112.4 75.9c-43.6 18.4-89.9 27.8-137.6 27.8s-94.1-9.3-137.6-27.8a352.57 352.57 0 01-112.4-75.9c-10-10-19.3-20.5-27.9-31.4l49.9-39.1a8 8 0 00-3-14.1l-156.8-38.3c-5-1.2-9.9 2.6-9.9 7.7l-.8 161.7c0 6.7 7.7 10.5 12.9 6.3l47.8-37.4C253.3 877.7 375.4 942 512.5 942 747 942 937.7 753.9 942 520.2a8 8 0 00-8-8.2z" } }] }, "name": "transaction", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (TransactionOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TranslationOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TranslationOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TranslationOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M140 188h584v164h76V144c0-17.7-14.3-32-32-32H96c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h544v-76H140V188z" } }, { "tag": "path", "attrs": { "d": "M414.3 256h-60.6c-3.4 0-6.4 2.2-7.6 5.4L219 629.4c-.3.8-.4 1.7-.4 2.6 0 4.4 3.6 8 8 8h55.1c3.4 0 6.4-2.2 7.6-5.4L322 540h196.2L422 261.4a8.42 8.42 0 00-7.7-5.4zm12.4 228h-85.5L384 360.2 426.7 484zM936 528H800v-93c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v93H592c-13.3 0-24 10.7-24 24v176c0 13.3 10.7 24 24 24h136v152c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V752h136c13.3 0 24-10.7 24-24V552c0-13.3-10.7-24-24-24zM728 680h-88v-80h88v80zm160 0h-88v-80h88v80z" } }] }, "name": "translation", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (TranslationOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TrophyFilled.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TrophyFilled.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TrophyFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M868 160h-92v-40c0-4.4-3.6-8-8-8H256c-4.4 0-8 3.6-8 8v40h-92a44 44 0 00-44 44v148c0 81.7 60 149.6 138.2 162C265.6 630.2 359 721.8 476 734.5v105.2H280c-17.7 0-32 14.3-32 32V904c0 4.4 3.6 8 8 8h512c4.4 0 8-3.6 8-8v-32.3c0-17.7-14.3-32-32-32H548V734.5C665 721.8 758.4 630.2 773.8 514 852 501.6 912 433.7 912 352V204a44 44 0 00-44-44zM248 439.6c-37.1-11.9-64-46.7-64-87.6V232h64v207.6zM840 352c0 41-26.9 75.8-64 87.6V232h64v120z" } }] }, "name": "trophy", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (TrophyFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TrophyOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TrophyOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TrophyOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M868 160h-92v-40c0-4.4-3.6-8-8-8H256c-4.4 0-8 3.6-8 8v40h-92a44 44 0 00-44 44v148c0 81.7 60 149.6 138.2 162C265.7 630.2 359 721.7 476 734.5v105.2H280c-17.7 0-32 14.3-32 32V904c0 4.4 3.6 8 8 8h512c4.4 0 8-3.6 8-8v-32.3c0-17.7-14.3-32-32-32H548V734.5C665 721.7 758.3 630.2 773.8 514 852 501.6 912 433.7 912 352V204a44 44 0 00-44-44zM184 352V232h64v207.6a91.99 91.99 0 01-64-87.6zm520 128c0 49.1-19.1 95.4-53.9 130.1-34.8 34.8-81 53.9-130.1 53.9h-16c-49.1 0-95.4-19.1-130.1-53.9-34.8-34.8-53.9-81-53.9-130.1V184h384v296zm136-128c0 41-26.9 75.8-64 87.6V232h64v120z" } }] }, "name": "trophy", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (TrophyOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TrophyTwoTone.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TrophyTwoTone.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TrophyTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M320 480c0 49.1 19.1 95.3 53.9 130.1 34.7 34.8 81 53.9 130.1 53.9h16c49.1 0 95.3-19.1 130.1-53.9 34.8-34.7 53.9-81 53.9-130.1V184H320v296zM184 352c0 41 26.9 75.8 64 87.6-37.1-11.9-64-46.7-64-87.6zm364 382.5C665 721.8 758.4 630.2 773.8 514 758.3 630.2 665 721.7 548 734.5zM250.2 514C265.6 630.2 359 721.8 476 734.5 359 721.7 265.7 630.2 250.2 514z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M868 160h-92v-40c0-4.4-3.6-8-8-8H256c-4.4 0-8 3.6-8 8v40h-92a44 44 0 00-44 44v148c0 81.7 60 149.6 138.2 162C265.7 630.2 359 721.7 476 734.5v105.2H280c-17.7 0-32 14.3-32 32V904c0 4.4 3.6 8 8 8h512c4.4 0 8-3.6 8-8v-32.3c0-17.7-14.3-32-32-32H548V734.5C665 721.7 758.3 630.2 773.8 514 852 501.6 912 433.7 912 352V204a44 44 0 00-44-44zM248 439.6a91.99 91.99 0 01-64-87.6V232h64v207.6zM704 480c0 49.1-19.1 95.4-53.9 130.1-34.8 34.8-81 53.9-130.1 53.9h-16c-49.1 0-95.4-19.1-130.1-53.9-34.8-34.8-53.9-81-53.9-130.1V184h384v296zm136-128c0 41-26.9 75.8-64 87.6V232h64v120z", "fill": primaryColor } }] }; }, "name": "trophy", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (TrophyTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TwitterCircleFilled.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TwitterCircleFilled.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TwitterCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm215.3 337.7c.3 4.7.3 9.6.3 14.4 0 146.8-111.8 315.9-316.1 315.9-63 0-121.4-18.3-170.6-49.8 9 1 17.6 1.4 26.8 1.4 52 0 99.8-17.6 137.9-47.4-48.8-1-89.8-33-103.8-77 17.1 2.5 32.5 2.5 50.1-2a111 111 0 01-88.9-109v-1.4c14.7 8.3 32 13.4 50.1 14.1a111.13 111.13 0 01-49.5-92.4c0-20.7 5.4-39.6 15.1-56a315.28 315.28 0 00229 116.1C492 353.1 548.4 292 616.2 292c32 0 60.8 13.4 81.1 35 25.1-4.7 49.1-14.1 70.5-26.7-8.3 25.7-25.7 47.4-48.8 61.1 22.4-2.4 44-8.6 64-17.3-15.1 22.2-34 41.9-55.7 57.6z" } }] }, "name": "twitter-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (TwitterCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TwitterOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TwitterOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TwitterOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 254.3c-30.6 13.2-63.9 22.7-98.2 26.4a170.1 170.1 0 0075-94 336.64 336.64 0 01-108.2 41.2A170.1 170.1 0 00672 174c-94.5 0-170.5 76.6-170.5 170.6 0 13.2 1.6 26.4 4.2 39.1-141.5-7.4-267.7-75-351.6-178.5a169.32 169.32 0 00-23.2 86.1c0 59.2 30.1 111.4 76 142.1a172 172 0 01-77.1-21.7v2.1c0 82.9 58.6 151.6 136.7 167.4a180.6 180.6 0 01-44.9 5.8c-11.1 0-21.6-1.1-32.2-2.6C211 652 273.9 701.1 348.8 702.7c-58.6 45.9-132 72.9-211.7 72.9-14.3 0-27.5-.5-41.2-2.1C171.5 822 261.2 850 357.8 850 671.4 850 843 590.2 843 364.7c0-7.4 0-14.8-.5-22.2 33.2-24.3 62.3-54.4 85.5-88.2z" } }] }, "name": "twitter", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (TwitterOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/TwitterSquareFilled.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/TwitterSquareFilled.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var TwitterSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM727.3 401.7c.3 4.7.3 9.6.3 14.4 0 146.8-111.8 315.9-316.1 315.9-63 0-121.4-18.3-170.6-49.8 9 1 17.6 1.4 26.8 1.4 52 0 99.8-17.6 137.9-47.4-48.8-1-89.8-33-103.8-77 17.1 2.5 32.5 2.5 50.1-2a111 111 0 01-88.9-109v-1.4c14.7 8.3 32 13.4 50.1 14.1a111.13 111.13 0 01-49.5-92.4c0-20.7 5.4-39.6 15.1-56a315.28 315.28 0 00229 116.1C492 353.1 548.4 292 616.2 292c32 0 60.8 13.4 81.1 35 25.1-4.7 49.1-14.1 70.5-26.7-8.3 25.7-25.7 47.4-48.8 61.1 22.4-2.4 44-8.6 64-17.3-15.1 22.2-34 41.9-55.7 57.6z" } }] }, "name": "twitter-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (TwitterSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UnderlineOutlined.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UnderlineOutlined.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UnderlineOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M824 804H200c-4.4 0-8 3.4-8 7.6v60.8c0 4.2 3.6 7.6 8 7.6h624c4.4 0 8-3.4 8-7.6v-60.8c0-4.2-3.6-7.6-8-7.6zm-312-76c69.4 0 134.6-27.1 183.8-76.2C745 602.7 772 537.4 772 468V156c0-6.6-5.4-12-12-12h-60c-6.6 0-12 5.4-12 12v312c0 97-79 176-176 176s-176-79-176-176V156c0-6.6-5.4-12-12-12h-60c-6.6 0-12 5.4-12 12v312c0 69.4 27.1 134.6 76.2 183.8C377.3 701 442.6 728 512 728z" } }] }, "name": "underline", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (UnderlineOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UndoOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UndoOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UndoOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M511.4 124C290.5 124.3 112 303 112 523.9c0 128 60.2 242 153.8 315.2l-37.5 48c-4.1 5.3-.3 13 6.3 12.9l167-.8c5.2 0 9-4.9 7.7-9.9L369.8 727a8 8 0 00-14.1-3L315 776.1c-10.2-8-20-16.7-29.3-26a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-7.5 7.5-15.3 14.5-23.4 21.2a7.93 7.93 0 00-1.2 11.1l39.4 50.5c2.8 3.5 7.9 4.1 11.4 1.3C854.5 760.8 912 649.1 912 523.9c0-221.1-179.4-400.2-400.6-399.9z" } }] }, "name": "undo", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (UndoOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UngroupOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UngroupOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UngroupOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M736 550H288c-8.8 0-16 7.2-16 16v176c0 8.8 7.2 16 16 16h448c8.8 0 16-7.2 16-16V566c0-8.8-7.2-16-16-16zm-56 136H344v-64h336v64zm208 130c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm0 96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zM736 266H288c-8.8 0-16 7.2-16 16v176c0 8.8 7.2 16 16 16h448c8.8 0 16-7.2 16-16V282c0-8.8-7.2-16-16-16zm-56 136H344v-64h336v64zm208-194c39.8 0 72-32.2 72-72s-32.2-72-72-72-72 32.2-72 72 32.2 72 72 72zm0-96c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zM136 64c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm0 96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0 656c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm0 96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24z" } }] }, "name": "ungroup", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (UngroupOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UnlockFilled.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UnlockFilled.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UnlockFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 464H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v68c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-68c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM540 701v53c0 4.4-3.6 8-8 8h-40c-4.4 0-8-3.6-8-8v-53a48.01 48.01 0 1156 0z" } }] }, "name": "unlock", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (UnlockFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UnlockOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UnlockOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UnlockOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 464H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v68c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-68c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zm-40 376H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z" } }] }, "name": "unlock", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (UnlockOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UnlockTwoTone.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UnlockTwoTone.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UnlockTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M232 840h560V536H232v304zm280-226a48.01 48.01 0 0128 87v53c0 4.4-3.6 8-8 8h-40c-4.4 0-8-3.6-8-8v-53a48.01 48.01 0 0128-87z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M832 464H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v68c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-68c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zm-40 376H232V536h560v304z", "fill": primaryColor } }] }; }, "name": "unlock", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (UnlockTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UnorderedListOutlined.js": /*!****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UnorderedListOutlined.js ***! \****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UnorderedListOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, "name": "unordered-list", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (UnorderedListOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UpCircleFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UpCircleFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UpCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm178 555h-46.9c-10.2 0-19.9-4.9-25.9-13.2L512 460.4 406.8 605.8c-6 8.3-15.6 13.2-25.9 13.2H334c-6.5 0-10.3-7.4-6.5-12.7l178-246c3.2-4.4 9.7-4.4 12.9 0l178 246c3.9 5.3.1 12.7-6.4 12.7z" } }] }, "name": "up-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (UpCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UpCircleOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UpCircleOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UpCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M518.5 360.3a7.95 7.95 0 00-12.9 0l-178 246c-3.8 5.3 0 12.7 6.5 12.7H381c10.2 0 19.9-4.9 25.9-13.2L512 460.4l105.2 145.4c6 8.3 15.6 13.2 25.9 13.2H690c6.5 0 10.3-7.4 6.5-12.7l-178-246z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "up-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (UpCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UpCircleTwoTone.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UpCircleTwoTone.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UpCircleTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm178 479h-46.9c-10.2 0-19.9-4.9-25.9-13.2L512 460.4 406.8 605.8c-6 8.3-15.6 13.2-25.9 13.2H334c-6.5 0-10.3-7.4-6.5-12.7l178-246c3.2-4.4 9.7-4.4 12.9 0l178 246c3.9 5.3.1 12.7-6.4 12.7z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M518.4 360.3a7.95 7.95 0 00-12.9 0l-178 246c-3.8 5.3 0 12.7 6.5 12.7h46.9c10.3 0 19.9-4.9 25.9-13.2L512 460.4l105.2 145.4c6 8.3 15.7 13.2 25.9 13.2H690c6.5 0 10.3-7.4 6.4-12.7l-178-246z", "fill": primaryColor } }] }; }, "name": "up-circle", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (UpCircleTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UpOutlined.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UpOutlined.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UpOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z" } }] }, "name": "up", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (UpOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UpSquareFilled.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UpSquareFilled.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UpSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM690 624h-46.9c-10.2 0-19.9-4.9-25.9-13.2L512 465.4 406.8 610.8c-6 8.3-15.6 13.2-25.9 13.2H334c-6.5 0-10.3-7.4-6.5-12.7l178-246c3.2-4.4 9.7-4.4 12.9 0l178 246c3.9 5.3.1 12.7-6.4 12.7z" } }] }, "name": "up-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (UpSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UpSquareOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UpSquareOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UpSquareOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M334 624h46.9c10.2 0 19.9-4.9 25.9-13.2L512 465.4l105.2 145.4c6 8.3 15.6 13.2 25.9 13.2H690c6.5 0 10.3-7.4 6.5-12.7l-178-246a7.95 7.95 0 00-12.9 0l-178 246A7.96 7.96 0 00334 624z" } }, { "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, "name": "up-square", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (UpSquareOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UpSquareTwoTone.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UpSquareTwoTone.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UpSquareTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M184 840h656V184H184v656zm143.5-228.7l178-246c3.2-4.4 9.7-4.4 12.9 0l178 246c3.9 5.3.1 12.7-6.4 12.7h-46.9c-10.2 0-19.9-4.9-25.9-13.2L512 465.4 406.8 610.8c-6 8.3-15.6 13.2-25.9 13.2H334c-6.5 0-10.3-7.4-6.5-12.7z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M334 624h46.9c10.3 0 19.9-4.9 25.9-13.2L512 465.4l105.2 145.4c6 8.3 15.7 13.2 25.9 13.2H690c6.5 0 10.3-7.4 6.4-12.7l-178-246a7.95 7.95 0 00-12.9 0l-178 246c-3.8 5.3 0 12.7 6.5 12.7z", "fill": primaryColor } }] }; }, "name": "up-square", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (UpSquareTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UploadOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UploadOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UploadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" } }] }, "name": "upload", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (UploadOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UsbFilled.js": /*!****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UsbFilled.js ***! \****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UsbFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M408 312h48c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm352 120V144c0-17.7-14.3-32-32-32H296c-17.7 0-32 14.3-32 32v288c-66.2 0-120 52.1-120 116v356c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8V548c0-63.9-53.8-116-120-116zm-72 0H336V184h352v248zM568 312h48c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z" } }] }, "name": "usb", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (UsbFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UsbOutlined.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UsbOutlined.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UsbOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M760 432V144c0-17.7-14.3-32-32-32H296c-17.7 0-32 14.3-32 32v288c-66.2 0-120 52.1-120 116v356c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V548c0-24.3 21.6-44 48.1-44h495.8c26.5 0 48.1 19.7 48.1 44v356c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V548c0-63.9-53.8-116-120-116zm-424 0V184h352v248H336zm120-184h-48c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm160 0h-48c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" } }] }, "name": "usb", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (UsbOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UsbTwoTone.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UsbTwoTone.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UsbTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M759.9 504H264.1c-26.5 0-48.1 19.7-48.1 44v292h592V548c0-24.3-21.6-44-48.1-44z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M456 248h-48c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm160 0h-48c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M760 432V144c0-17.7-14.3-32-32-32H296c-17.7 0-32 14.3-32 32v288c-66.2 0-120 52.1-120 116v356c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8V548c0-63.9-53.8-116-120-116zM336 184h352v248H336V184zm472 656H216V548c0-24.3 21.6-44 48.1-44h495.8c26.5 0 48.1 19.7 48.1 44v292z", "fill": primaryColor } }] }; }, "name": "usb", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (UsbTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UserAddOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UserAddOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UserAddOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h.1c3 0 4.4-3.6 2.2-5.6a371.67 371.67 0 00-103.7-65.8c-.4-.2-.8-.3-1.2-.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-.4.2-.8.3-1.2.5-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00137 888.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1a8.1 8.1 0 008.1.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4A171.2 171.2 0 01340.5 349c0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4A171.2 171.2 0 01683.9 349c0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, "name": "user-add", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (UserAddOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UserDeleteOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UserDeleteOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UserDeleteOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M678.3 655.4c24.2-13 51.9-20.4 81.4-20.4h.1c3 0 4.4-3.6 2.2-5.6a371.67 371.67 0 00-103.7-65.8c-.4-.2-.8-.3-1.2-.5C719.2 518 759.6 444.7 759.6 362c0-137-110.8-248-247.5-248S264.7 225 264.7 362c0 82.7 40.4 156 102.6 201.1-.4.2-.8.3-1.2.5-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00137 901.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 641.2 432.2 610 512.2 610c56.7 0 111.1 15.7 158 45.1a8.1 8.1 0 008.1.3zM512.2 534c-45.8 0-88.9-17.9-121.4-50.4A171.2 171.2 0 01340.5 362c0-45.9 17.9-89.1 50.3-121.6S466.3 190 512.2 190s88.9 17.9 121.4 50.4A171.2 171.2 0 01683.9 362c0 45.9-17.9 89.1-50.3 121.6C601.1 516.1 558 534 512.2 534zM880 772H640c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h240c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, "name": "user-delete", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (UserDeleteOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UserOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UserOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UserOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z" } }] }, "name": "user", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (UserOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UserSwitchOutlined.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UserSwitchOutlined.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UserSwitchOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M759 335c0-137-111-248-248-248S263 198 263 335c0 82.8 40.6 156.2 103 201.2-.4.2-.7.3-.9.4-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00136 874.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C356 614.2 431 583 511 583c137 0 248-111 248-248zM511 507c-95 0-172-77-172-172s77-172 172-172 172 77 172 172-77 172-172 172zm105 221h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H703.5l47.2-60.1a8.1 8.1 0 001.7-4.9c0-4.4-3.6-8-8-8h-72.6c-4.9 0-9.5 2.3-12.6 6.1l-68.5 87.1c-4.4 5.6-6.8 12.6-6.8 19.8.1 17.7 14.4 32 32.1 32zm240 64H592c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h176.5l-47.2 60.1a8.1 8.1 0 00-1.7 4.9c0 4.4 3.6 8 8 8h72.6c4.9 0 9.5-2.3 12.6-6.1l68.5-87.1c4.4-5.6 6.8-12.6 6.8-19.8-.1-17.7-14.4-32-32.1-32z" } }] }, "name": "user-switch", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (UserSwitchOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UsergroupAddOutlined.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UsergroupAddOutlined.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UsergroupAddOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M892 772h-80v-80c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v80h-80c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h80v80c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-80h80c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM373.5 498.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.8-1.7-203.2 89.2-203.2 200 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.8-1.1 6.4-4.8 5.9-8.8zM824 472c0-109.4-87.9-198.3-196.9-200C516.3 270.3 424 361.2 424 472c0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C357 742.6 326 814.8 324 891.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5C505.8 695.7 563 672 624 672c110.4 0 200-89.5 200-200zm-109.5 90.5C690.3 586.7 658.2 600 624 600s-66.3-13.3-90.5-37.5a127.26 127.26 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4-.1 34.2-13.4 66.3-37.6 90.5z" } }] }, "name": "usergroup-add", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (UsergroupAddOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/UsergroupDeleteOutlined.js": /*!******************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/UsergroupDeleteOutlined.js ***! \******************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var UsergroupDeleteOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M888 784H664c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h224c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM373.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7zM824 484c0-109.4-87.9-198.3-196.9-200C516.3 282.3 424 373.2 424 484c0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C357 754.6 326 826.8 324 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5C505.8 707.7 563 684 624 684c110.4 0 200-89.5 200-200zm-109.5 90.5C690.3 598.7 658.2 612 624 612s-66.3-13.3-90.5-37.5a127.26 127.26 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4-.1 34.2-13.4 66.3-37.6 90.5z" } }] }, "name": "usergroup-delete", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (UsergroupDeleteOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/VerifiedOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/VerifiedOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var VerifiedOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M447.8 588.8l-7.3-32.5c-.2-1-.6-1.9-1.1-2.7a7.94 7.94 0 00-11.1-2.2L405 567V411c0-4.4-3.6-8-8-8h-81c-4.4 0-8 3.6-8 8v36c0 4.4 3.6 8 8 8h37v192.4a8 8 0 0012.7 6.5l79-56.8c2.6-1.9 3.8-5.1 3.1-8.3zm-56.7-216.6l.2.2c3.2 3 8.3 2.8 11.3-.5l24.1-26.2a8.1 8.1 0 00-.3-11.2l-53.7-52.1a8 8 0 00-11.2.1l-24.7 24.7c-3.1 3.1-3.1 8.2.1 11.3l54.2 53.7z" } }, { "tag": "path", "attrs": { "d": "M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6z" } }, { "tag": "path", "attrs": { "d": "M452 297v36c0 4.4 3.6 8 8 8h108v274h-38V405c0-4.4-3.6-8-8-8h-35c-4.4 0-8 3.6-8 8v210h-31c-4.4 0-8 3.6-8 8v37c0 4.4 3.6 8 8 8h244c4.4 0 8-3.6 8-8v-37c0-4.4-3.6-8-8-8h-72V493h58c4.4 0 8-3.6 8-8v-35c0-4.4-3.6-8-8-8h-58V341h63c4.4 0 8-3.6 8-8v-36c0-4.4-3.6-8-8-8H460c-4.4 0-8 3.6-8 8z" } }] }, "name": "verified", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (VerifiedOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/VerticalAlignBottomOutlined.js": /*!**********************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/VerticalAlignBottomOutlined.js ***! \**********************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var VerticalAlignBottomOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M859.9 780H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM505.7 669a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V176c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8z" } }] }, "name": "vertical-align-bottom", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (VerticalAlignBottomOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/VerticalAlignMiddleOutlined.js": /*!**********************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/VerticalAlignMiddleOutlined.js ***! \**********************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var VerticalAlignMiddleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M859.9 474H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zm-353.6-74.7c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H550V104c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v156h-62.8c-6 0-9.4 7-5.7 11.7l100.8 127.6zm11.4 225.4a7.14 7.14 0 00-11.3 0L405.6 752.3a7.23 7.23 0 005.7 11.7H474v156c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V764h62.8c6 0 9.4-7 5.7-11.7L517.7 624.7z" } }] }, "name": "vertical-align-middle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (VerticalAlignMiddleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/VerticalAlignTopOutlined.js": /*!*******************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/VerticalAlignTopOutlined.js ***! \*******************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var VerticalAlignTopOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M859.9 168H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM518.3 355a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V848c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V509.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 355z" } }] }, "name": "vertical-align-top", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (VerticalAlignTopOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/VerticalLeftOutlined.js": /*!***************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/VerticalLeftOutlined.js ***! \***************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var VerticalLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M762 164h-64c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V172c0-4.4-3.6-8-8-8zm-508 0v72.4c0 9.5 4.2 18.4 11.4 24.5L564.6 512 265.4 763.1c-7.2 6.1-11.4 15-11.4 24.5V860c0 6.8 7.9 10.5 13.1 6.1L689 512 267.1 157.9A7.95 7.95 0 00254 164z" } }] }, "name": "vertical-left", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (VerticalLeftOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/VerticalRightOutlined.js": /*!****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/VerticalRightOutlined.js ***! \****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var VerticalRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M326 164h-64c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V172c0-4.4-3.6-8-8-8zm444 72.4V164c0-6.8-7.9-10.5-13.1-6.1L335 512l421.9 354.1c5.2 4.4 13.1.7 13.1-6.1v-72.4c0-9.4-4.2-18.4-11.4-24.5L459.4 512l299.2-251.1c7.2-6.1 11.4-15.1 11.4-24.5z" } }] }, "name": "vertical-right", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (VerticalRightOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/VideoCameraAddOutlined.js": /*!*****************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/VideoCameraAddOutlined.js ***! \*****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var VideoCameraAddOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M368 724H252V608c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v116H72c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h116v116c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V788h116c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" } }, { "tag": "path", "attrs": { "d": "M912 302.3L784 376V224c0-35.3-28.7-64-64-64H128c-35.3 0-64 28.7-64 64v352h72V232h576v560H448v72h272c35.3 0 64-28.7 64-64V648l128 73.7c21.3 12.3 48-3.1 48-27.6V330c0-24.6-26.7-40-48-27.7zM888 625l-104-59.8V458.9L888 399v226z" } }, { "tag": "path", "attrs": { "d": "M320 360c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H208c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h112z" } }] }, "name": "video-camera-add", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (VideoCameraAddOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/VideoCameraFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/VideoCameraFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var VideoCameraFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M912 302.3L784 376V224c0-35.3-28.7-64-64-64H128c-35.3 0-64 28.7-64 64v576c0 35.3 28.7 64 64 64h592c35.3 0 64-28.7 64-64V648l128 73.7c21.3 12.3 48-3.1 48-27.6V330c0-24.6-26.7-40-48-27.7zM328 352c0 4.4-3.6 8-8 8H208c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h112c4.4 0 8 3.6 8 8v48zm560 273l-104-59.8V458.9L888 399v226z" } }] }, "name": "video-camera", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (VideoCameraFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/VideoCameraOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/VideoCameraOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var VideoCameraOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M912 302.3L784 376V224c0-35.3-28.7-64-64-64H128c-35.3 0-64 28.7-64 64v576c0 35.3 28.7 64 64 64h592c35.3 0 64-28.7 64-64V648l128 73.7c21.3 12.3 48-3.1 48-27.6V330c0-24.6-26.7-40-48-27.7zM712 792H136V232h576v560zm176-167l-104-59.8V458.9L888 399v226zM208 360h112c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H208c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z" } }] }, "name": "video-camera", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (VideoCameraOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/VideoCameraTwoTone.js": /*!*************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/VideoCameraTwoTone.js ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var VideoCameraTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M136 792h576V232H136v560zm64-488c0-4.4 3.6-8 8-8h112c4.4 0 8 3.6 8 8v48c0 4.4-3.6 8-8 8H208c-4.4 0-8-3.6-8-8v-48z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M912 302.3L784 376V224c0-35.3-28.7-64-64-64H128c-35.3 0-64 28.7-64 64v576c0 35.3 28.7 64 64 64h592c35.3 0 64-28.7 64-64V648l128 73.7c21.3 12.3 48-3.1 48-27.6V330c0-24.6-26.7-40-48-27.7zM712 792H136V232h576v560zm176-167l-104-59.8V458.9L888 399v226z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M208 360h112c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H208c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z", "fill": primaryColor } }] }; }, "name": "video-camera", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (VideoCameraTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/WalletFilled.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/WalletFilled.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var WalletFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-32 464H528V448h320v128zm-268-64a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, "name": "wallet", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (WalletFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/WalletOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/WalletOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var WalletOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 464H528V448h312v128zm0 264H184V184h656v200H496c-17.7 0-32 14.3-32 32v192c0 17.7 14.3 32 32 32h344v200zM580 512a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, "name": "wallet", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (WalletOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/WalletTwoTone.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/WalletTwoTone.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var WalletTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 464H528V448h312v128zm0-192H496c-17.7 0-32 14.3-32 32v192c0 17.7 14.3 32 32 32h344v200H184V184h656v200z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M528 576h312V448H528v128zm92-104c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M580 512a40 40 0 1080 0 40 40 0 10-80 0z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M184 840h656V640H496c-17.7 0-32-14.3-32-32V416c0-17.7 14.3-32 32-32h344V184H184v656z", "fill": secondaryColor } }] }; }, "name": "wallet", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (WalletTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/WarningFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/WarningFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var WarningFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "warning", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (WarningFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/WarningOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/WarningOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var WarningOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z" } }] }, "name": "warning", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (WarningOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/WarningTwoTone.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/WarningTwoTone.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var WarningTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M172.2 828.1h679.6L512 239.9 172.2 828.1zM560 720a48.01 48.01 0 01-96 0 48.01 48.01 0 0196 0zm-16-304v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8z", "fill": primaryColor } }] }; }, "name": "warning", "theme": "twotone" }; /* harmony default export */ __webpack_exports__["a"] = (WarningTwoTone); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/WechatFilled.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/WechatFilled.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var WechatFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M690.1 377.4c5.9 0 11.8.2 17.6.5-24.4-128.7-158.3-227.1-319.9-227.1C209 150.8 64 271.4 64 420.2c0 81.1 43.6 154.2 111.9 203.6a21.5 21.5 0 019.1 17.6c0 2.4-.5 4.6-1.1 6.9-5.5 20.3-14.2 52.8-14.6 54.3-.7 2.6-1.7 5.2-1.7 7.9 0 5.9 4.8 10.8 10.8 10.8 2.3 0 4.2-.9 6.2-2l70.9-40.9c5.3-3.1 11-5 17.2-5 3.2 0 6.4.5 9.5 1.4 33.1 9.5 68.8 14.8 105.7 14.8 6 0 11.9-.1 17.8-.4-7.1-21-10.9-43.1-10.9-66 0-135.8 132.2-245.8 295.3-245.8zm-194.3-86.5c23.8 0 43.2 19.3 43.2 43.1s-19.3 43.1-43.2 43.1c-23.8 0-43.2-19.3-43.2-43.1s19.4-43.1 43.2-43.1zm-215.9 86.2c-23.8 0-43.2-19.3-43.2-43.1s19.3-43.1 43.2-43.1 43.2 19.3 43.2 43.1-19.4 43.1-43.2 43.1zm586.8 415.6c56.9-41.2 93.2-102 93.2-169.7 0-124-120.8-224.5-269.9-224.5-149 0-269.9 100.5-269.9 224.5S540.9 847.5 690 847.5c30.8 0 60.6-4.4 88.1-12.3 2.6-.8 5.2-1.2 7.9-1.2 5.2 0 9.9 1.6 14.3 4.1l59.1 34c1.7 1 3.3 1.7 5.2 1.7a9 9 0 006.4-2.6 9 9 0 002.6-6.4c0-2.2-.9-4.4-1.4-6.6-.3-1.2-7.6-28.3-12.2-45.3-.5-1.9-.9-3.8-.9-5.7.1-5.9 3.1-11.2 7.6-14.5zM600.2 587.2c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9c0 19.8-16.2 35.9-36 35.9zm179.9 0c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9a36.08 36.08 0 01-36 35.9z" } }] }, "name": "wechat", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (WechatFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/WechatOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/WechatOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var WechatOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M690.1 377.4c5.9 0 11.8.2 17.6.5-24.4-128.7-158.3-227.1-319.9-227.1C209 150.8 64 271.4 64 420.2c0 81.1 43.6 154.2 111.9 203.6a21.5 21.5 0 019.1 17.6c0 2.4-.5 4.6-1.1 6.9-5.5 20.3-14.2 52.8-14.6 54.3-.7 2.6-1.7 5.2-1.7 7.9 0 5.9 4.8 10.8 10.8 10.8 2.3 0 4.2-.9 6.2-2l70.9-40.9c5.3-3.1 11-5 17.2-5 3.2 0 6.4.5 9.5 1.4 33.1 9.5 68.8 14.8 105.7 14.8 6 0 11.9-.1 17.8-.4-7.1-21-10.9-43.1-10.9-66 0-135.8 132.2-245.8 295.3-245.8zm-194.3-86.5c23.8 0 43.2 19.3 43.2 43.1s-19.3 43.1-43.2 43.1c-23.8 0-43.2-19.3-43.2-43.1s19.4-43.1 43.2-43.1zm-215.9 86.2c-23.8 0-43.2-19.3-43.2-43.1s19.3-43.1 43.2-43.1 43.2 19.3 43.2 43.1-19.4 43.1-43.2 43.1zm586.8 415.6c56.9-41.2 93.2-102 93.2-169.7 0-124-120.8-224.5-269.9-224.5-149 0-269.9 100.5-269.9 224.5S540.9 847.5 690 847.5c30.8 0 60.6-4.4 88.1-12.3 2.6-.8 5.2-1.2 7.9-1.2 5.2 0 9.9 1.6 14.3 4.1l59.1 34c1.7 1 3.3 1.7 5.2 1.7a9 9 0 006.4-2.6 9 9 0 002.6-6.4c0-2.2-.9-4.4-1.4-6.6-.3-1.2-7.6-28.3-12.2-45.3-.5-1.9-.9-3.8-.9-5.7.1-5.9 3.1-11.2 7.6-14.5zM600.2 587.2c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9c0 19.8-16.2 35.9-36 35.9zm179.9 0c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9a36.08 36.08 0 01-36 35.9z" } }] }, "name": "wechat", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (WechatOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/WeiboCircleFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/WeiboCircleFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var WeiboCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-44.4 672C353.1 736 236 680.4 236 588.9c0-47.8 30.2-103.1 82.3-155.3 69.5-69.6 150.6-101.4 181.1-70.8 13.5 13.5 14.8 36.8 6.1 64.6-4.5 14 13.1 6.3 13.1 6.3 56.2-23.6 105.2-25 123.1.7 9.6 13.7 8.6 32.8-.2 55.1-4.1 10.2 1.3 11.8 9 14.1 31.7 9.8 66.9 33.6 66.9 75.5.2 69.5-99.7 156.9-249.8 156.9zm207.3-290.8a34.9 34.9 0 00-7.2-34.1 34.68 34.68 0 00-33.1-10.7 18.24 18.24 0 01-7.6-35.7c24.1-5.1 50.1 2.3 67.7 21.9 17.7 19.6 22.4 46.3 14.9 69.8a18.13 18.13 0 01-22.9 11.7 18.18 18.18 0 01-11.8-22.9zm106 34.3s0 .1 0 0a21.1 21.1 0 01-26.6 13.7 21.19 21.19 0 01-13.6-26.7c11-34.2 4-73.2-21.7-101.8a104.04 104.04 0 00-98.9-32.1 21.14 21.14 0 01-25.1-16.3 21.07 21.07 0 0116.2-25.1c49.4-10.5 102.8 4.8 139.1 45.1 36.3 40.2 46.1 95.1 30.6 143.2zm-334.5 6.1c-91.4 9-160.7 65.1-154.7 125.2 5.9 60.1 84.8 101.5 176.2 92.5 91.4-9.1 160.7-65.1 154.7-125.3-5.9-60.1-84.8-101.5-176.2-92.4zm80.2 141.7c-18.7 42.3-72.3 64.8-117.8 50.1-43.9-14.2-62.5-57.7-43.3-96.8 18.9-38.4 68-60.1 111.5-48.8 45 11.7 68 54.2 49.6 95.5zm-93-32.2c-14.2-5.9-32.4.2-41.2 13.9-8.8 13.8-4.7 30.2 9.3 36.6 14.3 6.5 33.2.3 42-13.8 8.8-14.3 4.2-30.6-10.1-36.7zm34.9-14.5c-5.4-2.2-12.2.5-15.4 5.8-3.1 5.4-1.4 11.5 4.1 13.8 5.5 2.3 12.6-.3 15.8-5.8 3-5.6 1-11.8-4.5-13.8z" } }] }, "name": "weibo-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (WeiboCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/WeiboCircleOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/WeiboCircleOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var WeiboCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-44.4 672C353.1 736 236 680.4 236 588.9c0-47.8 30.2-103.1 82.3-155.3 69.5-69.6 150.6-101.4 181.1-70.8 13.5 13.5 14.8 36.8 6.1 64.6-4.5 14 13.1 6.3 13.1 6.3 56.2-23.6 105.2-25 123.1.7 9.6 13.7 8.6 32.8-.2 55.1-4.1 10.2 1.3 11.8 9 14.1 31.7 9.8 66.9 33.6 66.9 75.5.2 69.5-99.7 156.9-249.8 156.9zm207.3-290.8a34.9 34.9 0 00-7.2-34.1 34.68 34.68 0 00-33.1-10.7 18.24 18.24 0 01-7.6-35.7c24.1-5.1 50.1 2.3 67.7 21.9 17.7 19.6 22.4 46.3 14.9 69.8a18.13 18.13 0 01-22.9 11.7 18.18 18.18 0 01-11.8-22.9zm106 34.3s0 .1 0 0a21.1 21.1 0 01-26.6 13.7 21.19 21.19 0 01-13.6-26.7c11-34.2 4-73.2-21.7-101.8a104.04 104.04 0 00-98.9-32.1 21.14 21.14 0 01-25.1-16.3 21.07 21.07 0 0116.2-25.1c49.4-10.5 102.8 4.8 139.1 45.1 36.3 40.2 46.1 95.1 30.6 143.2zm-334.5 6.1c-91.4 9-160.7 65.1-154.7 125.2 5.9 60.1 84.8 101.5 176.2 92.5 91.4-9.1 160.7-65.1 154.7-125.3-5.9-60.1-84.8-101.5-176.2-92.4zm80.2 141.7c-18.7 42.3-72.3 64.8-117.8 50.1-43.9-14.2-62.5-57.7-43.3-96.8 18.9-38.4 68-60.1 111.5-48.8 45 11.7 68 54.2 49.6 95.5zm-93-32.2c-14.2-5.9-32.4.2-41.2 13.9-8.8 13.8-4.7 30.2 9.3 36.6 14.3 6.5 33.2.3 42-13.8 8.8-14.3 4.2-30.6-10.1-36.7zm34.9-14.5c-5.4-2.2-12.2.5-15.4 5.8-3.1 5.4-1.4 11.5 4.1 13.8 5.5 2.3 12.6-.3 15.8-5.8 3-5.6 1-11.8-4.5-13.8z" } }] }, "name": "weibo-circle", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (WeiboCircleOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/WeiboOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/WeiboOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var WeiboOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M457.3 543c-68.1-17.7-145 16.2-174.6 76.2-30.1 61.2-1 129.1 67.8 151.3 71.2 23 155.2-12.2 184.4-78.3 28.7-64.6-7.2-131-77.6-149.2zm-52 156.2c-13.8 22.1-43.5 31.7-65.8 21.6-22-10-28.5-35.7-14.6-57.2 13.7-21.4 42.3-31 64.4-21.7 22.4 9.5 29.6 35 16 57.3zm45.5-58.5c-5 8.6-16.1 12.7-24.7 9.1-8.5-3.5-11.2-13.1-6.4-21.5 5-8.4 15.6-12.4 24.1-9.1 8.7 3.2 11.8 12.9 7 21.5zm334.5-197.2c15 4.8 31-3.4 35.9-18.3 11.8-36.6 4.4-78.4-23.2-109a111.39 111.39 0 00-106-34.3 28.45 28.45 0 00-21.9 33.8 28.39 28.39 0 0033.8 21.8c18.4-3.9 38.3 1.8 51.9 16.7a54.2 54.2 0 0111.3 53.3 28.45 28.45 0 0018.2 36zm99.8-206c-56.7-62.9-140.4-86.9-217.7-70.5a32.98 32.98 0 00-25.4 39.3 33.12 33.12 0 0039.3 25.5c55-11.7 114.4 5.4 154.8 50.1 40.3 44.7 51.2 105.7 34 159.1-5.6 17.4 3.9 36 21.3 41.7 17.4 5.6 36-3.9 41.6-21.2v-.1c24.1-75.4 8.9-161.1-47.9-223.9zM729 499c-12.2-3.6-20.5-6.1-14.1-22.1 13.8-34.7 15.2-64.7.3-86-28-40.1-104.8-37.9-192.8-1.1 0 0-27.6 12.1-20.6-9.8 13.5-43.5 11.5-79.9-9.6-101-47.7-47.8-174.6 1.8-283.5 110.6C127.3 471.1 80 557.5 80 632.2 80 775.1 263.2 862 442.5 862c235 0 391.3-136.5 391.3-245 0-65.5-55.2-102.6-104.8-118zM443 810.8c-143 14.1-266.5-50.5-275.8-144.5-9.3-93.9 99.2-181.5 242.2-195.6 143-14.2 266.5 50.5 275.8 144.4C694.4 709 586 796.6 443 810.8z" } }] }, "name": "weibo", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (WeiboOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/WeiboSquareFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/WeiboSquareFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var WeiboSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M433.6 595.1c-14.2-5.9-32.4.2-41.2 13.9-8.8 13.8-4.7 30.2 9.3 36.6 14.3 6.5 33.2.3 42-13.8 8.8-14.3 4.2-30.6-10.1-36.7zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM467.6 736C353.1 736 236 680.4 236 588.9c0-47.8 30.2-103.1 82.3-155.3 69.5-69.6 150.6-101.4 181.1-70.8 13.5 13.5 14.8 36.8 6.1 64.6-4.5 14 13.1 6.3 13.1 6.3 56.2-23.6 105.2-25 123.1.7 9.6 13.7 8.6 32.8-.2 55.1-4.1 10.2 1.3 11.8 9 14.1 31.7 9.8 66.9 33.6 66.9 75.5.2 69.5-99.7 156.9-249.8 156.9zm207.3-290.8a34.9 34.9 0 00-7.2-34.1 34.68 34.68 0 00-33.1-10.7 18.24 18.24 0 01-7.6-35.7c24.1-5.1 50.1 2.3 67.7 21.9 17.7 19.6 22.4 46.3 14.9 69.8a18.13 18.13 0 01-22.9 11.7 18.18 18.18 0 01-11.8-22.9zm106 34.3s0 .1 0 0a21.1 21.1 0 01-26.6 13.7 21.19 21.19 0 01-13.6-26.7c11-34.2 4-73.2-21.7-101.8a104.04 104.04 0 00-98.9-32.1 21.14 21.14 0 01-25.1-16.3 21.07 21.07 0 0116.2-25.1c49.4-10.5 102.8 4.8 139.1 45.1 36.3 40.2 46.1 95.1 30.6 143.2zm-334.5 6.1c-91.4 9-160.7 65.1-154.7 125.2 5.9 60.1 84.8 101.5 176.2 92.5 91.4-9.1 160.7-65.1 154.7-125.3-5.9-60.1-84.8-101.5-176.2-92.4zm80.2 141.7c-18.7 42.3-72.3 64.8-117.8 50.1-43.9-14.2-62.5-57.7-43.3-96.8 18.9-38.4 68-60.1 111.5-48.8 45 11.7 68 54.2 49.6 95.5zm-58.1-46.7c-5.4-2.2-12.2.5-15.4 5.8-3.1 5.4-1.4 11.5 4.1 13.8 5.5 2.3 12.6-.3 15.8-5.8 3-5.6 1-11.8-4.5-13.8z" } }] }, "name": "weibo-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (WeiboSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/WeiboSquareOutlined.js": /*!**************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/WeiboSquareOutlined.js ***! \**************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var WeiboSquareOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M433.6 595.1c-14.2-5.9-32.4.2-41.2 13.9-8.8 13.8-4.7 30.2 9.3 36.6 14.3 6.5 33.2.3 42-13.8 8.8-14.3 4.2-30.6-10.1-36.7zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM467.6 736C353.1 736 236 680.4 236 588.9c0-47.8 30.2-103.1 82.3-155.3 69.5-69.6 150.6-101.4 181.1-70.8 13.5 13.5 14.8 36.8 6.1 64.6-4.5 14 13.1 6.3 13.1 6.3 56.2-23.6 105.2-25 123.1.7 9.6 13.7 8.6 32.8-.2 55.1-4.1 10.2 1.3 11.8 9 14.1 31.7 9.8 66.9 33.6 66.9 75.5.2 69.5-99.7 156.9-249.8 156.9zm207.3-290.8a34.9 34.9 0 00-7.2-34.1 34.68 34.68 0 00-33.1-10.7 18.24 18.24 0 01-7.6-35.7c24.1-5.1 50.1 2.3 67.7 21.9 17.7 19.6 22.4 46.3 14.9 69.8a18.13 18.13 0 01-22.9 11.7 18.18 18.18 0 01-11.8-22.9zm106 34.3s0 .1 0 0a21.1 21.1 0 01-26.6 13.7 21.19 21.19 0 01-13.6-26.7c11-34.2 4-73.2-21.7-101.8a104.04 104.04 0 00-98.9-32.1 21.14 21.14 0 01-25.1-16.3 21.07 21.07 0 0116.2-25.1c49.4-10.5 102.8 4.8 139.1 45.1 36.3 40.2 46.1 95.1 30.6 143.2zm-334.5 6.1c-91.4 9-160.7 65.1-154.7 125.2 5.9 60.1 84.8 101.5 176.2 92.5 91.4-9.1 160.7-65.1 154.7-125.3-5.9-60.1-84.8-101.5-176.2-92.4zm80.2 141.7c-18.7 42.3-72.3 64.8-117.8 50.1-43.9-14.2-62.5-57.7-43.3-96.8 18.9-38.4 68-60.1 111.5-48.8 45 11.7 68 54.2 49.6 95.5zm-58.1-46.7c-5.4-2.2-12.2.5-15.4 5.8-3.1 5.4-1.4 11.5 4.1 13.8 5.5 2.3 12.6-.3 15.8-5.8 3-5.6 1-11.8-4.5-13.8z" } }] }, "name": "weibo-square", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (WeiboSquareOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/WhatsAppOutlined.js": /*!***********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/WhatsAppOutlined.js ***! \***********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var WhatsAppOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M713.5 599.9c-10.9-5.6-65.2-32.2-75.3-35.8-10.1-3.8-17.5-5.6-24.8 5.6-7.4 11.1-28.4 35.8-35 43.3-6.4 7.4-12.9 8.3-23.8 2.8-64.8-32.4-107.3-57.8-150-131.1-11.3-19.5 11.3-18.1 32.4-60.2 3.6-7.4 1.8-13.7-1-19.3-2.8-5.6-24.8-59.8-34-81.9-8.9-21.5-18.1-18.5-24.8-18.9-6.4-.4-13.7-.4-21.1-.4-7.4 0-19.3 2.8-29.4 13.7-10.1 11.1-38.6 37.8-38.6 92s39.5 106.7 44.9 114.1c5.6 7.4 77.7 118.6 188.4 166.5 70 30.2 97.4 32.8 132.4 27.6 21.3-3.2 65.2-26.6 74.3-52.5 9.1-25.8 9.1-47.9 6.4-52.5-2.7-4.9-10.1-7.7-21-13z" } }, { "tag": "path", "attrs": { "d": "M925.2 338.4c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z" } }] }, "name": "whats-app", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (WhatsAppOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/WifiOutlined.js": /*!*******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/WifiOutlined.js ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var WifiOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M723 620.5C666.8 571.6 593.4 542 513 542s-153.8 29.6-210.1 78.6a8.1 8.1 0 00-.8 11.2l36 42.9c2.9 3.4 8 3.8 11.4.9C393.1 637.2 450.3 614 513 614s119.9 23.2 163.5 61.5c3.4 2.9 8.5 2.5 11.4-.9l36-42.9c2.8-3.3 2.4-8.3-.9-11.2zm117.4-140.1C751.7 406.5 637.6 362 513 362s-238.7 44.5-327.5 118.4a8.05 8.05 0 00-1 11.3l36 42.9c2.8 3.4 7.9 3.8 11.2 1C308 472.2 406.1 434 513 434s205 38.2 281.2 101.6c3.4 2.8 8.4 2.4 11.2-1l36-42.9c2.8-3.4 2.4-8.5-1-11.3zm116.7-139C835.7 241.8 680.3 182 511 182c-168.2 0-322.6 59-443.7 157.4a8 8 0 00-1.1 11.4l36 42.9c2.8 3.3 7.8 3.8 11.1 1.1C222 306.7 360.3 254 511 254c151.8 0 291 53.5 400 142.7 3.4 2.8 8.4 2.3 11.2-1.1l36-42.9c2.9-3.4 2.4-8.5-1.1-11.3zM448 778a64 64 0 10128 0 64 64 0 10-128 0z" } }] }, "name": "wifi", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (WifiOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/WindowsFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/WindowsFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var WindowsFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M523.8 191.4v288.9h382V128.1zm0 642.2l382 62.2v-352h-382zM120.1 480.2H443V201.9l-322.9 53.5zm0 290.4L443 823.2V543.8H120.1z" } }] }, "name": "windows", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (WindowsFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/WindowsOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/WindowsOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var WindowsOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M120.1 770.6L443 823.2V543.8H120.1v226.8zm63.4-163.5h196.2v141.6l-196.2-31.9V607.1zm340.3 226.5l382 62.2v-352h-382v289.8zm63.4-226.5h255.3v214.4l-255.3-41.6V607.1zm-63.4-415.7v288.8h382V128.1l-382 63.3zm318.7 225.5H587.3V245l255.3-42.3v214.2zm-722.4 63.3H443V201.9l-322.9 53.5v224.8zM183.5 309l196.2-32.5v140.4H183.5V309z" } }] }, "name": "windows", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (WindowsOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/WomanOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/WomanOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var WomanOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M712.8 548.8c53.6-53.6 83.2-125 83.2-200.8 0-75.9-29.5-147.2-83.2-200.8C659.2 93.6 587.8 64 512 64s-147.2 29.5-200.8 83.2C257.6 200.9 228 272.1 228 348c0 63.8 20.9 124.4 59.4 173.9 7.3 9.4 15.2 18.3 23.7 26.9 8.5 8.5 17.5 16.4 26.8 23.7 39.6 30.8 86.3 50.4 136.1 57V736H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h114v140c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V812h114c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8H550V629.5c61.5-8.2 118.2-36.1 162.8-80.7zM512 556c-55.6 0-107.7-21.6-147.1-60.9C325.6 455.8 304 403.6 304 348s21.6-107.7 60.9-147.1C404.2 161.5 456.4 140 512 140s107.7 21.6 147.1 60.9C698.4 240.2 720 292.4 720 348s-21.6 107.7-60.9 147.1C619.7 534.4 567.6 556 512 556z" } }] }, "name": "woman", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (WomanOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/YahooFilled.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/YahooFilled.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var YahooFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M937.3 231H824.7c-15.5 0-27.7 12.6-27.1 28.1l13.1 366h84.4l65.4-366.4c2.7-15.2-7.8-27.7-23.2-27.7zm-77.4 450.4h-14.1c-27.1 0-49.2 22.2-49.2 49.3v14.1c0 27.1 22.2 49.3 49.2 49.3h14.1c27.1 0 49.2-22.2 49.2-49.3v-14.1c0-27.1-22.2-49.3-49.2-49.3zM402.6 231C216.2 231 65 357 65 512.5S216.2 794 402.6 794s337.6-126 337.6-281.5S589.1 231 402.6 231zm225.2 225.2h-65.3L458.9 559.8v65.3h84.4v56.3H318.2v-56.3h84.4v-65.3L242.9 399.9h-37v-56.3h168.5v56.3h-37l93.4 93.5 28.1-28.1V400h168.8v56.2z" } }] }, "name": "yahoo", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (YahooFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/YahooOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/YahooOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var YahooOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M859.9 681.4h-14.1c-27.1 0-49.2 22.2-49.2 49.3v14.1c0 27.1 22.2 49.3 49.2 49.3h14.1c27.1 0 49.2-22.2 49.2-49.3v-14.1c0-27.1-22.2-49.3-49.2-49.3zM402.6 231C216.2 231 65 357 65 512.5S216.2 794 402.6 794s337.6-126 337.6-281.5S589.1 231 402.6 231zm0 507C245.1 738 121 634.6 121 512.5c0-62.3 32.3-119.7 84.9-161v48.4h37l159.8 159.9v65.3h-84.4v56.3h225.1v-56.3H459v-65.3l103.5-103.6h65.3v-56.3H459v65.3l-28.1 28.1-93.4-93.5h37v-56.3H216.4c49.4-35 114.3-56.6 186.2-56.6 157.6 0 281.6 103.4 281.6 225.5S560.2 738 402.6 738zm534.7-507H824.7c-15.5 0-27.7 12.6-27.1 28.1l13.1 366h84.4l65.4-366.4c2.7-15.2-7.8-27.7-23.2-27.7z" } }] }, "name": "yahoo", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (YahooOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/YoutubeFilled.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/YoutubeFilled.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var YoutubeFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M941.3 296.1a112.3 112.3 0 00-79.2-79.3C792.2 198 512 198 512 198s-280.2 0-350.1 18.7A112.12 112.12 0 0082.7 296C64 366 64 512 64 512s0 146 18.7 215.9c10.3 38.6 40.7 69 79.2 79.3C231.8 826 512 826 512 826s280.2 0 350.1-18.8c38.6-10.3 68.9-40.7 79.2-79.3C960 658 960 512 960 512s0-146-18.7-215.9zM423 646V378l232 133-232 135z" } }] }, "name": "youtube", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (YoutubeFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/YoutubeOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/YoutubeOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var YoutubeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M960 509.2c0-2.2 0-4.7-.1-7.6-.1-8.1-.3-17.2-.5-26.9-.8-27.9-2.2-55.7-4.4-81.9-3-36.1-7.4-66.2-13.4-88.8a139.52 139.52 0 00-98.3-98.5c-28.3-7.6-83.7-12.3-161.7-15.2-37.1-1.4-76.8-2.3-116.5-2.8-13.9-.2-26.8-.3-38.4-.4h-29.4c-11.6.1-24.5.2-38.4.4-39.7.5-79.4 1.4-116.5 2.8-78 3-133.5 7.7-161.7 15.2A139.35 139.35 0 0082.4 304C76.3 326.6 72 356.7 69 392.8c-2.2 26.2-3.6 54-4.4 81.9-.3 9.7-.4 18.8-.5 26.9 0 2.9-.1 5.4-.1 7.6v5.6c0 2.2 0 4.7.1 7.6.1 8.1.3 17.2.5 26.9.8 27.9 2.2 55.7 4.4 81.9 3 36.1 7.4 66.2 13.4 88.8 12.8 47.9 50.4 85.7 98.3 98.5 28.2 7.6 83.7 12.3 161.7 15.2 37.1 1.4 76.8 2.3 116.5 2.8 13.9.2 26.8.3 38.4.4h29.4c11.6-.1 24.5-.2 38.4-.4 39.7-.5 79.4-1.4 116.5-2.8 78-3 133.5-7.7 161.7-15.2 47.9-12.8 85.5-50.5 98.3-98.5 6.1-22.6 10.4-52.7 13.4-88.8 2.2-26.2 3.6-54 4.4-81.9.3-9.7.4-18.8.5-26.9 0-2.9.1-5.4.1-7.6v-5.6zm-72 5.2c0 2.1 0 4.4-.1 7.1-.1 7.8-.3 16.4-.5 25.7-.7 26.6-2.1 53.2-4.2 77.9-2.7 32.2-6.5 58.6-11.2 76.3-6.2 23.1-24.4 41.4-47.4 47.5-21 5.6-73.9 10.1-145.8 12.8-36.4 1.4-75.6 2.3-114.7 2.8-13.7.2-26.4.3-37.8.3h-28.6l-37.8-.3c-39.1-.5-78.2-1.4-114.7-2.8-71.9-2.8-124.9-7.2-145.8-12.8-23-6.2-41.2-24.4-47.4-47.5-4.7-17.7-8.5-44.1-11.2-76.3-2.1-24.7-3.4-51.3-4.2-77.9-.3-9.3-.4-18-.5-25.7 0-2.7-.1-5.1-.1-7.1v-4.8c0-2.1 0-4.4.1-7.1.1-7.8.3-16.4.5-25.7.7-26.6 2.1-53.2 4.2-77.9 2.7-32.2 6.5-58.6 11.2-76.3 6.2-23.1 24.4-41.4 47.4-47.5 21-5.6 73.9-10.1 145.8-12.8 36.4-1.4 75.6-2.3 114.7-2.8 13.7-.2 26.4-.3 37.8-.3h28.6l37.8.3c39.1.5 78.2 1.4 114.7 2.8 71.9 2.8 124.9 7.2 145.8 12.8 23 6.2 41.2 24.4 47.4 47.5 4.7 17.7 8.5 44.1 11.2 76.3 2.1 24.7 3.4 51.3 4.2 77.9.3 9.3.4 18 .5 25.7 0 2.7.1 5.1.1 7.1v4.8zM423 646l232-135-232-133z" } }] }, "name": "youtube", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (YoutubeOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/YuqueFilled.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/YuqueFilled.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var YuqueFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 370.6c-9.9-39.4 9.9-102.2 73.4-124.4l-67.9-3.6s-25.7-90-143.6-98c-117.9-8.1-195-3-195-3s87.4 55.6 52.4 154.7c-25.6 52.5-65.8 95.6-108.8 144.7-1.3 1.3-2.5 2.6-3.5 3.7C319.4 605 96 860 96 860c245.9 64.4 410.7-6.3 508.2-91.1 20.5-.2 35.9-.3 46.3-.3 135.8 0 250.6-117.6 245.9-248.4-3.2-89.9-31.9-110.2-41.8-149.6z" } }] }, "name": "yuque", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (YuqueFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/YuqueOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/YuqueOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var YuqueOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 370.6c-9.9-39.4 9.9-102.2 73.4-124.4l-67.9-3.6s-25.7-90-143.6-98c-117.8-8.1-194.9-3-195-3 .1 0 87.4 55.6 52.4 154.7-25.6 52.5-65.8 95.6-108.8 144.7-1.3 1.3-2.5 2.6-3.5 3.7C319.4 605 96 860 96 860c245.9 64.4 410.7-6.3 508.2-91.1 20.5-.2 35.9-.3 46.3-.3 135.8 0 250.6-117.6 245.9-248.4-3.2-89.9-31.9-110.2-41.8-149.6zm-204.1 334c-10.6 0-26.2.1-46.8.3l-23.6.2-17.8 15.5c-47.1 41-104.4 71.5-171.4 87.6-52.5 12.6-110 16.2-172.7 9.6 18-20.5 36.5-41.6 55.4-63.1 92-104.6 173.8-197.5 236.9-268.5l1.4-1.4 1.3-1.5c4.1-4.6 20.6-23.3 24.7-28.1 9.7-11.1 17.3-19.9 24.5-28.6 30.7-36.7 52.2-67.8 69-102.2l1.6-3.3 1.2-3.4c13.7-38.8 15.4-76.9 6.2-112.8 22.5.7 46.5 1.9 71.7 3.6 33.3 2.3 55.5 12.9 71.1 29.2 5.8 6 10.2 12.5 13.4 18.7 1 2 1.7 3.6 2.3 5l5 17.7c-15.7 34.5-19.9 73.3-11.4 107.2 3 11.8 6.9 22.4 12.3 34.4 2.1 4.7 9.5 20.1 11 23.3 10.3 22.7 15.4 43 16.7 78.7 3.3 94.6-82.7 181.9-182 181.9z" } }] }, "name": "yuque", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (YuqueOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ZhihuCircleFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ZhihuCircleFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ZhihuCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-90.7 477.8l-.1 1.5c-1.5 20.4-6.3 43.9-12.9 67.6l24-18.1 71 80.7c9.2 33-3.3 63.1-3.3 63.1l-95.7-111.9v-.1c-8.9 29-20.1 57.3-33.3 84.7-22.6 45.7-55.2 54.7-89.5 57.7-34.4 3-23.3-5.3-23.3-5.3 68-55.5 78-87.8 96.8-123.1 11.9-22.3 20.4-64.3 25.3-96.8H264.1s4.8-31.2 19.2-41.7h101.6c.6-15.3-1.3-102.8-2-131.4h-49.4c-9.2 45-41 56.7-48.1 60.1-7 3.4-23.6 7.1-21.1 0 2.6-7.1 27-46.2 43.2-110.7 16.3-64.6 63.9-62 63.9-62-12.8 22.5-22.4 73.6-22.4 73.6h159.7c10.1 0 10.6 39 10.6 39h-90.8c-.7 22.7-2.8 83.8-5 131.4H519s12.2 15.4 12.2 41.7H421.3zm346.5 167h-87.6l-69.5 46.6-16.4-46.6h-40.1V321.5h213.6v387.3zM408.2 611s0-.1 0 0zm216 94.3l56.8-38.1h45.6-.1V364.7H596.7v302.5h14.1z" } }] }, "name": "zhihu-circle", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (ZhihuCircleFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ZhihuOutlined.js": /*!********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ZhihuOutlined.js ***! \********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ZhihuOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M564.7 230.1V803h60l25.2 71.4L756.3 803h131.5V230.1H564.7zm247.7 497h-59.9l-75.1 50.4-17.8-50.4h-18V308.3h170.7v418.8zM526.1 486.9H393.3c2.1-44.9 4.3-104.3 6.6-172.9h130.9l-.1-8.1c0-.6-.2-14.7-2.3-29.1-2.1-15-6.6-34.9-21-34.9H287.8c4.4-20.6 15.7-69.7 29.4-93.8l6.4-11.2-12.9-.7c-.8 0-19.6-.9-41.4 10.6-35.7 19-51.7 56.4-58.7 84.4-18.4 73.1-44.6 123.9-55.7 145.6-3.3 6.4-5.3 10.2-6.2 12.8-1.8 4.9-.8 9.8 2.8 13 10.5 9.5 38.2-2.9 38.5-3 .6-.3 1.3-.6 2.2-1 13.9-6.3 55.1-25 69.8-84.5h56.7c.7 32.2 3.1 138.4 2.9 172.9h-141l-2.1 1.5c-23.1 16.9-30.5 63.2-30.8 65.2l-1.4 9.2h167c-12.3 78.3-26.5 113.4-34 127.4-3.7 7-7.3 14-10.7 20.8-21.3 42.2-43.4 85.8-126.3 153.6-3.6 2.8-7 8-4.8 13.7 2.4 6.3 9.3 9.1 24.6 9.1 5.4 0 11.8-.3 19.4-1 49.9-4.4 100.8-18 135.1-87.6 17-35.1 31.7-71.7 43.9-108.9L497 850l5-12c.8-1.9 19-46.3 5.1-95.9l-.5-1.8-108.1-123-22 16.6c6.4-26.1 10.6-49.9 12.5-71.1h158.7v-8c0-40.1-18.5-63.9-19.2-64.9l-2.4-3z" } }] }, "name": "zhihu", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ZhihuOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ZhihuSquareFilled.js": /*!************************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ZhihuSquareFilled.js ***! \************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ZhihuSquareFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM432.3 592.8l71 80.7c9.2 33-3.3 63.1-3.3 63.1l-95.7-111.9v-.1c-8.9 29-20.1 57.3-33.3 84.7-22.6 45.7-55.2 54.7-89.5 57.7-34.4 3-23.3-5.3-23.3-5.3 68-55.5 78-87.8 96.8-123.1 11.9-22.3 20.4-64.3 25.3-96.8H264.1s4.8-31.2 19.2-41.7h101.6c.6-15.3-1.3-102.8-2-131.4h-49.4c-9.2 45-41 56.7-48.1 60.1-7 3.4-23.6 7.1-21.1 0 2.6-7.1 27-46.2 43.2-110.7 16.3-64.6 63.9-62 63.9-62-12.8 22.5-22.4 73.6-22.4 73.6h159.7c10.1 0 10.6 39 10.6 39h-90.8c-.7 22.7-2.8 83.8-5 131.4H519s12.2 15.4 12.2 41.7h-110l-.1 1.5c-1.5 20.4-6.3 43.9-12.9 67.6l24.1-18.1zm335.5 116h-87.6l-69.5 46.6-16.4-46.6h-40.1V321.5h213.6v387.3zM408.2 611s0-.1 0 0zm216 94.3l56.8-38.1h45.6-.1V364.7H596.7v302.5h14.1z" } }] }, "name": "zhihu-square", "theme": "filled" }; /* harmony default export */ __webpack_exports__["a"] = (ZhihuSquareFilled); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ZoomInOutlined.js": /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ZoomInOutlined.js ***! \*********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ZoomInOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z" } }] }, "name": "zoom-in", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ZoomInOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons-svg/es/asn/ZoomOutOutlined.js": /*!**********************************************************************!*\ !*** ./node_modules/@ant-design/icons-svg/es/asn/ZoomOutOutlined.js ***! \**********************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // This icon file is generated automatically. var ZoomOutOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z" } }] }, "name": "zoom-out", "theme": "outlined" }; /* harmony default export */ __webpack_exports__["a"] = (ZoomOutOutlined); /***/ }), /***/ "./node_modules/@ant-design/icons/es/components/AntdIcon.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons/es/components/AntdIcon.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Context */ "./node_modules/@ant-design/icons/es/components/Context.js"); /* harmony import */ var _IconBase__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./IconBase */ "./node_modules/@ant-design/icons/es/components/IconBase.js"); /* harmony import */ var _twoTonePrimaryColor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./twoTonePrimaryColor */ "./node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils */ "./node_modules/@ant-design/icons/es/utils.js"); // Initial setting // should move it to antd main repo? Object(_twoTonePrimaryColor__WEBPACK_IMPORTED_MODULE_7__[/* setTwoToneColor */ "b"])('#1890ff'); var Icon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function (props, ref) { var _classNames; var className = props.className, icon = props.icon, spin = props.spin, rotate = props.rotate, tabIndex = props.tabIndex, onClick = props.onClick, twoToneColor = props.twoToneColor, restProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(props, ["className", "icon", "spin", "rotate", "tabIndex", "onClick", "twoToneColor"]); var _React$useContext = react__WEBPACK_IMPORTED_MODULE_3__["useContext"](_Context__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"]), _React$useContext$pre = _React$useContext.prefixCls, prefixCls = _React$useContext$pre === void 0 ? 'anticon' : _React$useContext$pre; var classString = classnames__WEBPACK_IMPORTED_MODULE_4___default()(prefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-").concat(icon.name), !!icon.name), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-spin"), !!spin || icon.name === 'loading'), _classNames), className); var iconTabIndex = tabIndex; if (iconTabIndex === undefined && onClick) { iconTabIndex = -1; } var svgStyle = rotate ? { msTransform: "rotate(".concat(rotate, "deg)"), transform: "rotate(".concat(rotate, "deg)") } : undefined; var _normalizeTwoToneColo = Object(_utils__WEBPACK_IMPORTED_MODULE_8__[/* normalizeTwoToneColors */ "d"])(twoToneColor), _normalizeTwoToneColo2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1]; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", Object.assign({ role: "img", "aria-label": icon.name }, restProps, { ref: ref, tabIndex: iconTabIndex, onClick: onClick, className: classString }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_IconBase__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], { icon: icon, primaryColor: primaryColor, secondaryColor: secondaryColor, style: svgStyle })); }); Icon.displayName = 'AntdIcon'; Icon.getTwoToneColor = _twoTonePrimaryColor__WEBPACK_IMPORTED_MODULE_7__[/* getTwoToneColor */ "a"]; Icon.setTwoToneColor = _twoTonePrimaryColor__WEBPACK_IMPORTED_MODULE_7__[/* setTwoToneColor */ "b"]; /* harmony default export */ __webpack_exports__["a"] = (Icon); /***/ }), /***/ "./node_modules/@ant-design/icons/es/components/Context.js": /*!*****************************************************************!*\ !*** ./node_modules/@ant-design/icons/es/components/Context.js ***! \*****************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var IconContext = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createContext"])({}); /* harmony default export */ __webpack_exports__["a"] = (IconContext); /***/ }), /***/ "./node_modules/@ant-design/icons/es/components/Icon.js": /*!**************************************************************!*\ !*** ./node_modules/@ant-design/icons/es/components/Icon.js ***! \**************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ "./node_modules/@ant-design/icons/es/utils.js"); var Icon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function (props, ref) { var className = props.className, Component = props.component, viewBox = props.viewBox, spin = props.spin, rotate = props.rotate, tabIndex = props.tabIndex, onClick = props.onClick, children = props.children, restProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(props, ["className", "component", "viewBox", "spin", "rotate", "tabIndex", "onClick", "children"]); Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* warning */ "g"])(Boolean(Component || children), 'Should have `component` prop or `children`.'); Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* useInsertStyles */ "f"])(); var classString = classnames__WEBPACK_IMPORTED_MODULE_3___default()('anticon', className); var svgClassString = classnames__WEBPACK_IMPORTED_MODULE_3___default()({ 'anticon-spin': !!spin }); var svgStyle = rotate ? { msTransform: "rotate(".concat(rotate, "deg)"), transform: "rotate(".concat(rotate, "deg)") } : undefined; var innerSvgProps = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, _utils__WEBPACK_IMPORTED_MODULE_4__[/* svgBaseProps */ "e"]), {}, { className: svgClassString, style: svgStyle, viewBox: viewBox }); if (!viewBox) { delete innerSvgProps.viewBox; } // component > children var renderInnerNode = function renderInnerNode() { if (Component) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object.assign({}, innerSvgProps), children); } if (children) { Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* warning */ "g"])(Boolean(viewBox) || react__WEBPACK_IMPORTED_MODULE_2__["Children"].count(children) === 1 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["isValidElement"](children) && react__WEBPACK_IMPORTED_MODULE_2__["Children"].only(children).type === 'use', 'Make sure that you provide correct `viewBox`' + ' prop (default `0 0 1024 1024`) to the icon.'); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("svg", Object.assign({}, innerSvgProps, { viewBox: viewBox }), children); } return null; }; var iconTabIndex = tabIndex; if (iconTabIndex === undefined && onClick) { iconTabIndex = -1; } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", Object.assign({ role: "img" }, restProps, { ref: ref, tabIndex: iconTabIndex, onClick: onClick, className: classString }), renderInnerNode()); }); Icon.displayName = 'AntdIcon'; /* harmony default export */ __webpack_exports__["a"] = (Icon); /***/ }), /***/ "./node_modules/@ant-design/icons/es/components/IconBase.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons/es/components/IconBase.js ***! \******************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "./node_modules/@ant-design/icons/es/utils.js"); var twoToneColorPalette = { primaryColor: '#333', secondaryColor: '#E6E6E6', calculated: false }; function setTwoToneColors(_ref) { var primaryColor = _ref.primaryColor, secondaryColor = _ref.secondaryColor; twoToneColorPalette.primaryColor = primaryColor; twoToneColorPalette.secondaryColor = secondaryColor || Object(_utils__WEBPACK_IMPORTED_MODULE_2__[/* getSecondaryColor */ "b"])(primaryColor); twoToneColorPalette.calculated = !!secondaryColor; } function getTwoToneColors() { return Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, twoToneColorPalette); } var IconBase = function IconBase(props) { var icon = props.icon, className = props.className, onClick = props.onClick, style = props.style, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, restProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(props, ["icon", "className", "onClick", "style", "primaryColor", "secondaryColor"]); var colors = twoToneColorPalette; if (primaryColor) { colors = { primaryColor: primaryColor, secondaryColor: secondaryColor || Object(_utils__WEBPACK_IMPORTED_MODULE_2__[/* getSecondaryColor */ "b"])(primaryColor) }; } Object(_utils__WEBPACK_IMPORTED_MODULE_2__[/* useInsertStyles */ "f"])(); Object(_utils__WEBPACK_IMPORTED_MODULE_2__[/* warning */ "g"])(Object(_utils__WEBPACK_IMPORTED_MODULE_2__[/* isIconDefinition */ "c"])(icon), "icon should be icon definiton, but got ".concat(icon)); if (!Object(_utils__WEBPACK_IMPORTED_MODULE_2__[/* isIconDefinition */ "c"])(icon)) { return null; } var target = icon; if (target && typeof target.icon === 'function') { target = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, target), {}, { icon: target.icon(colors.primaryColor, colors.secondaryColor) }); } return Object(_utils__WEBPACK_IMPORTED_MODULE_2__[/* generate */ "a"])(target.icon, "svg-".concat(target.name), Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ className: className, onClick: onClick, style: style, 'data-icon': target.name, width: '1em', height: '1em', fill: 'currentColor', 'aria-hidden': 'true' }, restProps)); }; IconBase.displayName = 'IconReact'; IconBase.getTwoToneColors = getTwoToneColors; IconBase.setTwoToneColors = setTwoToneColors; /* harmony default export */ __webpack_exports__["a"] = (IconBase); /***/ }), /***/ "./node_modules/@ant-design/icons/es/components/IconFont.js": /*!******************************************************************!*\ !*** ./node_modules/@ant-design/icons/es/components/IconFont.js ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export default */ /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _Icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Icon */ "./node_modules/@ant-design/icons/es/components/Icon.js"); var customCache = new Set(); function isValidCustomScriptUrl(scriptUrl) { return Boolean(typeof scriptUrl === 'string' && scriptUrl.length && !customCache.has(scriptUrl)); } function createScriptUrlElements(scriptUrls) { var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; var currentScriptUrl = scriptUrls[index]; if (isValidCustomScriptUrl(currentScriptUrl)) { var script = document.createElement('script'); script.setAttribute('src', currentScriptUrl); script.setAttribute('data-namespace', currentScriptUrl); if (scriptUrls.length > index + 1) { script.onload = function () { createScriptUrlElements(scriptUrls, index + 1); }; script.onerror = function () { createScriptUrlElements(scriptUrls, index + 1); }; } customCache.add(currentScriptUrl); document.body.appendChild(script); } } function create() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var scriptUrl = options.scriptUrl, _options$extraCommonP = options.extraCommonProps, extraCommonProps = _options$extraCommonP === void 0 ? {} : _options$extraCommonP; /** * DOM API required. * Make sure in browser environment. * The Custom Icon will create a

BBC Homepage

John Kerry, Catherine Ashton and Mohammad Javad Zarif in Vienna, 22 Nov Doubts on Iran deal as deadline looms

Doubts grow that Monday's deadline for a deal on Iran's nuclear programme will be met at talks in Vienna, as negotiators admit "big gaps" remain.

Business

Man typing on computer keyboard

New web data powers plan for police

A law forcing communications firms to keep details that could help identify criminals using the internet is being planned by the home secretary.

Earth

The truth about lemmings

The truth about lemmings

There's more to lemmings than suicide

Capital

Due tomorrow? I’ll start tonight

Due tomorrow? I’ll start tonight

Procrastination: why we push things off until the last hour

Autos

The Mini, miniaturised

The Mini, miniaturised

The British carmaker unveils the Citysurfer Concept in LA

Culture

Hunger Games: Not for real adults

Hunger Games: Not for real adults

The new blockbuster reviewed

Future

How to create a brain implant

How to create a brain implant

…and how can it treat blindness?

Travel

‘The party city of Canada’

‘The party city of Canada’

Where 'the vibe edges on the weird side’

Life connected

Wors

Is tech transforming language?

Many think texts and tweets are crimes against proper grammar, but linguist Ben Zimmer argues that this misses the point.

the travel show

Regent's Canal

London's 200-year-old hidden canal

Fancy a break from the busy streets of Central London? Take in the city wildlife while cruising down charming, cafe-lined Regent's Canal, a historic waterway that was built by hand.

quirky questions

High roller

The perks of owning a luxury ride

From preferential treatment at the dealership to special consideration on the highway, BBC Autos set out to learn the intangible benefits of buying a big-ticket vehicle.

TV & Radio

World Service Radio

On air now: 14:05 - 15:00 GMT

The Science Hour
Monica Grady from the Open University discusses the latest news from the comet mission.

Next on air: 15:00 - 15:05 GMT

BBC News
The latest five minute news bulletin from BBC World Service.
Today's Schedule

Hourly bulletins:

Weather

London

 

  •  
Sun
Heavy Rain

Max Temperature: 12°C 54°F

Min Temperature: 3°C 37°F

Mon
Sunny

Max Temperature: 8°C 46°F

Min Temperature: 4°C 39°F

Tue
Light Cloud

Max Temperature: 9°C 48°F

Min Temperature: 7°C 45°F

BBC © 2014 The BBC is not responsible for the content of external sites. Read more.

This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.

minify-2.20.37/benchmarks/sample_blogpost.html000066400000000000000000000506731464346127300214020ustar00rootroot00000000000000 research!rsc: My Go Resolutions for 2017

research!rsc

Thoughts and links about programming, by

My Go Resolutions for 2017
Posted on Wednesday, January 18, 2017.

’Tis the season for resolutions, and I thought it would make sense to write a little about what I hope to work on this year as far as Go is concerned.

My goal every year is to help Go developers. I want to make sure that the work we do on the Go team has a significant, positive impact on Go developers. That may sound obvious, but there are a variety of common ways to fail to achieve that: for example, spending too much time cleaning up or optimizing code that doesn’t need it; responding only to the most common or recent complaints or requests; or focusing too much on short-term improvements. It’s important to step back and make sure we’re focusing our development work where it does the most good.

This post outlines a few of my own major focuses for this year. This is only my personal list, not the Go team’s list.

One reason for posting this is to gather feedback. If these spark any ideas or suggestions of your own, please feel free to comment below or on the linked GitHub issues.

Another reason is to make clear that I’m aware of these issues as important. I think too often people interpret lack of action by the Go team as a signal that we think everything is perfect, when instead there is simply other, higher priority work to do first.

Type aliases

There is a recurring problem with moving types from one package to another during large codebase refactorings. We tried to solve it last year with general aliases, which didn’t work for at least two reasons: we didn’t explain the change well enough, and we didn’t deliver it on time, so it wasn’t ready for Go 1.8. Learning from that experience, I gave a talk and wrote an article about the underlying problem, and that started a productive discussion on the Go issue tracker about the solution space. It looks like more limited type aliases are the right next step. I want to make sure those land smoothly in Go 1.9. #18130.

Package management

I designed the Go support for downloading published packages (“goinstall”, which became “go get”) in February 2010. A lot has happened since then. In particular, other language ecosystems have really raised the bar for what people expect from package management, and the open source world has mostly agreed on semantic versioning, which provides a useful base for inferring version compatibility. Go needs to do better here, and a group of contributors have been working on a solution. I want to make sure these ideas are integrated well into the standard Go toolchain and to make package management a reason that people love Go.

Build improvements

There are a handful of shortcomings in the design of the go command’s build system that are overdue to be fixed. Here are three representative examples that I intend to address with a bit of a redesign of the internals of the go command.

Builds can be too slow, because the go command doesn’t cache build results as aggressively as it should. Many people don’t realize that go install saves its work while go build does not, and then they run repeated go build commands that are slow because the later builds do more work than they should need to. The same for repeated go test without go test -i when dependencies are modified. All builds should be as incremental as possible. #4719.

Test results should be cached too: if none of the inputs to a test have changed, then usually there is no need to rerun the test. This will make it very cheap to run “all tests” when little or nothing has changed. #11193.

Work outside GOPATH should be supported nearly as well as work inside GOPATH. In particular, it should be possible to git clone a repo, cd into it, and run go commands and have them work fine. Package management only makes that more important: you’ll need to be able to work on different versions of a package (say, v1 and v2) without having entirely separate GOPATHs for them. #17271.

Code corpus

I think it helped to have concrete examples from real projects in the talk and article I prepared about codebase refactoring (see above). We’ve also defined that additions to vet must target problems that happen frequently in real programs. I’d like to see that kind of analysis of actual practice—examining the effects on and possible improvements to real programs—become a standard way we discuss and evaluate changes to Go.

Right now there’s not an agreed-upon representative corpus of code to use for those analyses: everyone must first create their own, which is too much work. I’d like to put together a single, self-contained Git repo people can check out that contains our official baseline corpus for those analyses. A possible starting point could be the top 100 Go language repos on GitHub by stars or forks or both.

Automatic vet

The Go distribution ships with this powerful tool, go vet, that points out correctness bugs. We have a high bar for checks, so that when vet speaks, you should listen. But everyone has to remember to run it. It would be better if you didn’t have to remember. In particular, I think we could probably run vet in parallel with the final compile and link of the test binary during go test without slowing the compile-edit-test cycle at all. If we can do that, and if we limit the enabled vet checks to a subset that is essentially 100% accurate, we can make passing vet a precondition for running a test at all. Then developers don’t need to remember to run go vet. They run go test, and once in a while vet speaks up with something important and avoids a debugging session. #18084, #18085.

Errors & best practices

Part of the intended contract for error reporting in Go is that functions include relevant available context, including the operation being attempted (such as the function name and its arguments). For example, this program:

err := os.Remove("/tmp/nonexist")
fmt.Println(err)

prints this output:

remove /tmp/nonexist: no such file or directory

Not enough Go code adds context like os.Remove does. Too much code does only

if err != nil {
    return err
}

all the way up the call stack, discarding useful context that should be reported (like remove /tmp/nonexist: above). I would like to try to understand whether our expectations for including context are wrong, or if there is something we can do to make it easier to write code that returns better errors.

There are also various discussions in the community about agreed-upon interfaces for stripping error context. I would like to try to understand when that makes sense and whether we should adopt an official recommendation.

Context & best practices

We added the new context package in Go 1.7 for holding request-scoped information like timeouts, cancellation state, and credentials. An individual context is immutable (like an individual string or int): it is only possible to derive a new, updated context and pass that context explicitly further down the call stack or (less commonly) back up to the caller. The context is now carried through APIs such as database/sql and net/http, mainly so that those can stop processing a request when the caller is no longer interested in the result. Timeout information is appropriate to carry in a context, but—to use a real example we removed—database options are not, because they are unlikely to apply equally well to all possible database operations carried out during a request. What about the current clock source, or logging sink? Is either of those appropriate to store in a context? I would like to try to understand and characterize the criteria for what is and is not an appropriate use of context.

Memory model

Go’s memory model is intentionally low-key, making few promises to users, compared to other languages. In fact it starts by discouraging people from reading the rest of the document. At the same time, it demands more of the compiler than other languages: in particular, a race on an integer value is not sufficient license for your program to misbehave in arbitrary ways. But there are some complete gaps, in particular no mention of the sync/atomic package. I think the core compiler and runtime developers all agree that the behavior of those atomics should be roughly the same as C++ seqcst atomics or Java volatiles, but we still need to write that down carefully in the memory model, and probably also in a long blog post. #5045, #7948, #9442.

Immutability

The race detector is one of Go’s most loved features. But not having races would be even better. I would love it if there were some reasonable way to integrate reference immutability into Go, so that programmers can make clear, checked assertions about what can and cannot be written and thereby eliminate certain races at compile time. Go already has one immutable type, string; it would be nice to retroactively define that string is a named type (or type alias) for immutable []byte. I don’t think that will happen this year, but I’d like to understand the solution space better. Javari, Midori, Pony, and Rust have all staked out interesting points in the solution space, and there are plenty of research papers beyond those.

In the long-term, if we could statically eliminate the possibility of races, that would eliminate the need for most of the memory model. That may well be an impossible dream, but again I’d like to understand the solution space better.

Generics

Nothing sparks more heated arguments among Go and non-Go developers than the question of whether Go should have support for generics (or how many years ago that should have happened). I don’t believe the Go team has ever said “Go does not need generics.” What we have said is that there are higher-priority issues facing Go. For example, I believe that better support for package management would have a much larger immediate positive impact on most Go developers than adding generics. But we do certainly understand that for a certain subset of Go use cases, the lack of parametric polymorphism is a significant hindrance.

Personally, I would like to be able to write general channel-processing functions like:

// Join makes all messages received on the input channels
// available for receiving from the returned channel.
func Join(inputs ...<-chan T) <-chan T

// Dup duplicates messages received on c to both c1 and c2.
func Dup(c <-chan T) (c1, c2 <-chan T)

I would also like to be able to write Go support for high-level data processing abstractions, analogous to FlumeJava or C#’s LINQ, in a way that catches type errors at compile time instead of at run time. There are also any number of data structures or generic algorithms that might be written, but I personally find these broader applications more compelling.

We’ve struggled off and on for years to find the right way to add generics to Go. At least a few of the past proposals got hung up on trying to design something that provided both general parametric polymorphism (like chan T) and also a unification of string and []byte. If the latter is handled by parameterization over immutability, as described in the previous section, then maybe that simplifies the demands on a design for generics.

When I first started thinking about generics for Go in 2008, the main examples to learn from were C#, Java, Haskell, and ML. None of the approaches in those languages seemed like a perfect fit for Go. Today, there are newer attempts to learn from as well, including Dart, Midori, Rust, and Swift.

It’s been a few years since we ventured out and explored the design space. It is probably time to look around again, especially in light of the insight about mutability and the additional examples set by newer languages. I don’t think generics will happen this year, but I’d like to be able to say I understand the solution space better.

minify-2.20.37/benchmarks/sample_books.xml000066400000000000000000000105161464346127300205120ustar00rootroot00000000000000 Gambardella, Matthew XML Developer's Guide Computer 44.95 2000-10-01 An in-depth look at creating applications with XML. Ralls, Kim Midnight Rain Fantasy 5.95 2000-12-16 A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world. Corets, Eva Maeve Ascendant Fantasy 5.95 2000-11-17 After the collapse of a nanotechnology society in England, the young survivors lay the foundation for a new society. Corets, Eva Oberon's Legacy Fantasy 5.95 2001-03-10 In post-apocalypse England, the mysterious agent known only as Oberon helps to create a new life for the inhabitants of London. Sequel to Maeve Ascendant. Corets, Eva The Sundered Grail Fantasy 5.95 2001-09-10 The two daughters of Maeve, half-sisters, battle one another for control of England. Sequel to Oberon's Legacy. Randall, Cynthia Lover Birds Romance 4.95 2000-09-02 When Carla meets Paul at an ornithology conference, tempers fly as feathers get ruffled. Thurman, Paula Splish Splash Romance 4.95 2000-11-02 A deep sea diver finds true love twenty thousand leagues beneath the sea. Knorr, Stefan Creepy Crawlies Horror 4.95 2000-12-06 An anthology of horror stories about roaches, centipedes, scorpions and other insects. Kress, Peter Paradox Lost Science Fiction 6.95 2000-11-02 After an inadvertant trip through a Heisenberg Uncertainty Device, James Salway discovers the problems of being quantum. O'Brien, Tim Microsoft .NET: The Programming Bible Computer 36.95 2000-12-09 Microsoft's .NET initiative is explored in detail in this deep programmer's reference. O'Brien, Tim MSXML3: A Comprehensive Guide Computer 36.95 2000-12-01 The Microsoft MSXML3 parser is covered in detail, with attention to XML DOM interfaces, XSLT processing, SAX and more. Galos, Mike Visual Studio 7: A Comprehensive Guide Computer 49.95 2001-04-16 Microsoft Visual Studio 7 is explored in depth, looking at how Visual Basic, Visual C++, C#, and ASP+ are integrated into a comprehensive development environment. minify-2.20.37/benchmarks/sample_bootstrap.css000066400000000000000000004135531464346127300214120ustar00rootroot00000000000000/*! * Bootstrap v3.3.1 (http://getbootstrap.com) * Copyright 2011-2014 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ /*! normalize.css v3.0.2 | MIT License | git.io/normalize */ html { font-family: sans-serif; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } body { margin: 0; } article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { display: block; } audio, canvas, progress, video { display: inline-block; vertical-align: baseline; } audio:not([controls]) { display: none; height: 0; } [hidden], template { display: none; } a { background-color: transparent; } a:active, a:hover { outline: 0; } abbr[title] { border-bottom: 1px dotted; } b, strong { font-weight: bold; } dfn { font-style: italic; } h1 { margin: .67em 0; font-size: 2em; } mark { color: #000; background: #ff0; } small { font-size: 80%; } sub, sup { position: relative; font-size: 75%; line-height: 0; vertical-align: baseline; } sup { top: -.5em; } sub { bottom: -.25em; } img { border: 0; } svg:not(:root) { overflow: hidden; } figure { margin: 1em 40px; } hr { height: 0; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; } pre { overflow: auto; } code, kbd, pre, samp { font-family: monospace, monospace; font-size: 1em; } button, input, optgroup, select, textarea { margin: 0; font: inherit; color: inherit; } button { overflow: visible; } button, select { text-transform: none; } button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; cursor: pointer; } button[disabled], html input[disabled] { cursor: default; } button::-moz-focus-inner, input::-moz-focus-inner { padding: 0; border: 0; } input { line-height: normal; } input[type="checkbox"], input[type="radio"] { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; padding: 0; } input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { height: auto; } input[type="search"] { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; -webkit-appearance: textfield; } input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } fieldset { padding: .35em .625em .75em; margin: 0 2px; border: 1px solid #c0c0c0; } legend { padding: 0; border: 0; } textarea { overflow: auto; } optgroup { font-weight: bold; } table { border-spacing: 0; border-collapse: collapse; } td, th { padding: 0; } /*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ @media print { *, *:before, *:after { color: #000 !important; text-shadow: none !important; background: transparent !important; -webkit-box-shadow: none !important; box-shadow: none !important; } a, a:visited { text-decoration: underline; } a[href]:after { content: " (" attr(href) ")"; } abbr[title]:after { content: " (" attr(title) ")"; } a[href^="#"]:after, a[href^="javascript:"]:after { content: ""; } pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } thead { display: table-header-group; } tr, img { page-break-inside: avoid; } img { max-width: 100% !important; } p, h2, h3 { orphans: 3; widows: 3; } h2, h3 { page-break-after: avoid; } select { background: #fff !important; } .navbar { display: none; } .btn > .caret, .dropup > .btn > .caret { border-top-color: #000 !important; } .label { border: 1px solid #000; } .table { border-collapse: collapse !important; } .table td, .table th { background-color: #fff !important; } .table-bordered th, .table-bordered td { border: 1px solid #ddd !important; } } @font-face { font-family: 'Glyphicons Halflings'; src: url('../fonts/glyphicons-halflings-regular.eot'); src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), 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'); } .glyphicon { position: relative; top: 1px; display: inline-block; font-family: 'Glyphicons Halflings'; font-style: normal; font-weight: normal; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .glyphicon-asterisk:before { content: "\2a"; } .glyphicon-plus:before { content: "\2b"; } .glyphicon-euro:before, .glyphicon-eur:before { content: "\20ac"; } .glyphicon-minus:before { content: "\2212"; } .glyphicon-cloud:before { content: "\2601"; } .glyphicon-envelope:before { content: "\2709"; } .glyphicon-pencil:before { content: "\270f"; } .glyphicon-glass:before { content: "\e001"; } .glyphicon-music:before { content: "\e002"; } .glyphicon-search:before { content: "\e003"; } .glyphicon-heart:before { content: "\e005"; } .glyphicon-star:before { content: "\e006"; } .glyphicon-star-empty:before { content: "\e007"; } .glyphicon-user:before { content: "\e008"; } .glyphicon-film:before { content: "\e009"; } .glyphicon-th-large:before { content: "\e010"; } .glyphicon-th:before { content: "\e011"; } .glyphicon-th-list:before { content: "\e012"; } .glyphicon-ok:before { content: "\e013"; } .glyphicon-remove:before { content: "\e014"; } .glyphicon-zoom-in:before { content: "\e015"; } .glyphicon-zoom-out:before { content: "\e016"; } .glyphicon-off:before { content: "\e017"; } .glyphicon-signal:before { content: "\e018"; } .glyphicon-cog:before { content: "\e019"; } .glyphicon-trash:before { content: "\e020"; } .glyphicon-home:before { content: "\e021"; } .glyphicon-file:before { content: "\e022"; } .glyphicon-time:before { content: "\e023"; } .glyphicon-road:before { content: "\e024"; } .glyphicon-download-alt:before { content: "\e025"; } .glyphicon-download:before { content: "\e026"; } .glyphicon-upload:before { content: "\e027"; } .glyphicon-inbox:before { content: "\e028"; } .glyphicon-play-circle:before { content: "\e029"; } .glyphicon-repeat:before { content: "\e030"; } .glyphicon-refresh:before { content: "\e031"; } .glyphicon-list-alt:before { content: "\e032"; } .glyphicon-lock:before { content: "\e033"; } .glyphicon-flag:before { content: "\e034"; } .glyphicon-headphones:before { content: "\e035"; } .glyphicon-volume-off:before { content: "\e036"; } .glyphicon-volume-down:before { content: "\e037"; } .glyphicon-volume-up:before { content: "\e038"; } .glyphicon-qrcode:before { content: "\e039"; } .glyphicon-barcode:before { content: "\e040"; } .glyphicon-tag:before { content: "\e041"; } .glyphicon-tags:before { content: "\e042"; } .glyphicon-book:before { content: "\e043"; } .glyphicon-bookmark:before { content: "\e044"; } .glyphicon-print:before { content: "\e045"; } .glyphicon-camera:before { content: "\e046"; } .glyphicon-font:before { content: "\e047"; } .glyphicon-bold:before { content: "\e048"; } .glyphicon-italic:before { content: "\e049"; } .glyphicon-text-height:before { content: "\e050"; } .glyphicon-text-width:before { content: "\e051"; } .glyphicon-align-left:before { content: "\e052"; } .glyphicon-align-center:before { content: "\e053"; } .glyphicon-align-right:before { content: "\e054"; } .glyphicon-align-justify:before { content: "\e055"; } .glyphicon-list:before { content: "\e056"; } .glyphicon-indent-left:before { content: "\e057"; } .glyphicon-indent-right:before { content: "\e058"; } .glyphicon-facetime-video:before { content: "\e059"; } .glyphicon-picture:before { content: "\e060"; } .glyphicon-map-marker:before { content: "\e062"; } .glyphicon-adjust:before { content: "\e063"; } .glyphicon-tint:before { content: "\e064"; } .glyphicon-edit:before { content: "\e065"; } .glyphicon-share:before { content: "\e066"; } .glyphicon-check:before { content: "\e067"; } .glyphicon-move:before { content: "\e068"; } .glyphicon-step-backward:before { content: "\e069"; } .glyphicon-fast-backward:before { content: "\e070"; } .glyphicon-backward:before { content: "\e071"; } .glyphicon-play:before { content: "\e072"; } .glyphicon-pause:before { content: "\e073"; } .glyphicon-stop:before { content: "\e074"; } .glyphicon-forward:before { content: "\e075"; } .glyphicon-fast-forward:before { content: "\e076"; } .glyphicon-step-forward:before { content: "\e077"; } .glyphicon-eject:before { content: "\e078"; } .glyphicon-chevron-left:before { content: "\e079"; } .glyphicon-chevron-right:before { content: "\e080"; } .glyphicon-plus-sign:before { content: "\e081"; } .glyphicon-minus-sign:before { content: "\e082"; } .glyphicon-remove-sign:before { content: "\e083"; } .glyphicon-ok-sign:before { content: "\e084"; } .glyphicon-question-sign:before { content: "\e085"; } .glyphicon-info-sign:before { content: "\e086"; } .glyphicon-screenshot:before { content: "\e087"; } .glyphicon-remove-circle:before { content: "\e088"; } .glyphicon-ok-circle:before { content: "\e089"; } .glyphicon-ban-circle:before { content: "\e090"; } .glyphicon-arrow-left:before { content: "\e091"; } .glyphicon-arrow-right:before { content: "\e092"; } .glyphicon-arrow-up:before { content: "\e093"; } .glyphicon-arrow-down:before { content: "\e094"; } .glyphicon-share-alt:before { content: "\e095"; } .glyphicon-resize-full:before { content: "\e096"; } .glyphicon-resize-small:before { content: "\e097"; } .glyphicon-exclamation-sign:before { content: "\e101"; } .glyphicon-gift:before { content: "\e102"; } .glyphicon-leaf:before { content: "\e103"; } .glyphicon-fire:before { content: "\e104"; } .glyphicon-eye-open:before { content: "\e105"; } .glyphicon-eye-close:before { content: "\e106"; } .glyphicon-warning-sign:before { content: "\e107"; } .glyphicon-plane:before { content: "\e108"; } .glyphicon-calendar:before { content: "\e109"; } .glyphicon-random:before { content: "\e110"; } .glyphicon-comment:before { content: "\e111"; } .glyphicon-magnet:before { content: "\e112"; } .glyphicon-chevron-up:before { content: "\e113"; } .glyphicon-chevron-down:before { content: "\e114"; } .glyphicon-retweet:before { content: "\e115"; } .glyphicon-shopping-cart:before { content: "\e116"; } .glyphicon-folder-close:before { content: "\e117"; } .glyphicon-folder-open:before { content: "\e118"; } .glyphicon-resize-vertical:before { content: "\e119"; } .glyphicon-resize-horizontal:before { content: "\e120"; } .glyphicon-hdd:before { content: "\e121"; } .glyphicon-bullhorn:before { content: "\e122"; } .glyphicon-bell:before { content: "\e123"; } .glyphicon-certificate:before { content: "\e124"; } .glyphicon-thumbs-up:before { content: "\e125"; } .glyphicon-thumbs-down:before { content: "\e126"; } .glyphicon-hand-right:before { content: "\e127"; } .glyphicon-hand-left:before { content: "\e128"; } .glyphicon-hand-up:before { content: "\e129"; } .glyphicon-hand-down:before { content: "\e130"; } .glyphicon-circle-arrow-right:before { content: "\e131"; } .glyphicon-circle-arrow-left:before { content: "\e132"; } .glyphicon-circle-arrow-up:before { content: "\e133"; } .glyphicon-circle-arrow-down:before { content: "\e134"; } .glyphicon-globe:before { content: "\e135"; } .glyphicon-wrench:before { content: "\e136"; } .glyphicon-tasks:before { content: "\e137"; } .glyphicon-filter:before { content: "\e138"; } .glyphicon-briefcase:before { content: "\e139"; } .glyphicon-fullscreen:before { content: "\e140"; } .glyphicon-dashboard:before { content: "\e141"; } .glyphicon-paperclip:before { content: "\e142"; } .glyphicon-heart-empty:before { content: "\e143"; } .glyphicon-link:before { content: "\e144"; } .glyphicon-phone:before { content: "\e145"; } .glyphicon-pushpin:before { content: "\e146"; } .glyphicon-usd:before { content: "\e148"; } .glyphicon-gbp:before { content: "\e149"; } .glyphicon-sort:before { content: "\e150"; } .glyphicon-sort-by-alphabet:before { content: "\e151"; } .glyphicon-sort-by-alphabet-alt:before { content: "\e152"; } .glyphicon-sort-by-order:before { content: "\e153"; } .glyphicon-sort-by-order-alt:before { content: "\e154"; } .glyphicon-sort-by-attributes:before { content: "\e155"; } .glyphicon-sort-by-attributes-alt:before { content: "\e156"; } .glyphicon-unchecked:before { content: "\e157"; } .glyphicon-expand:before { content: "\e158"; } .glyphicon-collapse-down:before { content: "\e159"; } .glyphicon-collapse-up:before { content: "\e160"; } .glyphicon-log-in:before { content: "\e161"; } .glyphicon-flash:before { content: "\e162"; } .glyphicon-log-out:before { content: "\e163"; } .glyphicon-new-window:before { content: "\e164"; } .glyphicon-record:before { content: "\e165"; } .glyphicon-save:before { content: "\e166"; } .glyphicon-open:before { content: "\e167"; } .glyphicon-saved:before { content: "\e168"; } .glyphicon-import:before { content: "\e169"; } .glyphicon-export:before { content: "\e170"; } .glyphicon-send:before { content: "\e171"; } .glyphicon-floppy-disk:before { content: "\e172"; } .glyphicon-floppy-saved:before { content: "\e173"; } .glyphicon-floppy-remove:before { content: "\e174"; } .glyphicon-floppy-save:before { content: "\e175"; } .glyphicon-floppy-open:before { content: "\e176"; } .glyphicon-credit-card:before { content: "\e177"; } .glyphicon-transfer:before { content: "\e178"; } .glyphicon-cutlery:before { content: "\e179"; } .glyphicon-header:before { content: "\e180"; } .glyphicon-compressed:before { content: "\e181"; } .glyphicon-earphone:before { content: "\e182"; } .glyphicon-phone-alt:before { content: "\e183"; } .glyphicon-tower:before { content: "\e184"; } .glyphicon-stats:before { content: "\e185"; } .glyphicon-sd-video:before { content: "\e186"; } .glyphicon-hd-video:before { content: "\e187"; } .glyphicon-subtitles:before { content: "\e188"; } .glyphicon-sound-stereo:before { content: "\e189"; } .glyphicon-sound-dolby:before { content: "\e190"; } .glyphicon-sound-5-1:before { content: "\e191"; } .glyphicon-sound-6-1:before { content: "\e192"; } .glyphicon-sound-7-1:before { content: "\e193"; } .glyphicon-copyright-mark:before { content: "\e194"; } .glyphicon-registration-mark:before { content: "\e195"; } .glyphicon-cloud-download:before { content: "\e197"; } .glyphicon-cloud-upload:before { content: "\e198"; } .glyphicon-tree-conifer:before { content: "\e199"; } .glyphicon-tree-deciduous:before { content: "\e200"; } * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } *:before, *:after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } html { font-size: 10px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.42857143; color: #333; background-color: #fff; } input, button, select, textarea { font-family: inherit; font-size: inherit; line-height: inherit; } a { color: #337ab7; text-decoration: none; } a:hover, a:focus { color: #23527c; text-decoration: underline; } a:focus { outline: thin dotted; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } figure { margin: 0; } img { vertical-align: middle; } .img-responsive, .thumbnail > img, .thumbnail a > img, .carousel-inner > .item > img, .carousel-inner > .item > a > img { display: block; max-width: 100%; height: auto; } .img-rounded { border-radius: 6px; } .img-thumbnail { display: inline-block; max-width: 100%; height: auto; padding: 4px; line-height: 1.42857143; background-color: #fff; border: 1px solid #ddd; border-radius: 4px; -webkit-transition: all .2s ease-in-out; -o-transition: all .2s ease-in-out; transition: all .2s ease-in-out; } .img-circle { border-radius: 50%; } hr { margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid #eee; } .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; } .sr-only-focusable:active, .sr-only-focusable:focus { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; } h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: inherit; font-weight: 500; line-height: 1.1; color: inherit; } h1 small, h2 small, h3 small, h4 small, h5 small, h6 small, .h1 small, .h2 small, .h3 small, .h4 small, .h5 small, .h6 small, h1 .small, h2 .small, h3 .small, h4 .small, h5 .small, h6 .small, .h1 .small, .h2 .small, .h3 .small, .h4 .small, .h5 .small, .h6 .small { font-weight: normal; line-height: 1; color: #777; } h1, .h1, h2, .h2, h3, .h3 { margin-top: 20px; margin-bottom: 10px; } h1 small, .h1 small, h2 small, .h2 small, h3 small, .h3 small, h1 .small, .h1 .small, h2 .small, .h2 .small, h3 .small, .h3 .small { font-size: 65%; } h4, .h4, h5, .h5, h6, .h6 { margin-top: 10px; margin-bottom: 10px; } h4 small, .h4 small, h5 small, .h5 small, h6 small, .h6 small, h4 .small, .h4 .small, h5 .small, .h5 .small, h6 .small, .h6 .small { font-size: 75%; } h1, .h1 { font-size: 36px; } h2, .h2 { font-size: 30px; } h3, .h3 { font-size: 24px; } h4, .h4 { font-size: 18px; } h5, .h5 { font-size: 14px; } h6, .h6 { font-size: 12px; } p { margin: 0 0 10px; } .lead { margin-bottom: 20px; font-size: 16px; font-weight: 300; line-height: 1.4; } @media (min-width: 768px) { .lead { font-size: 21px; } } small, .small { font-size: 85%; } mark, .mark { padding: .2em; background-color: #fcf8e3; } .text-left { text-align: left; } .text-right { text-align: right; } .text-center { text-align: center; } .text-justify { text-align: justify; } .text-nowrap { white-space: nowrap; } .text-lowercase { text-transform: lowercase; } .text-uppercase { text-transform: uppercase; } .text-capitalize { text-transform: capitalize; } .text-muted { color: #777; } .text-primary { color: #337ab7; } a.text-primary:hover { color: #286090; } .text-success { color: #3c763d; } a.text-success:hover { color: #2b542c; } .text-info { color: #31708f; } a.text-info:hover { color: #245269; } .text-warning { color: #8a6d3b; } a.text-warning:hover { color: #66512c; } .text-danger { color: #a94442; } a.text-danger:hover { color: #843534; } .bg-primary { color: #fff; background-color: #337ab7; } a.bg-primary:hover { background-color: #286090; } .bg-success { background-color: #dff0d8; } a.bg-success:hover { background-color: #c1e2b3; } .bg-info { background-color: #d9edf7; } a.bg-info:hover { background-color: #afd9ee; } .bg-warning { background-color: #fcf8e3; } a.bg-warning:hover { background-color: #f7ecb5; } .bg-danger { background-color: #f2dede; } a.bg-danger:hover { background-color: #e4b9b9; } .page-header { padding-bottom: 9px; margin: 40px 0 20px; border-bottom: 1px solid #eee; } ul, ol { margin-top: 0; margin-bottom: 10px; } ul ul, ol ul, ul ol, ol ol { margin-bottom: 0; } .list-unstyled { padding-left: 0; list-style: none; } .list-inline { padding-left: 0; margin-left: -5px; list-style: none; } .list-inline > li { display: inline-block; padding-right: 5px; padding-left: 5px; } dl { margin-top: 0; margin-bottom: 20px; } dt, dd { line-height: 1.42857143; } dt { font-weight: bold; } dd { margin-left: 0; } @media (min-width: 768px) { .dl-horizontal dt { float: left; width: 160px; overflow: hidden; clear: left; text-align: right; text-overflow: ellipsis; white-space: nowrap; } .dl-horizontal dd { margin-left: 180px; } } abbr[title], abbr[data-original-title] { cursor: help; border-bottom: 1px dotted #777; } .initialism { font-size: 90%; text-transform: uppercase; } blockquote { padding: 10px 20px; margin: 0 0 20px; font-size: 17.5px; border-left: 5px solid #eee; } blockquote p:last-child, blockquote ul:last-child, blockquote ol:last-child { margin-bottom: 0; } blockquote footer, blockquote small, blockquote .small { display: block; font-size: 80%; line-height: 1.42857143; color: #777; } blockquote footer:before, blockquote small:before, blockquote .small:before { content: '\2014 \00A0'; } .blockquote-reverse, blockquote.pull-right { padding-right: 15px; padding-left: 0; text-align: right; border-right: 5px solid #eee; border-left: 0; } .blockquote-reverse footer:before, blockquote.pull-right footer:before, .blockquote-reverse small:before, blockquote.pull-right small:before, .blockquote-reverse .small:before, blockquote.pull-right .small:before { content: ''; } .blockquote-reverse footer:after, blockquote.pull-right footer:after, .blockquote-reverse small:after, blockquote.pull-right small:after, .blockquote-reverse .small:after, blockquote.pull-right .small:after { content: '\00A0 \2014'; } address { margin-bottom: 20px; font-style: normal; line-height: 1.42857143; } code, kbd, pre, samp { font-family: Menlo, Monaco, Consolas, "Courier New", monospace; } code { padding: 2px 4px; font-size: 90%; color: #c7254e; background-color: #f9f2f4; border-radius: 4px; } kbd { padding: 2px 4px; font-size: 90%; color: #fff; background-color: #333; border-radius: 3px; -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); } kbd kbd { padding: 0; font-size: 100%; font-weight: bold; -webkit-box-shadow: none; box-shadow: none; } pre { display: block; padding: 9.5px; margin: 0 0 10px; font-size: 13px; line-height: 1.42857143; color: #333; word-break: break-all; word-wrap: break-word; background-color: #f5f5f5; border: 1px solid #ccc; border-radius: 4px; } pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap; background-color: transparent; border-radius: 0; } .pre-scrollable { max-height: 340px; overflow-y: scroll; } .container { padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; } @media (min-width: 768px) { .container { width: 750px; } } @media (min-width: 992px) { .container { width: 970px; } } @media (min-width: 1200px) { .container { width: 1170px; } } .container-fluid { padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; } .row { margin-right: -15px; margin-left: -15px; } .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 { position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px; } .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 { float: left; } .col-xs-12 { width: 100%; } .col-xs-11 { width: 91.66666667%; } .col-xs-10 { width: 83.33333333%; } .col-xs-9 { width: 75%; } .col-xs-8 { width: 66.66666667%; } .col-xs-7 { width: 58.33333333%; } .col-xs-6 { width: 50%; } .col-xs-5 { width: 41.66666667%; } .col-xs-4 { width: 33.33333333%; } .col-xs-3 { width: 25%; } .col-xs-2 { width: 16.66666667%; } .col-xs-1 { width: 8.33333333%; } .col-xs-pull-12 { right: 100%; } .col-xs-pull-11 { right: 91.66666667%; } .col-xs-pull-10 { right: 83.33333333%; } .col-xs-pull-9 { right: 75%; } .col-xs-pull-8 { right: 66.66666667%; } .col-xs-pull-7 { right: 58.33333333%; } .col-xs-pull-6 { right: 50%; } .col-xs-pull-5 { right: 41.66666667%; } .col-xs-pull-4 { right: 33.33333333%; } .col-xs-pull-3 { right: 25%; } .col-xs-pull-2 { right: 16.66666667%; } .col-xs-pull-1 { right: 8.33333333%; } .col-xs-pull-0 { right: auto; } .col-xs-push-12 { left: 100%; } .col-xs-push-11 { left: 91.66666667%; } .col-xs-push-10 { left: 83.33333333%; } .col-xs-push-9 { left: 75%; } .col-xs-push-8 { left: 66.66666667%; } .col-xs-push-7 { left: 58.33333333%; } .col-xs-push-6 { left: 50%; } .col-xs-push-5 { left: 41.66666667%; } .col-xs-push-4 { left: 33.33333333%; } .col-xs-push-3 { left: 25%; } .col-xs-push-2 { left: 16.66666667%; } .col-xs-push-1 { left: 8.33333333%; } .col-xs-push-0 { left: auto; } .col-xs-offset-12 { margin-left: 100%; } .col-xs-offset-11 { margin-left: 91.66666667%; } .col-xs-offset-10 { margin-left: 83.33333333%; } .col-xs-offset-9 { margin-left: 75%; } .col-xs-offset-8 { margin-left: 66.66666667%; } .col-xs-offset-7 { margin-left: 58.33333333%; } .col-xs-offset-6 { margin-left: 50%; } .col-xs-offset-5 { margin-left: 41.66666667%; } .col-xs-offset-4 { margin-left: 33.33333333%; } .col-xs-offset-3 { margin-left: 25%; } .col-xs-offset-2 { margin-left: 16.66666667%; } .col-xs-offset-1 { margin-left: 8.33333333%; } .col-xs-offset-0 { margin-left: 0; } @media (min-width: 768px) { .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 { float: left; } .col-sm-12 { width: 100%; } .col-sm-11 { width: 91.66666667%; } .col-sm-10 { width: 83.33333333%; } .col-sm-9 { width: 75%; } .col-sm-8 { width: 66.66666667%; } .col-sm-7 { width: 58.33333333%; } .col-sm-6 { width: 50%; } .col-sm-5 { width: 41.66666667%; } .col-sm-4 { width: 33.33333333%; } .col-sm-3 { width: 25%; } .col-sm-2 { width: 16.66666667%; } .col-sm-1 { width: 8.33333333%; } .col-sm-pull-12 { right: 100%; } .col-sm-pull-11 { right: 91.66666667%; } .col-sm-pull-10 { right: 83.33333333%; } .col-sm-pull-9 { right: 75%; } .col-sm-pull-8 { right: 66.66666667%; } .col-sm-pull-7 { right: 58.33333333%; } .col-sm-pull-6 { right: 50%; } .col-sm-pull-5 { right: 41.66666667%; } .col-sm-pull-4 { right: 33.33333333%; } .col-sm-pull-3 { right: 25%; } .col-sm-pull-2 { right: 16.66666667%; } .col-sm-pull-1 { right: 8.33333333%; } .col-sm-pull-0 { right: auto; } .col-sm-push-12 { left: 100%; } .col-sm-push-11 { left: 91.66666667%; } .col-sm-push-10 { left: 83.33333333%; } .col-sm-push-9 { left: 75%; } .col-sm-push-8 { left: 66.66666667%; } .col-sm-push-7 { left: 58.33333333%; } .col-sm-push-6 { left: 50%; } .col-sm-push-5 { left: 41.66666667%; } .col-sm-push-4 { left: 33.33333333%; } .col-sm-push-3 { left: 25%; } .col-sm-push-2 { left: 16.66666667%; } .col-sm-push-1 { left: 8.33333333%; } .col-sm-push-0 { left: auto; } .col-sm-offset-12 { margin-left: 100%; } .col-sm-offset-11 { margin-left: 91.66666667%; } .col-sm-offset-10 { margin-left: 83.33333333%; } .col-sm-offset-9 { margin-left: 75%; } .col-sm-offset-8 { margin-left: 66.66666667%; } .col-sm-offset-7 { margin-left: 58.33333333%; } .col-sm-offset-6 { margin-left: 50%; } .col-sm-offset-5 { margin-left: 41.66666667%; } .col-sm-offset-4 { margin-left: 33.33333333%; } .col-sm-offset-3 { margin-left: 25%; } .col-sm-offset-2 { margin-left: 16.66666667%; } .col-sm-offset-1 { margin-left: 8.33333333%; } .col-sm-offset-0 { margin-left: 0; } } @media (min-width: 992px) { .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 { float: left; } .col-md-12 { width: 100%; } .col-md-11 { width: 91.66666667%; } .col-md-10 { width: 83.33333333%; } .col-md-9 { width: 75%; } .col-md-8 { width: 66.66666667%; } .col-md-7 { width: 58.33333333%; } .col-md-6 { width: 50%; } .col-md-5 { width: 41.66666667%; } .col-md-4 { width: 33.33333333%; } .col-md-3 { width: 25%; } .col-md-2 { width: 16.66666667%; } .col-md-1 { width: 8.33333333%; } .col-md-pull-12 { right: 100%; } .col-md-pull-11 { right: 91.66666667%; } .col-md-pull-10 { right: 83.33333333%; } .col-md-pull-9 { right: 75%; } .col-md-pull-8 { right: 66.66666667%; } .col-md-pull-7 { right: 58.33333333%; } .col-md-pull-6 { right: 50%; } .col-md-pull-5 { right: 41.66666667%; } .col-md-pull-4 { right: 33.33333333%; } .col-md-pull-3 { right: 25%; } .col-md-pull-2 { right: 16.66666667%; } .col-md-pull-1 { right: 8.33333333%; } .col-md-pull-0 { right: auto; } .col-md-push-12 { left: 100%; } .col-md-push-11 { left: 91.66666667%; } .col-md-push-10 { left: 83.33333333%; } .col-md-push-9 { left: 75%; } .col-md-push-8 { left: 66.66666667%; } .col-md-push-7 { left: 58.33333333%; } .col-md-push-6 { left: 50%; } .col-md-push-5 { left: 41.66666667%; } .col-md-push-4 { left: 33.33333333%; } .col-md-push-3 { left: 25%; } .col-md-push-2 { left: 16.66666667%; } .col-md-push-1 { left: 8.33333333%; } .col-md-push-0 { left: auto; } .col-md-offset-12 { margin-left: 100%; } .col-md-offset-11 { margin-left: 91.66666667%; } .col-md-offset-10 { margin-left: 83.33333333%; } .col-md-offset-9 { margin-left: 75%; } .col-md-offset-8 { margin-left: 66.66666667%; } .col-md-offset-7 { margin-left: 58.33333333%; } .col-md-offset-6 { margin-left: 50%; } .col-md-offset-5 { margin-left: 41.66666667%; } .col-md-offset-4 { margin-left: 33.33333333%; } .col-md-offset-3 { margin-left: 25%; } .col-md-offset-2 { margin-left: 16.66666667%; } .col-md-offset-1 { margin-left: 8.33333333%; } .col-md-offset-0 { margin-left: 0; } } @media (min-width: 1200px) { .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 { float: left; } .col-lg-12 { width: 100%; } .col-lg-11 { width: 91.66666667%; } .col-lg-10 { width: 83.33333333%; } .col-lg-9 { width: 75%; } .col-lg-8 { width: 66.66666667%; } .col-lg-7 { width: 58.33333333%; } .col-lg-6 { width: 50%; } .col-lg-5 { width: 41.66666667%; } .col-lg-4 { width: 33.33333333%; } .col-lg-3 { width: 25%; } .col-lg-2 { width: 16.66666667%; } .col-lg-1 { width: 8.33333333%; } .col-lg-pull-12 { right: 100%; } .col-lg-pull-11 { right: 91.66666667%; } .col-lg-pull-10 { right: 83.33333333%; } .col-lg-pull-9 { right: 75%; } .col-lg-pull-8 { right: 66.66666667%; } .col-lg-pull-7 { right: 58.33333333%; } .col-lg-pull-6 { right: 50%; } .col-lg-pull-5 { right: 41.66666667%; } .col-lg-pull-4 { right: 33.33333333%; } .col-lg-pull-3 { right: 25%; } .col-lg-pull-2 { right: 16.66666667%; } .col-lg-pull-1 { right: 8.33333333%; } .col-lg-pull-0 { right: auto; } .col-lg-push-12 { left: 100%; } .col-lg-push-11 { left: 91.66666667%; } .col-lg-push-10 { left: 83.33333333%; } .col-lg-push-9 { left: 75%; } .col-lg-push-8 { left: 66.66666667%; } .col-lg-push-7 { left: 58.33333333%; } .col-lg-push-6 { left: 50%; } .col-lg-push-5 { left: 41.66666667%; } .col-lg-push-4 { left: 33.33333333%; } .col-lg-push-3 { left: 25%; } .col-lg-push-2 { left: 16.66666667%; } .col-lg-push-1 { left: 8.33333333%; } .col-lg-push-0 { left: auto; } .col-lg-offset-12 { margin-left: 100%; } .col-lg-offset-11 { margin-left: 91.66666667%; } .col-lg-offset-10 { margin-left: 83.33333333%; } .col-lg-offset-9 { margin-left: 75%; } .col-lg-offset-8 { margin-left: 66.66666667%; } .col-lg-offset-7 { margin-left: 58.33333333%; } .col-lg-offset-6 { margin-left: 50%; } .col-lg-offset-5 { margin-left: 41.66666667%; } .col-lg-offset-4 { margin-left: 33.33333333%; } .col-lg-offset-3 { margin-left: 25%; } .col-lg-offset-2 { margin-left: 16.66666667%; } .col-lg-offset-1 { margin-left: 8.33333333%; } .col-lg-offset-0 { margin-left: 0; } } table { background-color: transparent; } caption { padding-top: 8px; padding-bottom: 8px; color: #777; text-align: left; } th { text-align: left; } .table { width: 100%; max-width: 100%; margin-bottom: 20px; } .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td { padding: 8px; line-height: 1.42857143; vertical-align: top; border-top: 1px solid #ddd; } .table > thead > tr > th { vertical-align: bottom; border-bottom: 2px solid #ddd; } .table > caption + thead > tr:first-child > th, .table > colgroup + thead > tr:first-child > th, .table > thead:first-child > tr:first-child > th, .table > caption + thead > tr:first-child > td, .table > colgroup + thead > tr:first-child > td, .table > thead:first-child > tr:first-child > td { border-top: 0; } .table > tbody + tbody { border-top: 2px solid #ddd; } .table .table { background-color: #fff; } .table-condensed > thead > tr > th, .table-condensed > tbody > tr > th, .table-condensed > tfoot > tr > th, .table-condensed > thead > tr > td, .table-condensed > tbody > tr > td, .table-condensed > tfoot > tr > td { padding: 5px; } .table-bordered { border: 1px solid #ddd; } .table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td { border: 1px solid #ddd; } .table-bordered > thead > tr > th, .table-bordered > thead > tr > td { border-bottom-width: 2px; } .table-striped > tbody > tr:nth-child(odd) { background-color: #f9f9f9; } .table-hover > tbody > tr:hover { background-color: #f5f5f5; } table col[class*="col-"] { position: static; display: table-column; float: none; } table td[class*="col-"], table th[class*="col-"] { position: static; display: table-cell; float: none; } .table > thead > tr > td.active, .table > tbody > tr > td.active, .table > tfoot > tr > td.active, .table > thead > tr > th.active, .table > tbody > tr > th.active, .table > tfoot > tr > th.active, .table > thead > tr.active > td, .table > tbody > tr.active > td, .table > tfoot > tr.active > td, .table > thead > tr.active > th, .table > tbody > tr.active > th, .table > tfoot > tr.active > th { background-color: #f5f5f5; } .table-hover > tbody > tr > td.active:hover, .table-hover > tbody > tr > th.active:hover, .table-hover > tbody > tr.active:hover > td, .table-hover > tbody > tr:hover > .active, .table-hover > tbody > tr.active:hover > th { background-color: #e8e8e8; } .table > thead > tr > td.success, .table > tbody > tr > td.success, .table > tfoot > tr > td.success, .table > thead > tr > th.success, .table > tbody > tr > th.success, .table > tfoot > tr > th.success, .table > thead > tr.success > td, .table > tbody > tr.success > td, .table > tfoot > tr.success > td, .table > thead > tr.success > th, .table > tbody > tr.success > th, .table > tfoot > tr.success > th { background-color: #dff0d8; } .table-hover > tbody > tr > td.success:hover, .table-hover > tbody > tr > th.success:hover, .table-hover > tbody > tr.success:hover > td, .table-hover > tbody > tr:hover > .success, .table-hover > tbody > tr.success:hover > th { background-color: #d0e9c6; } .table > thead > tr > td.info, .table > tbody > tr > td.info, .table > tfoot > tr > td.info, .table > thead > tr > th.info, .table > tbody > tr > th.info, .table > tfoot > tr > th.info, .table > thead > tr.info > td, .table > tbody > tr.info > td, .table > tfoot > tr.info > td, .table > thead > tr.info > th, .table > tbody > tr.info > th, .table > tfoot > tr.info > th { background-color: #d9edf7; } .table-hover > tbody > tr > td.info:hover, .table-hover > tbody > tr > th.info:hover, .table-hover > tbody > tr.info:hover > td, .table-hover > tbody > tr:hover > .info, .table-hover > tbody > tr.info:hover > th { background-color: #c4e3f3; } .table > thead > tr > td.warning, .table > tbody > tr > td.warning, .table > tfoot > tr > td.warning, .table > thead > tr > th.warning, .table > tbody > tr > th.warning, .table > tfoot > tr > th.warning, .table > thead > tr.warning > td, .table > tbody > tr.warning > td, .table > tfoot > tr.warning > td, .table > thead > tr.warning > th, .table > tbody > tr.warning > th, .table > tfoot > tr.warning > th { background-color: #fcf8e3; } .table-hover > tbody > tr > td.warning:hover, .table-hover > tbody > tr > th.warning:hover, .table-hover > tbody > tr.warning:hover > td, .table-hover > tbody > tr:hover > .warning, .table-hover > tbody > tr.warning:hover > th { background-color: #faf2cc; } .table > thead > tr > td.danger, .table > tbody > tr > td.danger, .table > tfoot > tr > td.danger, .table > thead > tr > th.danger, .table > tbody > tr > th.danger, .table > tfoot > tr > th.danger, .table > thead > tr.danger > td, .table > tbody > tr.danger > td, .table > tfoot > tr.danger > td, .table > thead > tr.danger > th, .table > tbody > tr.danger > th, .table > tfoot > tr.danger > th { background-color: #f2dede; } .table-hover > tbody > tr > td.danger:hover, .table-hover > tbody > tr > th.danger:hover, .table-hover > tbody > tr.danger:hover > td, .table-hover > tbody > tr:hover > .danger, .table-hover > tbody > tr.danger:hover > th { background-color: #ebcccc; } .table-responsive { min-height: .01%; overflow-x: auto; } @media screen and (max-width: 767px) { .table-responsive { width: 100%; margin-bottom: 15px; overflow-y: hidden; -ms-overflow-style: -ms-autohiding-scrollbar; border: 1px solid #ddd; } .table-responsive > .table { margin-bottom: 0; } .table-responsive > .table > thead > tr > th, .table-responsive > .table > tbody > tr > th, .table-responsive > .table > tfoot > tr > th, .table-responsive > .table > thead > tr > td, .table-responsive > .table > tbody > tr > td, .table-responsive > .table > tfoot > tr > td { white-space: nowrap; } .table-responsive > .table-bordered { border: 0; } .table-responsive > .table-bordered > thead > tr > th:first-child, .table-responsive > .table-bordered > tbody > tr > th:first-child, .table-responsive > .table-bordered > tfoot > tr > th:first-child, .table-responsive > .table-bordered > thead > tr > td:first-child, .table-responsive > .table-bordered > tbody > tr > td:first-child, .table-responsive > .table-bordered > tfoot > tr > td:first-child { border-left: 0; } .table-responsive > .table-bordered > thead > tr > th:last-child, .table-responsive > .table-bordered > tbody > tr > th:last-child, .table-responsive > .table-bordered > tfoot > tr > th:last-child, .table-responsive > .table-bordered > thead > tr > td:last-child, .table-responsive > .table-bordered > tbody > tr > td:last-child, .table-responsive > .table-bordered > tfoot > tr > td:last-child { border-right: 0; } .table-responsive > .table-bordered > tbody > tr:last-child > th, .table-responsive > .table-bordered > tfoot > tr:last-child > th, .table-responsive > .table-bordered > tbody > tr:last-child > td, .table-responsive > .table-bordered > tfoot > tr:last-child > td { border-bottom: 0; } } fieldset { min-width: 0; padding: 0; margin: 0; border: 0; } legend { display: block; width: 100%; padding: 0; margin-bottom: 20px; font-size: 21px; line-height: inherit; color: #333; border: 0; border-bottom: 1px solid #e5e5e5; } label { display: inline-block; max-width: 100%; margin-bottom: 5px; font-weight: bold; } input[type="search"] { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } input[type="radio"], input[type="checkbox"] { margin: 4px 0 0; margin-top: 1px \9; line-height: normal; } input[type="file"] { display: block; } input[type="range"] { display: block; width: 100%; } select[multiple], select[size] { height: auto; } input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus { outline: thin dotted; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } output { display: block; padding-top: 7px; font-size: 14px; line-height: 1.42857143; color: #555; } .form-control { display: block; width: 100%; height: 34px; padding: 6px 12px; font-size: 14px; line-height: 1.42857143; color: #555; background-color: #fff; background-image: none; border: 1px solid #ccc; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; } .form-control:focus { border-color: #66afe9; outline: 0; -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); } .form-control::-moz-placeholder { color: #999; opacity: 1; } .form-control:-ms-input-placeholder { color: #999; } .form-control::-webkit-input-placeholder { color: #999; } .form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control { cursor: not-allowed; background-color: #eee; opacity: 1; } textarea.form-control { height: auto; } input[type="search"] { -webkit-appearance: none; } @media screen and (-webkit-min-device-pixel-ratio: 0) { input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"] { line-height: 34px; } input[type="date"].input-sm, input[type="time"].input-sm, input[type="datetime-local"].input-sm, input[type="month"].input-sm { line-height: 30px; } input[type="date"].input-lg, input[type="time"].input-lg, input[type="datetime-local"].input-lg, input[type="month"].input-lg { line-height: 46px; } } .form-group { margin-bottom: 15px; } .radio, .checkbox { position: relative; display: block; margin-top: 10px; margin-bottom: 10px; } .radio label, .checkbox label { min-height: 20px; padding-left: 20px; margin-bottom: 0; font-weight: normal; cursor: pointer; } .radio input[type="radio"], .radio-inline input[type="radio"], .checkbox input[type="checkbox"], .checkbox-inline input[type="checkbox"] { position: absolute; margin-top: 4px \9; margin-left: -20px; } .radio + .radio, .checkbox + .checkbox { margin-top: -5px; } .radio-inline, .checkbox-inline { display: inline-block; padding-left: 20px; margin-bottom: 0; font-weight: normal; vertical-align: middle; cursor: pointer; } .radio-inline + .radio-inline, .checkbox-inline + .checkbox-inline { margin-top: 0; margin-left: 10px; } input[type="radio"][disabled], input[type="checkbox"][disabled], input[type="radio"].disabled, input[type="checkbox"].disabled, fieldset[disabled] input[type="radio"], fieldset[disabled] input[type="checkbox"] { cursor: not-allowed; } .radio-inline.disabled, .checkbox-inline.disabled, fieldset[disabled] .radio-inline, fieldset[disabled] .checkbox-inline { cursor: not-allowed; } .radio.disabled label, .checkbox.disabled label, fieldset[disabled] .radio label, fieldset[disabled] .checkbox label { cursor: not-allowed; } .form-control-static { padding-top: 7px; padding-bottom: 7px; margin-bottom: 0; } .form-control-static.input-lg, .form-control-static.input-sm { padding-right: 0; padding-left: 0; } .input-sm, .form-group-sm .form-control { height: 30px; padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; } select.input-sm, select.form-group-sm .form-control { height: 30px; line-height: 30px; } textarea.input-sm, textarea.form-group-sm .form-control, select[multiple].input-sm, select[multiple].form-group-sm .form-control { height: auto; } .input-lg, .form-group-lg .form-control { height: 46px; padding: 10px 16px; font-size: 18px; line-height: 1.33; border-radius: 6px; } select.input-lg, select.form-group-lg .form-control { height: 46px; line-height: 46px; } textarea.input-lg, textarea.form-group-lg .form-control, select[multiple].input-lg, select[multiple].form-group-lg .form-control { height: auto; } .has-feedback { position: relative; } .has-feedback .form-control { padding-right: 42.5px; } .form-control-feedback { position: absolute; top: 0; right: 0; z-index: 2; display: block; width: 34px; height: 34px; line-height: 34px; text-align: center; pointer-events: none; } .input-lg + .form-control-feedback { width: 46px; height: 46px; line-height: 46px; } .input-sm + .form-control-feedback { width: 30px; height: 30px; line-height: 30px; } .has-success .help-block, .has-success .control-label, .has-success .radio, .has-success .checkbox, .has-success .radio-inline, .has-success .checkbox-inline, .has-success.radio label, .has-success.checkbox label, .has-success.radio-inline label, .has-success.checkbox-inline label { color: #3c763d; } .has-success .form-control { border-color: #3c763d; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); } .has-success .form-control:focus { border-color: #2b542c; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; } .has-success .input-group-addon { color: #3c763d; background-color: #dff0d8; border-color: #3c763d; } .has-success .form-control-feedback { color: #3c763d; } .has-warning .help-block, .has-warning .control-label, .has-warning .radio, .has-warning .checkbox, .has-warning .radio-inline, .has-warning .checkbox-inline, .has-warning.radio label, .has-warning.checkbox label, .has-warning.radio-inline label, .has-warning.checkbox-inline label { color: #8a6d3b; } .has-warning .form-control { border-color: #8a6d3b; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); } .has-warning .form-control:focus { border-color: #66512c; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; } .has-warning .input-group-addon { color: #8a6d3b; background-color: #fcf8e3; border-color: #8a6d3b; } .has-warning .form-control-feedback { color: #8a6d3b; } .has-error .help-block, .has-error .control-label, .has-error .radio, .has-error .checkbox, .has-error .radio-inline, .has-error .checkbox-inline, .has-error.radio label, .has-error.checkbox label, .has-error.radio-inline label, .has-error.checkbox-inline label { color: #a94442; } .has-error .form-control { border-color: #a94442; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); } .has-error .form-control:focus { border-color: #843534; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; } .has-error .input-group-addon { color: #a94442; background-color: #f2dede; border-color: #a94442; } .has-error .form-control-feedback { color: #a94442; } .has-feedback label ~ .form-control-feedback { top: 25px; } .has-feedback label.sr-only ~ .form-control-feedback { top: 0; } .help-block { display: block; margin-top: 5px; margin-bottom: 10px; color: #737373; } @media (min-width: 768px) { .form-inline .form-group { display: inline-block; margin-bottom: 0; vertical-align: middle; } .form-inline .form-control { display: inline-block; width: auto; vertical-align: middle; } .form-inline .form-control-static { display: inline-block; } .form-inline .input-group { display: inline-table; vertical-align: middle; } .form-inline .input-group .input-group-addon, .form-inline .input-group .input-group-btn, .form-inline .input-group .form-control { width: auto; } .form-inline .input-group > .form-control { width: 100%; } .form-inline .control-label { margin-bottom: 0; vertical-align: middle; } .form-inline .radio, .form-inline .checkbox { display: inline-block; margin-top: 0; margin-bottom: 0; vertical-align: middle; } .form-inline .radio label, .form-inline .checkbox label { padding-left: 0; } .form-inline .radio input[type="radio"], .form-inline .checkbox input[type="checkbox"] { position: relative; margin-left: 0; } .form-inline .has-feedback .form-control-feedback { top: 0; } } .form-horizontal .radio, .form-horizontal .checkbox, .form-horizontal .radio-inline, .form-horizontal .checkbox-inline { padding-top: 7px; margin-top: 0; margin-bottom: 0; } .form-horizontal .radio, .form-horizontal .checkbox { min-height: 27px; } .form-horizontal .form-group { margin-right: -15px; margin-left: -15px; } @media (min-width: 768px) { .form-horizontal .control-label { padding-top: 7px; margin-bottom: 0; text-align: right; } } .form-horizontal .has-feedback .form-control-feedback { right: 15px; } @media (min-width: 768px) { .form-horizontal .form-group-lg .control-label { padding-top: 14.3px; } } @media (min-width: 768px) { .form-horizontal .form-group-sm .control-label { padding-top: 6px; } } .btn { display: inline-block; padding: 6px 12px; margin-bottom: 0; font-size: 14px; font-weight: normal; line-height: 1.42857143; text-align: center; white-space: nowrap; vertical-align: middle; -ms-touch-action: manipulation; touch-action: manipulation; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-image: none; border: 1px solid transparent; border-radius: 4px; } .btn:focus, .btn:active:focus, .btn.active:focus, .btn.focus, .btn:active.focus, .btn.active.focus { outline: thin dotted; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } .btn:hover, .btn:focus, .btn.focus { color: #333; text-decoration: none; } .btn:active, .btn.active { background-image: none; outline: 0; -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); } .btn.disabled, .btn[disabled], fieldset[disabled] .btn { pointer-events: none; cursor: not-allowed; filter: alpha(opacity=65); -webkit-box-shadow: none; box-shadow: none; opacity: .65; } .btn-default { color: #333; background-color: #fff; border-color: #ccc; } .btn-default:hover, .btn-default:focus, .btn-default.focus, .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default { color: #333; background-color: #e6e6e6; border-color: #adadad; } .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default { background-image: none; } .btn-default.disabled, .btn-default[disabled], fieldset[disabled] .btn-default, .btn-default.disabled:hover, .btn-default[disabled]:hover, fieldset[disabled] .btn-default:hover, .btn-default.disabled:focus, .btn-default[disabled]:focus, fieldset[disabled] .btn-default:focus, .btn-default.disabled.focus, .btn-default[disabled].focus, fieldset[disabled] .btn-default.focus, .btn-default.disabled:active, .btn-default[disabled]:active, fieldset[disabled] .btn-default:active, .btn-default.disabled.active, .btn-default[disabled].active, fieldset[disabled] .btn-default.active { background-color: #fff; border-color: #ccc; } .btn-default .badge { color: #fff; background-color: #333; } .btn-primary { color: #fff; background-color: #337ab7; border-color: #2e6da4; } .btn-primary:hover, .btn-primary:focus, .btn-primary.focus, .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary { color: #fff; background-color: #286090; border-color: #204d74; } .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary { background-image: none; } .btn-primary.disabled, .btn-primary[disabled], fieldset[disabled] .btn-primary, .btn-primary.disabled:hover, .btn-primary[disabled]:hover, fieldset[disabled] .btn-primary:hover, .btn-primary.disabled:focus, .btn-primary[disabled]:focus, fieldset[disabled] .btn-primary:focus, .btn-primary.disabled.focus, .btn-primary[disabled].focus, fieldset[disabled] .btn-primary.focus, .btn-primary.disabled:active, .btn-primary[disabled]:active, fieldset[disabled] .btn-primary:active, .btn-primary.disabled.active, .btn-primary[disabled].active, fieldset[disabled] .btn-primary.active { background-color: #337ab7; border-color: #2e6da4; } .btn-primary .badge { color: #337ab7; background-color: #fff; } .btn-success { color: #fff; background-color: #5cb85c; border-color: #4cae4c; } .btn-success:hover, .btn-success:focus, .btn-success.focus, .btn-success:active, .btn-success.active, .open > .dropdown-toggle.btn-success { color: #fff; background-color: #449d44; border-color: #398439; } .btn-success:active, .btn-success.active, .open > .dropdown-toggle.btn-success { background-image: none; } .btn-success.disabled, .btn-success[disabled], fieldset[disabled] .btn-success, .btn-success.disabled:hover, .btn-success[disabled]:hover, fieldset[disabled] .btn-success:hover, .btn-success.disabled:focus, .btn-success[disabled]:focus, fieldset[disabled] .btn-success:focus, .btn-success.disabled.focus, .btn-success[disabled].focus, fieldset[disabled] .btn-success.focus, .btn-success.disabled:active, .btn-success[disabled]:active, fieldset[disabled] .btn-success:active, .btn-success.disabled.active, .btn-success[disabled].active, fieldset[disabled] .btn-success.active { background-color: #5cb85c; border-color: #4cae4c; } .btn-success .badge { color: #5cb85c; background-color: #fff; } .btn-info { color: #fff; background-color: #5bc0de; border-color: #46b8da; } .btn-info:hover, .btn-info:focus, .btn-info.focus, .btn-info:active, .btn-info.active, .open > .dropdown-toggle.btn-info { color: #fff; background-color: #31b0d5; border-color: #269abc; } .btn-info:active, .btn-info.active, .open > .dropdown-toggle.btn-info { background-image: none; } .btn-info.disabled, .btn-info[disabled], fieldset[disabled] .btn-info, .btn-info.disabled:hover, .btn-info[disabled]:hover, fieldset[disabled] .btn-info:hover, .btn-info.disabled:focus, .btn-info[disabled]:focus, fieldset[disabled] .btn-info:focus, .btn-info.disabled.focus, .btn-info[disabled].focus, fieldset[disabled] .btn-info.focus, .btn-info.disabled:active, .btn-info[disabled]:active, fieldset[disabled] .btn-info:active, .btn-info.disabled.active, .btn-info[disabled].active, fieldset[disabled] .btn-info.active { background-color: #5bc0de; border-color: #46b8da; } .btn-info .badge { color: #5bc0de; background-color: #fff; } .btn-warning { color: #fff; background-color: #f0ad4e; border-color: #eea236; } .btn-warning:hover, .btn-warning:focus, .btn-warning.focus, .btn-warning:active, .btn-warning.active, .open > .dropdown-toggle.btn-warning { color: #fff; background-color: #ec971f; border-color: #d58512; } .btn-warning:active, .btn-warning.active, .open > .dropdown-toggle.btn-warning { background-image: none; } .btn-warning.disabled, .btn-warning[disabled], fieldset[disabled] .btn-warning, .btn-warning.disabled:hover, .btn-warning[disabled]:hover, fieldset[disabled] .btn-warning:hover, .btn-warning.disabled:focus, .btn-warning[disabled]:focus, fieldset[disabled] .btn-warning:focus, .btn-warning.disabled.focus, .btn-warning[disabled].focus, fieldset[disabled] .btn-warning.focus, .btn-warning.disabled:active, .btn-warning[disabled]:active, fieldset[disabled] .btn-warning:active, .btn-warning.disabled.active, .btn-warning[disabled].active, fieldset[disabled] .btn-warning.active { background-color: #f0ad4e; border-color: #eea236; } .btn-warning .badge { color: #f0ad4e; background-color: #fff; } .btn-danger { color: #fff; background-color: #d9534f; border-color: #d43f3a; } .btn-danger:hover, .btn-danger:focus, .btn-danger.focus, .btn-danger:active, .btn-danger.active, .open > .dropdown-toggle.btn-danger { color: #fff; background-color: #c9302c; border-color: #ac2925; } .btn-danger:active, .btn-danger.active, .open > .dropdown-toggle.btn-danger { background-image: none; } .btn-danger.disabled, .btn-danger[disabled], fieldset[disabled] .btn-danger, .btn-danger.disabled:hover, .btn-danger[disabled]:hover, fieldset[disabled] .btn-danger:hover, .btn-danger.disabled:focus, .btn-danger[disabled]:focus, fieldset[disabled] .btn-danger:focus, .btn-danger.disabled.focus, .btn-danger[disabled].focus, fieldset[disabled] .btn-danger.focus, .btn-danger.disabled:active, .btn-danger[disabled]:active, fieldset[disabled] .btn-danger:active, .btn-danger.disabled.active, .btn-danger[disabled].active, fieldset[disabled] .btn-danger.active { background-color: #d9534f; border-color: #d43f3a; } .btn-danger .badge { color: #d9534f; background-color: #fff; } .btn-link { font-weight: normal; color: #337ab7; border-radius: 0; } .btn-link, .btn-link:active, .btn-link.active, .btn-link[disabled], fieldset[disabled] .btn-link { background-color: transparent; -webkit-box-shadow: none; box-shadow: none; } .btn-link, .btn-link:hover, .btn-link:focus, .btn-link:active { border-color: transparent; } .btn-link:hover, .btn-link:focus { color: #23527c; text-decoration: underline; background-color: transparent; } .btn-link[disabled]:hover, fieldset[disabled] .btn-link:hover, .btn-link[disabled]:focus, fieldset[disabled] .btn-link:focus { color: #777; text-decoration: none; } .btn-lg, .btn-group-lg > .btn { padding: 10px 16px; font-size: 18px; line-height: 1.33; border-radius: 6px; } .btn-sm, .btn-group-sm > .btn { padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; } .btn-xs, .btn-group-xs > .btn { padding: 1px 5px; font-size: 12px; line-height: 1.5; border-radius: 3px; } .btn-block { display: block; width: 100%; } .btn-block + .btn-block { margin-top: 5px; } input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="button"].btn-block { width: 100%; } .fade { opacity: 0; -webkit-transition: opacity .15s linear; -o-transition: opacity .15s linear; transition: opacity .15s linear; } .fade.in { opacity: 1; } .collapse { display: none; visibility: hidden; } .collapse.in { display: block; visibility: visible; } tr.collapse.in { display: table-row; } tbody.collapse.in { display: table-row-group; } .collapsing { position: relative; height: 0; overflow: hidden; -webkit-transition-timing-function: ease; -o-transition-timing-function: ease; transition-timing-function: ease; -webkit-transition-duration: .35s; -o-transition-duration: .35s; transition-duration: .35s; -webkit-transition-property: height, visibility; -o-transition-property: height, visibility; transition-property: height, visibility; } .caret { display: inline-block; width: 0; height: 0; margin-left: 2px; vertical-align: middle; border-top: 4px solid; border-right: 4px solid transparent; border-left: 4px solid transparent; } .dropdown { position: relative; } .dropdown-toggle:focus { outline: 0; } .dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 1000; display: none; float: left; min-width: 160px; padding: 5px 0; margin: 2px 0 0; font-size: 14px; text-align: left; list-style: none; background-color: #fff; -webkit-background-clip: padding-box; background-clip: padding-box; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, .15); border-radius: 4px; -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175); box-shadow: 0 6px 12px rgba(0, 0, 0, .175); } .dropdown-menu.pull-right { right: 0; left: auto; } .dropdown-menu .divider { height: 1px; margin: 9px 0; overflow: hidden; background-color: #e5e5e5; } .dropdown-menu > li > a { display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 1.42857143; color: #333; white-space: nowrap; } .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { color: #262626; text-decoration: none; background-color: #f5f5f5; } .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { color: #fff; text-decoration: none; background-color: #337ab7; outline: 0; } .dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { color: #777; } .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { text-decoration: none; cursor: not-allowed; background-color: transparent; background-image: none; filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .open > .dropdown-menu { display: block; } .open > a { outline: 0; } .dropdown-menu-right { right: 0; left: auto; } .dropdown-menu-left { right: auto; left: 0; } .dropdown-header { display: block; padding: 3px 20px; font-size: 12px; line-height: 1.42857143; color: #777; white-space: nowrap; } .dropdown-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 990; } .pull-right > .dropdown-menu { right: 0; left: auto; } .dropup .caret, .navbar-fixed-bottom .dropdown .caret { content: ""; border-top: 0; border-bottom: 4px solid; } .dropup .dropdown-menu, .navbar-fixed-bottom .dropdown .dropdown-menu { top: auto; bottom: 100%; margin-bottom: 1px; } @media (min-width: 768px) { .navbar-right .dropdown-menu { right: 0; left: auto; } .navbar-right .dropdown-menu-left { right: auto; left: 0; } } .btn-group, .btn-group-vertical { position: relative; display: inline-block; vertical-align: middle; } .btn-group > .btn, .btn-group-vertical > .btn { position: relative; float: left; } .btn-group > .btn:hover, .btn-group-vertical > .btn:hover, .btn-group > .btn:focus, .btn-group-vertical > .btn:focus, .btn-group > .btn:active, .btn-group-vertical > .btn:active, .btn-group > .btn.active, .btn-group-vertical > .btn.active { z-index: 2; } .btn-group .btn + .btn, .btn-group .btn + .btn-group, .btn-group .btn-group + .btn, .btn-group .btn-group + .btn-group { margin-left: -1px; } .btn-toolbar { margin-left: -5px; } .btn-toolbar .btn-group, .btn-toolbar .input-group { float: left; } .btn-toolbar > .btn, .btn-toolbar > .btn-group, .btn-toolbar > .input-group { margin-left: 5px; } .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { border-radius: 0; } .btn-group > .btn:first-child { margin-left: 0; } .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { border-top-right-radius: 0; border-bottom-right-radius: 0; } .btn-group > .btn:last-child:not(:first-child), .btn-group > .dropdown-toggle:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; } .btn-group > .btn-group { float: left; } .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } .btn-group > .btn-group:first-child > .btn:last-child, .btn-group > .btn-group:first-child > .dropdown-toggle { border-top-right-radius: 0; border-bottom-right-radius: 0; } .btn-group > .btn-group:last-child > .btn:first-child { border-top-left-radius: 0; border-bottom-left-radius: 0; } .btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle { outline: 0; } .btn-group > .btn + .dropdown-toggle { padding-right: 8px; padding-left: 8px; } .btn-group > .btn-lg + .dropdown-toggle { padding-right: 12px; padding-left: 12px; } .btn-group.open .dropdown-toggle { -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); } .btn-group.open .dropdown-toggle.btn-link { -webkit-box-shadow: none; box-shadow: none; } .btn .caret { margin-left: 0; } .btn-lg .caret { border-width: 5px 5px 0; border-bottom-width: 0; } .dropup .btn-lg .caret { border-width: 0 5px 5px; } .btn-group-vertical > .btn, .btn-group-vertical > .btn-group, .btn-group-vertical > .btn-group > .btn { display: block; float: none; width: 100%; max-width: 100%; } .btn-group-vertical > .btn-group > .btn { float: none; } .btn-group-vertical > .btn + .btn, .btn-group-vertical > .btn + .btn-group, .btn-group-vertical > .btn-group + .btn, .btn-group-vertical > .btn-group + .btn-group { margin-top: -1px; margin-left: 0; } .btn-group-vertical > .btn:not(:first-child):not(:last-child) { border-radius: 0; } .btn-group-vertical > .btn:first-child:not(:last-child) { border-top-right-radius: 4px; border-bottom-right-radius: 0; border-bottom-left-radius: 0; } .btn-group-vertical > .btn:last-child:not(:first-child) { border-top-left-radius: 0; border-top-right-radius: 0; border-bottom-left-radius: 4px; } .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } .btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, .btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { border-bottom-right-radius: 0; border-bottom-left-radius: 0; } .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { border-top-left-radius: 0; border-top-right-radius: 0; } .btn-group-justified { display: table; width: 100%; table-layout: fixed; border-collapse: separate; } .btn-group-justified > .btn, .btn-group-justified > .btn-group { display: table-cell; float: none; width: 1%; } .btn-group-justified > .btn-group .btn { width: 100%; } .btn-group-justified > .btn-group .dropdown-menu { left: auto; } [data-toggle="buttons"] > .btn input[type="radio"], [data-toggle="buttons"] > .btn-group > .btn input[type="radio"], [data-toggle="buttons"] > .btn input[type="checkbox"], [data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] { position: absolute; clip: rect(0, 0, 0, 0); pointer-events: none; } .input-group { position: relative; display: table; border-collapse: separate; } .input-group[class*="col-"] { float: none; padding-right: 0; padding-left: 0; } .input-group .form-control { position: relative; z-index: 2; float: left; width: 100%; margin-bottom: 0; } .input-group-lg > .form-control, .input-group-lg > .input-group-addon, .input-group-lg > .input-group-btn > .btn { height: 46px; padding: 10px 16px; font-size: 18px; line-height: 1.33; border-radius: 6px; } select.input-group-lg > .form-control, select.input-group-lg > .input-group-addon, select.input-group-lg > .input-group-btn > .btn { height: 46px; line-height: 46px; } textarea.input-group-lg > .form-control, textarea.input-group-lg > .input-group-addon, textarea.input-group-lg > .input-group-btn > .btn, select[multiple].input-group-lg > .form-control, select[multiple].input-group-lg > .input-group-addon, select[multiple].input-group-lg > .input-group-btn > .btn { height: auto; } .input-group-sm > .form-control, .input-group-sm > .input-group-addon, .input-group-sm > .input-group-btn > .btn { height: 30px; padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; } select.input-group-sm > .form-control, select.input-group-sm > .input-group-addon, select.input-group-sm > .input-group-btn > .btn { height: 30px; line-height: 30px; } textarea.input-group-sm > .form-control, textarea.input-group-sm > .input-group-addon, textarea.input-group-sm > .input-group-btn > .btn, select[multiple].input-group-sm > .form-control, select[multiple].input-group-sm > .input-group-addon, select[multiple].input-group-sm > .input-group-btn > .btn { height: auto; } .input-group-addon, .input-group-btn, .input-group .form-control { display: table-cell; } .input-group-addon:not(:first-child):not(:last-child), .input-group-btn:not(:first-child):not(:last-child), .input-group .form-control:not(:first-child):not(:last-child) { border-radius: 0; } .input-group-addon, .input-group-btn { width: 1%; white-space: nowrap; vertical-align: middle; } .input-group-addon { padding: 6px 12px; font-size: 14px; font-weight: normal; line-height: 1; color: #555; text-align: center; background-color: #eee; border: 1px solid #ccc; border-radius: 4px; } .input-group-addon.input-sm { padding: 5px 10px; font-size: 12px; border-radius: 3px; } .input-group-addon.input-lg { padding: 10px 16px; font-size: 18px; border-radius: 6px; } .input-group-addon input[type="radio"], .input-group-addon input[type="checkbox"] { margin-top: 0; } .input-group .form-control:first-child, .input-group-addon:first-child, .input-group-btn:first-child > .btn, .input-group-btn:first-child > .btn-group > .btn, .input-group-btn:first-child > .dropdown-toggle, .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), .input-group-btn:last-child > .btn-group:not(:last-child) > .btn { border-top-right-radius: 0; border-bottom-right-radius: 0; } .input-group-addon:first-child { border-right: 0; } .input-group .form-control:last-child, .input-group-addon:last-child, .input-group-btn:last-child > .btn, .input-group-btn:last-child > .btn-group > .btn, .input-group-btn:last-child > .dropdown-toggle, .input-group-btn:first-child > .btn:not(:first-child), .input-group-btn:first-child > .btn-group:not(:first-child) > .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; } .input-group-addon:last-child { border-left: 0; } .input-group-btn { position: relative; font-size: 0; white-space: nowrap; } .input-group-btn > .btn { position: relative; } .input-group-btn > .btn + .btn { margin-left: -1px; } .input-group-btn > .btn:hover, .input-group-btn > .btn:focus, .input-group-btn > .btn:active { z-index: 2; } .input-group-btn:first-child > .btn, .input-group-btn:first-child > .btn-group { margin-right: -1px; } .input-group-btn:last-child > .btn, .input-group-btn:last-child > .btn-group { margin-left: -1px; } .nav { padding-left: 0; margin-bottom: 0; list-style: none; } .nav > li { position: relative; display: block; } .nav > li > a { position: relative; display: block; padding: 10px 15px; } .nav > li > a:hover, .nav > li > a:focus { text-decoration: none; background-color: #eee; } .nav > li.disabled > a { color: #777; } .nav > li.disabled > a:hover, .nav > li.disabled > a:focus { color: #777; text-decoration: none; cursor: not-allowed; background-color: transparent; } .nav .open > a, .nav .open > a:hover, .nav .open > a:focus { background-color: #eee; border-color: #337ab7; } .nav .nav-divider { height: 1px; margin: 9px 0; overflow: hidden; background-color: #e5e5e5; } .nav > li > a > img { max-width: none; } .nav-tabs { border-bottom: 1px solid #ddd; } .nav-tabs > li { float: left; margin-bottom: -1px; } .nav-tabs > li > a { margin-right: 2px; line-height: 1.42857143; border: 1px solid transparent; border-radius: 4px 4px 0 0; } .nav-tabs > li > a:hover { border-color: #eee #eee #ddd; } .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus { color: #555; cursor: default; background-color: #fff; border: 1px solid #ddd; border-bottom-color: transparent; } .nav-tabs.nav-justified { width: 100%; border-bottom: 0; } .nav-tabs.nav-justified > li { float: none; } .nav-tabs.nav-justified > li > a { margin-bottom: 5px; text-align: center; } .nav-tabs.nav-justified > .dropdown .dropdown-menu { top: auto; left: auto; } @media (min-width: 768px) { .nav-tabs.nav-justified > li { display: table-cell; width: 1%; } .nav-tabs.nav-justified > li > a { margin-bottom: 0; } } .nav-tabs.nav-justified > li > a { margin-right: 0; border-radius: 4px; } .nav-tabs.nav-justified > .active > a, .nav-tabs.nav-justified > .active > a:hover, .nav-tabs.nav-justified > .active > a:focus { border: 1px solid #ddd; } @media (min-width: 768px) { .nav-tabs.nav-justified > li > a { border-bottom: 1px solid #ddd; border-radius: 4px 4px 0 0; } .nav-tabs.nav-justified > .active > a, .nav-tabs.nav-justified > .active > a:hover, .nav-tabs.nav-justified > .active > a:focus { border-bottom-color: #fff; } } .nav-pills > li { float: left; } .nav-pills > li > a { border-radius: 4px; } .nav-pills > li + li { margin-left: 2px; } .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus { color: #fff; background-color: #337ab7; } .nav-stacked > li { float: none; } .nav-stacked > li + li { margin-top: 2px; margin-left: 0; } .nav-justified { width: 100%; } .nav-justified > li { float: none; } .nav-justified > li > a { margin-bottom: 5px; text-align: center; } .nav-justified > .dropdown .dropdown-menu { top: auto; left: auto; } @media (min-width: 768px) { .nav-justified > li { display: table-cell; width: 1%; } .nav-justified > li > a { margin-bottom: 0; } } .nav-tabs-justified { border-bottom: 0; } .nav-tabs-justified > li > a { margin-right: 0; border-radius: 4px; } .nav-tabs-justified > .active > a, .nav-tabs-justified > .active > a:hover, .nav-tabs-justified > .active > a:focus { border: 1px solid #ddd; } @media (min-width: 768px) { .nav-tabs-justified > li > a { border-bottom: 1px solid #ddd; border-radius: 4px 4px 0 0; } .nav-tabs-justified > .active > a, .nav-tabs-justified > .active > a:hover, .nav-tabs-justified > .active > a:focus { border-bottom-color: #fff; } } .tab-content > .tab-pane { display: none; visibility: hidden; } .tab-content > .active { display: block; visibility: visible; } .nav-tabs .dropdown-menu { margin-top: -1px; border-top-left-radius: 0; border-top-right-radius: 0; } .navbar { position: relative; min-height: 50px; margin-bottom: 20px; border: 1px solid transparent; } @media (min-width: 768px) { .navbar { border-radius: 4px; } } @media (min-width: 768px) { .navbar-header { float: left; } } .navbar-collapse { padding-right: 15px; padding-left: 15px; overflow-x: visible; -webkit-overflow-scrolling: touch; border-top: 1px solid transparent; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); } .navbar-collapse.in { overflow-y: auto; } @media (min-width: 768px) { .navbar-collapse { width: auto; border-top: 0; -webkit-box-shadow: none; box-shadow: none; } .navbar-collapse.collapse { display: block !important; height: auto !important; padding-bottom: 0; overflow: visible !important; visibility: visible !important; } .navbar-collapse.in { overflow-y: visible; } .navbar-fixed-top .navbar-collapse, .navbar-static-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse { padding-right: 0; padding-left: 0; } } .navbar-fixed-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse { max-height: 340px; } @media (max-device-width: 480px) and (orientation: landscape) { .navbar-fixed-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse { max-height: 200px; } } .container > .navbar-header, .container-fluid > .navbar-header, .container > .navbar-collapse, .container-fluid > .navbar-collapse { margin-right: -15px; margin-left: -15px; } @media (min-width: 768px) { .container > .navbar-header, .container-fluid > .navbar-header, .container > .navbar-collapse, .container-fluid > .navbar-collapse { margin-right: 0; margin-left: 0; } } .navbar-static-top { z-index: 1000; border-width: 0 0 1px; } @media (min-width: 768px) { .navbar-static-top { border-radius: 0; } } .navbar-fixed-top, .navbar-fixed-bottom { position: fixed; right: 0; left: 0; z-index: 1030; } @media (min-width: 768px) { .navbar-fixed-top, .navbar-fixed-bottom { border-radius: 0; } } .navbar-fixed-top { top: 0; border-width: 0 0 1px; } .navbar-fixed-bottom { bottom: 0; margin-bottom: 0; border-width: 1px 0 0; } .navbar-brand { float: left; height: 50px; padding: 15px 15px; font-size: 18px; line-height: 20px; } .navbar-brand:hover, .navbar-brand:focus { text-decoration: none; } .navbar-brand > img { display: block; } @media (min-width: 768px) { .navbar > .container .navbar-brand, .navbar > .container-fluid .navbar-brand { margin-left: -15px; } } .navbar-toggle { position: relative; float: right; padding: 9px 10px; margin-top: 8px; margin-right: 15px; margin-bottom: 8px; background-color: transparent; background-image: none; border: 1px solid transparent; border-radius: 4px; } .navbar-toggle:focus { outline: 0; } .navbar-toggle .icon-bar { display: block; width: 22px; height: 2px; border-radius: 1px; } .navbar-toggle .icon-bar + .icon-bar { margin-top: 4px; } @media (min-width: 768px) { .navbar-toggle { display: none; } } .navbar-nav { margin: 7.5px -15px; } .navbar-nav > li > a { padding-top: 10px; padding-bottom: 10px; line-height: 20px; } @media (max-width: 767px) { .navbar-nav .open .dropdown-menu { position: static; float: none; width: auto; margin-top: 0; background-color: transparent; border: 0; -webkit-box-shadow: none; box-shadow: none; } .navbar-nav .open .dropdown-menu > li > a, .navbar-nav .open .dropdown-menu .dropdown-header { padding: 5px 15px 5px 25px; } .navbar-nav .open .dropdown-menu > li > a { line-height: 20px; } .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-nav .open .dropdown-menu > li > a:focus { background-image: none; } } @media (min-width: 768px) { .navbar-nav { float: left; margin: 0; } .navbar-nav > li { float: left; } .navbar-nav > li > a { padding-top: 15px; padding-bottom: 15px; } } .navbar-form { padding: 10px 15px; margin-top: 8px; margin-right: -15px; margin-bottom: 8px; margin-left: -15px; border-top: 1px solid transparent; border-bottom: 1px solid transparent; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); } @media (min-width: 768px) { .navbar-form .form-group { display: inline-block; margin-bottom: 0; vertical-align: middle; } .navbar-form .form-control { display: inline-block; width: auto; vertical-align: middle; } .navbar-form .form-control-static { display: inline-block; } .navbar-form .input-group { display: inline-table; vertical-align: middle; } .navbar-form .input-group .input-group-addon, .navbar-form .input-group .input-group-btn, .navbar-form .input-group .form-control { width: auto; } .navbar-form .input-group > .form-control { width: 100%; } .navbar-form .control-label { margin-bottom: 0; vertical-align: middle; } .navbar-form .radio, .navbar-form .checkbox { display: inline-block; margin-top: 0; margin-bottom: 0; vertical-align: middle; } .navbar-form .radio label, .navbar-form .checkbox label { padding-left: 0; } .navbar-form .radio input[type="radio"], .navbar-form .checkbox input[type="checkbox"] { position: relative; margin-left: 0; } .navbar-form .has-feedback .form-control-feedback { top: 0; } } @media (max-width: 767px) { .navbar-form .form-group { margin-bottom: 5px; } .navbar-form .form-group:last-child { margin-bottom: 0; } } @media (min-width: 768px) { .navbar-form { width: auto; padding-top: 0; padding-bottom: 0; margin-right: 0; margin-left: 0; border: 0; -webkit-box-shadow: none; box-shadow: none; } } .navbar-nav > li > .dropdown-menu { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; } .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 0; border-bottom-left-radius: 0; } .navbar-btn { margin-top: 8px; margin-bottom: 8px; } .navbar-btn.btn-sm { margin-top: 10px; margin-bottom: 10px; } .navbar-btn.btn-xs { margin-top: 14px; margin-bottom: 14px; } .navbar-text { margin-top: 15px; margin-bottom: 15px; } @media (min-width: 768px) { .navbar-text { float: left; margin-right: 15px; margin-left: 15px; } } @media (min-width: 768px) { .navbar-left { float: left !important; } .navbar-right { float: right !important; margin-right: -15px; } .navbar-right ~ .navbar-right { margin-right: 0; } } .navbar-default { background-color: #f8f8f8; border-color: #e7e7e7; } .navbar-default .navbar-brand { color: #777; } .navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus { color: #5e5e5e; background-color: transparent; } .navbar-default .navbar-text { color: #777; } .navbar-default .navbar-nav > li > a { color: #777; } .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus { color: #333; background-color: transparent; } .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus { color: #555; background-color: #e7e7e7; } .navbar-default .navbar-nav > .disabled > a, .navbar-default .navbar-nav > .disabled > a:hover, .navbar-default .navbar-nav > .disabled > a:focus { color: #ccc; background-color: transparent; } .navbar-default .navbar-toggle { border-color: #ddd; } .navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus { background-color: #ddd; } .navbar-default .navbar-toggle .icon-bar { background-color: #888; } .navbar-default .navbar-collapse, .navbar-default .navbar-form { border-color: #e7e7e7; } .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus { color: #555; background-color: #e7e7e7; } @media (max-width: 767px) { .navbar-default .navbar-nav .open .dropdown-menu > li > a { color: #777; } .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { color: #333; background-color: transparent; } .navbar-default .navbar-nav .open .dropdown-menu > .active > a, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { color: #555; background-color: #e7e7e7; } .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { color: #ccc; background-color: transparent; } } .navbar-default .navbar-link { color: #777; } .navbar-default .navbar-link:hover { color: #333; } .navbar-default .btn-link { color: #777; } .navbar-default .btn-link:hover, .navbar-default .btn-link:focus { color: #333; } .navbar-default .btn-link[disabled]:hover, fieldset[disabled] .navbar-default .btn-link:hover, .navbar-default .btn-link[disabled]:focus, fieldset[disabled] .navbar-default .btn-link:focus { color: #ccc; } .navbar-inverse { background-color: #222; border-color: #080808; } .navbar-inverse .navbar-brand { color: #9d9d9d; } .navbar-inverse .navbar-brand:hover, .navbar-inverse .navbar-brand:focus { color: #fff; background-color: transparent; } .navbar-inverse .navbar-text { color: #9d9d9d; } .navbar-inverse .navbar-nav > li > a { color: #9d9d9d; } .navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus { color: #fff; background-color: transparent; } .navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus { color: #fff; background-color: #080808; } .navbar-inverse .navbar-nav > .disabled > a, .navbar-inverse .navbar-nav > .disabled > a:hover, .navbar-inverse .navbar-nav > .disabled > a:focus { color: #444; background-color: transparent; } .navbar-inverse .navbar-toggle { border-color: #333; } .navbar-inverse .navbar-toggle:hover, .navbar-inverse .navbar-toggle:focus { background-color: #333; } .navbar-inverse .navbar-toggle .icon-bar { background-color: #fff; } .navbar-inverse .navbar-collapse, .navbar-inverse .navbar-form { border-color: #101010; } .navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:hover, .navbar-inverse .navbar-nav > .open > a:focus { color: #fff; background-color: #080808; } @media (max-width: 767px) { .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { border-color: #080808; } .navbar-inverse .navbar-nav .open .dropdown-menu .divider { background-color: #080808; } .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { color: #9d9d9d; } .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { color: #fff; background-color: transparent; } .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { color: #fff; background-color: #080808; } .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { color: #444; background-color: transparent; } } .navbar-inverse .navbar-link { color: #9d9d9d; } .navbar-inverse .navbar-link:hover { color: #fff; } .navbar-inverse .btn-link { color: #9d9d9d; } .navbar-inverse .btn-link:hover, .navbar-inverse .btn-link:focus { color: #fff; } .navbar-inverse .btn-link[disabled]:hover, fieldset[disabled] .navbar-inverse .btn-link:hover, .navbar-inverse .btn-link[disabled]:focus, fieldset[disabled] .navbar-inverse .btn-link:focus { color: #444; } .breadcrumb { padding: 8px 15px; margin-bottom: 20px; list-style: none; background-color: #f5f5f5; border-radius: 4px; } .breadcrumb > li { display: inline-block; } .breadcrumb > li + li:before { padding: 0 5px; color: #ccc; content: "/\00a0"; } .breadcrumb > .active { color: #777; } .pagination { display: inline-block; padding-left: 0; margin: 20px 0; border-radius: 4px; } .pagination > li { display: inline; } .pagination > li > a, .pagination > li > span { position: relative; float: left; padding: 6px 12px; margin-left: -1px; line-height: 1.42857143; color: #337ab7; text-decoration: none; background-color: #fff; border: 1px solid #ddd; } .pagination > li:first-child > a, .pagination > li:first-child > span { margin-left: 0; border-top-left-radius: 4px; border-bottom-left-radius: 4px; } .pagination > li:last-child > a, .pagination > li:last-child > span { border-top-right-radius: 4px; border-bottom-right-radius: 4px; } .pagination > li > a:hover, .pagination > li > span:hover, .pagination > li > a:focus, .pagination > li > span:focus { color: #23527c; background-color: #eee; border-color: #ddd; } .pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > span:hover, .pagination > .active > a:focus, .pagination > .active > span:focus { z-index: 2; color: #fff; cursor: default; background-color: #337ab7; border-color: #337ab7; } .pagination > .disabled > span, .pagination > .disabled > span:hover, .pagination > .disabled > span:focus, .pagination > .disabled > a, .pagination > .disabled > a:hover, .pagination > .disabled > a:focus { color: #777; cursor: not-allowed; background-color: #fff; border-color: #ddd; } .pagination-lg > li > a, .pagination-lg > li > span { padding: 10px 16px; font-size: 18px; } .pagination-lg > li:first-child > a, .pagination-lg > li:first-child > span { border-top-left-radius: 6px; border-bottom-left-radius: 6px; } .pagination-lg > li:last-child > a, .pagination-lg > li:last-child > span { border-top-right-radius: 6px; border-bottom-right-radius: 6px; } .pagination-sm > li > a, .pagination-sm > li > span { padding: 5px 10px; font-size: 12px; } .pagination-sm > li:first-child > a, .pagination-sm > li:first-child > span { border-top-left-radius: 3px; border-bottom-left-radius: 3px; } .pagination-sm > li:last-child > a, .pagination-sm > li:last-child > span { border-top-right-radius: 3px; border-bottom-right-radius: 3px; } .pager { padding-left: 0; margin: 20px 0; text-align: center; list-style: none; } .pager li { display: inline; } .pager li > a, .pager li > span { display: inline-block; padding: 5px 14px; background-color: #fff; border: 1px solid #ddd; border-radius: 15px; } .pager li > a:hover, .pager li > a:focus { text-decoration: none; background-color: #eee; } .pager .next > a, .pager .next > span { float: right; } .pager .previous > a, .pager .previous > span { float: left; } .pager .disabled > a, .pager .disabled > a:hover, .pager .disabled > a:focus, .pager .disabled > span { color: #777; cursor: not-allowed; background-color: #fff; } .label { display: inline; padding: .2em .6em .3em; font-size: 75%; font-weight: bold; line-height: 1; color: #fff; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: .25em; } a.label:hover, a.label:focus { color: #fff; text-decoration: none; cursor: pointer; } .label:empty { display: none; } .btn .label { position: relative; top: -1px; } .label-default { background-color: #777; } .label-default[href]:hover, .label-default[href]:focus { background-color: #5e5e5e; } .label-primary { background-color: #337ab7; } .label-primary[href]:hover, .label-primary[href]:focus { background-color: #286090; } .label-success { background-color: #5cb85c; } .label-success[href]:hover, .label-success[href]:focus { background-color: #449d44; } .label-info { background-color: #5bc0de; } .label-info[href]:hover, .label-info[href]:focus { background-color: #31b0d5; } .label-warning { background-color: #f0ad4e; } .label-warning[href]:hover, .label-warning[href]:focus { background-color: #ec971f; } .label-danger { background-color: #d9534f; } .label-danger[href]:hover, .label-danger[href]:focus { background-color: #c9302c; } .badge { display: inline-block; min-width: 10px; padding: 3px 7px; font-size: 12px; font-weight: bold; line-height: 1; color: #fff; text-align: center; white-space: nowrap; vertical-align: baseline; background-color: #777; border-radius: 10px; } .badge:empty { display: none; } .btn .badge { position: relative; top: -1px; } .btn-xs .badge { top: 0; padding: 1px 5px; } a.badge:hover, a.badge:focus { color: #fff; text-decoration: none; cursor: pointer; } .list-group-item.active > .badge, .nav-pills > .active > a > .badge { color: #337ab7; background-color: #fff; } .list-group-item > .badge { float: right; } .list-group-item > .badge + .badge { margin-right: 5px; } .nav-pills > li > a > .badge { margin-left: 3px; } .jumbotron { padding: 30px 15px; margin-bottom: 30px; color: inherit; background-color: #eee; } .jumbotron h1, .jumbotron .h1 { color: inherit; } .jumbotron p { margin-bottom: 15px; font-size: 21px; font-weight: 200; } .jumbotron > hr { border-top-color: #d5d5d5; } .container .jumbotron, .container-fluid .jumbotron { border-radius: 6px; } .jumbotron .container { max-width: 100%; } @media screen and (min-width: 768px) { .jumbotron { padding: 48px 0; } .container .jumbotron, .container-fluid .jumbotron { padding-right: 60px; padding-left: 60px; } .jumbotron h1, .jumbotron .h1 { font-size: 63px; } } .thumbnail { display: block; padding: 4px; margin-bottom: 20px; line-height: 1.42857143; background-color: #fff; border: 1px solid #ddd; border-radius: 4px; -webkit-transition: border .2s ease-in-out; -o-transition: border .2s ease-in-out; transition: border .2s ease-in-out; } .thumbnail > img, .thumbnail a > img { margin-right: auto; margin-left: auto; } a.thumbnail:hover, a.thumbnail:focus, a.thumbnail.active { border-color: #337ab7; } .thumbnail .caption { padding: 9px; color: #333; } .alert { padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; } .alert h4 { margin-top: 0; color: inherit; } .alert .alert-link { font-weight: bold; } .alert > p, .alert > ul { margin-bottom: 0; } .alert > p + p { margin-top: 5px; } .alert-dismissable, .alert-dismissible { padding-right: 35px; } .alert-dismissable .close, .alert-dismissible .close { position: relative; top: -2px; right: -21px; color: inherit; } .alert-success { color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; } .alert-success hr { border-top-color: #c9e2b3; } .alert-success .alert-link { color: #2b542c; } .alert-info { color: #31708f; background-color: #d9edf7; border-color: #bce8f1; } .alert-info hr { border-top-color: #a6e1ec; } .alert-info .alert-link { color: #245269; } .alert-warning { color: #8a6d3b; background-color: #fcf8e3; border-color: #faebcc; } .alert-warning hr { border-top-color: #f7e1b5; } .alert-warning .alert-link { color: #66512c; } .alert-danger { color: #a94442; background-color: #f2dede; border-color: #ebccd1; } .alert-danger hr { border-top-color: #e4b9c0; } .alert-danger .alert-link { color: #843534; } @-webkit-keyframes progress-bar-stripes { from { background-position: 40px 0; } to { background-position: 0 0; } } @-o-keyframes progress-bar-stripes { from { background-position: 40px 0; } to { background-position: 0 0; } } @keyframes progress-bar-stripes { from { background-position: 40px 0; } to { background-position: 0 0; } } .progress { height: 20px; margin-bottom: 20px; overflow: hidden; background-color: #f5f5f5; border-radius: 4px; -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); } .progress-bar { float: left; width: 0; height: 100%; font-size: 12px; line-height: 20px; color: #fff; text-align: center; background-color: #337ab7; -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); -webkit-transition: width .6s ease; -o-transition: width .6s ease; transition: width .6s ease; } .progress-striped .progress-bar, .progress-bar-striped { 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); 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); 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); -webkit-background-size: 40px 40px; background-size: 40px 40px; } .progress.active .progress-bar, .progress-bar.active { -webkit-animation: progress-bar-stripes 2s linear infinite; -o-animation: progress-bar-stripes 2s linear infinite; animation: progress-bar-stripes 2s linear infinite; } .progress-bar-success { background-color: #5cb85c; } .progress-striped .progress-bar-success { 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); 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); 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); } .progress-bar-info { background-color: #5bc0de; } .progress-striped .progress-bar-info { 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); 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); 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); } .progress-bar-warning { background-color: #f0ad4e; } .progress-striped .progress-bar-warning { 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); 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); 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); } .progress-bar-danger { background-color: #d9534f; } .progress-striped .progress-bar-danger { 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); 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); 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); } .media { margin-top: 15px; } .media:first-child { margin-top: 0; } .media-right, .media > .pull-right { padding-left: 10px; } .media-left, .media > .pull-left { padding-right: 10px; } .media-left, .media-right, .media-body { display: table-cell; vertical-align: top; } .media-middle { vertical-align: middle; } .media-bottom { vertical-align: bottom; } .media-heading { margin-top: 0; margin-bottom: 5px; } .media-list { padding-left: 0; list-style: none; } .list-group { padding-left: 0; margin-bottom: 20px; } .list-group-item { position: relative; display: block; padding: 10px 15px; margin-bottom: -1px; background-color: #fff; border: 1px solid #ddd; } .list-group-item:first-child { border-top-left-radius: 4px; border-top-right-radius: 4px; } .list-group-item:last-child { margin-bottom: 0; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; } a.list-group-item { color: #555; } a.list-group-item .list-group-item-heading { color: #333; } a.list-group-item:hover, a.list-group-item:focus { color: #555; text-decoration: none; background-color: #f5f5f5; } .list-group-item.disabled, .list-group-item.disabled:hover, .list-group-item.disabled:focus { color: #777; cursor: not-allowed; background-color: #eee; } .list-group-item.disabled .list-group-item-heading, .list-group-item.disabled:hover .list-group-item-heading, .list-group-item.disabled:focus .list-group-item-heading { color: inherit; } .list-group-item.disabled .list-group-item-text, .list-group-item.disabled:hover .list-group-item-text, .list-group-item.disabled:focus .list-group-item-text { color: #777; } .list-group-item.active, .list-group-item.active:hover, .list-group-item.active:focus { z-index: 2; color: #fff; background-color: #337ab7; border-color: #337ab7; } .list-group-item.active .list-group-item-heading, .list-group-item.active:hover .list-group-item-heading, .list-group-item.active:focus .list-group-item-heading, .list-group-item.active .list-group-item-heading > small, .list-group-item.active:hover .list-group-item-heading > small, .list-group-item.active:focus .list-group-item-heading > small, .list-group-item.active .list-group-item-heading > .small, .list-group-item.active:hover .list-group-item-heading > .small, .list-group-item.active:focus .list-group-item-heading > .small { color: inherit; } .list-group-item.active .list-group-item-text, .list-group-item.active:hover .list-group-item-text, .list-group-item.active:focus .list-group-item-text { color: #c7ddef; } .list-group-item-success { color: #3c763d; background-color: #dff0d8; } a.list-group-item-success { color: #3c763d; } a.list-group-item-success .list-group-item-heading { color: inherit; } a.list-group-item-success:hover, a.list-group-item-success:focus { color: #3c763d; background-color: #d0e9c6; } a.list-group-item-success.active, a.list-group-item-success.active:hover, a.list-group-item-success.active:focus { color: #fff; background-color: #3c763d; border-color: #3c763d; } .list-group-item-info { color: #31708f; background-color: #d9edf7; } a.list-group-item-info { color: #31708f; } a.list-group-item-info .list-group-item-heading { color: inherit; } a.list-group-item-info:hover, a.list-group-item-info:focus { color: #31708f; background-color: #c4e3f3; } a.list-group-item-info.active, a.list-group-item-info.active:hover, a.list-group-item-info.active:focus { color: #fff; background-color: #31708f; border-color: #31708f; } .list-group-item-warning { color: #8a6d3b; background-color: #fcf8e3; } a.list-group-item-warning { color: #8a6d3b; } a.list-group-item-warning .list-group-item-heading { color: inherit; } a.list-group-item-warning:hover, a.list-group-item-warning:focus { color: #8a6d3b; background-color: #faf2cc; } a.list-group-item-warning.active, a.list-group-item-warning.active:hover, a.list-group-item-warning.active:focus { color: #fff; background-color: #8a6d3b; border-color: #8a6d3b; } .list-group-item-danger { color: #a94442; background-color: #f2dede; } a.list-group-item-danger { color: #a94442; } a.list-group-item-danger .list-group-item-heading { color: inherit; } a.list-group-item-danger:hover, a.list-group-item-danger:focus { color: #a94442; background-color: #ebcccc; } a.list-group-item-danger.active, a.list-group-item-danger.active:hover, a.list-group-item-danger.active:focus { color: #fff; background-color: #a94442; border-color: #a94442; } .list-group-item-heading { margin-top: 0; margin-bottom: 5px; } .list-group-item-text { margin-bottom: 0; line-height: 1.3; } .panel { margin-bottom: 20px; background-color: #fff; border: 1px solid transparent; border-radius: 4px; -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); box-shadow: 0 1px 1px rgba(0, 0, 0, .05); } .panel-body { padding: 15px; } .panel-heading { padding: 10px 15px; border-bottom: 1px solid transparent; border-top-left-radius: 3px; border-top-right-radius: 3px; } .panel-heading > .dropdown .dropdown-toggle { color: inherit; } .panel-title { margin-top: 0; margin-bottom: 0; font-size: 16px; color: inherit; } .panel-title > a { color: inherit; } .panel-footer { padding: 10px 15px; background-color: #f5f5f5; border-top: 1px solid #ddd; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; } .panel > .list-group, .panel > .panel-collapse > .list-group { margin-bottom: 0; } .panel > .list-group .list-group-item, .panel > .panel-collapse > .list-group .list-group-item { border-width: 1px 0; border-radius: 0; } .panel > .list-group:first-child .list-group-item:first-child, .panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { border-top: 0; border-top-left-radius: 3px; border-top-right-radius: 3px; } .panel > .list-group:last-child .list-group-item:last-child, .panel > .panel-collapse > .list-group:last-child .list-group-item:last-child { border-bottom: 0; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; } .panel-heading + .list-group .list-group-item:first-child { border-top-width: 0; } .list-group + .panel-footer { border-top-width: 0; } .panel > .table, .panel > .table-responsive > .table, .panel > .panel-collapse > .table { margin-bottom: 0; } .panel > .table caption, .panel > .table-responsive > .table caption, .panel > .panel-collapse > .table caption { padding-right: 15px; padding-left: 15px; } .panel > .table:first-child, .panel > .table-responsive:first-child > .table:first-child { border-top-left-radius: 3px; border-top-right-radius: 3px; } .panel > .table:first-child > thead:first-child > tr:first-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { border-top-left-radius: 3px; border-top-right-radius: 3px; } .panel > .table:first-child > thead:first-child > tr:first-child td:first-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, .panel > .table:first-child > thead:first-child > tr:first-child th:first-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { border-top-left-radius: 3px; } .panel > .table:first-child > thead:first-child > tr:first-child td:last-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, .panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, .panel > .table:first-child > thead:first-child > tr:first-child th:last-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, .panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { border-top-right-radius: 3px; } .panel > .table:last-child, .panel > .table-responsive:last-child > .table:last-child { border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; } .panel > .table:last-child > tbody:last-child > tr:last-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; } .panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, .panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, .panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, .panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { border-bottom-left-radius: 3px; } .panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, .panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { border-bottom-right-radius: 3px; } .panel > .panel-body + .table, .panel > .panel-body + .table-responsive, .panel > .table + .panel-body, .panel > .table-responsive + .panel-body { border-top: 1px solid #ddd; } .panel > .table > tbody:first-child > tr:first-child th, .panel > .table > tbody:first-child > tr:first-child td { border-top: 0; } .panel > .table-bordered, .panel > .table-responsive > .table-bordered { border: 0; } .panel > .table-bordered > thead > tr > th:first-child, .panel > .table-responsive > .table-bordered > thead > tr > th:first-child, .panel > .table-bordered > tbody > tr > th:first-child, .panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, .panel > .table-bordered > tfoot > tr > th:first-child, .panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, .panel > .table-bordered > thead > tr > td:first-child, .panel > .table-responsive > .table-bordered > thead > tr > td:first-child, .panel > .table-bordered > tbody > tr > td:first-child, .panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, .panel > .table-bordered > tfoot > tr > td:first-child, .panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { border-left: 0; } .panel > .table-bordered > thead > tr > th:last-child, .panel > .table-responsive > .table-bordered > thead > tr > th:last-child, .panel > .table-bordered > tbody > tr > th:last-child, .panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, .panel > .table-bordered > tfoot > tr > th:last-child, .panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, .panel > .table-bordered > thead > tr > td:last-child, .panel > .table-responsive > .table-bordered > thead > tr > td:last-child, .panel > .table-bordered > tbody > tr > td:last-child, .panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, .panel > .table-bordered > tfoot > tr > td:last-child, .panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { border-right: 0; } .panel > .table-bordered > thead > tr:first-child > td, .panel > .table-responsive > .table-bordered > thead > tr:first-child > td, .panel > .table-bordered > tbody > tr:first-child > td, .panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, .panel > .table-bordered > thead > tr:first-child > th, .panel > .table-responsive > .table-bordered > thead > tr:first-child > th, .panel > .table-bordered > tbody > tr:first-child > th, .panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { border-bottom: 0; } .panel > .table-bordered > tbody > tr:last-child > td, .panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, .panel > .table-bordered > tfoot > tr:last-child > td, .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, .panel > .table-bordered > tbody > tr:last-child > th, .panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, .panel > .table-bordered > tfoot > tr:last-child > th, .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { border-bottom: 0; } .panel > .table-responsive { margin-bottom: 0; border: 0; } .panel-group { margin-bottom: 20px; } .panel-group .panel { margin-bottom: 0; border-radius: 4px; } .panel-group .panel + .panel { margin-top: 5px; } .panel-group .panel-heading { border-bottom: 0; } .panel-group .panel-heading + .panel-collapse > .panel-body, .panel-group .panel-heading + .panel-collapse > .list-group { border-top: 1px solid #ddd; } .panel-group .panel-footer { border-top: 0; } .panel-group .panel-footer + .panel-collapse .panel-body { border-bottom: 1px solid #ddd; } .panel-default { border-color: #ddd; } .panel-default > .panel-heading { color: #333; background-color: #f5f5f5; border-color: #ddd; } .panel-default > .panel-heading + .panel-collapse > .panel-body { border-top-color: #ddd; } .panel-default > .panel-heading .badge { color: #f5f5f5; background-color: #333; } .panel-default > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #ddd; } .panel-primary { border-color: #337ab7; } .panel-primary > .panel-heading { color: #fff; background-color: #337ab7; border-color: #337ab7; } .panel-primary > .panel-heading + .panel-collapse > .panel-body { border-top-color: #337ab7; } .panel-primary > .panel-heading .badge { color: #337ab7; background-color: #fff; } .panel-primary > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #337ab7; } .panel-success { border-color: #d6e9c6; } .panel-success > .panel-heading { color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; } .panel-success > .panel-heading + .panel-collapse > .panel-body { border-top-color: #d6e9c6; } .panel-success > .panel-heading .badge { color: #dff0d8; background-color: #3c763d; } .panel-success > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #d6e9c6; } .panel-info { border-color: #bce8f1; } .panel-info > .panel-heading { color: #31708f; background-color: #d9edf7; border-color: #bce8f1; } .panel-info > .panel-heading + .panel-collapse > .panel-body { border-top-color: #bce8f1; } .panel-info > .panel-heading .badge { color: #d9edf7; background-color: #31708f; } .panel-info > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #bce8f1; } .panel-warning { border-color: #faebcc; } .panel-warning > .panel-heading { color: #8a6d3b; background-color: #fcf8e3; border-color: #faebcc; } .panel-warning > .panel-heading + .panel-collapse > .panel-body { border-top-color: #faebcc; } .panel-warning > .panel-heading .badge { color: #fcf8e3; background-color: #8a6d3b; } .panel-warning > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #faebcc; } .panel-danger { border-color: #ebccd1; } .panel-danger > .panel-heading { color: #a94442; background-color: #f2dede; border-color: #ebccd1; } .panel-danger > .panel-heading + .panel-collapse > .panel-body { border-top-color: #ebccd1; } .panel-danger > .panel-heading .badge { color: #f2dede; background-color: #a94442; } .panel-danger > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #ebccd1; } .embed-responsive { position: relative; display: block; height: 0; padding: 0; overflow: hidden; } .embed-responsive .embed-responsive-item, .embed-responsive iframe, .embed-responsive embed, .embed-responsive object, .embed-responsive video { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; height: 100%; border: 0; } .embed-responsive.embed-responsive-16by9 { padding-bottom: 56.25%; } .embed-responsive.embed-responsive-4by3 { padding-bottom: 75%; } .well { min-height: 20px; padding: 19px; margin-bottom: 20px; background-color: #f5f5f5; border: 1px solid #e3e3e3; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); } .well blockquote { border-color: #ddd; border-color: rgba(0, 0, 0, .15); } .well-lg { padding: 24px; border-radius: 6px; } .well-sm { padding: 9px; border-radius: 3px; } .close { float: right; font-size: 21px; font-weight: bold; line-height: 1; color: #000; text-shadow: 0 1px 0 #fff; filter: alpha(opacity=20); opacity: .2; } .close:hover, .close:focus { color: #000; text-decoration: none; cursor: pointer; filter: alpha(opacity=50); opacity: .5; } button.close { -webkit-appearance: none; padding: 0; cursor: pointer; background: transparent; border: 0; } .modal-open { overflow: hidden; } .modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1040; display: none; overflow: hidden; -webkit-overflow-scrolling: touch; outline: 0; } .modal.fade .modal-dialog { -webkit-transition: -webkit-transform .3s ease-out; -o-transition: -o-transform .3s ease-out; transition: transform .3s ease-out; -webkit-transform: translate(0, -25%); -ms-transform: translate(0, -25%); -o-transform: translate(0, -25%); transform: translate(0, -25%); } .modal.in .modal-dialog { -webkit-transform: translate(0, 0); -ms-transform: translate(0, 0); -o-transform: translate(0, 0); transform: translate(0, 0); } .modal-open .modal { overflow-x: hidden; overflow-y: auto; } .modal-dialog { position: relative; width: auto; margin: 10px; } .modal-content { position: relative; background-color: #fff; -webkit-background-clip: padding-box; background-clip: padding-box; border: 1px solid #999; border: 1px solid rgba(0, 0, 0, .2); border-radius: 6px; outline: 0; -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5); box-shadow: 0 3px 9px rgba(0, 0, 0, .5); } .modal-backdrop { position: absolute; top: 0; right: 0; left: 0; background-color: #000; } .modal-backdrop.fade { filter: alpha(opacity=0); opacity: 0; } .modal-backdrop.in { filter: alpha(opacity=50); opacity: .5; } .modal-header { min-height: 16.42857143px; padding: 15px; border-bottom: 1px solid #e5e5e5; } .modal-header .close { margin-top: -2px; } .modal-title { margin: 0; line-height: 1.42857143; } .modal-body { position: relative; padding: 15px; } .modal-footer { padding: 15px; text-align: right; border-top: 1px solid #e5e5e5; } .modal-footer .btn + .btn { margin-bottom: 0; margin-left: 5px; } .modal-footer .btn-group .btn + .btn { margin-left: -1px; } .modal-footer .btn-block + .btn-block { margin-left: 0; } .modal-scrollbar-measure { position: absolute; top: -9999px; width: 50px; height: 50px; overflow: scroll; } @media (min-width: 768px) { .modal-dialog { width: 600px; margin: 30px auto; } .modal-content { -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5); box-shadow: 0 5px 15px rgba(0, 0, 0, .5); } .modal-sm { width: 300px; } } @media (min-width: 992px) { .modal-lg { width: 900px; } } .tooltip { position: absolute; z-index: 1070; display: block; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 1.4; visibility: visible; filter: alpha(opacity=0); opacity: 0; } .tooltip.in { filter: alpha(opacity=90); opacity: .9; } .tooltip.top { padding: 5px 0; margin-top: -3px; } .tooltip.right { padding: 0 5px; margin-left: 3px; } .tooltip.bottom { padding: 5px 0; margin-top: 3px; } .tooltip.left { padding: 0 5px; margin-left: -3px; } .tooltip-inner { max-width: 200px; padding: 3px 8px; color: #fff; text-align: center; text-decoration: none; background-color: #000; border-radius: 4px; } .tooltip-arrow { position: absolute; width: 0; height: 0; border-color: transparent; border-style: solid; } .tooltip.top .tooltip-arrow { bottom: 0; left: 50%; margin-left: -5px; border-width: 5px 5px 0; border-top-color: #000; } .tooltip.top-left .tooltip-arrow { right: 5px; bottom: 0; margin-bottom: -5px; border-width: 5px 5px 0; border-top-color: #000; } .tooltip.top-right .tooltip-arrow { bottom: 0; left: 5px; margin-bottom: -5px; border-width: 5px 5px 0; border-top-color: #000; } .tooltip.right .tooltip-arrow { top: 50%; left: 0; margin-top: -5px; border-width: 5px 5px 5px 0; border-right-color: #000; } .tooltip.left .tooltip-arrow { top: 50%; right: 0; margin-top: -5px; border-width: 5px 0 5px 5px; border-left-color: #000; } .tooltip.bottom .tooltip-arrow { top: 0; left: 50%; margin-left: -5px; border-width: 0 5px 5px; border-bottom-color: #000; } .tooltip.bottom-left .tooltip-arrow { top: 0; right: 5px; margin-top: -5px; border-width: 0 5px 5px; border-bottom-color: #000; } .tooltip.bottom-right .tooltip-arrow { top: 0; left: 5px; margin-top: -5px; border-width: 0 5px 5px; border-bottom-color: #000; } .popover { position: absolute; top: 0; left: 0; z-index: 1060; display: none; max-width: 276px; padding: 1px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; line-height: 1.42857143; text-align: left; white-space: normal; background-color: #fff; -webkit-background-clip: padding-box; background-clip: padding-box; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, .2); border-radius: 6px; -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2); box-shadow: 0 5px 10px rgba(0, 0, 0, .2); } .popover.top { margin-top: -10px; } .popover.right { margin-left: 10px; } .popover.bottom { margin-top: 10px; } .popover.left { margin-left: -10px; } .popover-title { padding: 8px 14px; margin: 0; font-size: 14px; background-color: #f7f7f7; border-bottom: 1px solid #ebebeb; border-radius: 5px 5px 0 0; } .popover-content { padding: 9px 14px; } .popover > .arrow, .popover > .arrow:after { position: absolute; display: block; width: 0; height: 0; border-color: transparent; border-style: solid; } .popover > .arrow { border-width: 11px; } .popover > .arrow:after { content: ""; border-width: 10px; } .popover.top > .arrow { bottom: -11px; left: 50%; margin-left: -11px; border-top-color: #999; border-top-color: rgba(0, 0, 0, .25); border-bottom-width: 0; } .popover.top > .arrow:after { bottom: 1px; margin-left: -10px; content: " "; border-top-color: #fff; border-bottom-width: 0; } .popover.right > .arrow { top: 50%; left: -11px; margin-top: -11px; border-right-color: #999; border-right-color: rgba(0, 0, 0, .25); border-left-width: 0; } .popover.right > .arrow:after { bottom: -10px; left: 1px; content: " "; border-right-color: #fff; border-left-width: 0; } .popover.bottom > .arrow { top: -11px; left: 50%; margin-left: -11px; border-top-width: 0; border-bottom-color: #999; border-bottom-color: rgba(0, 0, 0, .25); } .popover.bottom > .arrow:after { top: 1px; margin-left: -10px; content: " "; border-top-width: 0; border-bottom-color: #fff; } .popover.left > .arrow { top: 50%; right: -11px; margin-top: -11px; border-right-width: 0; border-left-color: #999; border-left-color: rgba(0, 0, 0, .25); } .popover.left > .arrow:after { right: 1px; bottom: -10px; content: " "; border-right-width: 0; border-left-color: #fff; } .carousel { position: relative; } .carousel-inner { position: relative; width: 100%; overflow: hidden; } .carousel-inner > .item { position: relative; display: none; -webkit-transition: .6s ease-in-out left; -o-transition: .6s ease-in-out left; transition: .6s ease-in-out left; } .carousel-inner > .item > img, .carousel-inner > .item > a > img { line-height: 1; } @media all and (transform-3d), (-webkit-transform-3d) { .carousel-inner > .item { -webkit-transition: -webkit-transform .6s ease-in-out; -o-transition: -o-transform .6s ease-in-out; transition: transform .6s ease-in-out; -webkit-backface-visibility: hidden; backface-visibility: hidden; -webkit-perspective: 1000; perspective: 1000; } .carousel-inner > .item.next, .carousel-inner > .item.active.right { left: 0; -webkit-transform: translate3d(100%, 0, 0); transform: translate3d(100%, 0, 0); } .carousel-inner > .item.prev, .carousel-inner > .item.active.left { left: 0; -webkit-transform: translate3d(-100%, 0, 0); transform: translate3d(-100%, 0, 0); } .carousel-inner > .item.next.left, .carousel-inner > .item.prev.right, .carousel-inner > .item.active { left: 0; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } .carousel-inner > .active, .carousel-inner > .next, .carousel-inner > .prev { display: block; } .carousel-inner > .active { left: 0; } .carousel-inner > .next, .carousel-inner > .prev { position: absolute; top: 0; width: 100%; } .carousel-inner > .next { left: 100%; } .carousel-inner > .prev { left: -100%; } .carousel-inner > .next.left, .carousel-inner > .prev.right { left: 0; } .carousel-inner > .active.left { left: -100%; } .carousel-inner > .active.right { left: 100%; } .carousel-control { position: absolute; top: 0; bottom: 0; left: 0; width: 15%; font-size: 20px; color: #fff; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); filter: alpha(opacity=50); opacity: .5; } .carousel-control.left { background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001))); background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); background-repeat: repeat-x; } .carousel-control.right { right: 0; left: auto; background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5))); background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); background-repeat: repeat-x; } .carousel-control:hover, .carousel-control:focus { color: #fff; text-decoration: none; filter: alpha(opacity=90); outline: 0; opacity: .9; } .carousel-control .icon-prev, .carousel-control .icon-next, .carousel-control .glyphicon-chevron-left, .carousel-control .glyphicon-chevron-right { position: absolute; top: 50%; z-index: 5; display: inline-block; } .carousel-control .icon-prev, .carousel-control .glyphicon-chevron-left { left: 50%; margin-left: -10px; } .carousel-control .icon-next, .carousel-control .glyphicon-chevron-right { right: 50%; margin-right: -10px; } .carousel-control .icon-prev, .carousel-control .icon-next { width: 20px; height: 20px; margin-top: -10px; font-family: serif; } .carousel-control .icon-prev:before { content: '\2039'; } .carousel-control .icon-next:before { content: '\203a'; } .carousel-indicators { position: absolute; bottom: 10px; left: 50%; z-index: 15; width: 60%; padding-left: 0; margin-left: -30%; text-align: center; list-style: none; } .carousel-indicators li { display: inline-block; width: 10px; height: 10px; margin: 1px; text-indent: -999px; cursor: pointer; background-color: #000 \9; background-color: rgba(0, 0, 0, 0); border: 1px solid #fff; border-radius: 10px; } .carousel-indicators .active { width: 12px; height: 12px; margin: 0; background-color: #fff; } .carousel-caption { position: absolute; right: 15%; bottom: 20px; left: 15%; z-index: 10; padding-top: 20px; padding-bottom: 20px; color: #fff; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); } .carousel-caption .btn { text-shadow: none; } @media screen and (min-width: 768px) { .carousel-control .glyphicon-chevron-left, .carousel-control .glyphicon-chevron-right, .carousel-control .icon-prev, .carousel-control .icon-next { width: 30px; height: 30px; margin-top: -15px; font-size: 30px; } .carousel-control .glyphicon-chevron-left, .carousel-control .icon-prev { margin-left: -15px; } .carousel-control .glyphicon-chevron-right, .carousel-control .icon-next { margin-right: -15px; } .carousel-caption { right: 20%; left: 20%; padding-bottom: 30px; } .carousel-indicators { bottom: 20px; } } .clearfix:before, .clearfix:after, .dl-horizontal dd:before, .dl-horizontal dd:after, .container:before, .container:after, .container-fluid:before, .container-fluid:after, .row:before, .row:after, .form-horizontal .form-group:before, .form-horizontal .form-group:after, .btn-toolbar:before, .btn-toolbar:after, .btn-group-vertical > .btn-group:before, .btn-group-vertical > .btn-group:after, .nav:before, .nav:after, .navbar:before, .navbar:after, .navbar-header:before, .navbar-header:after, .navbar-collapse:before, .navbar-collapse:after, .pager:before, .pager:after, .panel-body:before, .panel-body:after, .modal-footer:before, .modal-footer:after { display: table; content: " "; } .clearfix:after, .dl-horizontal dd:after, .container:after, .container-fluid:after, .row:after, .form-horizontal .form-group:after, .btn-toolbar:after, .btn-group-vertical > .btn-group:after, .nav:after, .navbar:after, .navbar-header:after, .navbar-collapse:after, .pager:after, .panel-body:after, .modal-footer:after { clear: both; } .center-block { display: block; margin-right: auto; margin-left: auto; } .pull-right { float: right !important; } .pull-left { float: left !important; } .hide { display: none !important; } .show { display: block !important; } .invisible { visibility: hidden; } .text-hide { font: 0/0 a; color: transparent; text-shadow: none; background-color: transparent; border: 0; } .hidden { display: none !important; visibility: hidden !important; } .affix { position: fixed; } @-ms-viewport { width: device-width; } .visible-xs, .visible-sm, .visible-md, .visible-lg { display: none !important; } .visible-xs-block, .visible-xs-inline, .visible-xs-inline-block, .visible-sm-block, .visible-sm-inline, .visible-sm-inline-block, .visible-md-block, .visible-md-inline, .visible-md-inline-block, .visible-lg-block, .visible-lg-inline, .visible-lg-inline-block { display: none !important; } @media (max-width: 767px) { .visible-xs { display: block !important; } table.visible-xs { display: table; } tr.visible-xs { display: table-row !important; } th.visible-xs, td.visible-xs { display: table-cell !important; } } @media (max-width: 767px) { .visible-xs-block { display: block !important; } } @media (max-width: 767px) { .visible-xs-inline { display: inline !important; } } @media (max-width: 767px) { .visible-xs-inline-block { display: inline-block !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm { display: block !important; } table.visible-sm { display: table; } tr.visible-sm { display: table-row !important; } th.visible-sm, td.visible-sm { display: table-cell !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm-block { display: block !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm-inline { display: inline !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm-inline-block { display: inline-block !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md { display: block !important; } table.visible-md { display: table; } tr.visible-md { display: table-row !important; } th.visible-md, td.visible-md { display: table-cell !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md-block { display: block !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md-inline { display: inline !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md-inline-block { display: inline-block !important; } } @media (min-width: 1200px) { .visible-lg { display: block !important; } table.visible-lg { display: table; } tr.visible-lg { display: table-row !important; } th.visible-lg, td.visible-lg { display: table-cell !important; } } @media (min-width: 1200px) { .visible-lg-block { display: block !important; } } @media (min-width: 1200px) { .visible-lg-inline { display: inline !important; } } @media (min-width: 1200px) { .visible-lg-inline-block { display: inline-block !important; } } @media (max-width: 767px) { .hidden-xs { display: none !important; } } @media (min-width: 768px) and (max-width: 991px) { .hidden-sm { display: none !important; } } @media (min-width: 992px) and (max-width: 1199px) { .hidden-md { display: none !important; } } @media (min-width: 1200px) { .hidden-lg { display: none !important; } } .visible-print { display: none !important; } @media print { .visible-print { display: block !important; } table.visible-print { display: table; } tr.visible-print { display: table-row !important; } th.visible-print, td.visible-print { display: table-cell !important; } } .visible-print-block { display: none !important; } @media print { .visible-print-block { display: block !important; } } .visible-print-inline { display: none !important; } @media print { .visible-print-inline { display: inline !important; } } .visible-print-inline-block { display: none !important; } @media print { .visible-print-inline-block { display: inline-block !important; } } @media print { .hidden-print { display: none !important; } } /*# sourceMappingURL=bootstrap.css.map */ minify-2.20.37/benchmarks/sample_car.svg000066400000000000000000020052461464346127300201470ustar00rootroot00000000000000 minify-2.20.37/benchmarks/sample_catalog.xml000066400000000000000000000036161464346127300210120ustar00rootroot00000000000000 QWZ5671 39.95 Red Burgundy Red Burgundy RRX9856 42.50 Red Navy Burgundy Red Navy Burgundy Black Navy Black Burgundy Black minify-2.20.37/benchmarks/sample_dot.js000066400000000000000000000120441464346127300177750ustar00rootroot00000000000000// doT.js // 2011-2014, Laura Doktorova, https://github.com/olado/doT // Licensed under the MIT license. (function() { "use strict"; var doT = { version: "1.0.3", templateSettings: { evaluate: /\{\{([\s\S]+?(\}?)+)\}\}/g, interpolate: /\{\{=([\s\S]+?)\}\}/g, encode: /\{\{!([\s\S]+?)\}\}/g, use: /\{\{#([\s\S]+?)\}\}/g, useParams: /(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g, define: /\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g, defineParams:/^\s*([\w$]+):([\s\S]+)/, conditional: /\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g, iterate: /\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g, varname: "it", strip: true, append: true, selfcontained: false, doNotSkipEncoded: false }, template: undefined, //fn, compile template compile: undefined //fn, for express }, _globals; doT.encodeHTMLSource = function(doNotSkipEncoded) { var encodeHTMLRules = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "/": "/" }, matchHTML = doNotSkipEncoded ? /[&<>\/]/g : /&(?!#?\w+;)|<|>|\//g; return function(code) { return code ? code.toString().replace(matchHTML, function(m) {return encodeHTMLRules[m] || m;}) : ""; }; }; _globals = (function(){ return this || (0,eval)("this"); }()); if (typeof module !== "undefined" && module.exports) { module.exports = doT; } else if (typeof define === "function" && define.amd) { define(function(){return doT;}); } else { _globals.doT = doT; } var startend = { append: { start: "'+(", end: ")+'", startencode: "'+encodeHTML(" }, split: { start: "';out+=(", end: ");out+='", startencode: "';out+=encodeHTML(" } }, skip = /$^/; function resolveDefs(c, block, def) { return ((typeof block === "string") ? block : block.toString()) .replace(c.define || skip, function(m, code, assign, value) { if (code.indexOf("def.") === 0) { code = code.substring(4); } if (!(code in def)) { if (assign === ":") { if (c.defineParams) value.replace(c.defineParams, function(m, param, v) { def[code] = {arg: param, text: v}; }); if (!(code in def)) def[code]= value; } else { new Function("def", "def['"+code+"']=" + value)(def); } } return ""; }) .replace(c.use || skip, function(m, code) { if (c.useParams) code = code.replace(c.useParams, function(m, s, d, param) { if (def[d] && def[d].arg && param) { var rw = (d+":"+param).replace(/'|\\/g, "_"); def.__exp = def.__exp || {}; def.__exp[rw] = def[d].text.replace(new RegExp("(^|[^\\w$])" + def[d].arg + "([^\\w$])", "g"), "$1" + param + "$2"); return s + "def.__exp['"+rw+"']"; } }); var v = new Function("def", "return " + code)(def); return v ? resolveDefs(c, v, def) : v; }); } function unescape(code) { return code.replace(/\\('|\\)/g, "$1").replace(/[\r\t\n]/g, " "); } doT.template = function(tmpl, c, def) { c = c || doT.templateSettings; var cse = c.append ? startend.append : startend.split, needhtmlencode, sid = 0, indv, str = (c.use || c.define) ? resolveDefs(c, tmpl, def || {}) : tmpl; str = ("var out='" + (c.strip ? str.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g," ") .replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g,""): str) .replace(/'|\\/g, "\\$&") .replace(c.interpolate || skip, function(m, code) { return cse.start + unescape(code) + cse.end; }) .replace(c.encode || skip, function(m, code) { needhtmlencode = true; return cse.startencode + unescape(code) + cse.end; }) .replace(c.conditional || skip, function(m, elsecase, code) { return elsecase ? (code ? "';}else if(" + unescape(code) + "){out+='" : "';}else{out+='") : (code ? "';if(" + unescape(code) + "){out+='" : "';}out+='"); }) .replace(c.iterate || skip, function(m, iterate, vname, iname) { if (!iterate) return "';} } out+='"; sid+=1; indv=iname || "i"+sid; iterate=unescape(iterate); return "';var arr"+sid+"="+iterate+";if(arr"+sid+"){var "+vname+","+indv+"=-1,l"+sid+"=arr"+sid+".length-1;while("+indv+" 18; } if (weChat) { browser.weChat = true; } env.canvasSupported = !!document.createElement('canvas').getContext; env.svgSupported = typeof SVGRect !== 'undefined'; env.touchEventsSupported = 'ontouchstart' in window && !browser.ie && !browser.edge; env.pointerEventsSupported = 'onpointerdown' in window && (browser.edge || (browser.ie && +browser.version >= 11)); env.domSupported = typeof document !== 'undefined'; var style = document.documentElement.style; env.transform3dSupported = ((browser.ie && 'transition' in style) || browser.edge || (('WebKitCSSMatrix' in window) && ('m11' in new WebKitCSSMatrix())) || 'MozPerspective' in style) && !('OTransition' in style); env.transformSupported = env.transform3dSupported || (browser.ie && +browser.version >= 9); } var BUILTIN_OBJECT = { '[object Function]': true, '[object RegExp]': true, '[object Date]': true, '[object Error]': true, '[object CanvasGradient]': true, '[object CanvasPattern]': true, '[object Image]': true, '[object Canvas]': true }; var TYPED_ARRAY = { '[object Int8Array]': true, '[object Uint8Array]': true, '[object Uint8ClampedArray]': true, '[object Int16Array]': true, '[object Uint16Array]': true, '[object Int32Array]': true, '[object Uint32Array]': true, '[object Float32Array]': true, '[object Float64Array]': true }; var objToString = Object.prototype.toString; var arrayProto = Array.prototype; var nativeForEach = arrayProto.forEach; var nativeFilter = arrayProto.filter; var nativeSlice = arrayProto.slice; var nativeMap = arrayProto.map; var ctorFunction = function () { }.constructor; var protoFunction = ctorFunction ? ctorFunction.prototype : null; var methods = {}; function $override(name, fn) { methods[name] = fn; } var idStart = 0x0907; function guid() { return idStart++; } function logError() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } if (typeof console !== 'undefined') { console.error.apply(console, args); } } function clone(source) { if (source == null || typeof source !== 'object') { return source; } var result = source; var typeStr = objToString.call(source); if (typeStr === '[object Array]') { if (!isPrimitive(source)) { result = []; for (var i = 0, len = source.length; i < len; i++) { result[i] = clone(source[i]); } } } else if (TYPED_ARRAY[typeStr]) { if (!isPrimitive(source)) { var Ctor = source.constructor; if (Ctor.from) { result = Ctor.from(source); } else { result = new Ctor(source.length); for (var i = 0, len = source.length; i < len; i++) { result[i] = clone(source[i]); } } } } else if (!BUILTIN_OBJECT[typeStr] && !isPrimitive(source) && !isDom(source)) { result = {}; for (var key in source) { if (source.hasOwnProperty(key)) { result[key] = clone(source[key]); } } } return result; } function merge(target, source, overwrite) { if (!isObject(source) || !isObject(target)) { return overwrite ? clone(source) : target; } for (var key in source) { if (source.hasOwnProperty(key)) { var targetProp = target[key]; var sourceProp = source[key]; if (isObject(sourceProp) && isObject(targetProp) && !isArray(sourceProp) && !isArray(targetProp) && !isDom(sourceProp) && !isDom(targetProp) && !isBuiltInObject(sourceProp) && !isBuiltInObject(targetProp) && !isPrimitive(sourceProp) && !isPrimitive(targetProp)) { merge(targetProp, sourceProp, overwrite); } else if (overwrite || !(key in target)) { target[key] = clone(source[key]); } } } return target; } function mergeAll(targetAndSources, overwrite) { var result = targetAndSources[0]; for (var i = 1, len = targetAndSources.length; i < len; i++) { result = merge(result, targetAndSources[i], overwrite); } return result; } function extend(target, source) { if (Object.assign) { Object.assign(target, source); } else { for (var key in source) { if (source.hasOwnProperty(key)) { target[key] = source[key]; } } } return target; } function defaults(target, source, overlay) { var keysArr = keys(source); for (var i = 0; i < keysArr.length; i++) { var key = keysArr[i]; if ((overlay ? source[key] != null : target[key] == null)) { target[key] = source[key]; } } return target; } var createCanvas = function () { return methods.createCanvas(); }; methods.createCanvas = function () { return document.createElement('canvas'); }; function indexOf(array, value) { if (array) { if (array.indexOf) { return array.indexOf(value); } for (var i = 0, len = array.length; i < len; i++) { if (array[i] === value) { return i; } } } return -1; } function inherits(clazz, baseClazz) { var clazzPrototype = clazz.prototype; function F() { } F.prototype = baseClazz.prototype; clazz.prototype = new F(); for (var prop in clazzPrototype) { if (clazzPrototype.hasOwnProperty(prop)) { clazz.prototype[prop] = clazzPrototype[prop]; } } clazz.prototype.constructor = clazz; clazz.superClass = baseClazz; } function mixin(target, source, override) { target = 'prototype' in target ? target.prototype : target; source = 'prototype' in source ? source.prototype : source; if (Object.getOwnPropertyNames) { var keyList = Object.getOwnPropertyNames(source); for (var i = 0; i < keyList.length; i++) { var key = keyList[i]; if (key !== 'constructor') { if ((override ? source[key] != null : target[key] == null)) { target[key] = source[key]; } } } } else { defaults(target, source, override); } } function isArrayLike(data) { if (!data) { return false; } if (typeof data === 'string') { return false; } return typeof data.length === 'number'; } function each(arr, cb, context) { if (!(arr && cb)) { return; } if (arr.forEach && arr.forEach === nativeForEach) { arr.forEach(cb, context); } else if (arr.length === +arr.length) { for (var i = 0, len = arr.length; i < len; i++) { cb.call(context, arr[i], i, arr); } } else { for (var key in arr) { if (arr.hasOwnProperty(key)) { cb.call(context, arr[key], key, arr); } } } } function map(arr, cb, context) { if (!arr) { return []; } if (!cb) { return slice(arr); } if (arr.map && arr.map === nativeMap) { return arr.map(cb, context); } else { var result = []; for (var i = 0, len = arr.length; i < len; i++) { result.push(cb.call(context, arr[i], i, arr)); } return result; } } function reduce(arr, cb, memo, context) { if (!(arr && cb)) { return; } for (var i = 0, len = arr.length; i < len; i++) { memo = cb.call(context, memo, arr[i], i, arr); } return memo; } function filter(arr, cb, context) { if (!arr) { return []; } if (!cb) { return slice(arr); } if (arr.filter && arr.filter === nativeFilter) { return arr.filter(cb, context); } else { var result = []; for (var i = 0, len = arr.length; i < len; i++) { if (cb.call(context, arr[i], i, arr)) { result.push(arr[i]); } } return result; } } function find(arr, cb, context) { if (!(arr && cb)) { return; } for (var i = 0, len = arr.length; i < len; i++) { if (cb.call(context, arr[i], i, arr)) { return arr[i]; } } } function keys(obj) { if (!obj) { return []; } if (Object.keys) { return Object.keys(obj); } var keyList = []; for (var key in obj) { if (obj.hasOwnProperty(key)) { keyList.push(key); } } return keyList; } function bindPolyfill(func, context) { var args = []; for (var _i = 2; _i < arguments.length; _i++) { args[_i - 2] = arguments[_i]; } return function () { return func.apply(context, args.concat(nativeSlice.call(arguments))); }; } var bind = (protoFunction && isFunction(protoFunction.bind)) ? protoFunction.call.bind(protoFunction.bind) : bindPolyfill; function curry(func) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } return function () { return func.apply(this, args.concat(nativeSlice.call(arguments))); }; } function isArray(value) { if (Array.isArray) { return Array.isArray(value); } return objToString.call(value) === '[object Array]'; } function isFunction(value) { return typeof value === 'function'; } function isString(value) { return typeof value === 'string'; } function isStringSafe(value) { return objToString.call(value) === '[object String]'; } function isNumber(value) { return typeof value === 'number'; } function isObject(value) { var type = typeof value; return type === 'function' || (!!value && type === 'object'); } function isBuiltInObject(value) { return !!BUILTIN_OBJECT[objToString.call(value)]; } function isTypedArray(value) { return !!TYPED_ARRAY[objToString.call(value)]; } function isDom(value) { return typeof value === 'object' && typeof value.nodeType === 'number' && typeof value.ownerDocument === 'object'; } function isGradientObject(value) { return value.colorStops != null; } function isPatternObject(value) { return value.image != null; } function isRegExp(value) { return objToString.call(value) === '[object RegExp]'; } function eqNaN(value) { return value !== value; } function retrieve() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } for (var i = 0, len = args.length; i < len; i++) { if (args[i] != null) { return args[i]; } } } function retrieve2(value0, value1) { return value0 != null ? value0 : value1; } function retrieve3(value0, value1, value2) { return value0 != null ? value0 : value1 != null ? value1 : value2; } function slice(arr) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } return nativeSlice.apply(arr, args); } function normalizeCssArray(val) { if (typeof (val) === 'number') { return [val, val, val, val]; } var len = val.length; if (len === 2) { return [val[0], val[1], val[0], val[1]]; } else if (len === 3) { return [val[0], val[1], val[2], val[1]]; } return val; } function assert(condition, message) { if (!condition) { throw new Error(message); } } function trim(str) { if (str == null) { return null; } else if (typeof str.trim === 'function') { return str.trim(); } else { return str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); } } var primitiveKey = '__ec_primitive__'; function setAsPrimitive(obj) { obj[primitiveKey] = true; } function isPrimitive(obj) { return obj[primitiveKey]; } var HashMap = (function () { function HashMap(obj) { this.data = {}; var isArr = isArray(obj); this.data = {}; var thisMap = this; (obj instanceof HashMap) ? obj.each(visit) : (obj && each(obj, visit)); function visit(value, key) { isArr ? thisMap.set(value, key) : thisMap.set(key, value); } } HashMap.prototype.get = function (key) { return this.data.hasOwnProperty(key) ? this.data[key] : null; }; HashMap.prototype.set = function (key, value) { return (this.data[key] = value); }; HashMap.prototype.each = function (cb, context) { for (var key in this.data) { if (this.data.hasOwnProperty(key)) { cb.call(context, this.data[key], key); } } }; HashMap.prototype.keys = function () { return keys(this.data); }; HashMap.prototype.removeKey = function (key) { delete this.data[key]; }; return HashMap; }()); function createHashMap(obj) { return new HashMap(obj); } function concatArray(a, b) { var newArray = new a.constructor(a.length + b.length); for (var i = 0; i < a.length; i++) { newArray[i] = a[i]; } var offset = a.length; for (var i = 0; i < b.length; i++) { newArray[i + offset] = b[i]; } return newArray; } function createObject(proto, properties) { var obj; if (Object.create) { obj = Object.create(proto); } else { var StyleCtor = function () { }; StyleCtor.prototype = proto; obj = new StyleCtor(); } if (properties) { extend(obj, properties); } return obj; } function hasOwn(own, prop) { return own.hasOwnProperty(prop); } function noop() { } var util = /*#__PURE__*/Object.freeze({ __proto__: null, $override: $override, guid: guid, logError: logError, clone: clone, merge: merge, mergeAll: mergeAll, extend: extend, defaults: defaults, createCanvas: createCanvas, indexOf: indexOf, inherits: inherits, mixin: mixin, isArrayLike: isArrayLike, each: each, map: map, reduce: reduce, filter: filter, find: find, keys: keys, bind: bind, curry: curry, isArray: isArray, isFunction: isFunction, isString: isString, isStringSafe: isStringSafe, isNumber: isNumber, isObject: isObject, isBuiltInObject: isBuiltInObject, isTypedArray: isTypedArray, isDom: isDom, isGradientObject: isGradientObject, isPatternObject: isPatternObject, isRegExp: isRegExp, eqNaN: eqNaN, retrieve: retrieve, retrieve2: retrieve2, retrieve3: retrieve3, slice: slice, normalizeCssArray: normalizeCssArray, assert: assert, trim: trim, setAsPrimitive: setAsPrimitive, isPrimitive: isPrimitive, HashMap: HashMap, createHashMap: createHashMap, concatArray: concatArray, createObject: createObject, hasOwn: hasOwn, noop: noop }); function create(x, y) { if (x == null) { x = 0; } if (y == null) { y = 0; } return [x, y]; } function copy(out, v) { out[0] = v[0]; out[1] = v[1]; return out; } function clone$1(v) { return [v[0], v[1]]; } function set(out, a, b) { out[0] = a; out[1] = b; return out; } function add(out, v1, v2) { out[0] = v1[0] + v2[0]; out[1] = v1[1] + v2[1]; return out; } function scaleAndAdd(out, v1, v2, a) { out[0] = v1[0] + v2[0] * a; out[1] = v1[1] + v2[1] * a; return out; } function sub(out, v1, v2) { out[0] = v1[0] - v2[0]; out[1] = v1[1] - v2[1]; return out; } function len(v) { return Math.sqrt(lenSquare(v)); } var length = len; function lenSquare(v) { return v[0] * v[0] + v[1] * v[1]; } var lengthSquare = lenSquare; function mul(out, v1, v2) { out[0] = v1[0] * v2[0]; out[1] = v1[1] * v2[1]; return out; } function div(out, v1, v2) { out[0] = v1[0] / v2[0]; out[1] = v1[1] / v2[1]; return out; } function dot(v1, v2) { return v1[0] * v2[0] + v1[1] * v2[1]; } function scale(out, v, s) { out[0] = v[0] * s; out[1] = v[1] * s; return out; } function normalize(out, v) { var d = len(v); if (d === 0) { out[0] = 0; out[1] = 0; } else { out[0] = v[0] / d; out[1] = v[1] / d; } return out; } function distance(v1, v2) { return Math.sqrt((v1[0] - v2[0]) * (v1[0] - v2[0]) + (v1[1] - v2[1]) * (v1[1] - v2[1])); } var dist = distance; function distanceSquare(v1, v2) { return (v1[0] - v2[0]) * (v1[0] - v2[0]) + (v1[1] - v2[1]) * (v1[1] - v2[1]); } var distSquare = distanceSquare; function negate(out, v) { out[0] = -v[0]; out[1] = -v[1]; return out; } function lerp(out, v1, v2, t) { out[0] = v1[0] + t * (v2[0] - v1[0]); out[1] = v1[1] + t * (v2[1] - v1[1]); return out; } function applyTransform(out, v, m) { var x = v[0]; var y = v[1]; out[0] = m[0] * x + m[2] * y + m[4]; out[1] = m[1] * x + m[3] * y + m[5]; return out; } function min(out, v1, v2) { out[0] = Math.min(v1[0], v2[0]); out[1] = Math.min(v1[1], v2[1]); return out; } function max(out, v1, v2) { out[0] = Math.max(v1[0], v2[0]); out[1] = Math.max(v1[1], v2[1]); return out; } var vector = /*#__PURE__*/Object.freeze({ __proto__: null, create: create, copy: copy, clone: clone$1, set: set, add: add, scaleAndAdd: scaleAndAdd, sub: sub, len: len, length: length, lenSquare: lenSquare, lengthSquare: lengthSquare, mul: mul, div: div, dot: dot, scale: scale, normalize: normalize, distance: distance, dist: dist, distanceSquare: distanceSquare, distSquare: distSquare, negate: negate, lerp: lerp, applyTransform: applyTransform, min: min, max: max }); var Param = (function () { function Param(target, e) { this.target = target; this.topTarget = e && e.topTarget; } return Param; }()); var Draggable = (function () { function Draggable(handler) { this.handler = handler; handler.on('mousedown', this._dragStart, this); handler.on('mousemove', this._drag, this); handler.on('mouseup', this._dragEnd, this); } Draggable.prototype._dragStart = function (e) { var draggingTarget = e.target; while (draggingTarget && !draggingTarget.draggable) { draggingTarget = draggingTarget.parent; } if (draggingTarget) { this._draggingTarget = draggingTarget; draggingTarget.dragging = true; this._x = e.offsetX; this._y = e.offsetY; this.handler.dispatchToElement(new Param(draggingTarget, e), 'dragstart', e.event); } }; Draggable.prototype._drag = function (e) { var draggingTarget = this._draggingTarget; if (draggingTarget) { var x = e.offsetX; var y = e.offsetY; var dx = x - this._x; var dy = y - this._y; this._x = x; this._y = y; draggingTarget.drift(dx, dy, e); this.handler.dispatchToElement(new Param(draggingTarget, e), 'drag', e.event); var dropTarget = this.handler.findHover(x, y, draggingTarget).target; var lastDropTarget = this._dropTarget; this._dropTarget = dropTarget; if (draggingTarget !== dropTarget) { if (lastDropTarget && dropTarget !== lastDropTarget) { this.handler.dispatchToElement(new Param(lastDropTarget, e), 'dragleave', e.event); } if (dropTarget && dropTarget !== lastDropTarget) { this.handler.dispatchToElement(new Param(dropTarget, e), 'dragenter', e.event); } } } }; Draggable.prototype._dragEnd = function (e) { var draggingTarget = this._draggingTarget; if (draggingTarget) { draggingTarget.dragging = false; } this.handler.dispatchToElement(new Param(draggingTarget, e), 'dragend', e.event); if (this._dropTarget) { this.handler.dispatchToElement(new Param(this._dropTarget, e), 'drop', e.event); } this._draggingTarget = null; this._dropTarget = null; }; return Draggable; }()); var Eventful = (function () { function Eventful(eventProcessors) { if (eventProcessors) { this._$eventProcessor = eventProcessors; } } Eventful.prototype.on = function (event, query, handler, context) { if (!this._$handlers) { this._$handlers = {}; } var _h = this._$handlers; if (typeof query === 'function') { context = handler; handler = query; query = null; } if (!handler || !event) { return this; } var eventProcessor = this._$eventProcessor; if (query != null && eventProcessor && eventProcessor.normalizeQuery) { query = eventProcessor.normalizeQuery(query); } if (!_h[event]) { _h[event] = []; } for (var i = 0; i < _h[event].length; i++) { if (_h[event][i].h === handler) { return this; } } var wrap = { h: handler, query: query, ctx: (context || this), callAtLast: handler.zrEventfulCallAtLast }; var lastIndex = _h[event].length - 1; var lastWrap = _h[event][lastIndex]; (lastWrap && lastWrap.callAtLast) ? _h[event].splice(lastIndex, 0, wrap) : _h[event].push(wrap); return this; }; Eventful.prototype.isSilent = function (eventName) { var _h = this._$handlers; return !_h || !_h[eventName] || !_h[eventName].length; }; Eventful.prototype.off = function (eventType, handler) { var _h = this._$handlers; if (!_h) { return this; } if (!eventType) { this._$handlers = {}; return this; } if (handler) { if (_h[eventType]) { var newList = []; for (var i = 0, l = _h[eventType].length; i < l; i++) { if (_h[eventType][i].h !== handler) { newList.push(_h[eventType][i]); } } _h[eventType] = newList; } if (_h[eventType] && _h[eventType].length === 0) { delete _h[eventType]; } } else { delete _h[eventType]; } return this; }; Eventful.prototype.trigger = function (eventType) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } if (!this._$handlers) { return this; } var _h = this._$handlers[eventType]; var eventProcessor = this._$eventProcessor; if (_h) { var argLen = args.length; var len = _h.length; for (var i = 0; i < len; i++) { var hItem = _h[i]; if (eventProcessor && eventProcessor.filter && hItem.query != null && !eventProcessor.filter(eventType, hItem.query)) { continue; } switch (argLen) { case 0: hItem.h.call(hItem.ctx); break; case 1: hItem.h.call(hItem.ctx, args[0]); break; case 2: hItem.h.call(hItem.ctx, args[0], args[1]); break; default: hItem.h.apply(hItem.ctx, args); break; } } } eventProcessor && eventProcessor.afterTrigger && eventProcessor.afterTrigger(eventType); return this; }; Eventful.prototype.triggerWithContext = function (type) { if (!this._$handlers) { return this; } var _h = this._$handlers[type]; var eventProcessor = this._$eventProcessor; if (_h) { var args = arguments; var argLen = args.length; var ctx = args[argLen - 1]; var len = _h.length; for (var i = 0; i < len; i++) { var hItem = _h[i]; if (eventProcessor && eventProcessor.filter && hItem.query != null && !eventProcessor.filter(type, hItem.query)) { continue; } switch (argLen) { case 0: hItem.h.call(ctx); break; case 1: hItem.h.call(ctx, args[0]); break; case 2: hItem.h.call(ctx, args[0], args[1]); break; default: hItem.h.apply(ctx, args.slice(1, argLen - 1)); break; } } } eventProcessor && eventProcessor.afterTrigger && eventProcessor.afterTrigger(type); return this; }; return Eventful; }()); var LN2 = Math.log(2); function determinant(rows, rank, rowStart, rowMask, colMask, detCache) { var cacheKey = rowMask + '-' + colMask; var fullRank = rows.length; if (detCache.hasOwnProperty(cacheKey)) { return detCache[cacheKey]; } if (rank === 1) { var colStart = Math.round(Math.log(((1 << fullRank) - 1) & ~colMask) / LN2); return rows[rowStart][colStart]; } var subRowMask = rowMask | (1 << rowStart); var subRowStart = rowStart + 1; while (rowMask & (1 << subRowStart)) { subRowStart++; } var sum = 0; for (var j = 0, colLocalIdx = 0; j < fullRank; j++) { var colTag = 1 << j; if (!(colTag & colMask)) { sum += (colLocalIdx % 2 ? -1 : 1) * rows[rowStart][j] * determinant(rows, rank - 1, subRowStart, subRowMask, colMask | colTag, detCache); colLocalIdx++; } } detCache[cacheKey] = sum; return sum; } function buildTransformer(src, dest) { var mA = [ [src[0], src[1], 1, 0, 0, 0, -dest[0] * src[0], -dest[0] * src[1]], [0, 0, 0, src[0], src[1], 1, -dest[1] * src[0], -dest[1] * src[1]], [src[2], src[3], 1, 0, 0, 0, -dest[2] * src[2], -dest[2] * src[3]], [0, 0, 0, src[2], src[3], 1, -dest[3] * src[2], -dest[3] * src[3]], [src[4], src[5], 1, 0, 0, 0, -dest[4] * src[4], -dest[4] * src[5]], [0, 0, 0, src[4], src[5], 1, -dest[5] * src[4], -dest[5] * src[5]], [src[6], src[7], 1, 0, 0, 0, -dest[6] * src[6], -dest[6] * src[7]], [0, 0, 0, src[6], src[7], 1, -dest[7] * src[6], -dest[7] * src[7]] ]; var detCache = {}; var det = determinant(mA, 8, 0, 0, 0, detCache); if (det === 0) { return; } var vh = []; for (var i = 0; i < 8; i++) { for (var j = 0; j < 8; j++) { vh[j] == null && (vh[j] = 0); vh[j] += ((i + j) % 2 ? -1 : 1) * determinant(mA, 7, i === 0 ? 1 : 0, 1 << i, 1 << j, detCache) / det * dest[i]; } } return function (out, srcPointX, srcPointY) { var pk = srcPointX * vh[6] + srcPointY * vh[7] + 1; out[0] = (srcPointX * vh[0] + srcPointY * vh[1] + vh[2]) / pk; out[1] = (srcPointX * vh[3] + srcPointY * vh[4] + vh[5]) / pk; }; } var EVENT_SAVED_PROP = '___zrEVENTSAVED'; var _calcOut = []; function transformLocalCoord(out, elFrom, elTarget, inX, inY) { return transformCoordWithViewport(_calcOut, elFrom, inX, inY, true) && transformCoordWithViewport(out, elTarget, _calcOut[0], _calcOut[1]); } function transformCoordWithViewport(out, el, inX, inY, inverse) { if (el.getBoundingClientRect && env.domSupported && !isCanvasEl(el)) { var saved = el[EVENT_SAVED_PROP] || (el[EVENT_SAVED_PROP] = {}); var markers = prepareCoordMarkers(el, saved); var transformer = preparePointerTransformer(markers, saved, inverse); if (transformer) { transformer(out, inX, inY); return true; } } return false; } function prepareCoordMarkers(el, saved) { var markers = saved.markers; if (markers) { return markers; } markers = saved.markers = []; var propLR = ['left', 'right']; var propTB = ['top', 'bottom']; for (var i = 0; i < 4; i++) { var marker = document.createElement('div'); var stl = marker.style; var idxLR = i % 2; var idxTB = (i >> 1) % 2; stl.cssText = [ 'position: absolute', 'visibility: hidden', 'padding: 0', 'margin: 0', 'border-width: 0', 'user-select: none', 'width:0', 'height:0', propLR[idxLR] + ':0', propTB[idxTB] + ':0', propLR[1 - idxLR] + ':auto', propTB[1 - idxTB] + ':auto', '' ].join('!important;'); el.appendChild(marker); markers.push(marker); } return markers; } function preparePointerTransformer(markers, saved, inverse) { var transformerName = inverse ? 'invTrans' : 'trans'; var transformer = saved[transformerName]; var oldSrcCoords = saved.srcCoords; var srcCoords = []; var destCoords = []; var oldCoordTheSame = true; for (var i = 0; i < 4; i++) { var rect = markers[i].getBoundingClientRect(); var ii = 2 * i; var x = rect.left; var y = rect.top; srcCoords.push(x, y); oldCoordTheSame = oldCoordTheSame && oldSrcCoords && x === oldSrcCoords[ii] && y === oldSrcCoords[ii + 1]; destCoords.push(markers[i].offsetLeft, markers[i].offsetTop); } return (oldCoordTheSame && transformer) ? transformer : (saved.srcCoords = srcCoords, saved[transformerName] = inverse ? buildTransformer(destCoords, srcCoords) : buildTransformer(srcCoords, destCoords)); } function isCanvasEl(el) { return el.nodeName.toUpperCase() === 'CANVAS'; } var isDomLevel2 = (typeof window !== 'undefined') && !!window.addEventListener; var MOUSE_EVENT_REG = /^(?:mouse|pointer|contextmenu|drag|drop)|click/; var _calcOut$1 = []; function clientToLocal(el, e, out, calculate) { out = out || {}; if (calculate || !env.canvasSupported) { calculateZrXY(el, e, out); } else if (env.browser.firefox && e.layerX != null && e.layerX !== e.offsetX) { out.zrX = e.layerX; out.zrY = e.layerY; } else if (e.offsetX != null) { out.zrX = e.offsetX; out.zrY = e.offsetY; } else { calculateZrXY(el, e, out); } return out; } function calculateZrXY(el, e, out) { if (env.domSupported && el.getBoundingClientRect) { var ex = e.clientX; var ey = e.clientY; if (isCanvasEl(el)) { var box = el.getBoundingClientRect(); out.zrX = ex - box.left; out.zrY = ey - box.top; return; } else { if (transformCoordWithViewport(_calcOut$1, el, ex, ey)) { out.zrX = _calcOut$1[0]; out.zrY = _calcOut$1[1]; return; } } } out.zrX = out.zrY = 0; } function getNativeEvent(e) { return e || window.event; } function normalizeEvent(el, e, calculate) { e = getNativeEvent(e); if (e.zrX != null) { return e; } var eventType = e.type; var isTouch = eventType && eventType.indexOf('touch') >= 0; if (!isTouch) { clientToLocal(el, e, e, calculate); var wheelDelta = getWheelDeltaMayPolyfill(e); e.zrDelta = wheelDelta ? wheelDelta / 120 : -(e.detail || 0) / 3; } else { var touch = eventType !== 'touchend' ? e.targetTouches[0] : e.changedTouches[0]; touch && clientToLocal(el, touch, e, calculate); } var button = e.button; if (e.which == null && button !== undefined && MOUSE_EVENT_REG.test(e.type)) { e.which = (button & 1 ? 1 : (button & 2 ? 3 : (button & 4 ? 2 : 0))); } return e; } function getWheelDeltaMayPolyfill(e) { var rawWheelDelta = e.wheelDelta; if (rawWheelDelta) { return rawWheelDelta; } var deltaX = e.deltaX; var deltaY = e.deltaY; if (deltaX == null || deltaY == null) { return rawWheelDelta; } var delta = deltaY !== 0 ? Math.abs(deltaY) : Math.abs(deltaX); var sign = deltaY > 0 ? -1 : deltaY < 0 ? 1 : deltaX > 0 ? -1 : 1; return 3 * delta * sign; } function addEventListener(el, name, handler, opt) { if (isDomLevel2) { el.addEventListener(name, handler, opt); } else { el.attachEvent('on' + name, handler); } } function removeEventListener(el, name, handler, opt) { if (isDomLevel2) { el.removeEventListener(name, handler, opt); } else { el.detachEvent('on' + name, handler); } } var stop = isDomLevel2 ? function (e) { e.preventDefault(); e.stopPropagation(); e.cancelBubble = true; } : function (e) { e.returnValue = false; e.cancelBubble = true; }; function isMiddleOrRightButtonOnMouseUpDown(e) { return e.which === 2 || e.which === 3; } var GestureMgr = (function () { function GestureMgr() { this._track = []; } GestureMgr.prototype.recognize = function (event, target, root) { this._doTrack(event, target, root); return this._recognize(event); }; GestureMgr.prototype.clear = function () { this._track.length = 0; return this; }; GestureMgr.prototype._doTrack = function (event, target, root) { var touches = event.touches; if (!touches) { return; } var trackItem = { points: [], touches: [], target: target, event: event }; for (var i = 0, len = touches.length; i < len; i++) { var touch = touches[i]; var pos = clientToLocal(root, touch, {}); trackItem.points.push([pos.zrX, pos.zrY]); trackItem.touches.push(touch); } this._track.push(trackItem); }; GestureMgr.prototype._recognize = function (event) { for (var eventName in recognizers) { if (recognizers.hasOwnProperty(eventName)) { var gestureInfo = recognizers[eventName](this._track, event); if (gestureInfo) { return gestureInfo; } } } }; return GestureMgr; }()); function dist$1(pointPair) { var dx = pointPair[1][0] - pointPair[0][0]; var dy = pointPair[1][1] - pointPair[0][1]; return Math.sqrt(dx * dx + dy * dy); } function center(pointPair) { return [ (pointPair[0][0] + pointPair[1][0]) / 2, (pointPair[0][1] + pointPair[1][1]) / 2 ]; } var recognizers = { pinch: function (tracks, event) { var trackLen = tracks.length; if (!trackLen) { return; } var pinchEnd = (tracks[trackLen - 1] || {}).points; var pinchPre = (tracks[trackLen - 2] || {}).points || pinchEnd; if (pinchPre && pinchPre.length > 1 && pinchEnd && pinchEnd.length > 1) { var pinchScale = dist$1(pinchEnd) / dist$1(pinchPre); !isFinite(pinchScale) && (pinchScale = 1); event.pinchScale = pinchScale; var pinchCenter = center(pinchEnd); event.pinchX = pinchCenter[0]; event.pinchY = pinchCenter[1]; return { type: 'pinch', target: tracks[0].target, event: event }; } } }; var SILENT = 'silent'; function makeEventPacket(eveType, targetInfo, event) { return { type: eveType, event: event, target: targetInfo.target, topTarget: targetInfo.topTarget, cancelBubble: false, offsetX: event.zrX, offsetY: event.zrY, gestureEvent: event.gestureEvent, pinchX: event.pinchX, pinchY: event.pinchY, pinchScale: event.pinchScale, wheelDelta: event.zrDelta, zrByTouch: event.zrByTouch, which: event.which, stop: stopEvent }; } function stopEvent() { stop(this.event); } var EmptyProxy = (function (_super) { __extends(EmptyProxy, _super); function EmptyProxy() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.handler = null; return _this; } EmptyProxy.prototype.dispose = function () { }; EmptyProxy.prototype.setCursor = function () { }; return EmptyProxy; }(Eventful)); var HoveredResult = (function () { function HoveredResult(x, y) { this.x = x; this.y = y; } return HoveredResult; }()); var handlerNames = [ 'click', 'dblclick', 'mousewheel', 'mouseout', 'mouseup', 'mousedown', 'mousemove', 'contextmenu' ]; var Handler = (function (_super) { __extends(Handler, _super); function Handler(storage, painter, proxy, painterRoot) { var _this = _super.call(this) || this; _this._hovered = new HoveredResult(0, 0); _this.storage = storage; _this.painter = painter; _this.painterRoot = painterRoot; proxy = proxy || new EmptyProxy(); _this.proxy = null; _this.setHandlerProxy(proxy); _this._draggingMgr = new Draggable(_this); return _this; } Handler.prototype.setHandlerProxy = function (proxy) { if (this.proxy) { this.proxy.dispose(); } if (proxy) { each(handlerNames, function (name) { proxy.on && proxy.on(name, this[name], this); }, this); proxy.handler = this; } this.proxy = proxy; }; Handler.prototype.mousemove = function (event) { var x = event.zrX; var y = event.zrY; var isOutside = isOutsideBoundary(this, x, y); var lastHovered = this._hovered; var lastHoveredTarget = lastHovered.target; if (lastHoveredTarget && !lastHoveredTarget.__zr) { lastHovered = this.findHover(lastHovered.x, lastHovered.y); lastHoveredTarget = lastHovered.target; } var hovered = this._hovered = isOutside ? new HoveredResult(x, y) : this.findHover(x, y); var hoveredTarget = hovered.target; var proxy = this.proxy; proxy.setCursor && proxy.setCursor(hoveredTarget ? hoveredTarget.cursor : 'default'); if (lastHoveredTarget && hoveredTarget !== lastHoveredTarget) { this.dispatchToElement(lastHovered, 'mouseout', event); } this.dispatchToElement(hovered, 'mousemove', event); if (hoveredTarget && hoveredTarget !== lastHoveredTarget) { this.dispatchToElement(hovered, 'mouseover', event); } }; Handler.prototype.mouseout = function (event) { var eventControl = event.zrEventControl; if (eventControl !== 'only_globalout') { this.dispatchToElement(this._hovered, 'mouseout', event); } if (eventControl !== 'no_globalout') { this.trigger('globalout', { type: 'globalout', event: event }); } }; Handler.prototype.resize = function () { this._hovered = new HoveredResult(0, 0); }; Handler.prototype.dispatch = function (eventName, eventArgs) { var handler = this[eventName]; handler && handler.call(this, eventArgs); }; Handler.prototype.dispose = function () { this.proxy.dispose(); this.storage = null; this.proxy = null; this.painter = null; }; Handler.prototype.setCursorStyle = function (cursorStyle) { var proxy = this.proxy; proxy.setCursor && proxy.setCursor(cursorStyle); }; Handler.prototype.dispatchToElement = function (targetInfo, eventName, event) { targetInfo = targetInfo || {}; var el = targetInfo.target; if (el && el.silent) { return; } var eventKey = ('on' + eventName); var eventPacket = makeEventPacket(eventName, targetInfo, event); while (el) { el[eventKey] && (eventPacket.cancelBubble = !!el[eventKey].call(el, eventPacket)); el.trigger(eventName, eventPacket); el = el.__hostTarget ? el.__hostTarget : el.parent; if (eventPacket.cancelBubble) { break; } } if (!eventPacket.cancelBubble) { this.trigger(eventName, eventPacket); if (this.painter && this.painter.eachOtherLayer) { this.painter.eachOtherLayer(function (layer) { if (typeof (layer[eventKey]) === 'function') { layer[eventKey].call(layer, eventPacket); } if (layer.trigger) { layer.trigger(eventName, eventPacket); } }); } } }; Handler.prototype.findHover = function (x, y, exclude) { var list = this.storage.getDisplayList(); var out = new HoveredResult(x, y); for (var i = list.length - 1; i >= 0; i--) { var hoverCheckResult = void 0; if (list[i] !== exclude && !list[i].ignore && (hoverCheckResult = isHover(list[i], x, y))) { !out.topTarget && (out.topTarget = list[i]); if (hoverCheckResult !== SILENT) { out.target = list[i]; break; } } } return out; }; Handler.prototype.processGesture = function (event, stage) { if (!this._gestureMgr) { this._gestureMgr = new GestureMgr(); } var gestureMgr = this._gestureMgr; stage === 'start' && gestureMgr.clear(); var gestureInfo = gestureMgr.recognize(event, this.findHover(event.zrX, event.zrY, null).target, this.proxy.dom); stage === 'end' && gestureMgr.clear(); if (gestureInfo) { var type = gestureInfo.type; event.gestureEvent = type; var res = new HoveredResult(); res.target = gestureInfo.target; this.dispatchToElement(res, type, gestureInfo.event); } }; return Handler; }(Eventful)); each(['click', 'mousedown', 'mouseup', 'mousewheel', 'dblclick', 'contextmenu'], function (name) { Handler.prototype[name] = function (event) { var x = event.zrX; var y = event.zrY; var isOutside = isOutsideBoundary(this, x, y); var hovered; var hoveredTarget; if (name !== 'mouseup' || !isOutside) { hovered = this.findHover(x, y); hoveredTarget = hovered.target; } if (name === 'mousedown') { this._downEl = hoveredTarget; this._downPoint = [event.zrX, event.zrY]; this._upEl = hoveredTarget; } else if (name === 'mouseup') { this._upEl = hoveredTarget; } else if (name === 'click') { if (this._downEl !== this._upEl || !this._downPoint || dist(this._downPoint, [event.zrX, event.zrY]) > 4) { return; } this._downPoint = null; } this.dispatchToElement(hovered, name, event); }; }); function isHover(displayable, x, y) { if (displayable[displayable.rectHover ? 'rectContain' : 'contain'](x, y)) { var el = displayable; var isSilent = void 0; var ignoreClip = false; while (el) { if (el.ignoreClip) { ignoreClip = true; } if (!ignoreClip) { var clipPath = el.getClipPath(); if (clipPath && !clipPath.contain(x, y)) { return false; } if (el.silent) { isSilent = true; } } var hostEl = el.__hostTarget; el = hostEl ? hostEl : el.parent; } return isSilent ? SILENT : true; } return false; } function isOutsideBoundary(handlerInstance, x, y) { var painter = handlerInstance.painter; return x < 0 || x > painter.getWidth() || y < 0 || y > painter.getHeight(); } function create$1() { return [1, 0, 0, 1, 0, 0]; } function identity(out) { out[0] = 1; out[1] = 0; out[2] = 0; out[3] = 1; out[4] = 0; out[5] = 0; return out; } function copy$1(out, m) { out[0] = m[0]; out[1] = m[1]; out[2] = m[2]; out[3] = m[3]; out[4] = m[4]; out[5] = m[5]; return out; } function mul$1(out, m1, m2) { var out0 = m1[0] * m2[0] + m1[2] * m2[1]; var out1 = m1[1] * m2[0] + m1[3] * m2[1]; var out2 = m1[0] * m2[2] + m1[2] * m2[3]; var out3 = m1[1] * m2[2] + m1[3] * m2[3]; var out4 = m1[0] * m2[4] + m1[2] * m2[5] + m1[4]; var out5 = m1[1] * m2[4] + m1[3] * m2[5] + m1[5]; out[0] = out0; out[1] = out1; out[2] = out2; out[3] = out3; out[4] = out4; out[5] = out5; return out; } function translate(out, a, v) { out[0] = a[0]; out[1] = a[1]; out[2] = a[2]; out[3] = a[3]; out[4] = a[4] + v[0]; out[5] = a[5] + v[1]; return out; } function rotate(out, a, rad) { var aa = a[0]; var ac = a[2]; var atx = a[4]; var ab = a[1]; var ad = a[3]; var aty = a[5]; var st = Math.sin(rad); var ct = Math.cos(rad); out[0] = aa * ct + ab * st; out[1] = -aa * st + ab * ct; out[2] = ac * ct + ad * st; out[3] = -ac * st + ct * ad; out[4] = ct * atx + st * aty; out[5] = ct * aty - st * atx; return out; } function scale$1(out, a, v) { var vx = v[0]; var vy = v[1]; out[0] = a[0] * vx; out[1] = a[1] * vy; out[2] = a[2] * vx; out[3] = a[3] * vy; out[4] = a[4] * vx; out[5] = a[5] * vy; return out; } function invert(out, a) { var aa = a[0]; var ac = a[2]; var atx = a[4]; var ab = a[1]; var ad = a[3]; var aty = a[5]; var det = aa * ad - ab * ac; if (!det) { return null; } det = 1.0 / det; out[0] = ad * det; out[1] = -ab * det; out[2] = -ac * det; out[3] = aa * det; out[4] = (ac * aty - ad * atx) * det; out[5] = (ab * atx - aa * aty) * det; return out; } function clone$2(a) { var b = create$1(); copy$1(b, a); return b; } var matrix = /*#__PURE__*/Object.freeze({ __proto__: null, create: create$1, identity: identity, copy: copy$1, mul: mul$1, translate: translate, rotate: rotate, scale: scale$1, invert: invert, clone: clone$2 }); var mIdentity = identity; var EPSILON = 5e-5; function isNotAroundZero(val) { return val > EPSILON || val < -EPSILON; } var scaleTmp = []; var tmpTransform = []; var originTransform = create$1(); var abs = Math.abs; var Transformable = (function () { function Transformable() { } Transformable.prototype.setPosition = function (arr) { this.x = arr[0]; this.y = arr[1]; }; Transformable.prototype.setScale = function (arr) { this.scaleX = arr[0]; this.scaleY = arr[1]; }; Transformable.prototype.setOrigin = function (arr) { this.originX = arr[0]; this.originY = arr[1]; }; Transformable.prototype.needLocalTransform = function () { return isNotAroundZero(this.rotation) || isNotAroundZero(this.x) || isNotAroundZero(this.y) || isNotAroundZero(this.scaleX - 1) || isNotAroundZero(this.scaleY - 1); }; Transformable.prototype.updateTransform = function () { var parent = this.parent; var parentHasTransform = parent && parent.transform; var needLocalTransform = this.needLocalTransform(); var m = this.transform; if (!(needLocalTransform || parentHasTransform)) { m && mIdentity(m); return; } m = m || create$1(); if (needLocalTransform) { this.getLocalTransform(m); } else { mIdentity(m); } if (parentHasTransform) { if (needLocalTransform) { mul$1(m, parent.transform, m); } else { copy$1(m, parent.transform); } } this.transform = m; this._resolveGlobalScaleRatio(m); }; Transformable.prototype._resolveGlobalScaleRatio = function (m) { var globalScaleRatio = this.globalScaleRatio; if (globalScaleRatio != null && globalScaleRatio !== 1) { this.getGlobalScale(scaleTmp); var relX = scaleTmp[0] < 0 ? -1 : 1; var relY = scaleTmp[1] < 0 ? -1 : 1; var sx = ((scaleTmp[0] - relX) * globalScaleRatio + relX) / scaleTmp[0] || 0; var sy = ((scaleTmp[1] - relY) * globalScaleRatio + relY) / scaleTmp[1] || 0; m[0] *= sx; m[1] *= sx; m[2] *= sy; m[3] *= sy; } this.invTransform = this.invTransform || create$1(); invert(this.invTransform, m); }; Transformable.prototype.getLocalTransform = function (m) { return Transformable.getLocalTransform(this, m); }; Transformable.prototype.getComputedTransform = function () { var transformNode = this; var ancestors = []; while (transformNode) { ancestors.push(transformNode); transformNode = transformNode.parent; } while (transformNode = ancestors.pop()) { transformNode.updateTransform(); } return this.transform; }; Transformable.prototype.setLocalTransform = function (m) { if (!m) { return; } var sx = m[0] * m[0] + m[1] * m[1]; var sy = m[2] * m[2] + m[3] * m[3]; if (isNotAroundZero(sx - 1)) { sx = Math.sqrt(sx); } if (isNotAroundZero(sy - 1)) { sy = Math.sqrt(sy); } if (m[0] < 0) { sx = -sx; } if (m[3] < 0) { sy = -sy; } this.rotation = Math.atan2(-m[1] / sy, m[0] / sx); if (sx < 0 && sy < 0) { this.rotation += Math.PI; sx = -sx; sy = -sy; } this.x = m[4]; this.y = m[5]; this.scaleX = sx; this.scaleY = sy; }; Transformable.prototype.decomposeTransform = function () { if (!this.transform) { return; } var parent = this.parent; var m = this.transform; if (parent && parent.transform) { mul$1(tmpTransform, parent.invTransform, m); m = tmpTransform; } var ox = this.originX; var oy = this.originY; if (ox || oy) { originTransform[4] = ox; originTransform[5] = oy; mul$1(tmpTransform, m, originTransform); tmpTransform[4] -= ox; tmpTransform[5] -= oy; m = tmpTransform; } this.setLocalTransform(m); }; Transformable.prototype.getGlobalScale = function (out) { var m = this.transform; out = out || []; if (!m) { out[0] = 1; out[1] = 1; return out; } out[0] = Math.sqrt(m[0] * m[0] + m[1] * m[1]); out[1] = Math.sqrt(m[2] * m[2] + m[3] * m[3]); if (m[0] < 0) { out[0] = -out[0]; } if (m[3] < 0) { out[1] = -out[1]; } return out; }; Transformable.prototype.transformCoordToLocal = function (x, y) { var v2 = [x, y]; var invTransform = this.invTransform; if (invTransform) { applyTransform(v2, v2, invTransform); } return v2; }; Transformable.prototype.transformCoordToGlobal = function (x, y) { var v2 = [x, y]; var transform = this.transform; if (transform) { applyTransform(v2, v2, transform); } return v2; }; Transformable.prototype.getLineScale = function () { var m = this.transform; return m && abs(m[0] - 1) > 1e-10 && abs(m[3] - 1) > 1e-10 ? Math.sqrt(abs(m[0] * m[3] - m[2] * m[1])) : 1; }; Transformable.getLocalTransform = function (target, m) { m = m || []; mIdentity(m); var ox = target.originX || 0; var oy = target.originY || 0; var sx = target.scaleX; var sy = target.scaleY; var rotation = target.rotation || 0; var x = target.x; var y = target.y; m[4] -= ox; m[5] -= oy; m[0] *= sx; m[1] *= sy; m[2] *= sx; m[3] *= sy; m[4] *= sx; m[5] *= sy; if (rotation) { rotate(m, m, rotation); } m[4] += ox; m[5] += oy; m[4] += x; m[5] += y; return m; }; Transformable.initDefaultProps = (function () { var proto = Transformable.prototype; proto.x = 0; proto.y = 0; proto.scaleX = 1; proto.scaleY = 1; proto.originX = 0; proto.originY = 0; proto.rotation = 0; proto.globalScaleRatio = 1; })(); return Transformable; }()); var easing = { linear: function (k) { return k; }, quadraticIn: function (k) { return k * k; }, quadraticOut: function (k) { return k * (2 - k); }, quadraticInOut: function (k) { if ((k *= 2) < 1) { return 0.5 * k * k; } return -0.5 * (--k * (k - 2) - 1); }, cubicIn: function (k) { return k * k * k; }, cubicOut: function (k) { return --k * k * k + 1; }, cubicInOut: function (k) { if ((k *= 2) < 1) { return 0.5 * k * k * k; } return 0.5 * ((k -= 2) * k * k + 2); }, quarticIn: function (k) { return k * k * k * k; }, quarticOut: function (k) { return 1 - (--k * k * k * k); }, quarticInOut: function (k) { if ((k *= 2) < 1) { return 0.5 * k * k * k * k; } return -0.5 * ((k -= 2) * k * k * k - 2); }, quinticIn: function (k) { return k * k * k * k * k; }, quinticOut: function (k) { return --k * k * k * k * k + 1; }, quinticInOut: function (k) { if ((k *= 2) < 1) { return 0.5 * k * k * k * k * k; } return 0.5 * ((k -= 2) * k * k * k * k + 2); }, sinusoidalIn: function (k) { return 1 - Math.cos(k * Math.PI / 2); }, sinusoidalOut: function (k) { return Math.sin(k * Math.PI / 2); }, sinusoidalInOut: function (k) { return 0.5 * (1 - Math.cos(Math.PI * k)); }, exponentialIn: function (k) { return k === 0 ? 0 : Math.pow(1024, k - 1); }, exponentialOut: function (k) { return k === 1 ? 1 : 1 - Math.pow(2, -10 * k); }, exponentialInOut: function (k) { if (k === 0) { return 0; } if (k === 1) { return 1; } if ((k *= 2) < 1) { return 0.5 * Math.pow(1024, k - 1); } return 0.5 * (-Math.pow(2, -10 * (k - 1)) + 2); }, circularIn: function (k) { return 1 - Math.sqrt(1 - k * k); }, circularOut: function (k) { return Math.sqrt(1 - (--k * k)); }, circularInOut: function (k) { if ((k *= 2) < 1) { return -0.5 * (Math.sqrt(1 - k * k) - 1); } return 0.5 * (Math.sqrt(1 - (k -= 2) * k) + 1); }, elasticIn: function (k) { var s; var a = 0.1; var p = 0.4; if (k === 0) { return 0; } if (k === 1) { return 1; } if (!a || a < 1) { a = 1; s = p / 4; } else { s = p * Math.asin(1 / a) / (2 * Math.PI); } return -(a * Math.pow(2, 10 * (k -= 1)) * Math.sin((k - s) * (2 * Math.PI) / p)); }, elasticOut: function (k) { var s; var a = 0.1; var p = 0.4; if (k === 0) { return 0; } if (k === 1) { return 1; } if (!a || a < 1) { a = 1; s = p / 4; } else { s = p * Math.asin(1 / a) / (2 * Math.PI); } return (a * Math.pow(2, -10 * k) * Math.sin((k - s) * (2 * Math.PI) / p) + 1); }, elasticInOut: function (k) { var s; var a = 0.1; var p = 0.4; if (k === 0) { return 0; } if (k === 1) { return 1; } if (!a || a < 1) { a = 1; s = p / 4; } else { s = p * Math.asin(1 / a) / (2 * Math.PI); } if ((k *= 2) < 1) { return -0.5 * (a * Math.pow(2, 10 * (k -= 1)) * Math.sin((k - s) * (2 * Math.PI) / p)); } return a * Math.pow(2, -10 * (k -= 1)) * Math.sin((k - s) * (2 * Math.PI) / p) * 0.5 + 1; }, backIn: function (k) { var s = 1.70158; return k * k * ((s + 1) * k - s); }, backOut: function (k) { var s = 1.70158; return --k * k * ((s + 1) * k + s) + 1; }, backInOut: function (k) { var s = 1.70158 * 1.525; if ((k *= 2) < 1) { return 0.5 * (k * k * ((s + 1) * k - s)); } return 0.5 * ((k -= 2) * k * ((s + 1) * k + s) + 2); }, bounceIn: function (k) { return 1 - easing.bounceOut(1 - k); }, bounceOut: function (k) { if (k < (1 / 2.75)) { return 7.5625 * k * k; } else if (k < (2 / 2.75)) { return 7.5625 * (k -= (1.5 / 2.75)) * k + 0.75; } else if (k < (2.5 / 2.75)) { return 7.5625 * (k -= (2.25 / 2.75)) * k + 0.9375; } else { return 7.5625 * (k -= (2.625 / 2.75)) * k + 0.984375; } }, bounceInOut: function (k) { if (k < 0.5) { return easing.bounceIn(k * 2) * 0.5; } return easing.bounceOut(k * 2 - 1) * 0.5 + 0.5; } }; var Clip = (function () { function Clip(opts) { this._initialized = false; this._startTime = 0; this._pausedTime = 0; this._paused = false; this._life = opts.life || 1000; this._delay = opts.delay || 0; this.loop = opts.loop == null ? false : opts.loop; this.gap = opts.gap || 0; this.easing = opts.easing || 'linear'; this.onframe = opts.onframe; this.ondestroy = opts.ondestroy; this.onrestart = opts.onrestart; } Clip.prototype.step = function (globalTime, deltaTime) { if (!this._initialized) { this._startTime = globalTime + this._delay; this._initialized = true; } if (this._paused) { this._pausedTime += deltaTime; return; } var percent = (globalTime - this._startTime - this._pausedTime) / this._life; if (percent < 0) { percent = 0; } percent = Math.min(percent, 1); var easing$1 = this.easing; var easingFunc = typeof easing$1 === 'string' ? easing[easing$1] : easing$1; var schedule = typeof easingFunc === 'function' ? easingFunc(percent) : percent; this.onframe && this.onframe(schedule); if (percent === 1) { if (this.loop) { this._restart(globalTime); this.onrestart && this.onrestart(); } else { return true; } } return false; }; Clip.prototype._restart = function (globalTime) { var remainder = (globalTime - this._startTime - this._pausedTime) % this._life; this._startTime = globalTime - remainder + this.gap; this._pausedTime = 0; }; Clip.prototype.pause = function () { this._paused = true; }; Clip.prototype.resume = function () { this._paused = false; }; return Clip; }()); var Entry = (function () { function Entry(val) { this.value = val; } return Entry; }()); var LinkedList = (function () { function LinkedList() { this._len = 0; } LinkedList.prototype.insert = function (val) { var entry = new Entry(val); this.insertEntry(entry); return entry; }; LinkedList.prototype.insertEntry = function (entry) { if (!this.head) { this.head = this.tail = entry; } else { this.tail.next = entry; entry.prev = this.tail; entry.next = null; this.tail = entry; } this._len++; }; LinkedList.prototype.remove = function (entry) { var prev = entry.prev; var next = entry.next; if (prev) { prev.next = next; } else { this.head = next; } if (next) { next.prev = prev; } else { this.tail = prev; } entry.next = entry.prev = null; this._len--; }; LinkedList.prototype.len = function () { return this._len; }; LinkedList.prototype.clear = function () { this.head = this.tail = null; this._len = 0; }; return LinkedList; }()); var LRU = (function () { function LRU(maxSize) { this._list = new LinkedList(); this._maxSize = 10; this._map = {}; this._maxSize = maxSize; } LRU.prototype.put = function (key, value) { var list = this._list; var map = this._map; var removed = null; if (map[key] == null) { var len = list.len(); var entry = this._lastRemovedEntry; if (len >= this._maxSize && len > 0) { var leastUsedEntry = list.head; list.remove(leastUsedEntry); delete map[leastUsedEntry.key]; removed = leastUsedEntry.value; this._lastRemovedEntry = leastUsedEntry; } if (entry) { entry.value = value; } else { entry = new Entry(value); } entry.key = key; list.insertEntry(entry); map[key] = entry; } return removed; }; LRU.prototype.get = function (key) { var entry = this._map[key]; var list = this._list; if (entry != null) { if (entry !== list.tail) { list.remove(entry); list.insertEntry(entry); } return entry.value; } }; LRU.prototype.clear = function () { this._list.clear(); this._map = {}; }; LRU.prototype.len = function () { return this._list.len(); }; return LRU; }()); var kCSSColorTable = { 'transparent': [0, 0, 0, 0], 'aliceblue': [240, 248, 255, 1], 'antiquewhite': [250, 235, 215, 1], 'aqua': [0, 255, 255, 1], 'aquamarine': [127, 255, 212, 1], 'azure': [240, 255, 255, 1], 'beige': [245, 245, 220, 1], 'bisque': [255, 228, 196, 1], 'black': [0, 0, 0, 1], 'blanchedalmond': [255, 235, 205, 1], 'blue': [0, 0, 255, 1], 'blueviolet': [138, 43, 226, 1], 'brown': [165, 42, 42, 1], 'burlywood': [222, 184, 135, 1], 'cadetblue': [95, 158, 160, 1], 'chartreuse': [127, 255, 0, 1], 'chocolate': [210, 105, 30, 1], 'coral': [255, 127, 80, 1], 'cornflowerblue': [100, 149, 237, 1], 'cornsilk': [255, 248, 220, 1], 'crimson': [220, 20, 60, 1], 'cyan': [0, 255, 255, 1], 'darkblue': [0, 0, 139, 1], 'darkcyan': [0, 139, 139, 1], 'darkgoldenrod': [184, 134, 11, 1], 'darkgray': [169, 169, 169, 1], 'darkgreen': [0, 100, 0, 1], 'darkgrey': [169, 169, 169, 1], 'darkkhaki': [189, 183, 107, 1], 'darkmagenta': [139, 0, 139, 1], 'darkolivegreen': [85, 107, 47, 1], 'darkorange': [255, 140, 0, 1], 'darkorchid': [153, 50, 204, 1], 'darkred': [139, 0, 0, 1], 'darksalmon': [233, 150, 122, 1], 'darkseagreen': [143, 188, 143, 1], 'darkslateblue': [72, 61, 139, 1], 'darkslategray': [47, 79, 79, 1], 'darkslategrey': [47, 79, 79, 1], 'darkturquoise': [0, 206, 209, 1], 'darkviolet': [148, 0, 211, 1], 'deeppink': [255, 20, 147, 1], 'deepskyblue': [0, 191, 255, 1], 'dimgray': [105, 105, 105, 1], 'dimgrey': [105, 105, 105, 1], 'dodgerblue': [30, 144, 255, 1], 'firebrick': [178, 34, 34, 1], 'floralwhite': [255, 250, 240, 1], 'forestgreen': [34, 139, 34, 1], 'fuchsia': [255, 0, 255, 1], 'gainsboro': [220, 220, 220, 1], 'ghostwhite': [248, 248, 255, 1], 'gold': [255, 215, 0, 1], 'goldenrod': [218, 165, 32, 1], 'gray': [128, 128, 128, 1], 'green': [0, 128, 0, 1], 'greenyellow': [173, 255, 47, 1], 'grey': [128, 128, 128, 1], 'honeydew': [240, 255, 240, 1], 'hotpink': [255, 105, 180, 1], 'indianred': [205, 92, 92, 1], 'indigo': [75, 0, 130, 1], 'ivory': [255, 255, 240, 1], 'khaki': [240, 230, 140, 1], 'lavender': [230, 230, 250, 1], 'lavenderblush': [255, 240, 245, 1], 'lawngreen': [124, 252, 0, 1], 'lemonchiffon': [255, 250, 205, 1], 'lightblue': [173, 216, 230, 1], 'lightcoral': [240, 128, 128, 1], 'lightcyan': [224, 255, 255, 1], 'lightgoldenrodyellow': [250, 250, 210, 1], 'lightgray': [211, 211, 211, 1], 'lightgreen': [144, 238, 144, 1], 'lightgrey': [211, 211, 211, 1], 'lightpink': [255, 182, 193, 1], 'lightsalmon': [255, 160, 122, 1], 'lightseagreen': [32, 178, 170, 1], 'lightskyblue': [135, 206, 250, 1], 'lightslategray': [119, 136, 153, 1], 'lightslategrey': [119, 136, 153, 1], 'lightsteelblue': [176, 196, 222, 1], 'lightyellow': [255, 255, 224, 1], 'lime': [0, 255, 0, 1], 'limegreen': [50, 205, 50, 1], 'linen': [250, 240, 230, 1], 'magenta': [255, 0, 255, 1], 'maroon': [128, 0, 0, 1], 'mediumaquamarine': [102, 205, 170, 1], 'mediumblue': [0, 0, 205, 1], 'mediumorchid': [186, 85, 211, 1], 'mediumpurple': [147, 112, 219, 1], 'mediumseagreen': [60, 179, 113, 1], 'mediumslateblue': [123, 104, 238, 1], 'mediumspringgreen': [0, 250, 154, 1], 'mediumturquoise': [72, 209, 204, 1], 'mediumvioletred': [199, 21, 133, 1], 'midnightblue': [25, 25, 112, 1], 'mintcream': [245, 255, 250, 1], 'mistyrose': [255, 228, 225, 1], 'moccasin': [255, 228, 181, 1], 'navajowhite': [255, 222, 173, 1], 'navy': [0, 0, 128, 1], 'oldlace': [253, 245, 230, 1], 'olive': [128, 128, 0, 1], 'olivedrab': [107, 142, 35, 1], 'orange': [255, 165, 0, 1], 'orangered': [255, 69, 0, 1], 'orchid': [218, 112, 214, 1], 'palegoldenrod': [238, 232, 170, 1], 'palegreen': [152, 251, 152, 1], 'paleturquoise': [175, 238, 238, 1], 'palevioletred': [219, 112, 147, 1], 'papayawhip': [255, 239, 213, 1], 'peachpuff': [255, 218, 185, 1], 'peru': [205, 133, 63, 1], 'pink': [255, 192, 203, 1], 'plum': [221, 160, 221, 1], 'powderblue': [176, 224, 230, 1], 'purple': [128, 0, 128, 1], 'red': [255, 0, 0, 1], 'rosybrown': [188, 143, 143, 1], 'royalblue': [65, 105, 225, 1], 'saddlebrown': [139, 69, 19, 1], 'salmon': [250, 128, 114, 1], 'sandybrown': [244, 164, 96, 1], 'seagreen': [46, 139, 87, 1], 'seashell': [255, 245, 238, 1], 'sienna': [160, 82, 45, 1], 'silver': [192, 192, 192, 1], 'skyblue': [135, 206, 235, 1], 'slateblue': [106, 90, 205, 1], 'slategray': [112, 128, 144, 1], 'slategrey': [112, 128, 144, 1], 'snow': [255, 250, 250, 1], 'springgreen': [0, 255, 127, 1], 'steelblue': [70, 130, 180, 1], 'tan': [210, 180, 140, 1], 'teal': [0, 128, 128, 1], 'thistle': [216, 191, 216, 1], 'tomato': [255, 99, 71, 1], 'turquoise': [64, 224, 208, 1], 'violet': [238, 130, 238, 1], 'wheat': [245, 222, 179, 1], 'white': [255, 255, 255, 1], 'whitesmoke': [245, 245, 245, 1], 'yellow': [255, 255, 0, 1], 'yellowgreen': [154, 205, 50, 1] }; function clampCssByte(i) { i = Math.round(i); return i < 0 ? 0 : i > 255 ? 255 : i; } function clampCssAngle(i) { i = Math.round(i); return i < 0 ? 0 : i > 360 ? 360 : i; } function clampCssFloat(f) { return f < 0 ? 0 : f > 1 ? 1 : f; } function parseCssInt(val) { var str = val; if (str.length && str.charAt(str.length - 1) === '%') { return clampCssByte(parseFloat(str) / 100 * 255); } return clampCssByte(parseInt(str, 10)); } function parseCssFloat(val) { var str = val; if (str.length && str.charAt(str.length - 1) === '%') { return clampCssFloat(parseFloat(str) / 100); } return clampCssFloat(parseFloat(str)); } function cssHueToRgb(m1, m2, h) { if (h < 0) { h += 1; } else if (h > 1) { h -= 1; } if (h * 6 < 1) { return m1 + (m2 - m1) * h * 6; } if (h * 2 < 1) { return m2; } if (h * 3 < 2) { return m1 + (m2 - m1) * (2 / 3 - h) * 6; } return m1; } function lerpNumber(a, b, p) { return a + (b - a) * p; } function setRgba(out, r, g, b, a) { out[0] = r; out[1] = g; out[2] = b; out[3] = a; return out; } function copyRgba(out, a) { out[0] = a[0]; out[1] = a[1]; out[2] = a[2]; out[3] = a[3]; return out; } var colorCache = new LRU(20); var lastRemovedArr = null; function putToCache(colorStr, rgbaArr) { if (lastRemovedArr) { copyRgba(lastRemovedArr, rgbaArr); } lastRemovedArr = colorCache.put(colorStr, lastRemovedArr || (rgbaArr.slice())); } function parse(colorStr, rgbaArr) { if (!colorStr) { return; } rgbaArr = rgbaArr || []; var cached = colorCache.get(colorStr); if (cached) { return copyRgba(rgbaArr, cached); } colorStr = colorStr + ''; var str = colorStr.replace(/ /g, '').toLowerCase(); if (str in kCSSColorTable) { copyRgba(rgbaArr, kCSSColorTable[str]); putToCache(colorStr, rgbaArr); return rgbaArr; } var strLen = str.length; if (str.charAt(0) === '#') { if (strLen === 4 || strLen === 5) { var iv = parseInt(str.slice(1, 4), 16); if (!(iv >= 0 && iv <= 0xfff)) { setRgba(rgbaArr, 0, 0, 0, 1); return; } setRgba(rgbaArr, ((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8), (iv & 0xf0) | ((iv & 0xf0) >> 4), (iv & 0xf) | ((iv & 0xf) << 4), strLen === 5 ? parseInt(str.slice(4), 16) / 0xf : 1); putToCache(colorStr, rgbaArr); return rgbaArr; } else if (strLen === 7 || strLen === 9) { var iv = parseInt(str.slice(1, 7), 16); if (!(iv >= 0 && iv <= 0xffffff)) { setRgba(rgbaArr, 0, 0, 0, 1); return; } setRgba(rgbaArr, (iv & 0xff0000) >> 16, (iv & 0xff00) >> 8, iv & 0xff, strLen === 9 ? parseInt(str.slice(7), 16) / 0xff : 1); putToCache(colorStr, rgbaArr); return rgbaArr; } return; } var op = str.indexOf('('); var ep = str.indexOf(')'); if (op !== -1 && ep + 1 === strLen) { var fname = str.substr(0, op); var params = str.substr(op + 1, ep - (op + 1)).split(','); var alpha = 1; switch (fname) { case 'rgba': if (params.length !== 4) { return params.length === 3 ? setRgba(rgbaArr, +params[0], +params[1], +params[2], 1) : setRgba(rgbaArr, 0, 0, 0, 1); } alpha = parseCssFloat(params.pop()); case 'rgb': if (params.length !== 3) { setRgba(rgbaArr, 0, 0, 0, 1); return; } setRgba(rgbaArr, parseCssInt(params[0]), parseCssInt(params[1]), parseCssInt(params[2]), alpha); putToCache(colorStr, rgbaArr); return rgbaArr; case 'hsla': if (params.length !== 4) { setRgba(rgbaArr, 0, 0, 0, 1); return; } params[3] = parseCssFloat(params[3]); hsla2rgba(params, rgbaArr); putToCache(colorStr, rgbaArr); return rgbaArr; case 'hsl': if (params.length !== 3) { setRgba(rgbaArr, 0, 0, 0, 1); return; } hsla2rgba(params, rgbaArr); putToCache(colorStr, rgbaArr); return rgbaArr; default: return; } } setRgba(rgbaArr, 0, 0, 0, 1); return; } function hsla2rgba(hsla, rgba) { var h = (((parseFloat(hsla[0]) % 360) + 360) % 360) / 360; var s = parseCssFloat(hsla[1]); var l = parseCssFloat(hsla[2]); var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s; var m1 = l * 2 - m2; rgba = rgba || []; setRgba(rgba, clampCssByte(cssHueToRgb(m1, m2, h + 1 / 3) * 255), clampCssByte(cssHueToRgb(m1, m2, h) * 255), clampCssByte(cssHueToRgb(m1, m2, h - 1 / 3) * 255), 1); if (hsla.length === 4) { rgba[3] = hsla[3]; } return rgba; } function rgba2hsla(rgba) { if (!rgba) { return; } var R = rgba[0] / 255; var G = rgba[1] / 255; var B = rgba[2] / 255; var vMin = Math.min(R, G, B); var vMax = Math.max(R, G, B); var delta = vMax - vMin; var L = (vMax + vMin) / 2; var H; var S; if (delta === 0) { H = 0; S = 0; } else { if (L < 0.5) { S = delta / (vMax + vMin); } else { S = delta / (2 - vMax - vMin); } var deltaR = (((vMax - R) / 6) + (delta / 2)) / delta; var deltaG = (((vMax - G) / 6) + (delta / 2)) / delta; var deltaB = (((vMax - B) / 6) + (delta / 2)) / delta; if (R === vMax) { H = deltaB - deltaG; } else if (G === vMax) { H = (1 / 3) + deltaR - deltaB; } else if (B === vMax) { H = (2 / 3) + deltaG - deltaR; } if (H < 0) { H += 1; } if (H > 1) { H -= 1; } } var hsla = [H * 360, S, L]; if (rgba[3] != null) { hsla.push(rgba[3]); } return hsla; } function lift(color, level) { var colorArr = parse(color); if (colorArr) { for (var i = 0; i < 3; i++) { if (level < 0) { colorArr[i] = colorArr[i] * (1 - level) | 0; } else { colorArr[i] = ((255 - colorArr[i]) * level + colorArr[i]) | 0; } if (colorArr[i] > 255) { colorArr[i] = 255; } else if (colorArr[i] < 0) { colorArr[i] = 0; } } return stringify(colorArr, colorArr.length === 4 ? 'rgba' : 'rgb'); } } function toHex(color) { var colorArr = parse(color); if (colorArr) { return ((1 << 24) + (colorArr[0] << 16) + (colorArr[1] << 8) + (+colorArr[2])).toString(16).slice(1); } } function fastLerp(normalizedValue, colors, out) { if (!(colors && colors.length) || !(normalizedValue >= 0 && normalizedValue <= 1)) { return; } out = out || []; var value = normalizedValue * (colors.length - 1); var leftIndex = Math.floor(value); var rightIndex = Math.ceil(value); var leftColor = colors[leftIndex]; var rightColor = colors[rightIndex]; var dv = value - leftIndex; out[0] = clampCssByte(lerpNumber(leftColor[0], rightColor[0], dv)); out[1] = clampCssByte(lerpNumber(leftColor[1], rightColor[1], dv)); out[2] = clampCssByte(lerpNumber(leftColor[2], rightColor[2], dv)); out[3] = clampCssFloat(lerpNumber(leftColor[3], rightColor[3], dv)); return out; } var fastMapToColor = fastLerp; function lerp$1(normalizedValue, colors, fullOutput) { if (!(colors && colors.length) || !(normalizedValue >= 0 && normalizedValue <= 1)) { return; } var value = normalizedValue * (colors.length - 1); var leftIndex = Math.floor(value); var rightIndex = Math.ceil(value); var leftColor = parse(colors[leftIndex]); var rightColor = parse(colors[rightIndex]); var dv = value - leftIndex; var color = stringify([ clampCssByte(lerpNumber(leftColor[0], rightColor[0], dv)), clampCssByte(lerpNumber(leftColor[1], rightColor[1], dv)), clampCssByte(lerpNumber(leftColor[2], rightColor[2], dv)), clampCssFloat(lerpNumber(leftColor[3], rightColor[3], dv)) ], 'rgba'); return fullOutput ? { color: color, leftIndex: leftIndex, rightIndex: rightIndex, value: value } : color; } var mapToColor = lerp$1; function modifyHSL(color, h, s, l) { var colorArr = parse(color); if (color) { colorArr = rgba2hsla(colorArr); h != null && (colorArr[0] = clampCssAngle(h)); s != null && (colorArr[1] = parseCssFloat(s)); l != null && (colorArr[2] = parseCssFloat(l)); return stringify(hsla2rgba(colorArr), 'rgba'); } } function modifyAlpha(color, alpha) { var colorArr = parse(color); if (colorArr && alpha != null) { colorArr[3] = clampCssFloat(alpha); return stringify(colorArr, 'rgba'); } } function stringify(arrColor, type) { if (!arrColor || !arrColor.length) { return; } var colorStr = arrColor[0] + ',' + arrColor[1] + ',' + arrColor[2]; if (type === 'rgba' || type === 'hsva' || type === 'hsla') { colorStr += ',' + arrColor[3]; } return type + '(' + colorStr + ')'; } function lum(color, backgroundLum) { var arr = parse(color); return arr ? (0.299 * arr[0] + 0.587 * arr[1] + 0.114 * arr[2]) * arr[3] / 255 + (1 - arr[3]) * backgroundLum : 0; } function random() { var r = Math.round(Math.random() * 255); var g = Math.round(Math.random() * 255); var b = Math.round(Math.random() * 255); return 'rgb(' + r + ',' + g + ',' + b + ')'; } var color = /*#__PURE__*/Object.freeze({ __proto__: null, parse: parse, lift: lift, toHex: toHex, fastLerp: fastLerp, fastMapToColor: fastMapToColor, lerp: lerp$1, mapToColor: mapToColor, modifyHSL: modifyHSL, modifyAlpha: modifyAlpha, stringify: stringify, lum: lum, random: random }); var arraySlice = Array.prototype.slice; function interpolateNumber(p0, p1, percent) { return (p1 - p0) * percent + p0; } function step(p0, p1, percent) { return percent > 0.5 ? p1 : p0; } function interpolate1DArray(out, p0, p1, percent) { var len = p0.length; for (var i = 0; i < len; i++) { out[i] = interpolateNumber(p0[i], p1[i], percent); } } function interpolate2DArray(out, p0, p1, percent) { var len = p0.length; var len2 = len && p0[0].length; for (var i = 0; i < len; i++) { if (!out[i]) { out[i] = []; } for (var j = 0; j < len2; j++) { out[i][j] = interpolateNumber(p0[i][j], p1[i][j], percent); } } } function add1DArray(out, p0, p1, sign) { var len = p0.length; for (var i = 0; i < len; i++) { out[i] = p0[i] + p1[i] * sign; } return out; } function add2DArray(out, p0, p1, sign) { var len = p0.length; var len2 = len && p0[0].length; for (var i = 0; i < len; i++) { if (!out[i]) { out[i] = []; } for (var j = 0; j < len2; j++) { out[i][j] = p0[i][j] + p1[i][j] * sign; } } return out; } function fillArray(val0, val1, arrDim) { var arr0 = val0; var arr1 = val1; if (!arr0.push || !arr1.push) { return; } var arr0Len = arr0.length; var arr1Len = arr1.length; if (arr0Len !== arr1Len) { var isPreviousLarger = arr0Len > arr1Len; if (isPreviousLarger) { arr0.length = arr1Len; } else { for (var i = arr0Len; i < arr1Len; i++) { arr0.push(arrDim === 1 ? arr1[i] : arraySlice.call(arr1[i])); } } } var len2 = arr0[0] && arr0[0].length; for (var i = 0; i < arr0.length; i++) { if (arrDim === 1) { if (isNaN(arr0[i])) { arr0[i] = arr1[i]; } } else { for (var j = 0; j < len2; j++) { if (isNaN(arr0[i][j])) { arr0[i][j] = arr1[i][j]; } } } } } function is1DArraySame(arr0, arr1) { var len = arr0.length; if (len !== arr1.length) { return false; } for (var i = 0; i < len; i++) { if (arr0[i] !== arr1[i]) { return false; } } return true; } function catmullRomInterpolate(p0, p1, p2, p3, t, t2, t3) { var v0 = (p2 - p0) * 0.5; var v1 = (p3 - p1) * 0.5; return (2 * (p1 - p2) + v0 + v1) * t3 + (-3 * (p1 - p2) - 2 * v0 - v1) * t2 + v0 * t + p1; } function catmullRomInterpolate1DArray(out, p0, p1, p2, p3, t, t2, t3) { var len = p0.length; for (var i = 0; i < len; i++) { out[i] = catmullRomInterpolate(p0[i], p1[i], p2[i], p3[i], t, t2, t3); } } function catmullRomInterpolate2DArray(out, p0, p1, p2, p3, t, t2, t3) { var len = p0.length; var len2 = p0[0].length; for (var i = 0; i < len; i++) { if (!out[i]) { out[1] = []; } for (var j = 0; j < len2; j++) { out[i][j] = catmullRomInterpolate(p0[i][j], p1[i][j], p2[i][j], p3[i][j], t, t2, t3); } } } function cloneValue(value) { if (isArrayLike(value)) { var len = value.length; if (isArrayLike(value[0])) { var ret = []; for (var i = 0; i < len; i++) { ret.push(arraySlice.call(value[i])); } return ret; } return arraySlice.call(value); } return value; } function rgba2String(rgba) { rgba[0] = Math.floor(rgba[0]); rgba[1] = Math.floor(rgba[1]); rgba[2] = Math.floor(rgba[2]); return 'rgba(' + rgba.join(',') + ')'; } function guessArrayDim(value) { return isArrayLike(value && value[0]) ? 2 : 1; } var tmpRgba = [0, 0, 0, 0]; var Track = (function () { function Track(propName) { this.keyframes = []; this.maxTime = 0; this.arrDim = 0; this.interpolable = true; this._needsSort = false; this._isAllValueEqual = true; this._lastFrame = 0; this._lastFramePercent = 0; this.propName = propName; } Track.prototype.isFinished = function () { return this._finished; }; Track.prototype.setFinished = function () { this._finished = true; if (this._additiveTrack) { this._additiveTrack.setFinished(); } }; Track.prototype.needsAnimate = function () { return !this._isAllValueEqual && this.keyframes.length >= 2 && this.interpolable; }; Track.prototype.getAdditiveTrack = function () { return this._additiveTrack; }; Track.prototype.addKeyframe = function (time, value) { if (time >= this.maxTime) { this.maxTime = time; } else { this._needsSort = true; } var keyframes = this.keyframes; var len = keyframes.length; if (this.interpolable) { if (isArrayLike(value)) { var arrayDim = guessArrayDim(value); if (len > 0 && this.arrDim !== arrayDim) { this.interpolable = false; return; } if (arrayDim === 1 && typeof value[0] !== 'number' || arrayDim === 2 && typeof value[0][0] !== 'number') { this.interpolable = false; return; } if (len > 0) { var lastFrame = keyframes[len - 1]; if (this._isAllValueEqual) { if (arrayDim === 1) { if (!is1DArraySame(value, lastFrame.value)) { this._isAllValueEqual = false; } } else { this._isAllValueEqual = false; } } } this.arrDim = arrayDim; } else { if (this.arrDim > 0) { this.interpolable = false; return; } if (typeof value === 'string') { var colorArray = parse(value); if (colorArray) { value = colorArray; this.isValueColor = true; } else { this.interpolable = false; } } else if (typeof value !== 'number' || isNaN(value)) { this.interpolable = false; return; } if (this._isAllValueEqual && len > 0) { var lastFrame = keyframes[len - 1]; if (this.isValueColor && !is1DArraySame(lastFrame.value, value)) { this._isAllValueEqual = false; } else if (lastFrame.value !== value) { this._isAllValueEqual = false; } } } } var kf = { time: time, value: value, percent: 0 }; this.keyframes.push(kf); return kf; }; Track.prototype.prepare = function (additiveTrack) { var kfs = this.keyframes; if (this._needsSort) { kfs.sort(function (a, b) { return a.time - b.time; }); } var arrDim = this.arrDim; var kfsLen = kfs.length; var lastKf = kfs[kfsLen - 1]; for (var i = 0; i < kfsLen; i++) { kfs[i].percent = kfs[i].time / this.maxTime; if (arrDim > 0 && i !== kfsLen - 1) { fillArray(kfs[i].value, lastKf.value, arrDim); } } if (additiveTrack && this.needsAnimate() && additiveTrack.needsAnimate() && arrDim === additiveTrack.arrDim && this.isValueColor === additiveTrack.isValueColor && !additiveTrack._finished) { this._additiveTrack = additiveTrack; var startValue = kfs[0].value; for (var i = 0; i < kfsLen; i++) { if (arrDim === 0) { if (this.isValueColor) { kfs[i].additiveValue = add1DArray([], kfs[i].value, startValue, -1); } else { kfs[i].additiveValue = kfs[i].value - startValue; } } else if (arrDim === 1) { kfs[i].additiveValue = add1DArray([], kfs[i].value, startValue, -1); } else if (arrDim === 2) { kfs[i].additiveValue = add2DArray([], kfs[i].value, startValue, -1); } } } }; Track.prototype.step = function (target, percent) { if (this._finished) { return; } if (this._additiveTrack && this._additiveTrack._finished) { this._additiveTrack = null; } var isAdditive = this._additiveTrack != null; var valueKey = isAdditive ? 'additiveValue' : 'value'; var keyframes = this.keyframes; var kfsNum = this.keyframes.length; var propName = this.propName; var arrDim = this.arrDim; var isValueColor = this.isValueColor; var frameIdx; if (percent < 0) { frameIdx = 0; } else if (percent < this._lastFramePercent) { var start = Math.min(this._lastFrame + 1, kfsNum - 1); for (frameIdx = start; frameIdx >= 0; frameIdx--) { if (keyframes[frameIdx].percent <= percent) { break; } } frameIdx = Math.min(frameIdx, kfsNum - 2); } else { for (frameIdx = this._lastFrame; frameIdx < kfsNum; frameIdx++) { if (keyframes[frameIdx].percent > percent) { break; } } frameIdx = Math.min(frameIdx - 1, kfsNum - 2); } var nextFrame = keyframes[frameIdx + 1]; var frame = keyframes[frameIdx]; if (!(frame && nextFrame)) { return; } this._lastFrame = frameIdx; this._lastFramePercent = percent; var range = (nextFrame.percent - frame.percent); if (range === 0) { return; } var w = (percent - frame.percent) / range; var targetArr = isAdditive ? this._additiveValue : (isValueColor ? tmpRgba : target[propName]); if ((arrDim > 0 || isValueColor) && !targetArr) { targetArr = this._additiveValue = []; } if (this.useSpline) { var p1 = keyframes[frameIdx][valueKey]; var p0 = keyframes[frameIdx === 0 ? frameIdx : frameIdx - 1][valueKey]; var p2 = keyframes[frameIdx > kfsNum - 2 ? kfsNum - 1 : frameIdx + 1][valueKey]; var p3 = keyframes[frameIdx > kfsNum - 3 ? kfsNum - 1 : frameIdx + 2][valueKey]; if (arrDim > 0) { arrDim === 1 ? catmullRomInterpolate1DArray(targetArr, p0, p1, p2, p3, w, w * w, w * w * w) : catmullRomInterpolate2DArray(targetArr, p0, p1, p2, p3, w, w * w, w * w * w); } else if (isValueColor) { catmullRomInterpolate1DArray(targetArr, p0, p1, p2, p3, w, w * w, w * w * w); if (!isAdditive) { target[propName] = rgba2String(targetArr); } } else { var value = void 0; if (!this.interpolable) { value = p2; } else { value = catmullRomInterpolate(p0, p1, p2, p3, w, w * w, w * w * w); } if (isAdditive) { this._additiveValue = value; } else { target[propName] = value; } } } else { if (arrDim > 0) { arrDim === 1 ? interpolate1DArray(targetArr, frame[valueKey], nextFrame[valueKey], w) : interpolate2DArray(targetArr, frame[valueKey], nextFrame[valueKey], w); } else if (isValueColor) { interpolate1DArray(targetArr, frame[valueKey], nextFrame[valueKey], w); if (!isAdditive) { target[propName] = rgba2String(targetArr); } } else { var value = void 0; if (!this.interpolable) { value = step(frame[valueKey], nextFrame[valueKey], w); } else { value = interpolateNumber(frame[valueKey], nextFrame[valueKey], w); } if (isAdditive) { this._additiveValue = value; } else { target[propName] = value; } } } if (isAdditive) { this._addToTarget(target); } }; Track.prototype._addToTarget = function (target) { var arrDim = this.arrDim; var propName = this.propName; var additiveValue = this._additiveValue; if (arrDim === 0) { if (this.isValueColor) { parse(target[propName], tmpRgba); add1DArray(tmpRgba, tmpRgba, additiveValue, 1); target[propName] = rgba2String(tmpRgba); } else { target[propName] = target[propName] + additiveValue; } } else if (arrDim === 1) { add1DArray(target[propName], target[propName], additiveValue, 1); } else if (arrDim === 2) { add2DArray(target[propName], target[propName], additiveValue, 1); } }; return Track; }()); var Animator = (function () { function Animator(target, loop, additiveTo) { this._tracks = {}; this._trackKeys = []; this._delay = 0; this._maxTime = 0; this._paused = false; this._started = 0; this._clip = null; this._target = target; this._loop = loop; if (loop && additiveTo) { logError('Can\' use additive animation on looped animation.'); return; } this._additiveAnimators = additiveTo; } Animator.prototype.getTarget = function () { return this._target; }; Animator.prototype.changeTarget = function (target) { this._target = target; }; Animator.prototype.when = function (time, props) { return this.whenWithKeys(time, props, keys(props)); }; Animator.prototype.whenWithKeys = function (time, props, propNames) { var tracks = this._tracks; for (var i = 0; i < propNames.length; i++) { var propName = propNames[i]; var track = tracks[propName]; if (!track) { track = tracks[propName] = new Track(propName); var initialValue = void 0; var additiveTrack = this._getAdditiveTrack(propName); if (additiveTrack) { var lastFinalKf = additiveTrack.keyframes[additiveTrack.keyframes.length - 1]; initialValue = lastFinalKf && lastFinalKf.value; if (additiveTrack.isValueColor && initialValue) { initialValue = rgba2String(initialValue); } } else { initialValue = this._target[propName]; } if (initialValue == null) { continue; } if (time !== 0) { track.addKeyframe(0, cloneValue(initialValue)); } this._trackKeys.push(propName); } track.addKeyframe(time, cloneValue(props[propName])); } this._maxTime = Math.max(this._maxTime, time); return this; }; Animator.prototype.pause = function () { this._clip.pause(); this._paused = true; }; Animator.prototype.resume = function () { this._clip.resume(); this._paused = false; }; Animator.prototype.isPaused = function () { return !!this._paused; }; Animator.prototype._doneCallback = function () { this._setTracksFinished(); this._clip = null; var doneList = this._doneList; if (doneList) { var len = doneList.length; for (var i = 0; i < len; i++) { doneList[i].call(this); } } }; Animator.prototype._abortedCallback = function () { this._setTracksFinished(); var animation = this.animation; var abortedList = this._abortedList; if (animation) { animation.removeClip(this._clip); } this._clip = null; if (abortedList) { for (var i = 0; i < abortedList.length; i++) { abortedList[i].call(this); } } }; Animator.prototype._setTracksFinished = function () { var tracks = this._tracks; var tracksKeys = this._trackKeys; for (var i = 0; i < tracksKeys.length; i++) { tracks[tracksKeys[i]].setFinished(); } }; Animator.prototype._getAdditiveTrack = function (trackName) { var additiveTrack; var additiveAnimators = this._additiveAnimators; if (additiveAnimators) { for (var i = 0; i < additiveAnimators.length; i++) { var track = additiveAnimators[i].getTrack(trackName); if (track) { additiveTrack = track; } } } return additiveTrack; }; Animator.prototype.start = function (easing, forceAnimate) { if (this._started > 0) { return; } this._started = 1; var self = this; var tracks = []; for (var i = 0; i < this._trackKeys.length; i++) { var propName = this._trackKeys[i]; var track = this._tracks[propName]; var additiveTrack = this._getAdditiveTrack(propName); var kfs = track.keyframes; track.prepare(additiveTrack); if (track.needsAnimate()) { tracks.push(track); } else if (!track.interpolable) { var lastKf = kfs[kfs.length - 1]; if (lastKf) { self._target[track.propName] = lastKf.value; } } } if (tracks.length || forceAnimate) { var clip = new Clip({ life: this._maxTime, loop: this._loop, delay: this._delay, onframe: function (percent) { self._started = 2; var additiveAnimators = self._additiveAnimators; if (additiveAnimators) { var stillHasAdditiveAnimator = false; for (var i = 0; i < additiveAnimators.length; i++) { if (additiveAnimators[i]._clip) { stillHasAdditiveAnimator = true; break; } } if (!stillHasAdditiveAnimator) { self._additiveAnimators = null; } } for (var i = 0; i < tracks.length; i++) { tracks[i].step(self._target, percent); } var onframeList = self._onframeList; if (onframeList) { for (var i = 0; i < onframeList.length; i++) { onframeList[i](self._target, percent); } } }, ondestroy: function () { self._doneCallback(); } }); this._clip = clip; if (this.animation) { this.animation.addClip(clip); } if (easing && easing !== 'spline') { clip.easing = easing; } } else { this._doneCallback(); } return this; }; Animator.prototype.stop = function (forwardToLast) { if (!this._clip) { return; } var clip = this._clip; if (forwardToLast) { clip.onframe(1); } this._abortedCallback(); }; Animator.prototype.delay = function (time) { this._delay = time; return this; }; Animator.prototype.during = function (cb) { if (cb) { if (!this._onframeList) { this._onframeList = []; } this._onframeList.push(cb); } return this; }; Animator.prototype.done = function (cb) { if (cb) { if (!this._doneList) { this._doneList = []; } this._doneList.push(cb); } return this; }; Animator.prototype.aborted = function (cb) { if (cb) { if (!this._abortedList) { this._abortedList = []; } this._abortedList.push(cb); } return this; }; Animator.prototype.getClip = function () { return this._clip; }; Animator.prototype.getTrack = function (propName) { return this._tracks[propName]; }; Animator.prototype.stopTracks = function (propNames, forwardToLast) { if (!propNames.length || !this._clip) { return true; } var tracks = this._tracks; var tracksKeys = this._trackKeys; for (var i = 0; i < propNames.length; i++) { var track = tracks[propNames[i]]; if (track) { if (forwardToLast) { track.step(this._target, 1); } else if (this._started === 1) { track.step(this._target, 0); } track.setFinished(); } } var allAborted = true; for (var i = 0; i < tracksKeys.length; i++) { if (!tracks[tracksKeys[i]].isFinished()) { allAborted = false; break; } } if (allAborted) { this._abortedCallback(); } return allAborted; }; Animator.prototype.saveFinalToTarget = function (target, trackKeys) { if (!target) { return; } trackKeys = trackKeys || this._trackKeys; for (var i = 0; i < trackKeys.length; i++) { var propName = trackKeys[i]; var track = this._tracks[propName]; if (!track || track.isFinished()) { continue; } var kfs = track.keyframes; var lastKf = kfs[kfs.length - 1]; if (lastKf) { var val = cloneValue(lastKf.value); if (track.isValueColor) { val = rgba2String(val); } target[propName] = val; } } }; Animator.prototype.__changeFinalValue = function (finalProps, trackKeys) { trackKeys = trackKeys || keys(finalProps); for (var i = 0; i < trackKeys.length; i++) { var propName = trackKeys[i]; var track = this._tracks[propName]; if (!track) { continue; } var kfs = track.keyframes; if (kfs.length > 1) { var lastKf = kfs.pop(); track.addKeyframe(lastKf.time, finalProps[propName]); track.prepare(track.getAdditiveTrack()); } } }; return Animator; }()); var Point = (function () { function Point(x, y) { this.x = x || 0; this.y = y || 0; } Point.prototype.copy = function (other) { this.x = other.x; this.y = other.y; return this; }; Point.prototype.clone = function () { return new Point(this.x, this.y); }; Point.prototype.set = function (x, y) { this.x = x; this.y = y; return this; }; Point.prototype.equal = function (other) { return other.x === this.x && other.y === this.y; }; Point.prototype.add = function (other) { this.x += other.x; this.y += other.y; return this; }; Point.prototype.scale = function (scalar) { this.x *= scalar; this.y *= scalar; }; Point.prototype.scaleAndAdd = function (other, scalar) { this.x += other.x * scalar; this.y += other.y * scalar; }; Point.prototype.sub = function (other) { this.x -= other.x; this.y -= other.y; return this; }; Point.prototype.dot = function (other) { return this.x * other.x + this.y * other.y; }; Point.prototype.len = function () { return Math.sqrt(this.x * this.x + this.y * this.y); }; Point.prototype.lenSquare = function () { return this.x * this.x + this.y * this.y; }; Point.prototype.normalize = function () { var len = this.len(); this.x /= len; this.y /= len; return this; }; Point.prototype.distance = function (other) { var dx = this.x - other.x; var dy = this.y - other.y; return Math.sqrt(dx * dx + dy * dy); }; Point.prototype.distanceSquare = function (other) { var dx = this.x - other.x; var dy = this.y - other.y; return dx * dx + dy * dy; }; Point.prototype.negate = function () { this.x = -this.x; this.y = -this.y; return this; }; Point.prototype.transform = function (m) { if (!m) { return; } var x = this.x; var y = this.y; this.x = m[0] * x + m[2] * y + m[4]; this.y = m[1] * x + m[3] * y + m[5]; return this; }; Point.prototype.toArray = function (out) { out[0] = this.x; out[1] = this.y; return out; }; Point.prototype.fromArray = function (input) { this.x = input[0]; this.y = input[1]; }; Point.set = function (p, x, y) { p.x = x; p.y = y; }; Point.copy = function (p, p2) { p.x = p2.x; p.y = p2.y; }; Point.len = function (p) { return Math.sqrt(p.x * p.x + p.y * p.y); }; Point.lenSquare = function (p) { return p.x * p.x + p.y * p.y; }; Point.dot = function (p0, p1) { return p0.x * p1.x + p0.y * p1.y; }; Point.add = function (out, p0, p1) { out.x = p0.x + p1.x; out.y = p0.y + p1.y; }; Point.sub = function (out, p0, p1) { out.x = p0.x - p1.x; out.y = p0.y - p1.y; }; Point.scale = function (out, p0, scalar) { out.x = p0.x * scalar; out.y = p0.y * scalar; }; Point.scaleAndAdd = function (out, p0, p1, scalar) { out.x = p0.x + p1.x * scalar; out.y = p0.y + p1.y * scalar; }; Point.lerp = function (out, p0, p1, t) { var onet = 1 - t; out.x = onet * p0.x + t * p1.x; out.y = onet * p0.y + t * p1.y; }; return Point; }()); var mathMin = Math.min; var mathMax = Math.max; var lt = new Point(); var rb = new Point(); var lb = new Point(); var rt = new Point(); var minTv = new Point(); var maxTv = new Point(); var BoundingRect = (function () { function BoundingRect(x, y, width, height) { if (width < 0 && isFinite(width)) { x = x + width; width = -width; } if (height < 0 && isFinite(height)) { y = y + height; height = -height; } this.x = x; this.y = y; this.width = width; this.height = height; } BoundingRect.prototype.union = function (other) { var x = mathMin(other.x, this.x); var y = mathMin(other.y, this.y); if (isFinite(this.x) && isFinite(this.width)) { this.width = mathMax(other.x + other.width, this.x + this.width) - x; } else { this.width = other.width; } if (isFinite(this.y) && isFinite(this.height)) { this.height = mathMax(other.y + other.height, this.y + this.height) - y; } else { this.height = other.height; } this.x = x; this.y = y; }; BoundingRect.prototype.applyTransform = function (m) { BoundingRect.applyTransform(this, this, m); }; BoundingRect.prototype.calculateTransform = function (b) { var a = this; var sx = b.width / a.width; var sy = b.height / a.height; var m = create$1(); translate(m, m, [-a.x, -a.y]); scale$1(m, m, [sx, sy]); translate(m, m, [b.x, b.y]); return m; }; BoundingRect.prototype.intersect = function (b, mtv) { if (!b) { return false; } if (!(b instanceof BoundingRect)) { b = BoundingRect.create(b); } var a = this; var ax0 = a.x; var ax1 = a.x + a.width; var ay0 = a.y; var ay1 = a.y + a.height; var bx0 = b.x; var bx1 = b.x + b.width; var by0 = b.y; var by1 = b.y + b.height; var overlap = !(ax1 < bx0 || bx1 < ax0 || ay1 < by0 || by1 < ay0); if (mtv) { var dMin = Infinity; var dMax = 0; var d0 = Math.abs(ax1 - bx0); var d1 = Math.abs(bx1 - ax0); var d2 = Math.abs(ay1 - by0); var d3 = Math.abs(by1 - ay0); var dx = Math.min(d0, d1); var dy = Math.min(d2, d3); if (ax1 < bx0 || bx1 < ax0) { if (dx > dMax) { dMax = dx; if (d0 < d1) { Point.set(maxTv, -d0, 0); } else { Point.set(maxTv, d1, 0); } } } else { if (dx < dMin) { dMin = dx; if (d0 < d1) { Point.set(minTv, d0, 0); } else { Point.set(minTv, -d1, 0); } } } if (ay1 < by0 || by1 < ay0) { if (dy > dMax) { dMax = dy; if (d2 < d3) { Point.set(maxTv, 0, -d2); } else { Point.set(maxTv, 0, d3); } } } else { if (dx < dMin) { dMin = dx; if (d2 < d3) { Point.set(minTv, 0, d2); } else { Point.set(minTv, 0, -d3); } } } } if (mtv) { Point.copy(mtv, overlap ? minTv : maxTv); } return overlap; }; BoundingRect.prototype.contain = function (x, y) { var rect = this; return x >= rect.x && x <= (rect.x + rect.width) && y >= rect.y && y <= (rect.y + rect.height); }; BoundingRect.prototype.clone = function () { return new BoundingRect(this.x, this.y, this.width, this.height); }; BoundingRect.prototype.copy = function (other) { BoundingRect.copy(this, other); }; BoundingRect.prototype.plain = function () { return { x: this.x, y: this.y, width: this.width, height: this.height }; }; BoundingRect.prototype.isFinite = function () { return isFinite(this.x) && isFinite(this.y) && isFinite(this.width) && isFinite(this.height); }; BoundingRect.prototype.isZero = function () { return this.width === 0 || this.height === 0; }; BoundingRect.create = function (rect) { return new BoundingRect(rect.x, rect.y, rect.width, rect.height); }; BoundingRect.copy = function (target, source) { target.x = source.x; target.y = source.y; target.width = source.width; target.height = source.height; }; BoundingRect.applyTransform = function (target, source, m) { if (!m) { if (target !== source) { BoundingRect.copy(target, source); } return; } if (m[1] < 1e-5 && m[1] > -1e-5 && m[2] < 1e-5 && m[2] > -1e-5) { var sx = m[0]; var sy = m[3]; var tx = m[4]; var ty = m[5]; target.x = source.x * sx + tx; target.y = source.y * sy + ty; target.width = source.width * sx; target.height = source.height * sy; if (target.width < 0) { target.x += target.width; target.width = -target.width; } if (target.height < 0) { target.y += target.height; target.height = -target.height; } return; } lt.x = lb.x = source.x; lt.y = rt.y = source.y; rb.x = rt.x = source.x + source.width; rb.y = lb.y = source.y + source.height; lt.transform(m); rt.transform(m); rb.transform(m); lb.transform(m); target.x = mathMin(lt.x, rb.x, lb.x, rt.x); target.y = mathMin(lt.y, rb.y, lb.y, rt.y); var maxX = mathMax(lt.x, rb.x, lb.x, rt.x); var maxY = mathMax(lt.y, rb.y, lb.y, rt.y); target.width = maxX - target.x; target.height = maxY - target.y; }; return BoundingRect; }()); var textWidthCache = {}; var DEFAULT_FONT = '12px sans-serif'; var _ctx; var _cachedFont; function defaultMeasureText(text, font) { if (!_ctx) { _ctx = createCanvas().getContext('2d'); } if (_cachedFont !== font) { _cachedFont = _ctx.font = font || DEFAULT_FONT; } return _ctx.measureText(text); } var methods$1 = { measureText: defaultMeasureText }; function getWidth(text, font) { font = font || DEFAULT_FONT; var cacheOfFont = textWidthCache[font]; if (!cacheOfFont) { cacheOfFont = textWidthCache[font] = new LRU(500); } var width = cacheOfFont.get(text); if (width == null) { width = methods$1.measureText(text, font).width; cacheOfFont.put(text, width); } return width; } function innerGetBoundingRect(text, font, textAlign, textBaseline) { var width = getWidth(text, font); var height = getLineHeight(font); var x = adjustTextX(0, width, textAlign); var y = adjustTextY(0, height, textBaseline); var rect = new BoundingRect(x, y, width, height); return rect; } function getBoundingRect(text, font, textAlign, textBaseline) { var textLines = ((text || '') + '').split('\n'); var len = textLines.length; if (len === 1) { return innerGetBoundingRect(textLines[0], font, textAlign, textBaseline); } else { var uniondRect = new BoundingRect(0, 0, 0, 0); for (var i = 0; i < textLines.length; i++) { var rect = innerGetBoundingRect(textLines[i], font, textAlign, textBaseline); i === 0 ? uniondRect.copy(rect) : uniondRect.union(rect); } return uniondRect; } } function adjustTextX(x, width, textAlign) { if (textAlign === 'right') { x -= width; } else if (textAlign === 'center') { x -= width / 2; } return x; } function adjustTextY(y, height, verticalAlign) { if (verticalAlign === 'middle') { y -= height / 2; } else if (verticalAlign === 'bottom') { y -= height; } return y; } function getLineHeight(font) { return getWidth('国', font); } function parsePercent(value, maxValue) { if (typeof value === 'string') { if (value.lastIndexOf('%') >= 0) { return parseFloat(value) / 100 * maxValue; } return parseFloat(value); } return value; } function calculateTextPosition(out, opts, rect) { var textPosition = opts.position || 'inside'; var distance = opts.distance != null ? opts.distance : 5; var height = rect.height; var width = rect.width; var halfHeight = height / 2; var x = rect.x; var y = rect.y; var textAlign = 'left'; var textVerticalAlign = 'top'; if (textPosition instanceof Array) { x += parsePercent(textPosition[0], rect.width); y += parsePercent(textPosition[1], rect.height); textAlign = null; textVerticalAlign = null; } else { switch (textPosition) { case 'left': x -= distance; y += halfHeight; textAlign = 'right'; textVerticalAlign = 'middle'; break; case 'right': x += distance + width; y += halfHeight; textVerticalAlign = 'middle'; break; case 'top': x += width / 2; y -= distance; textAlign = 'center'; textVerticalAlign = 'bottom'; break; case 'bottom': x += width / 2; y += height + distance; textAlign = 'center'; break; case 'inside': x += width / 2; y += halfHeight; textAlign = 'center'; textVerticalAlign = 'middle'; break; case 'insideLeft': x += distance; y += halfHeight; textVerticalAlign = 'middle'; break; case 'insideRight': x += width - distance; y += halfHeight; textAlign = 'right'; textVerticalAlign = 'middle'; break; case 'insideTop': x += width / 2; y += distance; textAlign = 'center'; break; case 'insideBottom': x += width / 2; y += height - distance; textAlign = 'center'; textVerticalAlign = 'bottom'; break; case 'insideTopLeft': x += distance; y += distance; break; case 'insideTopRight': x += width - distance; y += distance; textAlign = 'right'; break; case 'insideBottomLeft': x += distance; y += height - distance; textVerticalAlign = 'bottom'; break; case 'insideBottomRight': x += width - distance; y += height - distance; textAlign = 'right'; textVerticalAlign = 'bottom'; break; } } out = out || {}; out.x = x; out.y = y; out.align = textAlign; out.verticalAlign = textVerticalAlign; return out; } var dpr = 1; if (typeof window !== 'undefined') { dpr = Math.max(window.devicePixelRatio || (window.screen && window.screen.deviceXDPI / window.screen.logicalXDPI) || 1, 1); } var devicePixelRatio = dpr; var DARK_MODE_THRESHOLD = 0.4; var DARK_LABEL_COLOR = '#333'; var LIGHT_LABEL_COLOR = '#ccc'; var LIGHTER_LABEL_COLOR = '#eee'; var PRESERVED_NORMAL_STATE = '__zr_normal__'; var PRIMARY_STATES_KEYS = ['x', 'y', 'scaleX', 'scaleY', 'originX', 'originY', 'rotation', 'ignore']; var DEFAULT_ANIMATABLE_MAP = { x: true, y: true, scaleX: true, scaleY: true, originX: true, originY: true, rotation: true, ignore: false }; var tmpTextPosCalcRes = {}; var tmpBoundingRect = new BoundingRect(0, 0, 0, 0); var Element = (function () { function Element(props) { this.id = guid(); this.animators = []; this.currentStates = []; this.states = {}; this._init(props); } Element.prototype._init = function (props) { this.attr(props); }; Element.prototype.drift = function (dx, dy, e) { switch (this.draggable) { case 'horizontal': dy = 0; break; case 'vertical': dx = 0; break; } var m = this.transform; if (!m) { m = this.transform = [1, 0, 0, 1, 0, 0]; } m[4] += dx; m[5] += dy; this.decomposeTransform(); this.markRedraw(); }; Element.prototype.beforeUpdate = function () { }; Element.prototype.afterUpdate = function () { }; Element.prototype.update = function () { this.updateTransform(); if (this.__dirty) { this.updateInnerText(); } }; Element.prototype.updateInnerText = function (forceUpdate) { var textEl = this._textContent; if (textEl && (!textEl.ignore || forceUpdate)) { if (!this.textConfig) { this.textConfig = {}; } var textConfig = this.textConfig; var isLocal = textConfig.local; var attachedTransform = textEl.attachedTransform; var textAlign = void 0; var textVerticalAlign = void 0; var textStyleChanged = false; if (isLocal) { attachedTransform.parent = this; } else { attachedTransform.parent = null; } var innerOrigin = false; attachedTransform.x = textEl.x; attachedTransform.y = textEl.y; attachedTransform.originX = textEl.originX; attachedTransform.originY = textEl.originY; attachedTransform.rotation = textEl.rotation; attachedTransform.scaleX = textEl.scaleX; attachedTransform.scaleY = textEl.scaleY; if (textConfig.position != null) { var layoutRect = tmpBoundingRect; if (textConfig.layoutRect) { layoutRect.copy(textConfig.layoutRect); } else { layoutRect.copy(this.getBoundingRect()); } if (!isLocal) { layoutRect.applyTransform(this.transform); } if (this.calculateTextPosition) { this.calculateTextPosition(tmpTextPosCalcRes, textConfig, layoutRect); } else { calculateTextPosition(tmpTextPosCalcRes, textConfig, layoutRect); } attachedTransform.x = tmpTextPosCalcRes.x; attachedTransform.y = tmpTextPosCalcRes.y; textAlign = tmpTextPosCalcRes.align; textVerticalAlign = tmpTextPosCalcRes.verticalAlign; var textOrigin = textConfig.origin; if (textOrigin && textConfig.rotation != null) { var relOriginX = void 0; var relOriginY = void 0; if (textOrigin === 'center') { relOriginX = layoutRect.width * 0.5; relOriginY = layoutRect.height * 0.5; } else { relOriginX = parsePercent(textOrigin[0], layoutRect.width); relOriginY = parsePercent(textOrigin[1], layoutRect.height); } innerOrigin = true; attachedTransform.originX = -attachedTransform.x + relOriginX + (isLocal ? 0 : layoutRect.x); attachedTransform.originY = -attachedTransform.y + relOriginY + (isLocal ? 0 : layoutRect.y); } } if (textConfig.rotation != null) { attachedTransform.rotation = textConfig.rotation; } var textOffset = textConfig.offset; if (textOffset) { attachedTransform.x += textOffset[0]; attachedTransform.y += textOffset[1]; if (!innerOrigin) { attachedTransform.originX = -textOffset[0]; attachedTransform.originY = -textOffset[1]; } } var isInside = textConfig.inside == null ? (typeof textConfig.position === 'string' && textConfig.position.indexOf('inside') >= 0) : textConfig.inside; var innerTextDefaultStyle = this._innerTextDefaultStyle || (this._innerTextDefaultStyle = {}); var textFill = void 0; var textStroke = void 0; var autoStroke = void 0; if (isInside && this.canBeInsideText()) { textFill = textConfig.insideFill; textStroke = textConfig.insideStroke; if (textFill == null || textFill === 'auto') { textFill = this.getInsideTextFill(); } if (textStroke == null || textStroke === 'auto') { textStroke = this.getInsideTextStroke(textFill); autoStroke = true; } } else { textFill = textConfig.outsideFill; textStroke = textConfig.outsideStroke; if (textFill == null || textFill === 'auto') { textFill = this.getOutsideFill(); } if (textStroke == null || textStroke === 'auto') { textStroke = this.getOutsideStroke(textFill); autoStroke = true; } } textFill = textFill || '#000'; if (textFill !== innerTextDefaultStyle.fill || textStroke !== innerTextDefaultStyle.stroke || autoStroke !== innerTextDefaultStyle.autoStroke || textAlign !== innerTextDefaultStyle.align || textVerticalAlign !== innerTextDefaultStyle.verticalAlign) { textStyleChanged = true; innerTextDefaultStyle.fill = textFill; innerTextDefaultStyle.stroke = textStroke; innerTextDefaultStyle.autoStroke = autoStroke; innerTextDefaultStyle.align = textAlign; innerTextDefaultStyle.verticalAlign = textVerticalAlign; textEl.setDefaultTextStyle(innerTextDefaultStyle); } if (textStyleChanged) { textEl.dirtyStyle(); } textEl.markRedraw(); } }; Element.prototype.canBeInsideText = function () { return true; }; Element.prototype.getInsideTextFill = function () { return '#fff'; }; Element.prototype.getInsideTextStroke = function (textFill) { return '#000'; }; Element.prototype.getOutsideFill = function () { return this.__zr && this.__zr.isDarkMode() ? LIGHT_LABEL_COLOR : DARK_LABEL_COLOR; }; Element.prototype.getOutsideStroke = function (textFill) { var backgroundColor = this.__zr && this.__zr.getBackgroundColor(); var colorArr = typeof backgroundColor === 'string' && parse(backgroundColor); if (!colorArr) { colorArr = [255, 255, 255, 1]; } var alpha = colorArr[3]; var isDark = this.__zr.isDarkMode(); for (var i = 0; i < 3; i++) { colorArr[i] = colorArr[i] * alpha + (isDark ? 0 : 255) * (1 - alpha); } colorArr[3] = 1; return stringify(colorArr, 'rgba'); }; Element.prototype.traverse = function (cb, context) { }; Element.prototype.attrKV = function (key, value) { if (key === 'textConfig') { this.setTextConfig(value); } else if (key === 'textContent') { this.setTextContent(value); } else if (key === 'clipPath') { this.setClipPath(value); } else if (key === 'extra') { this.extra = this.extra || {}; extend(this.extra, value); } else { this[key] = value; } }; Element.prototype.hide = function () { this.ignore = true; this.markRedraw(); }; Element.prototype.show = function () { this.ignore = false; this.markRedraw(); }; Element.prototype.attr = function (keyOrObj, value) { if (typeof keyOrObj === 'string') { this.attrKV(keyOrObj, value); } else if (isObject(keyOrObj)) { var obj = keyOrObj; var keysArr = keys(obj); for (var i = 0; i < keysArr.length; i++) { var key = keysArr[i]; this.attrKV(key, keyOrObj[key]); } } this.markRedraw(); return this; }; Element.prototype.saveCurrentToNormalState = function (toState) { this._innerSaveToNormal(toState); var normalState = this._normalState; for (var i = 0; i < this.animators.length; i++) { var animator = this.animators[i]; var fromStateTransition = animator.__fromStateTransition; if (fromStateTransition && fromStateTransition !== PRESERVED_NORMAL_STATE) { continue; } var targetName = animator.targetName; var target = targetName ? normalState[targetName] : normalState; animator.saveFinalToTarget(target); } }; Element.prototype._innerSaveToNormal = function (toState) { var normalState = this._normalState; if (!normalState) { normalState = this._normalState = {}; } if (toState.textConfig && !normalState.textConfig) { normalState.textConfig = this.textConfig; } this._savePrimaryToNormal(toState, normalState, PRIMARY_STATES_KEYS); }; Element.prototype._savePrimaryToNormal = function (toState, normalState, primaryKeys) { for (var i = 0; i < primaryKeys.length; i++) { var key = primaryKeys[i]; if (toState[key] != null && !(key in normalState)) { normalState[key] = this[key]; } } }; Element.prototype.hasState = function () { return this.currentStates.length > 0; }; Element.prototype.getState = function (name) { return this.states[name]; }; Element.prototype.ensureState = function (name) { var states = this.states; if (!states[name]) { states[name] = {}; } return states[name]; }; Element.prototype.clearStates = function (noAnimation) { this.useState(PRESERVED_NORMAL_STATE, false, noAnimation); }; Element.prototype.useState = function (stateName, keepCurrentStates, noAnimation) { var toNormalState = stateName === PRESERVED_NORMAL_STATE; var hasStates = this.hasState(); if (!hasStates && toNormalState) { return; } var currentStates = this.currentStates; var animationCfg = this.stateTransition; if (indexOf(currentStates, stateName) >= 0 && (keepCurrentStates || currentStates.length === 1)) { return; } var state; if (this.stateProxy && !toNormalState) { state = this.stateProxy(stateName); } if (!state) { state = (this.states && this.states[stateName]); } if (!state && !toNormalState) { logError("State " + stateName + " not exists."); return; } if (!toNormalState) { this.saveCurrentToNormalState(state); } var useHoverLayer = !!(state && state.hoverLayer); if (useHoverLayer) { this._toggleHoverLayerFlag(true); } this._applyStateObj(stateName, state, this._normalState, keepCurrentStates, !noAnimation && !this.__inHover && animationCfg && animationCfg.duration > 0, animationCfg); if (this._textContent) { this._textContent.useState(stateName, keepCurrentStates); } if (this._textGuide) { this._textGuide.useState(stateName, keepCurrentStates); } if (toNormalState) { this.currentStates = []; this._normalState = {}; } else { if (!keepCurrentStates) { this.currentStates = [stateName]; } else { this.currentStates.push(stateName); } } this._updateAnimationTargets(); this.markRedraw(); if (!useHoverLayer && this.__inHover) { this._toggleHoverLayerFlag(false); this.__dirty &= ~Element.REDARAW_BIT; } return state; }; Element.prototype.useStates = function (states, noAnimation) { if (!states.length) { this.clearStates(); } else { var stateObjects = []; var currentStates = this.currentStates; var len = states.length; var notChange = len === currentStates.length; if (notChange) { for (var i = 0; i < len; i++) { if (states[i] !== currentStates[i]) { notChange = false; break; } } } if (notChange) { return; } for (var i = 0; i < len; i++) { var stateName = states[i]; var stateObj = void 0; if (this.stateProxy) { stateObj = this.stateProxy(stateName, states); } if (!stateObj) { stateObj = this.states[stateName]; } if (stateObj) { stateObjects.push(stateObj); } } var useHoverLayer = !!(stateObjects[len - 1] && stateObjects[len - 1].hoverLayer); if (useHoverLayer) { this._toggleHoverLayerFlag(true); } var mergedState = this._mergeStates(stateObjects); var animationCfg = this.stateTransition; this.saveCurrentToNormalState(mergedState); this._applyStateObj(states.join(','), mergedState, this._normalState, false, !noAnimation && !this.__inHover && animationCfg && animationCfg.duration > 0, animationCfg); if (this._textContent) { this._textContent.useStates(states); } if (this._textGuide) { this._textGuide.useStates(states); } this._updateAnimationTargets(); this.currentStates = states.slice(); this.markRedraw(); if (!useHoverLayer && this.__inHover) { this._toggleHoverLayerFlag(false); this.__dirty &= ~Element.REDARAW_BIT; } } }; Element.prototype._updateAnimationTargets = function () { for (var i = 0; i < this.animators.length; i++) { var animator = this.animators[i]; if (animator.targetName) { animator.changeTarget(this[animator.targetName]); } } }; Element.prototype.removeState = function (state) { var idx = indexOf(this.currentStates, state); if (idx >= 0) { var currentStates = this.currentStates.slice(); currentStates.splice(idx, 1); this.useStates(currentStates); } }; Element.prototype.replaceState = function (oldState, newState, forceAdd) { var currentStates = this.currentStates.slice(); var idx = indexOf(currentStates, oldState); var newStateExists = indexOf(currentStates, newState) >= 0; if (idx >= 0) { if (!newStateExists) { currentStates[idx] = newState; } else { currentStates.splice(idx, 1); } } else if (forceAdd && !newStateExists) { currentStates.push(newState); } this.useStates(currentStates); }; Element.prototype.toggleState = function (state, enable) { if (enable) { this.useState(state, true); } else { this.removeState(state); } }; Element.prototype._mergeStates = function (states) { var mergedState = {}; var mergedTextConfig; for (var i = 0; i < states.length; i++) { var state = states[i]; extend(mergedState, state); if (state.textConfig) { mergedTextConfig = mergedTextConfig || {}; extend(mergedTextConfig, state.textConfig); } } if (mergedTextConfig) { mergedState.textConfig = mergedTextConfig; } return mergedState; }; Element.prototype._applyStateObj = function (stateName, state, normalState, keepCurrentStates, transition, animationCfg) { var needsRestoreToNormal = !(state && keepCurrentStates); if (state && state.textConfig) { this.textConfig = extend({}, keepCurrentStates ? this.textConfig : normalState.textConfig); extend(this.textConfig, state.textConfig); } else if (needsRestoreToNormal) { if (normalState.textConfig) { this.textConfig = normalState.textConfig; } } var transitionTarget = {}; var hasTransition = false; for (var i = 0; i < PRIMARY_STATES_KEYS.length; i++) { var key = PRIMARY_STATES_KEYS[i]; var propNeedsTransition = transition && DEFAULT_ANIMATABLE_MAP[key]; if (state && state[key] != null) { if (propNeedsTransition) { hasTransition = true; transitionTarget[key] = state[key]; } else { this[key] = state[key]; } } else if (needsRestoreToNormal) { if (normalState[key] != null) { if (propNeedsTransition) { hasTransition = true; transitionTarget[key] = normalState[key]; } else { this[key] = normalState[key]; } } } } if (!transition) { for (var i = 0; i < this.animators.length; i++) { var animator = this.animators[i]; var targetName = animator.targetName; animator.__changeFinalValue(targetName ? (state || normalState)[targetName] : (state || normalState)); } } if (hasTransition) { this._transitionState(stateName, transitionTarget, animationCfg); } }; Element.prototype._attachComponent = function (componentEl) { if (componentEl.__zr && !componentEl.__hostTarget) { throw new Error('Text element has been added to zrender.'); } if (componentEl === this) { throw new Error('Recursive component attachment.'); } var zr = this.__zr; if (zr) { componentEl.addSelfToZr(zr); } componentEl.__zr = zr; componentEl.__hostTarget = this; }; Element.prototype._detachComponent = function (componentEl) { if (componentEl.__zr) { componentEl.removeSelfFromZr(componentEl.__zr); } componentEl.__zr = null; componentEl.__hostTarget = null; }; Element.prototype.getClipPath = function () { return this._clipPath; }; Element.prototype.setClipPath = function (clipPath) { if (this._clipPath && this._clipPath !== clipPath) { this.removeClipPath(); } this._attachComponent(clipPath); this._clipPath = clipPath; this.markRedraw(); }; Element.prototype.removeClipPath = function () { var clipPath = this._clipPath; if (clipPath) { this._detachComponent(clipPath); this._clipPath = null; this.markRedraw(); } }; Element.prototype.getTextContent = function () { return this._textContent; }; Element.prototype.setTextContent = function (textEl) { var previousTextContent = this._textContent; if (previousTextContent === textEl) { return; } if (previousTextContent && previousTextContent !== textEl) { this.removeTextContent(); } if (textEl.__zr && !textEl.__hostTarget) { throw new Error('Text element has been added to zrender.'); } textEl.attachedTransform = new Transformable(); this._attachComponent(textEl); this._textContent = textEl; this.markRedraw(); }; Element.prototype.setTextConfig = function (cfg) { if (!this.textConfig) { this.textConfig = {}; } extend(this.textConfig, cfg); this.markRedraw(); }; Element.prototype.removeTextConfig = function () { this.textConfig = null; this.markRedraw(); }; Element.prototype.removeTextContent = function () { var textEl = this._textContent; if (textEl) { textEl.attachedTransform = null; this._detachComponent(textEl); this._textContent = null; this._innerTextDefaultStyle = null; this.markRedraw(); } }; Element.prototype.getTextGuideLine = function () { return this._textGuide; }; Element.prototype.setTextGuideLine = function (guideLine) { if (this._textGuide && this._textGuide !== guideLine) { this.removeTextGuideLine(); } this._attachComponent(guideLine); this._textGuide = guideLine; this.markRedraw(); }; Element.prototype.removeTextGuideLine = function () { var textGuide = this._textGuide; if (textGuide) { this._detachComponent(textGuide); this._textGuide = null; this.markRedraw(); } }; Element.prototype.markRedraw = function () { this.__dirty |= Element.REDARAW_BIT; var zr = this.__zr; if (zr) { if (this.__inHover) { zr.refreshHover(); } else { zr.refresh(); } } if (this.__hostTarget) { this.__hostTarget.markRedraw(); } }; Element.prototype.dirty = function () { this.markRedraw(); }; Element.prototype._toggleHoverLayerFlag = function (inHover) { this.__inHover = inHover; var textContent = this._textContent; var textGuide = this._textGuide; if (textContent) { textContent.__inHover = inHover; } if (textGuide) { textGuide.__inHover = inHover; } }; Element.prototype.addSelfToZr = function (zr) { this.__zr = zr; var animators = this.animators; if (animators) { for (var i = 0; i < animators.length; i++) { zr.animation.addAnimator(animators[i]); } } if (this._clipPath) { this._clipPath.addSelfToZr(zr); } if (this._textContent) { this._textContent.addSelfToZr(zr); } if (this._textGuide) { this._textGuide.addSelfToZr(zr); } }; Element.prototype.removeSelfFromZr = function (zr) { this.__zr = null; var animators = this.animators; if (animators) { for (var i = 0; i < animators.length; i++) { zr.animation.removeAnimator(animators[i]); } } if (this._clipPath) { this._clipPath.removeSelfFromZr(zr); } if (this._textContent) { this._textContent.removeSelfFromZr(zr); } if (this._textGuide) { this._textGuide.removeSelfFromZr(zr); } }; Element.prototype.animate = function (key, loop) { var target = key ? this[key] : this; if (!target) { logError('Property "' + key + '" is not existed in element ' + this.id); return; } var animator = new Animator(target, loop); this.addAnimator(animator, key); return animator; }; Element.prototype.addAnimator = function (animator, key) { var zr = this.__zr; var el = this; animator.during(function () { el.updateDuringAnimation(key); }).done(function () { var animators = el.animators; var idx = indexOf(animators, animator); if (idx >= 0) { animators.splice(idx, 1); } }); this.animators.push(animator); if (zr) { zr.animation.addAnimator(animator); } zr && zr.wakeUp(); }; Element.prototype.updateDuringAnimation = function (key) { this.markRedraw(); }; Element.prototype.stopAnimation = function (scope, forwardToLast) { var animators = this.animators; var len = animators.length; var leftAnimators = []; for (var i = 0; i < len; i++) { var animator = animators[i]; if (!scope || scope === animator.scope) { animator.stop(forwardToLast); } else { leftAnimators.push(animator); } } this.animators = leftAnimators; return this; }; Element.prototype.animateTo = function (target, cfg, animationProps) { animateTo(this, target, cfg, animationProps); }; Element.prototype.animateFrom = function (target, cfg, animationProps) { animateTo(this, target, cfg, animationProps, true); }; Element.prototype._transitionState = function (stateName, target, cfg, animationProps) { var animators = animateTo(this, target, cfg, animationProps); for (var i = 0; i < animators.length; i++) { animators[i].__fromStateTransition = stateName; } }; Element.prototype.getBoundingRect = function () { return null; }; Element.prototype.getPaintRect = function () { return null; }; Element.REDARAW_BIT = 1; Element.initDefaultProps = (function () { var elProto = Element.prototype; elProto.type = 'element'; elProto.name = ''; elProto.ignore = false; elProto.silent = false; elProto.isGroup = false; elProto.draggable = false; elProto.dragging = false; elProto.ignoreClip = false; elProto.__inHover = false; elProto.__dirty = Element.REDARAW_BIT; var logs = {}; function logDeprecatedError(key, xKey, yKey) { if (!logs[key + xKey + yKey]) { console.warn("DEPRECATED: '" + key + "' has been deprecated. use '" + xKey + "', '" + yKey + "' instead"); logs[key + xKey + yKey] = true; } } function createLegacyProperty(key, privateKey, xKey, yKey) { Object.defineProperty(elProto, key, { get: function () { logDeprecatedError(key, xKey, yKey); if (!this[privateKey]) { var pos = this[privateKey] = []; enhanceArray(this, pos); } return this[privateKey]; }, set: function (pos) { logDeprecatedError(key, xKey, yKey); this[xKey] = pos[0]; this[yKey] = pos[1]; this[privateKey] = pos; enhanceArray(this, pos); } }); function enhanceArray(self, pos) { Object.defineProperty(pos, 0, { get: function () { return self[xKey]; }, set: function (val) { self[xKey] = val; } }); Object.defineProperty(pos, 1, { get: function () { return self[yKey]; }, set: function (val) { self[yKey] = val; } }); } } if (Object.defineProperty && (!env.browser.ie || env.browser.version > 8)) { createLegacyProperty('position', '_legacyPos', 'x', 'y'); createLegacyProperty('scale', '_legacyScale', 'scaleX', 'scaleY'); createLegacyProperty('origin', '_legacyOrigin', 'originX', 'originY'); } })(); return Element; }()); mixin(Element, Eventful); mixin(Element, Transformable); function animateTo(animatable, target, cfg, animationProps, reverse) { cfg = cfg || {}; var animators = []; animateToShallow(animatable, '', animatable, target, cfg, animationProps, animators, reverse); var finishCount = animators.length; var doneHappened = false; var cfgDone = cfg.done; var cfgAborted = cfg.aborted; var doneCb = function () { doneHappened = true; finishCount--; if (finishCount <= 0) { doneHappened ? (cfgDone && cfgDone()) : (cfgAborted && cfgAborted()); } }; var abortedCb = function () { finishCount--; if (finishCount <= 0) { doneHappened ? (cfgDone && cfgDone()) : (cfgAborted && cfgAborted()); } }; if (!finishCount) { cfgDone && cfgDone(); } if (animators.length > 0 && cfg.during) { animators[0].during(function (target, percent) { cfg.during(percent); }); } for (var i = 0; i < animators.length; i++) { var animator = animators[i]; if (doneCb) { animator.done(doneCb); } if (abortedCb) { animator.aborted(abortedCb); } animator.start(cfg.easing, cfg.force); } return animators; } function copyArrShallow(source, target, len) { for (var i = 0; i < len; i++) { source[i] = target[i]; } } function is2DArray(value) { return isArrayLike(value[0]); } function copyValue(target, source, key) { if (isArrayLike(source[key])) { if (!isArrayLike(target[key])) { target[key] = []; } if (isTypedArray(source[key])) { var len = source[key].length; if (target[key].length !== len) { target[key] = new (source[key].constructor)(len); copyArrShallow(target[key], source[key], len); } } else { var sourceArr = source[key]; var targetArr = target[key]; var len0 = sourceArr.length; if (is2DArray(sourceArr)) { var len1 = sourceArr[0].length; for (var i = 0; i < len0; i++) { if (!targetArr[i]) { targetArr[i] = Array.prototype.slice.call(sourceArr[i]); } else { copyArrShallow(targetArr[i], sourceArr[i], len1); } } } else { copyArrShallow(targetArr, sourceArr, len0); } targetArr.length = sourceArr.length; } } else { target[key] = source[key]; } } function animateToShallow(animatable, topKey, source, target, cfg, animationProps, animators, reverse) { var animatableKeys = []; var changedKeys = []; var targetKeys = keys(target); var duration = cfg.duration; var delay = cfg.delay; var additive = cfg.additive; var setToFinal = cfg.setToFinal; var animateAll = !isObject(animationProps); for (var k = 0; k < targetKeys.length; k++) { var innerKey = targetKeys[k]; if (source[innerKey] != null && target[innerKey] != null && (animateAll || animationProps[innerKey])) { if (isObject(target[innerKey]) && !isArrayLike(target[innerKey])) { if (topKey) { if (!reverse) { source[innerKey] = target[innerKey]; animatable.updateDuringAnimation(topKey); } continue; } animateToShallow(animatable, innerKey, source[innerKey], target[innerKey], cfg, animationProps && animationProps[innerKey], animators, reverse); } else { animatableKeys.push(innerKey); changedKeys.push(innerKey); } } else if (!reverse) { source[innerKey] = target[innerKey]; animatable.updateDuringAnimation(topKey); changedKeys.push(innerKey); } } var keyLen = animatableKeys.length; if (keyLen > 0 || (cfg.force && !animators.length)) { var existsAnimators = animatable.animators; var existsAnimatorsOnSameTarget = []; for (var i = 0; i < existsAnimators.length; i++) { if (existsAnimators[i].targetName === topKey) { existsAnimatorsOnSameTarget.push(existsAnimators[i]); } } if (!additive && existsAnimatorsOnSameTarget.length) { for (var i = 0; i < existsAnimatorsOnSameTarget.length; i++) { var allAborted = existsAnimatorsOnSameTarget[i].stopTracks(changedKeys); if (allAborted) { var idx = indexOf(existsAnimators, existsAnimatorsOnSameTarget[i]); existsAnimators.splice(idx, 1); } } } var revertedSource = void 0; var reversedTarget = void 0; var sourceClone = void 0; if (reverse) { reversedTarget = {}; if (setToFinal) { revertedSource = {}; } for (var i = 0; i < keyLen; i++) { var innerKey = animatableKeys[i]; reversedTarget[innerKey] = source[innerKey]; if (setToFinal) { revertedSource[innerKey] = target[innerKey]; } else { source[innerKey] = target[innerKey]; } } } else if (setToFinal) { sourceClone = {}; for (var i = 0; i < keyLen; i++) { var innerKey = animatableKeys[i]; sourceClone[innerKey] = cloneValue(source[innerKey]); copyValue(source, target, innerKey); } } var animator = new Animator(source, false, additive ? existsAnimatorsOnSameTarget : null); animator.targetName = topKey; if (cfg.scope) { animator.scope = cfg.scope; } if (setToFinal && revertedSource) { animator.whenWithKeys(0, revertedSource, animatableKeys); } if (sourceClone) { animator.whenWithKeys(0, sourceClone, animatableKeys); } animator.whenWithKeys(duration == null ? 500 : duration, reverse ? reversedTarget : target, animatableKeys).delay(delay || 0); animatable.addAnimator(animator, topKey); animators.push(animator); } } var DEFAULT_MIN_MERGE = 32; var DEFAULT_MIN_GALLOPING = 7; function minRunLength(n) { var r = 0; while (n >= DEFAULT_MIN_MERGE) { r |= n & 1; n >>= 1; } return n + r; } function makeAscendingRun(array, lo, hi, compare) { var runHi = lo + 1; if (runHi === hi) { return 1; } if (compare(array[runHi++], array[lo]) < 0) { while (runHi < hi && compare(array[runHi], array[runHi - 1]) < 0) { runHi++; } reverseRun(array, lo, runHi); } else { while (runHi < hi && compare(array[runHi], array[runHi - 1]) >= 0) { runHi++; } } return runHi - lo; } function reverseRun(array, lo, hi) { hi--; while (lo < hi) { var t = array[lo]; array[lo++] = array[hi]; array[hi--] = t; } } function binaryInsertionSort(array, lo, hi, start, compare) { if (start === lo) { start++; } for (; start < hi; start++) { var pivot = array[start]; var left = lo; var right = start; var mid; while (left < right) { mid = left + right >>> 1; if (compare(pivot, array[mid]) < 0) { right = mid; } else { left = mid + 1; } } var n = start - left; switch (n) { case 3: array[left + 3] = array[left + 2]; case 2: array[left + 2] = array[left + 1]; case 1: array[left + 1] = array[left]; break; default: while (n > 0) { array[left + n] = array[left + n - 1]; n--; } } array[left] = pivot; } } function gallopLeft(value, array, start, length, hint, compare) { var lastOffset = 0; var maxOffset = 0; var offset = 1; if (compare(value, array[start + hint]) > 0) { maxOffset = length - hint; while (offset < maxOffset && compare(value, array[start + hint + offset]) > 0) { lastOffset = offset; offset = (offset << 1) + 1; if (offset <= 0) { offset = maxOffset; } } if (offset > maxOffset) { offset = maxOffset; } lastOffset += hint; offset += hint; } else { maxOffset = hint + 1; while (offset < maxOffset && compare(value, array[start + hint - offset]) <= 0) { lastOffset = offset; offset = (offset << 1) + 1; if (offset <= 0) { offset = maxOffset; } } if (offset > maxOffset) { offset = maxOffset; } var tmp = lastOffset; lastOffset = hint - offset; offset = hint - tmp; } lastOffset++; while (lastOffset < offset) { var m = lastOffset + (offset - lastOffset >>> 1); if (compare(value, array[start + m]) > 0) { lastOffset = m + 1; } else { offset = m; } } return offset; } function gallopRight(value, array, start, length, hint, compare) { var lastOffset = 0; var maxOffset = 0; var offset = 1; if (compare(value, array[start + hint]) < 0) { maxOffset = hint + 1; while (offset < maxOffset && compare(value, array[start + hint - offset]) < 0) { lastOffset = offset; offset = (offset << 1) + 1; if (offset <= 0) { offset = maxOffset; } } if (offset > maxOffset) { offset = maxOffset; } var tmp = lastOffset; lastOffset = hint - offset; offset = hint - tmp; } else { maxOffset = length - hint; while (offset < maxOffset && compare(value, array[start + hint + offset]) >= 0) { lastOffset = offset; offset = (offset << 1) + 1; if (offset <= 0) { offset = maxOffset; } } if (offset > maxOffset) { offset = maxOffset; } lastOffset += hint; offset += hint; } lastOffset++; while (lastOffset < offset) { var m = lastOffset + (offset - lastOffset >>> 1); if (compare(value, array[start + m]) < 0) { offset = m; } else { lastOffset = m + 1; } } return offset; } function TimSort(array, compare) { var minGallop = DEFAULT_MIN_GALLOPING; var length = 0; var runStart; var runLength; var stackSize = 0; length = array.length; var tmp = []; runStart = []; runLength = []; function pushRun(_runStart, _runLength) { runStart[stackSize] = _runStart; runLength[stackSize] = _runLength; stackSize += 1; } function mergeRuns() { while (stackSize > 1) { var n = stackSize - 2; if ((n >= 1 && runLength[n - 1] <= runLength[n] + runLength[n + 1]) || (n >= 2 && runLength[n - 2] <= runLength[n] + runLength[n - 1])) { if (runLength[n - 1] < runLength[n + 1]) { n--; } } else if (runLength[n] > runLength[n + 1]) { break; } mergeAt(n); } } function forceMergeRuns() { while (stackSize > 1) { var n = stackSize - 2; if (n > 0 && runLength[n - 1] < runLength[n + 1]) { n--; } mergeAt(n); } } function mergeAt(i) { var start1 = runStart[i]; var length1 = runLength[i]; var start2 = runStart[i + 1]; var length2 = runLength[i + 1]; runLength[i] = length1 + length2; if (i === stackSize - 3) { runStart[i + 1] = runStart[i + 2]; runLength[i + 1] = runLength[i + 2]; } stackSize--; var k = gallopRight(array[start2], array, start1, length1, 0, compare); start1 += k; length1 -= k; if (length1 === 0) { return; } length2 = gallopLeft(array[start1 + length1 - 1], array, start2, length2, length2 - 1, compare); if (length2 === 0) { return; } if (length1 <= length2) { mergeLow(start1, length1, start2, length2); } else { mergeHigh(start1, length1, start2, length2); } } function mergeLow(start1, length1, start2, length2) { var i = 0; for (i = 0; i < length1; i++) { tmp[i] = array[start1 + i]; } var cursor1 = 0; var cursor2 = start2; var dest = start1; array[dest++] = array[cursor2++]; if (--length2 === 0) { for (i = 0; i < length1; i++) { array[dest + i] = tmp[cursor1 + i]; } return; } if (length1 === 1) { for (i = 0; i < length2; i++) { array[dest + i] = array[cursor2 + i]; } array[dest + length2] = tmp[cursor1]; return; } var _minGallop = minGallop; var count1; var count2; var exit; while (1) { count1 = 0; count2 = 0; exit = false; do { if (compare(array[cursor2], tmp[cursor1]) < 0) { array[dest++] = array[cursor2++]; count2++; count1 = 0; if (--length2 === 0) { exit = true; break; } } else { array[dest++] = tmp[cursor1++]; count1++; count2 = 0; if (--length1 === 1) { exit = true; break; } } } while ((count1 | count2) < _minGallop); if (exit) { break; } do { count1 = gallopRight(array[cursor2], tmp, cursor1, length1, 0, compare); if (count1 !== 0) { for (i = 0; i < count1; i++) { array[dest + i] = tmp[cursor1 + i]; } dest += count1; cursor1 += count1; length1 -= count1; if (length1 <= 1) { exit = true; break; } } array[dest++] = array[cursor2++]; if (--length2 === 0) { exit = true; break; } count2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare); if (count2 !== 0) { for (i = 0; i < count2; i++) { array[dest + i] = array[cursor2 + i]; } dest += count2; cursor2 += count2; length2 -= count2; if (length2 === 0) { exit = true; break; } } array[dest++] = tmp[cursor1++]; if (--length1 === 1) { exit = true; break; } _minGallop--; } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING); if (exit) { break; } if (_minGallop < 0) { _minGallop = 0; } _minGallop += 2; } minGallop = _minGallop; minGallop < 1 && (minGallop = 1); if (length1 === 1) { for (i = 0; i < length2; i++) { array[dest + i] = array[cursor2 + i]; } array[dest + length2] = tmp[cursor1]; } else if (length1 === 0) { throw new Error(); } else { for (i = 0; i < length1; i++) { array[dest + i] = tmp[cursor1 + i]; } } } function mergeHigh(start1, length1, start2, length2) { var i = 0; for (i = 0; i < length2; i++) { tmp[i] = array[start2 + i]; } var cursor1 = start1 + length1 - 1; var cursor2 = length2 - 1; var dest = start2 + length2 - 1; var customCursor = 0; var customDest = 0; array[dest--] = array[cursor1--]; if (--length1 === 0) { customCursor = dest - (length2 - 1); for (i = 0; i < length2; i++) { array[customCursor + i] = tmp[i]; } return; } if (length2 === 1) { dest -= length1; cursor1 -= length1; customDest = dest + 1; customCursor = cursor1 + 1; for (i = length1 - 1; i >= 0; i--) { array[customDest + i] = array[customCursor + i]; } array[dest] = tmp[cursor2]; return; } var _minGallop = minGallop; while (true) { var count1 = 0; var count2 = 0; var exit = false; do { if (compare(tmp[cursor2], array[cursor1]) < 0) { array[dest--] = array[cursor1--]; count1++; count2 = 0; if (--length1 === 0) { exit = true; break; } } else { array[dest--] = tmp[cursor2--]; count2++; count1 = 0; if (--length2 === 1) { exit = true; break; } } } while ((count1 | count2) < _minGallop); if (exit) { break; } do { count1 = length1 - gallopRight(tmp[cursor2], array, start1, length1, length1 - 1, compare); if (count1 !== 0) { dest -= count1; cursor1 -= count1; length1 -= count1; customDest = dest + 1; customCursor = cursor1 + 1; for (i = count1 - 1; i >= 0; i--) { array[customDest + i] = array[customCursor + i]; } if (length1 === 0) { exit = true; break; } } array[dest--] = tmp[cursor2--]; if (--length2 === 1) { exit = true; break; } count2 = length2 - gallopLeft(array[cursor1], tmp, 0, length2, length2 - 1, compare); if (count2 !== 0) { dest -= count2; cursor2 -= count2; length2 -= count2; customDest = dest + 1; customCursor = cursor2 + 1; for (i = 0; i < count2; i++) { array[customDest + i] = tmp[customCursor + i]; } if (length2 <= 1) { exit = true; break; } } array[dest--] = array[cursor1--]; if (--length1 === 0) { exit = true; break; } _minGallop--; } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING); if (exit) { break; } if (_minGallop < 0) { _minGallop = 0; } _minGallop += 2; } minGallop = _minGallop; if (minGallop < 1) { minGallop = 1; } if (length2 === 1) { dest -= length1; cursor1 -= length1; customDest = dest + 1; customCursor = cursor1 + 1; for (i = length1 - 1; i >= 0; i--) { array[customDest + i] = array[customCursor + i]; } array[dest] = tmp[cursor2]; } else if (length2 === 0) { throw new Error(); } else { customCursor = dest - (length2 - 1); for (i = 0; i < length2; i++) { array[customCursor + i] = tmp[i]; } } } return { mergeRuns: mergeRuns, forceMergeRuns: forceMergeRuns, pushRun: pushRun }; } function sort(array, compare, lo, hi) { if (!lo) { lo = 0; } if (!hi) { hi = array.length; } var remaining = hi - lo; if (remaining < 2) { return; } var runLength = 0; if (remaining < DEFAULT_MIN_MERGE) { runLength = makeAscendingRun(array, lo, hi, compare); binaryInsertionSort(array, lo, hi, lo + runLength, compare); return; } var ts = TimSort(array, compare); var minRun = minRunLength(remaining); do { runLength = makeAscendingRun(array, lo, hi, compare); if (runLength < minRun) { var force = remaining; if (force > minRun) { force = minRun; } binaryInsertionSort(array, lo, lo + force, lo + runLength, compare); runLength = force; } ts.pushRun(lo, runLength); ts.mergeRuns(); remaining -= runLength; lo += runLength; } while (remaining !== 0); ts.forceMergeRuns(); } var invalidZErrorLogged = false; function logInvalidZError() { if (invalidZErrorLogged) { return; } invalidZErrorLogged = true; console.warn('z / z2 / zlevel of displayable is invalid, which may cause unexpected errors'); } function shapeCompareFunc(a, b) { if (a.zlevel === b.zlevel) { if (a.z === b.z) { return a.z2 - b.z2; } return a.z - b.z; } return a.zlevel - b.zlevel; } var Storage = (function () { function Storage() { this._roots = []; this._displayList = []; this._displayListLen = 0; this.displayableSortFunc = shapeCompareFunc; } Storage.prototype.traverse = function (cb, context) { for (var i = 0; i < this._roots.length; i++) { this._roots[i].traverse(cb, context); } }; Storage.prototype.getDisplayList = function (update, includeIgnore) { includeIgnore = includeIgnore || false; var displayList = this._displayList; if (update || !displayList.length) { this.updateDisplayList(includeIgnore); } return displayList; }; Storage.prototype.updateDisplayList = function (includeIgnore) { this._displayListLen = 0; var roots = this._roots; var displayList = this._displayList; for (var i = 0, len = roots.length; i < len; i++) { this._updateAndAddDisplayable(roots[i], null, includeIgnore); } displayList.length = this._displayListLen; env.canvasSupported && sort(displayList, shapeCompareFunc); }; Storage.prototype._updateAndAddDisplayable = function (el, clipPaths, includeIgnore) { if (el.ignore && !includeIgnore) { return; } el.beforeUpdate(); el.update(); el.afterUpdate(); var userSetClipPath = el.getClipPath(); if (el.ignoreClip) { clipPaths = null; } else if (userSetClipPath) { if (clipPaths) { clipPaths = clipPaths.slice(); } else { clipPaths = []; } var currentClipPath = userSetClipPath; var parentClipPath = el; while (currentClipPath) { currentClipPath.parent = parentClipPath; currentClipPath.updateTransform(); clipPaths.push(currentClipPath); parentClipPath = currentClipPath; currentClipPath = currentClipPath.getClipPath(); } } if (el.childrenRef) { var children = el.childrenRef(); for (var i = 0; i < children.length; i++) { var child = children[i]; if (el.__dirty) { child.__dirty |= Element.REDARAW_BIT; } this._updateAndAddDisplayable(child, clipPaths, includeIgnore); } el.__dirty = 0; } else { var disp = el; if (clipPaths && clipPaths.length) { disp.__clipPaths = clipPaths; } else if (disp.__clipPaths && disp.__clipPaths.length > 0) { disp.__clipPaths = []; } if (isNaN(disp.z)) { logInvalidZError(); disp.z = 0; } if (isNaN(disp.z2)) { logInvalidZError(); disp.z2 = 0; } if (isNaN(disp.zlevel)) { logInvalidZError(); disp.zlevel = 0; } this._displayList[this._displayListLen++] = disp; } var decalEl = el.getDecalElement && el.getDecalElement(); if (decalEl) { this._updateAndAddDisplayable(decalEl, clipPaths, includeIgnore); } var textGuide = el.getTextGuideLine(); if (textGuide) { this._updateAndAddDisplayable(textGuide, clipPaths, includeIgnore); } var textEl = el.getTextContent(); if (textEl) { this._updateAndAddDisplayable(textEl, clipPaths, includeIgnore); } }; Storage.prototype.addRoot = function (el) { if (el.__zr && el.__zr.storage === this) { return; } this._roots.push(el); }; Storage.prototype.delRoot = function (el) { if (el instanceof Array) { for (var i = 0, l = el.length; i < l; i++) { this.delRoot(el[i]); } return; } var idx = indexOf(this._roots, el); if (idx >= 0) { this._roots.splice(idx, 1); } }; Storage.prototype.delAllRoots = function () { this._roots = []; this._displayList = []; this._displayListLen = 0; return; }; Storage.prototype.getRoots = function () { return this._roots; }; Storage.prototype.dispose = function () { this._displayList = null; this._roots = null; }; return Storage; }()); var requestAnimationFrame; requestAnimationFrame = (typeof window !== 'undefined' && ((window.requestAnimationFrame && window.requestAnimationFrame.bind(window)) || (window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window)) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame)) || function (func) { return setTimeout(func, 16); }; var requestAnimationFrame$1 = requestAnimationFrame; var Animation = (function (_super) { __extends(Animation, _super); function Animation(opts) { var _this = _super.call(this) || this; _this._running = false; _this._time = 0; _this._pausedTime = 0; _this._pauseStart = 0; _this._paused = false; opts = opts || {}; _this.stage = opts.stage || {}; _this.onframe = opts.onframe || function () { }; return _this; } Animation.prototype.addClip = function (clip) { if (clip.animation) { this.removeClip(clip); } if (!this._clipsHead) { this._clipsHead = this._clipsTail = clip; } else { this._clipsTail.next = clip; clip.prev = this._clipsTail; clip.next = null; this._clipsTail = clip; } clip.animation = this; }; Animation.prototype.addAnimator = function (animator) { animator.animation = this; var clip = animator.getClip(); if (clip) { this.addClip(clip); } }; Animation.prototype.removeClip = function (clip) { if (!clip.animation) { return; } var prev = clip.prev; var next = clip.next; if (prev) { prev.next = next; } else { this._clipsHead = next; } if (next) { next.prev = prev; } else { this._clipsTail = prev; } clip.next = clip.prev = clip.animation = null; }; Animation.prototype.removeAnimator = function (animator) { var clip = animator.getClip(); if (clip) { this.removeClip(clip); } animator.animation = null; }; Animation.prototype.update = function (notTriggerFrameAndStageUpdate) { var time = new Date().getTime() - this._pausedTime; var delta = time - this._time; var clip = this._clipsHead; while (clip) { var nextClip = clip.next; var finished = clip.step(time, delta); if (finished) { clip.ondestroy && clip.ondestroy(); this.removeClip(clip); clip = nextClip; } else { clip = nextClip; } } this._time = time; if (!notTriggerFrameAndStageUpdate) { this.onframe(delta); this.trigger('frame', delta); this.stage.update && this.stage.update(); } }; Animation.prototype._startLoop = function () { var self = this; this._running = true; function step() { if (self._running) { requestAnimationFrame$1(step); !self._paused && self.update(); } } requestAnimationFrame$1(step); }; Animation.prototype.start = function () { if (this._running) { return; } this._time = new Date().getTime(); this._pausedTime = 0; this._startLoop(); }; Animation.prototype.stop = function () { this._running = false; }; Animation.prototype.pause = function () { if (!this._paused) { this._pauseStart = new Date().getTime(); this._paused = true; } }; Animation.prototype.resume = function () { if (this._paused) { this._pausedTime += (new Date().getTime()) - this._pauseStart; this._paused = false; } }; Animation.prototype.clear = function () { var clip = this._clipsHead; while (clip) { var nextClip = clip.next; clip.prev = clip.next = clip.animation = null; clip = nextClip; } this._clipsHead = this._clipsTail = null; }; Animation.prototype.isFinished = function () { return this._clipsHead == null; }; Animation.prototype.animate = function (target, options) { options = options || {}; this.start(); var animator = new Animator(target, options.loop); this.addAnimator(animator); return animator; }; return Animation; }(Eventful)); var TOUCH_CLICK_DELAY = 300; var globalEventSupported = env.domSupported; var localNativeListenerNames = (function () { var mouseHandlerNames = [ 'click', 'dblclick', 'mousewheel', 'wheel', 'mouseout', 'mouseup', 'mousedown', 'mousemove', 'contextmenu' ]; var touchHandlerNames = [ 'touchstart', 'touchend', 'touchmove' ]; var pointerEventNameMap = { pointerdown: 1, pointerup: 1, pointermove: 1, pointerout: 1 }; var pointerHandlerNames = map(mouseHandlerNames, function (name) { var nm = name.replace('mouse', 'pointer'); return pointerEventNameMap.hasOwnProperty(nm) ? nm : name; }); return { mouse: mouseHandlerNames, touch: touchHandlerNames, pointer: pointerHandlerNames }; })(); var globalNativeListenerNames = { mouse: ['mousemove', 'mouseup'], pointer: ['pointermove', 'pointerup'] }; var wheelEventSupported = false; function isPointerFromTouch(event) { var pointerType = event.pointerType; return pointerType === 'pen' || pointerType === 'touch'; } function setTouchTimer(scope) { scope.touching = true; if (scope.touchTimer != null) { clearTimeout(scope.touchTimer); scope.touchTimer = null; } scope.touchTimer = setTimeout(function () { scope.touching = false; scope.touchTimer = null; }, 700); } function markTouch(event) { event && (event.zrByTouch = true); } function normalizeGlobalEvent(instance, event) { return normalizeEvent(instance.dom, new FakeGlobalEvent(instance, event), true); } function isLocalEl(instance, el) { var elTmp = el; var isLocal = false; while (elTmp && elTmp.nodeType !== 9 && !(isLocal = elTmp.domBelongToZr || (elTmp !== el && elTmp === instance.painterRoot))) { elTmp = elTmp.parentNode; } return isLocal; } var FakeGlobalEvent = (function () { function FakeGlobalEvent(instance, event) { this.stopPropagation = noop; this.stopImmediatePropagation = noop; this.preventDefault = noop; this.type = event.type; this.target = this.currentTarget = instance.dom; this.pointerType = event.pointerType; this.clientX = event.clientX; this.clientY = event.clientY; } return FakeGlobalEvent; }()); var localDOMHandlers = { mousedown: function (event) { event = normalizeEvent(this.dom, event); this.__mayPointerCapture = [event.zrX, event.zrY]; this.trigger('mousedown', event); }, mousemove: function (event) { event = normalizeEvent(this.dom, event); var downPoint = this.__mayPointerCapture; if (downPoint && (event.zrX !== downPoint[0] || event.zrY !== downPoint[1])) { this.__togglePointerCapture(true); } this.trigger('mousemove', event); }, mouseup: function (event) { event = normalizeEvent(this.dom, event); this.__togglePointerCapture(false); this.trigger('mouseup', event); }, mouseout: function (event) { event = normalizeEvent(this.dom, event); var element = event.toElement || event.relatedTarget; if (!isLocalEl(this, element)) { if (this.__pointerCapturing) { event.zrEventControl = 'no_globalout'; } this.trigger('mouseout', event); } }, wheel: function (event) { wheelEventSupported = true; event = normalizeEvent(this.dom, event); this.trigger('mousewheel', event); }, mousewheel: function (event) { if (wheelEventSupported) { return; } event = normalizeEvent(this.dom, event); this.trigger('mousewheel', event); }, touchstart: function (event) { event = normalizeEvent(this.dom, event); markTouch(event); this.__lastTouchMoment = new Date(); this.handler.processGesture(event, 'start'); localDOMHandlers.mousemove.call(this, event); localDOMHandlers.mousedown.call(this, event); }, touchmove: function (event) { event = normalizeEvent(this.dom, event); markTouch(event); this.handler.processGesture(event, 'change'); localDOMHandlers.mousemove.call(this, event); }, touchend: function (event) { event = normalizeEvent(this.dom, event); markTouch(event); this.handler.processGesture(event, 'end'); localDOMHandlers.mouseup.call(this, event); if (+new Date() - (+this.__lastTouchMoment) < TOUCH_CLICK_DELAY) { localDOMHandlers.click.call(this, event); } }, pointerdown: function (event) { localDOMHandlers.mousedown.call(this, event); }, pointermove: function (event) { if (!isPointerFromTouch(event)) { localDOMHandlers.mousemove.call(this, event); } }, pointerup: function (event) { localDOMHandlers.mouseup.call(this, event); }, pointerout: function (event) { if (!isPointerFromTouch(event)) { localDOMHandlers.mouseout.call(this, event); } } }; each(['click', 'dblclick', 'contextmenu'], function (name) { localDOMHandlers[name] = function (event) { event = normalizeEvent(this.dom, event); this.trigger(name, event); }; }); var globalDOMHandlers = { pointermove: function (event) { if (!isPointerFromTouch(event)) { globalDOMHandlers.mousemove.call(this, event); } }, pointerup: function (event) { globalDOMHandlers.mouseup.call(this, event); }, mousemove: function (event) { this.trigger('mousemove', event); }, mouseup: function (event) { var pointerCaptureReleasing = this.__pointerCapturing; this.__togglePointerCapture(false); this.trigger('mouseup', event); if (pointerCaptureReleasing) { event.zrEventControl = 'only_globalout'; this.trigger('mouseout', event); } } }; function mountLocalDOMEventListeners(instance, scope) { var domHandlers = scope.domHandlers; if (env.pointerEventsSupported) { each(localNativeListenerNames.pointer, function (nativeEventName) { mountSingleDOMEventListener(scope, nativeEventName, function (event) { domHandlers[nativeEventName].call(instance, event); }); }); } else { if (env.touchEventsSupported) { each(localNativeListenerNames.touch, function (nativeEventName) { mountSingleDOMEventListener(scope, nativeEventName, function (event) { domHandlers[nativeEventName].call(instance, event); setTouchTimer(scope); }); }); } each(localNativeListenerNames.mouse, function (nativeEventName) { mountSingleDOMEventListener(scope, nativeEventName, function (event) { event = getNativeEvent(event); if (!scope.touching) { domHandlers[nativeEventName].call(instance, event); } }); }); } } function mountGlobalDOMEventListeners(instance, scope) { if (env.pointerEventsSupported) { each(globalNativeListenerNames.pointer, mount); } else if (!env.touchEventsSupported) { each(globalNativeListenerNames.mouse, mount); } function mount(nativeEventName) { function nativeEventListener(event) { event = getNativeEvent(event); if (!isLocalEl(instance, event.target)) { event = normalizeGlobalEvent(instance, event); scope.domHandlers[nativeEventName].call(instance, event); } } mountSingleDOMEventListener(scope, nativeEventName, nativeEventListener, { capture: true }); } } function mountSingleDOMEventListener(scope, nativeEventName, listener, opt) { scope.mounted[nativeEventName] = listener; scope.listenerOpts[nativeEventName] = opt; addEventListener(scope.domTarget, nativeEventName, listener, opt); } function unmountDOMEventListeners(scope) { var mounted = scope.mounted; for (var nativeEventName in mounted) { if (mounted.hasOwnProperty(nativeEventName)) { removeEventListener(scope.domTarget, nativeEventName, mounted[nativeEventName], scope.listenerOpts[nativeEventName]); } } scope.mounted = {}; } var DOMHandlerScope = (function () { function DOMHandlerScope(domTarget, domHandlers) { this.mounted = {}; this.listenerOpts = {}; this.touching = false; this.domTarget = domTarget; this.domHandlers = domHandlers; } return DOMHandlerScope; }()); var HandlerDomProxy = (function (_super) { __extends(HandlerDomProxy, _super); function HandlerDomProxy(dom, painterRoot) { var _this = _super.call(this) || this; _this.__pointerCapturing = false; _this.dom = dom; _this.painterRoot = painterRoot; _this._localHandlerScope = new DOMHandlerScope(dom, localDOMHandlers); if (globalEventSupported) { _this._globalHandlerScope = new DOMHandlerScope(document, globalDOMHandlers); } mountLocalDOMEventListeners(_this, _this._localHandlerScope); return _this; } HandlerDomProxy.prototype.dispose = function () { unmountDOMEventListeners(this._localHandlerScope); if (globalEventSupported) { unmountDOMEventListeners(this._globalHandlerScope); } }; HandlerDomProxy.prototype.setCursor = function (cursorStyle) { this.dom.style && (this.dom.style.cursor = cursorStyle || 'default'); }; HandlerDomProxy.prototype.__togglePointerCapture = function (isPointerCapturing) { this.__mayPointerCapture = null; if (globalEventSupported && ((+this.__pointerCapturing) ^ (+isPointerCapturing))) { this.__pointerCapturing = isPointerCapturing; var globalHandlerScope = this._globalHandlerScope; isPointerCapturing ? mountGlobalDOMEventListeners(this, globalHandlerScope) : unmountDOMEventListeners(globalHandlerScope); } }; return HandlerDomProxy; }(Eventful)); var Group = (function (_super) { __extends(Group, _super); function Group(opts) { var _this = _super.call(this) || this; _this.isGroup = true; _this._children = []; _this.attr(opts); return _this; } Group.prototype.childrenRef = function () { return this._children; }; Group.prototype.children = function () { return this._children.slice(); }; Group.prototype.childAt = function (idx) { return this._children[idx]; }; Group.prototype.childOfName = function (name) { var children = this._children; for (var i = 0; i < children.length; i++) { if (children[i].name === name) { return children[i]; } } }; Group.prototype.childCount = function () { return this._children.length; }; Group.prototype.add = function (child) { if (child) { if (child !== this && child.parent !== this) { this._children.push(child); this._doAdd(child); } if (child.__hostTarget) { throw 'This elemenet has been used as an attachment'; } } return this; }; Group.prototype.addBefore = function (child, nextSibling) { if (child && child !== this && child.parent !== this && nextSibling && nextSibling.parent === this) { var children = this._children; var idx = children.indexOf(nextSibling); if (idx >= 0) { children.splice(idx, 0, child); this._doAdd(child); } } return this; }; Group.prototype.replaceAt = function (child, index) { var children = this._children; var old = children[index]; if (child && child !== this && child.parent !== this && child !== old) { children[index] = child; old.parent = null; var zr = this.__zr; if (zr) { old.removeSelfFromZr(zr); } this._doAdd(child); } return this; }; Group.prototype._doAdd = function (child) { if (child.parent) { child.parent.remove(child); } child.parent = this; var zr = this.__zr; if (zr && zr !== child.__zr) { child.addSelfToZr(zr); } zr && zr.refresh(); }; Group.prototype.remove = function (child) { var zr = this.__zr; var children = this._children; var idx = indexOf(children, child); if (idx < 0) { return this; } children.splice(idx, 1); child.parent = null; if (zr) { child.removeSelfFromZr(zr); } zr && zr.refresh(); return this; }; Group.prototype.removeAll = function () { var children = this._children; var zr = this.__zr; for (var i = 0; i < children.length; i++) { var child = children[i]; if (zr) { child.removeSelfFromZr(zr); } child.parent = null; } children.length = 0; return this; }; Group.prototype.eachChild = function (cb, context) { var children = this._children; for (var i = 0; i < children.length; i++) { var child = children[i]; cb.call(context, child, i); } return this; }; Group.prototype.traverse = function (cb, context) { for (var i = 0; i < this._children.length; i++) { var child = this._children[i]; var stopped = cb.call(context, child); if (child.isGroup && !stopped) { child.traverse(cb, context); } } return this; }; Group.prototype.addSelfToZr = function (zr) { _super.prototype.addSelfToZr.call(this, zr); for (var i = 0; i < this._children.length; i++) { var child = this._children[i]; child.addSelfToZr(zr); } }; Group.prototype.removeSelfFromZr = function (zr) { _super.prototype.removeSelfFromZr.call(this, zr); for (var i = 0; i < this._children.length; i++) { var child = this._children[i]; child.removeSelfFromZr(zr); } }; Group.prototype.getBoundingRect = function (includeChildren) { var tmpRect = new BoundingRect(0, 0, 0, 0); var children = includeChildren || this._children; var tmpMat = []; var rect = null; for (var i = 0; i < children.length; i++) { var child = children[i]; if (child.ignore || child.invisible) { continue; } var childRect = child.getBoundingRect(); var transform = child.getLocalTransform(tmpMat); if (transform) { BoundingRect.applyTransform(tmpRect, childRect, transform); rect = rect || tmpRect.clone(); rect.union(tmpRect); } else { rect = rect || childRect.clone(); rect.union(childRect); } } return rect || tmpRect; }; return Group; }(Element)); Group.prototype.type = 'group'; /*! * ZRender, a high performance 2d drawing library. * * Copyright (c) 2013, Baidu Inc. * All rights reserved. * * LICENSE * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt */ var useVML = !env.canvasSupported; var painterCtors = {}; var instances = {}; function delInstance(id) { delete instances[id]; } function isDarkMode(backgroundColor) { if (!backgroundColor) { return false; } if (typeof backgroundColor === 'string') { return lum(backgroundColor, 1) < DARK_MODE_THRESHOLD; } else if (backgroundColor.colorStops) { var colorStops = backgroundColor.colorStops; var totalLum = 0; var len = colorStops.length; for (var i = 0; i < len; i++) { totalLum += lum(colorStops[i].color, 1); } totalLum /= len; return totalLum < DARK_MODE_THRESHOLD; } return false; } var ZRender = (function () { function ZRender(id, dom, opts) { var _this = this; this._sleepAfterStill = 10; this._stillFrameAccum = 0; this._needsRefresh = true; this._needsRefreshHover = true; this._darkMode = false; opts = opts || {}; this.dom = dom; this.id = id; var storage = new Storage(); var rendererType = opts.renderer || 'canvas'; if (useVML) { throw new Error('IE8 support has been dropped since 5.0'); } if (!painterCtors[rendererType]) { rendererType = keys(painterCtors)[0]; } if (!painterCtors[rendererType]) { throw new Error("Renderer '" + rendererType + "' is not imported. Please import it first."); } opts.useDirtyRect = opts.useDirtyRect == null ? false : opts.useDirtyRect; var painter = new painterCtors[rendererType](dom, storage, opts, id); this.storage = storage; this.painter = painter; var handerProxy = (!env.node && !env.worker) ? new HandlerDomProxy(painter.getViewportRoot(), painter.root) : null; this.handler = new Handler(storage, painter, handerProxy, painter.root); this.animation = new Animation({ stage: { update: function () { return _this._flush(true); } } }); this.animation.start(); } ZRender.prototype.add = function (el) { if (!el) { return; } this.storage.addRoot(el); el.addSelfToZr(this); this.refresh(); }; ZRender.prototype.remove = function (el) { if (!el) { return; } this.storage.delRoot(el); el.removeSelfFromZr(this); this.refresh(); }; ZRender.prototype.configLayer = function (zLevel, config) { if (this.painter.configLayer) { this.painter.configLayer(zLevel, config); } this.refresh(); }; ZRender.prototype.setBackgroundColor = function (backgroundColor) { if (this.painter.setBackgroundColor) { this.painter.setBackgroundColor(backgroundColor); } this.refresh(); this._backgroundColor = backgroundColor; this._darkMode = isDarkMode(backgroundColor); }; ZRender.prototype.getBackgroundColor = function () { return this._backgroundColor; }; ZRender.prototype.setDarkMode = function (darkMode) { this._darkMode = darkMode; }; ZRender.prototype.isDarkMode = function () { return this._darkMode; }; ZRender.prototype.refreshImmediately = function (fromInside) { if (!fromInside) { this.animation.update(true); } this._needsRefresh = false; this.painter.refresh(); this._needsRefresh = false; }; ZRender.prototype.refresh = function () { this._needsRefresh = true; this.animation.start(); }; ZRender.prototype.flush = function () { this._flush(false); }; ZRender.prototype._flush = function (fromInside) { var triggerRendered; var start = new Date().getTime(); if (this._needsRefresh) { triggerRendered = true; this.refreshImmediately(fromInside); } if (this._needsRefreshHover) { triggerRendered = true; this.refreshHoverImmediately(); } var end = new Date().getTime(); if (triggerRendered) { this._stillFrameAccum = 0; this.trigger('rendered', { elapsedTime: end - start }); } else if (this._sleepAfterStill > 0) { this._stillFrameAccum++; if (this._stillFrameAccum > this._sleepAfterStill) { this.animation.stop(); } } }; ZRender.prototype.setSleepAfterStill = function (stillFramesCount) { this._sleepAfterStill = stillFramesCount; }; ZRender.prototype.wakeUp = function () { this.animation.start(); this._stillFrameAccum = 0; }; ZRender.prototype.addHover = function (el) { }; ZRender.prototype.removeHover = function (el) { }; ZRender.prototype.clearHover = function () { }; ZRender.prototype.refreshHover = function () { this._needsRefreshHover = true; }; ZRender.prototype.refreshHoverImmediately = function () { this._needsRefreshHover = false; if (this.painter.refreshHover && this.painter.getType() === 'canvas') { this.painter.refreshHover(); } }; ZRender.prototype.resize = function (opts) { opts = opts || {}; this.painter.resize(opts.width, opts.height); this.handler.resize(); }; ZRender.prototype.clearAnimation = function () { this.animation.clear(); }; ZRender.prototype.getWidth = function () { return this.painter.getWidth(); }; ZRender.prototype.getHeight = function () { return this.painter.getHeight(); }; ZRender.prototype.pathToImage = function (e, dpr) { if (this.painter.pathToImage) { return this.painter.pathToImage(e, dpr); } }; ZRender.prototype.setCursorStyle = function (cursorStyle) { this.handler.setCursorStyle(cursorStyle); }; ZRender.prototype.findHover = function (x, y) { return this.handler.findHover(x, y); }; ZRender.prototype.on = function (eventName, eventHandler, context) { this.handler.on(eventName, eventHandler, context); return this; }; ZRender.prototype.off = function (eventName, eventHandler) { this.handler.off(eventName, eventHandler); }; ZRender.prototype.trigger = function (eventName, event) { this.handler.trigger(eventName, event); }; ZRender.prototype.clear = function () { var roots = this.storage.getRoots(); for (var i = 0; i < roots.length; i++) { if (roots[i] instanceof Group) { roots[i].removeSelfFromZr(this); } } this.storage.delAllRoots(); this.painter.clear(); }; ZRender.prototype.dispose = function () { this.animation.stop(); this.clear(); this.storage.dispose(); this.painter.dispose(); this.handler.dispose(); this.animation = this.storage = this.painter = this.handler = null; delInstance(this.id); }; return ZRender; }()); function init(dom, opts) { var zr = new ZRender(guid(), dom, opts); instances[zr.id] = zr; return zr; } function dispose(zr) { zr.dispose(); } function disposeAll() { for (var key in instances) { if (instances.hasOwnProperty(key)) { instances[key].dispose(); } } instances = {}; } function getInstance(id) { return instances[id]; } function registerPainter(name, Ctor) { painterCtors[name] = Ctor; } var version = '5.1.0'; var zrender = /*#__PURE__*/Object.freeze({ __proto__: null, init: init, dispose: dispose, disposeAll: disposeAll, getInstance: getInstance, registerPainter: registerPainter, version: version }); var RADIAN_EPSILON = 1e-4; function _trim(str) { return str.replace(/^\s+|\s+$/g, ''); } /** * Linear mapping a value from domain to range * @param val * @param domain Domain extent domain[0] can be bigger than domain[1] * @param range Range extent range[0] can be bigger than range[1] * @param clamp Default to be false */ function linearMap(val, domain, range, clamp) { var subDomain = domain[1] - domain[0]; var subRange = range[1] - range[0]; if (subDomain === 0) { return subRange === 0 ? range[0] : (range[0] + range[1]) / 2; } // Avoid accuracy problem in edge, such as // 146.39 - 62.83 === 83.55999999999999. // See echarts/test/ut/spec/util/number.js#linearMap#accuracyError // It is a little verbose for efficiency considering this method // is a hotspot. if (clamp) { if (subDomain > 0) { if (val <= domain[0]) { return range[0]; } else if (val >= domain[1]) { return range[1]; } } else { if (val >= domain[0]) { return range[0]; } else if (val <= domain[1]) { return range[1]; } } } else { if (val === domain[0]) { return range[0]; } if (val === domain[1]) { return range[1]; } } return (val - domain[0]) / subDomain * subRange + range[0]; } /** * Convert a percent string to absolute number. * Returns NaN if percent is not a valid string or number */ function parsePercent$1(percent, all) { switch (percent) { case 'center': case 'middle': percent = '50%'; break; case 'left': case 'top': percent = '0%'; break; case 'right': case 'bottom': percent = '100%'; break; } if (typeof percent === 'string') { if (_trim(percent).match(/%$/)) { return parseFloat(percent) / 100 * all; } return parseFloat(percent); } return percent == null ? NaN : +percent; } function round(x, precision, returnStr) { if (precision == null) { precision = 10; } // Avoid range error precision = Math.min(Math.max(0, precision), 20); x = (+x).toFixed(precision); return returnStr ? x : +x; } /** * Inplacd asc sort arr. * The input arr will be modified. */ function asc(arr) { arr.sort(function (a, b) { return a - b; }); return arr; } /** * Get precision */ function getPrecision(val) { val = +val; if (isNaN(val)) { return 0; } // It is much faster than methods converting number to string as follows // let tmp = val.toString(); // return tmp.length - 1 - tmp.indexOf('.'); // especially when precision is low var e = 1; var count = 0; while (Math.round(val * e) / e !== val) { e *= 10; count++; } return count; } /** * Get precision with slow but safe method */ function getPrecisionSafe(val) { var str = val.toString(); // Consider scientific notation: '3.4e-12' '3.4e+12' var eIndex = str.indexOf('e'); if (eIndex > 0) { var precision = +str.slice(eIndex + 1); return precision < 0 ? -precision : 0; } else { var dotIndex = str.indexOf('.'); return dotIndex < 0 ? 0 : str.length - 1 - dotIndex; } } /** * Minimal dicernible data precisioin according to a single pixel. */ function getPixelPrecision(dataExtent, pixelExtent) { var log = Math.log; var LN10 = Math.LN10; var dataQuantity = Math.floor(log(dataExtent[1] - dataExtent[0]) / LN10); var sizeQuantity = Math.round(log(Math.abs(pixelExtent[1] - pixelExtent[0])) / LN10); // toFixed() digits argument must be between 0 and 20. var precision = Math.min(Math.max(-dataQuantity + sizeQuantity, 0), 20); return !isFinite(precision) ? 20 : precision; } /** * Get a data of given precision, assuring the sum of percentages * in valueList is 1. * The largest remainer method is used. * https://en.wikipedia.org/wiki/Largest_remainder_method * * @param valueList a list of all data * @param idx index of the data to be processed in valueList * @param precision integer number showing digits of precision * @return percent ranging from 0 to 100 */ function getPercentWithPrecision(valueList, idx, precision) { if (!valueList[idx]) { return 0; } var sum = reduce(valueList, function (acc, val) { return acc + (isNaN(val) ? 0 : val); }, 0); if (sum === 0) { return 0; } var digits = Math.pow(10, precision); var votesPerQuota = map(valueList, function (val) { return (isNaN(val) ? 0 : val) / sum * digits * 100; }); var targetSeats = digits * 100; var seats = map(votesPerQuota, function (votes) { // Assign automatic seats. return Math.floor(votes); }); var currentSum = reduce(seats, function (acc, val) { return acc + val; }, 0); var remainder = map(votesPerQuota, function (votes, idx) { return votes - seats[idx]; }); // Has remainding votes. while (currentSum < targetSeats) { // Find next largest remainder. var max = Number.NEGATIVE_INFINITY; var maxId = null; for (var i = 0, len = remainder.length; i < len; ++i) { if (remainder[i] > max) { max = remainder[i]; maxId = i; } } // Add a vote to max remainder. ++seats[maxId]; remainder[maxId] = 0; ++currentSum; } return seats[idx] / digits; } // Number.MAX_SAFE_INTEGER, ie do not support. var MAX_SAFE_INTEGER = 9007199254740991; /** * To 0 - 2 * PI, considering negative radian. */ function remRadian(radian) { var pi2 = Math.PI * 2; return (radian % pi2 + pi2) % pi2; } /** * @param {type} radian * @return {boolean} */ function isRadianAroundZero(val) { return val > -RADIAN_EPSILON && val < RADIAN_EPSILON; } // eslint-disable-next-line var TIME_REG = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/; // jshint ignore:line /** * @param value valid type: number | string | Date, otherwise return `new Date(NaN)` * These values can be accepted: * + An instance of Date, represent a time in its own time zone. * + Or string in a subset of ISO 8601, only including: * + only year, month, date: '2012-03', '2012-03-01', '2012-03-01 05', '2012-03-01 05:06', * + separated with T or space: '2012-03-01T12:22:33.123', '2012-03-01 12:22:33.123', * + time zone: '2012-03-01T12:22:33Z', '2012-03-01T12:22:33+8000', '2012-03-01T12:22:33-05:00', * all of which will be treated as local time if time zone is not specified * (see ). * + Or other string format, including (all of which will be treated as loacal time): * '2012', '2012-3-1', '2012/3/1', '2012/03/01', * '2009/6/12 2:00', '2009/6/12 2:05:08', '2009/6/12 2:05:08.123' * + a timestamp, which represent a time in UTC. * @return date Never be null/undefined. If invalid, return `new Date(NaN)`. */ function parseDate(value) { if (value instanceof Date) { return value; } else if (typeof value === 'string') { // Different browsers parse date in different way, so we parse it manually. // Some other issues: // new Date('1970-01-01') is UTC, // new Date('1970/01/01') and new Date('1970-1-01') is local. // See issue #3623 var match = TIME_REG.exec(value); if (!match) { // return Invalid Date. return new Date(NaN); } // Use local time when no timezone offset specifed. if (!match[8]) { // match[n] can only be string or undefined. // But take care of '12' + 1 => '121'. return new Date(+match[1], +(match[2] || 1) - 1, +match[3] || 1, +match[4] || 0, +(match[5] || 0), +match[6] || 0, +match[7] || 0); } // Timezoneoffset of Javascript Date has considered DST (Daylight Saving Time, // https://tc39.github.io/ecma262/#sec-daylight-saving-time-adjustment). // For example, system timezone is set as "Time Zone: America/Toronto", // then these code will get different result: // `new Date(1478411999999).getTimezoneOffset(); // get 240` // `new Date(1478412000000).getTimezoneOffset(); // get 300` // So we should not use `new Date`, but use `Date.UTC`. else { var hour = +match[4] || 0; if (match[8].toUpperCase() !== 'Z') { hour -= +match[8].slice(0, 3); } return new Date(Date.UTC(+match[1], +(match[2] || 1) - 1, +match[3] || 1, hour, +(match[5] || 0), +match[6] || 0, +match[7] || 0)); } } else if (value == null) { return new Date(NaN); } return new Date(Math.round(value)); } /** * Quantity of a number. e.g. 0.1, 1, 10, 100 * * @param val * @return */ function quantity(val) { return Math.pow(10, quantityExponent(val)); } /** * Exponent of the quantity of a number * e.g., 1234 equals to 1.234*10^3, so quantityExponent(1234) is 3 * * @param val non-negative value * @return */ function quantityExponent(val) { if (val === 0) { return 0; } var exp = Math.floor(Math.log(val) / Math.LN10); /** * exp is expected to be the rounded-down result of the base-10 log of val. * But due to the precision loss with Math.log(val), we need to restore it * using 10^exp to make sure we can get val back from exp. #11249 */ if (val / Math.pow(10, exp) >= 10) { exp++; } return exp; } /** * find a “nice” number approximately equal to x. Round the number if round = true, * take ceiling if round = false. The primary observation is that the “nicest” * numbers in decimal are 1, 2, and 5, and all power-of-ten multiples of these numbers. * * See "Nice Numbers for Graph Labels" of Graphic Gems. * * @param val Non-negative value. * @param round * @return Niced number */ function nice(val, round) { var exponent = quantityExponent(val); var exp10 = Math.pow(10, exponent); var f = val / exp10; // 1 <= f < 10 var nf; if (round) { if (f < 1.5) { nf = 1; } else if (f < 2.5) { nf = 2; } else if (f < 4) { nf = 3; } else if (f < 7) { nf = 5; } else { nf = 10; } } else { if (f < 1) { nf = 1; } else if (f < 2) { nf = 2; } else if (f < 3) { nf = 3; } else if (f < 5) { nf = 5; } else { nf = 10; } } val = nf * exp10; // Fix 3 * 0.1 === 0.30000000000000004 issue (see IEEE 754). // 20 is the uppper bound of toFixed. return exponent >= -20 ? +val.toFixed(exponent < 0 ? -exponent : 0) : val; } /** * This code was copied from "d3.js" * . * See the license statement at the head of this file. * @param ascArr */ function quantile(ascArr, p) { var H = (ascArr.length - 1) * p + 1; var h = Math.floor(H); var v = +ascArr[h - 1]; var e = H - h; return e ? v + e * (ascArr[h] - v) : v; } /** * Order intervals asc, and split them when overlap. * expect(numberUtil.reformIntervals([ * {interval: [18, 62], close: [1, 1]}, * {interval: [-Infinity, -70], close: [0, 0]}, * {interval: [-70, -26], close: [1, 1]}, * {interval: [-26, 18], close: [1, 1]}, * {interval: [62, 150], close: [1, 1]}, * {interval: [106, 150], close: [1, 1]}, * {interval: [150, Infinity], close: [0, 0]} * ])).toEqual([ * {interval: [-Infinity, -70], close: [0, 0]}, * {interval: [-70, -26], close: [1, 1]}, * {interval: [-26, 18], close: [0, 1]}, * {interval: [18, 62], close: [0, 1]}, * {interval: [62, 150], close: [0, 1]}, * {interval: [150, Infinity], close: [0, 0]} * ]); * @param list, where `close` mean open or close * of the interval, and Infinity can be used. * @return The origin list, which has been reformed. */ function reformIntervals(list) { list.sort(function (a, b) { return littleThan(a, b, 0) ? -1 : 1; }); var curr = -Infinity; var currClose = 1; for (var i = 0; i < list.length;) { var interval = list[i].interval; var close_1 = list[i].close; for (var lg = 0; lg < 2; lg++) { if (interval[lg] <= curr) { interval[lg] = curr; close_1[lg] = !lg ? 1 - currClose : 1; } curr = interval[lg]; currClose = close_1[lg]; } if (interval[0] === interval[1] && close_1[0] * close_1[1] !== 1) { list.splice(i, 1); } else { i++; } } return list; function littleThan(a, b, lg) { return a.interval[lg] < b.interval[lg] || a.interval[lg] === b.interval[lg] && (a.close[lg] - b.close[lg] === (!lg ? 1 : -1) || !lg && littleThan(a, b, 1)); } } /** * [Numberic is defined as]: * `parseFloat(val) == val` * For example: * numeric: * typeof number except NaN, '-123', '123', '2e3', '-2e3', '011', 'Infinity', Infinity, * and they rounded by white-spaces or line-terminal like ' -123 \n ' (see es spec) * not-numeric: * null, undefined, [], {}, true, false, 'NaN', NaN, '123ab', * empty string, string with only white-spaces or line-terminal (see es spec), * 0x12, '0x12', '-0x12', 012, '012', '-012', * non-string, ... * * @test See full test cases in `test/ut/spec/util/number.js`. * @return Must be a typeof number. If not numeric, return NaN. */ function numericToNumber(val) { var valFloat = parseFloat(val); return valFloat == val // eslint-disable-line eqeqeq && (valFloat !== 0 || typeof val !== 'string' || val.indexOf('x') <= 0) // For case ' 0x0 '. ? valFloat : NaN; } /** * Definition of "numeric": see `numericToNumber`. */ function isNumeric(val) { return !isNaN(numericToNumber(val)); } /** * Use random base to prevent users hard code depending on * this auto generated marker id. * @return An positive integer. */ function getRandomIdBase() { return Math.round(Math.random() * 9); } /** * Get the greatest common dividor * * @param {number} a one number * @param {number} b the other number */ function getGreatestCommonDividor(a, b) { if (b === 0) { return a; } return getGreatestCommonDividor(b, a % b); } /** * Get the least common multiple * * @param {number} a one number * @param {number} b the other number */ function getLeastCommonMultiple(a, b) { if (a == null) { return b; } if (b == null) { return a; } return a * b / getGreatestCommonDividor(a, b); } var ECHARTS_PREFIX = '[ECharts] '; var storedLogs = {}; var hasConsole = typeof console !== 'undefined' // eslint-disable-next-line && console.warn && console.log; function warn(str) { if (hasConsole) { console.warn(ECHARTS_PREFIX + str); } } function error(str) { if (hasConsole) { console.error(ECHARTS_PREFIX + str); } } function deprecateLog(str) { if ("development" !== 'production') { if (storedLogs[str]) { // Not display duplicate message. return; } if (hasConsole) { storedLogs[str] = true; console.warn(ECHARTS_PREFIX + 'DEPRECATED: ' + str); } } } function deprecateReplaceLog(oldOpt, newOpt, scope) { if ("development" !== 'production') { deprecateLog((scope ? "[" + scope + "]" : '') + (oldOpt + " is deprecated, use " + newOpt + " instead.")); } } function consoleLog() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } if ("development" !== 'production') { /* eslint-disable no-console */ if (typeof console !== 'undefined' && console.log) { console.log.apply(console, args); } /* eslint-enable no-console */ } } /** * If in __DEV__ environment, get console printable message for users hint. * Parameters are separated by ' '. * @usuage * makePrintable('This is an error on', someVar, someObj); * * @param hintInfo anything about the current execution context to hint users. * @throws Error */ function makePrintable() { var hintInfo = []; for (var _i = 0; _i < arguments.length; _i++) { hintInfo[_i] = arguments[_i]; } var msg = ''; if ("development" !== 'production') { // Fuzzy stringify for print. // This code only exist in dev environment. var makePrintableStringIfPossible_1 = function (val) { return val === void 0 ? 'undefined' : val === Infinity ? 'Infinity' : val === -Infinity ? '-Infinity' : eqNaN(val) ? 'NaN' : val instanceof Date ? 'Date(' + val.toISOString() + ')' : isFunction(val) ? 'function () { ... }' : isRegExp(val) ? val + '' : null; }; msg = map(hintInfo, function (arg) { if (isString(arg)) { // Print without quotation mark for some statement. return arg; } else { var printableStr = makePrintableStringIfPossible_1(arg); if (printableStr != null) { return printableStr; } else if (typeof JSON !== 'undefined' && JSON.stringify) { try { return JSON.stringify(arg, function (n, val) { var printableStr = makePrintableStringIfPossible_1(val); return printableStr == null ? val : printableStr; }); // In most cases the info object is small, so do not line break. } catch (err) { return '?'; } } else { return '?'; } } }).join(' '); } return msg; } /** * @throws Error */ function throwError(msg) { throw new Error(msg); } /** * Make the name displayable. But we should * make sure it is not duplicated with user * specified name, so use '\0'; */ var DUMMY_COMPONENT_NAME_PREFIX = 'series\0'; var INTERNAL_COMPONENT_ID_PREFIX = '\0_ec_\0'; /** * If value is not array, then translate it to array. * @param {*} value * @return {Array} [value] or value */ function normalizeToArray(value) { return value instanceof Array ? value : value == null ? [] : [value]; } /** * Sync default option between normal and emphasis like `position` and `show` * In case some one will write code like * label: { * show: false, * position: 'outside', * fontSize: 18 * }, * emphasis: { * label: { show: true } * } */ function defaultEmphasis(opt, key, subOpts) { // Caution: performance sensitive. if (opt) { opt[key] = opt[key] || {}; opt.emphasis = opt.emphasis || {}; opt.emphasis[key] = opt.emphasis[key] || {}; // Default emphasis option from normal for (var i = 0, len = subOpts.length; i < len; i++) { var subOptName = subOpts[i]; if (!opt.emphasis[key].hasOwnProperty(subOptName) && opt[key].hasOwnProperty(subOptName)) { opt.emphasis[key][subOptName] = opt[key][subOptName]; } } } } var TEXT_STYLE_OPTIONS = ['fontStyle', 'fontWeight', 'fontSize', 'fontFamily', 'rich', 'tag', 'color', 'textBorderColor', 'textBorderWidth', 'width', 'height', 'lineHeight', 'align', 'verticalAlign', 'baseline', 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY', 'textShadowColor', 'textShadowBlur', 'textShadowOffsetX', 'textShadowOffsetY', 'backgroundColor', 'borderColor', 'borderWidth', 'borderRadius', 'padding']; // modelUtil.LABEL_OPTIONS = modelUtil.TEXT_STYLE_OPTIONS.concat([ // 'position', 'offset', 'rotate', 'origin', 'show', 'distance', 'formatter', // 'fontStyle', 'fontWeight', 'fontSize', 'fontFamily', // // FIXME: deprecated, check and remove it. // 'textStyle' // ]); /** * The method do not ensure performance. * data could be [12, 2323, {value: 223}, [1221, 23], {value: [2, 23]}] * This helper method retieves value from data. */ function getDataItemValue(dataItem) { return isObject(dataItem) && !isArray(dataItem) && !(dataItem instanceof Date) ? dataItem.value : dataItem; } /** * data could be [12, 2323, {value: 223}, [1221, 23], {value: [2, 23]}] * This helper method determine if dataItem has extra option besides value */ function isDataItemOption(dataItem) { return isObject(dataItem) && !(dataItem instanceof Array); // // markLine data can be array // && !(dataItem[0] && isObject(dataItem[0]) && !(dataItem[0] instanceof Array)); } /** * Mapping to existings for merge. * * Mode "normalMege": * The mapping result (merge result) will keep the order of the existing * component, rather than the order of new option. Because we should ensure * some specified index reference (like xAxisIndex) keep work. * And in most cases, "merge option" is used to update partial option but not * be expected to change the order. * * Mode "replaceMege": * (1) Only the id mapped components will be merged. * (2) Other existing components (except internal compoonets) will be removed. * (3) Other new options will be used to create new component. * (4) The index of the existing compoents will not be modified. * That means their might be "hole" after the removal. * The new components are created first at those available index. * * Mode "replaceAll": * This mode try to support that reproduce an echarts instance from another * echarts instance (via `getOption`) in some simple cases. * In this senario, the `result` index are exactly the consistent with the `newCmptOptions`, * which ensures the compoennt index referring (like `xAxisIndex: ?`) corrent. That is, * the "hole" in `newCmptOptions` will also be kept. * On the contrary, other modes try best to eliminate holes. * PENDING: This is an experimental mode yet. * * @return See the comment of . */ function mappingToExists(existings, newCmptOptions, mode) { var isNormalMergeMode = mode === 'normalMerge'; var isReplaceMergeMode = mode === 'replaceMerge'; var isReplaceAllMode = mode === 'replaceAll'; existings = existings || []; newCmptOptions = (newCmptOptions || []).slice(); var existingIdIdxMap = createHashMap(); // Validate id and name on user input option. each(newCmptOptions, function (cmptOption, index) { if (!isObject(cmptOption)) { newCmptOptions[index] = null; return; } if ("development" !== 'production') { // There is some legacy case that name is set as `false`. // But should work normally rather than throw error. if (cmptOption.id != null && !isValidIdOrName(cmptOption.id)) { warnInvalidateIdOrName(cmptOption.id); } if (cmptOption.name != null && !isValidIdOrName(cmptOption.name)) { warnInvalidateIdOrName(cmptOption.name); } } }); var result = prepareResult(existings, existingIdIdxMap, mode); if (isNormalMergeMode || isReplaceMergeMode) { mappingById(result, existings, existingIdIdxMap, newCmptOptions); } if (isNormalMergeMode) { mappingByName(result, newCmptOptions); } if (isNormalMergeMode || isReplaceMergeMode) { mappingByIndex(result, newCmptOptions, isReplaceMergeMode); } else if (isReplaceAllMode) { mappingInReplaceAllMode(result, newCmptOptions); } makeIdAndName(result); // The array `result` MUST NOT contain elided items, otherwise the // forEach will ommit those items and result in incorrect result. return result; } function prepareResult(existings, existingIdIdxMap, mode) { var result = []; if (mode === 'replaceAll') { return result; } // Do not use native `map` to in case that the array `existings` // contains elided items, which will be ommited. for (var index = 0; index < existings.length; index++) { var existing = existings[index]; // Because of replaceMerge, `existing` may be null/undefined. if (existing && existing.id != null) { existingIdIdxMap.set(existing.id, index); } // For non-internal-componnets: // Mode "normalMerge": all existings kept. // Mode "replaceMerge": all existing removed unless mapped by id. // For internal-components: // go with "replaceMerge" approach in both mode. result.push({ existing: mode === 'replaceMerge' || isComponentIdInternal(existing) ? null : existing, newOption: null, keyInfo: null, brandNew: null }); } return result; } function mappingById(result, existings, existingIdIdxMap, newCmptOptions) { // Mapping by id if specified. each(newCmptOptions, function (cmptOption, index) { if (!cmptOption || cmptOption.id == null) { return; } var optionId = makeComparableKey(cmptOption.id); var existingIdx = existingIdIdxMap.get(optionId); if (existingIdx != null) { var resultItem = result[existingIdx]; assert(!resultItem.newOption, 'Duplicated option on id "' + optionId + '".'); resultItem.newOption = cmptOption; // In both mode, if id matched, new option will be merged to // the existings rather than creating new component model. resultItem.existing = existings[existingIdx]; newCmptOptions[index] = null; } }); } function mappingByName(result, newCmptOptions) { // Mapping by name if specified. each(newCmptOptions, function (cmptOption, index) { if (!cmptOption || cmptOption.name == null) { return; } for (var i = 0; i < result.length; i++) { var existing = result[i].existing; if (!result[i].newOption // Consider name: two map to one. // Can not match when both ids existing but different. && existing && (existing.id == null || cmptOption.id == null) && !isComponentIdInternal(cmptOption) && !isComponentIdInternal(existing) && keyExistAndEqual('name', existing, cmptOption)) { result[i].newOption = cmptOption; newCmptOptions[index] = null; return; } } }); } function mappingByIndex(result, newCmptOptions, brandNew) { each(newCmptOptions, function (cmptOption) { if (!cmptOption) { return; } // Find the first place that not mapped by id and not internal component (consider the "hole"). var resultItem; var nextIdx = 0; while ( // Be `!resultItem` only when `nextIdx >= result.length`. (resultItem = result[nextIdx]) && ( // (1) Existing models that already have id should be able to mapped to. Because // after mapping performed, model will always be assigned with an id if user not given. // After that all models have id. // (2) If new option has id, it can only set to a hole or append to the last. It should // not be merged to the existings with different id. Because id should not be overwritten. // (3) Name can be overwritten, because axis use name as 'show label text'. resultItem.newOption || isComponentIdInternal(resultItem.existing) || // In mode "replaceMerge", here no not-mapped-non-internal-existing. resultItem.existing && cmptOption.id != null && !keyExistAndEqual('id', cmptOption, resultItem.existing))) { nextIdx++; } if (resultItem) { resultItem.newOption = cmptOption; resultItem.brandNew = brandNew; } else { result.push({ newOption: cmptOption, brandNew: brandNew, existing: null, keyInfo: null }); } nextIdx++; }); } function mappingInReplaceAllMode(result, newCmptOptions) { each(newCmptOptions, function (cmptOption) { // The feature "reproduce" requires "hole" will also reproduced // in case that compoennt index referring are broken. result.push({ newOption: cmptOption, brandNew: true, existing: null, keyInfo: null }); }); } /** * Make id and name for mapping result (result of mappingToExists) * into `keyInfo` field. */ function makeIdAndName(mapResult) { // We use this id to hash component models and view instances // in echarts. id can be specified by user, or auto generated. // The id generation rule ensures new view instance are able // to mapped to old instance when setOption are called in // no-merge mode. So we generate model id by name and plus // type in view id. // name can be duplicated among components, which is convenient // to specify multi components (like series) by one name. // Ensure that each id is distinct. var idMap = createHashMap(); each(mapResult, function (item) { var existing = item.existing; existing && idMap.set(existing.id, item); }); each(mapResult, function (item) { var opt = item.newOption; // Force ensure id not duplicated. assert(!opt || opt.id == null || !idMap.get(opt.id) || idMap.get(opt.id) === item, 'id duplicates: ' + (opt && opt.id)); opt && opt.id != null && idMap.set(opt.id, item); !item.keyInfo && (item.keyInfo = {}); }); // Make name and id. each(mapResult, function (item, index) { var existing = item.existing; var opt = item.newOption; var keyInfo = item.keyInfo; if (!isObject(opt)) { return; } // name can be overwitten. Consider case: axis.name = '20km'. // But id generated by name will not be changed, which affect // only in that case: setOption with 'not merge mode' and view // instance will be recreated, which can be accepted. keyInfo.name = opt.name != null ? makeComparableKey(opt.name) : existing ? existing.name // Avoid diffferent series has the same name, // because name may be used like in color pallet. : DUMMY_COMPONENT_NAME_PREFIX + index; if (existing) { keyInfo.id = makeComparableKey(existing.id); } else if (opt.id != null) { keyInfo.id = makeComparableKey(opt.id); } else { // Consider this situatoin: // optionA: [{name: 'a'}, {name: 'a'}, {..}] // optionB [{..}, {name: 'a'}, {name: 'a'}] // Series with the same name between optionA and optionB // should be mapped. var idNum = 0; do { keyInfo.id = '\0' + keyInfo.name + '\0' + idNum++; } while (idMap.get(keyInfo.id)); } idMap.set(keyInfo.id, item); }); } function keyExistAndEqual(attr, obj1, obj2) { var key1 = convertOptionIdName(obj1[attr], null); var key2 = convertOptionIdName(obj2[attr], null); // See `MappingExistingItem`. `id` and `name` trade string equals to number. return key1 != null && key2 != null && key1 === key2; } /** * @return return null if not exist. */ function makeComparableKey(val) { if ("development" !== 'production') { if (val == null) { throw new Error(); } } return convertOptionIdName(val, ''); } function convertOptionIdName(idOrName, defaultValue) { if (idOrName == null) { return defaultValue; } var type = typeof idOrName; return type === 'string' ? idOrName : type === 'number' || isStringSafe(idOrName) ? idOrName + '' : defaultValue; } function warnInvalidateIdOrName(idOrName) { if ("development" !== 'production') { warn('`' + idOrName + '` is invalid id or name. Must be a string or number.'); } } function isValidIdOrName(idOrName) { return isStringSafe(idOrName) || isNumeric(idOrName); } function isNameSpecified(componentModel) { var name = componentModel.name; // Is specified when `indexOf` get -1 or > 0. return !!(name && name.indexOf(DUMMY_COMPONENT_NAME_PREFIX)); } /** * @public * @param {Object} cmptOption * @return {boolean} */ function isComponentIdInternal(cmptOption) { return cmptOption && cmptOption.id != null && makeComparableKey(cmptOption.id).indexOf(INTERNAL_COMPONENT_ID_PREFIX) === 0; } function makeInternalComponentId(idSuffix) { return INTERNAL_COMPONENT_ID_PREFIX + idSuffix; } function setComponentTypeToKeyInfo(mappingResult, mainType, componentModelCtor) { // Set mainType and complete subType. each(mappingResult, function (item) { var newOption = item.newOption; if (isObject(newOption)) { item.keyInfo.mainType = mainType; item.keyInfo.subType = determineSubType(mainType, newOption, item.existing, componentModelCtor); } }); } function determineSubType(mainType, newCmptOption, existComponent, componentModelCtor) { var subType = newCmptOption.type ? newCmptOption.type : existComponent ? existComponent.subType // Use determineSubType only when there is no existComponent. : componentModelCtor.determineSubType(mainType, newCmptOption); // tooltip, markline, markpoint may always has no subType return subType; } /** * A helper for removing duplicate items between batchA and batchB, * and in themselves, and categorize by series. * * @param batchA Like: [{seriesId: 2, dataIndex: [32, 4, 5]}, ...] * @param batchB Like: [{seriesId: 2, dataIndex: [32, 4, 5]}, ...] * @return result: [resultBatchA, resultBatchB] */ function compressBatches(batchA, batchB) { var mapA = {}; var mapB = {}; makeMap(batchA || [], mapA); makeMap(batchB || [], mapB, mapA); return [mapToArray(mapA), mapToArray(mapB)]; function makeMap(sourceBatch, map, otherMap) { for (var i = 0, len = sourceBatch.length; i < len; i++) { var seriesId = convertOptionIdName(sourceBatch[i].seriesId, null); if (seriesId == null) { return; } var dataIndices = normalizeToArray(sourceBatch[i].dataIndex); var otherDataIndices = otherMap && otherMap[seriesId]; for (var j = 0, lenj = dataIndices.length; j < lenj; j++) { var dataIndex = dataIndices[j]; if (otherDataIndices && otherDataIndices[dataIndex]) { otherDataIndices[dataIndex] = null; } else { (map[seriesId] || (map[seriesId] = {}))[dataIndex] = 1; } } } } function mapToArray(map, isData) { var result = []; for (var i in map) { if (map.hasOwnProperty(i) && map[i] != null) { if (isData) { result.push(+i); } else { var dataIndices = mapToArray(map[i], true); dataIndices.length && result.push({ seriesId: i, dataIndex: dataIndices }); } } } return result; } } /** * @param payload Contains dataIndex (means rawIndex) / dataIndexInside / name * each of which can be Array or primary type. * @return dataIndex If not found, return undefined/null. */ function queryDataIndex(data, payload) { if (payload.dataIndexInside != null) { return payload.dataIndexInside; } else if (payload.dataIndex != null) { return isArray(payload.dataIndex) ? map(payload.dataIndex, function (value) { return data.indexOfRawIndex(value); }) : data.indexOfRawIndex(payload.dataIndex); } else if (payload.name != null) { return isArray(payload.name) ? map(payload.name, function (value) { return data.indexOfName(value); }) : data.indexOfName(payload.name); } } /** * Enable property storage to any host object. * Notice: Serialization is not supported. * * For example: * let inner = zrUitl.makeInner(); * * function some1(hostObj) { * inner(hostObj).someProperty = 1212; * ... * } * function some2() { * let fields = inner(this); * fields.someProperty1 = 1212; * fields.someProperty2 = 'xx'; * ... * } * * @return {Function} */ function makeInner() { var key = '__ec_inner_' + innerUniqueIndex++; return function (hostObj) { return hostObj[key] || (hostObj[key] = {}); }; } var innerUniqueIndex = getRandomIdBase(); /** * The same behavior as `component.getReferringComponents`. */ function parseFinder(ecModel, finderInput, opt) { var _a = preParseFinder(finderInput, opt), mainTypeSpecified = _a.mainTypeSpecified, queryOptionMap = _a.queryOptionMap, others = _a.others; var result = others; var defaultMainType = opt ? opt.defaultMainType : null; if (!mainTypeSpecified && defaultMainType) { queryOptionMap.set(defaultMainType, {}); } queryOptionMap.each(function (queryOption, mainType) { var queryResult = queryReferringComponents(ecModel, mainType, queryOption, { useDefault: defaultMainType === mainType, enableAll: opt && opt.enableAll != null ? opt.enableAll : true, enableNone: opt && opt.enableNone != null ? opt.enableNone : true }); result[mainType + 'Models'] = queryResult.models; result[mainType + 'Model'] = queryResult.models[0]; }); return result; } function preParseFinder(finderInput, opt) { var finder; if (isString(finderInput)) { var obj = {}; obj[finderInput + 'Index'] = 0; finder = obj; } else { finder = finderInput; } var queryOptionMap = createHashMap(); var others = {}; var mainTypeSpecified = false; each(finder, function (value, key) { // Exclude 'dataIndex' and other illgal keys. if (key === 'dataIndex' || key === 'dataIndexInside') { others[key] = value; return; } var parsedKey = key.match(/^(\w+)(Index|Id|Name)$/) || []; var mainType = parsedKey[1]; var queryType = (parsedKey[2] || '').toLowerCase(); if (!mainType || !queryType || opt && opt.includeMainTypes && indexOf(opt.includeMainTypes, mainType) < 0) { return; } mainTypeSpecified = mainTypeSpecified || !!mainType; var queryOption = queryOptionMap.get(mainType) || queryOptionMap.set(mainType, {}); queryOption[queryType] = value; }); return { mainTypeSpecified: mainTypeSpecified, queryOptionMap: queryOptionMap, others: others }; } var SINGLE_REFERRING = { useDefault: true, enableAll: false, enableNone: false }; var MULTIPLE_REFERRING = { useDefault: false, enableAll: true, enableNone: true }; function queryReferringComponents(ecModel, mainType, userOption, opt) { opt = opt || SINGLE_REFERRING; var indexOption = userOption.index; var idOption = userOption.id; var nameOption = userOption.name; var result = { models: null, specified: indexOption != null || idOption != null || nameOption != null }; if (!result.specified) { // Use the first as default if `useDefault`. var firstCmpt = void 0; result.models = opt.useDefault && (firstCmpt = ecModel.getComponent(mainType)) ? [firstCmpt] : []; return result; } if (indexOption === 'none' || indexOption === false) { assert(opt.enableNone, '`"none"` or `false` is not a valid value on index option.'); result.models = []; return result; } // `queryComponents` will return all components if // both all of index/id/name are null/undefined. if (indexOption === 'all') { assert(opt.enableAll, '`"all"` is not a valid value on index option.'); indexOption = idOption = nameOption = null; } result.models = ecModel.queryComponents({ mainType: mainType, index: indexOption, id: idOption, name: nameOption }); return result; } function setAttribute(dom, key, value) { dom.setAttribute ? dom.setAttribute(key, value) : dom[key] = value; } function getAttribute(dom, key) { return dom.getAttribute ? dom.getAttribute(key) : dom[key]; } function getTooltipRenderMode(renderModeOption) { if (renderModeOption === 'auto') { // Using html when `document` exists, use richText otherwise return env.domSupported ? 'html' : 'richText'; } else { return renderModeOption || 'html'; } } /** * Group a list by key. */ function groupData(array, getKey // return key ) { var buckets = createHashMap(); var keys = []; each(array, function (item) { var key = getKey(item); (buckets.get(key) || (keys.push(key), buckets.set(key, []))).push(item); }); return { keys: keys, buckets: buckets }; } /** * Interpolate raw values of a series with percent * * @param data data * @param labelModel label model of the text element * @param sourceValue start value. May be null/undefined when init. * @param targetValue end value * @param percent 0~1 percentage; 0 uses start value while 1 uses end value * @return interpolated values * If `sourceValue` and `targetValue` are `number`, return `number`. * If `sourceValue` and `targetValue` are `string`, return `string`. * If `sourceValue` and `targetValue` are `(string | number)[]`, return `(string | number)[]`. * Other cases do not supported. */ function interpolateRawValues(data, precision, sourceValue, targetValue, percent) { var isAutoPrecision = precision == null || precision === 'auto'; if (targetValue == null) { return targetValue; } if (typeof targetValue === 'number') { var value = interpolateNumber(sourceValue || 0, targetValue, percent); return round(value, isAutoPrecision ? Math.max(getPrecisionSafe(sourceValue || 0), getPrecisionSafe(targetValue)) : precision); } else if (typeof targetValue === 'string') { return percent < 1 ? sourceValue : targetValue; } else { var interpolated = []; var leftArr = sourceValue; var rightArr = targetValue; var length_1 = Math.max(leftArr ? leftArr.length : 0, rightArr.length); for (var i = 0; i < length_1; ++i) { var info = data.getDimensionInfo(i); // Don't interpolate ordinal dims if (info.type === 'ordinal') { // In init, there is no `sourceValue`, but should better not to get undefined result. interpolated[i] = (percent < 1 && leftArr ? leftArr : rightArr)[i]; } else { var leftVal = leftArr && leftArr[i] ? leftArr[i] : 0; var rightVal = rightArr[i]; var value = interpolateNumber(leftVal, rightVal, percent); interpolated[i] = round(value, isAutoPrecision ? Math.max(getPrecisionSafe(leftVal), getPrecisionSafe(rightVal)) : precision); } } return interpolated; } } var TYPE_DELIMITER = '.'; var IS_CONTAINER = '___EC__COMPONENT__CONTAINER___'; var IS_EXTENDED_CLASS = '___EC__EXTENDED_CLASS___'; /** * Notice, parseClassType('') should returns {main: '', sub: ''} * @public */ function parseClassType(componentType) { var ret = { main: '', sub: '' }; if (componentType) { var typeArr = componentType.split(TYPE_DELIMITER); ret.main = typeArr[0] || ''; ret.sub = typeArr[1] || ''; } return ret; } /** * @public */ function checkClassType(componentType) { assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(componentType), 'componentType "' + componentType + '" illegal'); } function isExtendedClass(clz) { return !!(clz && clz[IS_EXTENDED_CLASS]); } /** * Implements `ExtendableConstructor` for `rootClz`. * * @usage * ```ts * class Xxx {} * type XxxConstructor = typeof Xxx & ExtendableConstructor * enableClassExtend(Xxx as XxxConstructor); * ``` */ function enableClassExtend(rootClz, mandatoryMethods) { rootClz.$constructor = rootClz; // FIXME: not necessary? rootClz.extend = function (proto) { if ("development" !== 'production') { each(mandatoryMethods, function (method) { if (!proto[method]) { console.warn('Method `' + method + '` should be implemented' + (proto.type ? ' in ' + proto.type : '') + '.'); } }); } var superClass = this; // For backward compat, we both support ts class inheritance and this // "extend" approach. // The constructor should keep the same behavior as ts class inheritance: // If this constructor/$constructor is not declared, auto invoke the super // constructor. // If this constructor/$constructor is declared, it is responsible for // calling the super constructor. function ExtendedClass() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } if (!proto.$constructor) { if (!isESClass(superClass)) { // Will throw error if superClass is an es6 native class. superClass.apply(this, arguments); } else { var ins = createObject( // @ts-ignore ExtendedClass.prototype, new (superClass.bind.apply(superClass, __spreadArrays([void 0], args)))()); return ins; } } else { proto.$constructor.apply(this, arguments); } } ExtendedClass[IS_EXTENDED_CLASS] = true; extend(ExtendedClass.prototype, proto); ExtendedClass.extend = this.extend; ExtendedClass.superCall = superCall; ExtendedClass.superApply = superApply; inherits(ExtendedClass, this); ExtendedClass.superClass = superClass; return ExtendedClass; }; } function isESClass(fn) { return typeof fn === 'function' && /^class\s/.test(Function.prototype.toString.call(fn)); } /** * A work around to both support ts extend and this extend mechanism. * on sub-class. * @usage * ```ts * class Component { ... } * classUtil.enableClassExtend(Component); * classUtil.enableClassManagement(Component, {registerWhenExtend: true}); * * class Series extends Component { ... } * // Without calling `markExtend`, `registerWhenExtend` will not work. * Component.markExtend(Series); * ``` */ function mountExtend(SubClz, SupperClz) { SubClz.extend = SupperClz.extend; } // A random offset. var classBase = Math.round(Math.random() * 10); /** * Implements `CheckableConstructor` for `target`. * Can not use instanceof, consider different scope by * cross domain or es module import in ec extensions. * Mount a method "isInstance()" to Clz. * * @usage * ```ts * class Xxx {} * type XxxConstructor = typeof Xxx & CheckableConstructor; * enableClassCheck(Xxx as XxxConstructor) * ``` */ function enableClassCheck(target) { var classAttr = ['__\0is_clz', classBase++].join('_'); target.prototype[classAttr] = true; if ("development" !== 'production') { assert(!target.isInstance, 'The method "is" can not be defined.'); } target.isInstance = function (obj) { return !!(obj && obj[classAttr]); }; } // superCall should have class info, which can not be fetch from 'this'. // Consider this case: // class A has method f, // class B inherits class A, overrides method f, f call superApply('f'), // class C inherits class B, do not overrides method f, // then when method of class C is called, dead loop occured. function superCall(context, methodName) { var args = []; for (var _i = 2; _i < arguments.length; _i++) { args[_i - 2] = arguments[_i]; } return this.superClass.prototype[methodName].apply(context, args); } function superApply(context, methodName, args) { return this.superClass.prototype[methodName].apply(context, args); } /** * Implements `ClassManager` for `target` * * @usage * ```ts * class Xxx {} * type XxxConstructor = typeof Xxx & ClassManager * enableClassManagement(Xxx as XxxConstructor); * ``` */ function enableClassManagement(target) { /** * Component model classes * key: componentType, * value: * componentClass, when componentType is 'xxx' * or Object., when componentType is 'xxx.yy' */ var storage = {}; target.registerClass = function (clz) { // `type` should not be a "instance memeber". // If using TS class, should better declared as `static type = 'series.pie'`. // otherwise users have to mount `type` on prototype manually. // For backward compat and enable instance visit type via `this.type`, // we stil support fetch `type` from prototype. var componentFullType = clz.type || clz.prototype.type; if (componentFullType) { checkClassType(componentFullType); // If only static type declared, we assign it to prototype mandatorily. clz.prototype.type = componentFullType; var componentTypeInfo = parseClassType(componentFullType); if (!componentTypeInfo.sub) { if ("development" !== 'production') { if (storage[componentTypeInfo.main]) { console.warn(componentTypeInfo.main + ' exists.'); } } storage[componentTypeInfo.main] = clz; } else if (componentTypeInfo.sub !== IS_CONTAINER) { var container = makeContainer(componentTypeInfo); container[componentTypeInfo.sub] = clz; } } return clz; }; target.getClass = function (mainType, subType, throwWhenNotFound) { var clz = storage[mainType]; if (clz && clz[IS_CONTAINER]) { clz = subType ? clz[subType] : null; } if (throwWhenNotFound && !clz) { throw new Error(!subType ? mainType + '.' + 'type should be specified.' : 'Component ' + mainType + '.' + (subType || '') + ' is used but not imported.'); } return clz; }; target.getClassesByMainType = function (componentType) { var componentTypeInfo = parseClassType(componentType); var result = []; var obj = storage[componentTypeInfo.main]; if (obj && obj[IS_CONTAINER]) { each(obj, function (o, type) { type !== IS_CONTAINER && result.push(o); }); } else { result.push(obj); } return result; }; target.hasClass = function (componentType) { // Just consider componentType.main. var componentTypeInfo = parseClassType(componentType); return !!storage[componentTypeInfo.main]; }; /** * @return Like ['aa', 'bb'], but can not be ['aa.xx'] */ target.getAllClassMainTypes = function () { var types = []; each(storage, function (obj, type) { types.push(type); }); return types; }; /** * If a main type is container and has sub types */ target.hasSubTypes = function (componentType) { var componentTypeInfo = parseClassType(componentType); var obj = storage[componentTypeInfo.main]; return obj && obj[IS_CONTAINER]; }; function makeContainer(componentTypeInfo) { var container = storage[componentTypeInfo.main]; if (!container || !container[IS_CONTAINER]) { container = storage[componentTypeInfo.main] = {}; container[IS_CONTAINER] = true; } return container; } } // /** // * @param {string|Array.} properties // */ // export function setReadOnly(obj, properties) { // FIXME It seems broken in IE8 simulation of IE11 // if (!zrUtil.isArray(properties)) { // properties = properties != null ? [properties] : []; // } // zrUtil.each(properties, function (prop) { // let value = obj[prop]; // Object.defineProperty // && Object.defineProperty(obj, prop, { // value: value, writable: false // }); // zrUtil.isArray(obj[prop]) // && Object.freeze // && Object.freeze(obj[prop]); // }); // } function makeStyleMapper(properties, ignoreParent) { // Normalize for (var i = 0; i < properties.length; i++) { if (!properties[i][1]) { properties[i][1] = properties[i][0]; } } ignoreParent = ignoreParent || false; return function (model, excludes, includes) { var style = {}; for (var i = 0; i < properties.length; i++) { var propName = properties[i][1]; if (excludes && indexOf(excludes, propName) >= 0 || includes && indexOf(includes, propName) < 0) { continue; } var val = model.getShallow(propName, ignoreParent); if (val != null) { style[properties[i][0]] = val; } } // TODO Text or image? return style; }; } var AREA_STYLE_KEY_MAP = [['fill', 'color'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['opacity'], ['shadowColor'] // Option decal is in `DecalObject` but style.decal is in `PatternObject`. // So do not transfer decal directly. ]; var getAreaStyle = makeStyleMapper(AREA_STYLE_KEY_MAP); var AreaStyleMixin = /** @class */ function () { function AreaStyleMixin() {} AreaStyleMixin.prototype.getAreaStyle = function (excludes, includes) { return getAreaStyle(this, excludes, includes); }; return AreaStyleMixin; }(); var globalImageCache = new LRU(50); function findExistImage(newImageOrSrc) { if (typeof newImageOrSrc === 'string') { var cachedImgObj = globalImageCache.get(newImageOrSrc); return cachedImgObj && cachedImgObj.image; } else { return newImageOrSrc; } } function createOrUpdateImage(newImageOrSrc, image, hostEl, onload, cbPayload) { if (!newImageOrSrc) { return image; } else if (typeof newImageOrSrc === 'string') { if ((image && image.__zrImageSrc === newImageOrSrc) || !hostEl) { return image; } var cachedImgObj = globalImageCache.get(newImageOrSrc); var pendingWrap = { hostEl: hostEl, cb: onload, cbPayload: cbPayload }; if (cachedImgObj) { image = cachedImgObj.image; !isImageReady(image) && cachedImgObj.pending.push(pendingWrap); } else { image = new Image(); image.onload = image.onerror = imageOnLoad; globalImageCache.put(newImageOrSrc, image.__cachedImgObj = { image: image, pending: [pendingWrap] }); image.src = image.__zrImageSrc = newImageOrSrc; } return image; } else { return newImageOrSrc; } } function imageOnLoad() { var cachedImgObj = this.__cachedImgObj; this.onload = this.onerror = this.__cachedImgObj = null; for (var i = 0; i < cachedImgObj.pending.length; i++) { var pendingWrap = cachedImgObj.pending[i]; var cb = pendingWrap.cb; cb && cb(this, pendingWrap.cbPayload); pendingWrap.hostEl.dirty(); } cachedImgObj.pending.length = 0; } function isImageReady(image) { return image && image.width && image.height; } var STYLE_REG = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g; function truncateText(text, containerWidth, font, ellipsis, options) { if (!containerWidth) { return ''; } var textLines = (text + '').split('\n'); options = prepareTruncateOptions(containerWidth, font, ellipsis, options); for (var i = 0, len = textLines.length; i < len; i++) { textLines[i] = truncateSingleLine(textLines[i], options); } return textLines.join('\n'); } function prepareTruncateOptions(containerWidth, font, ellipsis, options) { options = options || {}; var preparedOpts = extend({}, options); preparedOpts.font = font; ellipsis = retrieve2(ellipsis, '...'); preparedOpts.maxIterations = retrieve2(options.maxIterations, 2); var minChar = preparedOpts.minChar = retrieve2(options.minChar, 0); preparedOpts.cnCharWidth = getWidth('国', font); var ascCharWidth = preparedOpts.ascCharWidth = getWidth('a', font); preparedOpts.placeholder = retrieve2(options.placeholder, ''); var contentWidth = containerWidth = Math.max(0, containerWidth - 1); for (var i = 0; i < minChar && contentWidth >= ascCharWidth; i++) { contentWidth -= ascCharWidth; } var ellipsisWidth = getWidth(ellipsis, font); if (ellipsisWidth > contentWidth) { ellipsis = ''; ellipsisWidth = 0; } contentWidth = containerWidth - ellipsisWidth; preparedOpts.ellipsis = ellipsis; preparedOpts.ellipsisWidth = ellipsisWidth; preparedOpts.contentWidth = contentWidth; preparedOpts.containerWidth = containerWidth; return preparedOpts; } function truncateSingleLine(textLine, options) { var containerWidth = options.containerWidth; var font = options.font; var contentWidth = options.contentWidth; if (!containerWidth) { return ''; } var lineWidth = getWidth(textLine, font); if (lineWidth <= containerWidth) { return textLine; } for (var j = 0;; j++) { if (lineWidth <= contentWidth || j >= options.maxIterations) { textLine += options.ellipsis; break; } var subLength = j === 0 ? estimateLength(textLine, contentWidth, options.ascCharWidth, options.cnCharWidth) : lineWidth > 0 ? Math.floor(textLine.length * contentWidth / lineWidth) : 0; textLine = textLine.substr(0, subLength); lineWidth = getWidth(textLine, font); } if (textLine === '') { textLine = options.placeholder; } return textLine; } function estimateLength(text, contentWidth, ascCharWidth, cnCharWidth) { var width = 0; var i = 0; for (var len = text.length; i < len && width < contentWidth; i++) { var charCode = text.charCodeAt(i); width += (0 <= charCode && charCode <= 127) ? ascCharWidth : cnCharWidth; } return i; } function parsePlainText(text, style) { text != null && (text += ''); var overflow = style.overflow; var padding = style.padding; var font = style.font; var truncate = overflow === 'truncate'; var calculatedLineHeight = getLineHeight(font); var lineHeight = retrieve2(style.lineHeight, calculatedLineHeight); var truncateLineOverflow = style.lineOverflow === 'truncate'; var width = style.width; var lines; if (width != null && overflow === 'break' || overflow === 'breakAll') { lines = text ? wrapText(text, style.font, width, overflow === 'breakAll', 0).lines : []; } else { lines = text ? text.split('\n') : []; } var contentHeight = lines.length * lineHeight; var height = retrieve2(style.height, contentHeight); if (contentHeight > height && truncateLineOverflow) { var lineCount = Math.floor(height / lineHeight); lines = lines.slice(0, lineCount); } var outerHeight = height; var outerWidth = width; if (padding) { outerHeight += padding[0] + padding[2]; if (outerWidth != null) { outerWidth += padding[1] + padding[3]; } } if (text && truncate && outerWidth != null) { var options = prepareTruncateOptions(width, font, style.ellipsis, { minChar: style.truncateMinChar, placeholder: style.placeholder }); for (var i = 0; i < lines.length; i++) { lines[i] = truncateSingleLine(lines[i], options); } } if (width == null) { var maxWidth = 0; for (var i = 0; i < lines.length; i++) { maxWidth = Math.max(getWidth(lines[i], font), maxWidth); } width = maxWidth; } return { lines: lines, height: height, outerHeight: outerHeight, lineHeight: lineHeight, calculatedLineHeight: calculatedLineHeight, contentHeight: contentHeight, width: width }; } var RichTextToken = (function () { function RichTextToken() { } return RichTextToken; }()); var RichTextLine = (function () { function RichTextLine(tokens) { this.tokens = []; if (tokens) { this.tokens = tokens; } } return RichTextLine; }()); var RichTextContentBlock = (function () { function RichTextContentBlock() { this.width = 0; this.height = 0; this.contentWidth = 0; this.contentHeight = 0; this.outerWidth = 0; this.outerHeight = 0; this.lines = []; } return RichTextContentBlock; }()); function parseRichText(text, style) { var contentBlock = new RichTextContentBlock(); text != null && (text += ''); if (!text) { return contentBlock; } var topWidth = style.width; var topHeight = style.height; var overflow = style.overflow; var wrapInfo = (overflow === 'break' || overflow === 'breakAll') && topWidth != null ? { width: topWidth, accumWidth: 0, breakAll: overflow === 'breakAll' } : null; var lastIndex = STYLE_REG.lastIndex = 0; var result; while ((result = STYLE_REG.exec(text)) != null) { var matchedIndex = result.index; if (matchedIndex > lastIndex) { pushTokens(contentBlock, text.substring(lastIndex, matchedIndex), style, wrapInfo); } pushTokens(contentBlock, result[2], style, wrapInfo, result[1]); lastIndex = STYLE_REG.lastIndex; } if (lastIndex < text.length) { pushTokens(contentBlock, text.substring(lastIndex, text.length), style, wrapInfo); } var pendingList = []; var calculatedHeight = 0; var calculatedWidth = 0; var stlPadding = style.padding; var truncate = overflow === 'truncate'; var truncateLine = style.lineOverflow === 'truncate'; function finishLine(line, lineWidth, lineHeight) { line.width = lineWidth; line.lineHeight = lineHeight; calculatedHeight += lineHeight; calculatedWidth = Math.max(calculatedWidth, lineWidth); } outer: for (var i = 0; i < contentBlock.lines.length; i++) { var line = contentBlock.lines[i]; var lineHeight = 0; var lineWidth = 0; for (var j = 0; j < line.tokens.length; j++) { var token = line.tokens[j]; var tokenStyle = token.styleName && style.rich[token.styleName] || {}; var textPadding = token.textPadding = tokenStyle.padding; var paddingH = textPadding ? textPadding[1] + textPadding[3] : 0; var font = token.font = tokenStyle.font || style.font; token.contentHeight = getLineHeight(font); var tokenHeight = retrieve2(tokenStyle.height, token.contentHeight); token.innerHeight = tokenHeight; textPadding && (tokenHeight += textPadding[0] + textPadding[2]); token.height = tokenHeight; token.lineHeight = retrieve3(tokenStyle.lineHeight, style.lineHeight, tokenHeight); token.align = tokenStyle && tokenStyle.align || style.align; token.verticalAlign = tokenStyle && tokenStyle.verticalAlign || 'middle'; if (truncateLine && topHeight != null && calculatedHeight + token.lineHeight > topHeight) { if (j > 0) { line.tokens = line.tokens.slice(0, j); finishLine(line, lineWidth, lineHeight); contentBlock.lines = contentBlock.lines.slice(0, i + 1); } else { contentBlock.lines = contentBlock.lines.slice(0, i); } break outer; } var styleTokenWidth = tokenStyle.width; var tokenWidthNotSpecified = styleTokenWidth == null || styleTokenWidth === 'auto'; if (typeof styleTokenWidth === 'string' && styleTokenWidth.charAt(styleTokenWidth.length - 1) === '%') { token.percentWidth = styleTokenWidth; pendingList.push(token); token.contentWidth = getWidth(token.text, font); } else { if (tokenWidthNotSpecified) { var textBackgroundColor = tokenStyle.backgroundColor; var bgImg = textBackgroundColor && textBackgroundColor.image; if (bgImg) { bgImg = findExistImage(bgImg); if (isImageReady(bgImg)) { token.width = Math.max(token.width, bgImg.width * tokenHeight / bgImg.height); } } } var remainTruncWidth = truncate && topWidth != null ? topWidth - lineWidth : null; if (remainTruncWidth != null && remainTruncWidth < token.width) { if (!tokenWidthNotSpecified || remainTruncWidth < paddingH) { token.text = ''; token.width = token.contentWidth = 0; } else { token.text = truncateText(token.text, remainTruncWidth - paddingH, font, style.ellipsis, { minChar: style.truncateMinChar }); token.width = token.contentWidth = getWidth(token.text, font); } } else { token.contentWidth = getWidth(token.text, font); } } token.width += paddingH; lineWidth += token.width; tokenStyle && (lineHeight = Math.max(lineHeight, token.lineHeight)); } finishLine(line, lineWidth, lineHeight); } contentBlock.outerWidth = contentBlock.width = retrieve2(topWidth, calculatedWidth); contentBlock.outerHeight = contentBlock.height = retrieve2(topHeight, calculatedHeight); contentBlock.contentHeight = calculatedHeight; contentBlock.contentWidth = calculatedWidth; if (stlPadding) { contentBlock.outerWidth += stlPadding[1] + stlPadding[3]; contentBlock.outerHeight += stlPadding[0] + stlPadding[2]; } for (var i = 0; i < pendingList.length; i++) { var token = pendingList[i]; var percentWidth = token.percentWidth; token.width = parseInt(percentWidth, 10) / 100 * contentBlock.width; } return contentBlock; } function pushTokens(block, str, style, wrapInfo, styleName) { var isEmptyStr = str === ''; var tokenStyle = styleName && style.rich[styleName] || {}; var lines = block.lines; var font = tokenStyle.font || style.font; var newLine = false; var strLines; var linesWidths; if (wrapInfo) { var tokenPadding = tokenStyle.padding; var tokenPaddingH = tokenPadding ? tokenPadding[1] + tokenPadding[3] : 0; if (tokenStyle.width != null && tokenStyle.width !== 'auto') { var outerWidth_1 = parsePercent(tokenStyle.width, wrapInfo.width) + tokenPaddingH; if (lines.length > 0) { if (outerWidth_1 + wrapInfo.accumWidth > wrapInfo.width) { strLines = str.split('\n'); newLine = true; } } wrapInfo.accumWidth = outerWidth_1; } else { var res = wrapText(str, font, wrapInfo.width, wrapInfo.breakAll, wrapInfo.accumWidth); wrapInfo.accumWidth = res.accumWidth + tokenPaddingH; linesWidths = res.linesWidths; strLines = res.lines; } } else { strLines = str.split('\n'); } for (var i = 0; i < strLines.length; i++) { var text = strLines[i]; var token = new RichTextToken(); token.styleName = styleName; token.text = text; token.isLineHolder = !text && !isEmptyStr; if (typeof tokenStyle.width === 'number') { token.width = tokenStyle.width; } else { token.width = linesWidths ? linesWidths[i] : getWidth(text, font); } if (!i && !newLine) { var tokens = (lines[lines.length - 1] || (lines[0] = new RichTextLine())).tokens; var tokensLen = tokens.length; (tokensLen === 1 && tokens[0].isLineHolder) ? (tokens[0] = token) : ((text || !tokensLen || isEmptyStr) && tokens.push(token)); } else { lines.push(new RichTextLine([token])); } } } function isLatin(ch) { var code = ch.charCodeAt(0); return code >= 0x21 && code <= 0xFF; } var breakCharMap = reduce(',&?/;] '.split(''), function (obj, ch) { obj[ch] = true; return obj; }, {}); function isWordBreakChar(ch) { if (isLatin(ch)) { if (breakCharMap[ch]) { return true; } return false; } return true; } function wrapText(text, font, lineWidth, isBreakAll, lastAccumWidth) { var lines = []; var linesWidths = []; var line = ''; var currentWord = ''; var currentWordWidth = 0; var accumWidth = 0; for (var i = 0; i < text.length; i++) { var ch = text.charAt(i); if (ch === '\n') { if (currentWord) { line += currentWord; accumWidth += currentWordWidth; } lines.push(line); linesWidths.push(accumWidth); line = ''; currentWord = ''; currentWordWidth = 0; accumWidth = 0; continue; } var chWidth = getWidth(ch, font); var inWord = isBreakAll ? false : !isWordBreakChar(ch); if (!lines.length ? lastAccumWidth + accumWidth + chWidth > lineWidth : accumWidth + chWidth > lineWidth) { if (!accumWidth) { if (inWord) { lines.push(currentWord); linesWidths.push(currentWordWidth); currentWord = ch; currentWordWidth = chWidth; } else { lines.push(ch); linesWidths.push(chWidth); } } else if (line || currentWord) { if (inWord) { if (!line) { line = currentWord; currentWord = ''; currentWordWidth = 0; accumWidth = currentWordWidth; } lines.push(line); linesWidths.push(accumWidth - currentWordWidth); currentWord += ch; currentWordWidth += chWidth; line = ''; accumWidth = currentWordWidth; } else { if (currentWord) { line += currentWord; accumWidth += currentWordWidth; currentWord = ''; currentWordWidth = 0; } lines.push(line); linesWidths.push(accumWidth); line = ch; accumWidth = chWidth; } } continue; } accumWidth += chWidth; if (inWord) { currentWord += ch; currentWordWidth += chWidth; } else { if (currentWord) { line += currentWord; currentWord = ''; currentWordWidth = 0; } line += ch; } } if (!lines.length && !line) { line = text; currentWord = ''; currentWordWidth = 0; } if (currentWord) { line += currentWord; } if (line) { lines.push(line); linesWidths.push(accumWidth); } if (lines.length === 1) { accumWidth += lastAccumWidth; } return { accumWidth: accumWidth, lines: lines, linesWidths: linesWidths }; } var STYLE_MAGIC_KEY = '__zr_style_' + Math.round((Math.random() * 10)); var DEFAULT_COMMON_STYLE = { shadowBlur: 0, shadowOffsetX: 0, shadowOffsetY: 0, shadowColor: '#000', opacity: 1, blend: 'source-over' }; var DEFAULT_COMMON_ANIMATION_PROPS = { style: { shadowBlur: true, shadowOffsetX: true, shadowOffsetY: true, shadowColor: true, opacity: true } }; DEFAULT_COMMON_STYLE[STYLE_MAGIC_KEY] = true; var PRIMARY_STATES_KEYS$1 = ['z', 'z2', 'invisible']; var Displayable = (function (_super) { __extends(Displayable, _super); function Displayable(props) { return _super.call(this, props) || this; } Displayable.prototype._init = function (props) { var keysArr = keys(props); for (var i = 0; i < keysArr.length; i++) { var key = keysArr[i]; if (key === 'style') { this.useStyle(props[key]); } else { _super.prototype.attrKV.call(this, key, props[key]); } } if (!this.style) { this.useStyle({}); } }; Displayable.prototype.beforeBrush = function () { }; Displayable.prototype.afterBrush = function () { }; Displayable.prototype.innerBeforeBrush = function () { }; Displayable.prototype.innerAfterBrush = function () { }; Displayable.prototype.shouldBePainted = function (viewWidth, viewHeight, considerClipPath, considerAncestors) { var m = this.transform; if (this.ignore || this.invisible || this.style.opacity === 0 || (this.culling && isDisplayableCulled(this, viewWidth, viewHeight)) || (m && !m[0] && !m[3])) { return false; } if (considerClipPath && this.__clipPaths) { for (var i = 0; i < this.__clipPaths.length; ++i) { if (this.__clipPaths[i].isZeroArea()) { return false; } } } if (considerAncestors && this.parent) { var parent_1 = this.parent; while (parent_1) { if (parent_1.ignore) { return false; } parent_1 = parent_1.parent; } } return true; }; Displayable.prototype.contain = function (x, y) { return this.rectContain(x, y); }; Displayable.prototype.traverse = function (cb, context) { cb.call(context, this); }; Displayable.prototype.rectContain = function (x, y) { var coord = this.transformCoordToLocal(x, y); var rect = this.getBoundingRect(); return rect.contain(coord[0], coord[1]); }; Displayable.prototype.getPaintRect = function () { var rect = this._paintRect; if (!this._paintRect || this.__dirty) { var transform = this.transform; var elRect = this.getBoundingRect(); var style = this.style; var shadowSize = style.shadowBlur || 0; var shadowOffsetX = style.shadowOffsetX || 0; var shadowOffsetY = style.shadowOffsetY || 0; rect = this._paintRect || (this._paintRect = new BoundingRect(0, 0, 0, 0)); if (transform) { BoundingRect.applyTransform(rect, elRect, transform); } else { rect.copy(elRect); } if (shadowSize || shadowOffsetX || shadowOffsetY) { rect.width += shadowSize * 2 + Math.abs(shadowOffsetX); rect.height += shadowSize * 2 + Math.abs(shadowOffsetY); rect.x = Math.min(rect.x, rect.x + shadowOffsetX - shadowSize); rect.y = Math.min(rect.y, rect.y + shadowOffsetY - shadowSize); } var tolerance = this.dirtyRectTolerance; if (!rect.isZero()) { rect.x = Math.floor(rect.x - tolerance); rect.y = Math.floor(rect.y - tolerance); rect.width = Math.ceil(rect.width + 1 + tolerance * 2); rect.height = Math.ceil(rect.height + 1 + tolerance * 2); } } return rect; }; Displayable.prototype.setPrevPaintRect = function (paintRect) { if (paintRect) { this._prevPaintRect = this._prevPaintRect || new BoundingRect(0, 0, 0, 0); this._prevPaintRect.copy(paintRect); } else { this._prevPaintRect = null; } }; Displayable.prototype.getPrevPaintRect = function () { return this._prevPaintRect; }; Displayable.prototype.animateStyle = function (loop) { return this.animate('style', loop); }; Displayable.prototype.updateDuringAnimation = function (targetKey) { if (targetKey === 'style') { this.dirtyStyle(); } else { this.markRedraw(); } }; Displayable.prototype.attrKV = function (key, value) { if (key !== 'style') { _super.prototype.attrKV.call(this, key, value); } else { if (!this.style) { this.useStyle(value); } else { this.setStyle(value); } } }; Displayable.prototype.setStyle = function (keyOrObj, value) { if (typeof keyOrObj === 'string') { this.style[keyOrObj] = value; } else { extend(this.style, keyOrObj); } this.dirtyStyle(); return this; }; Displayable.prototype.dirtyStyle = function () { this.markRedraw(); this.__dirty |= Displayable.STYLE_CHANGED_BIT; if (this._rect) { this._rect = null; } }; Displayable.prototype.dirty = function () { this.dirtyStyle(); }; Displayable.prototype.styleChanged = function () { return !!(this.__dirty & Displayable.STYLE_CHANGED_BIT); }; Displayable.prototype.styleUpdated = function () { this.__dirty &= ~Displayable.STYLE_CHANGED_BIT; }; Displayable.prototype.createStyle = function (obj) { return createObject(DEFAULT_COMMON_STYLE, obj); }; Displayable.prototype.useStyle = function (obj) { if (!obj[STYLE_MAGIC_KEY]) { obj = this.createStyle(obj); } if (this.__inHover) { this.__hoverStyle = obj; } else { this.style = obj; } this.dirtyStyle(); }; Displayable.prototype.isStyleObject = function (obj) { return obj[STYLE_MAGIC_KEY]; }; Displayable.prototype._innerSaveToNormal = function (toState) { _super.prototype._innerSaveToNormal.call(this, toState); var normalState = this._normalState; if (toState.style && !normalState.style) { normalState.style = this._mergeStyle(this.createStyle(), this.style); } this._savePrimaryToNormal(toState, normalState, PRIMARY_STATES_KEYS$1); }; Displayable.prototype._applyStateObj = function (stateName, state, normalState, keepCurrentStates, transition, animationCfg) { _super.prototype._applyStateObj.call(this, stateName, state, normalState, keepCurrentStates, transition, animationCfg); var needsRestoreToNormal = !(state && keepCurrentStates); var targetStyle; if (state && state.style) { if (transition) { if (keepCurrentStates) { targetStyle = state.style; } else { targetStyle = this._mergeStyle(this.createStyle(), normalState.style); this._mergeStyle(targetStyle, state.style); } } else { targetStyle = this._mergeStyle(this.createStyle(), keepCurrentStates ? this.style : normalState.style); this._mergeStyle(targetStyle, state.style); } } else if (needsRestoreToNormal) { targetStyle = normalState.style; } if (targetStyle) { if (transition) { var sourceStyle = this.style; this.style = this.createStyle(needsRestoreToNormal ? {} : sourceStyle); if (needsRestoreToNormal) { var changedKeys = keys(sourceStyle); for (var i = 0; i < changedKeys.length; i++) { var key = changedKeys[i]; if (key in targetStyle) { targetStyle[key] = targetStyle[key]; this.style[key] = sourceStyle[key]; } } } var targetKeys = keys(targetStyle); for (var i = 0; i < targetKeys.length; i++) { var key = targetKeys[i]; this.style[key] = this.style[key]; } this._transitionState(stateName, { style: targetStyle }, animationCfg, this.getAnimationStyleProps()); } else { this.useStyle(targetStyle); } } for (var i = 0; i < PRIMARY_STATES_KEYS$1.length; i++) { var key = PRIMARY_STATES_KEYS$1[i]; if (state && state[key] != null) { this[key] = state[key]; } else if (needsRestoreToNormal) { if (normalState[key] != null) { this[key] = normalState[key]; } } } }; Displayable.prototype._mergeStates = function (states) { var mergedState = _super.prototype._mergeStates.call(this, states); var mergedStyle; for (var i = 0; i < states.length; i++) { var state = states[i]; if (state.style) { mergedStyle = mergedStyle || {}; this._mergeStyle(mergedStyle, state.style); } } if (mergedStyle) { mergedState.style = mergedStyle; } return mergedState; }; Displayable.prototype._mergeStyle = function (targetStyle, sourceStyle) { extend(targetStyle, sourceStyle); return targetStyle; }; Displayable.prototype.getAnimationStyleProps = function () { return DEFAULT_COMMON_ANIMATION_PROPS; }; Displayable.STYLE_CHANGED_BIT = 2; Displayable.initDefaultProps = (function () { var dispProto = Displayable.prototype; dispProto.type = 'displayable'; dispProto.invisible = false; dispProto.z = 0; dispProto.z2 = 0; dispProto.zlevel = 0; dispProto.culling = false; dispProto.cursor = 'pointer'; dispProto.rectHover = false; dispProto.incremental = false; dispProto._rect = null; dispProto.dirtyRectTolerance = 0; dispProto.__dirty = Element.REDARAW_BIT | Displayable.STYLE_CHANGED_BIT; })(); return Displayable; }(Element)); var tmpRect = new BoundingRect(0, 0, 0, 0); var viewRect = new BoundingRect(0, 0, 0, 0); function isDisplayableCulled(el, width, height) { tmpRect.copy(el.getBoundingRect()); if (el.transform) { tmpRect.applyTransform(el.transform); } viewRect.width = width; viewRect.height = height; return !tmpRect.intersect(viewRect); } var mathPow = Math.pow; var mathSqrt = Math.sqrt; var EPSILON$1 = 1e-8; var EPSILON_NUMERIC = 1e-4; var THREE_SQRT = mathSqrt(3); var ONE_THIRD = 1 / 3; var _v0 = create(); var _v1 = create(); var _v2 = create(); function isAroundZero(val) { return val > -EPSILON$1 && val < EPSILON$1; } function isNotAroundZero$1(val) { return val > EPSILON$1 || val < -EPSILON$1; } function cubicAt(p0, p1, p2, p3, t) { var onet = 1 - t; return onet * onet * (onet * p0 + 3 * t * p1) + t * t * (t * p3 + 3 * onet * p2); } function cubicDerivativeAt(p0, p1, p2, p3, t) { var onet = 1 - t; return 3 * (((p1 - p0) * onet + 2 * (p2 - p1) * t) * onet + (p3 - p2) * t * t); } function cubicRootAt(p0, p1, p2, p3, val, roots) { var a = p3 + 3 * (p1 - p2) - p0; var b = 3 * (p2 - p1 * 2 + p0); var c = 3 * (p1 - p0); var d = p0 - val; var A = b * b - 3 * a * c; var B = b * c - 9 * a * d; var C = c * c - 3 * b * d; var n = 0; if (isAroundZero(A) && isAroundZero(B)) { if (isAroundZero(b)) { roots[0] = 0; } else { var t1 = -c / b; if (t1 >= 0 && t1 <= 1) { roots[n++] = t1; } } } else { var disc = B * B - 4 * A * C; if (isAroundZero(disc)) { var K = B / A; var t1 = -b / a + K; var t2 = -K / 2; if (t1 >= 0 && t1 <= 1) { roots[n++] = t1; } if (t2 >= 0 && t2 <= 1) { roots[n++] = t2; } } else if (disc > 0) { var discSqrt = mathSqrt(disc); var Y1 = A * b + 1.5 * a * (-B + discSqrt); var Y2 = A * b + 1.5 * a * (-B - discSqrt); if (Y1 < 0) { Y1 = -mathPow(-Y1, ONE_THIRD); } else { Y1 = mathPow(Y1, ONE_THIRD); } if (Y2 < 0) { Y2 = -mathPow(-Y2, ONE_THIRD); } else { Y2 = mathPow(Y2, ONE_THIRD); } var t1 = (-b - (Y1 + Y2)) / (3 * a); if (t1 >= 0 && t1 <= 1) { roots[n++] = t1; } } else { var T = (2 * A * b - 3 * a * B) / (2 * mathSqrt(A * A * A)); var theta = Math.acos(T) / 3; var ASqrt = mathSqrt(A); var tmp = Math.cos(theta); var t1 = (-b - 2 * ASqrt * tmp) / (3 * a); var t2 = (-b + ASqrt * (tmp + THREE_SQRT * Math.sin(theta))) / (3 * a); var t3 = (-b + ASqrt * (tmp - THREE_SQRT * Math.sin(theta))) / (3 * a); if (t1 >= 0 && t1 <= 1) { roots[n++] = t1; } if (t2 >= 0 && t2 <= 1) { roots[n++] = t2; } if (t3 >= 0 && t3 <= 1) { roots[n++] = t3; } } } return n; } function cubicExtrema(p0, p1, p2, p3, extrema) { var b = 6 * p2 - 12 * p1 + 6 * p0; var a = 9 * p1 + 3 * p3 - 3 * p0 - 9 * p2; var c = 3 * p1 - 3 * p0; var n = 0; if (isAroundZero(a)) { if (isNotAroundZero$1(b)) { var t1 = -c / b; if (t1 >= 0 && t1 <= 1) { extrema[n++] = t1; } } } else { var disc = b * b - 4 * a * c; if (isAroundZero(disc)) { extrema[0] = -b / (2 * a); } else if (disc > 0) { var discSqrt = mathSqrt(disc); var t1 = (-b + discSqrt) / (2 * a); var t2 = (-b - discSqrt) / (2 * a); if (t1 >= 0 && t1 <= 1) { extrema[n++] = t1; } if (t2 >= 0 && t2 <= 1) { extrema[n++] = t2; } } } return n; } function cubicSubdivide(p0, p1, p2, p3, t, out) { var p01 = (p1 - p0) * t + p0; var p12 = (p2 - p1) * t + p1; var p23 = (p3 - p2) * t + p2; var p012 = (p12 - p01) * t + p01; var p123 = (p23 - p12) * t + p12; var p0123 = (p123 - p012) * t + p012; out[0] = p0; out[1] = p01; out[2] = p012; out[3] = p0123; out[4] = p0123; out[5] = p123; out[6] = p23; out[7] = p3; } function cubicProjectPoint(x0, y0, x1, y1, x2, y2, x3, y3, x, y, out) { var t; var interval = 0.005; var d = Infinity; var prev; var next; var d1; var d2; _v0[0] = x; _v0[1] = y; for (var _t = 0; _t < 1; _t += 0.05) { _v1[0] = cubicAt(x0, x1, x2, x3, _t); _v1[1] = cubicAt(y0, y1, y2, y3, _t); d1 = distSquare(_v0, _v1); if (d1 < d) { t = _t; d = d1; } } d = Infinity; for (var i = 0; i < 32; i++) { if (interval < EPSILON_NUMERIC) { break; } prev = t - interval; next = t + interval; _v1[0] = cubicAt(x0, x1, x2, x3, prev); _v1[1] = cubicAt(y0, y1, y2, y3, prev); d1 = distSquare(_v1, _v0); if (prev >= 0 && d1 < d) { t = prev; d = d1; } else { _v2[0] = cubicAt(x0, x1, x2, x3, next); _v2[1] = cubicAt(y0, y1, y2, y3, next); d2 = distSquare(_v2, _v0); if (next <= 1 && d2 < d) { t = next; d = d2; } else { interval *= 0.5; } } } if (out) { out[0] = cubicAt(x0, x1, x2, x3, t); out[1] = cubicAt(y0, y1, y2, y3, t); } return mathSqrt(d); } function cubicLength(x0, y0, x1, y1, x2, y2, x3, y3, iteration) { var px = x0; var py = y0; var d = 0; var step = 1 / iteration; for (var i = 1; i <= iteration; i++) { var t = i * step; var x = cubicAt(x0, x1, x2, x3, t); var y = cubicAt(y0, y1, y2, y3, t); var dx = x - px; var dy = y - py; d += Math.sqrt(dx * dx + dy * dy); px = x; py = y; } return d; } function quadraticAt(p0, p1, p2, t) { var onet = 1 - t; return onet * (onet * p0 + 2 * t * p1) + t * t * p2; } function quadraticDerivativeAt(p0, p1, p2, t) { return 2 * ((1 - t) * (p1 - p0) + t * (p2 - p1)); } function quadraticRootAt(p0, p1, p2, val, roots) { var a = p0 - 2 * p1 + p2; var b = 2 * (p1 - p0); var c = p0 - val; var n = 0; if (isAroundZero(a)) { if (isNotAroundZero$1(b)) { var t1 = -c / b; if (t1 >= 0 && t1 <= 1) { roots[n++] = t1; } } } else { var disc = b * b - 4 * a * c; if (isAroundZero(disc)) { var t1 = -b / (2 * a); if (t1 >= 0 && t1 <= 1) { roots[n++] = t1; } } else if (disc > 0) { var discSqrt = mathSqrt(disc); var t1 = (-b + discSqrt) / (2 * a); var t2 = (-b - discSqrt) / (2 * a); if (t1 >= 0 && t1 <= 1) { roots[n++] = t1; } if (t2 >= 0 && t2 <= 1) { roots[n++] = t2; } } } return n; } function quadraticExtremum(p0, p1, p2) { var divider = p0 + p2 - 2 * p1; if (divider === 0) { return 0.5; } else { return (p0 - p1) / divider; } } function quadraticSubdivide(p0, p1, p2, t, out) { var p01 = (p1 - p0) * t + p0; var p12 = (p2 - p1) * t + p1; var p012 = (p12 - p01) * t + p01; out[0] = p0; out[1] = p01; out[2] = p012; out[3] = p012; out[4] = p12; out[5] = p2; } function quadraticProjectPoint(x0, y0, x1, y1, x2, y2, x, y, out) { var t; var interval = 0.005; var d = Infinity; _v0[0] = x; _v0[1] = y; for (var _t = 0; _t < 1; _t += 0.05) { _v1[0] = quadraticAt(x0, x1, x2, _t); _v1[1] = quadraticAt(y0, y1, y2, _t); var d1 = distSquare(_v0, _v1); if (d1 < d) { t = _t; d = d1; } } d = Infinity; for (var i = 0; i < 32; i++) { if (interval < EPSILON_NUMERIC) { break; } var prev = t - interval; var next = t + interval; _v1[0] = quadraticAt(x0, x1, x2, prev); _v1[1] = quadraticAt(y0, y1, y2, prev); var d1 = distSquare(_v1, _v0); if (prev >= 0 && d1 < d) { t = prev; d = d1; } else { _v2[0] = quadraticAt(x0, x1, x2, next); _v2[1] = quadraticAt(y0, y1, y2, next); var d2 = distSquare(_v2, _v0); if (next <= 1 && d2 < d) { t = next; d = d2; } else { interval *= 0.5; } } } if (out) { out[0] = quadraticAt(x0, x1, x2, t); out[1] = quadraticAt(y0, y1, y2, t); } return mathSqrt(d); } function quadraticLength(x0, y0, x1, y1, x2, y2, iteration) { var px = x0; var py = y0; var d = 0; var step = 1 / iteration; for (var i = 1; i <= iteration; i++) { var t = i * step; var x = quadraticAt(x0, x1, x2, t); var y = quadraticAt(y0, y1, y2, t); var dx = x - px; var dy = y - py; d += Math.sqrt(dx * dx + dy * dy); px = x; py = y; } return d; } var mathMin$1 = Math.min; var mathMax$1 = Math.max; var mathSin = Math.sin; var mathCos = Math.cos; var PI2 = Math.PI * 2; var start = create(); var end = create(); var extremity = create(); function fromPoints(points, min, max) { if (points.length === 0) { return; } var p = points[0]; var left = p[0]; var right = p[0]; var top = p[1]; var bottom = p[1]; for (var i = 1; i < points.length; i++) { p = points[i]; left = mathMin$1(left, p[0]); right = mathMax$1(right, p[0]); top = mathMin$1(top, p[1]); bottom = mathMax$1(bottom, p[1]); } min[0] = left; min[1] = top; max[0] = right; max[1] = bottom; } function fromLine(x0, y0, x1, y1, min, max) { min[0] = mathMin$1(x0, x1); min[1] = mathMin$1(y0, y1); max[0] = mathMax$1(x0, x1); max[1] = mathMax$1(y0, y1); } var xDim = []; var yDim = []; function fromCubic(x0, y0, x1, y1, x2, y2, x3, y3, min, max) { var cubicExtrema$1 = cubicExtrema; var cubicAt$1 = cubicAt; var n = cubicExtrema$1(x0, x1, x2, x3, xDim); min[0] = Infinity; min[1] = Infinity; max[0] = -Infinity; max[1] = -Infinity; for (var i = 0; i < n; i++) { var x = cubicAt$1(x0, x1, x2, x3, xDim[i]); min[0] = mathMin$1(x, min[0]); max[0] = mathMax$1(x, max[0]); } n = cubicExtrema$1(y0, y1, y2, y3, yDim); for (var i = 0; i < n; i++) { var y = cubicAt$1(y0, y1, y2, y3, yDim[i]); min[1] = mathMin$1(y, min[1]); max[1] = mathMax$1(y, max[1]); } min[0] = mathMin$1(x0, min[0]); max[0] = mathMax$1(x0, max[0]); min[0] = mathMin$1(x3, min[0]); max[0] = mathMax$1(x3, max[0]); min[1] = mathMin$1(y0, min[1]); max[1] = mathMax$1(y0, max[1]); min[1] = mathMin$1(y3, min[1]); max[1] = mathMax$1(y3, max[1]); } function fromQuadratic(x0, y0, x1, y1, x2, y2, min, max) { var quadraticExtremum$1 = quadraticExtremum; var quadraticAt$1 = quadraticAt; var tx = mathMax$1(mathMin$1(quadraticExtremum$1(x0, x1, x2), 1), 0); var ty = mathMax$1(mathMin$1(quadraticExtremum$1(y0, y1, y2), 1), 0); var x = quadraticAt$1(x0, x1, x2, tx); var y = quadraticAt$1(y0, y1, y2, ty); min[0] = mathMin$1(x0, x2, x); min[1] = mathMin$1(y0, y2, y); max[0] = mathMax$1(x0, x2, x); max[1] = mathMax$1(y0, y2, y); } function fromArc(x, y, rx, ry, startAngle, endAngle, anticlockwise, min$1, max$1) { var vec2Min = min; var vec2Max = max; var diff = Math.abs(startAngle - endAngle); if (diff % PI2 < 1e-4 && diff > 1e-4) { min$1[0] = x - rx; min$1[1] = y - ry; max$1[0] = x + rx; max$1[1] = y + ry; return; } start[0] = mathCos(startAngle) * rx + x; start[1] = mathSin(startAngle) * ry + y; end[0] = mathCos(endAngle) * rx + x; end[1] = mathSin(endAngle) * ry + y; vec2Min(min$1, start, end); vec2Max(max$1, start, end); startAngle = startAngle % (PI2); if (startAngle < 0) { startAngle = startAngle + PI2; } endAngle = endAngle % (PI2); if (endAngle < 0) { endAngle = endAngle + PI2; } if (startAngle > endAngle && !anticlockwise) { endAngle += PI2; } else if (startAngle < endAngle && anticlockwise) { startAngle += PI2; } if (anticlockwise) { var tmp = endAngle; endAngle = startAngle; startAngle = tmp; } for (var angle = 0; angle < endAngle; angle += Math.PI / 2) { if (angle > startAngle) { extremity[0] = mathCos(angle) * rx + x; extremity[1] = mathSin(angle) * ry + y; vec2Min(min$1, extremity, min$1); vec2Max(max$1, extremity, max$1); } } } var CMD = { M: 1, L: 2, C: 3, Q: 4, A: 5, Z: 6, R: 7 }; var tmpOutX = []; var tmpOutY = []; var min$1 = []; var max$1 = []; var min2 = []; var max2 = []; var mathMin$2 = Math.min; var mathMax$2 = Math.max; var mathCos$1 = Math.cos; var mathSin$1 = Math.sin; var mathSqrt$1 = Math.sqrt; var mathAbs = Math.abs; var PI = Math.PI; var PI2$1 = PI * 2; var hasTypedArray = typeof Float32Array !== 'undefined'; var tmpAngles = []; function modPI2(radian) { var n = Math.round(radian / PI * 1e8) / 1e8; return (n % 2) * PI; } function normalizeArcAngles(angles, anticlockwise) { var newStartAngle = modPI2(angles[0]); if (newStartAngle < 0) { newStartAngle += PI2$1; } var delta = newStartAngle - angles[0]; var newEndAngle = angles[1]; newEndAngle += delta; if (!anticlockwise && newEndAngle - newStartAngle >= PI2$1) { newEndAngle = newStartAngle + PI2$1; } else if (anticlockwise && newStartAngle - newEndAngle >= PI2$1) { newEndAngle = newStartAngle - PI2$1; } else if (!anticlockwise && newStartAngle > newEndAngle) { newEndAngle = newStartAngle + (PI2$1 - modPI2(newStartAngle - newEndAngle)); } else if (anticlockwise && newStartAngle < newEndAngle) { newEndAngle = newStartAngle - (PI2$1 - modPI2(newEndAngle - newStartAngle)); } angles[0] = newStartAngle; angles[1] = newEndAngle; } var PathProxy = (function () { function PathProxy(notSaveData) { this.dpr = 1; this._version = 0; this._xi = 0; this._yi = 0; this._x0 = 0; this._y0 = 0; this._len = 0; if (notSaveData) { this._saveData = false; } if (this._saveData) { this.data = []; } } PathProxy.prototype.increaseVersion = function () { this._version++; }; PathProxy.prototype.getVersion = function () { return this._version; }; PathProxy.prototype.setScale = function (sx, sy, segmentIgnoreThreshold) { segmentIgnoreThreshold = segmentIgnoreThreshold || 0; if (segmentIgnoreThreshold > 0) { this._ux = mathAbs(segmentIgnoreThreshold / devicePixelRatio / sx) || 0; this._uy = mathAbs(segmentIgnoreThreshold / devicePixelRatio / sy) || 0; } }; PathProxy.prototype.setDPR = function (dpr) { this.dpr = dpr; }; PathProxy.prototype.setContext = function (ctx) { this._ctx = ctx; }; PathProxy.prototype.getContext = function () { return this._ctx; }; PathProxy.prototype.beginPath = function () { this._ctx && this._ctx.beginPath(); this.reset(); return this; }; PathProxy.prototype.reset = function () { if (this._saveData) { this._len = 0; } if (this._lineDash) { this._lineDash = null; this._dashOffset = 0; } if (this._pathSegLen) { this._pathSegLen = null; this._pathLen = 0; } this._version++; }; PathProxy.prototype.moveTo = function (x, y) { this.addData(CMD.M, x, y); this._ctx && this._ctx.moveTo(x, y); this._x0 = x; this._y0 = y; this._xi = x; this._yi = y; return this; }; PathProxy.prototype.lineTo = function (x, y) { var exceedUnit = mathAbs(x - this._xi) > this._ux || mathAbs(y - this._yi) > this._uy || this._len < 5; this.addData(CMD.L, x, y); if (this._ctx && exceedUnit) { this._needsDash ? this._dashedLineTo(x, y) : this._ctx.lineTo(x, y); } if (exceedUnit) { this._xi = x; this._yi = y; } return this; }; PathProxy.prototype.bezierCurveTo = function (x1, y1, x2, y2, x3, y3) { this.addData(CMD.C, x1, y1, x2, y2, x3, y3); if (this._ctx) { this._needsDash ? this._dashedBezierTo(x1, y1, x2, y2, x3, y3) : this._ctx.bezierCurveTo(x1, y1, x2, y2, x3, y3); } this._xi = x3; this._yi = y3; return this; }; PathProxy.prototype.quadraticCurveTo = function (x1, y1, x2, y2) { this.addData(CMD.Q, x1, y1, x2, y2); if (this._ctx) { this._needsDash ? this._dashedQuadraticTo(x1, y1, x2, y2) : this._ctx.quadraticCurveTo(x1, y1, x2, y2); } this._xi = x2; this._yi = y2; return this; }; PathProxy.prototype.arc = function (cx, cy, r, startAngle, endAngle, anticlockwise) { tmpAngles[0] = startAngle; tmpAngles[1] = endAngle; normalizeArcAngles(tmpAngles, anticlockwise); startAngle = tmpAngles[0]; endAngle = tmpAngles[1]; var delta = endAngle - startAngle; this.addData(CMD.A, cx, cy, r, r, startAngle, delta, 0, anticlockwise ? 0 : 1); this._ctx && this._ctx.arc(cx, cy, r, startAngle, endAngle, anticlockwise); this._xi = mathCos$1(endAngle) * r + cx; this._yi = mathSin$1(endAngle) * r + cy; return this; }; PathProxy.prototype.arcTo = function (x1, y1, x2, y2, radius) { if (this._ctx) { this._ctx.arcTo(x1, y1, x2, y2, radius); } return this; }; PathProxy.prototype.rect = function (x, y, w, h) { this._ctx && this._ctx.rect(x, y, w, h); this.addData(CMD.R, x, y, w, h); return this; }; PathProxy.prototype.closePath = function () { this.addData(CMD.Z); var ctx = this._ctx; var x0 = this._x0; var y0 = this._y0; if (ctx) { this._needsDash && this._dashedLineTo(x0, y0); ctx.closePath(); } this._xi = x0; this._yi = y0; return this; }; PathProxy.prototype.fill = function (ctx) { ctx && ctx.fill(); this.toStatic(); }; PathProxy.prototype.stroke = function (ctx) { ctx && ctx.stroke(); this.toStatic(); }; PathProxy.prototype.setLineDash = function (lineDash) { if (lineDash instanceof Array) { this._lineDash = lineDash; this._dashIdx = 0; var lineDashSum = 0; for (var i = 0; i < lineDash.length; i++) { lineDashSum += lineDash[i]; } this._dashSum = lineDashSum; this._needsDash = true; } else { this._lineDash = null; this._needsDash = false; } return this; }; PathProxy.prototype.setLineDashOffset = function (offset) { this._dashOffset = offset; return this; }; PathProxy.prototype.len = function () { return this._len; }; PathProxy.prototype.setData = function (data) { var len = data.length; if (!(this.data && this.data.length === len) && hasTypedArray) { this.data = new Float32Array(len); } for (var i = 0; i < len; i++) { this.data[i] = data[i]; } this._len = len; }; PathProxy.prototype.appendPath = function (path) { if (!(path instanceof Array)) { path = [path]; } var len = path.length; var appendSize = 0; var offset = this._len; for (var i = 0; i < len; i++) { appendSize += path[i].len(); } if (hasTypedArray && (this.data instanceof Float32Array)) { this.data = new Float32Array(offset + appendSize); } for (var i = 0; i < len; i++) { var appendPathData = path[i].data; for (var k = 0; k < appendPathData.length; k++) { this.data[offset++] = appendPathData[k]; } } this._len = offset; }; PathProxy.prototype.addData = function (cmd, a, b, c, d, e, f, g, h) { if (!this._saveData) { return; } var data = this.data; if (this._len + arguments.length > data.length) { this._expandData(); data = this.data; } for (var i = 0; i < arguments.length; i++) { data[this._len++] = arguments[i]; } }; PathProxy.prototype._expandData = function () { if (!(this.data instanceof Array)) { var newData = []; for (var i = 0; i < this._len; i++) { newData[i] = this.data[i]; } this.data = newData; } }; PathProxy.prototype._dashedLineTo = function (x1, y1) { var dashSum = this._dashSum; var lineDash = this._lineDash; var ctx = this._ctx; var offset = this._dashOffset; var x0 = this._xi; var y0 = this._yi; var dx = x1 - x0; var dy = y1 - y0; var dist = mathSqrt$1(dx * dx + dy * dy); var x = x0; var y = y0; var nDash = lineDash.length; var dash; var idx; dx /= dist; dy /= dist; if (offset < 0) { offset = dashSum + offset; } offset %= dashSum; x -= offset * dx; y -= offset * dy; while ((dx > 0 && x <= x1) || (dx < 0 && x >= x1) || (dx === 0 && ((dy > 0 && y <= y1) || (dy < 0 && y >= y1)))) { idx = this._dashIdx; dash = lineDash[idx]; x += dx * dash; y += dy * dash; this._dashIdx = (idx + 1) % nDash; if ((dx > 0 && x < x0) || (dx < 0 && x > x0) || (dy > 0 && y < y0) || (dy < 0 && y > y0)) { continue; } ctx[idx % 2 ? 'moveTo' : 'lineTo'](dx >= 0 ? mathMin$2(x, x1) : mathMax$2(x, x1), dy >= 0 ? mathMin$2(y, y1) : mathMax$2(y, y1)); } dx = x - x1; dy = y - y1; this._dashOffset = -mathSqrt$1(dx * dx + dy * dy); }; PathProxy.prototype._dashedBezierTo = function (x1, y1, x2, y2, x3, y3) { var ctx = this._ctx; var dashSum = this._dashSum; var offset = this._dashOffset; var lineDash = this._lineDash; var x0 = this._xi; var y0 = this._yi; var bezierLen = 0; var idx = this._dashIdx; var nDash = lineDash.length; var t; var dx; var dy; var x; var y; var tmpLen = 0; if (offset < 0) { offset = dashSum + offset; } offset %= dashSum; for (t = 0; t < 1; t += 0.1) { dx = cubicAt(x0, x1, x2, x3, t + 0.1) - cubicAt(x0, x1, x2, x3, t); dy = cubicAt(y0, y1, y2, y3, t + 0.1) - cubicAt(y0, y1, y2, y3, t); bezierLen += mathSqrt$1(dx * dx + dy * dy); } for (; idx < nDash; idx++) { tmpLen += lineDash[idx]; if (tmpLen > offset) { break; } } t = (tmpLen - offset) / bezierLen; while (t <= 1) { x = cubicAt(x0, x1, x2, x3, t); y = cubicAt(y0, y1, y2, y3, t); idx % 2 ? ctx.moveTo(x, y) : ctx.lineTo(x, y); t += lineDash[idx] / bezierLen; idx = (idx + 1) % nDash; } (idx % 2 !== 0) && ctx.lineTo(x3, y3); dx = x3 - x; dy = y3 - y; this._dashOffset = -mathSqrt$1(dx * dx + dy * dy); }; PathProxy.prototype._dashedQuadraticTo = function (x1, y1, x2, y2) { var x3 = x2; var y3 = y2; x2 = (x2 + 2 * x1) / 3; y2 = (y2 + 2 * y1) / 3; x1 = (this._xi + 2 * x1) / 3; y1 = (this._yi + 2 * y1) / 3; this._dashedBezierTo(x1, y1, x2, y2, x3, y3); }; PathProxy.prototype.toStatic = function () { if (!this._saveData) { return; } var data = this.data; if (data instanceof Array) { data.length = this._len; if (hasTypedArray && this._len > 11) { this.data = new Float32Array(data); } } }; PathProxy.prototype.getBoundingRect = function () { min$1[0] = min$1[1] = min2[0] = min2[1] = Number.MAX_VALUE; max$1[0] = max$1[1] = max2[0] = max2[1] = -Number.MAX_VALUE; var data = this.data; var xi = 0; var yi = 0; var x0 = 0; var y0 = 0; var i; for (i = 0; i < this._len;) { var cmd = data[i++]; var isFirst = i === 1; if (isFirst) { xi = data[i]; yi = data[i + 1]; x0 = xi; y0 = yi; } switch (cmd) { case CMD.M: xi = x0 = data[i++]; yi = y0 = data[i++]; min2[0] = x0; min2[1] = y0; max2[0] = x0; max2[1] = y0; break; case CMD.L: fromLine(xi, yi, data[i], data[i + 1], min2, max2); xi = data[i++]; yi = data[i++]; break; case CMD.C: fromCubic(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], min2, max2); xi = data[i++]; yi = data[i++]; break; case CMD.Q: fromQuadratic(xi, yi, data[i++], data[i++], data[i], data[i + 1], min2, max2); xi = data[i++]; yi = data[i++]; break; case CMD.A: var cx = data[i++]; var cy = data[i++]; var rx = data[i++]; var ry = data[i++]; var startAngle = data[i++]; var endAngle = data[i++] + startAngle; i += 1; var anticlockwise = !data[i++]; if (isFirst) { x0 = mathCos$1(startAngle) * rx + cx; y0 = mathSin$1(startAngle) * ry + cy; } fromArc(cx, cy, rx, ry, startAngle, endAngle, anticlockwise, min2, max2); xi = mathCos$1(endAngle) * rx + cx; yi = mathSin$1(endAngle) * ry + cy; break; case CMD.R: x0 = xi = data[i++]; y0 = yi = data[i++]; var width = data[i++]; var height = data[i++]; fromLine(x0, y0, x0 + width, y0 + height, min2, max2); break; case CMD.Z: xi = x0; yi = y0; break; } min(min$1, min$1, min2); max(max$1, max$1, max2); } if (i === 0) { min$1[0] = min$1[1] = max$1[0] = max$1[1] = 0; } return new BoundingRect(min$1[0], min$1[1], max$1[0] - min$1[0], max$1[1] - min$1[1]); }; PathProxy.prototype._calculateLength = function () { var data = this.data; var len = this._len; var ux = this._ux; var uy = this._uy; var xi = 0; var yi = 0; var x0 = 0; var y0 = 0; if (!this._pathSegLen) { this._pathSegLen = []; } var pathSegLen = this._pathSegLen; var pathTotalLen = 0; var segCount = 0; for (var i = 0; i < len;) { var cmd = data[i++]; var isFirst = i === 1; if (isFirst) { xi = data[i]; yi = data[i + 1]; x0 = xi; y0 = yi; } var l = -1; switch (cmd) { case CMD.M: xi = x0 = data[i++]; yi = y0 = data[i++]; break; case CMD.L: { var x2 = data[i++]; var y2 = data[i++]; var dx = x2 - xi; var dy = y2 - yi; if (mathAbs(dx) > ux || mathAbs(dy) > uy || i === len - 1) { l = Math.sqrt(dx * dx + dy * dy); xi = x2; yi = y2; } break; } case CMD.C: { var x1 = data[i++]; var y1 = data[i++]; var x2 = data[i++]; var y2 = data[i++]; var x3 = data[i++]; var y3 = data[i++]; l = cubicLength(xi, yi, x1, y1, x2, y2, x3, y3, 10); xi = x3; yi = y3; break; } case CMD.Q: { var x1 = data[i++]; var y1 = data[i++]; var x2 = data[i++]; var y2 = data[i++]; l = quadraticLength(xi, yi, x1, y1, x2, y2, 10); xi = x2; yi = y2; break; } case CMD.A: var cx = data[i++]; var cy = data[i++]; var rx = data[i++]; var ry = data[i++]; var startAngle = data[i++]; var delta = data[i++]; var endAngle = delta + startAngle; i += 1; var anticlockwise = !data[i++]; if (isFirst) { x0 = mathCos$1(startAngle) * rx + cx; y0 = mathSin$1(startAngle) * ry + cy; } l = mathMax$2(rx, ry) * mathMin$2(PI2$1, Math.abs(delta)); xi = mathCos$1(endAngle) * rx + cx; yi = mathSin$1(endAngle) * ry + cy; break; case CMD.R: { x0 = xi = data[i++]; y0 = yi = data[i++]; var width = data[i++]; var height = data[i++]; l = width * 2 + height * 2; break; } case CMD.Z: { var dx = x0 - xi; var dy = y0 - yi; l = Math.sqrt(dx * dx + dy * dy); xi = x0; yi = y0; break; } } if (l >= 0) { pathSegLen[segCount++] = l; pathTotalLen += l; } } this._pathLen = pathTotalLen; return pathTotalLen; }; PathProxy.prototype.rebuildPath = function (ctx, percent) { var d = this.data; var ux = this._ux; var uy = this._uy; var len = this._len; var x0; var y0; var xi; var yi; var x; var y; var drawPart = percent < 1; var pathSegLen; var pathTotalLen; var accumLength = 0; var segCount = 0; var displayedLength; if (drawPart) { if (!this._pathSegLen) { this._calculateLength(); } pathSegLen = this._pathSegLen; pathTotalLen = this._pathLen; displayedLength = percent * pathTotalLen; if (!displayedLength) { return; } } lo: for (var i = 0; i < len;) { var cmd = d[i++]; var isFirst = i === 1; if (isFirst) { xi = d[i]; yi = d[i + 1]; x0 = xi; y0 = yi; } switch (cmd) { case CMD.M: x0 = xi = d[i++]; y0 = yi = d[i++]; ctx.moveTo(xi, yi); break; case CMD.L: { x = d[i++]; y = d[i++]; if (mathAbs(x - xi) > ux || mathAbs(y - yi) > uy || i === len - 1) { if (drawPart) { var l = pathSegLen[segCount++]; if (accumLength + l > displayedLength) { var t = (displayedLength - accumLength) / l; ctx.lineTo(xi * (1 - t) + x * t, yi * (1 - t) + y * t); break lo; } accumLength += l; } ctx.lineTo(x, y); xi = x; yi = y; } break; } case CMD.C: { var x1 = d[i++]; var y1 = d[i++]; var x2 = d[i++]; var y2 = d[i++]; var x3 = d[i++]; var y3 = d[i++]; if (drawPart) { var l = pathSegLen[segCount++]; if (accumLength + l > displayedLength) { var t = (displayedLength - accumLength) / l; cubicSubdivide(xi, x1, x2, x3, t, tmpOutX); cubicSubdivide(yi, y1, y2, y3, t, tmpOutY); ctx.bezierCurveTo(tmpOutX[1], tmpOutY[1], tmpOutX[2], tmpOutY[2], tmpOutX[3], tmpOutY[3]); break lo; } accumLength += l; } ctx.bezierCurveTo(x1, y1, x2, y2, x3, y3); xi = x3; yi = y3; break; } case CMD.Q: { var x1 = d[i++]; var y1 = d[i++]; var x2 = d[i++]; var y2 = d[i++]; if (drawPart) { var l = pathSegLen[segCount++]; if (accumLength + l > displayedLength) { var t = (displayedLength - accumLength) / l; quadraticSubdivide(xi, x1, x2, t, tmpOutX); quadraticSubdivide(yi, y1, y2, t, tmpOutY); ctx.quadraticCurveTo(tmpOutX[1], tmpOutY[1], tmpOutX[2], tmpOutY[2]); break lo; } accumLength += l; } ctx.quadraticCurveTo(x1, y1, x2, y2); xi = x2; yi = y2; break; } case CMD.A: var cx = d[i++]; var cy = d[i++]; var rx = d[i++]; var ry = d[i++]; var startAngle = d[i++]; var delta = d[i++]; var psi = d[i++]; var anticlockwise = !d[i++]; var r = (rx > ry) ? rx : ry; var isEllipse = mathAbs(rx - ry) > 1e-3; var endAngle = startAngle + delta; var breakBuild = false; if (drawPart) { var l = pathSegLen[segCount++]; if (accumLength + l > displayedLength) { endAngle = startAngle + delta * (displayedLength - accumLength) / l; breakBuild = true; } accumLength += l; } if (isEllipse && ctx.ellipse) { ctx.ellipse(cx, cy, rx, ry, psi, startAngle, endAngle, anticlockwise); } else { ctx.arc(cx, cy, r, startAngle, endAngle, anticlockwise); } if (breakBuild) { break lo; } if (isFirst) { x0 = mathCos$1(startAngle) * rx + cx; y0 = mathSin$1(startAngle) * ry + cy; } xi = mathCos$1(endAngle) * rx + cx; yi = mathSin$1(endAngle) * ry + cy; break; case CMD.R: x0 = xi = d[i]; y0 = yi = d[i + 1]; x = d[i++]; y = d[i++]; var width = d[i++]; var height = d[i++]; if (drawPart) { var l = pathSegLen[segCount++]; if (accumLength + l > displayedLength) { var d_1 = displayedLength - accumLength; ctx.moveTo(x, y); ctx.lineTo(x + mathMin$2(d_1, width), y); d_1 -= width; if (d_1 > 0) { ctx.lineTo(x + width, y + mathMin$2(d_1, height)); } d_1 -= height; if (d_1 > 0) { ctx.lineTo(x + mathMax$2(width - d_1, 0), y + height); } d_1 -= width; if (d_1 > 0) { ctx.lineTo(x, y + mathMax$2(height - d_1, 0)); } break lo; } accumLength += l; } ctx.rect(x, y, width, height); break; case CMD.Z: if (drawPart) { var l = pathSegLen[segCount++]; if (accumLength + l > displayedLength) { var t = (displayedLength - accumLength) / l; ctx.lineTo(xi * (1 - t) + x0 * t, yi * (1 - t) + y0 * t); break lo; } accumLength += l; } ctx.closePath(); xi = x0; yi = y0; } } }; PathProxy.CMD = CMD; PathProxy.initDefaultProps = (function () { var proto = PathProxy.prototype; proto._saveData = true; proto._needsDash = false; proto._dashOffset = 0; proto._dashIdx = 0; proto._dashSum = 0; proto._ux = 0; proto._uy = 0; })(); return PathProxy; }()); function containStroke(x0, y0, x1, y1, lineWidth, x, y) { if (lineWidth === 0) { return false; } var _l = lineWidth; var _a = 0; var _b = x0; if ((y > y0 + _l && y > y1 + _l) || (y < y0 - _l && y < y1 - _l) || (x > x0 + _l && x > x1 + _l) || (x < x0 - _l && x < x1 - _l)) { return false; } if (x0 !== x1) { _a = (y0 - y1) / (x0 - x1); _b = (x0 * y1 - x1 * y0) / (x0 - x1); } else { return Math.abs(x - x0) <= _l / 2; } var tmp = _a * x - y + _b; var _s = tmp * tmp / (_a * _a + 1); return _s <= _l / 2 * _l / 2; } function containStroke$1(x0, y0, x1, y1, x2, y2, x3, y3, lineWidth, x, y) { if (lineWidth === 0) { return false; } var _l = lineWidth; if ((y > y0 + _l && y > y1 + _l && y > y2 + _l && y > y3 + _l) || (y < y0 - _l && y < y1 - _l && y < y2 - _l && y < y3 - _l) || (x > x0 + _l && x > x1 + _l && x > x2 + _l && x > x3 + _l) || (x < x0 - _l && x < x1 - _l && x < x2 - _l && x < x3 - _l)) { return false; } var d = cubicProjectPoint(x0, y0, x1, y1, x2, y2, x3, y3, x, y, null); return d <= _l / 2; } function containStroke$2(x0, y0, x1, y1, x2, y2, lineWidth, x, y) { if (lineWidth === 0) { return false; } var _l = lineWidth; if ((y > y0 + _l && y > y1 + _l && y > y2 + _l) || (y < y0 - _l && y < y1 - _l && y < y2 - _l) || (x > x0 + _l && x > x1 + _l && x > x2 + _l) || (x < x0 - _l && x < x1 - _l && x < x2 - _l)) { return false; } var d = quadraticProjectPoint(x0, y0, x1, y1, x2, y2, x, y, null); return d <= _l / 2; } var PI2$2 = Math.PI * 2; function normalizeRadian(angle) { angle %= PI2$2; if (angle < 0) { angle += PI2$2; } return angle; } var PI2$3 = Math.PI * 2; function containStroke$3(cx, cy, r, startAngle, endAngle, anticlockwise, lineWidth, x, y) { if (lineWidth === 0) { return false; } var _l = lineWidth; x -= cx; y -= cy; var d = Math.sqrt(x * x + y * y); if ((d - _l > r) || (d + _l < r)) { return false; } if (Math.abs(startAngle - endAngle) % PI2$3 < 1e-4) { return true; } if (anticlockwise) { var tmp = startAngle; startAngle = normalizeRadian(endAngle); endAngle = normalizeRadian(tmp); } else { startAngle = normalizeRadian(startAngle); endAngle = normalizeRadian(endAngle); } if (startAngle > endAngle) { endAngle += PI2$3; } var angle = Math.atan2(y, x); if (angle < 0) { angle += PI2$3; } return (angle >= startAngle && angle <= endAngle) || (angle + PI2$3 >= startAngle && angle + PI2$3 <= endAngle); } function windingLine(x0, y0, x1, y1, x, y) { if ((y > y0 && y > y1) || (y < y0 && y < y1)) { return 0; } if (y1 === y0) { return 0; } var t = (y - y0) / (y1 - y0); var dir = y1 < y0 ? 1 : -1; if (t === 1 || t === 0) { dir = y1 < y0 ? 0.5 : -0.5; } var x_ = t * (x1 - x0) + x0; return x_ === x ? Infinity : x_ > x ? dir : 0; } var CMD$1 = PathProxy.CMD; var PI2$4 = Math.PI * 2; var EPSILON$2 = 1e-4; function isAroundEqual(a, b) { return Math.abs(a - b) < EPSILON$2; } var roots = [-1, -1, -1]; var extrema = [-1, -1]; function swapExtrema() { var tmp = extrema[0]; extrema[0] = extrema[1]; extrema[1] = tmp; } function windingCubic(x0, y0, x1, y1, x2, y2, x3, y3, x, y) { if ((y > y0 && y > y1 && y > y2 && y > y3) || (y < y0 && y < y1 && y < y2 && y < y3)) { return 0; } var nRoots = cubicRootAt(y0, y1, y2, y3, y, roots); if (nRoots === 0) { return 0; } else { var w = 0; var nExtrema = -1; var y0_ = void 0; var y1_ = void 0; for (var i = 0; i < nRoots; i++) { var t = roots[i]; var unit = (t === 0 || t === 1) ? 0.5 : 1; var x_ = cubicAt(x0, x1, x2, x3, t); if (x_ < x) { continue; } if (nExtrema < 0) { nExtrema = cubicExtrema(y0, y1, y2, y3, extrema); if (extrema[1] < extrema[0] && nExtrema > 1) { swapExtrema(); } y0_ = cubicAt(y0, y1, y2, y3, extrema[0]); if (nExtrema > 1) { y1_ = cubicAt(y0, y1, y2, y3, extrema[1]); } } if (nExtrema === 2) { if (t < extrema[0]) { w += y0_ < y0 ? unit : -unit; } else if (t < extrema[1]) { w += y1_ < y0_ ? unit : -unit; } else { w += y3 < y1_ ? unit : -unit; } } else { if (t < extrema[0]) { w += y0_ < y0 ? unit : -unit; } else { w += y3 < y0_ ? unit : -unit; } } } return w; } } function windingQuadratic(x0, y0, x1, y1, x2, y2, x, y) { if ((y > y0 && y > y1 && y > y2) || (y < y0 && y < y1 && y < y2)) { return 0; } var nRoots = quadraticRootAt(y0, y1, y2, y, roots); if (nRoots === 0) { return 0; } else { var t = quadraticExtremum(y0, y1, y2); if (t >= 0 && t <= 1) { var w = 0; var y_ = quadraticAt(y0, y1, y2, t); for (var i = 0; i < nRoots; i++) { var unit = (roots[i] === 0 || roots[i] === 1) ? 0.5 : 1; var x_ = quadraticAt(x0, x1, x2, roots[i]); if (x_ < x) { continue; } if (roots[i] < t) { w += y_ < y0 ? unit : -unit; } else { w += y2 < y_ ? unit : -unit; } } return w; } else { var unit = (roots[0] === 0 || roots[0] === 1) ? 0.5 : 1; var x_ = quadraticAt(x0, x1, x2, roots[0]); if (x_ < x) { return 0; } return y2 < y0 ? unit : -unit; } } } function windingArc(cx, cy, r, startAngle, endAngle, anticlockwise, x, y) { y -= cy; if (y > r || y < -r) { return 0; } var tmp = Math.sqrt(r * r - y * y); roots[0] = -tmp; roots[1] = tmp; var dTheta = Math.abs(startAngle - endAngle); if (dTheta < 1e-4) { return 0; } if (dTheta >= PI2$4 - 1e-4) { startAngle = 0; endAngle = PI2$4; var dir = anticlockwise ? 1 : -1; if (x >= roots[0] + cx && x <= roots[1] + cx) { return dir; } else { return 0; } } if (startAngle > endAngle) { var tmp_1 = startAngle; startAngle = endAngle; endAngle = tmp_1; } if (startAngle < 0) { startAngle += PI2$4; endAngle += PI2$4; } var w = 0; for (var i = 0; i < 2; i++) { var x_ = roots[i]; if (x_ + cx > x) { var angle = Math.atan2(y, x_); var dir = anticlockwise ? 1 : -1; if (angle < 0) { angle = PI2$4 + angle; } if ((angle >= startAngle && angle <= endAngle) || (angle + PI2$4 >= startAngle && angle + PI2$4 <= endAngle)) { if (angle > Math.PI / 2 && angle < Math.PI * 1.5) { dir = -dir; } w += dir; } } } return w; } function containPath(path, lineWidth, isStroke, x, y) { var data = path.data; var len = path.len(); var w = 0; var xi = 0; var yi = 0; var x0 = 0; var y0 = 0; var x1; var y1; for (var i = 0; i < len;) { var cmd = data[i++]; var isFirst = i === 1; if (cmd === CMD$1.M && i > 1) { if (!isStroke) { w += windingLine(xi, yi, x0, y0, x, y); } } if (isFirst) { xi = data[i]; yi = data[i + 1]; x0 = xi; y0 = yi; } switch (cmd) { case CMD$1.M: x0 = data[i++]; y0 = data[i++]; xi = x0; yi = y0; break; case CMD$1.L: if (isStroke) { if (containStroke(xi, yi, data[i], data[i + 1], lineWidth, x, y)) { return true; } } else { w += windingLine(xi, yi, data[i], data[i + 1], x, y) || 0; } xi = data[i++]; yi = data[i++]; break; case CMD$1.C: if (isStroke) { if (containStroke$1(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], lineWidth, x, y)) { return true; } } else { w += windingCubic(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], x, y) || 0; } xi = data[i++]; yi = data[i++]; break; case CMD$1.Q: if (isStroke) { if (containStroke$2(xi, yi, data[i++], data[i++], data[i], data[i + 1], lineWidth, x, y)) { return true; } } else { w += windingQuadratic(xi, yi, data[i++], data[i++], data[i], data[i + 1], x, y) || 0; } xi = data[i++]; yi = data[i++]; break; case CMD$1.A: var cx = data[i++]; var cy = data[i++]; var rx = data[i++]; var ry = data[i++]; var theta = data[i++]; var dTheta = data[i++]; i += 1; var anticlockwise = !!(1 - data[i++]); x1 = Math.cos(theta) * rx + cx; y1 = Math.sin(theta) * ry + cy; if (!isFirst) { w += windingLine(xi, yi, x1, y1, x, y); } else { x0 = x1; y0 = y1; } var _x = (x - cx) * ry / rx + cx; if (isStroke) { if (containStroke$3(cx, cy, ry, theta, theta + dTheta, anticlockwise, lineWidth, _x, y)) { return true; } } else { w += windingArc(cx, cy, ry, theta, theta + dTheta, anticlockwise, _x, y); } xi = Math.cos(theta + dTheta) * rx + cx; yi = Math.sin(theta + dTheta) * ry + cy; break; case CMD$1.R: x0 = xi = data[i++]; y0 = yi = data[i++]; var width = data[i++]; var height = data[i++]; x1 = x0 + width; y1 = y0 + height; if (isStroke) { if (containStroke(x0, y0, x1, y0, lineWidth, x, y) || containStroke(x1, y0, x1, y1, lineWidth, x, y) || containStroke(x1, y1, x0, y1, lineWidth, x, y) || containStroke(x0, y1, x0, y0, lineWidth, x, y)) { return true; } } else { w += windingLine(x1, y0, x1, y1, x, y); w += windingLine(x0, y1, x0, y0, x, y); } break; case CMD$1.Z: if (isStroke) { if (containStroke(xi, yi, x0, y0, lineWidth, x, y)) { return true; } } else { w += windingLine(xi, yi, x0, y0, x, y); } xi = x0; yi = y0; break; } } if (!isStroke && !isAroundEqual(yi, y0)) { w += windingLine(xi, yi, x0, y0, x, y) || 0; } return w !== 0; } function contain(pathProxy, x, y) { return containPath(pathProxy, 0, false, x, y); } function containStroke$4(pathProxy, lineWidth, x, y) { return containPath(pathProxy, lineWidth, true, x, y); } var DEFAULT_PATH_STYLE = defaults({ fill: '#000', stroke: null, strokePercent: 1, fillOpacity: 1, strokeOpacity: 1, lineDashOffset: 0, lineWidth: 1, lineCap: 'butt', miterLimit: 10, strokeNoScale: false, strokeFirst: false }, DEFAULT_COMMON_STYLE); var DEFAULT_PATH_ANIMATION_PROPS = { style: defaults({ fill: true, stroke: true, strokePercent: true, fillOpacity: true, strokeOpacity: true, lineDashOffset: true, lineWidth: true, miterLimit: true }, DEFAULT_COMMON_ANIMATION_PROPS.style) }; var pathCopyParams = [ 'x', 'y', 'rotation', 'scaleX', 'scaleY', 'originX', 'originY', 'invisible', 'culling', 'z', 'z2', 'zlevel', 'parent' ]; var Path = (function (_super) { __extends(Path, _super); function Path(opts) { return _super.call(this, opts) || this; } Path.prototype.update = function () { var _this = this; _super.prototype.update.call(this); var style = this.style; if (style.decal) { var decalEl = this._decalEl = this._decalEl || new Path(); if (decalEl.buildPath === Path.prototype.buildPath) { decalEl.buildPath = function (ctx) { _this.buildPath(ctx, _this.shape); }; } decalEl.silent = true; var decalElStyle = decalEl.style; for (var key in style) { if (decalElStyle[key] !== style[key]) { decalElStyle[key] = style[key]; } } decalElStyle.fill = style.fill ? style.decal : null; decalElStyle.decal = null; decalElStyle.shadowColor = null; style.strokeFirst && (decalElStyle.stroke = null); for (var i = 0; i < pathCopyParams.length; ++i) { decalEl[pathCopyParams[i]] = this[pathCopyParams[i]]; } decalEl.__dirty |= Element.REDARAW_BIT; } else if (this._decalEl) { this._decalEl = null; } }; Path.prototype.getDecalElement = function () { return this._decalEl; }; Path.prototype._init = function (props) { var keysArr = keys(props); this.shape = this.getDefaultShape(); var defaultStyle = this.getDefaultStyle(); if (defaultStyle) { this.useStyle(defaultStyle); } for (var i = 0; i < keysArr.length; i++) { var key = keysArr[i]; var value = props[key]; if (key === 'style') { if (!this.style) { this.useStyle(value); } else { extend(this.style, value); } } else if (key === 'shape') { extend(this.shape, value); } else { _super.prototype.attrKV.call(this, key, value); } } if (!this.style) { this.useStyle({}); } }; Path.prototype.getDefaultStyle = function () { return null; }; Path.prototype.getDefaultShape = function () { return {}; }; Path.prototype.canBeInsideText = function () { return this.hasFill(); }; Path.prototype.getInsideTextFill = function () { var pathFill = this.style.fill; if (pathFill !== 'none') { if (isString(pathFill)) { var fillLum = lum(pathFill, 0); if (fillLum > 0.5) { return DARK_LABEL_COLOR; } else if (fillLum > 0.2) { return LIGHTER_LABEL_COLOR; } return LIGHT_LABEL_COLOR; } else if (pathFill) { return LIGHT_LABEL_COLOR; } } return DARK_LABEL_COLOR; }; Path.prototype.getInsideTextStroke = function (textFill) { var pathFill = this.style.fill; if (isString(pathFill)) { var zr = this.__zr; var isDarkMode = !!(zr && zr.isDarkMode()); var isDarkLabel = lum(textFill, 0) < DARK_MODE_THRESHOLD; if (isDarkMode === isDarkLabel) { return pathFill; } } }; Path.prototype.buildPath = function (ctx, shapeCfg, inBundle) { }; Path.prototype.pathUpdated = function () { this.__dirty &= ~Path.SHAPE_CHANGED_BIT; }; Path.prototype.createPathProxy = function () { this.path = new PathProxy(false); }; Path.prototype.hasStroke = function () { var style = this.style; var stroke = style.stroke; return !(stroke == null || stroke === 'none' || !(style.lineWidth > 0)); }; Path.prototype.hasFill = function () { var style = this.style; var fill = style.fill; return fill != null && fill !== 'none'; }; Path.prototype.getBoundingRect = function () { var rect = this._rect; var style = this.style; var needsUpdateRect = !rect; if (needsUpdateRect) { var firstInvoke = false; if (!this.path) { firstInvoke = true; this.createPathProxy(); } var path = this.path; if (firstInvoke || (this.__dirty & Path.SHAPE_CHANGED_BIT)) { path.beginPath(); this.buildPath(path, this.shape, false); this.pathUpdated(); } rect = path.getBoundingRect(); } this._rect = rect; if (this.hasStroke() && this.path && this.path.len() > 0) { var rectWithStroke = this._rectWithStroke || (this._rectWithStroke = rect.clone()); if (this.__dirty || needsUpdateRect) { rectWithStroke.copy(rect); var lineScale = style.strokeNoScale ? this.getLineScale() : 1; var w = style.lineWidth; if (!this.hasFill()) { var strokeContainThreshold = this.strokeContainThreshold; w = Math.max(w, strokeContainThreshold == null ? 4 : strokeContainThreshold); } if (lineScale > 1e-10) { rectWithStroke.width += w / lineScale; rectWithStroke.height += w / lineScale; rectWithStroke.x -= w / lineScale / 2; rectWithStroke.y -= w / lineScale / 2; } } return rectWithStroke; } return rect; }; Path.prototype.contain = function (x, y) { var localPos = this.transformCoordToLocal(x, y); var rect = this.getBoundingRect(); var style = this.style; x = localPos[0]; y = localPos[1]; if (rect.contain(x, y)) { var pathProxy = this.path; if (this.hasStroke()) { var lineWidth = style.lineWidth; var lineScale = style.strokeNoScale ? this.getLineScale() : 1; if (lineScale > 1e-10) { if (!this.hasFill()) { lineWidth = Math.max(lineWidth, this.strokeContainThreshold); } if (containStroke$4(pathProxy, lineWidth / lineScale, x, y)) { return true; } } } if (this.hasFill()) { return contain(pathProxy, x, y); } } return false; }; Path.prototype.dirtyShape = function () { this.__dirty |= Path.SHAPE_CHANGED_BIT; if (this._rect) { this._rect = null; } if (this._decalEl) { this._decalEl.dirtyShape(); } this.markRedraw(); }; Path.prototype.dirty = function () { this.dirtyStyle(); this.dirtyShape(); }; Path.prototype.animateShape = function (loop) { return this.animate('shape', loop); }; Path.prototype.updateDuringAnimation = function (targetKey) { if (targetKey === 'style') { this.dirtyStyle(); } else if (targetKey === 'shape') { this.dirtyShape(); } else { this.markRedraw(); } }; Path.prototype.attrKV = function (key, value) { if (key === 'shape') { this.setShape(value); } else { _super.prototype.attrKV.call(this, key, value); } }; Path.prototype.setShape = function (keyOrObj, value) { var shape = this.shape; if (!shape) { shape = this.shape = {}; } if (typeof keyOrObj === 'string') { shape[keyOrObj] = value; } else { extend(shape, keyOrObj); } this.dirtyShape(); return this; }; Path.prototype.shapeChanged = function () { return !!(this.__dirty & Path.SHAPE_CHANGED_BIT); }; Path.prototype.createStyle = function (obj) { return createObject(DEFAULT_PATH_STYLE, obj); }; Path.prototype._innerSaveToNormal = function (toState) { _super.prototype._innerSaveToNormal.call(this, toState); var normalState = this._normalState; if (toState.shape && !normalState.shape) { normalState.shape = extend({}, this.shape); } }; Path.prototype._applyStateObj = function (stateName, state, normalState, keepCurrentStates, transition, animationCfg) { _super.prototype._applyStateObj.call(this, stateName, state, normalState, keepCurrentStates, transition, animationCfg); var needsRestoreToNormal = !(state && keepCurrentStates); var targetShape; if (state && state.shape) { if (transition) { if (keepCurrentStates) { targetShape = state.shape; } else { targetShape = extend({}, normalState.shape); extend(targetShape, state.shape); } } else { targetShape = extend({}, keepCurrentStates ? this.shape : normalState.shape); extend(targetShape, state.shape); } } else if (needsRestoreToNormal) { targetShape = normalState.shape; } if (targetShape) { if (transition) { this.shape = extend({}, this.shape); var targetShapePrimaryProps = {}; var shapeKeys = keys(targetShape); for (var i = 0; i < shapeKeys.length; i++) { var key = shapeKeys[i]; if (typeof targetShape[key] === 'object') { this.shape[key] = targetShape[key]; } else { targetShapePrimaryProps[key] = targetShape[key]; } } this._transitionState(stateName, { shape: targetShapePrimaryProps }, animationCfg); } else { this.shape = targetShape; this.dirtyShape(); } } }; Path.prototype._mergeStates = function (states) { var mergedState = _super.prototype._mergeStates.call(this, states); var mergedShape; for (var i = 0; i < states.length; i++) { var state = states[i]; if (state.shape) { mergedShape = mergedShape || {}; this._mergeStyle(mergedShape, state.shape); } } if (mergedShape) { mergedState.shape = mergedShape; } return mergedState; }; Path.prototype.getAnimationStyleProps = function () { return DEFAULT_PATH_ANIMATION_PROPS; }; Path.prototype.isZeroArea = function () { return false; }; Path.extend = function (defaultProps) { var Sub = (function (_super) { __extends(Sub, _super); function Sub(opts) { var _this = _super.call(this, opts) || this; defaultProps.init && defaultProps.init.call(_this, opts); return _this; } Sub.prototype.getDefaultStyle = function () { return clone(defaultProps.style); }; Sub.prototype.getDefaultShape = function () { return clone(defaultProps.shape); }; return Sub; }(Path)); for (var key in defaultProps) { if (typeof defaultProps[key] === 'function') { Sub.prototype[key] = defaultProps[key]; } } return Sub; }; Path.SHAPE_CHANGED_BIT = 4; Path.initDefaultProps = (function () { var pathProto = Path.prototype; pathProto.type = 'path'; pathProto.strokeContainThreshold = 5; pathProto.segmentIgnoreThreshold = 0; pathProto.subPixelOptimize = false; pathProto.autoBatch = false; pathProto.__dirty = Element.REDARAW_BIT | Displayable.STYLE_CHANGED_BIT | Path.SHAPE_CHANGED_BIT; })(); return Path; }(Displayable)); var DEFAULT_TSPAN_STYLE = defaults({ strokeFirst: true, font: DEFAULT_FONT, x: 0, y: 0, textAlign: 'left', textBaseline: 'top', miterLimit: 2 }, DEFAULT_PATH_STYLE); var TSpan = (function (_super) { __extends(TSpan, _super); function TSpan() { return _super !== null && _super.apply(this, arguments) || this; } TSpan.prototype.hasStroke = function () { var style = this.style; var stroke = style.stroke; return stroke != null && stroke !== 'none' && style.lineWidth > 0; }; TSpan.prototype.hasFill = function () { var style = this.style; var fill = style.fill; return fill != null && fill !== 'none'; }; TSpan.prototype.createStyle = function (obj) { return createObject(DEFAULT_TSPAN_STYLE, obj); }; TSpan.prototype.setBoundingRect = function (rect) { this._rect = rect; }; TSpan.prototype.getBoundingRect = function () { var style = this.style; if (!this._rect) { var text = style.text; text != null ? (text += '') : (text = ''); var rect = getBoundingRect(text, style.font, style.textAlign, style.textBaseline); rect.x += style.x || 0; rect.y += style.y || 0; if (this.hasStroke()) { var w = style.lineWidth; rect.x -= w / 2; rect.y -= w / 2; rect.width += w; rect.height += w; } this._rect = rect; } return this._rect; }; TSpan.initDefaultProps = (function () { var tspanProto = TSpan.prototype; tspanProto.dirtyRectTolerance = 10; })(); return TSpan; }(Displayable)); TSpan.prototype.type = 'tspan'; var DEFAULT_IMAGE_STYLE = defaults({ x: 0, y: 0 }, DEFAULT_COMMON_STYLE); var DEFAULT_IMAGE_ANIMATION_PROPS = { style: defaults({ x: true, y: true, width: true, height: true, sx: true, sy: true, sWidth: true, sHeight: true }, DEFAULT_COMMON_ANIMATION_PROPS.style) }; function isImageLike(source) { return !!(source && typeof source !== 'string' && source.width && source.height); } var ZRImage = (function (_super) { __extends(ZRImage, _super); function ZRImage() { return _super !== null && _super.apply(this, arguments) || this; } ZRImage.prototype.createStyle = function (obj) { return createObject(DEFAULT_IMAGE_STYLE, obj); }; ZRImage.prototype._getSize = function (dim) { var style = this.style; var size = style[dim]; if (size != null) { return size; } var imageSource = isImageLike(style.image) ? style.image : this.__image; if (!imageSource) { return 0; } var otherDim = dim === 'width' ? 'height' : 'width'; var otherDimSize = style[otherDim]; if (otherDimSize == null) { return imageSource[dim]; } else { return imageSource[dim] / imageSource[otherDim] * otherDimSize; } }; ZRImage.prototype.getWidth = function () { return this._getSize('width'); }; ZRImage.prototype.getHeight = function () { return this._getSize('height'); }; ZRImage.prototype.getAnimationStyleProps = function () { return DEFAULT_IMAGE_ANIMATION_PROPS; }; ZRImage.prototype.getBoundingRect = function () { var style = this.style; if (!this._rect) { this._rect = new BoundingRect(style.x || 0, style.y || 0, this.getWidth(), this.getHeight()); } return this._rect; }; return ZRImage; }(Displayable)); ZRImage.prototype.type = 'image'; function buildPath(ctx, shape) { var x = shape.x; var y = shape.y; var width = shape.width; var height = shape.height; var r = shape.r; var r1; var r2; var r3; var r4; if (width < 0) { x = x + width; width = -width; } if (height < 0) { y = y + height; height = -height; } if (typeof r === 'number') { r1 = r2 = r3 = r4 = r; } else if (r instanceof Array) { if (r.length === 1) { r1 = r2 = r3 = r4 = r[0]; } else if (r.length === 2) { r1 = r3 = r[0]; r2 = r4 = r[1]; } else if (r.length === 3) { r1 = r[0]; r2 = r4 = r[1]; r3 = r[2]; } else { r1 = r[0]; r2 = r[1]; r3 = r[2]; r4 = r[3]; } } else { r1 = r2 = r3 = r4 = 0; } var total; if (r1 + r2 > width) { total = r1 + r2; r1 *= width / total; r2 *= width / total; } if (r3 + r4 > width) { total = r3 + r4; r3 *= width / total; r4 *= width / total; } if (r2 + r3 > height) { total = r2 + r3; r2 *= height / total; r3 *= height / total; } if (r1 + r4 > height) { total = r1 + r4; r1 *= height / total; r4 *= height / total; } ctx.moveTo(x + r1, y); ctx.lineTo(x + width - r2, y); r2 !== 0 && ctx.arc(x + width - r2, y + r2, r2, -Math.PI / 2, 0); ctx.lineTo(x + width, y + height - r3); r3 !== 0 && ctx.arc(x + width - r3, y + height - r3, r3, 0, Math.PI / 2); ctx.lineTo(x + r4, y + height); r4 !== 0 && ctx.arc(x + r4, y + height - r4, r4, Math.PI / 2, Math.PI); ctx.lineTo(x, y + r1); r1 !== 0 && ctx.arc(x + r1, y + r1, r1, Math.PI, Math.PI * 1.5); } var round$1 = Math.round; function subPixelOptimizeLine(outputShape, inputShape, style) { if (!inputShape) { return; } var x1 = inputShape.x1; var x2 = inputShape.x2; var y1 = inputShape.y1; var y2 = inputShape.y2; outputShape.x1 = x1; outputShape.x2 = x2; outputShape.y1 = y1; outputShape.y2 = y2; var lineWidth = style && style.lineWidth; if (!lineWidth) { return outputShape; } if (round$1(x1 * 2) === round$1(x2 * 2)) { outputShape.x1 = outputShape.x2 = subPixelOptimize(x1, lineWidth, true); } if (round$1(y1 * 2) === round$1(y2 * 2)) { outputShape.y1 = outputShape.y2 = subPixelOptimize(y1, lineWidth, true); } return outputShape; } function subPixelOptimizeRect(outputShape, inputShape, style) { if (!inputShape) { return; } var originX = inputShape.x; var originY = inputShape.y; var originWidth = inputShape.width; var originHeight = inputShape.height; outputShape.x = originX; outputShape.y = originY; outputShape.width = originWidth; outputShape.height = originHeight; var lineWidth = style && style.lineWidth; if (!lineWidth) { return outputShape; } outputShape.x = subPixelOptimize(originX, lineWidth, true); outputShape.y = subPixelOptimize(originY, lineWidth, true); outputShape.width = Math.max(subPixelOptimize(originX + originWidth, lineWidth, false) - outputShape.x, originWidth === 0 ? 0 : 1); outputShape.height = Math.max(subPixelOptimize(originY + originHeight, lineWidth, false) - outputShape.y, originHeight === 0 ? 0 : 1); return outputShape; } function subPixelOptimize(position, lineWidth, positiveOrNegative) { if (!lineWidth) { return position; } var doubledPosition = round$1(position * 2); return (doubledPosition + round$1(lineWidth)) % 2 === 0 ? doubledPosition / 2 : (doubledPosition + (positiveOrNegative ? 1 : -1)) / 2; } var RectShape = (function () { function RectShape() { this.x = 0; this.y = 0; this.width = 0; this.height = 0; } return RectShape; }()); var subPixelOptimizeOutputShape = {}; var Rect = (function (_super) { __extends(Rect, _super); function Rect(opts) { return _super.call(this, opts) || this; } Rect.prototype.getDefaultShape = function () { return new RectShape(); }; Rect.prototype.buildPath = function (ctx, shape) { var x; var y; var width; var height; if (this.subPixelOptimize) { var optimizedShape = subPixelOptimizeRect(subPixelOptimizeOutputShape, shape, this.style); x = optimizedShape.x; y = optimizedShape.y; width = optimizedShape.width; height = optimizedShape.height; optimizedShape.r = shape.r; shape = optimizedShape; } else { x = shape.x; y = shape.y; width = shape.width; height = shape.height; } if (!shape.r) { ctx.rect(x, y, width, height); } else { buildPath(ctx, shape); } }; Rect.prototype.isZeroArea = function () { return !this.shape.width || !this.shape.height; }; return Rect; }(Path)); Rect.prototype.type = 'rect'; var DEFAULT_RICH_TEXT_COLOR = { fill: '#000' }; var DEFAULT_STROKE_LINE_WIDTH = 2; var DEFAULT_TEXT_ANIMATION_PROPS = { style: defaults({ fill: true, stroke: true, fillOpacity: true, strokeOpacity: true, lineWidth: true, fontSize: true, lineHeight: true, width: true, height: true, textShadowColor: true, textShadowBlur: true, textShadowOffsetX: true, textShadowOffsetY: true, backgroundColor: true, padding: true, borderColor: true, borderWidth: true, borderRadius: true }, DEFAULT_COMMON_ANIMATION_PROPS.style) }; var ZRText = (function (_super) { __extends(ZRText, _super); function ZRText(opts) { var _this = _super.call(this) || this; _this.type = 'text'; _this._children = []; _this._defaultStyle = DEFAULT_RICH_TEXT_COLOR; _this.attr(opts); return _this; } ZRText.prototype.childrenRef = function () { return this._children; }; ZRText.prototype.update = function () { if (this.styleChanged()) { this._updateSubTexts(); } for (var i = 0; i < this._children.length; i++) { var child = this._children[i]; child.zlevel = this.zlevel; child.z = this.z; child.z2 = this.z2; child.culling = this.culling; child.cursor = this.cursor; child.invisible = this.invisible; } var attachedTransform = this.attachedTransform; if (attachedTransform) { attachedTransform.updateTransform(); var m = attachedTransform.transform; if (m) { this.transform = this.transform || []; copy$1(this.transform, m); } else { this.transform = null; } } else { _super.prototype.update.call(this); } }; ZRText.prototype.getComputedTransform = function () { if (this.__hostTarget) { this.__hostTarget.getComputedTransform(); this.__hostTarget.updateInnerText(true); } return this.attachedTransform ? this.attachedTransform.getComputedTransform() : _super.prototype.getComputedTransform.call(this); }; ZRText.prototype._updateSubTexts = function () { this._childCursor = 0; normalizeTextStyle(this.style); this.style.rich ? this._updateRichTexts() : this._updatePlainTexts(); this._children.length = this._childCursor; this.styleUpdated(); }; ZRText.prototype.addSelfToZr = function (zr) { _super.prototype.addSelfToZr.call(this, zr); for (var i = 0; i < this._children.length; i++) { this._children[i].__zr = zr; } }; ZRText.prototype.removeSelfFromZr = function (zr) { _super.prototype.removeSelfFromZr.call(this, zr); for (var i = 0; i < this._children.length; i++) { this._children[i].__zr = null; } }; ZRText.prototype.getBoundingRect = function () { if (this.styleChanged()) { this._updateSubTexts(); } if (!this._rect) { var tmpRect = new BoundingRect(0, 0, 0, 0); var children = this._children; var tmpMat = []; var rect = null; for (var i = 0; i < children.length; i++) { var child = children[i]; var childRect = child.getBoundingRect(); var transform = child.getLocalTransform(tmpMat); if (transform) { tmpRect.copy(childRect); tmpRect.applyTransform(transform); rect = rect || tmpRect.clone(); rect.union(tmpRect); } else { rect = rect || childRect.clone(); rect.union(childRect); } } this._rect = rect || tmpRect; } return this._rect; }; ZRText.prototype.setDefaultTextStyle = function (defaultTextStyle) { this._defaultStyle = defaultTextStyle || DEFAULT_RICH_TEXT_COLOR; }; ZRText.prototype.setTextContent = function (textContent) { throw new Error('Can\'t attach text on another text'); }; ZRText.prototype._mergeStyle = function (targetStyle, sourceStyle) { if (!sourceStyle) { return targetStyle; } var sourceRich = sourceStyle.rich; var targetRich = targetStyle.rich || (sourceRich && {}); extend(targetStyle, sourceStyle); if (sourceRich && targetRich) { this._mergeRich(targetRich, sourceRich); targetStyle.rich = targetRich; } else if (targetRich) { targetStyle.rich = targetRich; } return targetStyle; }; ZRText.prototype._mergeRich = function (targetRich, sourceRich) { var richNames = keys(sourceRich); for (var i = 0; i < richNames.length; i++) { var richName = richNames[i]; targetRich[richName] = targetRich[richName] || {}; extend(targetRich[richName], sourceRich[richName]); } }; ZRText.prototype.getAnimationStyleProps = function () { return DEFAULT_TEXT_ANIMATION_PROPS; }; ZRText.prototype._getOrCreateChild = function (Ctor) { var child = this._children[this._childCursor]; if (!child || !(child instanceof Ctor)) { child = new Ctor(); } this._children[this._childCursor++] = child; child.__zr = this.__zr; child.parent = this; return child; }; ZRText.prototype._updatePlainTexts = function () { var style = this.style; var textFont = style.font || DEFAULT_FONT; var textPadding = style.padding; var text = getStyleText(style); var contentBlock = parsePlainText(text, style); var needDrawBg = needDrawBackground(style); var bgColorDrawn = !!(style.backgroundColor); var outerHeight = contentBlock.outerHeight; var textLines = contentBlock.lines; var lineHeight = contentBlock.lineHeight; var defaultStyle = this._defaultStyle; var baseX = style.x || 0; var baseY = style.y || 0; var textAlign = style.align || defaultStyle.align || 'left'; var verticalAlign = style.verticalAlign || defaultStyle.verticalAlign || 'top'; var textX = baseX; var textY = adjustTextY(baseY, contentBlock.contentHeight, verticalAlign); if (needDrawBg || textPadding) { var outerWidth_1 = contentBlock.width; textPadding && (outerWidth_1 += textPadding[1] + textPadding[3]); var boxX = adjustTextX(baseX, outerWidth_1, textAlign); var boxY = adjustTextY(baseY, outerHeight, verticalAlign); needDrawBg && this._renderBackground(style, style, boxX, boxY, outerWidth_1, outerHeight); } textY += lineHeight / 2; if (textPadding) { textX = getTextXForPadding(baseX, textAlign, textPadding); if (verticalAlign === 'top') { textY += textPadding[0]; } else if (verticalAlign === 'bottom') { textY -= textPadding[2]; } } var defaultLineWidth = 0; var useDefaultFill = false; var textFill = getFill('fill' in style ? style.fill : (useDefaultFill = true, defaultStyle.fill)); var textStroke = getStroke('stroke' in style ? style.stroke : (!bgColorDrawn && (!defaultStyle.autoStroke || useDefaultFill)) ? (defaultLineWidth = DEFAULT_STROKE_LINE_WIDTH, defaultStyle.stroke) : null); var hasShadow = style.textShadowBlur > 0; var fixedBoundingRect = style.width != null && (style.overflow === 'truncate' || style.overflow === 'break' || style.overflow === 'breakAll'); var calculatedLineHeight = contentBlock.calculatedLineHeight; for (var i = 0; i < textLines.length; i++) { var el = this._getOrCreateChild(TSpan); var subElStyle = el.createStyle(); el.useStyle(subElStyle); subElStyle.text = textLines[i]; subElStyle.x = textX; subElStyle.y = textY; if (textAlign) { subElStyle.textAlign = textAlign; } subElStyle.textBaseline = 'middle'; subElStyle.opacity = style.opacity; subElStyle.strokeFirst = true; if (hasShadow) { subElStyle.shadowBlur = style.textShadowBlur || 0; subElStyle.shadowColor = style.textShadowColor || 'transparent'; subElStyle.shadowOffsetX = style.textShadowOffsetX || 0; subElStyle.shadowOffsetY = style.textShadowOffsetY || 0; } if (textStroke) { subElStyle.stroke = textStroke; subElStyle.lineWidth = style.lineWidth || defaultLineWidth; subElStyle.lineDash = style.lineDash; subElStyle.lineDashOffset = style.lineDashOffset || 0; } if (textFill) { subElStyle.fill = textFill; } subElStyle.font = textFont; textY += lineHeight; if (fixedBoundingRect) { el.setBoundingRect(new BoundingRect(adjustTextX(subElStyle.x, style.width, subElStyle.textAlign), adjustTextY(subElStyle.y, calculatedLineHeight, subElStyle.textBaseline), style.width, calculatedLineHeight)); } } }; ZRText.prototype._updateRichTexts = function () { var style = this.style; var text = getStyleText(style); var contentBlock = parseRichText(text, style); var contentWidth = contentBlock.width; var outerWidth = contentBlock.outerWidth; var outerHeight = contentBlock.outerHeight; var textPadding = style.padding; var baseX = style.x || 0; var baseY = style.y || 0; var defaultStyle = this._defaultStyle; var textAlign = style.align || defaultStyle.align; var verticalAlign = style.verticalAlign || defaultStyle.verticalAlign; var boxX = adjustTextX(baseX, outerWidth, textAlign); var boxY = adjustTextY(baseY, outerHeight, verticalAlign); var xLeft = boxX; var lineTop = boxY; if (textPadding) { xLeft += textPadding[3]; lineTop += textPadding[0]; } var xRight = xLeft + contentWidth; if (needDrawBackground(style)) { this._renderBackground(style, style, boxX, boxY, outerWidth, outerHeight); } var bgColorDrawn = !!(style.backgroundColor); for (var i = 0; i < contentBlock.lines.length; i++) { var line = contentBlock.lines[i]; var tokens = line.tokens; var tokenCount = tokens.length; var lineHeight = line.lineHeight; var remainedWidth = line.width; var leftIndex = 0; var lineXLeft = xLeft; var lineXRight = xRight; var rightIndex = tokenCount - 1; var token = void 0; while (leftIndex < tokenCount && (token = tokens[leftIndex], !token.align || token.align === 'left')) { this._placeToken(token, style, lineHeight, lineTop, lineXLeft, 'left', bgColorDrawn); remainedWidth -= token.width; lineXLeft += token.width; leftIndex++; } while (rightIndex >= 0 && (token = tokens[rightIndex], token.align === 'right')) { this._placeToken(token, style, lineHeight, lineTop, lineXRight, 'right', bgColorDrawn); remainedWidth -= token.width; lineXRight -= token.width; rightIndex--; } lineXLeft += (contentWidth - (lineXLeft - xLeft) - (xRight - lineXRight) - remainedWidth) / 2; while (leftIndex <= rightIndex) { token = tokens[leftIndex]; this._placeToken(token, style, lineHeight, lineTop, lineXLeft + token.width / 2, 'center', bgColorDrawn); lineXLeft += token.width; leftIndex++; } lineTop += lineHeight; } }; ZRText.prototype._placeToken = function (token, style, lineHeight, lineTop, x, textAlign, parentBgColorDrawn) { var tokenStyle = style.rich[token.styleName] || {}; tokenStyle.text = token.text; var verticalAlign = token.verticalAlign; var y = lineTop + lineHeight / 2; if (verticalAlign === 'top') { y = lineTop + token.height / 2; } else if (verticalAlign === 'bottom') { y = lineTop + lineHeight - token.height / 2; } var needDrawBg = !token.isLineHolder && needDrawBackground(tokenStyle); needDrawBg && this._renderBackground(tokenStyle, style, textAlign === 'right' ? x - token.width : textAlign === 'center' ? x - token.width / 2 : x, y - token.height / 2, token.width, token.height); var bgColorDrawn = !!tokenStyle.backgroundColor; var textPadding = token.textPadding; if (textPadding) { x = getTextXForPadding(x, textAlign, textPadding); y -= token.height / 2 - textPadding[0] - token.innerHeight / 2; } var el = this._getOrCreateChild(TSpan); var subElStyle = el.createStyle(); el.useStyle(subElStyle); var defaultStyle = this._defaultStyle; var useDefaultFill = false; var defaultLineWidth = 0; var textFill = getStroke('fill' in tokenStyle ? tokenStyle.fill : 'fill' in style ? style.fill : (useDefaultFill = true, defaultStyle.fill)); var textStroke = getStroke('stroke' in tokenStyle ? tokenStyle.stroke : 'stroke' in style ? style.stroke : (!bgColorDrawn && !parentBgColorDrawn && (!defaultStyle.autoStroke || useDefaultFill)) ? (defaultLineWidth = DEFAULT_STROKE_LINE_WIDTH, defaultStyle.stroke) : null); var hasShadow = tokenStyle.textShadowBlur > 0 || style.textShadowBlur > 0; subElStyle.text = token.text; subElStyle.x = x; subElStyle.y = y; if (hasShadow) { subElStyle.shadowBlur = tokenStyle.textShadowBlur || style.textShadowBlur || 0; subElStyle.shadowColor = tokenStyle.textShadowColor || style.textShadowColor || 'transparent'; subElStyle.shadowOffsetX = tokenStyle.textShadowOffsetX || style.textShadowOffsetX || 0; subElStyle.shadowOffsetY = tokenStyle.textShadowOffsetY || style.textShadowOffsetY || 0; } subElStyle.textAlign = textAlign; subElStyle.textBaseline = 'middle'; subElStyle.font = token.font || DEFAULT_FONT; subElStyle.opacity = retrieve3(tokenStyle.opacity, style.opacity, 1); if (textStroke) { subElStyle.lineWidth = retrieve3(tokenStyle.lineWidth, style.lineWidth, defaultLineWidth); subElStyle.lineDash = retrieve2(tokenStyle.lineDash, style.lineDash); subElStyle.lineDashOffset = style.lineDashOffset || 0; subElStyle.stroke = textStroke; } if (textFill) { subElStyle.fill = textFill; } var textWidth = token.contentWidth; var textHeight = token.contentHeight; el.setBoundingRect(new BoundingRect(adjustTextX(subElStyle.x, textWidth, subElStyle.textAlign), adjustTextY(subElStyle.y, textHeight, subElStyle.textBaseline), textWidth, textHeight)); }; ZRText.prototype._renderBackground = function (style, topStyle, x, y, width, height) { var textBackgroundColor = style.backgroundColor; var textBorderWidth = style.borderWidth; var textBorderColor = style.borderColor; var isPlainBg = isString(textBackgroundColor); var textBorderRadius = style.borderRadius; var self = this; var rectEl; var imgEl; if (isPlainBg || (textBorderWidth && textBorderColor)) { rectEl = this._getOrCreateChild(Rect); rectEl.useStyle(rectEl.createStyle()); rectEl.style.fill = null; var rectShape = rectEl.shape; rectShape.x = x; rectShape.y = y; rectShape.width = width; rectShape.height = height; rectShape.r = textBorderRadius; rectEl.dirtyShape(); } if (isPlainBg) { var rectStyle = rectEl.style; rectStyle.fill = textBackgroundColor || null; rectStyle.fillOpacity = retrieve2(style.fillOpacity, 1); } else if (textBackgroundColor && textBackgroundColor.image) { imgEl = this._getOrCreateChild(ZRImage); imgEl.onload = function () { self.dirtyStyle(); }; var imgStyle = imgEl.style; imgStyle.image = textBackgroundColor.image; imgStyle.x = x; imgStyle.y = y; imgStyle.width = width; imgStyle.height = height; } if (textBorderWidth && textBorderColor) { var rectStyle = rectEl.style; rectStyle.lineWidth = textBorderWidth; rectStyle.stroke = textBorderColor; rectStyle.strokeOpacity = retrieve2(style.strokeOpacity, 1); rectStyle.lineDash = style.borderDash; rectStyle.lineDashOffset = style.borderDashOffset || 0; rectEl.strokeContainThreshold = 0; if (rectEl.hasFill() && rectEl.hasStroke()) { rectStyle.strokeFirst = true; rectStyle.lineWidth *= 2; } } var commonStyle = (rectEl || imgEl).style; commonStyle.shadowBlur = style.shadowBlur || 0; commonStyle.shadowColor = style.shadowColor || 'transparent'; commonStyle.shadowOffsetX = style.shadowOffsetX || 0; commonStyle.shadowOffsetY = style.shadowOffsetY || 0; commonStyle.opacity = retrieve3(style.opacity, topStyle.opacity, 1); }; ZRText.makeFont = function (style) { var font = ''; if (style.fontSize || style.fontFamily || style.fontWeight) { var fontSize = ''; if (typeof style.fontSize === 'string' && (style.fontSize.indexOf('px') !== -1 || style.fontSize.indexOf('rem') !== -1 || style.fontSize.indexOf('em') !== -1)) { fontSize = style.fontSize; } else if (!isNaN(+style.fontSize)) { fontSize = style.fontSize + 'px'; } else { fontSize = '12px'; } font = [ style.fontStyle, style.fontWeight, fontSize, style.fontFamily || 'sans-serif' ].join(' '); } return font && trim(font) || style.textFont || style.font; }; return ZRText; }(Displayable)); var VALID_TEXT_ALIGN = { left: true, right: 1, center: 1 }; var VALID_TEXT_VERTICAL_ALIGN = { top: 1, bottom: 1, middle: 1 }; function normalizeTextStyle(style) { normalizeStyle(style); each(style.rich, normalizeStyle); return style; } function normalizeStyle(style) { if (style) { style.font = ZRText.makeFont(style); var textAlign = style.align; textAlign === 'middle' && (textAlign = 'center'); style.align = (textAlign == null || VALID_TEXT_ALIGN[textAlign]) ? textAlign : 'left'; var verticalAlign = style.verticalAlign; verticalAlign === 'center' && (verticalAlign = 'middle'); style.verticalAlign = (verticalAlign == null || VALID_TEXT_VERTICAL_ALIGN[verticalAlign]) ? verticalAlign : 'top'; var textPadding = style.padding; if (textPadding) { style.padding = normalizeCssArray(style.padding); } } } function getStroke(stroke, lineWidth) { return (stroke == null || lineWidth <= 0 || stroke === 'transparent' || stroke === 'none') ? null : (stroke.image || stroke.colorStops) ? '#000' : stroke; } function getFill(fill) { return (fill == null || fill === 'none') ? null : (fill.image || fill.colorStops) ? '#000' : fill; } function getTextXForPadding(x, textAlign, textPadding) { return textAlign === 'right' ? (x - textPadding[1]) : textAlign === 'center' ? (x + textPadding[3] / 2 - textPadding[1] / 2) : (x + textPadding[3]); } function getStyleText(style) { var text = style.text; text != null && (text += ''); return text; } function needDrawBackground(style) { return !!(style.backgroundColor || (style.borderWidth && style.borderColor)); } var getECData = makeInner(); var _highlightNextDigit = 1; var _highlightKeyMap = {}; var getSavedStates = makeInner(); var HOVER_STATE_NORMAL = 0; var HOVER_STATE_BLUR = 1; var HOVER_STATE_EMPHASIS = 2; var SPECIAL_STATES = ['emphasis', 'blur', 'select']; var DISPLAY_STATES = ['normal', 'emphasis', 'blur', 'select']; var Z2_EMPHASIS_LIFT = 10; var Z2_SELECT_LIFT = 9; var HIGHLIGHT_ACTION_TYPE = 'highlight'; var DOWNPLAY_ACTION_TYPE = 'downplay'; var SELECT_ACTION_TYPE = 'select'; var UNSELECT_ACTION_TYPE = 'unselect'; var TOGGLE_SELECT_ACTION_TYPE = 'toggleSelect'; function hasFillOrStroke(fillOrStroke) { return fillOrStroke != null && fillOrStroke !== 'none'; } // Most lifted color are duplicated. var liftedColorCache = new LRU(100); function liftColor(color$1) { if (typeof color$1 !== 'string') { return color$1; } var liftedColor = liftedColorCache.get(color$1); if (!liftedColor) { liftedColor = lift(color$1, -0.1); liftedColorCache.put(color$1, liftedColor); } return liftedColor; } function doChangeHoverState(el, stateName, hoverStateEnum) { if (el.onHoverStateChange && (el.hoverState || 0) !== hoverStateEnum) { el.onHoverStateChange(stateName); } el.hoverState = hoverStateEnum; } function singleEnterEmphasis(el) { // Only mark the flag. // States will be applied in the echarts.ts in next frame. doChangeHoverState(el, 'emphasis', HOVER_STATE_EMPHASIS); } function singleLeaveEmphasis(el) { // Only mark the flag. // States will be applied in the echarts.ts in next frame. if (el.hoverState === HOVER_STATE_EMPHASIS) { doChangeHoverState(el, 'normal', HOVER_STATE_NORMAL); } } function singleEnterBlur(el) { doChangeHoverState(el, 'blur', HOVER_STATE_BLUR); } function singleLeaveBlur(el) { if (el.hoverState === HOVER_STATE_BLUR) { doChangeHoverState(el, 'normal', HOVER_STATE_NORMAL); } } function singleEnterSelect(el) { el.selected = true; } function singleLeaveSelect(el) { el.selected = false; } function updateElementState(el, updater, commonParam) { updater(el, commonParam); } function traverseUpdateState(el, updater, commonParam) { updateElementState(el, updater, commonParam); el.isGroup && el.traverse(function (child) { updateElementState(child, updater, commonParam); }); } function setStatesFlag(el, stateName) { switch (stateName) { case 'emphasis': el.hoverState = HOVER_STATE_EMPHASIS; break; case 'normal': el.hoverState = HOVER_STATE_NORMAL; break; case 'blur': el.hoverState = HOVER_STATE_BLUR; break; case 'select': el.selected = true; } } function getFromStateStyle(el, props, toStateName, defaultValue) { var style = el.style; var fromState = {}; for (var i = 0; i < props.length; i++) { var propName = props[i]; var val = style[propName]; fromState[propName] = val == null ? defaultValue && defaultValue[propName] : val; } for (var i = 0; i < el.animators.length; i++) { var animator = el.animators[i]; if (animator.__fromStateTransition // Dont consider the animation to emphasis state. && animator.__fromStateTransition.indexOf(toStateName) < 0 && animator.targetName === 'style') { animator.saveFinalToTarget(fromState, props); } } return fromState; } function createEmphasisDefaultState(el, stateName, targetStates, state) { var hasSelect = targetStates && indexOf(targetStates, 'select') >= 0; var cloned = false; if (el instanceof Path) { var store = getSavedStates(el); var fromFill = hasSelect ? store.selectFill || store.normalFill : store.normalFill; var fromStroke = hasSelect ? store.selectStroke || store.normalStroke : store.normalStroke; if (hasFillOrStroke(fromFill) || hasFillOrStroke(fromStroke)) { state = state || {}; // Apply default color lift var emphasisStyle = state.style || {}; if (!hasFillOrStroke(emphasisStyle.fill) && hasFillOrStroke(fromFill)) { cloned = true; // Not modify the original value. state = extend({}, state); emphasisStyle = extend({}, emphasisStyle); // Already being applied 'emphasis'. DON'T lift color multiple times. emphasisStyle.fill = liftColor(fromFill); } // Not highlight stroke if fill has been highlighted. else if (!hasFillOrStroke(emphasisStyle.stroke) && hasFillOrStroke(fromStroke)) { if (!cloned) { state = extend({}, state); emphasisStyle = extend({}, emphasisStyle); } emphasisStyle.stroke = liftColor(fromStroke); } state.style = emphasisStyle; } } if (state) { // TODO Share with textContent? if (state.z2 == null) { if (!cloned) { state = extend({}, state); } var z2EmphasisLift = el.z2EmphasisLift; state.z2 = el.z2 + (z2EmphasisLift != null ? z2EmphasisLift : Z2_EMPHASIS_LIFT); } } return state; } function createSelectDefaultState(el, stateName, state) { // const hasSelect = indexOf(el.currentStates, stateName) >= 0; if (state) { // TODO Share with textContent? if (state.z2 == null) { state = extend({}, state); var z2SelectLift = el.z2SelectLift; state.z2 = el.z2 + (z2SelectLift != null ? z2SelectLift : Z2_SELECT_LIFT); } } return state; } function createBlurDefaultState(el, stateName, state) { var hasBlur = indexOf(el.currentStates, stateName) >= 0; var currentOpacity = el.style.opacity; var fromState = !hasBlur ? getFromStateStyle(el, ['opacity'], stateName, { opacity: 1 }) : null; state = state || {}; var blurStyle = state.style || {}; if (blurStyle.opacity == null) { // clone state state = extend({}, state); blurStyle = extend({ // Already being applied 'emphasis'. DON'T mul opacity multiple times. opacity: hasBlur ? currentOpacity : fromState.opacity * 0.1 }, blurStyle); state.style = blurStyle; } return state; } function elementStateProxy(stateName, targetStates) { var state = this.states[stateName]; if (this.style) { if (stateName === 'emphasis') { return createEmphasisDefaultState(this, stateName, targetStates, state); } else if (stateName === 'blur') { return createBlurDefaultState(this, stateName, state); } else if (stateName === 'select') { return createSelectDefaultState(this, stateName, state); } } return state; } /**FI * Set hover style (namely "emphasis style") of element. * @param el Should not be `zrender/graphic/Group`. * @param focus 'self' | 'selfInSeries' | 'series' */ function setDefaultStateProxy(el) { el.stateProxy = elementStateProxy; var textContent = el.getTextContent(); var textGuide = el.getTextGuideLine(); if (textContent) { textContent.stateProxy = elementStateProxy; } if (textGuide) { textGuide.stateProxy = elementStateProxy; } } function enterEmphasisWhenMouseOver(el, e) { !shouldSilent(el, e) // "emphasis" event highlight has higher priority than mouse highlight. && !el.__highByOuter && traverseUpdateState(el, singleEnterEmphasis); } function leaveEmphasisWhenMouseOut(el, e) { !shouldSilent(el, e) // "emphasis" event highlight has higher priority than mouse highlight. && !el.__highByOuter && traverseUpdateState(el, singleLeaveEmphasis); } function enterEmphasis(el, highlightDigit) { el.__highByOuter |= 1 << (highlightDigit || 0); traverseUpdateState(el, singleEnterEmphasis); } function leaveEmphasis(el, highlightDigit) { !(el.__highByOuter &= ~(1 << (highlightDigit || 0))) && traverseUpdateState(el, singleLeaveEmphasis); } function enterBlur(el) { traverseUpdateState(el, singleEnterBlur); } function leaveBlur(el) { traverseUpdateState(el, singleLeaveBlur); } function enterSelect(el) { traverseUpdateState(el, singleEnterSelect); } function leaveSelect(el) { traverseUpdateState(el, singleLeaveSelect); } function shouldSilent(el, e) { return el.__highDownSilentOnTouch && e.zrByTouch; } function allLeaveBlur(api) { var model = api.getModel(); model.eachComponent(function (componentType, componentModel) { var view = componentType === 'series' ? api.getViewOfSeriesModel(componentModel) : api.getViewOfComponentModel(componentModel); // Leave blur anyway view.group.traverse(function (child) { singleLeaveBlur(child); }); }); } function blurSeries(targetSeriesIndex, focus, blurScope, api) { var ecModel = api.getModel(); blurScope = blurScope || 'coordinateSystem'; function leaveBlurOfIndices(data, dataIndices) { for (var i = 0; i < dataIndices.length; i++) { var itemEl = data.getItemGraphicEl(dataIndices[i]); itemEl && leaveBlur(itemEl); } } if (targetSeriesIndex == null) { return; } if (!focus || focus === 'none') { return; } var targetSeriesModel = ecModel.getSeriesByIndex(targetSeriesIndex); var targetCoordSys = targetSeriesModel.coordinateSystem; if (targetCoordSys && targetCoordSys.master) { targetCoordSys = targetCoordSys.master; } var blurredSeries = []; ecModel.eachSeries(function (seriesModel) { var sameSeries = targetSeriesModel === seriesModel; var coordSys = seriesModel.coordinateSystem; if (coordSys && coordSys.master) { coordSys = coordSys.master; } var sameCoordSys = coordSys && targetCoordSys ? coordSys === targetCoordSys : sameSeries; // If there is no coordinate system. use sameSeries instead. if (!( // Not blur other series if blurScope series blurScope === 'series' && !sameSeries // Not blur other coordinate system if blurScope is coordinateSystem || blurScope === 'coordinateSystem' && !sameCoordSys // Not blur self series if focus is series. || focus === 'series' && sameSeries // TODO blurScope: coordinate system )) { var view = api.getViewOfSeriesModel(seriesModel); view.group.traverse(function (child) { singleEnterBlur(child); }); if (isArrayLike(focus)) { leaveBlurOfIndices(seriesModel.getData(), focus); } else if (isObject(focus)) { var dataTypes = keys(focus); for (var d = 0; d < dataTypes.length; d++) { leaveBlurOfIndices(seriesModel.getData(dataTypes[d]), focus[dataTypes[d]]); } } blurredSeries.push(seriesModel); } }); ecModel.eachComponent(function (componentType, componentModel) { if (componentType === 'series') { return; } var view = api.getViewOfComponentModel(componentModel); if (view && view.blurSeries) { view.blurSeries(blurredSeries, ecModel); } }); } function blurComponent(componentMainType, componentIndex, api) { if (componentMainType == null || componentIndex == null) { return; } var componentModel = api.getModel().getComponent(componentMainType, componentIndex); if (!componentModel) { return; } var view = api.getViewOfComponentModel(componentModel); if (!view || !view.focusBlurEnabled) { return; } view.group.traverse(function (child) { singleEnterBlur(child); }); } function blurSeriesFromHighlightPayload(seriesModel, payload, api) { var seriesIndex = seriesModel.seriesIndex; var data = seriesModel.getData(payload.dataType); var dataIndex = queryDataIndex(data, payload); // Pick the first one if there is multiple/none exists. dataIndex = (isArray(dataIndex) ? dataIndex[0] : dataIndex) || 0; var el = data.getItemGraphicEl(dataIndex); if (!el) { var count = data.count(); var current = 0; // If data on dataIndex is NaN. while (!el && current < count) { el = data.getItemGraphicEl(current++); } } if (el) { var ecData = getECData(el); blurSeries(seriesIndex, ecData.focus, ecData.blurScope, api); } else { // If there is no element put on the data. Try getting it from raw option // TODO Should put it on seriesModel? var focus_1 = seriesModel.get(['emphasis', 'focus']); var blurScope = seriesModel.get(['emphasis', 'blurScope']); if (focus_1 != null) { blurSeries(seriesIndex, focus_1, blurScope, api); } } } function findComponentHighDownDispatchers(componentMainType, componentIndex, name, api) { var ret = { focusSelf: false, dispatchers: null }; if (componentMainType == null || componentMainType === 'series' || componentIndex == null || name == null) { return ret; } var componentModel = api.getModel().getComponent(componentMainType, componentIndex); if (!componentModel) { return ret; } var view = api.getViewOfComponentModel(componentModel); if (!view || !view.findHighDownDispatchers) { return ret; } var dispatchers = view.findHighDownDispatchers(name); // At presnet, the component (like Geo) only blur inside itself. // So we do not use `blurScope` in component. var focusSelf; for (var i = 0; i < dispatchers.length; i++) { if ("development" !== 'production' && !isHighDownDispatcher(dispatchers[i])) { error('param should be highDownDispatcher'); } if (getECData(dispatchers[i]).focus === 'self') { focusSelf = true; break; } } return { focusSelf: focusSelf, dispatchers: dispatchers }; } function handleGlobalMouseOverForHighDown(dispatcher, e, api) { if ("development" !== 'production' && !isHighDownDispatcher(dispatcher)) { error('param should be highDownDispatcher'); } var ecData = getECData(dispatcher); var _a = findComponentHighDownDispatchers(ecData.componentMainType, ecData.componentIndex, ecData.componentHighDownName, api), dispatchers = _a.dispatchers, focusSelf = _a.focusSelf; // If `findHighDownDispatchers` is supported on the component, // highlight/downplay elements with the same name. if (dispatchers) { if (focusSelf) { blurComponent(ecData.componentMainType, ecData.componentIndex, api); } each(dispatchers, function (dispatcher) { return enterEmphasisWhenMouseOver(dispatcher, e); }); } else { // Try blur all in the related series. Then emphasis the hoverred. // TODO. progressive mode. blurSeries(ecData.seriesIndex, ecData.focus, ecData.blurScope, api); if (ecData.focus === 'self') { blurComponent(ecData.componentMainType, ecData.componentIndex, api); } // Other than series, component that not support `findHighDownDispatcher` will // also use it. But in this case, highlight/downplay are only supported in // mouse hover but not in dispatchAction. enterEmphasisWhenMouseOver(dispatcher, e); } } function handleGlboalMouseOutForHighDown(dispatcher, e, api) { if ("development" !== 'production' && !isHighDownDispatcher(dispatcher)) { error('param should be highDownDispatcher'); } allLeaveBlur(api); var ecData = getECData(dispatcher); var dispatchers = findComponentHighDownDispatchers(ecData.componentMainType, ecData.componentIndex, ecData.componentHighDownName, api).dispatchers; if (dispatchers) { each(dispatchers, function (dispatcher) { return leaveEmphasisWhenMouseOut(dispatcher, e); }); } else { leaveEmphasisWhenMouseOut(dispatcher, e); } } function toggleSelectionFromPayload(seriesModel, payload, api) { if (!isSelectChangePayload(payload)) { return; } var dataType = payload.dataType; var data = seriesModel.getData(dataType); var dataIndex = queryDataIndex(data, payload); if (!isArray(dataIndex)) { dataIndex = [dataIndex]; } seriesModel[payload.type === TOGGLE_SELECT_ACTION_TYPE ? 'toggleSelect' : payload.type === SELECT_ACTION_TYPE ? 'select' : 'unselect'](dataIndex, dataType); } function updateSeriesElementSelection(seriesModel) { var allData = seriesModel.getAllData(); each(allData, function (_a) { var data = _a.data, type = _a.type; data.eachItemGraphicEl(function (el, idx) { seriesModel.isSelected(idx, type) ? enterSelect(el) : leaveSelect(el); }); }); } function getAllSelectedIndices(ecModel) { var ret = []; ecModel.eachSeries(function (seriesModel) { var allData = seriesModel.getAllData(); each(allData, function (_a) { var data = _a.data, type = _a.type; var dataIndices = seriesModel.getSelectedDataIndices(); if (dataIndices.length > 0) { var item = { dataIndex: dataIndices, seriesIndex: seriesModel.seriesIndex }; if (type != null) { item.dataType = type; } ret.push(item); } }); }); return ret; } /** * Enable the function that mouseover will trigger the emphasis state. * * NOTE: * This function should be used on the element with dataIndex, seriesIndex. * */ function enableHoverEmphasis(el, focus, blurScope) { setAsHighDownDispatcher(el, true); traverseUpdateState(el, setDefaultStateProxy); enableHoverFocus(el, focus, blurScope); } function enableHoverFocus(el, focus, blurScope) { var ecData = getECData(el); if (focus != null) { // TODO dataIndex may be set after this function. This check is not useful. // if (ecData.dataIndex == null) { // if (__DEV__) { // console.warn('focus can only been set on element with dataIndex'); // } // } // else { ecData.focus = focus; ecData.blurScope = blurScope; // } } else if (ecData.focus) { ecData.focus = null; } } var OTHER_STATES = ['emphasis', 'blur', 'select']; var defaultStyleGetterMap = { itemStyle: 'getItemStyle', lineStyle: 'getLineStyle', areaStyle: 'getAreaStyle' }; /** * Set emphasis/blur/selected states of element. */ function setStatesStylesFromModel(el, itemModel, styleType, // default itemStyle getter) { styleType = styleType || 'itemStyle'; for (var i = 0; i < OTHER_STATES.length; i++) { var stateName = OTHER_STATES[i]; var model = itemModel.getModel([stateName, styleType]); var state = el.ensureState(stateName); // Let it throw error if getterType is not found. state.style = getter ? getter(model) : model[defaultStyleGetterMap[styleType]](); } } /** * @parame el * @param el.highDownSilentOnTouch * In touch device, mouseover event will be trigger on touchstart event * (see module:zrender/dom/HandlerProxy). By this mechanism, we can * conveniently use hoverStyle when tap on touch screen without additional * code for compatibility. * But if the chart/component has select feature, which usually also use * hoverStyle, there might be conflict between 'select-highlight' and * 'hover-highlight' especially when roam is enabled (see geo for example). * In this case, `highDownSilentOnTouch` should be used to disable * hover-highlight on touch device. * @param asDispatcher If `false`, do not set as "highDownDispatcher". */ function setAsHighDownDispatcher(el, asDispatcher) { var disable = asDispatcher === false; var extendedEl = el; // Make `highDownSilentOnTouch` and `onStateChange` only work after // `setAsHighDownDispatcher` called. Avoid it is modified by user unexpectedly. if (el.highDownSilentOnTouch) { extendedEl.__highDownSilentOnTouch = el.highDownSilentOnTouch; } // Simple optimize, since this method might be // called for each elements of a group in some cases. if (!disable || extendedEl.__highDownDispatcher) { // Emphasis, normal can be triggered manually by API or other components like hover link. // el[method]('emphasis', onElementEmphasisEvent)[method]('normal', onElementNormalEvent); // Also keep previous record. extendedEl.__highByOuter = extendedEl.__highByOuter || 0; extendedEl.__highDownDispatcher = !disable; } } function isHighDownDispatcher(el) { return !!(el && el.__highDownDispatcher); } /** * Enable component highlight/downplay features: * + hover link (within the same name) * + focus blur in component */ function enableComponentHighDownFeatures(el, componentModel, componentHighDownName) { var ecData = getECData(el); ecData.componentMainType = componentModel.mainType; ecData.componentIndex = componentModel.componentIndex; ecData.componentHighDownName = componentHighDownName; } /** * Support hightlight/downplay record on each elements. * For the case: hover highlight/downplay (legend, visualMap, ...) and * user triggerred hightlight/downplay should not conflict. * Only all of the highlightDigit cleared, return to normal. * @param {string} highlightKey * @return {number} highlightDigit */ function getHighlightDigit(highlightKey) { var highlightDigit = _highlightKeyMap[highlightKey]; if (highlightDigit == null && _highlightNextDigit <= 32) { highlightDigit = _highlightKeyMap[highlightKey] = _highlightNextDigit++; } return highlightDigit; } function isSelectChangePayload(payload) { var payloadType = payload.type; return payloadType === SELECT_ACTION_TYPE || payloadType === UNSELECT_ACTION_TYPE || payloadType === TOGGLE_SELECT_ACTION_TYPE; } function isHighDownPayload(payload) { var payloadType = payload.type; return payloadType === HIGHLIGHT_ACTION_TYPE || payloadType === DOWNPLAY_ACTION_TYPE; } function savePathStates(el) { var store = getSavedStates(el); store.normalFill = el.style.fill; store.normalStroke = el.style.stroke; var selectState = el.states.select || {}; store.selectFill = selectState.style && selectState.style.fill || null; store.selectStroke = selectState.style && selectState.style.stroke || null; } var CMD$2 = PathProxy.CMD; var points = [[], [], []]; var mathSqrt$2 = Math.sqrt; var mathAtan2 = Math.atan2; function transformPath(path, m) { var data = path.data; var len = path.len(); var cmd; var nPoint; var i; var j; var k; var p; var M = CMD$2.M; var C = CMD$2.C; var L = CMD$2.L; var R = CMD$2.R; var A = CMD$2.A; var Q = CMD$2.Q; for (i = 0, j = 0; i < len;) { cmd = data[i++]; j = i; nPoint = 0; switch (cmd) { case M: nPoint = 1; break; case L: nPoint = 1; break; case C: nPoint = 3; break; case Q: nPoint = 2; break; case A: var x = m[4]; var y = m[5]; var sx = mathSqrt$2(m[0] * m[0] + m[1] * m[1]); var sy = mathSqrt$2(m[2] * m[2] + m[3] * m[3]); var angle = mathAtan2(-m[1] / sy, m[0] / sx); data[i] *= sx; data[i++] += x; data[i] *= sy; data[i++] += y; data[i++] *= sx; data[i++] *= sy; data[i++] += angle; data[i++] += angle; i += 2; j = i; break; case R: p[0] = data[i++]; p[1] = data[i++]; applyTransform(p, p, m); data[j++] = p[0]; data[j++] = p[1]; p[0] += data[i++]; p[1] += data[i++]; applyTransform(p, p, m); data[j++] = p[0]; data[j++] = p[1]; } for (k = 0; k < nPoint; k++) { var p_1 = points[k]; p_1[0] = data[i++]; p_1[1] = data[i++]; applyTransform(p_1, p_1, m); data[j++] = p_1[0]; data[j++] = p_1[1]; } } path.increaseVersion(); } var mathSqrt$3 = Math.sqrt; var mathSin$2 = Math.sin; var mathCos$2 = Math.cos; var PI$1 = Math.PI; function vMag(v) { return Math.sqrt(v[0] * v[0] + v[1] * v[1]); } function vRatio(u, v) { return (u[0] * v[0] + u[1] * v[1]) / (vMag(u) * vMag(v)); } function vAngle(u, v) { return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vRatio(u, v)); } function processArc(x1, y1, x2, y2, fa, fs, rx, ry, psiDeg, cmd, path) { var psi = psiDeg * (PI$1 / 180.0); var xp = mathCos$2(psi) * (x1 - x2) / 2.0 + mathSin$2(psi) * (y1 - y2) / 2.0; var yp = -1 * mathSin$2(psi) * (x1 - x2) / 2.0 + mathCos$2(psi) * (y1 - y2) / 2.0; var lambda = (xp * xp) / (rx * rx) + (yp * yp) / (ry * ry); if (lambda > 1) { rx *= mathSqrt$3(lambda); ry *= mathSqrt$3(lambda); } var f = (fa === fs ? -1 : 1) * mathSqrt$3((((rx * rx) * (ry * ry)) - ((rx * rx) * (yp * yp)) - ((ry * ry) * (xp * xp))) / ((rx * rx) * (yp * yp) + (ry * ry) * (xp * xp))) || 0; var cxp = f * rx * yp / ry; var cyp = f * -ry * xp / rx; var cx = (x1 + x2) / 2.0 + mathCos$2(psi) * cxp - mathSin$2(psi) * cyp; var cy = (y1 + y2) / 2.0 + mathSin$2(psi) * cxp + mathCos$2(psi) * cyp; var theta = vAngle([1, 0], [(xp - cxp) / rx, (yp - cyp) / ry]); var u = [(xp - cxp) / rx, (yp - cyp) / ry]; var v = [(-1 * xp - cxp) / rx, (-1 * yp - cyp) / ry]; var dTheta = vAngle(u, v); if (vRatio(u, v) <= -1) { dTheta = PI$1; } if (vRatio(u, v) >= 1) { dTheta = 0; } if (dTheta < 0) { var n = Math.round(dTheta / PI$1 * 1e6) / 1e6; dTheta = PI$1 * 2 + (n % 2) * PI$1; } path.addData(cmd, cx, cy, rx, ry, theta, dTheta, psi, fs); } var commandReg = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig; var numberReg = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g; function createPathProxyFromString(data) { var path = new PathProxy(); if (!data) { return path; } var cpx = 0; var cpy = 0; var subpathX = cpx; var subpathY = cpy; var prevCmd; var CMD = PathProxy.CMD; var cmdList = data.match(commandReg); if (!cmdList) { return path; } for (var l = 0; l < cmdList.length; l++) { var cmdText = cmdList[l]; var cmdStr = cmdText.charAt(0); var cmd = void 0; var p = cmdText.match(numberReg) || []; var pLen = p.length; for (var i = 0; i < pLen; i++) { p[i] = parseFloat(p[i]); } var off = 0; while (off < pLen) { var ctlPtx = void 0; var ctlPty = void 0; var rx = void 0; var ry = void 0; var psi = void 0; var fa = void 0; var fs = void 0; var x1 = cpx; var y1 = cpy; var len = void 0; var pathData = void 0; switch (cmdStr) { case 'l': cpx += p[off++]; cpy += p[off++]; cmd = CMD.L; path.addData(cmd, cpx, cpy); break; case 'L': cpx = p[off++]; cpy = p[off++]; cmd = CMD.L; path.addData(cmd, cpx, cpy); break; case 'm': cpx += p[off++]; cpy += p[off++]; cmd = CMD.M; path.addData(cmd, cpx, cpy); subpathX = cpx; subpathY = cpy; cmdStr = 'l'; break; case 'M': cpx = p[off++]; cpy = p[off++]; cmd = CMD.M; path.addData(cmd, cpx, cpy); subpathX = cpx; subpathY = cpy; cmdStr = 'L'; break; case 'h': cpx += p[off++]; cmd = CMD.L; path.addData(cmd, cpx, cpy); break; case 'H': cpx = p[off++]; cmd = CMD.L; path.addData(cmd, cpx, cpy); break; case 'v': cpy += p[off++]; cmd = CMD.L; path.addData(cmd, cpx, cpy); break; case 'V': cpy = p[off++]; cmd = CMD.L; path.addData(cmd, cpx, cpy); break; case 'C': cmd = CMD.C; path.addData(cmd, p[off++], p[off++], p[off++], p[off++], p[off++], p[off++]); cpx = p[off - 2]; cpy = p[off - 1]; break; case 'c': cmd = CMD.C; path.addData(cmd, p[off++] + cpx, p[off++] + cpy, p[off++] + cpx, p[off++] + cpy, p[off++] + cpx, p[off++] + cpy); cpx += p[off - 2]; cpy += p[off - 1]; break; case 'S': ctlPtx = cpx; ctlPty = cpy; len = path.len(); pathData = path.data; if (prevCmd === CMD.C) { ctlPtx += cpx - pathData[len - 4]; ctlPty += cpy - pathData[len - 3]; } cmd = CMD.C; x1 = p[off++]; y1 = p[off++]; cpx = p[off++]; cpy = p[off++]; path.addData(cmd, ctlPtx, ctlPty, x1, y1, cpx, cpy); break; case 's': ctlPtx = cpx; ctlPty = cpy; len = path.len(); pathData = path.data; if (prevCmd === CMD.C) { ctlPtx += cpx - pathData[len - 4]; ctlPty += cpy - pathData[len - 3]; } cmd = CMD.C; x1 = cpx + p[off++]; y1 = cpy + p[off++]; cpx += p[off++]; cpy += p[off++]; path.addData(cmd, ctlPtx, ctlPty, x1, y1, cpx, cpy); break; case 'Q': x1 = p[off++]; y1 = p[off++]; cpx = p[off++]; cpy = p[off++]; cmd = CMD.Q; path.addData(cmd, x1, y1, cpx, cpy); break; case 'q': x1 = p[off++] + cpx; y1 = p[off++] + cpy; cpx += p[off++]; cpy += p[off++]; cmd = CMD.Q; path.addData(cmd, x1, y1, cpx, cpy); break; case 'T': ctlPtx = cpx; ctlPty = cpy; len = path.len(); pathData = path.data; if (prevCmd === CMD.Q) { ctlPtx += cpx - pathData[len - 4]; ctlPty += cpy - pathData[len - 3]; } cpx = p[off++]; cpy = p[off++]; cmd = CMD.Q; path.addData(cmd, ctlPtx, ctlPty, cpx, cpy); break; case 't': ctlPtx = cpx; ctlPty = cpy; len = path.len(); pathData = path.data; if (prevCmd === CMD.Q) { ctlPtx += cpx - pathData[len - 4]; ctlPty += cpy - pathData[len - 3]; } cpx += p[off++]; cpy += p[off++]; cmd = CMD.Q; path.addData(cmd, ctlPtx, ctlPty, cpx, cpy); break; case 'A': rx = p[off++]; ry = p[off++]; psi = p[off++]; fa = p[off++]; fs = p[off++]; x1 = cpx, y1 = cpy; cpx = p[off++]; cpy = p[off++]; cmd = CMD.A; processArc(x1, y1, cpx, cpy, fa, fs, rx, ry, psi, cmd, path); break; case 'a': rx = p[off++]; ry = p[off++]; psi = p[off++]; fa = p[off++]; fs = p[off++]; x1 = cpx, y1 = cpy; cpx += p[off++]; cpy += p[off++]; cmd = CMD.A; processArc(x1, y1, cpx, cpy, fa, fs, rx, ry, psi, cmd, path); break; } } if (cmdStr === 'z' || cmdStr === 'Z') { cmd = CMD.Z; path.addData(cmd); cpx = subpathX; cpy = subpathY; } prevCmd = cmd; } path.toStatic(); return path; } var SVGPath = (function (_super) { __extends(SVGPath, _super); function SVGPath() { return _super !== null && _super.apply(this, arguments) || this; } SVGPath.prototype.applyTransform = function (m) { }; return SVGPath; }(Path)); function isPathProxy(path) { return path.setData != null; } function createPathOptions(str, opts) { var pathProxy = createPathProxyFromString(str); var innerOpts = extend({}, opts); innerOpts.buildPath = function (path) { if (isPathProxy(path)) { path.setData(pathProxy.data); var ctx = path.getContext(); if (ctx) { path.rebuildPath(ctx, 1); } } else { var ctx = path; pathProxy.rebuildPath(ctx, 1); } }; innerOpts.applyTransform = function (m) { transformPath(pathProxy, m); this.dirtyShape(); }; return innerOpts; } function createFromString(str, opts) { return new SVGPath(createPathOptions(str, opts)); } function extendFromString(str, defaultOpts) { var innerOpts = createPathOptions(str, defaultOpts); var Sub = (function (_super) { __extends(Sub, _super); function Sub(opts) { var _this = _super.call(this, opts) || this; _this.applyTransform = innerOpts.applyTransform; _this.buildPath = innerOpts.buildPath; return _this; } return Sub; }(SVGPath)); return Sub; } function mergePath(pathEls, opts) { var pathList = []; var len = pathEls.length; for (var i = 0; i < len; i++) { var pathEl = pathEls[i]; if (!pathEl.path) { pathEl.createPathProxy(); } if (pathEl.shapeChanged()) { pathEl.buildPath(pathEl.path, pathEl.shape, true); } pathList.push(pathEl.path); } var pathBundle = new Path(opts); pathBundle.createPathProxy(); pathBundle.buildPath = function (path) { if (isPathProxy(path)) { path.appendPath(pathList); var ctx = path.getContext(); if (ctx) { path.rebuildPath(ctx, 1); } } }; return pathBundle; } var CircleShape = (function () { function CircleShape() { this.cx = 0; this.cy = 0; this.r = 0; } return CircleShape; }()); var Circle = (function (_super) { __extends(Circle, _super); function Circle(opts) { return _super.call(this, opts) || this; } Circle.prototype.getDefaultShape = function () { return new CircleShape(); }; Circle.prototype.buildPath = function (ctx, shape, inBundle) { if (inBundle) { ctx.moveTo(shape.cx + shape.r, shape.cy); } ctx.arc(shape.cx, shape.cy, shape.r, 0, Math.PI * 2); }; return Circle; }(Path)); Circle.prototype.type = 'circle'; var EllipseShape = (function () { function EllipseShape() { this.cx = 0; this.cy = 0; this.rx = 0; this.ry = 0; } return EllipseShape; }()); var Ellipse = (function (_super) { __extends(Ellipse, _super); function Ellipse(opts) { return _super.call(this, opts) || this; } Ellipse.prototype.getDefaultShape = function () { return new EllipseShape(); }; Ellipse.prototype.buildPath = function (ctx, shape) { var k = 0.5522848; var x = shape.cx; var y = shape.cy; var a = shape.rx; var b = shape.ry; var ox = a * k; var oy = b * k; ctx.moveTo(x - a, y); ctx.bezierCurveTo(x - a, y - oy, x - ox, y - b, x, y - b); ctx.bezierCurveTo(x + ox, y - b, x + a, y - oy, x + a, y); ctx.bezierCurveTo(x + a, y + oy, x + ox, y + b, x, y + b); ctx.bezierCurveTo(x - ox, y + b, x - a, y + oy, x - a, y); ctx.closePath(); }; return Ellipse; }(Path)); Ellipse.prototype.type = 'ellipse'; var PI$2 = Math.PI; var PI2$5 = PI$2 * 2; var mathSin$3 = Math.sin; var mathCos$3 = Math.cos; var mathACos = Math.acos; var mathATan2 = Math.atan2; var mathAbs$1 = Math.abs; var mathSqrt$4 = Math.sqrt; var mathMax$3 = Math.max; var mathMin$3 = Math.min; var e = 1e-4; function intersect(x0, y0, x1, y1, x2, y2, x3, y3) { var x10 = x1 - x0; var y10 = y1 - y0; var x32 = x3 - x2; var y32 = y3 - y2; var t = y32 * x10 - x32 * y10; if (t * t < e) { return; } t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t; return [x0 + t * x10, y0 + t * y10]; } function computeCornerTangents(x0, y0, x1, y1, radius, cr, clockwise) { var x01 = x0 - x1; var y01 = y0 - y1; var lo = (clockwise ? cr : -cr) / mathSqrt$4(x01 * x01 + y01 * y01); var ox = lo * y01; var oy = -lo * x01; var x11 = x0 + ox; var y11 = y0 + oy; var x10 = x1 + ox; var y10 = y1 + oy; var x00 = (x11 + x10) / 2; var y00 = (y11 + y10) / 2; var dx = x10 - x11; var dy = y10 - y11; var d2 = dx * dx + dy * dy; var r = radius - cr; var s = x11 * y10 - x10 * y11; var d = (dy < 0 ? -1 : 1) * mathSqrt$4(mathMax$3(0, r * r * d2 - s * s)); var cx0 = (s * dy - dx * d) / d2; var cy0 = (-s * dx - dy * d) / d2; var cx1 = (s * dy + dx * d) / d2; var cy1 = (-s * dx + dy * d) / d2; var dx0 = cx0 - x00; var dy0 = cy0 - y00; var dx1 = cx1 - x00; var dy1 = cy1 - y00; if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) { cx0 = cx1; cy0 = cy1; } return { cx: cx0, cy: cy0, x01: -ox, y01: -oy, x11: cx0 * (radius / r - 1), y11: cy0 * (radius / r - 1) }; } function buildPath$1(ctx, shape) { var radius = mathMax$3(shape.r, 0); var innerRadius = mathMax$3(shape.r0 || 0, 0); var hasRadius = radius > 0; var hasInnerRadius = innerRadius > 0; if (!hasRadius && !hasInnerRadius) { return; } if (!hasRadius) { radius = innerRadius; innerRadius = 0; } if (innerRadius > radius) { var tmp = radius; radius = innerRadius; innerRadius = tmp; } var clockwise = !!shape.clockwise; var startAngle = shape.startAngle; var endAngle = shape.endAngle; var arc; if (startAngle === endAngle) { arc = 0; } else { var tmpAngles = [startAngle, endAngle]; normalizeArcAngles(tmpAngles, !clockwise); arc = mathAbs$1(tmpAngles[0] - tmpAngles[1]); } var x = shape.cx; var y = shape.cy; var cornerRadius = shape.cornerRadius || 0; var innerCornerRadius = shape.innerCornerRadius || 0; if (!(radius > e)) { ctx.moveTo(x, y); } else if (arc > PI2$5 - e) { ctx.moveTo(x + radius * mathCos$3(startAngle), y + radius * mathSin$3(startAngle)); ctx.arc(x, y, radius, startAngle, endAngle, !clockwise); if (innerRadius > e) { ctx.moveTo(x + innerRadius * mathCos$3(endAngle), y + innerRadius * mathSin$3(endAngle)); ctx.arc(x, y, innerRadius, endAngle, startAngle, clockwise); } } else { var halfRd = mathAbs$1(radius - innerRadius) / 2; var cr = mathMin$3(halfRd, cornerRadius); var icr = mathMin$3(halfRd, innerCornerRadius); var cr0 = icr; var cr1 = cr; var xrs = radius * mathCos$3(startAngle); var yrs = radius * mathSin$3(startAngle); var xire = innerRadius * mathCos$3(endAngle); var yire = innerRadius * mathSin$3(endAngle); var xre = void 0; var yre = void 0; var xirs = void 0; var yirs = void 0; if (cr > e || icr > e) { xre = radius * mathCos$3(endAngle); yre = radius * mathSin$3(endAngle); xirs = innerRadius * mathCos$3(startAngle); yirs = innerRadius * mathSin$3(startAngle); if (arc < PI$2) { var it_1 = intersect(xrs, yrs, xirs, yirs, xre, yre, xire, yire); if (it_1) { var x0 = xrs - it_1[0]; var y0 = yrs - it_1[1]; var x1 = xre - it_1[0]; var y1 = yre - it_1[1]; var a = 1 / mathSin$3(mathACos((x0 * x1 + y0 * y1) / (mathSqrt$4(x0 * x0 + y0 * y0) * mathSqrt$4(x1 * x1 + y1 * y1))) / 2); var b = mathSqrt$4(it_1[0] * it_1[0] + it_1[1] * it_1[1]); cr0 = mathMin$3(icr, (innerRadius - b) / (a - 1)); cr1 = mathMin$3(cr, (radius - b) / (a + 1)); } } } if (!(arc > e)) { ctx.moveTo(x + xrs, y + yrs); } else if (cr1 > e) { var ct0 = computeCornerTangents(xirs, yirs, xrs, yrs, radius, cr1, clockwise); var ct1 = computeCornerTangents(xre, yre, xire, yire, radius, cr1, clockwise); ctx.moveTo(x + ct0.cx + ct0.x01, y + ct0.cy + ct0.y01); if (cr1 < cr) { ctx.arc(x + ct0.cx, y + ct0.cy, cr1, mathATan2(ct0.y01, ct0.x01), mathATan2(ct1.y01, ct1.x01), !clockwise); } else { ctx.arc(x + ct0.cx, y + ct0.cy, cr1, mathATan2(ct0.y01, ct0.x01), mathATan2(ct0.y11, ct0.x11), !clockwise); ctx.arc(x, y, radius, mathATan2(ct0.cy + ct0.y11, ct0.cx + ct0.x11), mathATan2(ct1.cy + ct1.y11, ct1.cx + ct1.x11), !clockwise); ctx.arc(x + ct1.cx, y + ct1.cy, cr1, mathATan2(ct1.y11, ct1.x11), mathATan2(ct1.y01, ct1.x01), !clockwise); } } else { ctx.moveTo(x + xrs, y + yrs); ctx.arc(x, y, radius, startAngle, endAngle, !clockwise); } if (!(innerRadius > e) || !(arc > e)) { ctx.lineTo(x + xire, y + yire); } else if (cr0 > e) { var ct0 = computeCornerTangents(xire, yire, xre, yre, innerRadius, -cr0, clockwise); var ct1 = computeCornerTangents(xrs, yrs, xirs, yirs, innerRadius, -cr0, clockwise); ctx.lineTo(x + ct0.cx + ct0.x01, y + ct0.cy + ct0.y01); if (cr0 < icr) { ctx.arc(x + ct0.cx, y + ct0.cy, cr0, mathATan2(ct0.y01, ct0.x01), mathATan2(ct1.y01, ct1.x01), !clockwise); } else { ctx.arc(x + ct0.cx, y + ct0.cy, cr0, mathATan2(ct0.y01, ct0.x01), mathATan2(ct0.y11, ct0.x11), !clockwise); ctx.arc(x, y, innerRadius, mathATan2(ct0.cy + ct0.y11, ct0.cx + ct0.x11), mathATan2(ct1.cy + ct1.y11, ct1.cx + ct1.x11), clockwise); ctx.arc(x + ct1.cx, y + ct1.cy, cr0, mathATan2(ct1.y11, ct1.x11), mathATan2(ct1.y01, ct1.x01), !clockwise); } } else { ctx.lineTo(x + xire, y + yire); ctx.arc(x, y, innerRadius, endAngle, startAngle, clockwise); } } ctx.closePath(); } var SectorShape = (function () { function SectorShape() { this.cx = 0; this.cy = 0; this.r0 = 0; this.r = 0; this.startAngle = 0; this.endAngle = Math.PI * 2; this.clockwise = true; this.cornerRadius = 0; this.innerCornerRadius = 0; } return SectorShape; }()); var Sector = (function (_super) { __extends(Sector, _super); function Sector(opts) { return _super.call(this, opts) || this; } Sector.prototype.getDefaultShape = function () { return new SectorShape(); }; Sector.prototype.buildPath = function (ctx, shape) { buildPath$1(ctx, shape); }; Sector.prototype.isZeroArea = function () { return this.shape.startAngle === this.shape.endAngle || this.shape.r === this.shape.r0; }; return Sector; }(Path)); Sector.prototype.type = 'sector'; var RingShape = (function () { function RingShape() { this.cx = 0; this.cy = 0; this.r = 0; this.r0 = 0; } return RingShape; }()); var Ring = (function (_super) { __extends(Ring, _super); function Ring(opts) { return _super.call(this, opts) || this; } Ring.prototype.getDefaultShape = function () { return new RingShape(); }; Ring.prototype.buildPath = function (ctx, shape) { var x = shape.cx; var y = shape.cy; var PI2 = Math.PI * 2; ctx.moveTo(x + shape.r, y); ctx.arc(x, y, shape.r, 0, PI2, false); ctx.moveTo(x + shape.r0, y); ctx.arc(x, y, shape.r0, 0, PI2, true); }; return Ring; }(Path)); Ring.prototype.type = 'ring'; function interpolate(p0, p1, p2, p3, t, t2, t3) { var v0 = (p2 - p0) * 0.5; var v1 = (p3 - p1) * 0.5; return (2 * (p1 - p2) + v0 + v1) * t3 + (-3 * (p1 - p2) - 2 * v0 - v1) * t2 + v0 * t + p1; } function smoothSpline(points, isLoop) { var len = points.length; var ret = []; var distance$1 = 0; for (var i = 1; i < len; i++) { distance$1 += distance(points[i - 1], points[i]); } var segs = distance$1 / 2; segs = segs < len ? len : segs; for (var i = 0; i < segs; i++) { var pos = i / (segs - 1) * (isLoop ? len : len - 1); var idx = Math.floor(pos); var w = pos - idx; var p0 = void 0; var p1 = points[idx % len]; var p2 = void 0; var p3 = void 0; if (!isLoop) { p0 = points[idx === 0 ? idx : idx - 1]; p2 = points[idx > len - 2 ? len - 1 : idx + 1]; p3 = points[idx > len - 3 ? len - 1 : idx + 2]; } else { p0 = points[(idx - 1 + len) % len]; p2 = points[(idx + 1) % len]; p3 = points[(idx + 2) % len]; } var w2 = w * w; var w3 = w * w2; ret.push([ interpolate(p0[0], p1[0], p2[0], p3[0], w, w2, w3), interpolate(p0[1], p1[1], p2[1], p3[1], w, w2, w3) ]); } return ret; } function smoothBezier(points, smooth, isLoop, constraint) { var cps = []; var v = []; var v1 = []; var v2 = []; var prevPoint; var nextPoint; var min$1; var max$1; if (constraint) { min$1 = [Infinity, Infinity]; max$1 = [-Infinity, -Infinity]; for (var i = 0, len = points.length; i < len; i++) { min(min$1, min$1, points[i]); max(max$1, max$1, points[i]); } min(min$1, min$1, constraint[0]); max(max$1, max$1, constraint[1]); } for (var i = 0, len = points.length; i < len; i++) { var point = points[i]; if (isLoop) { prevPoint = points[i ? i - 1 : len - 1]; nextPoint = points[(i + 1) % len]; } else { if (i === 0 || i === len - 1) { cps.push(clone$1(points[i])); continue; } else { prevPoint = points[i - 1]; nextPoint = points[i + 1]; } } sub(v, nextPoint, prevPoint); scale(v, v, smooth); var d0 = distance(point, prevPoint); var d1 = distance(point, nextPoint); var sum = d0 + d1; if (sum !== 0) { d0 /= sum; d1 /= sum; } scale(v1, v, -d0); scale(v2, v, d1); var cp0 = add([], point, v1); var cp1 = add([], point, v2); if (constraint) { max(cp0, cp0, min$1); min(cp0, cp0, max$1); max(cp1, cp1, min$1); min(cp1, cp1, max$1); } cps.push(cp0); cps.push(cp1); } if (isLoop) { cps.push(cps.shift()); } return cps; } function buildPath$2(ctx, shape, closePath) { var smooth = shape.smooth; var points = shape.points; if (points && points.length >= 2) { if (smooth && smooth !== 'spline') { var controlPoints = smoothBezier(points, smooth, closePath, shape.smoothConstraint); ctx.moveTo(points[0][0], points[0][1]); var len = points.length; for (var i = 0; i < (closePath ? len : len - 1); i++) { var cp1 = controlPoints[i * 2]; var cp2 = controlPoints[i * 2 + 1]; var p = points[(i + 1) % len]; ctx.bezierCurveTo(cp1[0], cp1[1], cp2[0], cp2[1], p[0], p[1]); } } else { if (smooth === 'spline') { points = smoothSpline(points, closePath); } ctx.moveTo(points[0][0], points[0][1]); for (var i = 1, l = points.length; i < l; i++) { ctx.lineTo(points[i][0], points[i][1]); } } closePath && ctx.closePath(); } } var PolygonShape = (function () { function PolygonShape() { this.points = null; this.smooth = 0; this.smoothConstraint = null; } return PolygonShape; }()); var Polygon = (function (_super) { __extends(Polygon, _super); function Polygon(opts) { return _super.call(this, opts) || this; } Polygon.prototype.getDefaultShape = function () { return new PolygonShape(); }; Polygon.prototype.buildPath = function (ctx, shape) { buildPath$2(ctx, shape, true); }; return Polygon; }(Path)); Polygon.prototype.type = 'polygon'; var PolylineShape = (function () { function PolylineShape() { this.points = null; this.percent = 1; this.smooth = 0; this.smoothConstraint = null; } return PolylineShape; }()); var Polyline = (function (_super) { __extends(Polyline, _super); function Polyline(opts) { return _super.call(this, opts) || this; } Polyline.prototype.getDefaultStyle = function () { return { stroke: '#000', fill: null }; }; Polyline.prototype.getDefaultShape = function () { return new PolylineShape(); }; Polyline.prototype.buildPath = function (ctx, shape) { buildPath$2(ctx, shape, false); }; return Polyline; }(Path)); Polyline.prototype.type = 'polyline'; var subPixelOptimizeOutputShape$1 = {}; var LineShape = (function () { function LineShape() { this.x1 = 0; this.y1 = 0; this.x2 = 0; this.y2 = 0; this.percent = 1; } return LineShape; }()); var Line = (function (_super) { __extends(Line, _super); function Line(opts) { return _super.call(this, opts) || this; } Line.prototype.getDefaultStyle = function () { return { stroke: '#000', fill: null }; }; Line.prototype.getDefaultShape = function () { return new LineShape(); }; Line.prototype.buildPath = function (ctx, shape) { var x1; var y1; var x2; var y2; if (this.subPixelOptimize) { var optimizedShape = subPixelOptimizeLine(subPixelOptimizeOutputShape$1, shape, this.style); x1 = optimizedShape.x1; y1 = optimizedShape.y1; x2 = optimizedShape.x2; y2 = optimizedShape.y2; } else { x1 = shape.x1; y1 = shape.y1; x2 = shape.x2; y2 = shape.y2; } var percent = shape.percent; if (percent === 0) { return; } ctx.moveTo(x1, y1); if (percent < 1) { x2 = x1 * (1 - percent) + x2 * percent; y2 = y1 * (1 - percent) + y2 * percent; } ctx.lineTo(x2, y2); }; Line.prototype.pointAt = function (p) { var shape = this.shape; return [ shape.x1 * (1 - p) + shape.x2 * p, shape.y1 * (1 - p) + shape.y2 * p ]; }; return Line; }(Path)); Line.prototype.type = 'line'; var out = []; var BezierCurveShape = (function () { function BezierCurveShape() { this.x1 = 0; this.y1 = 0; this.x2 = 0; this.y2 = 0; this.cpx1 = 0; this.cpy1 = 0; this.percent = 1; } return BezierCurveShape; }()); function someVectorAt(shape, t, isTangent) { var cpx2 = shape.cpx2; var cpy2 = shape.cpy2; if (cpx2 === null || cpy2 === null) { return [ (isTangent ? cubicDerivativeAt : cubicAt)(shape.x1, shape.cpx1, shape.cpx2, shape.x2, t), (isTangent ? cubicDerivativeAt : cubicAt)(shape.y1, shape.cpy1, shape.cpy2, shape.y2, t) ]; } else { return [ (isTangent ? quadraticDerivativeAt : quadraticAt)(shape.x1, shape.cpx1, shape.x2, t), (isTangent ? quadraticDerivativeAt : quadraticAt)(shape.y1, shape.cpy1, shape.y2, t) ]; } } var BezierCurve = (function (_super) { __extends(BezierCurve, _super); function BezierCurve(opts) { return _super.call(this, opts) || this; } BezierCurve.prototype.getDefaultStyle = function () { return { stroke: '#000', fill: null }; }; BezierCurve.prototype.getDefaultShape = function () { return new BezierCurveShape(); }; BezierCurve.prototype.buildPath = function (ctx, shape) { var x1 = shape.x1; var y1 = shape.y1; var x2 = shape.x2; var y2 = shape.y2; var cpx1 = shape.cpx1; var cpy1 = shape.cpy1; var cpx2 = shape.cpx2; var cpy2 = shape.cpy2; var percent = shape.percent; if (percent === 0) { return; } ctx.moveTo(x1, y1); if (cpx2 == null || cpy2 == null) { if (percent < 1) { quadraticSubdivide(x1, cpx1, x2, percent, out); cpx1 = out[1]; x2 = out[2]; quadraticSubdivide(y1, cpy1, y2, percent, out); cpy1 = out[1]; y2 = out[2]; } ctx.quadraticCurveTo(cpx1, cpy1, x2, y2); } else { if (percent < 1) { cubicSubdivide(x1, cpx1, cpx2, x2, percent, out); cpx1 = out[1]; cpx2 = out[2]; x2 = out[3]; cubicSubdivide(y1, cpy1, cpy2, y2, percent, out); cpy1 = out[1]; cpy2 = out[2]; y2 = out[3]; } ctx.bezierCurveTo(cpx1, cpy1, cpx2, cpy2, x2, y2); } }; BezierCurve.prototype.pointAt = function (t) { return someVectorAt(this.shape, t, false); }; BezierCurve.prototype.tangentAt = function (t) { var p = someVectorAt(this.shape, t, true); return normalize(p, p); }; return BezierCurve; }(Path)); BezierCurve.prototype.type = 'bezier-curve'; var ArcShape = (function () { function ArcShape() { this.cx = 0; this.cy = 0; this.r = 0; this.startAngle = 0; this.endAngle = Math.PI * 2; this.clockwise = true; } return ArcShape; }()); var Arc = (function (_super) { __extends(Arc, _super); function Arc(opts) { return _super.call(this, opts) || this; } Arc.prototype.getDefaultStyle = function () { return { stroke: '#000', fill: null }; }; Arc.prototype.getDefaultShape = function () { return new ArcShape(); }; Arc.prototype.buildPath = function (ctx, shape) { var x = shape.cx; var y = shape.cy; var r = Math.max(shape.r, 0); var startAngle = shape.startAngle; var endAngle = shape.endAngle; var clockwise = shape.clockwise; var unitX = Math.cos(startAngle); var unitY = Math.sin(startAngle); ctx.moveTo(unitX * r + x, unitY * r + y); ctx.arc(x, y, r, startAngle, endAngle, !clockwise); }; return Arc; }(Path)); Arc.prototype.type = 'arc'; var CompoundPath = (function (_super) { __extends(CompoundPath, _super); function CompoundPath() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'compound'; return _this; } CompoundPath.prototype._updatePathDirty = function () { var paths = this.shape.paths; var dirtyPath = this.shapeChanged(); for (var i = 0; i < paths.length; i++) { dirtyPath = dirtyPath || paths[i].shapeChanged(); } if (dirtyPath) { this.dirtyShape(); } }; CompoundPath.prototype.beforeBrush = function () { this._updatePathDirty(); var paths = this.shape.paths || []; var scale = this.getGlobalScale(); for (var i = 0; i < paths.length; i++) { if (!paths[i].path) { paths[i].createPathProxy(); } paths[i].path.setScale(scale[0], scale[1], paths[i].segmentIgnoreThreshold); } }; CompoundPath.prototype.buildPath = function (ctx, shape) { var paths = shape.paths || []; for (var i = 0; i < paths.length; i++) { paths[i].buildPath(ctx, paths[i].shape, true); } }; CompoundPath.prototype.afterBrush = function () { var paths = this.shape.paths || []; for (var i = 0; i < paths.length; i++) { paths[i].pathUpdated(); } }; CompoundPath.prototype.getBoundingRect = function () { this._updatePathDirty.call(this); return Path.prototype.getBoundingRect.call(this); }; return CompoundPath; }(Path)); var Gradient = (function () { function Gradient(colorStops) { this.colorStops = colorStops || []; } Gradient.prototype.addColorStop = function (offset, color) { this.colorStops.push({ offset: offset, color: color }); }; return Gradient; }()); var LinearGradient = (function (_super) { __extends(LinearGradient, _super); function LinearGradient(x, y, x2, y2, colorStops, globalCoord) { var _this = _super.call(this, colorStops) || this; _this.x = x == null ? 0 : x; _this.y = y == null ? 0 : y; _this.x2 = x2 == null ? 1 : x2; _this.y2 = y2 == null ? 0 : y2; _this.type = 'linear'; _this.global = globalCoord || false; return _this; } return LinearGradient; }(Gradient)); var RadialGradient = (function (_super) { __extends(RadialGradient, _super); function RadialGradient(x, y, r, colorStops, globalCoord) { var _this = _super.call(this, colorStops) || this; _this.x = x == null ? 0.5 : x; _this.y = y == null ? 0.5 : y; _this.r = r == null ? 0.5 : r; _this.type = 'radial'; _this.global = globalCoord || false; return _this; } return RadialGradient; }(Gradient)); var extent = [0, 0]; var extent2 = [0, 0]; var minTv$1 = new Point(); var maxTv$1 = new Point(); var OrientedBoundingRect = (function () { function OrientedBoundingRect(rect, transform) { this._corners = []; this._axes = []; this._origin = [0, 0]; for (var i = 0; i < 4; i++) { this._corners[i] = new Point(); } for (var i = 0; i < 2; i++) { this._axes[i] = new Point(); } if (rect) { this.fromBoundingRect(rect, transform); } } OrientedBoundingRect.prototype.fromBoundingRect = function (rect, transform) { var corners = this._corners; var axes = this._axes; var x = rect.x; var y = rect.y; var x2 = x + rect.width; var y2 = y + rect.height; corners[0].set(x, y); corners[1].set(x2, y); corners[2].set(x2, y2); corners[3].set(x, y2); if (transform) { for (var i = 0; i < 4; i++) { corners[i].transform(transform); } } Point.sub(axes[0], corners[1], corners[0]); Point.sub(axes[1], corners[3], corners[0]); axes[0].normalize(); axes[1].normalize(); for (var i = 0; i < 2; i++) { this._origin[i] = axes[i].dot(corners[0]); } }; OrientedBoundingRect.prototype.intersect = function (other, mtv) { var overlapped = true; var noMtv = !mtv; minTv$1.set(Infinity, Infinity); maxTv$1.set(0, 0); if (!this._intersectCheckOneSide(this, other, minTv$1, maxTv$1, noMtv, 1)) { overlapped = false; if (noMtv) { return overlapped; } } if (!this._intersectCheckOneSide(other, this, minTv$1, maxTv$1, noMtv, -1)) { overlapped = false; if (noMtv) { return overlapped; } } if (!noMtv) { Point.copy(mtv, overlapped ? minTv$1 : maxTv$1); } return overlapped; }; OrientedBoundingRect.prototype._intersectCheckOneSide = function (self, other, minTv, maxTv, noMtv, inverse) { var overlapped = true; for (var i = 0; i < 2; i++) { var axis = this._axes[i]; this._getProjMinMaxOnAxis(i, self._corners, extent); this._getProjMinMaxOnAxis(i, other._corners, extent2); if (extent[1] < extent2[0] || extent[0] > extent2[1]) { overlapped = false; if (noMtv) { return overlapped; } var dist0 = Math.abs(extent2[0] - extent[1]); var dist1 = Math.abs(extent[0] - extent2[1]); if (Math.min(dist0, dist1) > maxTv.len()) { if (dist0 < dist1) { Point.scale(maxTv, axis, -dist0 * inverse); } else { Point.scale(maxTv, axis, dist1 * inverse); } } } else if (minTv) { var dist0 = Math.abs(extent2[0] - extent[1]); var dist1 = Math.abs(extent[0] - extent2[1]); if (Math.min(dist0, dist1) < minTv.len()) { if (dist0 < dist1) { Point.scale(minTv, axis, dist0 * inverse); } else { Point.scale(minTv, axis, -dist1 * inverse); } } } } return overlapped; }; OrientedBoundingRect.prototype._getProjMinMaxOnAxis = function (dim, corners, out) { var axis = this._axes[dim]; var origin = this._origin; var proj = corners[0].dot(axis) + origin[dim]; var min = proj; var max = proj; for (var i = 1; i < corners.length; i++) { var proj_1 = corners[i].dot(axis) + origin[dim]; min = Math.min(proj_1, min); max = Math.max(proj_1, max); } out[0] = min; out[1] = max; }; return OrientedBoundingRect; }()); var m = []; var IncrementalDisplayable = (function (_super) { __extends(IncrementalDisplayable, _super); function IncrementalDisplayable() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.notClear = true; _this.incremental = true; _this._displayables = []; _this._temporaryDisplayables = []; _this._cursor = 0; return _this; } IncrementalDisplayable.prototype.traverse = function (cb, context) { cb.call(context, this); }; IncrementalDisplayable.prototype.useStyle = function () { this.style = {}; }; IncrementalDisplayable.prototype.getCursor = function () { return this._cursor; }; IncrementalDisplayable.prototype.innerAfterBrush = function () { this._cursor = this._displayables.length; }; IncrementalDisplayable.prototype.clearDisplaybles = function () { this._displayables = []; this._temporaryDisplayables = []; this._cursor = 0; this.markRedraw(); this.notClear = false; }; IncrementalDisplayable.prototype.clearTemporalDisplayables = function () { this._temporaryDisplayables = []; }; IncrementalDisplayable.prototype.addDisplayable = function (displayable, notPersistent) { if (notPersistent) { this._temporaryDisplayables.push(displayable); } else { this._displayables.push(displayable); } this.markRedraw(); }; IncrementalDisplayable.prototype.addDisplayables = function (displayables, notPersistent) { notPersistent = notPersistent || false; for (var i = 0; i < displayables.length; i++) { this.addDisplayable(displayables[i], notPersistent); } }; IncrementalDisplayable.prototype.getDisplayables = function () { return this._displayables; }; IncrementalDisplayable.prototype.getTemporalDisplayables = function () { return this._temporaryDisplayables; }; IncrementalDisplayable.prototype.eachPendingDisplayable = function (cb) { for (var i = this._cursor; i < this._displayables.length; i++) { cb && cb(this._displayables[i]); } for (var i = 0; i < this._temporaryDisplayables.length; i++) { cb && cb(this._temporaryDisplayables[i]); } }; IncrementalDisplayable.prototype.update = function () { this.updateTransform(); for (var i = this._cursor; i < this._displayables.length; i++) { var displayable = this._displayables[i]; displayable.parent = this; displayable.update(); displayable.parent = null; } for (var i = 0; i < this._temporaryDisplayables.length; i++) { var displayable = this._temporaryDisplayables[i]; displayable.parent = this; displayable.update(); displayable.parent = null; } }; IncrementalDisplayable.prototype.getBoundingRect = function () { if (!this._rect) { var rect = new BoundingRect(Infinity, Infinity, -Infinity, -Infinity); for (var i = 0; i < this._displayables.length; i++) { var displayable = this._displayables[i]; var childRect = displayable.getBoundingRect().clone(); if (displayable.needLocalTransform()) { childRect.applyTransform(displayable.getLocalTransform(m)); } rect.union(childRect); } this._rect = rect; } return this._rect; }; IncrementalDisplayable.prototype.contain = function (x, y) { var localPos = this.transformCoordToLocal(x, y); var rect = this.getBoundingRect(); if (rect.contain(localPos[0], localPos[1])) { for (var i = 0; i < this._displayables.length; i++) { var displayable = this._displayables[i]; if (displayable.contain(x, y)) { return true; } } } return false; }; return IncrementalDisplayable; }(Displayable)); var mathMax$4 = Math.max; var mathMin$4 = Math.min; var _customShapeMap = {}; /** * Extend shape with parameters */ function extendShape(opts) { return Path.extend(opts); } var extendPathFromString = extendFromString; /** * Extend path */ function extendPath(pathData, opts) { return extendPathFromString(pathData, opts); } /** * Register a user defined shape. * The shape class can be fetched by `getShapeClass` * This method will overwrite the registered shapes, including * the registered built-in shapes, if using the same `name`. * The shape can be used in `custom series` and * `graphic component` by declaring `{type: name}`. * * @param name * @param ShapeClass Can be generated by `extendShape`. */ function registerShape(name, ShapeClass) { _customShapeMap[name] = ShapeClass; } /** * Find shape class registered by `registerShape`. Usually used in * fetching user defined shape. * * [Caution]: * (1) This method **MUST NOT be used inside echarts !!!**, unless it is prepared * to use user registered shapes. * Because the built-in shape (see `getBuiltInShape`) will be registered by * `registerShape` by default. That enables users to get both built-in * shapes as well as the shapes belonging to themsleves. But users can overwrite * the built-in shapes by using names like 'circle', 'rect' via calling * `registerShape`. So the echarts inner featrues should not fetch shapes from here * in case that it is overwritten by users, except that some features, like * `custom series`, `graphic component`, do it deliberately. * * (2) In the features like `custom series`, `graphic component`, the user input * `{tpye: 'xxx'}` does not only specify shapes but also specify other graphic * elements like `'group'`, `'text'`, `'image'` or event `'path'`. Those names * are reserved names, that is, if some user register a shape named `'image'`, * the shape will not be used. If we intending to add some more reserved names * in feature, that might bring break changes (disable some existing user shape * names). But that case probably rearly happen. So we dont make more mechanism * to resolve this issue here. * * @param name * @return The shape class. If not found, return nothing. */ function getShapeClass(name) { if (_customShapeMap.hasOwnProperty(name)) { return _customShapeMap[name]; } } /** * Create a path element from path data string * @param pathData * @param opts * @param rect * @param layout 'center' or 'cover' default to be cover */ function makePath(pathData, opts, rect, layout) { var path = createFromString(pathData, opts); if (rect) { if (layout === 'center') { rect = centerGraphic(rect, path.getBoundingRect()); } resizePath(path, rect); } return path; } /** * Create a image element from image url * @param imageUrl image url * @param opts options * @param rect constrain rect * @param layout 'center' or 'cover'. Default to be 'cover' */ function makeImage(imageUrl, rect, layout) { var zrImg = new ZRImage({ style: { image: imageUrl, x: rect.x, y: rect.y, width: rect.width, height: rect.height }, onload: function (img) { if (layout === 'center') { var boundingRect = { width: img.width, height: img.height }; zrImg.setStyle(centerGraphic(rect, boundingRect)); } } }); return zrImg; } /** * Get position of centered element in bounding box. * * @param rect element local bounding box * @param boundingRect constraint bounding box * @return element position containing x, y, width, and height */ function centerGraphic(rect, boundingRect) { // Set rect to center, keep width / height ratio. var aspect = boundingRect.width / boundingRect.height; var width = rect.height * aspect; var height; if (width <= rect.width) { height = rect.height; } else { width = rect.width; height = width / aspect; } var cx = rect.x + rect.width / 2; var cy = rect.y + rect.height / 2; return { x: cx - width / 2, y: cy - height / 2, width: width, height: height }; } var mergePath$1 = mergePath; /** * Resize a path to fit the rect * @param path * @param rect */ function resizePath(path, rect) { if (!path.applyTransform) { return; } var pathRect = path.getBoundingRect(); var m = pathRect.calculateTransform(rect); path.applyTransform(m); } /** * Sub pixel optimize line for canvas */ function subPixelOptimizeLine$1(param) { subPixelOptimizeLine(param.shape, param.shape, param.style); return param; } /** * Sub pixel optimize rect for canvas */ function subPixelOptimizeRect$1(param) { subPixelOptimizeRect(param.shape, param.shape, param.style); return param; } /** * Sub pixel optimize for canvas * * @param position Coordinate, such as x, y * @param lineWidth Should be nonnegative integer. * @param positiveOrNegative Default false (negative). * @return Optimized position. */ var subPixelOptimize$1 = subPixelOptimize; function animateOrSetProps(animationType, el, props, animatableModel, dataIndex, cb, during) { var isFrom = false; var removeOpt; if (typeof dataIndex === 'function') { during = cb; cb = dataIndex; dataIndex = null; } else if (isObject(dataIndex)) { cb = dataIndex.cb; during = dataIndex.during; isFrom = dataIndex.isFrom; removeOpt = dataIndex.removeOpt; dataIndex = dataIndex.dataIndex; } var isUpdate = animationType === 'update'; var isRemove = animationType === 'remove'; var animationPayload; // Check if there is global animation configuration from dataZoom/resize can override the config in option. // If animation is enabled. Will use this animation config in payload. // If animation is disabled. Just ignore it. if (animatableModel && animatableModel.ecModel) { var updatePayload = animatableModel.ecModel.getUpdatePayload(); animationPayload = updatePayload && updatePayload.animation; } var animationEnabled = animatableModel && animatableModel.isAnimationEnabled(); if (!isRemove) { // Must stop the remove animation. el.stopAnimation('remove'); } if (animationEnabled) { var duration = void 0; var animationEasing = void 0; var animationDelay = void 0; if (animationPayload) { duration = animationPayload.duration || 0; animationEasing = animationPayload.easing || 'cubicOut'; animationDelay = animationPayload.delay || 0; } else if (isRemove) { removeOpt = removeOpt || {}; duration = retrieve2(removeOpt.duration, 200); animationEasing = retrieve2(removeOpt.easing, 'cubicOut'); animationDelay = 0; } else { duration = animatableModel.getShallow(isUpdate ? 'animationDurationUpdate' : 'animationDuration'); animationEasing = animatableModel.getShallow(isUpdate ? 'animationEasingUpdate' : 'animationEasing'); animationDelay = animatableModel.getShallow(isUpdate ? 'animationDelayUpdate' : 'animationDelay'); } if (typeof animationDelay === 'function') { animationDelay = animationDelay(dataIndex, animatableModel.getAnimationDelayParams ? animatableModel.getAnimationDelayParams(el, dataIndex) : null); } if (typeof duration === 'function') { duration = duration(dataIndex); } duration > 0 ? isFrom ? el.animateFrom(props, { duration: duration, delay: animationDelay || 0, easing: animationEasing, done: cb, force: !!cb || !!during, scope: animationType, during: during }) : el.animateTo(props, { duration: duration, delay: animationDelay || 0, easing: animationEasing, done: cb, force: !!cb || !!during, setToFinal: true, scope: animationType, during: during }) : ( // FIXME: // If `duration` is 0, only the animation on props // can be stoped, other animation should be continued? // But at present using duration 0 in `animateTo`, `animateFrom` // might cause unexpected behavior. el.stopAnimation(), // If `isFrom`, the props is the "from" props. !isFrom && el.attr(props), cb && cb()); } else { el.stopAnimation(); !isFrom && el.attr(props); // Call during once. during && during(1); cb && cb(); } } /** * Update graphic element properties with or without animation according to the * configuration in series. * * Caution: this method will stop previous animation. * So do not use this method to one element twice before * animation starts, unless you know what you are doing. * @example * graphic.updateProps(el, { * position: [100, 100] * }, seriesModel, dataIndex, function () { console.log('Animation done!'); }); * // Or * graphic.updateProps(el, { * position: [100, 100] * }, seriesModel, function () { console.log('Animation done!'); }); */ function updateProps(el, props, // TODO: TYPE AnimatableModel animatableModel, dataIndex, cb, during) { animateOrSetProps('update', el, props, animatableModel, dataIndex, cb, during); } /** * Init graphic element properties with or without animation according to the * configuration in series. * * Caution: this method will stop previous animation. * So do not use this method to one element twice before * animation starts, unless you know what you are doing. */ function initProps(el, props, animatableModel, dataIndex, cb, during) { animateOrSetProps('init', el, props, animatableModel, dataIndex, cb, during); } /** * Remove graphic element */ function removeElement(el, props, animatableModel, dataIndex, cb, during) { // Don't do remove animation twice. if (isElementRemoved(el)) { return; } animateOrSetProps('remove', el, props, animatableModel, dataIndex, cb, during); } function fadeOutDisplayable(el, animatableModel, dataIndex, done) { el.removeTextContent(); el.removeTextGuideLine(); removeElement(el, { style: { opacity: 0 } }, animatableModel, dataIndex, done); } function removeElementWithFadeOut(el, animatableModel, dataIndex) { function doRemove() { el.parent && el.parent.remove(el); } // Hide label and labelLine first // TODO Also use fade out animation? if (!el.isGroup) { fadeOutDisplayable(el, animatableModel, dataIndex, doRemove); } else { el.traverse(function (disp) { if (!disp.isGroup) { // Can invoke doRemove multiple times. fadeOutDisplayable(disp, animatableModel, dataIndex, doRemove); } }); } } /** * If element is removed. * It can determine if element is having remove animation. */ function isElementRemoved(el) { if (!el.__zr) { return true; } for (var i = 0; i < el.animators.length; i++) { var animator = el.animators[i]; if (animator.scope === 'remove') { return true; } } return false; } /** * Get transform matrix of target (param target), * in coordinate of its ancestor (param ancestor) * * @param target * @param [ancestor] */ function getTransform(target, ancestor) { var mat = identity([]); while (target && target !== ancestor) { mul$1(mat, target.getLocalTransform(), mat); target = target.parent; } return mat; } /** * Apply transform to an vertex. * @param target [x, y] * @param transform Can be: * + Transform matrix: like [1, 0, 0, 1, 0, 0] * + {position, rotation, scale}, the same as `zrender/Transformable`. * @param invert Whether use invert matrix. * @return [x, y] */ function applyTransform$1(target, transform, invert$1) { if (transform && !isArrayLike(transform)) { transform = Transformable.getLocalTransform(transform); } if (invert$1) { transform = invert([], transform); } return applyTransform([], target, transform); } /** * @param direction 'left' 'right' 'top' 'bottom' * @param transform Transform matrix: like [1, 0, 0, 1, 0, 0] * @param invert Whether use invert matrix. * @return Transformed direction. 'left' 'right' 'top' 'bottom' */ function transformDirection(direction, transform, invert) { // Pick a base, ensure that transform result will not be (0, 0). var hBase = transform[4] === 0 || transform[5] === 0 || transform[0] === 0 ? 1 : Math.abs(2 * transform[4] / transform[0]); var vBase = transform[4] === 0 || transform[5] === 0 || transform[2] === 0 ? 1 : Math.abs(2 * transform[4] / transform[2]); var vertex = [direction === 'left' ? -hBase : direction === 'right' ? hBase : 0, direction === 'top' ? -vBase : direction === 'bottom' ? vBase : 0]; vertex = applyTransform$1(vertex, transform, invert); return Math.abs(vertex[0]) > Math.abs(vertex[1]) ? vertex[0] > 0 ? 'right' : 'left' : vertex[1] > 0 ? 'bottom' : 'top'; } function isNotGroup(el) { return !el.isGroup; } function isPath(el) { return el.shape != null; } /** * Apply group transition animation from g1 to g2. * If no animatableModel, no animation. */ function groupTransition(g1, g2, animatableModel) { if (!g1 || !g2) { return; } function getElMap(g) { var elMap = {}; g.traverse(function (el) { if (isNotGroup(el) && el.anid) { elMap[el.anid] = el; } }); return elMap; } function getAnimatableProps(el) { var obj = { x: el.x, y: el.y, rotation: el.rotation }; if (isPath(el)) { obj.shape = extend({}, el.shape); } return obj; } var elMap1 = getElMap(g1); g2.traverse(function (el) { if (isNotGroup(el) && el.anid) { var oldEl = elMap1[el.anid]; if (oldEl) { var newProp = getAnimatableProps(el); el.attr(getAnimatableProps(oldEl)); updateProps(el, newProp, animatableModel, getECData(el).dataIndex); } } }); } function clipPointsByRect(points, rect) { // FIXME: this way migth be incorrect when grpahic clipped by a corner. // and when element have border. return map(points, function (point) { var x = point[0]; x = mathMax$4(x, rect.x); x = mathMin$4(x, rect.x + rect.width); var y = point[1]; y = mathMax$4(y, rect.y); y = mathMin$4(y, rect.y + rect.height); return [x, y]; }); } /** * Return a new clipped rect. If rect size are negative, return undefined. */ function clipRectByRect(targetRect, rect) { var x = mathMax$4(targetRect.x, rect.x); var x2 = mathMin$4(targetRect.x + targetRect.width, rect.x + rect.width); var y = mathMax$4(targetRect.y, rect.y); var y2 = mathMin$4(targetRect.y + targetRect.height, rect.y + rect.height); // If the total rect is cliped, nothing, including the border, // should be painted. So return undefined. if (x2 >= x && y2 >= y) { return { x: x, y: y, width: x2 - x, height: y2 - y }; } } function createIcon(iconStr, // Support 'image://' or 'path://' or direct svg path. opt, rect) { var innerOpts = extend({ rectHover: true }, opt); var style = innerOpts.style = { strokeNoScale: true }; rect = rect || { x: -1, y: -1, width: 2, height: 2 }; if (iconStr) { return iconStr.indexOf('image://') === 0 ? (style.image = iconStr.slice(8), defaults(style, rect), new ZRImage(innerOpts)) : makePath(iconStr.replace('path://', ''), innerOpts, rect, 'center'); } } /** * Return `true` if the given line (line `a`) and the given polygon * are intersect. * Note that we do not count colinear as intersect here because no * requirement for that. We could do that if required in future. */ function linePolygonIntersect(a1x, a1y, a2x, a2y, points) { for (var i = 0, p2 = points[points.length - 1]; i < points.length; i++) { var p = points[i]; if (lineLineIntersect(a1x, a1y, a2x, a2y, p[0], p[1], p2[0], p2[1])) { return true; } p2 = p; } } /** * Return `true` if the given two lines (line `a` and line `b`) * are intersect. * Note that we do not count colinear as intersect here because no * requirement for that. We could do that if required in future. */ function lineLineIntersect(a1x, a1y, a2x, a2y, b1x, b1y, b2x, b2y) { // let `vec_m` to be `vec_a2 - vec_a1` and `vec_n` to be `vec_b2 - vec_b1`. var mx = a2x - a1x; var my = a2y - a1y; var nx = b2x - b1x; var ny = b2y - b1y; // `vec_m` and `vec_n` are parallel iff // exising `k` such that `vec_m = k · vec_n`, equivalent to `vec_m X vec_n = 0`. var nmCrossProduct = crossProduct2d(nx, ny, mx, my); if (nearZero(nmCrossProduct)) { return false; } // `vec_m` and `vec_n` are intersect iff // existing `p` and `q` in [0, 1] such that `vec_a1 + p * vec_m = vec_b1 + q * vec_n`, // such that `q = ((vec_a1 - vec_b1) X vec_m) / (vec_n X vec_m)` // and `p = ((vec_a1 - vec_b1) X vec_n) / (vec_n X vec_m)`. var b1a1x = a1x - b1x; var b1a1y = a1y - b1y; var q = crossProduct2d(b1a1x, b1a1y, mx, my) / nmCrossProduct; if (q < 0 || q > 1) { return false; } var p = crossProduct2d(b1a1x, b1a1y, nx, ny) / nmCrossProduct; if (p < 0 || p > 1) { return false; } return true; } /** * Cross product of 2-dimension vector. */ function crossProduct2d(x1, y1, x2, y2) { return x1 * y2 - x2 * y1; } function nearZero(val) { return val <= 1e-6 && val >= -1e-6; } function setTooltipConfig(opt) { var itemTooltipOption = opt.itemTooltipOption; var componentModel = opt.componentModel; var itemName = opt.itemName; var itemTooltipOptionObj = isString(itemTooltipOption) ? { formatter: itemTooltipOption } : itemTooltipOption; var mainType = componentModel.mainType; var componentIndex = componentModel.componentIndex; var formatterParams = { componentType: mainType, name: itemName, $vars: ['name'] }; formatterParams[mainType + 'Index'] = componentIndex; var formatterParamsExtra = opt.formatterParamsExtra; if (formatterParamsExtra) { each(keys(formatterParamsExtra), function (key) { if (!hasOwn(formatterParams, key)) { formatterParams[key] = formatterParamsExtra[key]; formatterParams.$vars.push(key); } }); } var ecData = getECData(opt.el); ecData.componentMainType = mainType; ecData.componentIndex = componentIndex; ecData.tooltipConfig = { name: itemName, option: defaults({ content: itemName, formatterParams: formatterParams }, itemTooltipOptionObj) }; } // Register built-in shapes. These shapes might be overwirtten // by users, although we do not recommend that. registerShape('circle', Circle); registerShape('ellipse', Ellipse); registerShape('sector', Sector); registerShape('ring', Ring); registerShape('polygon', Polygon); registerShape('polyline', Polyline); registerShape('rect', Rect); registerShape('line', Line); registerShape('bezierCurve', BezierCurve); registerShape('arc', Arc); var graphic = /*#__PURE__*/Object.freeze({ __proto__: null, extendShape: extendShape, extendPath: extendPath, registerShape: registerShape, getShapeClass: getShapeClass, makePath: makePath, makeImage: makeImage, mergePath: mergePath$1, resizePath: resizePath, subPixelOptimizeLine: subPixelOptimizeLine$1, subPixelOptimizeRect: subPixelOptimizeRect$1, subPixelOptimize: subPixelOptimize$1, updateProps: updateProps, initProps: initProps, removeElement: removeElement, removeElementWithFadeOut: removeElementWithFadeOut, isElementRemoved: isElementRemoved, getTransform: getTransform, applyTransform: applyTransform$1, transformDirection: transformDirection, groupTransition: groupTransition, clipPointsByRect: clipPointsByRect, clipRectByRect: clipRectByRect, createIcon: createIcon, linePolygonIntersect: linePolygonIntersect, lineLineIntersect: lineLineIntersect, setTooltipConfig: setTooltipConfig, Group: Group, Image: ZRImage, Text: ZRText, Circle: Circle, Ellipse: Ellipse, Sector: Sector, Ring: Ring, Polygon: Polygon, Polyline: Polyline, Rect: Rect, Line: Line, BezierCurve: BezierCurve, Arc: Arc, IncrementalDisplayable: IncrementalDisplayable, CompoundPath: CompoundPath, LinearGradient: LinearGradient, RadialGradient: RadialGradient, BoundingRect: BoundingRect, OrientedBoundingRect: OrientedBoundingRect, Point: Point, Path: Path }); var EMPTY_OBJ = {}; function setLabelText(label, labelTexts) { for (var i = 0; i < SPECIAL_STATES.length; i++) { var stateName = SPECIAL_STATES[i]; var text = labelTexts[stateName]; var state = label.ensureState(stateName); state.style = state.style || {}; state.style.text = text; } var oldStates = label.currentStates.slice(); label.clearStates(true); label.setStyle({ text: labelTexts.normal }); label.useStates(oldStates, true); } function getLabelText(opt, stateModels, interpolatedValue) { var labelFetcher = opt.labelFetcher; var labelDataIndex = opt.labelDataIndex; var labelDimIndex = opt.labelDimIndex; var normalModel = stateModels.normal; var baseText; if (labelFetcher) { baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex, normalModel && normalModel.get('formatter'), interpolatedValue != null ? { interpolatedValue: interpolatedValue } : null); } if (baseText == null) { baseText = isFunction(opt.defaultText) ? opt.defaultText(labelDataIndex, opt, interpolatedValue) : opt.defaultText; } var statesText = { normal: baseText }; for (var i = 0; i < SPECIAL_STATES.length; i++) { var stateName = SPECIAL_STATES[i]; var stateModel = stateModels[stateName]; statesText[stateName] = retrieve2(labelFetcher ? labelFetcher.getFormattedLabel(labelDataIndex, stateName, null, labelDimIndex, stateModel && stateModel.get('formatter')) : null, baseText); } return statesText; } function setLabelStyle(targetEl, labelStatesModels, opt, stateSpecified // TODO specified position? ) { opt = opt || EMPTY_OBJ; var isSetOnText = targetEl instanceof ZRText; var needsCreateText = false; for (var i = 0; i < DISPLAY_STATES.length; i++) { var stateModel = labelStatesModels[DISPLAY_STATES[i]]; if (stateModel && stateModel.getShallow('show')) { needsCreateText = true; break; } } var textContent = isSetOnText ? targetEl : targetEl.getTextContent(); if (needsCreateText) { if (!isSetOnText) { // Reuse the previous if (!textContent) { textContent = new ZRText(); targetEl.setTextContent(textContent); } // Use same state proxy if (targetEl.stateProxy) { textContent.stateProxy = targetEl.stateProxy; } } var labelStatesTexts = getLabelText(opt, labelStatesModels); var normalModel = labelStatesModels.normal; var showNormal = !!normalModel.getShallow('show'); var normalStyle = createTextStyle(normalModel, stateSpecified && stateSpecified.normal, opt, false, !isSetOnText); normalStyle.text = labelStatesTexts.normal; if (!isSetOnText) { // Always create new targetEl.setTextConfig(createTextConfig(normalModel, opt, false)); } for (var i = 0; i < SPECIAL_STATES.length; i++) { var stateName = SPECIAL_STATES[i]; var stateModel = labelStatesModels[stateName]; if (stateModel) { var stateObj = textContent.ensureState(stateName); var stateShow = !!retrieve2(stateModel.getShallow('show'), showNormal); if (stateShow !== showNormal) { stateObj.ignore = !stateShow; } stateObj.style = createTextStyle(stateModel, stateSpecified && stateSpecified[stateName], opt, true, !isSetOnText); stateObj.style.text = labelStatesTexts[stateName]; if (!isSetOnText) { var targetElEmphasisState = targetEl.ensureState(stateName); targetElEmphasisState.textConfig = createTextConfig(stateModel, opt, true); } } } // PENDING: if there is many requirements that emphasis position // need to be different from normal position, we might consider // auto slient is those cases. textContent.silent = !!normalModel.getShallow('silent'); // Keep x and y if (textContent.style.x != null) { normalStyle.x = textContent.style.x; } if (textContent.style.y != null) { normalStyle.y = textContent.style.y; } textContent.ignore = !showNormal; // Always create new style. textContent.useStyle(normalStyle); textContent.dirty(); if (opt.enableTextSetter) { labelInner(textContent).setLabelText = function (interpolatedValue) { var labelStatesTexts = getLabelText(opt, labelStatesModels, interpolatedValue); setLabelText(textContent, labelStatesTexts); }; } } else if (textContent) { // Not display rich text. textContent.ignore = true; } targetEl.dirty(); } function getLabelStatesModels(itemModel, labelName) { labelName = labelName || 'label'; var statesModels = { normal: itemModel.getModel(labelName) }; for (var i = 0; i < SPECIAL_STATES.length; i++) { var stateName = SPECIAL_STATES[i]; statesModels[stateName] = itemModel.getModel([stateName, labelName]); } return statesModels; } /** * Set basic textStyle properties. */ function createTextStyle(textStyleModel, specifiedTextStyle, // Fixed style in the code. Can't be set by model. opt, isNotNormal, isAttached // If text is attached on an element. If so, auto color will handling in zrender. ) { var textStyle = {}; setTextStyleCommon(textStyle, textStyleModel, opt, isNotNormal, isAttached); specifiedTextStyle && extend(textStyle, specifiedTextStyle); // textStyle.host && textStyle.host.dirty && textStyle.host.dirty(false); return textStyle; } function createTextConfig(textStyleModel, opt, isNotNormal) { opt = opt || {}; var textConfig = {}; var labelPosition; var labelRotate = textStyleModel.getShallow('rotate'); var labelDistance = retrieve2(textStyleModel.getShallow('distance'), isNotNormal ? null : 5); var labelOffset = textStyleModel.getShallow('offset'); labelPosition = textStyleModel.getShallow('position') || (isNotNormal ? null : 'inside'); // 'outside' is not a valid zr textPostion value, but used // in bar series, and magric type should be considered. labelPosition === 'outside' && (labelPosition = opt.defaultOutsidePosition || 'top'); if (labelPosition != null) { textConfig.position = labelPosition; } if (labelOffset != null) { textConfig.offset = labelOffset; } if (labelRotate != null) { labelRotate *= Math.PI / 180; textConfig.rotation = labelRotate; } if (labelDistance != null) { textConfig.distance = labelDistance; } // fill and auto is determined by the color of path fill if it's not specified by developers. textConfig.outsideFill = textStyleModel.get('color') === 'inherit' ? opt.inheritColor || null : 'auto'; return textConfig; } /** * The uniform entry of set text style, that is, retrieve style definitions * from `model` and set to `textStyle` object. * * Never in merge mode, but in overwrite mode, that is, all of the text style * properties will be set. (Consider the states of normal and emphasis and * default value can be adopted, merge would make the logic too complicated * to manage.) */ function setTextStyleCommon(textStyle, textStyleModel, opt, isNotNormal, isAttached) { // Consider there will be abnormal when merge hover style to normal style if given default value. opt = opt || EMPTY_OBJ; var ecModel = textStyleModel.ecModel; var globalTextStyle = ecModel && ecModel.option.textStyle; // Consider case: // { // data: [{ // value: 12, // label: { // rich: { // // no 'a' here but using parent 'a'. // } // } // }], // rich: { // a: { ... } // } // } var richItemNames = getRichItemNames(textStyleModel); var richResult; if (richItemNames) { richResult = {}; for (var name_1 in richItemNames) { if (richItemNames.hasOwnProperty(name_1)) { // Cascade is supported in rich. var richTextStyle = textStyleModel.getModel(['rich', name_1]); // In rich, never `disableBox`. // FIXME: consider `label: {formatter: '{a|xx}', color: 'blue', rich: {a: {}}}`, // the default color `'blue'` will not be adopted if no color declared in `rich`. // That might confuses users. So probably we should put `textStyleModel` as the // root ancestor of the `richTextStyle`. But that would be a break change. setTokenTextStyle(richResult[name_1] = {}, richTextStyle, globalTextStyle, opt, isNotNormal, isAttached, false, true); } } } if (richResult) { textStyle.rich = richResult; } var overflow = textStyleModel.get('overflow'); if (overflow) { textStyle.overflow = overflow; } var margin = textStyleModel.get('minMargin'); if (margin != null) { textStyle.margin = margin; } setTokenTextStyle(textStyle, textStyleModel, globalTextStyle, opt, isNotNormal, isAttached, true, false); } // Consider case: // { // data: [{ // value: 12, // label: { // rich: { // // no 'a' here but using parent 'a'. // } // } // }], // rich: { // a: { ... } // } // } // TODO TextStyleModel function getRichItemNames(textStyleModel) { // Use object to remove duplicated names. var richItemNameMap; while (textStyleModel && textStyleModel !== textStyleModel.ecModel) { var rich = (textStyleModel.option || EMPTY_OBJ).rich; if (rich) { richItemNameMap = richItemNameMap || {}; var richKeys = keys(rich); for (var i = 0; i < richKeys.length; i++) { var richKey = richKeys[i]; richItemNameMap[richKey] = 1; } } textStyleModel = textStyleModel.parentModel; } return richItemNameMap; } var TEXT_PROPS_WITH_GLOBAL = ['fontStyle', 'fontWeight', 'fontSize', 'fontFamily', 'textShadowColor', 'textShadowBlur', 'textShadowOffsetX', 'textShadowOffsetY']; var TEXT_PROPS_SELF = ['align', 'lineHeight', 'width', 'height', 'tag', 'verticalAlign']; var TEXT_PROPS_BOX = ['padding', 'borderWidth', 'borderRadius', 'borderDashOffset', 'backgroundColor', 'borderColor', 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY']; function setTokenTextStyle(textStyle, textStyleModel, globalTextStyle, opt, isNotNormal, isAttached, isBlock, inRich) { // In merge mode, default value should not be given. globalTextStyle = !isNotNormal && globalTextStyle || EMPTY_OBJ; var inheritColor = opt && opt.inheritColor; var fillColor = textStyleModel.getShallow('color'); var strokeColor = textStyleModel.getShallow('textBorderColor'); var opacity = retrieve2(textStyleModel.getShallow('opacity'), globalTextStyle.opacity); if (fillColor === 'inherit' || fillColor === 'auto') { if ("development" !== 'production') { if (fillColor === 'auto') { deprecateReplaceLog('color: \'auto\'', 'color: \'inherit\''); } } if (inheritColor) { fillColor = inheritColor; } else { fillColor = null; } } if (strokeColor === 'inherit' || strokeColor === 'auto') { if ("development" !== 'production') { if (strokeColor === 'auto') { deprecateReplaceLog('color: \'auto\'', 'color: \'inherit\''); } } if (inheritColor) { strokeColor = inheritColor; } else { strokeColor = null; } } if (!isAttached) { // Only use default global textStyle.color if text is individual. // Otherwise it will use the strategy of attached text color because text may be on a path. fillColor = fillColor || globalTextStyle.color; strokeColor = strokeColor || globalTextStyle.textBorderColor; } if (fillColor != null) { textStyle.fill = fillColor; } if (strokeColor != null) { textStyle.stroke = strokeColor; } var textBorderWidth = retrieve2(textStyleModel.getShallow('textBorderWidth'), globalTextStyle.textBorderWidth); if (textBorderWidth != null) { textStyle.lineWidth = textBorderWidth; } var textBorderType = retrieve2(textStyleModel.getShallow('textBorderType'), globalTextStyle.textBorderType); if (textBorderType != null) { textStyle.lineDash = textBorderType; } var textBorderDashOffset = retrieve2(textStyleModel.getShallow('textBorderDashOffset'), globalTextStyle.textBorderDashOffset); if (textBorderDashOffset != null) { textStyle.lineDashOffset = textBorderDashOffset; } if (!isNotNormal && opacity == null && !inRich) { opacity = opt && opt.defaultOpacity; } if (opacity != null) { textStyle.opacity = opacity; } // TODO if (!isNotNormal && !isAttached) { // Set default finally. if (textStyle.fill == null && opt.inheritColor) { textStyle.fill = opt.inheritColor; } } // Do not use `getFont` here, because merge should be supported, where // part of these properties may be changed in emphasis style, and the // others should remain their original value got from normal style. for (var i = 0; i < TEXT_PROPS_WITH_GLOBAL.length; i++) { var key = TEXT_PROPS_WITH_GLOBAL[i]; var val = retrieve2(textStyleModel.getShallow(key), globalTextStyle[key]); if (val != null) { textStyle[key] = val; } } for (var i = 0; i < TEXT_PROPS_SELF.length; i++) { var key = TEXT_PROPS_SELF[i]; var val = textStyleModel.getShallow(key); if (val != null) { textStyle[key] = val; } } if (textStyle.verticalAlign == null) { var baseline = textStyleModel.getShallow('baseline'); if (baseline != null) { textStyle.verticalAlign = baseline; } } if (!isBlock || !opt.disableBox) { for (var i = 0; i < TEXT_PROPS_BOX.length; i++) { var key = TEXT_PROPS_BOX[i]; var val = textStyleModel.getShallow(key); if (val != null) { textStyle[key] = val; } } var borderType = textStyleModel.getShallow('borderType'); if (borderType != null) { textStyle.borderDash = borderType; } if ((textStyle.backgroundColor === 'auto' || textStyle.backgroundColor === 'inherit') && inheritColor) { if ("development" !== 'production') { if (textStyle.backgroundColor === 'auto') { deprecateReplaceLog('backgroundColor: \'auto\'', 'backgroundColor: \'inherit\''); } } textStyle.backgroundColor = inheritColor; } if ((textStyle.borderColor === 'auto' || textStyle.borderColor === 'inherit') && inheritColor) { if ("development" !== 'production') { if (textStyle.borderColor === 'auto') { deprecateReplaceLog('borderColor: \'auto\'', 'borderColor: \'inherit\''); } } textStyle.borderColor = inheritColor; } } } function getFont(opt, ecModel) { var gTextStyleModel = ecModel && ecModel.getModel('textStyle'); return trim([// FIXME in node-canvas fontWeight is before fontStyle opt.fontStyle || gTextStyleModel && gTextStyleModel.getShallow('fontStyle') || '', opt.fontWeight || gTextStyleModel && gTextStyleModel.getShallow('fontWeight') || '', (opt.fontSize || gTextStyleModel && gTextStyleModel.getShallow('fontSize') || 12) + 'px', opt.fontFamily || gTextStyleModel && gTextStyleModel.getShallow('fontFamily') || 'sans-serif'].join(' ')); } var labelInner = makeInner(); function setLabelValueAnimation(label, labelStatesModels, value, getDefaultText) { if (!label) { return; } var obj = labelInner(label); obj.prevValue = obj.value; obj.value = value; var normalLabelModel = labelStatesModels.normal; obj.valueAnimation = normalLabelModel.get('valueAnimation'); if (obj.valueAnimation) { obj.precision = normalLabelModel.get('precision'); obj.defaultInterpolatedText = getDefaultText; obj.statesModels = labelStatesModels; } } function animateLabelValue(textEl, dataIndex, data, animatableModel, labelFetcher) { var labelInnerStore = labelInner(textEl); if (!labelInnerStore.valueAnimation) { return; } var defaultInterpolatedText = labelInnerStore.defaultInterpolatedText; // Consider the case that being animating, do not use the `obj.value`, // Otherwise it will jump to the `obj.value` when this new animation started. var currValue = retrieve2(labelInnerStore.interpolatedValue, labelInnerStore.prevValue); var targetValue = labelInnerStore.value; function during(percent) { var interpolated = interpolateRawValues(data, labelInnerStore.precision, currValue, targetValue, percent); labelInnerStore.interpolatedValue = percent === 1 ? null : interpolated; var labelText = getLabelText({ labelDataIndex: dataIndex, labelFetcher: labelFetcher, defaultText: defaultInterpolatedText ? defaultInterpolatedText(interpolated) : interpolated + '' }, labelInnerStore.statesModels, interpolated); setLabelText(textEl, labelText); } (currValue == null ? initProps : updateProps)(textEl, {}, animatableModel, dataIndex, null, during); } function enableLayoutLayoutFeatures(el, dataIndex, dataType) { getECData(el).dataIndex = dataIndex; getECData(el).dataType = dataType; } var PATH_COLOR = ['textStyle', 'color']; // TODO Performance improvement? var tmpRichText = new ZRText(); var TextStyleMixin = /** @class */ function () { function TextStyleMixin() {} /** * Get color property or get color from option.textStyle.color */ // TODO Callback TextStyleMixin.prototype.getTextColor = function (isEmphasis) { var ecModel = this.ecModel; return this.getShallow('color') || (!isEmphasis && ecModel ? ecModel.get(PATH_COLOR) : null); }; /** * Create font string from fontStyle, fontWeight, fontSize, fontFamily * @return {string} */ TextStyleMixin.prototype.getFont = function () { return getFont({ fontStyle: this.getShallow('fontStyle'), fontWeight: this.getShallow('fontWeight'), fontSize: this.getShallow('fontSize'), fontFamily: this.getShallow('fontFamily') }, this.ecModel); }; TextStyleMixin.prototype.getTextRect = function (text) { tmpRichText.useStyle({ text: text, fontStyle: this.getShallow('fontStyle'), fontWeight: this.getShallow('fontWeight'), fontSize: this.getShallow('fontSize'), fontFamily: this.getShallow('fontFamily'), verticalAlign: this.getShallow('verticalAlign') || this.getShallow('baseline'), padding: this.getShallow('padding'), lineHeight: this.getShallow('lineHeight'), rich: this.getShallow('rich') }); tmpRichText.update(); return tmpRichText.getBoundingRect(); }; return TextStyleMixin; }(); var LINE_STYLE_KEY_MAP = [['lineWidth', 'width'], ['stroke', 'color'], ['opacity'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['shadowColor'], ['lineDash', 'type'], ['lineDashOffset', 'dashOffset'], ['lineCap', 'cap'], ['lineJoin', 'join'], ['miterLimit'] // Option decal is in `DecalObject` but style.decal is in `PatternObject`. // So do not transfer decal directly. ]; var getLineStyle = makeStyleMapper(LINE_STYLE_KEY_MAP); var LineStyleMixin = /** @class */ function () { function LineStyleMixin() {} LineStyleMixin.prototype.getLineStyle = function (excludes) { return getLineStyle(this, excludes); }; return LineStyleMixin; }(); var ITEM_STYLE_KEY_MAP = [['fill', 'color'], ['stroke', 'borderColor'], ['lineWidth', 'borderWidth'], ['opacity'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['shadowColor'], ['lineDash', 'borderType'], ['lineDashOffset', 'borderDashOffset'], ['lineCap', 'borderCap'], ['lineJoin', 'borderJoin'], ['miterLimit', 'borderMiterLimit'] // Option decal is in `DecalObject` but style.decal is in `PatternObject`. // So do not transfer decal directly. ]; var getItemStyle = makeStyleMapper(ITEM_STYLE_KEY_MAP); var ItemStyleMixin = /** @class */ function () { function ItemStyleMixin() {} ItemStyleMixin.prototype.getItemStyle = function (excludes, includes) { return getItemStyle(this, excludes, includes); }; return ItemStyleMixin; }(); var Model = /** @class */ function () { function Model(option, parentModel, ecModel) { this.parentModel = parentModel; this.ecModel = ecModel; this.option = option; // Simple optimization // if (this.init) { // if (arguments.length <= 4) { // this.init(option, parentModel, ecModel, extraOpt); // } // else { // this.init.apply(this, arguments); // } // } } Model.prototype.init = function (option, parentModel, ecModel) { var rest = []; for (var _i = 3; _i < arguments.length; _i++) { rest[_i - 3] = arguments[_i]; } }; /** * Merge the input option to me. */ Model.prototype.mergeOption = function (option, ecModel) { merge(this.option, option, true); }; // `path` can be 'xxx.yyy.zzz', so the return value type have to be `ModelOption` // TODO: TYPE strict key check? // get(path: string | string[], ignoreParent?: boolean): ModelOption; Model.prototype.get = function (path, ignoreParent) { if (path == null) { return this.option; } return this._doGet(this.parsePath(path), !ignoreParent && this.parentModel); }; Model.prototype.getShallow = function (key, ignoreParent) { var option = this.option; var val = option == null ? option : option[key]; if (val == null && !ignoreParent) { var parentModel = this.parentModel; if (parentModel) { // FIXME:TS do not know how to make it works val = parentModel.getShallow(key); } } return val; }; // `path` can be 'xxx.yyy.zzz', so the return value type have to be `Model` // getModel(path: string | string[], parentModel?: Model): Model; // TODO 'xxx.yyy.zzz' is deprecated Model.prototype.getModel = function (path, parentModel) { var hasPath = path != null; var pathFinal = hasPath ? this.parsePath(path) : null; var obj = hasPath ? this._doGet(pathFinal) : this.option; parentModel = parentModel || this.parentModel && this.parentModel.getModel(this.resolveParentPath(pathFinal)); return new Model(obj, parentModel, this.ecModel); }; /** * Squash option stack into one. * parentModel will be removed after squashed. * * NOTE: resolveParentPath will not be applied here for simplicity. DON'T use this function * if resolveParentPath is modified. * * @param deepMerge If do deep merge. Default to be false. */ // squash( // deepMerge?: boolean, // handleCallback?: (func: () => object) => object // ) { // const optionStack = []; // let model: Model = this; // while (model) { // if (model.option) { // optionStack.push(model.option); // } // model = model.parentModel; // } // const newOption = {} as Opt; // let option; // while (option = optionStack.pop()) { // Top down merge // if (isFunction(option) && handleCallback) { // option = handleCallback(option); // } // if (deepMerge) { // merge(newOption, option); // } // else { // extend(newOption, option); // } // } // // Remove parentModel // this.option = newOption; // this.parentModel = null; // } /** * If model has option */ Model.prototype.isEmpty = function () { return this.option == null; }; Model.prototype.restoreData = function () {}; // Pending Model.prototype.clone = function () { var Ctor = this.constructor; return new Ctor(clone(this.option)); }; // setReadOnly(properties): void { // clazzUtil.setReadOnly(this, properties); // } // If path is null/undefined, return null/undefined. Model.prototype.parsePath = function (path) { if (typeof path === 'string') { return path.split('.'); } return path; }; // Resolve path for parent. Perhaps useful when parent use a different property. // Default to be a identity resolver. // Can be modified to a different resolver. Model.prototype.resolveParentPath = function (path) { return path; }; // FIXME:TS check whether put this method here Model.prototype.isAnimationEnabled = function () { if (!env.node && this.option) { if (this.option.animation != null) { return !!this.option.animation; } else if (this.parentModel) { return this.parentModel.isAnimationEnabled(); } } }; Model.prototype._doGet = function (pathArr, parentModel) { var obj = this.option; if (!pathArr) { return obj; } for (var i = 0; i < pathArr.length; i++) { // Ignore empty if (!pathArr[i]) { continue; } // obj could be number/string/... (like 0) obj = obj && typeof obj === 'object' ? obj[pathArr[i]] : null; if (obj == null) { break; } } if (obj == null && parentModel) { obj = parentModel._doGet(this.resolveParentPath(pathArr), parentModel.parentModel); } return obj; }; return Model; }(); enableClassExtend(Model); enableClassCheck(Model); mixin(Model, LineStyleMixin); mixin(Model, ItemStyleMixin); mixin(Model, AreaStyleMixin); mixin(Model, TextStyleMixin); var base = Math.round(Math.random() * 10); /** * @public * @param {string} type * @return {string} */ function getUID(type) { // Considering the case of crossing js context, // use Math.random to make id as unique as possible. return [type || '', base++].join('_'); } /** * Implements `SubTypeDefaulterManager` for `target`. */ function enableSubTypeDefaulter(target) { var subTypeDefaulters = {}; target.registerSubTypeDefaulter = function (componentType, defaulter) { var componentTypeInfo = parseClassType(componentType); subTypeDefaulters[componentTypeInfo.main] = defaulter; }; target.determineSubType = function (componentType, option) { var type = option.type; if (!type) { var componentTypeMain = parseClassType(componentType).main; if (target.hasSubTypes(componentType) && subTypeDefaulters[componentTypeMain]) { type = subTypeDefaulters[componentTypeMain](option); } } return type; }; } /** * Implements `TopologicalTravelable` for `entity`. * * Topological travel on Activity Network (Activity On Vertices). * Dependencies is defined in Model.prototype.dependencies, like ['xAxis', 'yAxis']. * If 'xAxis' or 'yAxis' is absent in componentTypeList, just ignore it in topology. * If there is circular dependencey, Error will be thrown. */ function enableTopologicalTravel(entity, dependencyGetter) { /** * @param targetNameList Target Component type list. * Can be ['aa', 'bb', 'aa.xx'] * @param fullNameList By which we can build dependency graph. * @param callback Params: componentType, dependencies. * @param context Scope of callback. */ entity.topologicalTravel = function (targetNameList, fullNameList, callback, context) { if (!targetNameList.length) { return; } var result = makeDepndencyGraph(fullNameList); var graph = result.graph; var noEntryList = result.noEntryList; var targetNameSet = {}; each(targetNameList, function (name) { targetNameSet[name] = true; }); while (noEntryList.length) { var currComponentType = noEntryList.pop(); var currVertex = graph[currComponentType]; var isInTargetNameSet = !!targetNameSet[currComponentType]; if (isInTargetNameSet) { callback.call(context, currComponentType, currVertex.originalDeps.slice()); delete targetNameSet[currComponentType]; } each(currVertex.successor, isInTargetNameSet ? removeEdgeAndAdd : removeEdge); } each(targetNameSet, function () { var errMsg = ''; if ("development" !== 'production') { errMsg = makePrintable('Circular dependency may exists: ', targetNameSet, targetNameList, fullNameList); } throw new Error(errMsg); }); function removeEdge(succComponentType) { graph[succComponentType].entryCount--; if (graph[succComponentType].entryCount === 0) { noEntryList.push(succComponentType); } } // Consider this case: legend depends on series, and we call // chart.setOption({series: [...]}), where only series is in option. // If we do not have 'removeEdgeAndAdd', legendModel.mergeOption will // not be called, but only sereis.mergeOption is called. Thus legend // have no chance to update its local record about series (like which // name of series is available in legend). function removeEdgeAndAdd(succComponentType) { targetNameSet[succComponentType] = true; removeEdge(succComponentType); } }; function makeDepndencyGraph(fullNameList) { var graph = {}; var noEntryList = []; each(fullNameList, function (name) { var thisItem = createDependencyGraphItem(graph, name); var originalDeps = thisItem.originalDeps = dependencyGetter(name); var availableDeps = getAvailableDependencies(originalDeps, fullNameList); thisItem.entryCount = availableDeps.length; if (thisItem.entryCount === 0) { noEntryList.push(name); } each(availableDeps, function (dependentName) { if (indexOf(thisItem.predecessor, dependentName) < 0) { thisItem.predecessor.push(dependentName); } var thatItem = createDependencyGraphItem(graph, dependentName); if (indexOf(thatItem.successor, dependentName) < 0) { thatItem.successor.push(name); } }); }); return { graph: graph, noEntryList: noEntryList }; } function createDependencyGraphItem(graph, name) { if (!graph[name]) { graph[name] = { predecessor: [], successor: [] }; } return graph[name]; } function getAvailableDependencies(originalDeps, fullNameList) { var availableDeps = []; each(originalDeps, function (dep) { indexOf(fullNameList, dep) >= 0 && availableDeps.push(dep); }); return availableDeps; } } function inheritDefaultOption(superOption, subOption) { // See also `model/Component.ts#getDefaultOption` return merge(merge({}, superOption, true), subOption, true); } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * Language: English. */ var langEN = { time: { month: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], monthAbbr: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], dayOfWeek: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], dayOfWeekAbbr: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'] }, legend: { selector: { all: 'All', inverse: 'Inv' } }, toolbox: { brush: { title: { rect: 'Box Select', polygon: 'Lasso Select', lineX: 'Horizontally Select', lineY: 'Vertically Select', keep: 'Keep Selections', clear: 'Clear Selections' } }, dataView: { title: 'Data View', lang: ['Data View', 'Close', 'Refresh'] }, dataZoom: { title: { zoom: 'Zoom', back: 'Zoom Reset' } }, magicType: { title: { line: 'Switch to Line Chart', bar: 'Switch to Bar Chart', stack: 'Stack', tiled: 'Tile' } }, restore: { title: 'Restore' }, saveAsImage: { title: 'Save as Image', lang: ['Right Click to Save Image'] } }, series: { typeNames: { pie: 'Pie chart', bar: 'Bar chart', line: 'Line chart', scatter: 'Scatter plot', effectScatter: 'Ripple scatter plot', radar: 'Radar chart', tree: 'Tree', treemap: 'Treemap', boxplot: 'Boxplot', candlestick: 'Candlestick', k: 'K line chart', heatmap: 'Heat map', map: 'Map', parallel: 'Parallel coordinate map', lines: 'Line graph', graph: 'Relationship graph', sankey: 'Sankey diagram', funnel: 'Funnel chart', gauge: 'Guage', pictorialBar: 'Pictorial bar', themeRiver: 'Theme River Map', sunburst: 'Sunburst' } }, aria: { general: { withTitle: 'This is a chart about "{title}"', withoutTitle: 'This is a chart' }, series: { single: { prefix: '', withName: ' with type {seriesType} named {seriesName}.', withoutName: ' with type {seriesType}.' }, multiple: { prefix: '. It consists of {seriesCount} series count.', withName: ' The {seriesId} series is a {seriesType} representing {seriesName}.', withoutName: ' The {seriesId} series is a {seriesType}.', separator: { middle: '', end: '' } } }, data: { allData: 'The data is as follows: ', partialData: 'The first {displayCnt} items are: ', withName: 'the data for {name} is {value}', withoutName: '{value}', separator: { middle: ', ', end: '. ' } } } }; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ var langZH = { time: { month: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], monthAbbr: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], dayOfWeek: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'], dayOfWeekAbbr: ['日', '一', '二', '三', '四', '五', '六'] }, legend: { selector: { all: '全选', inverse: '反选' } }, toolbox: { brush: { title: { rect: '矩形选择', polygon: '圈选', lineX: '横向选择', lineY: '纵向选择', keep: '保持选择', clear: '清除选择' } }, dataView: { title: '数据视图', lang: ['数据视图', '关闭', '刷新'] }, dataZoom: { title: { zoom: '区域缩放', back: '区域缩放还原' } }, magicType: { title: { line: '切换为折线图', bar: '切换为柱状图', stack: '切换为堆叠', tiled: '切换为平铺' } }, restore: { title: '还原' }, saveAsImage: { title: '保存为图片', lang: ['右键另存为图片'] } }, series: { typeNames: { pie: '饼图', bar: '柱状图', line: '折线图', scatter: '散点图', effectScatter: '涟漪散点图', radar: '雷达图', tree: '树图', treemap: '矩形树图', boxplot: '箱型图', candlestick: 'K线图', k: 'K线图', heatmap: '热力图', map: '地图', parallel: '平行坐标图', lines: '线图', graph: '关系图', sankey: '桑基图', funnel: '漏斗图', gauge: '仪表盘图', pictorialBar: '象形柱图', themeRiver: '主题河流图', sunburst: '旭日图' } }, aria: { general: { withTitle: '这是一个关于“{title}”的图表。', withoutTitle: '这是一个图表,' }, series: { single: { prefix: '', withName: '图表类型是{seriesType},表示{seriesName}。', withoutName: '图表类型是{seriesType}。' }, multiple: { prefix: '它由{seriesCount}个图表系列组成。', withName: '第{seriesId}个系列是一个表示{seriesName}的{seriesType},', withoutName: '第{seriesId}个系列是一个{seriesType},', separator: { middle: ';', end: '。' } } }, data: { allData: '其数据是——', partialData: '其中,前{displayCnt}项是——', withName: '{name}的数据是{value}', withoutName: '{value}', separator: { middle: ',', end: '' } } } }; var LOCALE_ZH = 'ZH'; var LOCALE_EN = 'EN'; var DEFAULT_LOCALE = LOCALE_EN; var localeStorage = {}; var localeModels = {}; var SYSTEM_LANG = !env.domSupported ? DEFAULT_LOCALE : function () { var langStr = ( /* eslint-disable-next-line */ document.documentElement.lang || navigator.language || navigator.browserLanguage).toUpperCase(); return langStr.indexOf(LOCALE_ZH) > -1 ? LOCALE_ZH : DEFAULT_LOCALE; }(); function registerLocale(locale, localeObj) { locale = locale.toUpperCase(); localeModels[locale] = new Model(localeObj); localeStorage[locale] = localeObj; } // export function getLocale(locale: string) { // return localeStorage[locale]; // } function createLocaleObject(locale) { if (isString(locale)) { var localeObj = localeStorage[locale.toUpperCase()] || {}; if (locale === LOCALE_ZH || locale === LOCALE_EN) { return clone(localeObj); } else { return merge(clone(localeObj), clone(localeStorage[DEFAULT_LOCALE]), false); } } else { return merge(clone(locale), clone(localeStorage[DEFAULT_LOCALE]), false); } } function getLocaleModel(lang) { return localeModels[lang]; } function getDefaultLocaleModel() { return localeModels[DEFAULT_LOCALE]; } // Default locale registerLocale(LOCALE_EN, langEN); registerLocale(LOCALE_ZH, langZH); var ONE_SECOND = 1000; var ONE_MINUTE = ONE_SECOND * 60; var ONE_HOUR = ONE_MINUTE * 60; var ONE_DAY = ONE_HOUR * 24; var ONE_YEAR = ONE_DAY * 365; var defaultLeveledFormatter = { year: '{yyyy}', month: '{MMM}', day: '{d}', hour: '{HH}:{mm}', minute: '{HH}:{mm}', second: '{HH}:{mm}:{ss}', millisecond: '{hh}:{mm}:{ss} {SSS}', none: '{yyyy}-{MM}-{dd} {hh}:{mm}:{ss} {SSS}' }; var fullDayFormatter = '{yyyy}-{MM}-{dd}'; var fullLeveledFormatter = { year: '{yyyy}', month: '{yyyy}-{MM}', day: fullDayFormatter, hour: fullDayFormatter + ' ' + defaultLeveledFormatter.hour, minute: fullDayFormatter + ' ' + defaultLeveledFormatter.minute, second: fullDayFormatter + ' ' + defaultLeveledFormatter.second, millisecond: defaultLeveledFormatter.none }; var primaryTimeUnits = ['year', 'month', 'day', 'hour', 'minute', 'second', 'millisecond']; var timeUnits = ['year', 'half-year', 'quarter', 'month', 'week', 'half-week', 'day', 'half-day', 'quarter-day', 'hour', 'minute', 'second', 'millisecond']; function pad(str, len) { str += ''; return '0000'.substr(0, len - str.length) + str; } function getPrimaryTimeUnit(timeUnit) { switch (timeUnit) { case 'half-year': case 'quarter': return 'month'; case 'week': case 'half-week': return 'day'; case 'half-day': case 'quarter-day': return 'hour'; default: // year, minutes, second, milliseconds return timeUnit; } } function isPrimaryTimeUnit(timeUnit) { return timeUnit === getPrimaryTimeUnit(timeUnit); } function getDefaultFormatPrecisionOfInterval(timeUnit) { switch (timeUnit) { case 'year': case 'month': return 'day'; case 'millisecond': return 'millisecond'; default: // Also for day, hour, minute, second return 'second'; } } function format( // Note: The result based on `isUTC` are totally different, which can not be just simply // substituted by the result without `isUTC`. So we make the param `isUTC` mandatory. time, template, isUTC, lang) { var date = parseDate(time); var y = date[fullYearGetterName(isUTC)](); var M = date[monthGetterName(isUTC)]() + 1; var q = Math.floor((M - 1) / 4) + 1; var d = date[dateGetterName(isUTC)](); var e = date['get' + (isUTC ? 'UTC' : '') + 'Day'](); var H = date[hoursGetterName(isUTC)](); var h = (H - 1) % 12 + 1; var m = date[minutesGetterName(isUTC)](); var s = date[secondsGetterName(isUTC)](); var S = date[millisecondsGetterName(isUTC)](); var localeModel = lang instanceof Model ? lang : getLocaleModel(lang || SYSTEM_LANG) || getDefaultLocaleModel(); var timeModel = localeModel.getModel('time'); var month = timeModel.get('month'); var monthAbbr = timeModel.get('monthAbbr'); var dayOfWeek = timeModel.get('dayOfWeek'); var dayOfWeekAbbr = timeModel.get('dayOfWeekAbbr'); return (template || '').replace(/{yyyy}/g, y + '').replace(/{yy}/g, y % 100 + '').replace(/{Q}/g, q + '').replace(/{MMMM}/g, month[M - 1]).replace(/{MMM}/g, monthAbbr[M - 1]).replace(/{MM}/g, pad(M, 2)).replace(/{M}/g, M + '').replace(/{dd}/g, pad(d, 2)).replace(/{d}/g, d + '').replace(/{eeee}/g, dayOfWeek[e]).replace(/{ee}/g, dayOfWeekAbbr[e]).replace(/{e}/g, e + '').replace(/{HH}/g, pad(H, 2)).replace(/{H}/g, H + '').replace(/{hh}/g, pad(h + '', 2)).replace(/{h}/g, h + '').replace(/{mm}/g, pad(m, 2)).replace(/{m}/g, m + '').replace(/{ss}/g, pad(s, 2)).replace(/{s}/g, s + '').replace(/{SSS}/g, pad(S, 3)).replace(/{S}/g, S + ''); } function leveledFormat(tick, idx, formatter, lang, isUTC) { var template = null; if (typeof formatter === 'string') { // Single formatter for all units at all levels template = formatter; } else if (typeof formatter === 'function') { // Callback formatter template = formatter(tick.value, idx, { level: tick.level }); } else { var defaults$1 = extend({}, defaultLeveledFormatter); if (tick.level > 0) { for (var i = 0; i < primaryTimeUnits.length; ++i) { defaults$1[primaryTimeUnits[i]] = "{primary|" + defaults$1[primaryTimeUnits[i]] + "}"; } } var mergedFormatter = formatter ? formatter.inherit === false ? formatter // Use formatter with bigger units : defaults(formatter, defaults$1) : defaults$1; var unit = getUnitFromValue(tick.value, isUTC); if (mergedFormatter[unit]) { template = mergedFormatter[unit]; } else if (mergedFormatter.inherit) { // Unit formatter is not defined and should inherit from bigger units var targetId = timeUnits.indexOf(unit); for (var i = targetId - 1; i >= 0; --i) { if (mergedFormatter[unit]) { template = mergedFormatter[unit]; break; } } template = template || defaults$1.none; } if (isArray(template)) { var levelId = tick.level == null ? 0 : tick.level >= 0 ? tick.level : template.length + tick.level; levelId = Math.min(levelId, template.length - 1); template = template[levelId]; } } return format(new Date(tick.value), template, isUTC, lang); } function getUnitFromValue(value, isUTC) { var date = parseDate(value); var M = date[monthGetterName(isUTC)]() + 1; var d = date[dateGetterName(isUTC)](); var h = date[hoursGetterName(isUTC)](); var m = date[minutesGetterName(isUTC)](); var s = date[secondsGetterName(isUTC)](); var S = date[millisecondsGetterName(isUTC)](); var isSecond = S === 0; var isMinute = isSecond && s === 0; var isHour = isMinute && m === 0; var isDay = isHour && h === 0; var isMonth = isDay && d === 1; var isYear = isMonth && M === 1; if (isYear) { return 'year'; } else if (isMonth) { return 'month'; } else if (isDay) { return 'day'; } else if (isHour) { return 'hour'; } else if (isMinute) { return 'minute'; } else if (isSecond) { return 'second'; } else { return 'millisecond'; } } function getUnitValue(value, unit, isUTC) { var date = typeof value === 'number' ? parseDate(value) : value; unit = unit || getUnitFromValue(value, isUTC); switch (unit) { case 'year': return date[fullYearGetterName(isUTC)](); case 'half-year': return date[monthGetterName(isUTC)]() >= 6 ? 1 : 0; case 'quarter': return Math.floor((date[monthGetterName(isUTC)]() + 1) / 4); case 'month': return date[monthGetterName(isUTC)](); case 'day': return date[dateGetterName(isUTC)](); case 'half-day': return date[hoursGetterName(isUTC)]() / 24; case 'hour': return date[hoursGetterName(isUTC)](); case 'minute': return date[minutesGetterName(isUTC)](); case 'second': return date[secondsGetterName(isUTC)](); case 'millisecond': return date[millisecondsGetterName(isUTC)](); } } function fullYearGetterName(isUTC) { return isUTC ? 'getUTCFullYear' : 'getFullYear'; } function monthGetterName(isUTC) { return isUTC ? 'getUTCMonth' : 'getMonth'; } function dateGetterName(isUTC) { return isUTC ? 'getUTCDate' : 'getDate'; } function hoursGetterName(isUTC) { return isUTC ? 'getUTCHours' : 'getHours'; } function minutesGetterName(isUTC) { return isUTC ? 'getUTCMinutes' : 'getMinutes'; } function secondsGetterName(isUTC) { return isUTC ? 'getUTCSeconds' : 'getSeconds'; } function millisecondsGetterName(isUTC) { return isUTC ? 'getUTCSeconds' : 'getSeconds'; } function fullYearSetterName(isUTC) { return isUTC ? 'setUTCFullYear' : 'setFullYear'; } function monthSetterName(isUTC) { return isUTC ? 'setUTCMonth' : 'setMonth'; } function dateSetterName(isUTC) { return isUTC ? 'setUTCDate' : 'setDate'; } function hoursSetterName(isUTC) { return isUTC ? 'setUTCHours' : 'setHours'; } function minutesSetterName(isUTC) { return isUTC ? 'setUTCMinutes' : 'setMinutes'; } function secondsSetterName(isUTC) { return isUTC ? 'setUTCSeconds' : 'setSeconds'; } function millisecondsSetterName(isUTC) { return isUTC ? 'setUTCSeconds' : 'setSeconds'; } function getTextRect(text, font, align, verticalAlign, padding, rich, truncate, lineHeight) { deprecateLog('getTextRect is deprecated.'); var textEl = new ZRText({ style: { text: text, font: font, align: align, verticalAlign: verticalAlign, padding: padding, rich: rich, overflow: truncate ? 'truncate' : null, lineHeight: lineHeight } }); return textEl.getBoundingRect(); } /** * Add a comma each three digit. */ function addCommas(x) { if (!isNumeric(x)) { return isString(x) ? x : '-'; } var parts = (x + '').split('.'); return parts[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, '$1,') + (parts.length > 1 ? '.' + parts[1] : ''); } function toCamelCase(str, upperCaseFirst) { str = (str || '').toLowerCase().replace(/-(.)/g, function (match, group1) { return group1.toUpperCase(); }); if (upperCaseFirst && str) { str = str.charAt(0).toUpperCase() + str.slice(1); } return str; } var normalizeCssArray$1 = normalizeCssArray; var replaceReg = /([&<>"'])/g; var replaceMap = { '&': '&', '<': '<', '>': '>', '"': '"', '\'': ''' }; function encodeHTML(source) { return source == null ? '' : (source + '').replace(replaceReg, function (str, c) { return replaceMap[c]; }); } /** * Make value user readable for tooltip and label. * "User readable": * Try to not print programmer-specific text like NaN, Infinity, null, undefined. * Avoid to display an empty string, which users can not recognize there is * a value and it might look like a bug. */ function makeValueReadable(value, valueType, useUTC) { var USER_READABLE_DEFUALT_TIME_PATTERN = '{yyyy}-{MM}-{dd} {hh}:{mm}:{ss}'; function stringToUserReadable(str) { return str && trim(str) ? str : '-'; } function isNumberUserReadable(num) { return !!(num != null && !isNaN(num) && isFinite(num)); } var isTypeTime = valueType === 'time'; var isValueDate = value instanceof Date; if (isTypeTime || isValueDate) { var date = isTypeTime ? parseDate(value) : value; if (!isNaN(+date)) { return format(date, USER_READABLE_DEFUALT_TIME_PATTERN, useUTC); } else if (isValueDate) { return '-'; } // In other cases, continue to try to display the value in the following code. } if (valueType === 'ordinal') { return isStringSafe(value) ? stringToUserReadable(value) : isNumber(value) ? isNumberUserReadable(value) ? value + '' : '-' : '-'; } // By default. var numericResult = numericToNumber(value); return isNumberUserReadable(numericResult) ? addCommas(numericResult) : isStringSafe(value) ? stringToUserReadable(value) : '-'; } var TPL_VAR_ALIAS = ['a', 'b', 'c', 'd', 'e', 'f', 'g']; var wrapVar = function (varName, seriesIdx) { return '{' + varName + (seriesIdx == null ? '' : seriesIdx) + '}'; }; /** * Template formatter * @param {Array.|Object} paramsList */ function formatTpl(tpl, paramsList, encode) { if (!isArray(paramsList)) { paramsList = [paramsList]; } var seriesLen = paramsList.length; if (!seriesLen) { return ''; } var $vars = paramsList[0].$vars || []; for (var i = 0; i < $vars.length; i++) { var alias = TPL_VAR_ALIAS[i]; tpl = tpl.replace(wrapVar(alias), wrapVar(alias, 0)); } for (var seriesIdx = 0; seriesIdx < seriesLen; seriesIdx++) { for (var k = 0; k < $vars.length; k++) { var val = paramsList[seriesIdx][$vars[k]]; tpl = tpl.replace(wrapVar(TPL_VAR_ALIAS[k], seriesIdx), encode ? encodeHTML(val) : val); } } return tpl; } /** * simple Template formatter */ function formatTplSimple(tpl, param, encode) { each(param, function (value, key) { tpl = tpl.replace('{' + key + '}', encode ? encodeHTML(value) : value); }); return tpl; } function getTooltipMarker(inOpt, extraCssText) { var opt = isString(inOpt) ? { color: inOpt, extraCssText: extraCssText } : inOpt || {}; var color = opt.color; var type = opt.type; extraCssText = opt.extraCssText; var renderMode = opt.renderMode || 'html'; if (!color) { return ''; } if (renderMode === 'html') { return type === 'subItem' ? '' : ''; } else { // Should better not to auto generate style name by auto-increment number here. // Because this util is usually called in tooltip formatter, which is probably // called repeatly when mouse move and the auto-increment number increases fast. // Users can make their own style name by theirselves, make it unique and readable. var markerId = opt.markerId || 'markerX'; return { renderMode: renderMode, content: '{' + markerId + '|} ', style: type === 'subItem' ? { width: 4, height: 4, borderRadius: 2, backgroundColor: color } : { width: 10, height: 10, borderRadius: 5, backgroundColor: color } }; } } /** * @deprecated Use `time/format` instead. * ISO Date format * @param {string} tpl * @param {number} value * @param {boolean} [isUTC=false] Default in local time. * see `module:echarts/scale/Time` * and `module:echarts/util/number#parseDate`. * @inner */ function formatTime(tpl, value, isUTC) { if ("development" !== 'production') { deprecateReplaceLog('echarts.format.formatTime', 'echarts.time.format'); } if (tpl === 'week' || tpl === 'month' || tpl === 'quarter' || tpl === 'half-year' || tpl === 'year') { tpl = 'MM-dd\nyyyy'; } var date = parseDate(value); var utc = isUTC ? 'UTC' : ''; var y = date['get' + utc + 'FullYear'](); var M = date['get' + utc + 'Month']() + 1; var d = date['get' + utc + 'Date'](); var h = date['get' + utc + 'Hours'](); var m = date['get' + utc + 'Minutes'](); var s = date['get' + utc + 'Seconds'](); var S = date['get' + utc + 'Milliseconds'](); tpl = tpl.replace('MM', pad(M, 2)).replace('M', M).replace('yyyy', y).replace('yy', y % 100 + '').replace('dd', pad(d, 2)).replace('d', d).replace('hh', pad(h, 2)).replace('h', h).replace('mm', pad(m, 2)).replace('m', m).replace('ss', pad(s, 2)).replace('s', s).replace('SSS', pad(S, 3)); return tpl; } /** * Capital first * @param {string} str * @return {string} */ function capitalFirst(str) { return str ? str.charAt(0).toUpperCase() + str.substr(1) : str; } /** * @return Never be null/undefined. */ function convertToColorString(color, defaultColor) { defaultColor = defaultColor || 'transparent'; return isString(color) ? color : isObject(color) ? color.colorStops && (color.colorStops[0] || {}).color || defaultColor : defaultColor; } /** * open new tab * @param link url * @param target blank or self */ function windowOpen(link, target) { /* global window */ if (target === '_blank' || target === 'blank') { var blank = window.open(); blank.opener = null; blank.location.href = link; } else { window.open(link, target); } } var each$1 = each; /** * @public */ var LOCATION_PARAMS = ['left', 'right', 'top', 'bottom', 'width', 'height']; /** * @public */ var HV_NAMES = [['width', 'left', 'right'], ['height', 'top', 'bottom']]; function boxLayout(orient, group, gap, maxWidth, maxHeight) { var x = 0; var y = 0; if (maxWidth == null) { maxWidth = Infinity; } if (maxHeight == null) { maxHeight = Infinity; } var currentLineMaxSize = 0; group.eachChild(function (child, idx) { var rect = child.getBoundingRect(); var nextChild = group.childAt(idx + 1); var nextChildRect = nextChild && nextChild.getBoundingRect(); var nextX; var nextY; if (orient === 'horizontal') { var moveX = rect.width + (nextChildRect ? -nextChildRect.x + rect.x : 0); nextX = x + moveX; // Wrap when width exceeds maxWidth or meet a `newline` group // FIXME compare before adding gap? if (nextX > maxWidth || child.newline) { x = 0; nextX = moveX; y += currentLineMaxSize + gap; currentLineMaxSize = rect.height; } else { // FIXME: consider rect.y is not `0`? currentLineMaxSize = Math.max(currentLineMaxSize, rect.height); } } else { var moveY = rect.height + (nextChildRect ? -nextChildRect.y + rect.y : 0); nextY = y + moveY; // Wrap when width exceeds maxHeight or meet a `newline` group if (nextY > maxHeight || child.newline) { x += currentLineMaxSize + gap; y = 0; nextY = moveY; currentLineMaxSize = rect.width; } else { currentLineMaxSize = Math.max(currentLineMaxSize, rect.width); } } if (child.newline) { return; } child.x = x; child.y = y; child.markRedraw(); orient === 'horizontal' ? x = nextX + gap : y = nextY + gap; }); } /** * VBox or HBox layouting * @param {string} orient * @param {module:zrender/graphic/Group} group * @param {number} gap * @param {number} [width=Infinity] * @param {number} [height=Infinity] */ var box = boxLayout; /** * VBox layouting * @param {module:zrender/graphic/Group} group * @param {number} gap * @param {number} [width=Infinity] * @param {number} [height=Infinity] */ var vbox = curry(boxLayout, 'vertical'); /** * HBox layouting * @param {module:zrender/graphic/Group} group * @param {number} gap * @param {number} [width=Infinity] * @param {number} [height=Infinity] */ var hbox = curry(boxLayout, 'horizontal'); /** * If x or x2 is not specified or 'center' 'left' 'right', * the width would be as long as possible. * If y or y2 is not specified or 'middle' 'top' 'bottom', * the height would be as long as possible. */ function getAvailableSize(positionInfo, containerRect, margin) { var containerWidth = containerRect.width; var containerHeight = containerRect.height; var x = parsePercent$1(positionInfo.left, containerWidth); var y = parsePercent$1(positionInfo.top, containerHeight); var x2 = parsePercent$1(positionInfo.right, containerWidth); var y2 = parsePercent$1(positionInfo.bottom, containerHeight); (isNaN(x) || isNaN(parseFloat(positionInfo.left))) && (x = 0); (isNaN(x2) || isNaN(parseFloat(positionInfo.right))) && (x2 = containerWidth); (isNaN(y) || isNaN(parseFloat(positionInfo.top))) && (y = 0); (isNaN(y2) || isNaN(parseFloat(positionInfo.bottom))) && (y2 = containerHeight); margin = normalizeCssArray$1(margin || 0); return { width: Math.max(x2 - x - margin[1] - margin[3], 0), height: Math.max(y2 - y - margin[0] - margin[2], 0) }; } /** * Parse position info. */ function getLayoutRect(positionInfo, containerRect, margin) { margin = normalizeCssArray$1(margin || 0); var containerWidth = containerRect.width; var containerHeight = containerRect.height; var left = parsePercent$1(positionInfo.left, containerWidth); var top = parsePercent$1(positionInfo.top, containerHeight); var right = parsePercent$1(positionInfo.right, containerWidth); var bottom = parsePercent$1(positionInfo.bottom, containerHeight); var width = parsePercent$1(positionInfo.width, containerWidth); var height = parsePercent$1(positionInfo.height, containerHeight); var verticalMargin = margin[2] + margin[0]; var horizontalMargin = margin[1] + margin[3]; var aspect = positionInfo.aspect; // If width is not specified, calculate width from left and right if (isNaN(width)) { width = containerWidth - right - horizontalMargin - left; } if (isNaN(height)) { height = containerHeight - bottom - verticalMargin - top; } if (aspect != null) { // If width and height are not given // 1. Graph should not exceeds the container // 2. Aspect must be keeped // 3. Graph should take the space as more as possible // FIXME // Margin is not considered, because there is no case that both // using margin and aspect so far. if (isNaN(width) && isNaN(height)) { if (aspect > containerWidth / containerHeight) { width = containerWidth * 0.8; } else { height = containerHeight * 0.8; } } // Calculate width or height with given aspect if (isNaN(width)) { width = aspect * height; } if (isNaN(height)) { height = width / aspect; } } // If left is not specified, calculate left from right and width if (isNaN(left)) { left = containerWidth - right - width - horizontalMargin; } if (isNaN(top)) { top = containerHeight - bottom - height - verticalMargin; } // Align left and top switch (positionInfo.left || positionInfo.right) { case 'center': left = containerWidth / 2 - width / 2 - margin[3]; break; case 'right': left = containerWidth - width - horizontalMargin; break; } switch (positionInfo.top || positionInfo.bottom) { case 'middle': case 'center': top = containerHeight / 2 - height / 2 - margin[0]; break; case 'bottom': top = containerHeight - height - verticalMargin; break; } // If something is wrong and left, top, width, height are calculated as NaN left = left || 0; top = top || 0; if (isNaN(width)) { // Width may be NaN if only one value is given except width width = containerWidth - horizontalMargin - left - (right || 0); } if (isNaN(height)) { // Height may be NaN if only one value is given except height height = containerHeight - verticalMargin - top - (bottom || 0); } var rect = new BoundingRect(left + margin[3], top + margin[0], width, height); rect.margin = margin; return rect; } /** * Position a zr element in viewport * Group position is specified by either * {left, top}, {right, bottom} * If all properties exists, right and bottom will be igonred. * * Logic: * 1. Scale (against origin point in parent coord) * 2. Rotate (against origin point in parent coord) * 3. Traslate (with el.position by this method) * So this method only fixes the last step 'Traslate', which does not affect * scaling and rotating. * * If be called repeatly with the same input el, the same result will be gotten. * * @param el Should have `getBoundingRect` method. * @param positionInfo * @param positionInfo.left * @param positionInfo.top * @param positionInfo.right * @param positionInfo.bottom * @param positionInfo.width Only for opt.boundingModel: 'raw' * @param positionInfo.height Only for opt.boundingModel: 'raw' * @param containerRect * @param margin * @param opt * @param opt.hv Only horizontal or only vertical. Default to be [1, 1] * @param opt.boundingMode * Specify how to calculate boundingRect when locating. * 'all': Position the boundingRect that is transformed and uioned * both itself and its descendants. * This mode simplies confine the elements in the bounding * of their container (e.g., using 'right: 0'). * 'raw': Position the boundingRect that is not transformed and only itself. * This mode is useful when you want a element can overflow its * container. (Consider a rotated circle needs to be located in a corner.) * In this mode positionInfo.width/height can only be number. */ function positionElement(el, positionInfo, containerRect, margin, opt) { var h = !opt || !opt.hv || opt.hv[0]; var v = !opt || !opt.hv || opt.hv[1]; var boundingMode = opt && opt.boundingMode || 'all'; if (!h && !v) { return; } var rect; if (boundingMode === 'raw') { rect = el.type === 'group' ? new BoundingRect(0, 0, +positionInfo.width || 0, +positionInfo.height || 0) : el.getBoundingRect(); } else { rect = el.getBoundingRect(); if (el.needLocalTransform()) { var transform = el.getLocalTransform(); // Notice: raw rect may be inner object of el, // which should not be modified. rect = rect.clone(); rect.applyTransform(transform); } } // The real width and height can not be specified but calculated by the given el. var layoutRect = getLayoutRect(defaults({ width: rect.width, height: rect.height }, positionInfo), containerRect, margin); // Because 'tranlate' is the last step in transform // (see zrender/core/Transformable#getLocalTransform), // we can just only modify el.position to get final result. var dx = h ? layoutRect.x - rect.x : 0; var dy = v ? layoutRect.y - rect.y : 0; if (boundingMode === 'raw') { el.x = dx; el.y = dy; } else { el.x += dx; el.y += dy; } el.markRedraw(); } /** * @param option Contains some of the properties in HV_NAMES. * @param hvIdx 0: horizontal; 1: vertical. */ function sizeCalculable(option, hvIdx) { return option[HV_NAMES[hvIdx][0]] != null || option[HV_NAMES[hvIdx][1]] != null && option[HV_NAMES[hvIdx][2]] != null; } function fetchLayoutMode(ins) { var layoutMode = ins.layoutMode || ins.constructor.layoutMode; return isObject(layoutMode) ? layoutMode : layoutMode ? { type: layoutMode } : null; } /** * Consider Case: * When default option has {left: 0, width: 100}, and we set {right: 0} * through setOption or media query, using normal zrUtil.merge will cause * {right: 0} does not take effect. * * @example * ComponentModel.extend({ * init: function () { * ... * let inputPositionParams = layout.getLayoutParams(option); * this.mergeOption(inputPositionParams); * }, * mergeOption: function (newOption) { * newOption && zrUtil.merge(thisOption, newOption, true); * layout.mergeLayoutParam(thisOption, newOption); * } * }); * * @param targetOption * @param newOption * @param opt */ function mergeLayoutParam(targetOption, newOption, opt) { var ignoreSize = opt && opt.ignoreSize; !isArray(ignoreSize) && (ignoreSize = [ignoreSize, ignoreSize]); var hResult = merge(HV_NAMES[0], 0); var vResult = merge(HV_NAMES[1], 1); copy(HV_NAMES[0], targetOption, hResult); copy(HV_NAMES[1], targetOption, vResult); function merge(names, hvIdx) { var newParams = {}; var newValueCount = 0; var merged = {}; var mergedValueCount = 0; var enoughParamNumber = 2; each$1(names, function (name) { merged[name] = targetOption[name]; }); each$1(names, function (name) { // Consider case: newOption.width is null, which is // set by user for removing width setting. hasProp(newOption, name) && (newParams[name] = merged[name] = newOption[name]); hasValue(newParams, name) && newValueCount++; hasValue(merged, name) && mergedValueCount++; }); if (ignoreSize[hvIdx]) { // Only one of left/right is premitted to exist. if (hasValue(newOption, names[1])) { merged[names[2]] = null; } else if (hasValue(newOption, names[2])) { merged[names[1]] = null; } return merged; } // Case: newOption: {width: ..., right: ...}, // or targetOption: {right: ...} and newOption: {width: ...}, // There is no conflict when merged only has params count // little than enoughParamNumber. if (mergedValueCount === enoughParamNumber || !newValueCount) { return merged; } // Case: newOption: {width: ..., right: ...}, // Than we can make sure user only want those two, and ignore // all origin params in targetOption. else if (newValueCount >= enoughParamNumber) { return newParams; } else { // Chose another param from targetOption by priority. for (var i = 0; i < names.length; i++) { var name_1 = names[i]; if (!hasProp(newParams, name_1) && hasProp(targetOption, name_1)) { newParams[name_1] = targetOption[name_1]; break; } } return newParams; } } function hasProp(obj, name) { return obj.hasOwnProperty(name); } function hasValue(obj, name) { return obj[name] != null && obj[name] !== 'auto'; } function copy(names, target, source) { each$1(names, function (name) { target[name] = source[name]; }); } } /** * Retrieve 'left', 'right', 'top', 'bottom', 'width', 'height' from object. */ function getLayoutParams(source) { return copyLayoutParams({}, source); } /** * Retrieve 'left', 'right', 'top', 'bottom', 'width', 'height' from object. * @param {Object} source * @return {Object} Result contains those props. */ function copyLayoutParams(target, source) { source && target && each$1(LOCATION_PARAMS, function (name) { source.hasOwnProperty(name) && (target[name] = source[name]); }); return target; } var inner = makeInner(); var ComponentModel = /** @class */ function (_super) { __extends(ComponentModel, _super); function ComponentModel(option, parentModel, ecModel) { var _this = _super.call(this, option, parentModel, ecModel) || this; _this.uid = getUID('ec_cpt_model'); return _this; } ComponentModel.prototype.init = function (option, parentModel, ecModel) { this.mergeDefaultAndTheme(option, ecModel); }; ComponentModel.prototype.mergeDefaultAndTheme = function (option, ecModel) { var layoutMode = fetchLayoutMode(this); var inputPositionParams = layoutMode ? getLayoutParams(option) : {}; var themeModel = ecModel.getTheme(); merge(option, themeModel.get(this.mainType)); merge(option, this.getDefaultOption()); if (layoutMode) { mergeLayoutParam(option, inputPositionParams, layoutMode); } }; ComponentModel.prototype.mergeOption = function (option, ecModel) { merge(this.option, option, true); var layoutMode = fetchLayoutMode(this); if (layoutMode) { mergeLayoutParam(this.option, option, layoutMode); } }; /** * Called immediately after `init` or `mergeOption` of this instance called. */ ComponentModel.prototype.optionUpdated = function (newCptOption, isInit) {}; /** * [How to declare defaultOption]: * * (A) If using class declaration in typescript (since echarts 5): * ```ts * import {ComponentOption} from '../model/option'; * export interface XxxOption extends ComponentOption { * aaa: number * } * export class XxxModel extends Component { * static type = 'xxx'; * static defaultOption: XxxOption = { * aaa: 123 * } * } * Component.registerClass(XxxModel); * ``` * ```ts * import {inheritDefaultOption} from '../util/component'; * import {XxxModel, XxxOption} from './XxxModel'; * export interface XxxSubOption extends XxxOption { * bbb: number * } * class XxxSubModel extends XxxModel { * static defaultOption: XxxSubOption = inheritDefaultOption(XxxModel.defaultOption, { * bbb: 456 * }) * fn() { * let opt = this.getDefaultOption(); * // opt is {aaa: 123, bbb: 456} * } * } * ``` * * (B) If using class extend (previous approach in echarts 3 & 4): * ```js * let XxxComponent = Component.extend({ * defaultOption: { * xx: 123 * } * }) * ``` * ```js * let XxxSubComponent = XxxComponent.extend({ * defaultOption: { * yy: 456 * }, * fn: function () { * let opt = this.getDefaultOption(); * // opt is {xx: 123, yy: 456} * } * }) * ``` */ ComponentModel.prototype.getDefaultOption = function () { var ctor = this.constructor; // If using class declaration, it is different to travel super class // in legacy env and auto merge defaultOption. So if using class // declaration, defaultOption should be merged manually. if (!isExtendedClass(ctor)) { // When using ts class, defaultOption must be declared as static. return ctor.defaultOption; } // FIXME: remove this approach? var fields = inner(this); if (!fields.defaultOption) { var optList = []; var clz = ctor; while (clz) { var opt = clz.prototype.defaultOption; opt && optList.push(opt); clz = clz.superClass; } var defaultOption = {}; for (var i = optList.length - 1; i >= 0; i--) { defaultOption = merge(defaultOption, optList[i], true); } fields.defaultOption = defaultOption; } return fields.defaultOption; }; /** * Notice: always force to input param `useDefault` in case that forget to consider it. * The same behavior as `modelUtil.parseFinder`. * * @param useDefault In many cases like series refer axis and axis refer grid, * If axis index / axis id not specified, use the first target as default. * In other cases like dataZoom refer axis, if not specified, measn no refer. */ ComponentModel.prototype.getReferringComponents = function (mainType, opt) { var indexKey = mainType + 'Index'; var idKey = mainType + 'Id'; return queryReferringComponents(this.ecModel, mainType, { index: this.get(indexKey, true), id: this.get(idKey, true) }, opt); }; ComponentModel.prototype.getBoxLayoutParams = function () { // Consider itself having box layout configs. var boxLayoutModel = this; return { left: boxLayoutModel.get('left'), top: boxLayoutModel.get('top'), right: boxLayoutModel.get('right'), bottom: boxLayoutModel.get('bottom'), width: boxLayoutModel.get('width'), height: boxLayoutModel.get('height') }; }; ComponentModel.protoInitialize = function () { var proto = ComponentModel.prototype; proto.type = 'component'; proto.id = ''; proto.name = ''; proto.mainType = ''; proto.subType = ''; proto.componentIndex = 0; }(); return ComponentModel; }(Model); mountExtend(ComponentModel, Model); enableClassManagement(ComponentModel); enableSubTypeDefaulter(ComponentModel); enableTopologicalTravel(ComponentModel, getDependencies); function getDependencies(componentType) { var deps = []; each(ComponentModel.getClassesByMainType(componentType), function (clz) { deps = deps.concat(clz.dependencies || clz.prototype.dependencies || []); }); // Ensure main type. deps = map(deps, function (type) { return parseClassType(type).main; }); // Hack dataset for convenience. if (componentType !== 'dataset' && indexOf(deps, 'dataset') <= 0) { deps.unshift('dataset'); } return deps; } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ var platform = ''; // Navigator not exists in node if (typeof navigator !== 'undefined') { /* global navigator */ platform = navigator.platform || ''; } var decalColor = 'rgba(0, 0, 0, 0.2)'; var globalDefault = { darkMode: 'auto', // backgroundColor: 'rgba(0,0,0,0)', // https://dribbble.com/shots/1065960-Infographic-Pie-chart-visualization // color: ['#5793f3', '#d14a61', '#fd9c35', '#675bba', '#fec42c', '#dd4444', '#d4df5a', '#cd4870'], // Light colors: // color: ['#bcd3bb', '#e88f70', '#edc1a5', '#9dc5c8', '#e1e8c8', '#7b7c68', '#e5b5b5', '#f0b489', '#928ea8', '#bda29a'], // color: ['#cc5664', '#9bd6ec', '#ea946e', '#8acaaa', '#f1ec64', '#ee8686', '#a48dc1', '#5da6bc', '#b9dcae'], // Dark colors: // color: [ // '#c23531', '#2f4554', '#61a0a8', '#d48265', '#91c7ae', '#749f83', // '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3' // ], color: [// '#51689b', '#ce5c5c', '#fbc357', '#8fbf8f', '#659d84', '#fb8e6a', '#c77288', '#786090', '#91c4c5', '#6890ba' '#5470c6', '#91cc75', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc'], gradientColor: ['#f6efa6', '#d88273', '#bf444c'], aria: { decal: { decals: [{ color: decalColor, dashArrayX: [1, 0], dashArrayY: [2, 5], symbolSize: 1, rotation: Math.PI / 6 }, { color: decalColor, symbol: 'circle', dashArrayX: [[8, 8], [0, 8, 8, 0]], dashArrayY: [6, 0], symbolSize: 0.8 }, { color: decalColor, dashArrayX: [1, 0], dashArrayY: [4, 3], rotation: -Math.PI / 4 }, { color: decalColor, dashArrayX: [[6, 6], [0, 6, 6, 0]], dashArrayY: [6, 0] }, { color: decalColor, dashArrayX: [[1, 0], [1, 6]], dashArrayY: [1, 0, 6, 0], rotation: Math.PI / 4 }, { color: decalColor, symbol: 'triangle', dashArrayX: [[9, 9], [0, 9, 9, 0]], dashArrayY: [7, 2], symbolSize: 0.75 }] } }, // If xAxis and yAxis declared, grid is created by default. // grid: {}, textStyle: { // color: '#000', // decoration: 'none', // PENDING fontFamily: platform.match(/^Win/) ? 'Microsoft YaHei' : 'sans-serif', // fontFamily: 'Arial, Verdana, sans-serif', fontSize: 12, fontStyle: 'normal', fontWeight: 'normal' }, // http://blogs.adobe.com/webplatform/2014/02/24/using-blend-modes-in-html-canvas/ // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation // Default is source-over blendMode: null, stateAnimation: { duration: 300, easing: 'cubicOut' }, animation: 'auto', animationDuration: 1000, animationDurationUpdate: 500, animationEasing: 'cubicInOut', animationEasingUpdate: 'cubicInOut', animationThreshold: 2000, // Configuration for progressive/incremental rendering progressiveThreshold: 3000, progressive: 400, // Threshold of if use single hover layer to optimize. // It is recommended that `hoverLayerThreshold` is equivalent to or less than // `progressiveThreshold`, otherwise hover will cause restart of progressive, // which is unexpected. // see example . hoverLayerThreshold: 3000, // See: module:echarts/scale/Time useUTC: false }; var VISUAL_DIMENSIONS = createHashMap(['tooltip', 'label', 'itemName', 'itemId', 'seriesName']); var SOURCE_FORMAT_ORIGINAL = 'original'; var SOURCE_FORMAT_ARRAY_ROWS = 'arrayRows'; var SOURCE_FORMAT_OBJECT_ROWS = 'objectRows'; var SOURCE_FORMAT_KEYED_COLUMNS = 'keyedColumns'; var SOURCE_FORMAT_TYPED_ARRAY = 'typedArray'; var SOURCE_FORMAT_UNKNOWN = 'unknown'; var SERIES_LAYOUT_BY_COLUMN = 'column'; var SERIES_LAYOUT_BY_ROW = 'row'; var BE_ORDINAL = { Must: 1, Might: 2, Not: 3 // Other cases }; var innerGlobalModel = makeInner(); /** * MUST be called before mergeOption of all series. */ function resetSourceDefaulter(ecModel) { // `datasetMap` is used to make default encode. innerGlobalModel(ecModel).datasetMap = createHashMap(); } /** * [The strategy of the arrengment of data dimensions for dataset]: * "value way": all axes are non-category axes. So series one by one take * several (the number is coordSysDims.length) dimensions from dataset. * The result of data arrengment of data dimensions like: * | ser0_x | ser0_y | ser1_x | ser1_y | ser2_x | ser2_y | * "category way": at least one axis is category axis. So the the first data * dimension is always mapped to the first category axis and shared by * all of the series. The other data dimensions are taken by series like * "value way" does. * The result of data arrengment of data dimensions like: * | ser_shared_x | ser0_y | ser1_y | ser2_y | * * @return encode Never be `null/undefined`. */ function makeSeriesEncodeForAxisCoordSys(coordDimensions, seriesModel, source) { var encode = {}; var datasetModel = querySeriesUpstreamDatasetModel(seriesModel); // Currently only make default when using dataset, util more reqirements occur. if (!datasetModel || !coordDimensions) { return encode; } var encodeItemName = []; var encodeSeriesName = []; var ecModel = seriesModel.ecModel; var datasetMap = innerGlobalModel(ecModel).datasetMap; var key = datasetModel.uid + '_' + source.seriesLayoutBy; var baseCategoryDimIndex; var categoryWayValueDimStart; coordDimensions = coordDimensions.slice(); each(coordDimensions, function (coordDimInfoLoose, coordDimIdx) { var coordDimInfo = isObject(coordDimInfoLoose) ? coordDimInfoLoose : coordDimensions[coordDimIdx] = { name: coordDimInfoLoose }; if (coordDimInfo.type === 'ordinal' && baseCategoryDimIndex == null) { baseCategoryDimIndex = coordDimIdx; categoryWayValueDimStart = getDataDimCountOnCoordDim(coordDimInfo); } encode[coordDimInfo.name] = []; }); var datasetRecord = datasetMap.get(key) || datasetMap.set(key, { categoryWayDim: categoryWayValueDimStart, valueWayDim: 0 }); // TODO // Auto detect first time axis and do arrangement. each(coordDimensions, function (coordDimInfo, coordDimIdx) { var coordDimName = coordDimInfo.name; var count = getDataDimCountOnCoordDim(coordDimInfo); // In value way. if (baseCategoryDimIndex == null) { var start = datasetRecord.valueWayDim; pushDim(encode[coordDimName], start, count); pushDim(encodeSeriesName, start, count); datasetRecord.valueWayDim += count; // ??? TODO give a better default series name rule? // especially when encode x y specified. // consider: when mutiple series share one dimension // category axis, series name should better use // the other dimsion name. On the other hand, use // both dimensions name. } // In category way, the first category axis. else if (baseCategoryDimIndex === coordDimIdx) { pushDim(encode[coordDimName], 0, count); pushDim(encodeItemName, 0, count); } // In category way, the other axis. else { var start = datasetRecord.categoryWayDim; pushDim(encode[coordDimName], start, count); pushDim(encodeSeriesName, start, count); datasetRecord.categoryWayDim += count; } }); function pushDim(dimIdxArr, idxFrom, idxCount) { for (var i = 0; i < idxCount; i++) { dimIdxArr.push(idxFrom + i); } } function getDataDimCountOnCoordDim(coordDimInfo) { var dimsDef = coordDimInfo.dimsDef; return dimsDef ? dimsDef.length : 1; } encodeItemName.length && (encode.itemName = encodeItemName); encodeSeriesName.length && (encode.seriesName = encodeSeriesName); return encode; } /** * Work for data like [{name: ..., value: ...}, ...]. * * @return encode Never be `null/undefined`. */ function makeSeriesEncodeForNameBased(seriesModel, source, dimCount) { var encode = {}; var datasetModel = querySeriesUpstreamDatasetModel(seriesModel); // Currently only make default when using dataset, util more reqirements occur. if (!datasetModel) { return encode; } var sourceFormat = source.sourceFormat; var dimensionsDefine = source.dimensionsDefine; var potentialNameDimIndex; if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS || sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) { each(dimensionsDefine, function (dim, idx) { if ((isObject(dim) ? dim.name : dim) === 'name') { potentialNameDimIndex = idx; } }); } var idxResult = function () { var idxRes0 = {}; var idxRes1 = {}; var guessRecords = []; // 5 is an experience value. for (var i = 0, len = Math.min(5, dimCount); i < len; i++) { var guessResult = doGuessOrdinal(source.data, sourceFormat, source.seriesLayoutBy, dimensionsDefine, source.startIndex, i); guessRecords.push(guessResult); var isPureNumber = guessResult === BE_ORDINAL.Not; // [Strategy of idxRes0]: find the first BE_ORDINAL.Not as the value dim, // and then find a name dim with the priority: // "BE_ORDINAL.Might|BE_ORDINAL.Must" > "other dim" > "the value dim itself". if (isPureNumber && idxRes0.v == null && i !== potentialNameDimIndex) { idxRes0.v = i; } if (idxRes0.n == null || idxRes0.n === idxRes0.v || !isPureNumber && guessRecords[idxRes0.n] === BE_ORDINAL.Not) { idxRes0.n = i; } if (fulfilled(idxRes0) && guessRecords[idxRes0.n] !== BE_ORDINAL.Not) { return idxRes0; } // [Strategy of idxRes1]: if idxRes0 not satisfied (that is, no BE_ORDINAL.Not), // find the first BE_ORDINAL.Might as the value dim, // and then find a name dim with the priority: // "other dim" > "the value dim itself". // That is for backward compat: number-like (e.g., `'3'`, `'55'`) can be // treated as number. if (!isPureNumber) { if (guessResult === BE_ORDINAL.Might && idxRes1.v == null && i !== potentialNameDimIndex) { idxRes1.v = i; } if (idxRes1.n == null || idxRes1.n === idxRes1.v) { idxRes1.n = i; } } } function fulfilled(idxResult) { return idxResult.v != null && idxResult.n != null; } return fulfilled(idxRes0) ? idxRes0 : fulfilled(idxRes1) ? idxRes1 : null; }(); if (idxResult) { encode.value = [idxResult.v]; // `potentialNameDimIndex` has highest priority. var nameDimIndex = potentialNameDimIndex != null ? potentialNameDimIndex : idxResult.n; // By default, label use itemName in charts. // So we dont set encodeLabel here. encode.itemName = [nameDimIndex]; encode.seriesName = [nameDimIndex]; } return encode; } /** * @return If return null/undefined, indicate that should not use datasetModel. */ function querySeriesUpstreamDatasetModel(seriesModel) { // Caution: consider the scenario: // A dataset is declared and a series is not expected to use the dataset, // and at the beginning `setOption({series: { noData })` (just prepare other // option but no data), then `setOption({series: {data: [...]}); In this case, // the user should set an empty array to avoid that dataset is used by default. var thisData = seriesModel.get('data', true); if (!thisData) { return queryReferringComponents(seriesModel.ecModel, 'dataset', { index: seriesModel.get('datasetIndex', true), id: seriesModel.get('datasetId', true) }, SINGLE_REFERRING).models[0]; } } /** * @return Always return an array event empty. */ function queryDatasetUpstreamDatasetModels(datasetModel) { // Only these attributes declared, we by defualt reference to `datasetIndex: 0`. // Otherwise, no reference. if (!datasetModel.get('transform', true) && !datasetModel.get('fromTransformResult', true)) { return []; } return queryReferringComponents(datasetModel.ecModel, 'dataset', { index: datasetModel.get('fromDatasetIndex', true), id: datasetModel.get('fromDatasetId', true) }, SINGLE_REFERRING).models; } /** * The rule should not be complex, otherwise user might not * be able to known where the data is wrong. * The code is ugly, but how to make it neat? */ function guessOrdinal(source, dimIndex) { return doGuessOrdinal(source.data, source.sourceFormat, source.seriesLayoutBy, source.dimensionsDefine, source.startIndex, dimIndex); } // dimIndex may be overflow source data. // return {BE_ORDINAL} function doGuessOrdinal(data, sourceFormat, seriesLayoutBy, dimensionsDefine, startIndex, dimIndex) { var result; // Experience value. var maxLoop = 5; if (isTypedArray(data)) { return BE_ORDINAL.Not; } // When sourceType is 'objectRows' or 'keyedColumns', dimensionsDefine // always exists in source. var dimName; var dimType; if (dimensionsDefine) { var dimDefItem = dimensionsDefine[dimIndex]; if (isObject(dimDefItem)) { dimName = dimDefItem.name; dimType = dimDefItem.type; } else if (isString(dimDefItem)) { dimName = dimDefItem; } } if (dimType != null) { return dimType === 'ordinal' ? BE_ORDINAL.Must : BE_ORDINAL.Not; } if (sourceFormat === SOURCE_FORMAT_ARRAY_ROWS) { var dataArrayRows = data; if (seriesLayoutBy === SERIES_LAYOUT_BY_ROW) { var sample = dataArrayRows[dimIndex]; for (var i = 0; i < (sample || []).length && i < maxLoop; i++) { if ((result = detectValue(sample[startIndex + i])) != null) { return result; } } } else { for (var i = 0; i < dataArrayRows.length && i < maxLoop; i++) { var row = dataArrayRows[startIndex + i]; if (row && (result = detectValue(row[dimIndex])) != null) { return result; } } } } else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) { var dataObjectRows = data; if (!dimName) { return BE_ORDINAL.Not; } for (var i = 0; i < dataObjectRows.length && i < maxLoop; i++) { var item = dataObjectRows[i]; if (item && (result = detectValue(item[dimName])) != null) { return result; } } } else if (sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) { var dataKeyedColumns = data; if (!dimName) { return BE_ORDINAL.Not; } var sample = dataKeyedColumns[dimName]; if (!sample || isTypedArray(sample)) { return BE_ORDINAL.Not; } for (var i = 0; i < sample.length && i < maxLoop; i++) { if ((result = detectValue(sample[i])) != null) { return result; } } } else if (sourceFormat === SOURCE_FORMAT_ORIGINAL) { var dataOriginal = data; for (var i = 0; i < dataOriginal.length && i < maxLoop; i++) { var item = dataOriginal[i]; var val = getDataItemValue(item); if (!isArray(val)) { return BE_ORDINAL.Not; } if ((result = detectValue(val[dimIndex])) != null) { return result; } } } function detectValue(val) { var beStr = isString(val); // Consider usage convenience, '1', '2' will be treated as "number". // `isFinit('')` get `true`. if (val != null && isFinite(val) && val !== '') { return beStr ? BE_ORDINAL.Might : BE_ORDINAL.Not; } else if (beStr && val !== '-') { return BE_ORDINAL.Must; } } return BE_ORDINAL.Not; } var internalOptionCreatorMap = createHashMap(); function registerInternalOptionCreator(mainType, creator) { assert(internalOptionCreatorMap.get(mainType) == null && creator); internalOptionCreatorMap.set(mainType, creator); } function concatInternalOptions(ecModel, mainType, newCmptOptionList) { var internalOptionCreator = internalOptionCreatorMap.get(mainType); if (!internalOptionCreator) { return newCmptOptionList; } var internalOptions = internalOptionCreator(ecModel); if (!internalOptions) { return newCmptOptionList; } if ("development" !== 'production') { for (var i = 0; i < internalOptions.length; i++) { assert(isComponentIdInternal(internalOptions[i])); } } return newCmptOptionList.concat(internalOptions); } var innerColor = makeInner(); var innerDecal = makeInner(); var PaletteMixin = /** @class */ function () { function PaletteMixin() {} PaletteMixin.prototype.getColorFromPalette = function (name, scope, requestNum) { var defaultPalette = normalizeToArray(this.get('color', true)); var layeredPalette = this.get('colorLayer', true); return getFromPalette(this, innerColor, defaultPalette, layeredPalette, name, scope, requestNum); }; PaletteMixin.prototype.clearColorPalette = function () { clearPalette(this, innerColor); }; return PaletteMixin; }(); function getDecalFromPalette(ecModel, name, scope, requestNum) { var defaultDecals = normalizeToArray(ecModel.get(['aria', 'decal', 'decals'])); return getFromPalette(ecModel, innerDecal, defaultDecals, null, name, scope, requestNum); } function getNearestPalette(palettes, requestColorNum) { var paletteNum = palettes.length; // TODO palettes must be in order for (var i = 0; i < paletteNum; i++) { if (palettes[i].length > requestColorNum) { return palettes[i]; } } return palettes[paletteNum - 1]; } /** * @param name MUST NOT be null/undefined. Otherwise call this function * twise with the same parameters will get different result. * @param scope default this. * @return Can be null/undefined */ function getFromPalette(that, inner, defaultPalette, layeredPalette, name, scope, requestNum) { scope = scope || that; var scopeFields = inner(scope); var paletteIdx = scopeFields.paletteIdx || 0; var paletteNameMap = scopeFields.paletteNameMap = scopeFields.paletteNameMap || {}; // Use `hasOwnProperty` to avoid conflict with Object.prototype. if (paletteNameMap.hasOwnProperty(name)) { return paletteNameMap[name]; } var palette = requestNum == null || !layeredPalette ? defaultPalette : getNearestPalette(layeredPalette, requestNum); // In case can't find in layered color palette. palette = palette || defaultPalette; if (!palette || !palette.length) { return; } var pickedPaletteItem = palette[paletteIdx]; if (name) { paletteNameMap[name] = pickedPaletteItem; } scopeFields.paletteIdx = (paletteIdx + 1) % palette.length; return pickedPaletteItem; } function clearPalette(that, inner) { inner(that).paletteIdx = 0; inner(that).paletteNameMap = {}; } // Internal method names: // ----------------------- var reCreateSeriesIndices; var assertSeriesInitialized; var initBase; var OPTION_INNER_KEY = '\0_ec_inner'; var OPTION_INNER_VALUE = 1; var BUITIN_COMPONENTS_MAP = { grid: 'GridComponent', polar: 'PolarComponent', geo: 'GeoComponent', singleAxis: 'SingleAxisComponent', parallel: 'ParallelComponent', calendar: 'CalendarComponent', graphic: 'GraphicComponent', toolbox: 'ToolboxComponent', tooltip: 'TooltipComponent', axisPointer: 'AxisPointerComponent', brush: 'BrushComponent', title: 'TitleComponent', timeline: 'TimelineComponent', markPoint: 'MarkPointComponent', markLine: 'MarkLineComponent', markArea: 'MarkAreaComponent', legend: 'LegendComponent', dataZoom: 'DataZoomComponent', visualMap: 'VisualMapComponent', // aria: 'AriaComponent', // dataset: 'DatasetComponent', // Dependencies xAxis: 'GridComponent', yAxis: 'GridComponent', angleAxis: 'PolarComponent', radiusAxis: 'PolarComponent' }; var BUILTIN_CHARTS_MAP = { line: 'LineChart', bar: 'BarChart', pie: 'PieChart', scatter: 'ScatterChart', radar: 'RadarChart', map: 'MapChart', tree: 'TreeChart', treemap: 'TreemapChart', graph: 'GraphChart', gauge: 'GaugeChart', funnel: 'FunnelChart', parallel: 'ParallelChart', sankey: 'SankeyChart', boxplot: 'BoxplotChart', candlestick: 'CandlestickChart', effectScatter: 'EffectScatterChart', lines: 'LinesChart', heatmap: 'HeatmapChart', pictorialBar: 'PictorialBarChart', themeRiver: 'ThemeRiverChart', sunburst: 'SunburstChart', custom: 'CustomChart' }; var componetsMissingLogPrinted = {}; var GlobalModel = /** @class */ function (_super) { __extends(GlobalModel, _super); function GlobalModel() { return _super !== null && _super.apply(this, arguments) || this; } GlobalModel.prototype.init = function (option, parentModel, ecModel, theme, locale, optionManager) { theme = theme || {}; this.option = null; // Mark as not initialized. this._theme = new Model(theme); this._locale = new Model(locale); this._optionManager = optionManager; }; GlobalModel.prototype.setOption = function (option, opts, optionPreprocessorFuncs) { if ("development" !== 'production') { assert(option != null, 'option is null/undefined'); assert(option[OPTION_INNER_KEY] !== OPTION_INNER_VALUE, 'please use chart.getOption()'); } var innerOpt = normalizeSetOptionInput(opts); this._optionManager.setOption(option, optionPreprocessorFuncs, innerOpt); this._resetOption(null, innerOpt); }; /** * @param type null/undefined: reset all. * 'recreate': force recreate all. * 'timeline': only reset timeline option * 'media': only reset media query option * @return Whether option changed. */ GlobalModel.prototype.resetOption = function (type, opt) { return this._resetOption(type, normalizeSetOptionInput(opt)); }; GlobalModel.prototype._resetOption = function (type, opt) { var optionChanged = false; var optionManager = this._optionManager; if (!type || type === 'recreate') { var baseOption = optionManager.mountOption(type === 'recreate'); if (!this.option || type === 'recreate') { initBase(this, baseOption); } else { this.restoreData(); this._mergeOption(baseOption, opt); } optionChanged = true; } if (type === 'timeline' || type === 'media') { this.restoreData(); } // By design, if `setOption(option2)` at the second time, and `option2` is a `ECUnitOption`, // it should better not have the same props with `MediaUnit['option']`. // Becuase either `option2` or `MediaUnit['option']` will be always merged to "current option" // rather than original "baseOption". If they both override a prop, the result might be // unexpected when media state changed after `setOption` called. // If we really need to modify a props in each `MediaUnit['option']`, use the full version // (`{baseOption, media}`) in `setOption`. // For `timeline`, the case is the same. if (!type || type === 'recreate' || type === 'timeline') { var timelineOption = optionManager.getTimelineOption(this); if (timelineOption) { optionChanged = true; this._mergeOption(timelineOption, opt); } } if (!type || type === 'recreate' || type === 'media') { var mediaOptions = optionManager.getMediaOption(this); if (mediaOptions.length) { each(mediaOptions, function (mediaOption) { optionChanged = true; this._mergeOption(mediaOption, opt); }, this); } } return optionChanged; }; GlobalModel.prototype.mergeOption = function (option) { this._mergeOption(option, null); }; GlobalModel.prototype._mergeOption = function (newOption, opt) { var option = this.option; var componentsMap = this._componentsMap; var componentsCount = this._componentsCount; var newCmptTypes = []; var newCmptTypeMap = createHashMap(); var replaceMergeMainTypeMap = opt && opt.replaceMergeMainTypeMap; resetSourceDefaulter(this); // If no component class, merge directly. // For example: color, animaiton options, etc. each(newOption, function (componentOption, mainType) { if (componentOption == null) { return; } if (!ComponentModel.hasClass(mainType)) { if ("development" !== 'production') { var componentImportName = BUITIN_COMPONENTS_MAP[mainType]; if (componentImportName && !componetsMissingLogPrinted[componentImportName]) { error("Component " + mainType + " is used but not imported.\nimport { " + componentImportName + " } from 'echarts/components';\necharts.use([" + componentImportName + "]);"); componetsMissingLogPrinted[componentImportName] = true; } } // globalSettingTask.dirty(); option[mainType] = option[mainType] == null ? clone(componentOption) : merge(option[mainType], componentOption, true); } else if (mainType) { newCmptTypes.push(mainType); newCmptTypeMap.set(mainType, true); } }); if (replaceMergeMainTypeMap) { // If there is a mainType `xxx` in `replaceMerge` but not declared in option, // we trade it as it is declared in option as `{xxx: []}`. Because: // (1) for normal merge, `{xxx: null/undefined}` are the same meaning as `{xxx: []}`. // (2) some preprocessor may convert some of `{xxx: null/undefined}` to `{xxx: []}`. replaceMergeMainTypeMap.each(function (val, mainTypeInReplaceMerge) { if (ComponentModel.hasClass(mainTypeInReplaceMerge) && !newCmptTypeMap.get(mainTypeInReplaceMerge)) { newCmptTypes.push(mainTypeInReplaceMerge); newCmptTypeMap.set(mainTypeInReplaceMerge, true); } }); } ComponentModel.topologicalTravel(newCmptTypes, ComponentModel.getAllClassMainTypes(), visitComponent, this); function visitComponent(mainType) { var newCmptOptionList = concatInternalOptions(this, mainType, normalizeToArray(newOption[mainType])); var oldCmptList = componentsMap.get(mainType); var mergeMode = // `!oldCmptList` means init. See the comment in `mappingToExists` !oldCmptList ? 'replaceAll' : replaceMergeMainTypeMap && replaceMergeMainTypeMap.get(mainType) ? 'replaceMerge' : 'normalMerge'; var mappingResult = mappingToExists(oldCmptList, newCmptOptionList, mergeMode); // Set mainType and complete subType. setComponentTypeToKeyInfo(mappingResult, mainType, ComponentModel); // Empty it before the travel, in order to prevent `this._componentsMap` // from being used in the `init`/`mergeOption`/`optionUpdated` of some // components, which is probably incorrect logic. option[mainType] = null; componentsMap.set(mainType, null); componentsCount.set(mainType, 0); var optionsByMainType = []; var cmptsByMainType = []; var cmptsCountByMainType = 0; each(mappingResult, function (resultItem, index) { var componentModel = resultItem.existing; var newCmptOption = resultItem.newOption; if (!newCmptOption) { if (componentModel) { // Consider where is no new option and should be merged using {}, // see removeEdgeAndAdd in topologicalTravel and // ComponentModel.getAllClassMainTypes. componentModel.mergeOption({}, this); componentModel.optionUpdated({}, false); } // If no both `resultItem.exist` and `resultItem.option`, // either it is in `replaceMerge` and not matched by any id, // or it has been removed in previous `replaceMerge` and left a "hole" in this component index. } else { var isSeriesType = mainType === 'series'; var ComponentModelClass = ComponentModel.getClass(mainType, resultItem.keyInfo.subType, !isSeriesType // Give a more detailed warn later if series don't exists ); if (!ComponentModelClass) { if ("development" !== 'production') { var subType = resultItem.keyInfo.subType; var seriesImportName = BUILTIN_CHARTS_MAP[subType]; if (!componetsMissingLogPrinted[subType]) { componetsMissingLogPrinted[subType] = true; if (seriesImportName) { error("Series " + subType + " is used but not imported.\nimport { " + seriesImportName + " } from 'echarts/charts';\necharts.use([" + seriesImportName + "]);"); } else { error("Unkown series " + subType); } } } return; } if (componentModel && componentModel.constructor === ComponentModelClass) { componentModel.name = resultItem.keyInfo.name; // componentModel.settingTask && componentModel.settingTask.dirty(); componentModel.mergeOption(newCmptOption, this); componentModel.optionUpdated(newCmptOption, false); } else { // PENDING Global as parent ? var extraOpt = extend({ componentIndex: index }, resultItem.keyInfo); componentModel = new ComponentModelClass(newCmptOption, this, this, extraOpt); // Assign `keyInfo` extend(componentModel, extraOpt); if (resultItem.brandNew) { componentModel.__requireNewView = true; } componentModel.init(newCmptOption, this, this); // Call optionUpdated after init. // newCmptOption has been used as componentModel.option // and may be merged with theme and default, so pass null // to avoid confusion. componentModel.optionUpdated(null, true); } } if (componentModel) { optionsByMainType.push(componentModel.option); cmptsByMainType.push(componentModel); cmptsCountByMainType++; } else { // Always do assign to avoid elided item in array. optionsByMainType.push(void 0); cmptsByMainType.push(void 0); } }, this); option[mainType] = optionsByMainType; componentsMap.set(mainType, cmptsByMainType); componentsCount.set(mainType, cmptsCountByMainType); // Backup series for filtering. if (mainType === 'series') { reCreateSeriesIndices(this); } } // If no series declared, ensure `_seriesIndices` initialized. if (!this._seriesIndices) { reCreateSeriesIndices(this); } }; /** * Get option for output (cloned option and inner info removed) */ GlobalModel.prototype.getOption = function () { var option = clone(this.option); each(option, function (optInMainType, mainType) { if (ComponentModel.hasClass(mainType)) { var opts = normalizeToArray(optInMainType); // Inner cmpts need to be removed. // Inner cmpts might not be at last since ec5.0, but still // compatible for users: if inner cmpt at last, splice the returned array. var realLen = opts.length; var metNonInner = false; for (var i = realLen - 1; i >= 0; i--) { // Remove options with inner id. if (opts[i] && !isComponentIdInternal(opts[i])) { metNonInner = true; } else { opts[i] = null; !metNonInner && realLen--; } } opts.length = realLen; option[mainType] = opts; } }); delete option[OPTION_INNER_KEY]; return option; }; GlobalModel.prototype.getTheme = function () { return this._theme; }; GlobalModel.prototype.getLocaleModel = function () { return this._locale; }; GlobalModel.prototype.getLocale = function (localePosition) { var locale = this.getLocaleModel(); return locale.get(localePosition); }; GlobalModel.prototype.setUpdatePayload = function (payload) { this._payload = payload; }; GlobalModel.prototype.getUpdatePayload = function () { return this._payload; }; /** * @param idx If not specified, return the first one. */ GlobalModel.prototype.getComponent = function (mainType, idx) { var list = this._componentsMap.get(mainType); if (list) { var cmpt = list[idx || 0]; if (cmpt) { return cmpt; } else if (idx == null) { for (var i = 0; i < list.length; i++) { if (list[i]) { return list[i]; } } } } }; /** * @return Never be null/undefined. */ GlobalModel.prototype.queryComponents = function (condition) { var mainType = condition.mainType; if (!mainType) { return []; } var index = condition.index; var id = condition.id; var name = condition.name; var cmpts = this._componentsMap.get(mainType); if (!cmpts || !cmpts.length) { return []; } var result; if (index != null) { result = []; each(normalizeToArray(index), function (idx) { cmpts[idx] && result.push(cmpts[idx]); }); } else if (id != null) { result = queryByIdOrName('id', id, cmpts); } else if (name != null) { result = queryByIdOrName('name', name, cmpts); } else { // Return all non-empty components in that mainType result = filter(cmpts, function (cmpt) { return !!cmpt; }); } return filterBySubType(result, condition); }; /** * The interface is different from queryComponents, * which is convenient for inner usage. * * @usage * let result = findComponents( * {mainType: 'dataZoom', query: {dataZoomId: 'abc'}} * ); * let result = findComponents( * {mainType: 'series', subType: 'pie', query: {seriesName: 'uio'}} * ); * let result = findComponents( * {mainType: 'series', * filter: function (model, index) {...}} * ); * // result like [component0, componnet1, ...] */ GlobalModel.prototype.findComponents = function (condition) { var query = condition.query; var mainType = condition.mainType; var queryCond = getQueryCond(query); var result = queryCond ? this.queryComponents(queryCond) // Retrieve all non-empty components. : filter(this._componentsMap.get(mainType), function (cmpt) { return !!cmpt; }); return doFilter(filterBySubType(result, condition)); function getQueryCond(q) { var indexAttr = mainType + 'Index'; var idAttr = mainType + 'Id'; var nameAttr = mainType + 'Name'; return q && (q[indexAttr] != null || q[idAttr] != null || q[nameAttr] != null) ? { mainType: mainType, // subType will be filtered finally. index: q[indexAttr], id: q[idAttr], name: q[nameAttr] } : null; } function doFilter(res) { return condition.filter ? filter(res, condition.filter) : res; } }; GlobalModel.prototype.eachComponent = function (mainType, cb, context) { var componentsMap = this._componentsMap; if (isFunction(mainType)) { var ctxForAll_1 = cb; var cbForAll_1 = mainType; componentsMap.each(function (cmpts, componentType) { for (var i = 0; cmpts && i < cmpts.length; i++) { var cmpt = cmpts[i]; cmpt && cbForAll_1.call(ctxForAll_1, componentType, cmpt, cmpt.componentIndex); } }); } else { var cmpts = isString(mainType) ? componentsMap.get(mainType) : isObject(mainType) ? this.findComponents(mainType) : null; for (var i = 0; cmpts && i < cmpts.length; i++) { var cmpt = cmpts[i]; cmpt && cb.call(context, cmpt, cmpt.componentIndex); } } }; /** * Get series list before filtered by name. */ GlobalModel.prototype.getSeriesByName = function (name) { var nameStr = convertOptionIdName(name, null); return filter(this._componentsMap.get('series'), function (oneSeries) { return !!oneSeries && nameStr != null && oneSeries.name === nameStr; }); }; /** * Get series list before filtered by index. */ GlobalModel.prototype.getSeriesByIndex = function (seriesIndex) { return this._componentsMap.get('series')[seriesIndex]; }; /** * Get series list before filtered by type. * FIXME: rename to getRawSeriesByType? */ GlobalModel.prototype.getSeriesByType = function (subType) { return filter(this._componentsMap.get('series'), function (oneSeries) { return !!oneSeries && oneSeries.subType === subType; }); }; /** * Get all series before filtered. */ GlobalModel.prototype.getSeries = function () { return filter(this._componentsMap.get('series').slice(), function (oneSeries) { return !!oneSeries; }); }; /** * Count series before filtered. */ GlobalModel.prototype.getSeriesCount = function () { return this._componentsCount.get('series'); }; /** * After filtering, series may be different * frome raw series. */ GlobalModel.prototype.eachSeries = function (cb, context) { assertSeriesInitialized(this); each(this._seriesIndices, function (rawSeriesIndex) { var series = this._componentsMap.get('series')[rawSeriesIndex]; cb.call(context, series, rawSeriesIndex); }, this); }; /** * Iterate raw series before filtered. * * @param {Function} cb * @param {*} context */ GlobalModel.prototype.eachRawSeries = function (cb, context) { each(this._componentsMap.get('series'), function (series) { series && cb.call(context, series, series.componentIndex); }); }; /** * After filtering, series may be different. * frome raw series. */ GlobalModel.prototype.eachSeriesByType = function (subType, cb, context) { assertSeriesInitialized(this); each(this._seriesIndices, function (rawSeriesIndex) { var series = this._componentsMap.get('series')[rawSeriesIndex]; if (series.subType === subType) { cb.call(context, series, rawSeriesIndex); } }, this); }; /** * Iterate raw series before filtered of given type. */ GlobalModel.prototype.eachRawSeriesByType = function (subType, cb, context) { return each(this.getSeriesByType(subType), cb, context); }; GlobalModel.prototype.isSeriesFiltered = function (seriesModel) { assertSeriesInitialized(this); return this._seriesIndicesMap.get(seriesModel.componentIndex) == null; }; GlobalModel.prototype.getCurrentSeriesIndices = function () { return (this._seriesIndices || []).slice(); }; GlobalModel.prototype.filterSeries = function (cb, context) { assertSeriesInitialized(this); var newSeriesIndices = []; each(this._seriesIndices, function (seriesRawIdx) { var series = this._componentsMap.get('series')[seriesRawIdx]; cb.call(context, series, seriesRawIdx) && newSeriesIndices.push(seriesRawIdx); }, this); this._seriesIndices = newSeriesIndices; this._seriesIndicesMap = createHashMap(newSeriesIndices); }; GlobalModel.prototype.restoreData = function (payload) { reCreateSeriesIndices(this); var componentsMap = this._componentsMap; var componentTypes = []; componentsMap.each(function (components, componentType) { if (ComponentModel.hasClass(componentType)) { componentTypes.push(componentType); } }); ComponentModel.topologicalTravel(componentTypes, ComponentModel.getAllClassMainTypes(), function (componentType) { each(componentsMap.get(componentType), function (component) { if (component && (componentType !== 'series' || !isNotTargetSeries(component, payload))) { component.restoreData(); } }); }); }; GlobalModel.internalField = function () { reCreateSeriesIndices = function (ecModel) { var seriesIndices = ecModel._seriesIndices = []; each(ecModel._componentsMap.get('series'), function (series) { // series may have been removed by `replaceMerge`. series && seriesIndices.push(series.componentIndex); }); ecModel._seriesIndicesMap = createHashMap(seriesIndices); }; assertSeriesInitialized = function (ecModel) { // Components that use _seriesIndices should depends on series component, // which make sure that their initialization is after series. if ("development" !== 'production') { if (!ecModel._seriesIndices) { throw new Error('Option should contains series.'); } } }; initBase = function (ecModel, baseOption) { // Using OPTION_INNER_KEY to mark that this option can not be used outside, // i.e. `chart.setOption(chart.getModel().option);` is forbiden. ecModel.option = {}; ecModel.option[OPTION_INNER_KEY] = OPTION_INNER_VALUE; // Init with series: [], in case of calling findSeries method // before series initialized. ecModel._componentsMap = createHashMap({ series: [] }); ecModel._componentsCount = createHashMap(); // If user spefied `option.aria`, aria will be enable. This detection should be // performed before theme and globalDefault merge. var airaOption = baseOption.aria; if (isObject(airaOption) && airaOption.enabled == null) { airaOption.enabled = true; } mergeTheme(baseOption, ecModel._theme.option); // TODO Needs clone when merging to the unexisted property merge(baseOption, globalDefault, false); ecModel._mergeOption(baseOption, null); }; }(); return GlobalModel; }(Model); function isNotTargetSeries(seriesModel, payload) { if (payload) { var index = payload.seriesIndex; var id = payload.seriesId; var name_1 = payload.seriesName; return index != null && seriesModel.componentIndex !== index || id != null && seriesModel.id !== id || name_1 != null && seriesModel.name !== name_1; } } function mergeTheme(option, theme) { // PENDING // NOT use `colorLayer` in theme if option has `color` var notMergeColorLayer = option.color && !option.colorLayer; each(theme, function (themeItem, name) { if (name === 'colorLayer' && notMergeColorLayer) { return; } // If it is component model mainType, the model handles that merge later. // otherwise, merge them here. if (!ComponentModel.hasClass(name)) { if (typeof themeItem === 'object') { option[name] = !option[name] ? clone(themeItem) : merge(option[name], themeItem, false); } else { if (option[name] == null) { option[name] = themeItem; } } } }); } function queryByIdOrName(attr, idOrName, cmpts) { // Here is a break from echarts4: string and number are // treated as equal. if (isArray(idOrName)) { var keyMap_1 = createHashMap(); each(idOrName, function (idOrNameItem) { if (idOrNameItem != null) { var idName = convertOptionIdName(idOrNameItem, null); idName != null && keyMap_1.set(idOrNameItem, true); } }); return filter(cmpts, function (cmpt) { return cmpt && keyMap_1.get(cmpt[attr]); }); } else { var idName_1 = convertOptionIdName(idOrName, null); return filter(cmpts, function (cmpt) { return cmpt && idName_1 != null && cmpt[attr] === idName_1; }); } } function filterBySubType(components, condition) { // Using hasOwnProperty for restrict. Consider // subType is undefined in user payload. return condition.hasOwnProperty('subType') ? filter(components, function (cmpt) { return cmpt && cmpt.subType === condition.subType; }) : components; } function normalizeSetOptionInput(opts) { var replaceMergeMainTypeMap = createHashMap(); opts && each(normalizeToArray(opts.replaceMerge), function (mainType) { if ("development" !== 'production') { assert(ComponentModel.hasClass(mainType), '"' + mainType + '" is not valid component main type in "replaceMerge"'); } replaceMergeMainTypeMap.set(mainType, true); }); return { replaceMergeMainTypeMap: replaceMergeMainTypeMap }; } mixin(GlobalModel, PaletteMixin); var availableMethods = ['getDom', 'getZr', 'getWidth', 'getHeight', 'getDevicePixelRatio', 'dispatchAction', 'isDisposed', 'on', 'off', 'getDataURL', 'getConnectedDataURL', // 'getModel', 'getOption', // 'getViewOfComponentModel', // 'getViewOfSeriesModel', 'getId', 'updateLabelLayout']; var ExtensionAPI = /** @class */ function () { function ExtensionAPI(ecInstance) { each(availableMethods, function (methodName) { this[methodName] = bind(ecInstance[methodName], ecInstance); }, this); } return ExtensionAPI; }(); var coordinateSystemCreators = {}; var CoordinateSystemManager = /** @class */ function () { function CoordinateSystemManager() { this._coordinateSystems = []; } CoordinateSystemManager.prototype.create = function (ecModel, api) { var coordinateSystems = []; each(coordinateSystemCreators, function (creater, type) { var list = creater.create(ecModel, api); coordinateSystems = coordinateSystems.concat(list || []); }); this._coordinateSystems = coordinateSystems; }; CoordinateSystemManager.prototype.update = function (ecModel, api) { each(this._coordinateSystems, function (coordSys) { coordSys.update && coordSys.update(ecModel, api); }); }; CoordinateSystemManager.prototype.getCoordinateSystems = function () { return this._coordinateSystems.slice(); }; CoordinateSystemManager.register = function (type, creator) { coordinateSystemCreators[type] = creator; }; CoordinateSystemManager.get = function (type) { return coordinateSystemCreators[type]; }; return CoordinateSystemManager; }(); var QUERY_REG = /^(min|max)?(.+)$/; // Key: mainType // type FakeComponentsMap = HashMap<(MappingExistingItem & { subType: string })[]>; /** * TERM EXPLANATIONS: * See `ECOption` and `ECUnitOption` in `src/util/types.ts`. */ var OptionManager = /** @class */ function () { // timeline.notMerge is not supported in ec3. Firstly there is rearly // case that notMerge is needed. Secondly supporting 'notMerge' requires // rawOption cloned and backuped when timeline changed, which does no // good to performance. What's more, that both timeline and setOption // method supply 'notMerge' brings complex and some problems. // Consider this case: // (step1) chart.setOption({timeline: {notMerge: false}, ...}, false); // (step2) chart.setOption({timeline: {notMerge: true}, ...}, false); function OptionManager(api) { this._timelineOptions = []; this._mediaList = []; /** * -1, means default. * empty means no media. */ this._currentMediaIndices = []; this._api = api; } OptionManager.prototype.setOption = function (rawOption, optionPreprocessorFuncs, opt) { if (rawOption) { // That set dat primitive is dangerous if user reuse the data when setOption again. each(normalizeToArray(rawOption.series), function (series) { series && series.data && isTypedArray(series.data) && setAsPrimitive(series.data); }); each(normalizeToArray(rawOption.dataset), function (dataset) { dataset && dataset.source && isTypedArray(dataset.source) && setAsPrimitive(dataset.source); }); } // Caution: some series modify option data, if do not clone, // it should ensure that the repeat modify correctly // (create a new object when modify itself). rawOption = clone(rawOption); // FIXME // If some property is set in timeline options or media option but // not set in baseOption, a warning should be given. var optionBackup = this._optionBackup; var newParsedOption = parseRawOption(rawOption, optionPreprocessorFuncs, !optionBackup); this._newBaseOption = newParsedOption.baseOption; // For setOption at second time (using merge mode); if (optionBackup) { // FIXME // the restore merge solution is essentially incorrect. // the mapping can not be 100% consistent with ecModel, which probably brings // potential bug! // The first merge is delayed, becuase in most cases, users do not call `setOption` twice. // let fakeCmptsMap = this._fakeCmptsMap; // if (!fakeCmptsMap) { // fakeCmptsMap = this._fakeCmptsMap = createHashMap(); // mergeToBackupOption(fakeCmptsMap, null, optionBackup.baseOption, null); // } // mergeToBackupOption( // fakeCmptsMap, optionBackup.baseOption, newParsedOption.baseOption, opt // ); // For simplicity, timeline options and media options do not support merge, // that is, if you `setOption` twice and both has timeline options, the latter // timeline opitons will not be merged to the formers, but just substitude them. if (newParsedOption.timelineOptions.length) { optionBackup.timelineOptions = newParsedOption.timelineOptions; } if (newParsedOption.mediaList.length) { optionBackup.mediaList = newParsedOption.mediaList; } if (newParsedOption.mediaDefault) { optionBackup.mediaDefault = newParsedOption.mediaDefault; } } else { this._optionBackup = newParsedOption; } }; OptionManager.prototype.mountOption = function (isRecreate) { var optionBackup = this._optionBackup; this._timelineOptions = optionBackup.timelineOptions; this._mediaList = optionBackup.mediaList; this._mediaDefault = optionBackup.mediaDefault; this._currentMediaIndices = []; return clone(isRecreate // this._optionBackup.baseOption, which is created at the first `setOption` // called, and is merged into every new option by inner method `mergeToBackupOption` // each time `setOption` called, can be only used in `isRecreate`, because // its reliability is under suspicion. In other cases option merge is // performed by `model.mergeOption`. ? optionBackup.baseOption : this._newBaseOption); }; OptionManager.prototype.getTimelineOption = function (ecModel) { var option; var timelineOptions = this._timelineOptions; if (timelineOptions.length) { // getTimelineOption can only be called after ecModel inited, // so we can get currentIndex from timelineModel. var timelineModel = ecModel.getComponent('timeline'); if (timelineModel) { option = clone( // FIXME:TS as TimelineModel or quivlant interface timelineOptions[timelineModel.getCurrentIndex()]); } } return option; }; OptionManager.prototype.getMediaOption = function (ecModel) { var ecWidth = this._api.getWidth(); var ecHeight = this._api.getHeight(); var mediaList = this._mediaList; var mediaDefault = this._mediaDefault; var indices = []; var result = []; // No media defined. if (!mediaList.length && !mediaDefault) { return result; } // Multi media may be applied, the latter defined media has higher priority. for (var i = 0, len = mediaList.length; i < len; i++) { if (applyMediaQuery(mediaList[i].query, ecWidth, ecHeight)) { indices.push(i); } } // FIXME // Whether mediaDefault should force users to provide? Otherwise // the change by media query can not be recorvered. if (!indices.length && mediaDefault) { indices = [-1]; } if (indices.length && !indicesEquals(indices, this._currentMediaIndices)) { result = map(indices, function (index) { return clone(index === -1 ? mediaDefault.option : mediaList[index].option); }); } // Otherwise return nothing. this._currentMediaIndices = indices; return result; }; return OptionManager; }(); /** * [RAW_OPTION_PATTERNS] * (Note: "series: []" represents all other props in `ECUnitOption`) * * (1) No prop "baseOption" declared: * Root option is used as "baseOption" (except prop "options" and "media"). * ```js * option = { * series: [], * timeline: {}, * options: [], * }; * option = { * series: [], * media: {}, * }; * option = { * series: [], * timeline: {}, * options: [], * media: {}, * } * ``` * * (2) Prop "baseOption" declared: * If "baseOption" declared, `ECUnitOption` props can only be declared * inside "baseOption" except prop "timeline" (compat ec2). * ```js * option = { * baseOption: { * timeline: {}, * series: [], * }, * options: [] * }; * option = { * baseOption: { * series: [], * }, * media: [] * }; * option = { * baseOption: { * timeline: {}, * series: [], * }, * options: [] * media: [] * }; * option = { * // ec3 compat ec2: allow (only) `timeline` declared * // outside baseOption. Keep this setting for compat. * timeline: {}, * baseOption: { * series: [], * }, * options: [], * media: [] * }; * ``` */ function parseRawOption( // `rawOption` May be modified rawOption, optionPreprocessorFuncs, isNew) { var mediaList = []; var mediaDefault; var baseOption; var declaredBaseOption = rawOption.baseOption; // Compatible with ec2, [RAW_OPTION_PATTERNS] above. var timelineOnRoot = rawOption.timeline; var timelineOptionsOnRoot = rawOption.options; var mediaOnRoot = rawOption.media; var hasMedia = !!rawOption.media; var hasTimeline = !!(timelineOptionsOnRoot || timelineOnRoot || declaredBaseOption && declaredBaseOption.timeline); if (declaredBaseOption) { baseOption = declaredBaseOption; // For merge option. if (!baseOption.timeline) { baseOption.timeline = timelineOnRoot; } } // For convenience, enable to use the root option as the `baseOption`: // `{ ...normalOptionProps, media: [{ ... }, { ... }] }` else { if (hasTimeline || hasMedia) { rawOption.options = rawOption.media = null; } baseOption = rawOption; } if (hasMedia) { if (isArray(mediaOnRoot)) { each(mediaOnRoot, function (singleMedia) { if ("development" !== 'production') { // Real case of wrong config. if (singleMedia && !singleMedia.option && isObject(singleMedia.query) && isObject(singleMedia.query.option)) { error('Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }'); } } if (singleMedia && singleMedia.option) { if (singleMedia.query) { mediaList.push(singleMedia); } else if (!mediaDefault) { // Use the first media default. mediaDefault = singleMedia; } } }); } else { if ("development" !== 'production') { // Real case of wrong config. error('Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }'); } } } doPreprocess(baseOption); each(timelineOptionsOnRoot, function (option) { return doPreprocess(option); }); each(mediaList, function (media) { return doPreprocess(media.option); }); function doPreprocess(option) { each(optionPreprocessorFuncs, function (preProcess) { preProcess(option, isNew); }); } return { baseOption: baseOption, timelineOptions: timelineOptionsOnRoot || [], mediaDefault: mediaDefault, mediaList: mediaList }; } /** * @see * Support: width, height, aspectRatio * Can use max or min as prefix. */ function applyMediaQuery(query, ecWidth, ecHeight) { var realMap = { width: ecWidth, height: ecHeight, aspectratio: ecWidth / ecHeight // lowser case for convenientce. }; var applicatable = true; each(query, function (value, attr) { var matched = attr.match(QUERY_REG); if (!matched || !matched[1] || !matched[2]) { return; } var operator = matched[1]; var realAttr = matched[2].toLowerCase(); if (!compare(realMap[realAttr], value, operator)) { applicatable = false; } }); return applicatable; } function compare(real, expect, operator) { if (operator === 'min') { return real >= expect; } else if (operator === 'max') { return real <= expect; } else { // Equals return real === expect; } } function indicesEquals(indices1, indices2) { // indices is always order by asc and has only finite number. return indices1.join(',') === indices2.join(','); } var each$2 = each; var isObject$1 = isObject; var POSSIBLE_STYLES = ['areaStyle', 'lineStyle', 'nodeStyle', 'linkStyle', 'chordStyle', 'label', 'labelLine']; function compatEC2ItemStyle(opt) { var itemStyleOpt = opt && opt.itemStyle; if (!itemStyleOpt) { return; } for (var i = 0, len = POSSIBLE_STYLES.length; i < len; i++) { var styleName = POSSIBLE_STYLES[i]; var normalItemStyleOpt = itemStyleOpt.normal; var emphasisItemStyleOpt = itemStyleOpt.emphasis; if (normalItemStyleOpt && normalItemStyleOpt[styleName]) { if ("development" !== 'production') { deprecateReplaceLog("itemStyle.normal." + styleName, styleName); } opt[styleName] = opt[styleName] || {}; if (!opt[styleName].normal) { opt[styleName].normal = normalItemStyleOpt[styleName]; } else { merge(opt[styleName].normal, normalItemStyleOpt[styleName]); } normalItemStyleOpt[styleName] = null; } if (emphasisItemStyleOpt && emphasisItemStyleOpt[styleName]) { if ("development" !== 'production') { deprecateReplaceLog("itemStyle.emphasis." + styleName, "emphasis." + styleName); } opt[styleName] = opt[styleName] || {}; if (!opt[styleName].emphasis) { opt[styleName].emphasis = emphasisItemStyleOpt[styleName]; } else { merge(opt[styleName].emphasis, emphasisItemStyleOpt[styleName]); } emphasisItemStyleOpt[styleName] = null; } } } function convertNormalEmphasis(opt, optType, useExtend) { if (opt && opt[optType] && (opt[optType].normal || opt[optType].emphasis)) { var normalOpt = opt[optType].normal; var emphasisOpt = opt[optType].emphasis; if (normalOpt) { if ("development" !== 'production') { // eslint-disable-next-line max-len deprecateLog("'normal' hierarchy in " + optType + " has been removed since 4.0. All style properties are configured in " + optType + " directly now."); } // Timeline controlStyle has other properties besides normal and emphasis if (useExtend) { opt[optType].normal = opt[optType].emphasis = null; defaults(opt[optType], normalOpt); } else { opt[optType] = normalOpt; } } if (emphasisOpt) { if ("development" !== 'production') { deprecateLog(optType + ".emphasis has been changed to emphasis." + optType + " since 4.0"); } opt.emphasis = opt.emphasis || {}; opt.emphasis[optType] = emphasisOpt; // Also compat the case user mix the style and focus together in ec3 style // for example: { itemStyle: { normal: {}, emphasis: {focus, shadowBlur} } } if (emphasisOpt.focus) { opt.emphasis.focus = emphasisOpt.focus; } if (emphasisOpt.blurScope) { opt.emphasis.blurScope = emphasisOpt.blurScope; } } } } function removeEC3NormalStatus(opt) { convertNormalEmphasis(opt, 'itemStyle'); convertNormalEmphasis(opt, 'lineStyle'); convertNormalEmphasis(opt, 'areaStyle'); convertNormalEmphasis(opt, 'label'); convertNormalEmphasis(opt, 'labelLine'); // treemap convertNormalEmphasis(opt, 'upperLabel'); // graph convertNormalEmphasis(opt, 'edgeLabel'); } function compatTextStyle(opt, propName) { // Check whether is not object (string\null\undefined ...) var labelOptSingle = isObject$1(opt) && opt[propName]; var textStyle = isObject$1(labelOptSingle) && labelOptSingle.textStyle; if (textStyle) { if ("development" !== 'production') { // eslint-disable-next-line max-len deprecateLog("textStyle hierarchy in " + propName + " has been removed since 4.0. All textStyle properties are configured in " + propName + " directly now."); } for (var i = 0, len = TEXT_STYLE_OPTIONS.length; i < len; i++) { var textPropName = TEXT_STYLE_OPTIONS[i]; if (textStyle.hasOwnProperty(textPropName)) { labelOptSingle[textPropName] = textStyle[textPropName]; } } } } function compatEC3CommonStyles(opt) { if (opt) { removeEC3NormalStatus(opt); compatTextStyle(opt, 'label'); opt.emphasis && compatTextStyle(opt.emphasis, 'label'); } } function processSeries(seriesOpt) { if (!isObject$1(seriesOpt)) { return; } compatEC2ItemStyle(seriesOpt); removeEC3NormalStatus(seriesOpt); compatTextStyle(seriesOpt, 'label'); // treemap compatTextStyle(seriesOpt, 'upperLabel'); // graph compatTextStyle(seriesOpt, 'edgeLabel'); if (seriesOpt.emphasis) { compatTextStyle(seriesOpt.emphasis, 'label'); // treemap compatTextStyle(seriesOpt.emphasis, 'upperLabel'); // graph compatTextStyle(seriesOpt.emphasis, 'edgeLabel'); } var markPoint = seriesOpt.markPoint; if (markPoint) { compatEC2ItemStyle(markPoint); compatEC3CommonStyles(markPoint); } var markLine = seriesOpt.markLine; if (markLine) { compatEC2ItemStyle(markLine); compatEC3CommonStyles(markLine); } var markArea = seriesOpt.markArea; if (markArea) { compatEC3CommonStyles(markArea); } var data = seriesOpt.data; // Break with ec3: if `setOption` again, there may be no `type` in option, // then the backward compat based on option type will not be performed. if (seriesOpt.type === 'graph') { data = data || seriesOpt.nodes; var edgeData = seriesOpt.links || seriesOpt.edges; if (edgeData && !isTypedArray(edgeData)) { for (var i = 0; i < edgeData.length; i++) { compatEC3CommonStyles(edgeData[i]); } } each(seriesOpt.categories, function (opt) { removeEC3NormalStatus(opt); }); } if (data && !isTypedArray(data)) { for (var i = 0; i < data.length; i++) { compatEC3CommonStyles(data[i]); } } // mark point data markPoint = seriesOpt.markPoint; if (markPoint && markPoint.data) { var mpData = markPoint.data; for (var i = 0; i < mpData.length; i++) { compatEC3CommonStyles(mpData[i]); } } // mark line data markLine = seriesOpt.markLine; if (markLine && markLine.data) { var mlData = markLine.data; for (var i = 0; i < mlData.length; i++) { if (isArray(mlData[i])) { compatEC3CommonStyles(mlData[i][0]); compatEC3CommonStyles(mlData[i][1]); } else { compatEC3CommonStyles(mlData[i]); } } } // Series if (seriesOpt.type === 'gauge') { compatTextStyle(seriesOpt, 'axisLabel'); compatTextStyle(seriesOpt, 'title'); compatTextStyle(seriesOpt, 'detail'); } else if (seriesOpt.type === 'treemap') { convertNormalEmphasis(seriesOpt.breadcrumb, 'itemStyle'); each(seriesOpt.levels, function (opt) { removeEC3NormalStatus(opt); }); } else if (seriesOpt.type === 'tree') { removeEC3NormalStatus(seriesOpt.leaves); } // sunburst starts from ec4, so it does not need to compat levels. } function toArr(o) { return isArray(o) ? o : o ? [o] : []; } function toObj(o) { return (isArray(o) ? o[0] : o) || {}; } function globalCompatStyle(option, isTheme) { each$2(toArr(option.series), function (seriesOpt) { isObject$1(seriesOpt) && processSeries(seriesOpt); }); var axes = ['xAxis', 'yAxis', 'radiusAxis', 'angleAxis', 'singleAxis', 'parallelAxis', 'radar']; isTheme && axes.push('valueAxis', 'categoryAxis', 'logAxis', 'timeAxis'); each$2(axes, function (axisName) { each$2(toArr(option[axisName]), function (axisOpt) { if (axisOpt) { compatTextStyle(axisOpt, 'axisLabel'); compatTextStyle(axisOpt.axisPointer, 'label'); } }); }); each$2(toArr(option.parallel), function (parallelOpt) { var parallelAxisDefault = parallelOpt && parallelOpt.parallelAxisDefault; compatTextStyle(parallelAxisDefault, 'axisLabel'); compatTextStyle(parallelAxisDefault && parallelAxisDefault.axisPointer, 'label'); }); each$2(toArr(option.calendar), function (calendarOpt) { convertNormalEmphasis(calendarOpt, 'itemStyle'); compatTextStyle(calendarOpt, 'dayLabel'); compatTextStyle(calendarOpt, 'monthLabel'); compatTextStyle(calendarOpt, 'yearLabel'); }); // radar.name.textStyle each$2(toArr(option.radar), function (radarOpt) { compatTextStyle(radarOpt, 'name'); // Use axisName instead of name because component has name property if (radarOpt.name && radarOpt.axisName == null) { radarOpt.axisName = radarOpt.name; delete radarOpt.name; if ("development" !== 'production') { deprecateLog('name property in radar component has been changed to axisName'); } } if (radarOpt.nameGap != null && radarOpt.axisNameGap == null) { radarOpt.axisNameGap = radarOpt.nameGap; delete radarOpt.nameGap; if ("development" !== 'production') { deprecateLog('nameGap property in radar component has been changed to axisNameGap'); } } }); each$2(toArr(option.geo), function (geoOpt) { if (isObject$1(geoOpt)) { compatEC3CommonStyles(geoOpt); each$2(toArr(geoOpt.regions), function (regionObj) { compatEC3CommonStyles(regionObj); }); } }); each$2(toArr(option.timeline), function (timelineOpt) { compatEC3CommonStyles(timelineOpt); convertNormalEmphasis(timelineOpt, 'label'); convertNormalEmphasis(timelineOpt, 'itemStyle'); convertNormalEmphasis(timelineOpt, 'controlStyle', true); var data = timelineOpt.data; isArray(data) && each(data, function (item) { if (isObject(item)) { convertNormalEmphasis(item, 'label'); convertNormalEmphasis(item, 'itemStyle'); } }); }); each$2(toArr(option.toolbox), function (toolboxOpt) { convertNormalEmphasis(toolboxOpt, 'iconStyle'); each$2(toolboxOpt.feature, function (featureOpt) { convertNormalEmphasis(featureOpt, 'iconStyle'); }); }); compatTextStyle(toObj(option.axisPointer), 'label'); compatTextStyle(toObj(option.tooltip).axisPointer, 'label'); // Clean logs // storedLogs = {}; } function get(opt, path) { var pathArr = path.split(','); var obj = opt; for (var i = 0; i < pathArr.length; i++) { obj = obj && obj[pathArr[i]]; if (obj == null) { break; } } return obj; } function set$1(opt, path, val, overwrite) { var pathArr = path.split(','); var obj = opt; var key; var i = 0; for (; i < pathArr.length - 1; i++) { key = pathArr[i]; if (obj[key] == null) { obj[key] = {}; } obj = obj[key]; } if (overwrite || obj[pathArr[i]] == null) { obj[pathArr[i]] = val; } } function compatLayoutProperties(option) { option && each(LAYOUT_PROPERTIES, function (prop) { if (prop[0] in option && !(prop[1] in option)) { option[prop[1]] = option[prop[0]]; } }); } var LAYOUT_PROPERTIES = [['x', 'left'], ['y', 'top'], ['x2', 'right'], ['y2', 'bottom']]; var COMPATITABLE_COMPONENTS = ['grid', 'geo', 'parallel', 'legend', 'toolbox', 'title', 'visualMap', 'dataZoom', 'timeline']; var BAR_ITEM_STYLE_MAP = [['borderRadius', 'barBorderRadius'], ['borderColor', 'barBorderColor'], ['borderWidth', 'barBorderWidth']]; function compatBarItemStyle(option) { var itemStyle = option && option.itemStyle; if (itemStyle) { for (var i = 0; i < BAR_ITEM_STYLE_MAP.length; i++) { var oldName = BAR_ITEM_STYLE_MAP[i][1]; var newName = BAR_ITEM_STYLE_MAP[i][0]; if (itemStyle[oldName] != null) { itemStyle[newName] = itemStyle[oldName]; if ("development" !== 'production') { deprecateReplaceLog(oldName, newName); } } } } } function compatPieLabel(option) { if (!option) { return; } if (option.alignTo === 'edge' && option.margin != null && option.edgeDistance == null) { if ("development" !== 'production') { deprecateReplaceLog('label.margin', 'label.edgeDistance', 'pie'); } option.edgeDistance = option.margin; } } function compatSunburstState(option) { if (!option) { return; } if (option.downplay && !option.blur) { option.blur = option.downplay; if ("development" !== 'production') { deprecateReplaceLog('downplay', 'blur', 'sunburst'); } } } function compatGraphFocus(option) { if (!option) { return; } if (option.focusNodeAdjacency != null) { option.emphasis = option.emphasis || {}; if (option.emphasis.focus == null) { if ("development" !== 'production') { deprecateReplaceLog('focusNodeAdjacency', 'emphasis: { focus: \'adjacency\'}', 'graph/sankey'); } option.emphasis.focus = 'adjacency'; } } } function traverseTree(data, cb) { if (data) { for (var i = 0; i < data.length; i++) { cb(data[i]); data[i] && traverseTree(data[i].children, cb); } } } function globalBackwardCompat(option, isTheme) { globalCompatStyle(option, isTheme); // Make sure series array for model initialization. option.series = normalizeToArray(option.series); each(option.series, function (seriesOpt) { if (!isObject(seriesOpt)) { return; } var seriesType = seriesOpt.type; if (seriesType === 'line') { if (seriesOpt.clipOverflow != null) { seriesOpt.clip = seriesOpt.clipOverflow; if ("development" !== 'production') { deprecateReplaceLog('clipOverflow', 'clip', 'line'); } } } else if (seriesType === 'pie' || seriesType === 'gauge') { if (seriesOpt.clockWise != null) { seriesOpt.clockwise = seriesOpt.clockWise; if ("development" !== 'production') { deprecateReplaceLog('clockWise', 'clockwise'); } } compatPieLabel(seriesOpt.label); var data = seriesOpt.data; if (data && !isTypedArray(data)) { for (var i = 0; i < data.length; i++) { compatPieLabel(data[i]); } } if (seriesOpt.hoverOffset != null) { seriesOpt.emphasis = seriesOpt.emphasis || {}; if (seriesOpt.emphasis.scaleSize = null) { if ("development" !== 'production') { deprecateReplaceLog('hoverOffset', 'emphasis.scaleSize'); } seriesOpt.emphasis.scaleSize = seriesOpt.hoverOffset; } } } else if (seriesType === 'gauge') { var pointerColor = get(seriesOpt, 'pointer.color'); pointerColor != null && set$1(seriesOpt, 'itemStyle.color', pointerColor); } else if (seriesType === 'bar') { compatBarItemStyle(seriesOpt); compatBarItemStyle(seriesOpt.backgroundStyle); compatBarItemStyle(seriesOpt.emphasis); var data = seriesOpt.data; if (data && !isTypedArray(data)) { for (var i = 0; i < data.length; i++) { if (typeof data[i] === 'object') { compatBarItemStyle(data[i]); compatBarItemStyle(data[i] && data[i].emphasis); } } } } else if (seriesType === 'sunburst') { var highlightPolicy = seriesOpt.highlightPolicy; if (highlightPolicy) { seriesOpt.emphasis = seriesOpt.emphasis || {}; if (!seriesOpt.emphasis.focus) { seriesOpt.emphasis.focus = highlightPolicy; if ("development" !== 'production') { deprecateReplaceLog('highlightPolicy', 'emphasis.focus', 'sunburst'); } } } compatSunburstState(seriesOpt); traverseTree(seriesOpt.data, compatSunburstState); } else if (seriesType === 'graph' || seriesType === 'sankey') { compatGraphFocus(seriesOpt); // TODO nodes, edges? } else if (seriesType === 'map') { if (seriesOpt.mapType && !seriesOpt.map) { if ("development" !== 'production') { deprecateReplaceLog('mapType', 'map', 'map'); } seriesOpt.map = seriesOpt.mapType; } if (seriesOpt.mapLocation) { if ("development" !== 'production') { deprecateLog('`mapLocation` is not used anymore.'); } defaults(seriesOpt, seriesOpt.mapLocation); } } if (seriesOpt.hoverAnimation != null) { seriesOpt.emphasis = seriesOpt.emphasis || {}; if (seriesOpt.emphasis && seriesOpt.emphasis.scale == null) { if ("development" !== 'production') { deprecateReplaceLog('hoverAnimation', 'emphasis.scale'); } seriesOpt.emphasis.scale = seriesOpt.hoverAnimation; } } compatLayoutProperties(seriesOpt); }); // dataRange has changed to visualMap if (option.dataRange) { option.visualMap = option.dataRange; } each(COMPATITABLE_COMPONENTS, function (componentName) { var options = option[componentName]; if (options) { if (!isArray(options)) { options = [options]; } each(options, function (option) { compatLayoutProperties(option); }); } }); } // data processing stage is blocked in stream. // See // (2) Only register once when import repeatly. // Should be executed after series filtered and before stack calculation. function dataStack(ecModel) { var stackInfoMap = createHashMap(); ecModel.eachSeries(function (seriesModel) { var stack = seriesModel.get('stack'); // Compatibal: when `stack` is set as '', do not stack. if (stack) { var stackInfoList = stackInfoMap.get(stack) || stackInfoMap.set(stack, []); var data = seriesModel.getData(); var stackInfo = { // Used for calculate axis extent automatically. // TODO: Type getCalculationInfo return more specific type? stackResultDimension: data.getCalculationInfo('stackResultDimension'), stackedOverDimension: data.getCalculationInfo('stackedOverDimension'), stackedDimension: data.getCalculationInfo('stackedDimension'), stackedByDimension: data.getCalculationInfo('stackedByDimension'), isStackedByIndex: data.getCalculationInfo('isStackedByIndex'), data: data, seriesModel: seriesModel }; // If stacked on axis that do not support data stack. if (!stackInfo.stackedDimension || !(stackInfo.isStackedByIndex || stackInfo.stackedByDimension)) { return; } stackInfoList.length && data.setCalculationInfo('stackedOnSeries', stackInfoList[stackInfoList.length - 1].seriesModel); stackInfoList.push(stackInfo); } }); stackInfoMap.each(calculateStack); } function calculateStack(stackInfoList) { each(stackInfoList, function (targetStackInfo, idxInStack) { var resultVal = []; var resultNaN = [NaN, NaN]; var dims = [targetStackInfo.stackResultDimension, targetStackInfo.stackedOverDimension]; var targetData = targetStackInfo.data; var isStackedByIndex = targetStackInfo.isStackedByIndex; // Should not write on raw data, because stack series model list changes // depending on legend selection. var newData = targetData.map(dims, function (v0, v1, dataIndex) { var sum = targetData.get(targetStackInfo.stackedDimension, dataIndex); // Consider `connectNulls` of line area, if value is NaN, stackedOver // should also be NaN, to draw a appropriate belt area. if (isNaN(sum)) { return resultNaN; } var byValue; var stackedDataRawIndex; if (isStackedByIndex) { stackedDataRawIndex = targetData.getRawIndex(dataIndex); } else { byValue = targetData.get(targetStackInfo.stackedByDimension, dataIndex); } // If stackOver is NaN, chart view will render point on value start. var stackedOver = NaN; for (var j = idxInStack - 1; j >= 0; j--) { var stackInfo = stackInfoList[j]; // Has been optimized by inverted indices on `stackedByDimension`. if (!isStackedByIndex) { stackedDataRawIndex = stackInfo.data.rawIndexOf(stackInfo.stackedByDimension, byValue); } if (stackedDataRawIndex >= 0) { var val = stackInfo.data.getByRawIndex(stackInfo.stackResultDimension, stackedDataRawIndex); // Considering positive stack, negative stack and empty data if (sum >= 0 && val > 0 || // Positive stack sum <= 0 && val < 0 // Negative stack ) { sum += val; stackedOver = val; break; } } } resultVal[0] = sum; resultVal[1] = stackedOver; return resultVal; }); targetData.hostModel.setData(newData); // Update for consequent calculation targetStackInfo.data = newData; }); } var SourceImpl = /** @class */ function () { // readonly frozen: boolean; function SourceImpl(fields) { this.data = fields.data || (fields.sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS ? {} : []); this.sourceFormat = fields.sourceFormat || SOURCE_FORMAT_UNKNOWN; // Visit config this.seriesLayoutBy = fields.seriesLayoutBy || SERIES_LAYOUT_BY_COLUMN; this.startIndex = fields.startIndex || 0; this.dimensionsDefine = fields.dimensionsDefine; this.dimensionsDetectedCount = fields.dimensionsDetectedCount; this.encodeDefine = fields.encodeDefine; this.metaRawOption = fields.metaRawOption; } return SourceImpl; }(); function isSourceInstance(val) { return val instanceof SourceImpl; } function createSource(sourceData, thisMetaRawOption, // can be null. If not provided, auto detect it from `sourceData`. sourceFormat, encodeDefine // can be null ) { sourceFormat = sourceFormat || detectSourceFormat(sourceData); var seriesLayoutBy = thisMetaRawOption.seriesLayoutBy; var determined = determineSourceDimensions(sourceData, sourceFormat, seriesLayoutBy, thisMetaRawOption.sourceHeader, thisMetaRawOption.dimensions); var source = new SourceImpl({ data: sourceData, sourceFormat: sourceFormat, seriesLayoutBy: seriesLayoutBy, dimensionsDefine: determined.dimensionsDefine, startIndex: determined.startIndex, dimensionsDetectedCount: determined.dimensionsDetectedCount, encodeDefine: makeEncodeDefine(encodeDefine), metaRawOption: clone(thisMetaRawOption) }); return source; } /** * Wrap original series data for some compatibility cases. */ function createSourceFromSeriesDataOption(data) { return new SourceImpl({ data: data, sourceFormat: isTypedArray(data) ? SOURCE_FORMAT_TYPED_ARRAY : SOURCE_FORMAT_ORIGINAL }); } /** * Clone source but excludes source data. */ function cloneSourceShallow(source) { return new SourceImpl({ data: source.data, sourceFormat: source.sourceFormat, seriesLayoutBy: source.seriesLayoutBy, dimensionsDefine: clone(source.dimensionsDefine), startIndex: source.startIndex, dimensionsDetectedCount: source.dimensionsDetectedCount, encodeDefine: makeEncodeDefine(source.encodeDefine) }); } function makeEncodeDefine(encodeDefine) { // null means user not specify `series.encode`. return encodeDefine ? createHashMap(encodeDefine) : null; } /** * Note: An empty array will be detected as `SOURCE_FORMAT_ARRAY_ROWS`. */ function detectSourceFormat(data) { var sourceFormat = SOURCE_FORMAT_UNKNOWN; if (isTypedArray(data)) { sourceFormat = SOURCE_FORMAT_TYPED_ARRAY; } else if (isArray(data)) { // FIXME Whether tolerate null in top level array? if (data.length === 0) { sourceFormat = SOURCE_FORMAT_ARRAY_ROWS; } for (var i = 0, len = data.length; i < len; i++) { var item = data[i]; if (item == null) { continue; } else if (isArray(item)) { sourceFormat = SOURCE_FORMAT_ARRAY_ROWS; break; } else if (isObject(item)) { sourceFormat = SOURCE_FORMAT_OBJECT_ROWS; break; } } } else if (isObject(data)) { for (var key in data) { if (hasOwn(data, key) && isArrayLike(data[key])) { sourceFormat = SOURCE_FORMAT_KEYED_COLUMNS; break; } } } return sourceFormat; } /** * Determine the source definitions from data standalone dimensions definitions * are not specified. */ function determineSourceDimensions(data, sourceFormat, seriesLayoutBy, sourceHeader, // standalone raw dimensions definition, like: // { // dimensions: ['aa', 'bb', { name: 'cc', type: 'time' }] // } // in `dataset` or `series` dimensionsDefine) { var dimensionsDetectedCount; var startIndex; // PEDING: could data be null/undefined here? // currently, if `dataset.source` not specified, error thrown. // if `series.data` not specified, nothing rendered without error thrown. // Should test these cases. if (!data) { return { dimensionsDefine: normalizeDimensionsOption(dimensionsDefine), startIndex: startIndex, dimensionsDetectedCount: dimensionsDetectedCount }; } if (sourceFormat === SOURCE_FORMAT_ARRAY_ROWS) { var dataArrayRows = data; // Rule: Most of the first line are string: it is header. // Caution: consider a line with 5 string and 1 number, // it still can not be sure it is a head, because the // 5 string may be 5 values of category columns. if (sourceHeader === 'auto' || sourceHeader == null) { arrayRowsTravelFirst(function (val) { // '-' is regarded as null/undefined. if (val != null && val !== '-') { if (isString(val)) { startIndex == null && (startIndex = 1); } else { startIndex = 0; } } // 10 is an experience number, avoid long loop. }, seriesLayoutBy, dataArrayRows, 10); } else { startIndex = isNumber(sourceHeader) ? sourceHeader : sourceHeader ? 1 : 0; } if (!dimensionsDefine && startIndex === 1) { dimensionsDefine = []; arrayRowsTravelFirst(function (val, index) { dimensionsDefine[index] = val != null ? val + '' : ''; }, seriesLayoutBy, dataArrayRows, Infinity); } dimensionsDetectedCount = dimensionsDefine ? dimensionsDefine.length : seriesLayoutBy === SERIES_LAYOUT_BY_ROW ? dataArrayRows.length : dataArrayRows[0] ? dataArrayRows[0].length : null; } else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) { if (!dimensionsDefine) { dimensionsDefine = objectRowsCollectDimensions(data); } } else if (sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) { if (!dimensionsDefine) { dimensionsDefine = []; each(data, function (colArr, key) { dimensionsDefine.push(key); }); } } else if (sourceFormat === SOURCE_FORMAT_ORIGINAL) { var value0 = getDataItemValue(data[0]); dimensionsDetectedCount = isArray(value0) && value0.length || 1; } else if (sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) { if ("development" !== 'production') { assert(!!dimensionsDefine, 'dimensions must be given if data is TypedArray.'); } } return { startIndex: startIndex, dimensionsDefine: normalizeDimensionsOption(dimensionsDefine), dimensionsDetectedCount: dimensionsDetectedCount }; } function objectRowsCollectDimensions(data) { var firstIndex = 0; var obj; while (firstIndex < data.length && !(obj = data[firstIndex++])) {} // jshint ignore: line if (obj) { var dimensions_1 = []; each(obj, function (value, key) { dimensions_1.push(key); }); return dimensions_1; } } // Consider dimensions defined like ['A', 'price', 'B', 'price', 'C', 'price'], // which is reasonable. But dimension name is duplicated. // Returns undefined or an array contains only object without null/undefiend or string. function normalizeDimensionsOption(dimensionsDefine) { if (!dimensionsDefine) { // The meaning of null/undefined is different from empty array. return; } var nameMap = createHashMap(); return map(dimensionsDefine, function (rawItem, index) { rawItem = isObject(rawItem) ? rawItem : { name: rawItem }; // Other fields will be discarded. var item = { name: rawItem.name, displayName: rawItem.displayName, type: rawItem.type }; // User can set null in dimensions. // We dont auto specify name, othewise a given name may // cause it be refered unexpectedly. if (item.name == null) { return item; } // Also consider number form like 2012. item.name += ''; // User may also specify displayName. // displayName will always exists except user not // specified or dim name is not specified or detected. // (A auto generated dim name will not be used as // displayName). if (item.displayName == null) { item.displayName = item.name; } var exist = nameMap.get(item.name); if (!exist) { nameMap.set(item.name, { count: 1 }); } else { item.name += '-' + exist.count++; } return item; }); } function arrayRowsTravelFirst(cb, seriesLayoutBy, data, maxLoop) { if (seriesLayoutBy === SERIES_LAYOUT_BY_ROW) { for (var i = 0; i < data.length && i < maxLoop; i++) { cb(data[i] ? data[i][0] : null, i); } } else { var value0 = data[0] || []; for (var i = 0; i < value0.length && i < maxLoop; i++) { cb(value0[i], i); } } } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ var _a, _b, _c; // TODO var providerMethods; var mountMethods; /** * If normal array used, mutable chunk size is supported. * If typed array used, chunk size must be fixed. */ var DefaultDataProvider = /** @class */ function () { function DefaultDataProvider(sourceParam, dimSize) { // let source: Source; var source = !isSourceInstance(sourceParam) ? createSourceFromSeriesDataOption(sourceParam) : sourceParam; // declare source is Source; this._source = source; var data = this._data = source.data; // Typed array. TODO IE10+? if (source.sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) { if ("development" !== 'production') { if (dimSize == null) { throw new Error('Typed array data must specify dimension size'); } } this._offset = 0; this._dimSize = dimSize; this._data = data; } mountMethods(this, data, source); } DefaultDataProvider.prototype.getSource = function () { return this._source; }; DefaultDataProvider.prototype.count = function () { return 0; }; DefaultDataProvider.prototype.getItem = function (idx, out) { return; }; DefaultDataProvider.prototype.appendData = function (newData) {}; DefaultDataProvider.prototype.clean = function () {}; DefaultDataProvider.protoInitialize = function () { // PENDING: To avoid potential incompat (e.g., prototype // is visited somewhere), still init them on prototype. var proto = DefaultDataProvider.prototype; proto.pure = false; proto.persistent = true; }(); DefaultDataProvider.internalField = function () { var _a; mountMethods = function (provider, data, source) { var sourceFormat = source.sourceFormat; var seriesLayoutBy = source.seriesLayoutBy; var startIndex = source.startIndex; var dimsDef = source.dimensionsDefine; var methods = providerMethods[getMethodMapKey(sourceFormat, seriesLayoutBy)]; if ("development" !== 'production') { assert(methods, 'Invalide sourceFormat: ' + sourceFormat); } extend(provider, methods); if (sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) { provider.getItem = getItemForTypedArray; provider.count = countForTypedArray; provider.fillStorage = fillStorageForTypedArray; } else { var rawItemGetter = getRawSourceItemGetter(sourceFormat, seriesLayoutBy); provider.getItem = bind(rawItemGetter, null, data, startIndex, dimsDef); var rawCounter = getRawSourceDataCounter(sourceFormat, seriesLayoutBy); provider.count = bind(rawCounter, null, data, startIndex, dimsDef); } }; var getItemForTypedArray = function (idx, out) { idx = idx - this._offset; out = out || []; var data = this._data; var dimSize = this._dimSize; var offset = dimSize * idx; for (var i = 0; i < dimSize; i++) { out[i] = data[offset + i]; } return out; }; var fillStorageForTypedArray = function (start, end, storage, extent) { var data = this._data; var dimSize = this._dimSize; for (var dim = 0; dim < dimSize; dim++) { var dimExtent = extent[dim]; var min = dimExtent[0] == null ? Infinity : dimExtent[0]; var max = dimExtent[1] == null ? -Infinity : dimExtent[1]; var count = end - start; var arr = storage[dim]; for (var i = 0; i < count; i++) { // appendData with TypedArray will always do replace in provider. var val = data[i * dimSize + dim]; arr[start + i] = val; val < min && (min = val); val > max && (max = val); } dimExtent[0] = min; dimExtent[1] = max; } }; var countForTypedArray = function () { return this._data ? this._data.length / this._dimSize : 0; }; providerMethods = (_a = {}, _a[SOURCE_FORMAT_ARRAY_ROWS + '_' + SERIES_LAYOUT_BY_COLUMN] = { pure: true, appendData: appendDataSimply }, _a[SOURCE_FORMAT_ARRAY_ROWS + '_' + SERIES_LAYOUT_BY_ROW] = { pure: true, appendData: function () { throw new Error('Do not support appendData when set seriesLayoutBy: "row".'); } }, _a[SOURCE_FORMAT_OBJECT_ROWS] = { pure: true, appendData: appendDataSimply }, _a[SOURCE_FORMAT_KEYED_COLUMNS] = { pure: true, appendData: function (newData) { var data = this._data; each(newData, function (newCol, key) { var oldCol = data[key] || (data[key] = []); for (var i = 0; i < (newCol || []).length; i++) { oldCol.push(newCol[i]); } }); } }, _a[SOURCE_FORMAT_ORIGINAL] = { appendData: appendDataSimply }, _a[SOURCE_FORMAT_TYPED_ARRAY] = { persistent: false, pure: true, appendData: function (newData) { if ("development" !== 'production') { assert(isTypedArray(newData), 'Added data must be TypedArray if data in initialization is TypedArray'); } this._data = newData; }, // Clean self if data is already used. clean: function () { // PENDING this._offset += this.count(); this._data = null; } }, _a); function appendDataSimply(newData) { for (var i = 0; i < newData.length; i++) { this._data.push(newData[i]); } } }(); return DefaultDataProvider; }(); var getItemSimply = function (rawData, startIndex, dimsDef, idx) { return rawData[idx]; }; var rawSourceItemGetterMap = (_a = {}, _a[SOURCE_FORMAT_ARRAY_ROWS + '_' + SERIES_LAYOUT_BY_COLUMN] = function (rawData, startIndex, dimsDef, idx) { return rawData[idx + startIndex]; }, _a[SOURCE_FORMAT_ARRAY_ROWS + '_' + SERIES_LAYOUT_BY_ROW] = function (rawData, startIndex, dimsDef, idx) { idx += startIndex; var item = []; var data = rawData; for (var i = 0; i < data.length; i++) { var row = data[i]; item.push(row ? row[idx] : null); } return item; }, _a[SOURCE_FORMAT_OBJECT_ROWS] = getItemSimply, _a[SOURCE_FORMAT_KEYED_COLUMNS] = function (rawData, startIndex, dimsDef, idx) { var item = []; for (var i = 0; i < dimsDef.length; i++) { var dimName = dimsDef[i].name; if ("development" !== 'production') { if (dimName == null) { throw new Error(); } } var col = rawData[dimName]; item.push(col ? col[idx] : null); } return item; }, _a[SOURCE_FORMAT_ORIGINAL] = getItemSimply, _a); function getRawSourceItemGetter(sourceFormat, seriesLayoutBy) { var method = rawSourceItemGetterMap[getMethodMapKey(sourceFormat, seriesLayoutBy)]; if ("development" !== 'production') { assert(method, 'Do not suppport get item on "' + sourceFormat + '", "' + seriesLayoutBy + '".'); } return method; } var countSimply = function (rawData, startIndex, dimsDef) { return rawData.length; }; var rawSourceDataCounterMap = (_b = {}, _b[SOURCE_FORMAT_ARRAY_ROWS + '_' + SERIES_LAYOUT_BY_COLUMN] = function (rawData, startIndex, dimsDef) { return Math.max(0, rawData.length - startIndex); }, _b[SOURCE_FORMAT_ARRAY_ROWS + '_' + SERIES_LAYOUT_BY_ROW] = function (rawData, startIndex, dimsDef) { var row = rawData[0]; return row ? Math.max(0, row.length - startIndex) : 0; }, _b[SOURCE_FORMAT_OBJECT_ROWS] = countSimply, _b[SOURCE_FORMAT_KEYED_COLUMNS] = function (rawData, startIndex, dimsDef) { var dimName = dimsDef[0].name; if ("development" !== 'production') { if (dimName == null) { throw new Error(); } } var col = rawData[dimName]; return col ? col.length : 0; }, _b[SOURCE_FORMAT_ORIGINAL] = countSimply, _b); function getRawSourceDataCounter(sourceFormat, seriesLayoutBy) { var method = rawSourceDataCounterMap[getMethodMapKey(sourceFormat, seriesLayoutBy)]; if ("development" !== 'production') { assert(method, 'Do not suppport count on "' + sourceFormat + '", "' + seriesLayoutBy + '".'); } return method; } var getRawValueSimply = function (dataItem, dimIndex, dimName) { return dimIndex != null ? dataItem[dimIndex] : dataItem; }; var rawSourceValueGetterMap = (_c = {}, _c[SOURCE_FORMAT_ARRAY_ROWS] = getRawValueSimply, _c[SOURCE_FORMAT_OBJECT_ROWS] = function (dataItem, dimIndex, dimName) { return dimIndex != null ? dataItem[dimName] : dataItem; }, _c[SOURCE_FORMAT_KEYED_COLUMNS] = getRawValueSimply, _c[SOURCE_FORMAT_ORIGINAL] = function (dataItem, dimIndex, dimName) { // FIXME: In some case (markpoint in geo (geo-map.html)), // dataItem is {coord: [...]} var value = getDataItemValue(dataItem); return dimIndex == null || !(value instanceof Array) ? value : value[dimIndex]; }, _c[SOURCE_FORMAT_TYPED_ARRAY] = getRawValueSimply, _c); function getRawSourceValueGetter(sourceFormat) { var method = rawSourceValueGetterMap[sourceFormat]; if ("development" !== 'production') { assert(method, 'Do not suppport get value on "' + sourceFormat + '".'); } return method; } function getMethodMapKey(sourceFormat, seriesLayoutBy) { return sourceFormat === SOURCE_FORMAT_ARRAY_ROWS ? sourceFormat + '_' + seriesLayoutBy : sourceFormat; } // ??? FIXME can these logic be more neat: getRawValue, getRawDataItem, // Consider persistent. // Caution: why use raw value to display on label or tooltip? // A reason is to avoid format. For example time value we do not know // how to format is expected. More over, if stack is used, calculated // value may be 0.91000000001, which have brings trouble to display. // TODO: consider how to treat null/undefined/NaN when display? function retrieveRawValue(data, dataIndex, dim // If dimIndex is null/undefined, return OptionDataItem. // Otherwise, return OptionDataValue. ) { if (!data) { return; } // Consider data may be not persistent. var dataItem = data.getRawDataItem(dataIndex); if (dataItem == null) { return; } var sourceFormat = data.getProvider().getSource().sourceFormat; var dimName; var dimIndex; var dimInfo = data.getDimensionInfo(dim); if (dimInfo) { dimName = dimInfo.name; dimIndex = dimInfo.index; } return getRawSourceValueGetter(sourceFormat)(dataItem, dimIndex, dimName); } var DIMENSION_LABEL_REG = /\{@(.+?)\}/g; var DataFormatMixin = /** @class */ function () { function DataFormatMixin() {} /** * Get params for formatter */ DataFormatMixin.prototype.getDataParams = function (dataIndex, dataType) { var data = this.getData(dataType); var rawValue = this.getRawValue(dataIndex, dataType); var rawDataIndex = data.getRawIndex(dataIndex); var name = data.getName(dataIndex); var itemOpt = data.getRawDataItem(dataIndex); var style = data.getItemVisual(dataIndex, 'style'); var color = style && style[data.getItemVisual(dataIndex, 'drawType') || 'fill']; var borderColor = style && style.stroke; var mainType = this.mainType; var isSeries = mainType === 'series'; var userOutput = data.userOutput; return { componentType: mainType, componentSubType: this.subType, componentIndex: this.componentIndex, seriesType: isSeries ? this.subType : null, seriesIndex: this.seriesIndex, seriesId: isSeries ? this.id : null, seriesName: isSeries ? this.name : null, name: name, dataIndex: rawDataIndex, data: itemOpt, dataType: dataType, value: rawValue, color: color, borderColor: borderColor, dimensionNames: userOutput ? userOutput.dimensionNames : null, encode: userOutput ? userOutput.encode : null, // Param name list for mapping `a`, `b`, `c`, `d`, `e` $vars: ['seriesName', 'name', 'value'] }; }; /** * Format label * @param dataIndex * @param status 'normal' by default * @param dataType * @param labelDimIndex Only used in some chart that * use formatter in different dimensions, like radar. * @param formatter Formatter given outside. * @return return null/undefined if no formatter */ DataFormatMixin.prototype.getFormattedLabel = function (dataIndex, status, dataType, labelDimIndex, formatter, extendParams) { status = status || 'normal'; var data = this.getData(dataType); var params = this.getDataParams(dataIndex, dataType); if (extendParams) { params.value = extendParams.interpolatedValue; } if (labelDimIndex != null && isArray(params.value)) { params.value = params.value[labelDimIndex]; } if (!formatter) { var itemModel = data.getItemModel(dataIndex); // @ts-ignore formatter = itemModel.get(status === 'normal' ? ['label', 'formatter'] : [status, 'label', 'formatter']); } if (typeof formatter === 'function') { params.status = status; params.dimensionIndex = labelDimIndex; return formatter(params); } else if (typeof formatter === 'string') { var str = formatTpl(formatter, params); // Support 'aaa{@[3]}bbb{@product}ccc'. // Do not support '}' in dim name util have to. return str.replace(DIMENSION_LABEL_REG, function (origin, dimStr) { var len = dimStr.length; var dimLoose = dimStr.charAt(0) === '[' && dimStr.charAt(len - 1) === ']' ? +dimStr.slice(1, len - 1) // Also support: '[]' => 0 : dimStr; var val = retrieveRawValue(data, dataIndex, dimLoose); if (extendParams && isArray(extendParams.interpolatedValue)) { var dimInfo = data.getDimensionInfo(dimLoose); if (dimInfo) { val = extendParams.interpolatedValue[dimInfo.index]; } } return val != null ? val + '' : ''; }); } }; /** * Get raw value in option */ DataFormatMixin.prototype.getRawValue = function (idx, dataType) { return retrieveRawValue(this.getData(dataType), idx); }; /** * Should be implemented. * @param {number} dataIndex * @param {boolean} [multipleSeries=false] * @param {string} [dataType] */ DataFormatMixin.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { // Empty function return; }; return DataFormatMixin; }(); // but guess little chance has been used outside. Do we need to backward // compat it? // type TooltipFormatResultLegacyObject = { // // `html` means the markup language text, either in 'html' or 'richText'. // // The name `html` is not appropriate becuase in 'richText' it is not a HTML // // string. But still support it for backward compat. // html: string; // markers: Dictionary; // }; /** * For backward compat, normalize the return from `formatTooltip`. */ function normalizeTooltipFormatResult(result // markersExisting: Dictionary ) { var markupText; // let markers: Dictionary; var markupFragment; if (isObject(result)) { if (result.type) { markupFragment = result; } else { if ("development" !== 'production') { console.warn('The return type of `formatTooltip` is not supported: ' + makePrintable(result)); } } // else { // markupText = (result as TooltipFormatResultLegacyObject).html; // markers = (result as TooltipFormatResultLegacyObject).markers; // if (markersExisting) { // markers = zrUtil.merge(markersExisting, markers); // } // } } else { markupText = result; } return { markupText: markupText, // markers: markers || markersExisting, markupFragment: markupFragment }; } /** * @param {Object} define * @return See the return of `createTask`. */ function createTask(define) { return new Task(define); } var Task = /** @class */ function () { function Task(define) { define = define || {}; this._reset = define.reset; this._plan = define.plan; this._count = define.count; this._onDirty = define.onDirty; this._dirty = true; } /** * @param step Specified step. * @param skip Skip customer perform call. * @param modBy Sampling window size. * @param modDataCount Sampling count. * @return whether unfinished. */ Task.prototype.perform = function (performArgs) { var upTask = this._upstream; var skip = performArgs && performArgs.skip; // TODO some refactor. // Pull data. Must pull data each time, because context.data // may be updated by Series.setData. if (this._dirty && upTask) { var context = this.context; context.data = context.outputData = upTask.context.outputData; } if (this.__pipeline) { this.__pipeline.currentTask = this; } var planResult; if (this._plan && !skip) { planResult = this._plan(this.context); } // Support sharding by mod, which changes the render sequence and makes the rendered graphic // elements uniformed distributed when progress, especially when moving or zooming. var lastModBy = normalizeModBy(this._modBy); var lastModDataCount = this._modDataCount || 0; var modBy = normalizeModBy(performArgs && performArgs.modBy); var modDataCount = performArgs && performArgs.modDataCount || 0; if (lastModBy !== modBy || lastModDataCount !== modDataCount) { planResult = 'reset'; } function normalizeModBy(val) { !(val >= 1) && (val = 1); // jshint ignore:line return val; } var forceFirstProgress; if (this._dirty || planResult === 'reset') { this._dirty = false; forceFirstProgress = this._doReset(skip); } this._modBy = modBy; this._modDataCount = modDataCount; var step = performArgs && performArgs.step; if (upTask) { if ("development" !== 'production') { assert(upTask._outputDueEnd != null); } this._dueEnd = upTask._outputDueEnd; } // DataTask or overallTask else { if ("development" !== 'production') { assert(!this._progress || this._count); } this._dueEnd = this._count ? this._count(this.context) : Infinity; } // Note: Stubs, that its host overall task let it has progress, has progress. // If no progress, pass index from upstream to downstream each time plan called. if (this._progress) { var start = this._dueIndex; var end = Math.min(step != null ? this._dueIndex + step : Infinity, this._dueEnd); if (!skip && (forceFirstProgress || start < end)) { var progress = this._progress; if (isArray(progress)) { for (var i = 0; i < progress.length; i++) { this._doProgress(progress[i], start, end, modBy, modDataCount); } } else { this._doProgress(progress, start, end, modBy, modDataCount); } } this._dueIndex = end; // If no `outputDueEnd`, assume that output data and // input data is the same, so use `dueIndex` as `outputDueEnd`. var outputDueEnd = this._settedOutputEnd != null ? this._settedOutputEnd : end; if ("development" !== 'production') { // ??? Can not rollback. assert(outputDueEnd >= this._outputDueEnd); } this._outputDueEnd = outputDueEnd; } else { // (1) Some overall task has no progress. // (2) Stubs, that its host overall task do not let it has progress, has no progress. // This should always be performed so it can be passed to downstream. this._dueIndex = this._outputDueEnd = this._settedOutputEnd != null ? this._settedOutputEnd : this._dueEnd; } return this.unfinished(); }; Task.prototype.dirty = function () { this._dirty = true; this._onDirty && this._onDirty(this.context); }; Task.prototype._doProgress = function (progress, start, end, modBy, modDataCount) { iterator.reset(start, end, modBy, modDataCount); this._callingProgress = progress; this._callingProgress({ start: start, end: end, count: end - start, next: iterator.next }, this.context); }; Task.prototype._doReset = function (skip) { this._dueIndex = this._outputDueEnd = this._dueEnd = 0; this._settedOutputEnd = null; var progress; var forceFirstProgress; if (!skip && this._reset) { progress = this._reset(this.context); if (progress && progress.progress) { forceFirstProgress = progress.forceFirstProgress; progress = progress.progress; } // To simplify no progress checking, array must has item. if (isArray(progress) && !progress.length) { progress = null; } } this._progress = progress; this._modBy = this._modDataCount = null; var downstream = this._downstream; downstream && downstream.dirty(); return forceFirstProgress; }; Task.prototype.unfinished = function () { return this._progress && this._dueIndex < this._dueEnd; }; /** * @param downTask The downstream task. * @return The downstream task. */ Task.prototype.pipe = function (downTask) { if ("development" !== 'production') { assert(downTask && !downTask._disposed && downTask !== this); } // If already downstream, do not dirty downTask. if (this._downstream !== downTask || this._dirty) { this._downstream = downTask; downTask._upstream = this; downTask.dirty(); } }; Task.prototype.dispose = function () { if (this._disposed) { return; } this._upstream && (this._upstream._downstream = null); this._downstream && (this._downstream._upstream = null); this._dirty = false; this._disposed = true; }; Task.prototype.getUpstream = function () { return this._upstream; }; Task.prototype.getDownstream = function () { return this._downstream; }; Task.prototype.setOutputEnd = function (end) { // This only happend in dataTask, dataZoom, map, currently. // where dataZoom do not set end each time, but only set // when reset. So we should record the setted end, in case // that the stub of dataZoom perform again and earse the // setted end by upstream. this._outputDueEnd = this._settedOutputEnd = end; }; return Task; }(); var iterator = function () { var end; var current; var modBy; var modDataCount; var winCount; var it = { reset: function (s, e, sStep, sCount) { current = s; end = e; modBy = sStep; modDataCount = sCount; winCount = Math.ceil(modDataCount / modBy); it.next = modBy > 1 && modDataCount > 0 ? modNext : sequentialNext; } }; return it; function sequentialNext() { return current < end ? current++ : null; } function modNext() { var dataIndex = current % winCount * modBy + Math.ceil(current / winCount); var result = current >= end ? null : dataIndex < modDataCount ? dataIndex // If modDataCount is smaller than data.count() (consider `appendData` case), // Use normal linear rendering mode. : current; current++; return result; } }(); /////////////////////////////////////////////////////////// // For stream debug (Should be commented out after used!) // @usage: printTask(this, 'begin'); // @usage: printTask(this, null, {someExtraProp}); // @usage: Use `__idxInPipeline` as conditional breakpiont. // // window.printTask = function (task: any, prefix: string, extra: { [key: string]: unknown }): void { // window.ecTaskUID == null && (window.ecTaskUID = 0); // task.uidDebug == null && (task.uidDebug = `task_${window.ecTaskUID++}`); // task.agent && task.agent.uidDebug == null && (task.agent.uidDebug = `task_${window.ecTaskUID++}`); // let props = []; // if (task.__pipeline) { // let val = `${task.__idxInPipeline}/${task.__pipeline.tail.__idxInPipeline} ${task.agent ? '(stub)' : ''}`; // props.push({text: '__idxInPipeline/total', value: val}); // } else { // let stubCount = 0; // task.agentStubMap.each(() => stubCount++); // props.push({text: 'idx', value: `overall (stubs: ${stubCount})`}); // } // props.push({text: 'uid', value: task.uidDebug}); // if (task.__pipeline) { // props.push({text: 'pipelineId', value: task.__pipeline.id}); // task.agent && props.push( // {text: 'stubFor', value: task.agent.uidDebug} // ); // } // props.push( // {text: 'dirty', value: task._dirty}, // {text: 'dueIndex', value: task._dueIndex}, // {text: 'dueEnd', value: task._dueEnd}, // {text: 'outputDueEnd', value: task._outputDueEnd} // ); // if (extra) { // Object.keys(extra).forEach(key => { // props.push({text: key, value: extra[key]}); // }); // } // let args = ['color: blue']; // let msg = `%c[${prefix || 'T'}] %c` + props.map(item => ( // args.push('color: green', 'color: red'), // `${item.text}: %c${item.value}` // )).join('%c, '); // console.log.apply(console, [msg].concat(args)); // // console.log(this); // }; // window.printPipeline = function (task: any, prefix: string) { // const pipeline = task.__pipeline; // let currTask = pipeline.head; // while (currTask) { // window.printTask(currTask, prefix); // currTask = currTask._downstream; // } // }; // window.showChain = function (chainHeadTask) { // var chain = []; // var task = chainHeadTask; // while (task) { // chain.push({ // task: task, // up: task._upstream, // down: task._downstream, // idxInPipeline: task.__idxInPipeline // }); // task = task._downstream; // } // return chain; // }; // window.findTaskInChain = function (task, chainHeadTask) { // let chain = window.showChain(chainHeadTask); // let result = []; // for (let i = 0; i < chain.length; i++) { // let chainItem = chain[i]; // if (chainItem.task === task) { // result.push(i); // } // } // return result; // }; // window.printChainAEachInChainB = function (chainHeadTaskA, chainHeadTaskB) { // let chainA = window.showChain(chainHeadTaskA); // for (let i = 0; i < chainA.length; i++) { // console.log('chainAIdx:', i, 'inChainB:', window.findTaskInChain(chainA[i].task, chainHeadTaskB)); // } // }; /** * Convert raw the value in to inner value in List. * * [Performance sensitive] * * [Caution]: this is the key logic of user value parser. * For backward compatibiliy, do not modify it until have to! */ function parseDataValue(value, // For high performance, do not omit the second param. opt) { // Performance sensitive. var dimType = opt && opt.type; if (dimType === 'ordinal') { // If given value is a category string var ordinalMeta = opt && opt.ordinalMeta; return ordinalMeta ? ordinalMeta.parseAndCollect(value) : value; } if (dimType === 'time' // spead up when using timestamp && typeof value !== 'number' && value != null && value !== '-') { value = +parseDate(value); } // dimType defaults 'number'. // If dimType is not ordinal and value is null or undefined or NaN or '-', // parse to NaN. // number-like string (like ' 123 ') can be converted to a number. // where null/undefined or other string will be converted to NaN. return value == null || value === '' ? NaN // If string (like '-'), using '+' parse to NaN // If object, also parse to NaN : +value; } var valueParserMap = createHashMap({ 'number': function (val) { // Do not use `numericToNumber` here. We have by defualt `numericToNumber`. // Here the number parser can have loose rule: // enable to cut suffix: "120px" => 120, "14%" => 14. return parseFloat(val); }, 'time': function (val) { // return timestamp. return +parseDate(val); }, 'trim': function (val) { return typeof val === 'string' ? trim(val) : val; } }); function getRawValueParser(type) { return valueParserMap.get(type); } var ORDER_COMPARISON_OP_MAP = { lt: function (lval, rval) { return lval < rval; }, lte: function (lval, rval) { return lval <= rval; }, gt: function (lval, rval) { return lval > rval; }, gte: function (lval, rval) { return lval >= rval; } }; var FilterOrderComparator = /** @class */ function () { function FilterOrderComparator(op, rval) { if (typeof rval !== 'number') { var errMsg = ''; if ("development" !== 'production') { errMsg = 'rvalue of "<", ">", "<=", ">=" can only be number in filter.'; } throwError(errMsg); } this._opFn = ORDER_COMPARISON_OP_MAP[op]; this._rvalFloat = numericToNumber(rval); } // Performance sensitive. FilterOrderComparator.prototype.evaluate = function (lval) { // Most cases is 'number', and typeof maybe 10 times faseter than parseFloat. return typeof lval === 'number' ? this._opFn(lval, this._rvalFloat) : this._opFn(numericToNumber(lval), this._rvalFloat); }; return FilterOrderComparator; }(); var SortOrderComparator = /** @class */ function () { /** * @param order by defualt: 'asc' * @param incomparable by defualt: Always on the tail. * That is, if 'asc' => 'max', if 'desc' => 'min' * See the definition of "incomparable" in [SORT_COMPARISON_RULE] */ function SortOrderComparator(order, incomparable) { var isDesc = order === 'desc'; this._resultLT = isDesc ? 1 : -1; if (incomparable == null) { incomparable = isDesc ? 'min' : 'max'; } this._incomparable = incomparable === 'min' ? -Infinity : Infinity; } // See [SORT_COMPARISON_RULE]. // Performance sensitive. SortOrderComparator.prototype.evaluate = function (lval, rval) { // Most cases is 'number', and typeof maybe 10 times faseter than parseFloat. var lvalTypeof = typeof lval; var rvalTypeof = typeof rval; var lvalFloat = lvalTypeof === 'number' ? lval : numericToNumber(lval); var rvalFloat = rvalTypeof === 'number' ? rval : numericToNumber(rval); var lvalNotNumeric = isNaN(lvalFloat); var rvalNotNumeric = isNaN(rvalFloat); if (lvalNotNumeric) { lvalFloat = this._incomparable; } if (rvalNotNumeric) { rvalFloat = this._incomparable; } if (lvalNotNumeric && rvalNotNumeric) { var lvalIsStr = lvalTypeof === 'string'; var rvalIsStr = rvalTypeof === 'string'; if (lvalIsStr) { lvalFloat = rvalIsStr ? lval : 0; } if (rvalIsStr) { rvalFloat = lvalIsStr ? rval : 0; } } return lvalFloat < rvalFloat ? this._resultLT : lvalFloat > rvalFloat ? -this._resultLT : 0; }; return SortOrderComparator; }(); var FilterEqualityComparator = /** @class */ function () { function FilterEqualityComparator(isEq, rval) { this._rval = rval; this._isEQ = isEq; this._rvalTypeof = typeof rval; this._rvalFloat = numericToNumber(rval); } // Performance sensitive. FilterEqualityComparator.prototype.evaluate = function (lval) { var eqResult = lval === this._rval; if (!eqResult) { var lvalTypeof = typeof lval; if (lvalTypeof !== this._rvalTypeof && (lvalTypeof === 'number' || this._rvalTypeof === 'number')) { eqResult = numericToNumber(lval) === this._rvalFloat; } } return this._isEQ ? eqResult : !eqResult; }; return FilterEqualityComparator; }(); /** * [FILTER_COMPARISON_RULE] * `lt`|`lte`|`gt`|`gte`: * + rval must be a number. And lval will be converted to number (`numericToNumber`) to compare. * `eq`: * + If same type, compare with `===`. * + If there is one number, convert to number (`numericToNumber`) to compare. * + Else return `false`. * `ne`: * + Not `eq`. * * * [SORT_COMPARISON_RULE] * All the values are grouped into three categories: * + "numeric" (number and numeric string) * + "non-numeric-string" (string that excluding numeric string) * + "others" * "numeric" vs "numeric": values are ordered by number order. * "non-numeric-string" vs "non-numeric-string": values are ordered by ES spec (#sec-abstract-relational-comparison). * "others" vs "others": do not change order (always return 0). * "numeric" vs "non-numeric-string": "non-numeric-string" is treated as "incomparable". * "number" vs "others": "others" is treated as "incomparable". * "non-numeric-string" vs "others": "others" is treated as "incomparable". * "incomparable" will be seen as -Infinity or Infinity (depends on the settings). * MEMO: * non-numeric string sort make sence when need to put the items with the same tag together. * But if we support string sort, we still need to avoid the misleading like `'2' > '12'`, * So we treat "numeric-string" sorted by number order rather than string comparison. * * * [CHECK_LIST_OF_THE_RULE_DESIGN] * + Do not support string comparison until required. And also need to * void the misleading of "2" > "12". * + Should avoid the misleading case: * `" 22 " gte "22"` is `true` but `" 22 " eq "22"` is `false`. * + JS bad case should be avoided: null <= 0, [] <= 0, ' ' <= 0, ... * + Only "numeric" can be converted to comparable number, otherwise converted to NaN. * See `util/number.ts#numericToNumber`. * * @return If `op` is not `RelationalOperator`, return null; */ function createFilterComparator(op, rval) { return op === 'eq' || op === 'ne' ? new FilterEqualityComparator(op === 'eq', rval) : hasOwn(ORDER_COMPARISON_OP_MAP, op) ? new FilterOrderComparator(op, rval) : null; } /** * TODO: disable writable. * This structure will be exposed to users. */ var ExternalSource = /** @class */ function () { function ExternalSource() {} ExternalSource.prototype.getRawData = function () { // Only built-in transform available. throw new Error('not supported'); }; ExternalSource.prototype.getRawDataItem = function (dataIndex) { // Only built-in transform available. throw new Error('not supported'); }; ExternalSource.prototype.cloneRawData = function () { return; }; /** * @return If dimension not found, return null/undefined. */ ExternalSource.prototype.getDimensionInfo = function (dim) { return; }; /** * dimensions defined if and only if either: * (a) dataset.dimensions are declared. * (b) dataset data include dimensions definitions in data (detected or via specified `sourceHeader`). * If dimensions are defined, `dimensionInfoAll` is corresponding to * the defined dimensions. * Otherwise, `dimensionInfoAll` is determined by data columns. * @return Always return an array (even empty array). */ ExternalSource.prototype.cloneAllDimensionInfo = function () { return; }; ExternalSource.prototype.count = function () { return; }; /** * Only support by dimension index. * No need to support by dimension name in transform function, * becuase transform function is not case-specific, no need to use name literally. */ ExternalSource.prototype.retrieveValue = function (dataIndex, dimIndex) { return; }; ExternalSource.prototype.retrieveValueFromItem = function (dataItem, dimIndex) { return; }; ExternalSource.prototype.convertValue = function (rawVal, dimInfo) { return parseDataValue(rawVal, dimInfo); }; return ExternalSource; }(); function createExternalSource(internalSource, externalTransform) { var extSource = new ExternalSource(); var data = internalSource.data; var sourceFormat = extSource.sourceFormat = internalSource.sourceFormat; var sourceHeaderCount = internalSource.startIndex; var errMsg = ''; if (internalSource.seriesLayoutBy !== SERIES_LAYOUT_BY_COLUMN) { // For the logic simplicity in transformer, only 'culumn' is // supported in data transform. Otherwise, the `dimensionsDefine` // might be detected by 'row', which probably confuses users. if ("development" !== 'production') { errMsg = '`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'; } throwError(errMsg); } // [MEMO] // Create a new dimensions structure for exposing. // Do not expose all dimension info to users directly. // Becuase the dimension is probably auto detected from data and not might reliable. // Should not lead the transformers to think that is relialbe and return it. // See [DIMENSION_INHERIT_RULE] in `sourceManager.ts`. var dimensions = []; var dimsByName = {}; var dimsDef = internalSource.dimensionsDefine; if (dimsDef) { each(dimsDef, function (dimDef, idx) { var name = dimDef.name; var dimDefExt = { index: idx, name: name, displayName: dimDef.displayName }; dimensions.push(dimDefExt); // Users probably not sepcify dimension name. For simplicity, data transform // do not generate dimension name. if (name != null) { // Dimension name should not be duplicated. // For simplicity, data transform forbid name duplication, do not generate // new name like module `completeDimensions.ts` did, but just tell users. var errMsg_1 = ''; if (hasOwn(dimsByName, name)) { if ("development" !== 'production') { errMsg_1 = 'dimension name "' + name + '" duplicated.'; } throwError(errMsg_1); } dimsByName[name] = dimDefExt; } }); } // If dimension definitions are not defined and can not be detected. // e.g., pure data `[[11, 22], ...]`. else { for (var i = 0; i < internalSource.dimensionsDetectedCount || 0; i++) { // Do not generete name or anything others. The consequence process in // `transform` or `series` probably have there own name generation strategry. dimensions.push({ index: i }); } } // Implement public methods: var rawItemGetter = getRawSourceItemGetter(sourceFormat, SERIES_LAYOUT_BY_COLUMN); if (externalTransform.__isBuiltIn) { extSource.getRawDataItem = function (dataIndex) { return rawItemGetter(data, sourceHeaderCount, dimensions, dataIndex); }; extSource.getRawData = bind(getRawData, null, internalSource); } extSource.cloneRawData = bind(cloneRawData, null, internalSource); var rawCounter = getRawSourceDataCounter(sourceFormat, SERIES_LAYOUT_BY_COLUMN); extSource.count = bind(rawCounter, null, data, sourceHeaderCount, dimensions); var rawValueGetter = getRawSourceValueGetter(sourceFormat); extSource.retrieveValue = function (dataIndex, dimIndex) { var rawItem = rawItemGetter(data, sourceHeaderCount, dimensions, dataIndex); return retrieveValueFromItem(rawItem, dimIndex); }; var retrieveValueFromItem = extSource.retrieveValueFromItem = function (dataItem, dimIndex) { if (dataItem == null) { return; } var dimDef = dimensions[dimIndex]; // When `dimIndex` is `null`, `rawValueGetter` return the whole item. if (dimDef) { return rawValueGetter(dataItem, dimIndex, dimDef.name); } }; extSource.getDimensionInfo = bind(getDimensionInfo, null, dimensions, dimsByName); extSource.cloneAllDimensionInfo = bind(cloneAllDimensionInfo, null, dimensions); return extSource; } function getRawData(upstream) { var sourceFormat = upstream.sourceFormat; if (!isSupportedSourceFormat(sourceFormat)) { var errMsg = ''; if ("development" !== 'production') { errMsg = '`getRawData` is not supported in source format ' + sourceFormat; } throwError(errMsg); } return upstream.data; } function cloneRawData(upstream) { var sourceFormat = upstream.sourceFormat; var data = upstream.data; if (!isSupportedSourceFormat(sourceFormat)) { var errMsg = ''; if ("development" !== 'production') { errMsg = '`cloneRawData` is not supported in source format ' + sourceFormat; } throwError(errMsg); } if (sourceFormat === SOURCE_FORMAT_ARRAY_ROWS) { var result = []; for (var i = 0, len = data.length; i < len; i++) { // Not strictly clone for performance result.push(data[i].slice()); } return result; } else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) { var result = []; for (var i = 0, len = data.length; i < len; i++) { // Not strictly clone for performance result.push(extend({}, data[i])); } return result; } } function getDimensionInfo(dimensions, dimsByName, dim) { if (dim == null) { return; } // Keep the same logic as `List::getDimension` did. if (typeof dim === 'number' // If being a number-like string but not being defined a dimension name. || !isNaN(dim) && !hasOwn(dimsByName, dim)) { return dimensions[dim]; } else if (hasOwn(dimsByName, dim)) { return dimsByName[dim]; } } function cloneAllDimensionInfo(dimensions) { return clone(dimensions); } var externalTransformMap = createHashMap(); function registerExternalTransform(externalTransform) { externalTransform = clone(externalTransform); var type = externalTransform.type; var errMsg = ''; if (!type) { if ("development" !== 'production') { errMsg = 'Must have a `type` when `registerTransform`.'; } throwError(errMsg); } var typeParsed = type.split(':'); if (typeParsed.length !== 2) { if ("development" !== 'production') { errMsg = 'Name must include namespace like "ns:regression".'; } throwError(errMsg); } // Namespace 'echarts:xxx' is official namespace, where the transforms should // be called directly via 'xxx' rather than 'echarts:xxx'. var isBuiltIn = false; if (typeParsed[0] === 'echarts') { type = typeParsed[1]; isBuiltIn = true; } externalTransform.__isBuiltIn = isBuiltIn; externalTransformMap.set(type, externalTransform); } function applyDataTransform(rawTransOption, sourceList, infoForPrint) { var pipedTransOption = normalizeToArray(rawTransOption); var pipeLen = pipedTransOption.length; var errMsg = ''; if (!pipeLen) { if ("development" !== 'production') { errMsg = 'If `transform` declared, it should at least contain one transform.'; } throwError(errMsg); } for (var i = 0, len = pipeLen; i < len; i++) { var transOption = pipedTransOption[i]; sourceList = applySingleDataTransform(transOption, sourceList, infoForPrint, pipeLen === 1 ? null : i); // piped transform only support single input, except the fist one. // piped transform only support single output, except the last one. if (i !== len - 1) { sourceList.length = Math.max(sourceList.length, 1); } } return sourceList; } function applySingleDataTransform(transOption, upSourceList, infoForPrint, // If `pipeIndex` is null/undefined, no piped transform. pipeIndex) { var errMsg = ''; if (!upSourceList.length) { if ("development" !== 'production') { errMsg = 'Must have at least one upstream dataset.'; } throwError(errMsg); } if (!isObject(transOption)) { if ("development" !== 'production') { errMsg = 'transform declaration must be an object rather than ' + typeof transOption + '.'; } throwError(errMsg); } var transType = transOption.type; var externalTransform = externalTransformMap.get(transType); if (!externalTransform) { if ("development" !== 'production') { errMsg = 'Can not find transform on type "' + transType + '".'; } throwError(errMsg); } // Prepare source var extUpSourceList = map(upSourceList, function (upSource) { return createExternalSource(upSource, externalTransform); }); var resultList = normalizeToArray(externalTransform.transform({ upstream: extUpSourceList[0], upstreamList: extUpSourceList, config: clone(transOption.config) })); if ("development" !== 'production') { if (transOption.print) { var printStrArr = map(resultList, function (extSource) { var pipeIndexStr = pipeIndex != null ? ' === pipe index: ' + pipeIndex : ''; return ['=== dataset index: ' + infoForPrint.datasetIndex + pipeIndexStr + ' ===', '- transform result data:', makePrintable(extSource.data), '- transform result dimensions:', makePrintable(extSource.dimensions)].join('\n'); }).join('\n'); consoleLog(printStrArr); } } return map(resultList, function (result, resultIndex) { var errMsg = ''; if (!isObject(result)) { if ("development" !== 'production') { errMsg = 'A transform should not return some empty results.'; } throwError(errMsg); } if (!result.data) { if ("development" !== 'production') { errMsg = 'Transform result data should be not be null or undefined'; } throwError(errMsg); } var sourceFormat = detectSourceFormat(result.data); if (!isSupportedSourceFormat(sourceFormat)) { if ("development" !== 'production') { errMsg = 'Transform result data should be array rows or object rows.'; } throwError(errMsg); } var resultMetaRawOption; var firstUpSource = upSourceList[0]; /** * Intuitively, the end users known the content of the original `dataset.source`, * calucating the transform result in mind. * Suppose the original `dataset.source` is: * ```js * [ * ['product', '2012', '2013', '2014', '2015'], * ['AAA', 41.1, 30.4, 65.1, 53.3], * ['BBB', 86.5, 92.1, 85.7, 83.1], * ['CCC', 24.1, 67.2, 79.5, 86.4] * ] * ``` * The dimension info have to be detected from the source data. * Some of the transformers (like filter, sort) will follow the dimension info * of upstream, while others use new dimensions (like aggregate). * Transformer can output a field `dimensions` to define the its own output dimensions. * We also allow transformers to ignore the output `dimensions` field, and * inherit the upstream dimensions definition. It can reduce the burden of handling * dimensions in transformers. * * See also [DIMENSION_INHERIT_RULE] in `sourceManager.ts`. */ if (firstUpSource && resultIndex === 0 // If transformer returns `dimensions`, it means that the transformer has different // dimensions definitions. We do not inherit anything from upstream. && !result.dimensions) { var startIndex = firstUpSource.startIndex; // We copy the header of upstream to the result becuase: // (1) The returned data always does not contain header line and can not be used // as dimension-detection. In this case we can not use "detected dimensions" of // upstream directly, because it might be detected based on different `seriesLayoutBy`. // (2) We should support that the series read the upstream source in `seriesLayoutBy: 'row'`. // So the original detected header should be add to the result, otherwise they can not be read. if (startIndex) { result.data = firstUpSource.data.slice(0, startIndex).concat(result.data); } resultMetaRawOption = { seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN, sourceHeader: startIndex, dimensions: firstUpSource.metaRawOption.dimensions }; } else { resultMetaRawOption = { seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN, sourceHeader: 0, dimensions: result.dimensions }; } return createSource(result.data, resultMetaRawOption, null, null); }); } function isSupportedSourceFormat(sourceFormat) { return sourceFormat === SOURCE_FORMAT_ARRAY_ROWS || sourceFormat === SOURCE_FORMAT_OBJECT_ROWS; } /** * [REQUIREMENT_MEMO]: * (0) `metaRawOption` means `dimensions`/`sourceHeader`/`seriesLayoutBy` in raw option. * (1) Keep support the feature: `metaRawOption` can be specified both on `series` and * `root-dataset`. Them on `series` has higher priority. * (2) Do not support to set `metaRawOption` on a `non-root-dataset`, because it might * confuse users: whether those props indicate how to visit the upstream source or visit * the transform result source, and some transforms has nothing to do with these props, * and some transforms might have multiple upstream. * (3) Transforms should specify `metaRawOption` in each output, just like they can be * declared in `root-dataset`. * (4) At present only support visit source in `SERIES_LAYOUT_BY_COLUMN` in transforms. * That is for reducing complexity in transfroms. * PENDING: Whether to provide transposition transform? * * [IMPLEMENTAION_MEMO]: * "sourceVisitConfig" are calculated from `metaRawOption` and `data`. * They will not be calculated until `source` is about to be visited (to prevent from * duplicate calcuation). `source` is visited only in series and input to transforms. * * [DIMENSION_INHERIT_RULE]: * By default the dimensions are inherited from ancestors, unless a transform return * a new dimensions definition. * Consider the case: * ```js * dataset: [{ * source: [ ['Product', 'Sales', 'Prise'], ['Cookies', 321, 44.21], ...] * }, { * transform: { type: 'filter', ... } * }] * dataset: [{ * dimension: ['Product', 'Sales', 'Prise'], * source: [ ['Cookies', 321, 44.21], ...] * }, { * transform: { type: 'filter', ... } * }] * ``` * The two types of option should have the same behavior after transform. * * * [SCENARIO]: * (1) Provide source data directly: * ```js * series: { * encode: {...}, * dimensions: [...] * seriesLayoutBy: 'row', * data: [[...]] * } * ``` * (2) Series refer to dataset. * ```js * series: [{ * encode: {...} * // Ignore datasetIndex means `datasetIndex: 0` * // and the dimensions defination in dataset is used * }, { * encode: {...}, * seriesLayoutBy: 'column', * datasetIndex: 1 * }] * ``` * (3) dataset transform * ```js * dataset: [{ * source: [...] * }, { * source: [...] * }, { * // By default from 0. * transform: { type: 'filter', config: {...} } * }, { * // Piped. * transform: [ * { type: 'filter', config: {...} }, * { type: 'sort', config: {...} } * ] * }, { * id: 'regressionData', * fromDatasetIndex: 1, * // Third-party transform * transform: { type: 'ecStat:regression', config: {...} } * }, { * // retrieve the extra result. * id: 'regressionFormula', * fromDatasetId: 'regressionData', * fromTransformResult: 1 * }] * ``` */ var SourceManager = /** @class */ function () { function SourceManager(sourceHost) { // Cached source. Do not repeat calculating if not dirty. this._sourceList = []; // version sign of each upstream source manager. this._upstreamSignList = []; this._versionSignBase = 0; this._sourceHost = sourceHost; } /** * Mark dirty. */ SourceManager.prototype.dirty = function () { this._setLocalSource([], []); }; SourceManager.prototype._setLocalSource = function (sourceList, upstreamSignList) { this._sourceList = sourceList; this._upstreamSignList = upstreamSignList; this._versionSignBase++; if (this._versionSignBase > 9e10) { this._versionSignBase = 0; } }; /** * For detecting whether the upstream source is dirty, so that * the local cached source (in `_sourceList`) should be discarded. */ SourceManager.prototype._getVersionSign = function () { return this._sourceHost.uid + '_' + this._versionSignBase; }; /** * Always return a source instance. Otherwise throw error. */ SourceManager.prototype.prepareSource = function () { // For the case that call `setOption` multiple time but no data changed, // cache the result source to prevent from repeating transform. if (this._isDirty()) { this._createSource(); } }; SourceManager.prototype._createSource = function () { this._setLocalSource([], []); var sourceHost = this._sourceHost; var upSourceMgrList = this._getUpstreamSourceManagers(); var hasUpstream = !!upSourceMgrList.length; var resultSourceList; var upstreamSignList; if (isSeries(sourceHost)) { var seriesModel = sourceHost; var data = void 0; var sourceFormat = void 0; var upSource = void 0; // Has upstream dataset if (hasUpstream) { var upSourceMgr = upSourceMgrList[0]; upSourceMgr.prepareSource(); upSource = upSourceMgr.getSource(); data = upSource.data; sourceFormat = upSource.sourceFormat; upstreamSignList = [upSourceMgr._getVersionSign()]; } // Series data is from own. else { data = seriesModel.get('data', true); sourceFormat = isTypedArray(data) ? SOURCE_FORMAT_TYPED_ARRAY : SOURCE_FORMAT_ORIGINAL; upstreamSignList = []; } // See [REQUIREMENT_MEMO], merge settings on series and parent dataset if it is root. var newMetaRawOption = this._getSourceMetaRawOption(); var upMetaRawOption = upSource ? upSource.metaRawOption : null; var seriesLayoutBy = retrieve2(newMetaRawOption.seriesLayoutBy, upMetaRawOption ? upMetaRawOption.seriesLayoutBy : null); var sourceHeader = retrieve2(newMetaRawOption.sourceHeader, upMetaRawOption ? upMetaRawOption.sourceHeader : null); // Note here we should not use `upSource.dimensionsDefine`. Consider the case: // `upSource.dimensionsDefine` is detected by `seriesLayoutBy: 'column'`, // but series need `seriesLayoutBy: 'row'`. var dimensions = retrieve2(newMetaRawOption.dimensions, upMetaRawOption ? upMetaRawOption.dimensions : null); resultSourceList = [createSource(data, { seriesLayoutBy: seriesLayoutBy, sourceHeader: sourceHeader, dimensions: dimensions }, sourceFormat, seriesModel.get('encode', true))]; } else { var datasetModel = sourceHost; // Has upstream dataset. if (hasUpstream) { var result = this._applyTransform(upSourceMgrList); resultSourceList = result.sourceList; upstreamSignList = result.upstreamSignList; } // Is root dataset. else { var sourceData = datasetModel.get('source', true); resultSourceList = [createSource(sourceData, this._getSourceMetaRawOption(), null, // Note: dataset option does not have `encode`. null)]; upstreamSignList = []; } } if ("development" !== 'production') { assert(resultSourceList && upstreamSignList); } this._setLocalSource(resultSourceList, upstreamSignList); }; SourceManager.prototype._applyTransform = function (upMgrList) { var datasetModel = this._sourceHost; var transformOption = datasetModel.get('transform', true); var fromTransformResult = datasetModel.get('fromTransformResult', true); if ("development" !== 'production') { assert(fromTransformResult != null || transformOption != null); } if (fromTransformResult != null) { var errMsg = ''; if (upMgrList.length !== 1) { if ("development" !== 'production') { errMsg = 'When using `fromTransformResult`, there should be only one upstream dataset'; } doThrow(errMsg); } } var sourceList; var upSourceList = []; var upstreamSignList = []; each(upMgrList, function (upMgr) { upMgr.prepareSource(); var upSource = upMgr.getSource(fromTransformResult || 0); var errMsg = ''; if (fromTransformResult != null && !upSource) { if ("development" !== 'production') { errMsg = 'Can not retrieve result by `fromTransformResult`: ' + fromTransformResult; } doThrow(errMsg); } upSourceList.push(upSource); upstreamSignList.push(upMgr._getVersionSign()); }); if (transformOption) { sourceList = applyDataTransform(transformOption, upSourceList, { datasetIndex: datasetModel.componentIndex }); } else if (fromTransformResult != null) { sourceList = [cloneSourceShallow(upSourceList[0])]; } return { sourceList: sourceList, upstreamSignList: upstreamSignList }; }; SourceManager.prototype._isDirty = function () { var sourceList = this._sourceList; if (!sourceList.length) { return true; } // All sourceList is from the some upsteam. var upSourceMgrList = this._getUpstreamSourceManagers(); for (var i = 0; i < upSourceMgrList.length; i++) { var upSrcMgr = upSourceMgrList[i]; if ( // Consider the case that there is ancestor diry, call it recursively. // The performance is probably not an issue because usually the chain is not long. upSrcMgr._isDirty() || this._upstreamSignList[i] !== upSrcMgr._getVersionSign()) { return true; } } }; /** * @param sourceIndex By defualt 0, means "main source". * Most cases there is only one source. */ SourceManager.prototype.getSource = function (sourceIndex) { return this._sourceList[sourceIndex || 0]; }; /** * PEDING: Is it fast enough? * If no upstream, return empty array. */ SourceManager.prototype._getUpstreamSourceManagers = function () { // Always get the relationship from the raw option. // Do not cache the link of the dependency graph, so that // no need to update them when change happen. var sourceHost = this._sourceHost; if (isSeries(sourceHost)) { var datasetModel = querySeriesUpstreamDatasetModel(sourceHost); return !datasetModel ? [] : [datasetModel.getSourceManager()]; } else { return map(queryDatasetUpstreamDatasetModels(sourceHost), function (datasetModel) { return datasetModel.getSourceManager(); }); } }; SourceManager.prototype._getSourceMetaRawOption = function () { var sourceHost = this._sourceHost; var seriesLayoutBy; var sourceHeader; var dimensions; if (isSeries(sourceHost)) { seriesLayoutBy = sourceHost.get('seriesLayoutBy', true); sourceHeader = sourceHost.get('sourceHeader', true); dimensions = sourceHost.get('dimensions', true); } // See [REQUIREMENT_MEMO], `non-root-dataset` do not support them. else if (!this._getUpstreamSourceManagers().length) { var model = sourceHost; seriesLayoutBy = model.get('seriesLayoutBy', true); sourceHeader = model.get('sourceHeader', true); dimensions = model.get('dimensions', true); } return { seriesLayoutBy: seriesLayoutBy, sourceHeader: sourceHeader, dimensions: dimensions }; }; return SourceManager; }(); // disable the transform merge, but do not disable transfrom clone from rawOption. function disableTransformOptionMerge(datasetModel) { var transformOption = datasetModel.option.transform; transformOption && setAsPrimitive(datasetModel.option.transform); } function isSeries(sourceHost) { // Avoid circular dependency with Series.ts return sourceHost.mainType === 'series'; } function doThrow(errMsg) { throw new Error(errMsg); } var TOOLTIP_LINE_HEIGHT_CSS = 'line-height:1'; // TODO: more textStyle option function getTooltipTextStyle(textStyle, renderMode) { var nameFontColor = textStyle.color || '#6e7079'; var nameFontSize = textStyle.fontSize || 12; var nameFontWeight = textStyle.fontWeight || '400'; var valueFontColor = textStyle.color || '#464646'; var valueFontSize = textStyle.fontSize || 14; var valueFontWeight = textStyle.fontWeight || '900'; if (renderMode === 'html') { // `textStyle` is probably from user input, should be encoded to reduce security risk. return { // eslint-disable-next-line max-len nameStyle: "font-size:" + encodeHTML(nameFontSize + '') + "px;color:" + encodeHTML(nameFontColor) + ";font-weight:" + encodeHTML(nameFontWeight + ''), // eslint-disable-next-line max-len valueStyle: "font-size:" + encodeHTML(valueFontSize + '') + "px;color:" + encodeHTML(valueFontColor) + ";font-weight:" + encodeHTML(valueFontWeight + '') }; } else { return { nameStyle: { fontSize: nameFontSize, fill: nameFontColor, fontWeight: nameFontWeight }, valueStyle: { fontSize: valueFontSize, fill: valueFontColor, fontWeight: valueFontWeight } }; } } // See `TooltipMarkupLayoutIntent['innerGapLevel']`. // (value from UI design) var HTML_GAPS = [0, 10, 20, 30]; var RICH_TEXT_GAPS = ['', '\n', '\n\n', '\n\n\n']; // eslint-disable-next-line max-len function createTooltipMarkup(type, option) { option.type = type; return option; } function getBuilder(fragment) { return hasOwn(builderMap, fragment.type) && builderMap[fragment.type]; } var builderMap = { /** * A `section` block is like: * ``` * header * subBlock * subBlock * ... * ``` */ section: { planLayout: function (fragment) { var subBlockLen = fragment.blocks.length; var thisBlockHasInnerGap = subBlockLen > 1 || subBlockLen > 0 && !fragment.noHeader; var thisGapLevelBetweenSubBlocks = 0; each(fragment.blocks, function (subBlock) { getBuilder(subBlock).planLayout(subBlock); var subGapLevel = subBlock.__gapLevelBetweenSubBlocks; // If the some of the sub-blocks have some gaps (like 10px) inside, this block // should use a larger gap (like 20px) to distinguish those sub-blocks. if (subGapLevel >= thisGapLevelBetweenSubBlocks) { thisGapLevelBetweenSubBlocks = subGapLevel + (thisBlockHasInnerGap && ( // 0 always can not be readable gap level. !subGapLevel // If no header, always keep the sub gap level. Otherwise // look weird in case `multipleSeries`. || subBlock.type === 'section' && !subBlock.noHeader) ? 1 : 0); } }); fragment.__gapLevelBetweenSubBlocks = thisGapLevelBetweenSubBlocks; }, build: function (ctx, fragment, topMarginForOuterGap, toolTipTextStyle) { var noHeader = fragment.noHeader; var gaps = getGap(fragment); var subMarkupText = buildSubBlocks(ctx, fragment, noHeader ? topMarginForOuterGap : gaps.html, toolTipTextStyle); if (noHeader) { return subMarkupText; } var displayableHeader = makeValueReadable(fragment.header, 'ordinal', ctx.useUTC); var nameStyle = getTooltipTextStyle(toolTipTextStyle, ctx.renderMode).nameStyle; if (ctx.renderMode === 'richText') { return wrapInlineNameRichText(ctx, displayableHeader, nameStyle) + gaps.richText + subMarkupText; } else { return wrapBlockHTML("
" + encodeHTML(displayableHeader) + '
' + subMarkupText, topMarginForOuterGap); } } }, /** * A `nameValue` block is like: * ``` * marker name value * ``` */ nameValue: { planLayout: function (fragment) { fragment.__gapLevelBetweenSubBlocks = 0; }, build: function (ctx, fragment, topMarginForOuterGap, toolTipTextStyle) { var renderMode = ctx.renderMode; var noName = fragment.noName; var noValue = fragment.noValue; var noMarker = !fragment.markerType; var name = fragment.name; var value = fragment.value; var useUTC = ctx.useUTC; if (noName && noValue) { return; } var markerStr = noMarker ? '' : ctx.markupStyleCreator.makeTooltipMarker(fragment.markerType, fragment.markerColor || '#333', renderMode); var readableName = noName ? '' : makeValueReadable(name, 'ordinal', useUTC); var valueTypeOption = fragment.valueType; var readableValueList = noValue ? [] : isArray(value) ? map(value, function (val, idx) { return makeValueReadable(val, isArray(valueTypeOption) ? valueTypeOption[idx] : valueTypeOption, useUTC); }) : [makeValueReadable(value, isArray(valueTypeOption) ? valueTypeOption[0] : valueTypeOption, useUTC)]; var valueAlignRight = !noMarker || !noName; // It little weird if only value next to marker but far from marker. var valueCloseToMarker = !noMarker && noName; var _a = getTooltipTextStyle(toolTipTextStyle, renderMode), nameStyle = _a.nameStyle, valueStyle = _a.valueStyle; return renderMode === 'richText' ? (noMarker ? '' : markerStr) + (noName ? '' : wrapInlineNameRichText(ctx, readableName, nameStyle)) // Value has commas inside, so use ' ' as delimiter for multiple values. + (noValue ? '' : wrapInlineValueRichText(ctx, readableValueList, valueAlignRight, valueCloseToMarker, valueStyle)) : wrapBlockHTML((noMarker ? '' : markerStr) + (noName ? '' : wrapInlineNameHTML(readableName, !noMarker, nameStyle)) + (noValue ? '' : wrapInlineValueHTML(readableValueList, valueAlignRight, valueCloseToMarker, valueStyle)), topMarginForOuterGap); } } }; function buildSubBlocks(ctx, fragment, topMarginForOuterGap, tooltipTextStyle) { var subMarkupTextList = []; var subBlocks = fragment.blocks || []; assert(!subBlocks || isArray(subBlocks)); subBlocks = subBlocks || []; var orderMode = ctx.orderMode; if (fragment.sortBlocks && orderMode) { subBlocks = subBlocks.slice(); var orderMap = { valueAsc: 'asc', valueDesc: 'desc' }; if (hasOwn(orderMap, orderMode)) { var comparator_1 = new SortOrderComparator(orderMap[orderMode], null); subBlocks.sort(function (a, b) { return comparator_1.evaluate(a.sortParam, b.sortParam); }); } // FIXME 'seriesDesc' necessary? else if (orderMode === 'seriesDesc') { subBlocks.reverse(); } } var gaps = getGap(fragment); each(subBlocks, function (subBlock, idx) { var subMarkupText = getBuilder(subBlock).build(ctx, subBlock, idx > 0 ? gaps.html : 0, tooltipTextStyle); subMarkupText != null && subMarkupTextList.push(subMarkupText); }); if (!subMarkupTextList.length) { return; } return ctx.renderMode === 'richText' ? subMarkupTextList.join(gaps.richText) : wrapBlockHTML(subMarkupTextList.join(''), topMarginForOuterGap); } /** * @return markupText. null/undefined means no content. */ function buildTooltipMarkup(fragment, markupStyleCreator, renderMode, orderMode, useUTC, toolTipTextStyle) { if (!fragment) { return; } var builder = getBuilder(fragment); builder.planLayout(fragment); var ctx = { useUTC: useUTC, renderMode: renderMode, orderMode: orderMode, markupStyleCreator: markupStyleCreator }; return builder.build(ctx, fragment, 0, toolTipTextStyle); } function getGap(fragment) { var gapLevelBetweenSubBlocks = fragment.__gapLevelBetweenSubBlocks; return { html: HTML_GAPS[gapLevelBetweenSubBlocks], richText: RICH_TEXT_GAPS[gapLevelBetweenSubBlocks] }; } function wrapBlockHTML(encodedContent, topGap) { var clearfix = '
'; var marginCSS = "margin: " + topGap + "px 0 0"; return "
" + encodedContent + clearfix + '
'; } function wrapInlineNameHTML(name, leftHasMarker, style) { var marginCss = leftHasMarker ? 'margin-left:2px' : ''; return "" + encodeHTML(name) + ''; } function wrapInlineValueHTML(valueList, alignRight, valueCloseToMarker, style) { // Do not too close to marker, considering there are multiple values separated by spaces. var paddingStr = valueCloseToMarker ? '10px' : '20px'; var alignCSS = alignRight ? "float:right;margin-left:" + paddingStr : ''; return "" // Value has commas inside, so use ' ' as delimiter for multiple values. + map(valueList, function (value) { return encodeHTML(value); }).join('  ') + ''; } function wrapInlineNameRichText(ctx, name, style) { return ctx.markupStyleCreator.wrapRichTextStyle(name, style); } function wrapInlineValueRichText(ctx, valueList, alignRight, valueCloseToMarker, style) { var styles = [style]; var paddingLeft = valueCloseToMarker ? 10 : 20; alignRight && styles.push({ padding: [0, 0, 0, paddingLeft], align: 'right' }); // Value has commas inside, so use ' ' as delimiter for multiple values. return ctx.markupStyleCreator.wrapRichTextStyle(valueList.join(' '), styles); } function retrieveVisualColorForTooltipMarker(series, dataIndex) { var style = series.getData().getItemVisual(dataIndex, 'style'); var color = style[series.visualDrawType]; return convertToColorString(color); } function getPaddingFromTooltipModel(model, renderMode) { var padding = model.get('padding'); return padding != null ? padding // We give slightly different to look pretty. : renderMode === 'richText' ? [8, 10] : 10; } /** * The major feature is generate styles for `renderMode: 'richText'`. * But it also serves `renderMode: 'html'` to provide * "renderMode-independent" API. */ var TooltipMarkupStyleCreator = /** @class */ function () { function TooltipMarkupStyleCreator() { this.richTextStyles = {}; // Notice that "generate a style name" usuall happens repeatly when mouse moving and // displaying a tooltip. So we put the `_nextStyleNameId` as a member of each creator // rather than static shared by all creators (which will cause it increase to fast). this._nextStyleNameId = getRandomIdBase(); } TooltipMarkupStyleCreator.prototype._generateStyleName = function () { return '__EC_aUTo_' + this._nextStyleNameId++; }; TooltipMarkupStyleCreator.prototype.makeTooltipMarker = function (markerType, colorStr, renderMode) { var markerId = renderMode === 'richText' ? this._generateStyleName() : null; var marker = getTooltipMarker({ color: colorStr, type: markerType, renderMode: renderMode, markerId: markerId }); if (isString(marker)) { return marker; } else { if ("development" !== 'production') { assert(markerId); } this.richTextStyles[markerId] = marker.style; return marker.content; } }; /** * @usage * ```ts * const styledText = markupStyleCreator.wrapRichTextStyle([ * // The styles will be auto merged. * { * fontSize: 12, * color: 'blue' * }, * { * padding: 20 * } * ]); * ``` */ TooltipMarkupStyleCreator.prototype.wrapRichTextStyle = function (text, styles) { var finalStl = {}; if (isArray(styles)) { each(styles, function (stl) { return extend(finalStl, stl); }); } else { extend(finalStl, styles); } var styleName = this._generateStyleName(); this.richTextStyles[styleName] = finalStl; return "{" + styleName + "|" + text + "}"; }; return TooltipMarkupStyleCreator; }(); function defaultSeriesFormatTooltip(opt) { var series = opt.series; var dataIndex = opt.dataIndex; var multipleSeries = opt.multipleSeries; var data = series.getData(); var tooltipDims = data.mapDimensionsAll('defaultedTooltip'); var tooltipDimLen = tooltipDims.length; var value = series.getRawValue(dataIndex); var isValueArr = isArray(value); var markerColor = retrieveVisualColorForTooltipMarker(series, dataIndex); // Complicated rule for pretty tooltip. var inlineValue; var inlineValueType; var subBlocks; var sortParam; if (tooltipDimLen > 1 || isValueArr && !tooltipDimLen) { var formatArrResult = formatTooltipArrayValue(value, series, dataIndex, tooltipDims, markerColor); inlineValue = formatArrResult.inlineValues; inlineValueType = formatArrResult.inlineValueTypes; subBlocks = formatArrResult.blocks; // Only support tooltip sort by the first inline value. It's enough in most cases. sortParam = formatArrResult.inlineValues[0]; } else if (tooltipDimLen) { var dimInfo = data.getDimensionInfo(tooltipDims[0]); sortParam = inlineValue = retrieveRawValue(data, dataIndex, tooltipDims[0]); inlineValueType = dimInfo.type; } else { sortParam = inlineValue = isValueArr ? value[0] : value; } // Do not show generated series name. It might not be readable. var seriesNameSpecified = isNameSpecified(series); var seriesName = seriesNameSpecified && series.name || ''; var itemName = data.getName(dataIndex); var inlineName = multipleSeries ? seriesName : itemName; return createTooltipMarkup('section', { header: seriesName, // When series name not specified, do not show a header line with only '-'. // This case alway happen in tooltip.trigger: 'item'. noHeader: multipleSeries || !seriesNameSpecified, sortParam: sortParam, blocks: [createTooltipMarkup('nameValue', { markerType: 'item', markerColor: markerColor, // Do not mix display seriesName and itemName in one tooltip, // which might confuses users. name: inlineName, // name dimension might be auto assigned, where the name might // be not readable. So we check trim here. noName: !trim(inlineName), value: inlineValue, valueType: inlineValueType })].concat(subBlocks || []) }); } function formatTooltipArrayValue(value, series, dataIndex, tooltipDims, colorStr) { // check: category-no-encode-has-axis-data in dataset.html var data = series.getData(); var isValueMultipleLine = reduce(value, function (isValueMultipleLine, val, idx) { var dimItem = data.getDimensionInfo(idx); return isValueMultipleLine = isValueMultipleLine || dimItem && dimItem.tooltip !== false && dimItem.displayName != null; }, false); var inlineValues = []; var inlineValueTypes = []; var blocks = []; tooltipDims.length ? each(tooltipDims, function (dim) { setEachItem(retrieveRawValue(data, dataIndex, dim), dim); }) // By default, all dims is used on tooltip. : each(value, setEachItem); function setEachItem(val, dim) { var dimInfo = data.getDimensionInfo(dim); // If `dimInfo.tooltip` is not set, show tooltip. if (!dimInfo || dimInfo.otherDims.tooltip === false) { return; } if (isValueMultipleLine) { blocks.push(createTooltipMarkup('nameValue', { markerType: 'subItem', markerColor: colorStr, name: dimInfo.displayName, value: val, valueType: dimInfo.type })); } else { inlineValues.push(val); inlineValueTypes.push(dimInfo.type); } } return { inlineValues: inlineValues, inlineValueTypes: inlineValueTypes, blocks: blocks }; } var inner$1 = makeInner(); function getSelectionKey(data, dataIndex) { return data.getName(dataIndex) || data.getId(dataIndex); } var SeriesModel = /** @class */ function (_super) { __extends(SeriesModel, _super); function SeriesModel() { // [Caution]: Becuase this class or desecendants can be used as `XXX.extend(subProto)`, // the class members must not be initialized in constructor or declaration place. // Otherwise there is bad case: // class A {xxx = 1;} // enableClassExtend(A); // class B extends A {} // var C = B.extend({xxx: 5}); // var c = new C(); // console.log(c.xxx); // expect 5 but always 1. var _this = _super !== null && _super.apply(this, arguments) || this; // --------------------------------------- // Props about data selection // --------------------------------------- _this._selectedDataIndicesMap = {}; return _this; } SeriesModel.prototype.init = function (option, parentModel, ecModel) { this.seriesIndex = this.componentIndex; this.dataTask = createTask({ count: dataTaskCount, reset: dataTaskReset }); this.dataTask.context = { model: this }; this.mergeDefaultAndTheme(option, ecModel); var sourceManager = inner$1(this).sourceManager = new SourceManager(this); sourceManager.prepareSource(); var data = this.getInitialData(option, ecModel); wrapData(data, this); this.dataTask.context.data = data; if ("development" !== 'production') { assert(data, 'getInitialData returned invalid data.'); } inner$1(this).dataBeforeProcessed = data; // If we reverse the order (make data firstly, and then make // dataBeforeProcessed by cloneShallow), cloneShallow will // cause data.graph.data !== data when using // module:echarts/data/Graph or module:echarts/data/Tree. // See module:echarts/data/helper/linkList // Theoretically, it is unreasonable to call `seriesModel.getData()` in the model // init or merge stage, because the data can be restored. So we do not `restoreData` // and `setData` here, which forbids calling `seriesModel.getData()` in this stage. // Call `seriesModel.getRawData()` instead. // this.restoreData(); autoSeriesName(this); this._initSelectedMapFromData(data); }; /** * Util for merge default and theme to option */ SeriesModel.prototype.mergeDefaultAndTheme = function (option, ecModel) { var layoutMode = fetchLayoutMode(this); var inputPositionParams = layoutMode ? getLayoutParams(option) : {}; // Backward compat: using subType on theme. // But if name duplicate between series subType // (for example: parallel) add component mainType, // add suffix 'Series'. var themeSubType = this.subType; if (ComponentModel.hasClass(themeSubType)) { themeSubType += 'Series'; } merge(option, ecModel.getTheme().get(this.subType)); merge(option, this.getDefaultOption()); // Default label emphasis `show` defaultEmphasis(option, 'label', ['show']); this.fillDataTextStyle(option.data); if (layoutMode) { mergeLayoutParam(option, inputPositionParams, layoutMode); } }; SeriesModel.prototype.mergeOption = function (newSeriesOption, ecModel) { // this.settingTask.dirty(); newSeriesOption = merge(this.option, newSeriesOption, true); this.fillDataTextStyle(newSeriesOption.data); var layoutMode = fetchLayoutMode(this); if (layoutMode) { mergeLayoutParam(this.option, newSeriesOption, layoutMode); } var sourceManager = inner$1(this).sourceManager; sourceManager.dirty(); sourceManager.prepareSource(); var data = this.getInitialData(newSeriesOption, ecModel); wrapData(data, this); this.dataTask.dirty(); this.dataTask.context.data = data; inner$1(this).dataBeforeProcessed = data; autoSeriesName(this); this._initSelectedMapFromData(data); }; SeriesModel.prototype.fillDataTextStyle = function (data) { // Default data label emphasis `show` // FIXME Tree structure data ? // FIXME Performance ? if (data && !isTypedArray(data)) { var props = ['show']; for (var i = 0; i < data.length; i++) { if (data[i] && data[i].label) { defaultEmphasis(data[i], 'label', props); } } } }; /** * Init a data structure from data related option in series * Must be overriden. */ SeriesModel.prototype.getInitialData = function (option, ecModel) { return; }; /** * Append data to list */ SeriesModel.prototype.appendData = function (params) { // FIXME ??? // (1) If data from dataset, forbidden append. // (2) support append data of dataset. var data = this.getRawData(); data.appendData(params.data); }; /** * Consider some method like `filter`, `map` need make new data, * We should make sure that `seriesModel.getData()` get correct * data in the stream procedure. So we fetch data from upstream * each time `task.perform` called. */ SeriesModel.prototype.getData = function (dataType) { var task = getCurrentTask(this); if (task) { var data = task.context.data; return dataType == null ? data : data.getLinkedData(dataType); } else { // When series is not alive (that may happen when click toolbox // restore or setOption with not merge mode), series data may // be still need to judge animation or something when graphic // elements want to know whether fade out. return inner$1(this).data; } }; SeriesModel.prototype.getAllData = function () { var mainData = this.getData(); return mainData && mainData.getLinkedDataAll ? mainData.getLinkedDataAll() : [{ data: mainData }]; }; SeriesModel.prototype.setData = function (data) { var task = getCurrentTask(this); if (task) { var context = task.context; // Consider case: filter, data sample. // FIXME:TS never used, so comment it // if (context.data !== data && task.modifyOutputEnd) { // task.setOutputEnd(data.count()); // } context.outputData = data; // Caution: setData should update context.data, // Because getData may be called multiply in a // single stage and expect to get the data just // set. (For example, AxisProxy, x y both call // getData and setDate sequentially). // So the context.data should be fetched from // upstream each time when a stage starts to be // performed. if (task !== this.dataTask) { context.data = data; } } inner$1(this).data = data; }; SeriesModel.prototype.getSource = function () { return inner$1(this).sourceManager.getSource(); }; /** * Get data before processed */ SeriesModel.prototype.getRawData = function () { return inner$1(this).dataBeforeProcessed; }; /** * Get base axis if has coordinate system and has axis. * By default use coordSys.getBaseAxis(); * Can be overrided for some chart. * @return {type} description */ SeriesModel.prototype.getBaseAxis = function () { var coordSys = this.coordinateSystem; // @ts-ignore return coordSys && coordSys.getBaseAxis && coordSys.getBaseAxis(); }; /** * Default tooltip formatter * * @param dataIndex * @param multipleSeries * @param dataType * @param renderMode valid values: 'html'(by default) and 'richText'. * 'html' is used for rendering tooltip in extra DOM form, and the result * string is used as DOM HTML content. * 'richText' is used for rendering tooltip in rich text form, for those where * DOM operation is not supported. * @return formatted tooltip with `html` and `markers` * Notice: The override method can also return string */ SeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { return defaultSeriesFormatTooltip({ series: this, dataIndex: dataIndex, multipleSeries: multipleSeries }); }; SeriesModel.prototype.isAnimationEnabled = function () { if (env.node) { return false; } var animationEnabled = this.getShallow('animation'); if (animationEnabled) { if (this.getData().count() > this.getShallow('animationThreshold')) { animationEnabled = false; } } return !!animationEnabled; }; SeriesModel.prototype.restoreData = function () { this.dataTask.dirty(); }; SeriesModel.prototype.getColorFromPalette = function (name, scope, requestColorNum) { var ecModel = this.ecModel; // PENDING var color = PaletteMixin.prototype.getColorFromPalette.call(this, name, scope, requestColorNum); if (!color) { color = ecModel.getColorFromPalette(name, scope, requestColorNum); } return color; }; /** * Use `data.mapDimensionsAll(coordDim)` instead. * @deprecated */ SeriesModel.prototype.coordDimToDataDim = function (coordDim) { return this.getRawData().mapDimensionsAll(coordDim); }; /** * Get progressive rendering count each step */ SeriesModel.prototype.getProgressive = function () { return this.get('progressive'); }; /** * Get progressive rendering count each step */ SeriesModel.prototype.getProgressiveThreshold = function () { return this.get('progressiveThreshold'); }; // PENGING If selectedMode is null ? SeriesModel.prototype.select = function (innerDataIndices, dataType) { this._innerSelect(this.getData(dataType), innerDataIndices); }; SeriesModel.prototype.unselect = function (innerDataIndices, dataType) { var selectedMap = this.option.selectedMap; if (!selectedMap) { return; } var data = this.getData(dataType); for (var i = 0; i < innerDataIndices.length; i++) { var dataIndex = innerDataIndices[i]; var nameOrId = getSelectionKey(data, dataIndex); selectedMap[nameOrId] = false; this._selectedDataIndicesMap[nameOrId] = -1; } }; SeriesModel.prototype.toggleSelect = function (innerDataIndices, dataType) { var tmpArr = []; for (var i = 0; i < innerDataIndices.length; i++) { tmpArr[0] = innerDataIndices[i]; this.isSelected(innerDataIndices[i], dataType) ? this.unselect(tmpArr, dataType) : this.select(tmpArr, dataType); } }; SeriesModel.prototype.getSelectedDataIndices = function () { var selectedDataIndicesMap = this._selectedDataIndicesMap; var nameOrIds = keys(selectedDataIndicesMap); var dataIndices = []; for (var i = 0; i < nameOrIds.length; i++) { var dataIndex = selectedDataIndicesMap[nameOrIds[i]]; if (dataIndex >= 0) { dataIndices.push(dataIndex); } } return dataIndices; }; SeriesModel.prototype.isSelected = function (dataIndex, dataType) { var selectedMap = this.option.selectedMap; if (!selectedMap) { return false; } var data = this.getData(dataType); var nameOrId = getSelectionKey(data, dataIndex); return selectedMap[nameOrId] || false; }; SeriesModel.prototype._innerSelect = function (data, innerDataIndices) { var _a, _b; var selectedMode = this.option.selectedMode; var len = innerDataIndices.length; if (!selectedMode || !len) { return; } if (selectedMode === 'multiple') { var selectedMap = this.option.selectedMap || (this.option.selectedMap = {}); for (var i = 0; i < len; i++) { var dataIndex = innerDataIndices[i]; // TODO diffrent types of data share same object. var nameOrId = getSelectionKey(data, dataIndex); selectedMap[nameOrId] = true; this._selectedDataIndicesMap[nameOrId] = data.getRawIndex(dataIndex); } } else if (selectedMode === 'single' || selectedMode === true) { var lastDataIndex = innerDataIndices[len - 1]; var nameOrId = getSelectionKey(data, lastDataIndex); this.option.selectedMap = (_a = {}, _a[nameOrId] = true, _a); this._selectedDataIndicesMap = (_b = {}, _b[nameOrId] = data.getRawIndex(lastDataIndex), _b); } }; SeriesModel.prototype._initSelectedMapFromData = function (data) { // Ignore select info in data if selectedMap exists. // NOTE It's only for legacy usage. edge data is not supported. if (this.option.selectedMap) { return; } var dataIndices = []; if (data.hasItemOption) { data.each(function (idx) { var rawItem = data.getRawDataItem(idx); if (rawItem && rawItem.selected) { dataIndices.push(idx); } }); } if (dataIndices.length > 0) { this._innerSelect(data, dataIndices); } }; // /** // * @see {module:echarts/stream/Scheduler} // */ // abstract pipeTask: null SeriesModel.registerClass = function (clz) { return ComponentModel.registerClass(clz); }; SeriesModel.protoInitialize = function () { var proto = SeriesModel.prototype; proto.type = 'series.__base__'; proto.seriesIndex = 0; proto.useColorPaletteOnData = false; proto.ignoreStyleOnData = false; proto.hasSymbolVisual = false; proto.defaultSymbol = 'circle'; // Make sure the values can be accessed! proto.visualStyleAccessPath = 'itemStyle'; proto.visualDrawType = 'fill'; }(); return SeriesModel; }(ComponentModel); mixin(SeriesModel, DataFormatMixin); mixin(SeriesModel, PaletteMixin); mountExtend(SeriesModel, ComponentModel); /** * MUST be called after `prepareSource` called * Here we need to make auto series, especially for auto legend. But we * do not modify series.name in option to avoid side effects. */ function autoSeriesName(seriesModel) { // User specified name has higher priority, otherwise it may cause // series can not be queried unexpectedly. var name = seriesModel.name; if (!isNameSpecified(seriesModel)) { seriesModel.name = getSeriesAutoName(seriesModel) || name; } } function getSeriesAutoName(seriesModel) { var data = seriesModel.getRawData(); var dataDims = data.mapDimensionsAll('seriesName'); var nameArr = []; each(dataDims, function (dataDim) { var dimInfo = data.getDimensionInfo(dataDim); dimInfo.displayName && nameArr.push(dimInfo.displayName); }); return nameArr.join(' '); } function dataTaskCount(context) { return context.model.getRawData().count(); } function dataTaskReset(context) { var seriesModel = context.model; seriesModel.setData(seriesModel.getRawData().cloneShallow()); return dataTaskProgress; } function dataTaskProgress(param, context) { // Avoid repead cloneShallow when data just created in reset. if (context.outputData && param.end > context.outputData.count()) { context.model.getRawData().cloneShallow(context.outputData); } } // TODO refactor function wrapData(data, seriesModel) { each(__spreadArrays(data.CHANGABLE_METHODS, data.DOWNSAMPLE_METHODS), function (methodName) { data.wrapMethod(methodName, curry(onDataChange, seriesModel)); }); } function onDataChange(seriesModel, newList) { var task = getCurrentTask(seriesModel); if (task) { // Consider case: filter, selectRange task.setOutputEnd((newList || this).count()); } return newList; } function getCurrentTask(seriesModel) { var scheduler = (seriesModel.ecModel || {}).scheduler; var pipeline = scheduler && scheduler.getPipeline(seriesModel.uid); if (pipeline) { // When pipline finished, the currrentTask keep the last // task (renderTask). var task = pipeline.currentTask; if (task) { var agentStubMap = task.agentStubMap; if (agentStubMap) { task = agentStubMap.get(seriesModel.uid); } } return task; } } var ComponentView = /** @class */ function () { function ComponentView() { this.group = new Group(); this.uid = getUID('viewComponent'); } ComponentView.prototype.init = function (ecModel, api) {}; ComponentView.prototype.render = function (model, ecModel, api, payload) {}; ComponentView.prototype.dispose = function (ecModel, api) {}; ComponentView.prototype.updateView = function (model, ecModel, api, payload) {// Do nothing; }; ComponentView.prototype.updateLayout = function (model, ecModel, api, payload) {// Do nothing; }; ComponentView.prototype.updateVisual = function (model, ecModel, api, payload) {// Do nothing; }; /** * Hook for blur target series. * Can be used in marker for blur the markers */ ComponentView.prototype.blurSeries = function (seriesModels, ecModel) {// Do nothing; }; return ComponentView; }(); enableClassExtend(ComponentView); enableClassManagement(ComponentView); /** * @return {string} If large mode changed, return string 'reset'; */ function createRenderPlanner() { var inner = makeInner(); return function (seriesModel) { var fields = inner(seriesModel); var pipelineContext = seriesModel.pipelineContext; var originalLarge = !!fields.large; var originalProgressive = !!fields.progressiveRender; // FIXME: if the planner works on a filtered series, `pipelineContext` does not // exists. See #11611 . Probably we need to modify this structure, see the comment // on `performRawSeries` in `Schedular.js`. var large = fields.large = !!(pipelineContext && pipelineContext.large); var progressive = fields.progressiveRender = !!(pipelineContext && pipelineContext.progressiveRender); return !!(originalLarge !== large || originalProgressive !== progressive) && 'reset'; }; } var inner$2 = makeInner(); var renderPlanner = createRenderPlanner(); var ChartView = /** @class */ function () { function ChartView() { this.group = new Group(); this.uid = getUID('viewChart'); this.renderTask = createTask({ plan: renderTaskPlan, reset: renderTaskReset }); this.renderTask.context = { view: this }; } ChartView.prototype.init = function (ecModel, api) {}; ChartView.prototype.render = function (seriesModel, ecModel, api, payload) {}; /** * Highlight series or specified data item. */ ChartView.prototype.highlight = function (seriesModel, ecModel, api, payload) { toggleHighlight(seriesModel.getData(), payload, 'emphasis'); }; /** * Downplay series or specified data item. */ ChartView.prototype.downplay = function (seriesModel, ecModel, api, payload) { toggleHighlight(seriesModel.getData(), payload, 'normal'); }; /** * Remove self. */ ChartView.prototype.remove = function (ecModel, api) { this.group.removeAll(); }; /** * Dispose self. */ ChartView.prototype.dispose = function (ecModel, api) {}; ChartView.prototype.updateView = function (seriesModel, ecModel, api, payload) { this.render(seriesModel, ecModel, api, payload); }; // FIXME never used? ChartView.prototype.updateLayout = function (seriesModel, ecModel, api, payload) { this.render(seriesModel, ecModel, api, payload); }; // FIXME never used? ChartView.prototype.updateVisual = function (seriesModel, ecModel, api, payload) { this.render(seriesModel, ecModel, api, payload); }; ChartView.markUpdateMethod = function (payload, methodName) { inner$2(payload).updateMethod = methodName; }; ChartView.protoInitialize = function () { var proto = ChartView.prototype; proto.type = 'chart'; }(); return ChartView; }(); /** * Set state of single element */ function elSetState(el, state, highlightDigit) { if (el) { (state === 'emphasis' ? enterEmphasis : leaveEmphasis)(el, highlightDigit); } } function toggleHighlight(data, payload, state) { var dataIndex = queryDataIndex(data, payload); var highlightDigit = payload && payload.highlightKey != null ? getHighlightDigit(payload.highlightKey) : null; if (dataIndex != null) { each(normalizeToArray(dataIndex), function (dataIdx) { elSetState(data.getItemGraphicEl(dataIdx), state, highlightDigit); }); } else { data.eachItemGraphicEl(function (el) { elSetState(el, state, highlightDigit); }); } } enableClassExtend(ChartView, ['dispose']); enableClassManagement(ChartView); function renderTaskPlan(context) { return renderPlanner(context.model); } function renderTaskReset(context) { var seriesModel = context.model; var ecModel = context.ecModel; var api = context.api; var payload = context.payload; // FIXME: remove updateView updateVisual var progressiveRender = seriesModel.pipelineContext.progressiveRender; var view = context.view; var updateMethod = payload && inner$2(payload).updateMethod; var methodName = progressiveRender ? 'incrementalPrepareRender' : updateMethod && view[updateMethod] ? updateMethod // `appendData` is also supported when data amount // is less than progressive threshold. : 'render'; if (methodName !== 'render') { view[methodName](seriesModel, ecModel, api, payload); } return progressMethodMap[methodName]; } var progressMethodMap = { incrementalPrepareRender: { progress: function (params, context) { context.view.incrementalRender(params, context.model, context.ecModel, context.api, context.payload); } }, render: { // Put view.render in `progress` to support appendData. But in this case // view.render should not be called in reset, otherwise it will be called // twise. Use `forceFirstProgress` to make sure that view.render is called // in any cases. forceFirstProgress: true, progress: function (params, context) { context.view.render(context.model, context.ecModel, context.api, context.payload); } } }; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ var ORIGIN_METHOD = '\0__throttleOriginMethod'; var RATE = '\0__throttleRate'; var THROTTLE_TYPE = '\0__throttleType'; /** * @public * @param {(Function)} fn * @param {number} [delay=0] Unit: ms. * @param {boolean} [debounce=false] * true: If call interval less than `delay`, only the last call works. * false: If call interval less than `delay, call works on fixed rate. * @return {(Function)} throttled fn. */ function throttle(fn, delay, debounce) { var currCall; var lastCall = 0; var lastExec = 0; var timer = null; var diff; var scope; var args; var debounceNextCall; delay = delay || 0; function exec() { lastExec = new Date().getTime(); timer = null; fn.apply(scope, args || []); } var cb = function () { var cbArgs = []; for (var _i = 0; _i < arguments.length; _i++) { cbArgs[_i] = arguments[_i]; } currCall = new Date().getTime(); scope = this; args = cbArgs; var thisDelay = debounceNextCall || delay; var thisDebounce = debounceNextCall || debounce; debounceNextCall = null; diff = currCall - (thisDebounce ? lastCall : lastExec) - thisDelay; clearTimeout(timer); // Here we should make sure that: the `exec` SHOULD NOT be called later // than a new call of `cb`, that is, preserving the command order. Consider // calculating "scale rate" when roaming as an example. When a call of `cb` // happens, either the `exec` is called dierectly, or the call is delayed. // But the delayed call should never be later than next call of `cb`. Under // this assurance, we can simply update view state each time `dispatchAction` // triggered by user roaming, but not need to add extra code to avoid the // state being "rolled-back". if (thisDebounce) { timer = setTimeout(exec, thisDelay); } else { if (diff >= 0) { exec(); } else { timer = setTimeout(exec, -diff); } } lastCall = currCall; }; /** * Clear throttle. * @public */ cb.clear = function () { if (timer) { clearTimeout(timer); timer = null; } }; /** * Enable debounce once. */ cb.debounceNextCall = function (debounceDelay) { debounceNextCall = debounceDelay; }; return cb; } /** * Create throttle method or update throttle rate. * * @example * ComponentView.prototype.render = function () { * ... * throttle.createOrUpdate( * this, * '_dispatchAction', * this.model.get('throttle'), * 'fixRate' * ); * }; * ComponentView.prototype.remove = function () { * throttle.clear(this, '_dispatchAction'); * }; * ComponentView.prototype.dispose = function () { * throttle.clear(this, '_dispatchAction'); * }; * */ function createOrUpdate(obj, fnAttr, rate, throttleType) { var fn = obj[fnAttr]; if (!fn) { return; } var originFn = fn[ORIGIN_METHOD] || fn; var lastThrottleType = fn[THROTTLE_TYPE]; var lastRate = fn[RATE]; if (lastRate !== rate || lastThrottleType !== throttleType) { if (rate == null || !throttleType) { return obj[fnAttr] = originFn; } fn = obj[fnAttr] = throttle(originFn, rate, throttleType === 'debounce'); fn[ORIGIN_METHOD] = originFn; fn[THROTTLE_TYPE] = throttleType; fn[RATE] = rate; } return fn; } /** * Clear throttle. Example see throttle.createOrUpdate. */ function clear(obj, fnAttr) { var fn = obj[fnAttr]; if (fn && fn[ORIGIN_METHOD]) { obj[fnAttr] = fn[ORIGIN_METHOD]; } } var inner$3 = makeInner(); var defaultStyleMappers = { itemStyle: makeStyleMapper(ITEM_STYLE_KEY_MAP, true), lineStyle: makeStyleMapper(LINE_STYLE_KEY_MAP, true) }; var defaultColorKey = { lineStyle: 'stroke', itemStyle: 'fill' }; function getStyleMapper(seriesModel, stylePath) { var styleMapper = seriesModel.visualStyleMapper || defaultStyleMappers[stylePath]; if (!styleMapper) { console.warn("Unkown style type '" + stylePath + "'."); return defaultStyleMappers.itemStyle; } return styleMapper; } function getDefaultColorKey(seriesModel, stylePath) { // return defaultColorKey[stylePath] || var colorKey = seriesModel.visualDrawType || defaultColorKey[stylePath]; if (!colorKey) { console.warn("Unkown style type '" + stylePath + "'."); return 'fill'; } return colorKey; } var seriesStyleTask = { createOnAllSeries: true, performRawSeries: true, reset: function (seriesModel, ecModel) { var data = seriesModel.getData(); var stylePath = seriesModel.visualStyleAccessPath || 'itemStyle'; // Set in itemStyle var styleModel = seriesModel.getModel(stylePath); var getStyle = getStyleMapper(seriesModel, stylePath); var globalStyle = getStyle(styleModel); var decalOption = styleModel.getShallow('decal'); if (decalOption) { data.setVisual('decal', decalOption); decalOption.dirty = true; } // TODO var colorKey = getDefaultColorKey(seriesModel, stylePath); var color = globalStyle[colorKey]; // TODO style callback var colorCallback = isFunction(color) ? color : null; var hasAutoColor = globalStyle.fill === 'auto' || globalStyle.stroke === 'auto'; // Get from color palette by default. if (!globalStyle[colorKey] || colorCallback || hasAutoColor) { // Note: if some series has color specified (e.g., by itemStyle.color), we DO NOT // make it effect palette. Bacause some scenarios users need to make some series // transparent or as background, which should better not effect the palette. var colorPalette = seriesModel.getColorFromPalette( // TODO series count changed. seriesModel.name, null, ecModel.getSeriesCount()); if (!globalStyle[colorKey]) { globalStyle[colorKey] = colorPalette; data.setVisual('colorFromPalette', true); } globalStyle.fill = globalStyle.fill === 'auto' || typeof globalStyle.fill === 'function' ? colorPalette : globalStyle.fill; globalStyle.stroke = globalStyle.stroke === 'auto' || typeof globalStyle.stroke === 'function' ? colorPalette : globalStyle.stroke; } data.setVisual('style', globalStyle); data.setVisual('drawType', colorKey); // Only visible series has each data be visual encoded if (!ecModel.isSeriesFiltered(seriesModel) && colorCallback) { data.setVisual('colorFromPalette', false); return { dataEach: function (data, idx) { var dataParams = seriesModel.getDataParams(idx); var itemStyle = extend({}, globalStyle); itemStyle[colorKey] = colorCallback(dataParams); data.setItemVisual(idx, 'style', itemStyle); } }; } } }; var sharedModel = new Model(); var dataStyleTask = { createOnAllSeries: true, performRawSeries: true, reset: function (seriesModel, ecModel) { if (seriesModel.ignoreStyleOnData || ecModel.isSeriesFiltered(seriesModel)) { return; } var data = seriesModel.getData(); var stylePath = seriesModel.visualStyleAccessPath || 'itemStyle'; // Set in itemStyle var getStyle = getStyleMapper(seriesModel, stylePath); var colorKey = data.getVisual('drawType'); return { dataEach: data.hasItemOption ? function (data, idx) { // Not use getItemModel for performance considuration var rawItem = data.getRawDataItem(idx); if (rawItem && rawItem[stylePath]) { sharedModel.option = rawItem[stylePath]; var style = getStyle(sharedModel); var existsStyle = data.ensureUniqueItemVisual(idx, 'style'); extend(existsStyle, style); if (sharedModel.option.decal) { data.setItemVisual(idx, 'decal', sharedModel.option.decal); sharedModel.option.decal.dirty = true; } if (colorKey in style) { data.setItemVisual(idx, 'colorFromPalette', false); } } } : null }; } }; // Pick color from palette for the data which has not been set with color yet. // Note: do not support stream rendering. No such cases yet. var dataColorPaletteTask = { performRawSeries: true, overallReset: function (ecModel) { // Each type of series use one scope. // Pie and funnel are using diferrent scopes var paletteScopeGroupByType = createHashMap(); ecModel.eachSeries(function (seriesModel) { if (!seriesModel.useColorPaletteOnData) { return; } var colorScope = paletteScopeGroupByType.get(seriesModel.type); if (!colorScope) { colorScope = {}; paletteScopeGroupByType.set(seriesModel.type, colorScope); } inner$3(seriesModel).scope = colorScope; }); ecModel.eachSeries(function (seriesModel) { if (!seriesModel.useColorPaletteOnData || ecModel.isSeriesFiltered(seriesModel)) { return; } var dataAll = seriesModel.getRawData(); var idxMap = {}; var data = seriesModel.getData(); var colorScope = inner$3(seriesModel).scope; var stylePath = seriesModel.visualStyleAccessPath || 'itemStyle'; var colorKey = getDefaultColorKey(seriesModel, stylePath); data.each(function (idx) { var rawIdx = data.getRawIndex(idx); idxMap[rawIdx] = idx; }); // Iterate on data before filtered. To make sure color from palette can be // Consistent when toggling legend. dataAll.each(function (rawIdx) { var idx = idxMap[rawIdx]; var fromPalette = data.getItemVisual(idx, 'colorFromPalette'); // Get color from palette for each data only when the color is inherited from series color, which is // also picked from color palette. So following situation is not in the case: // 1. series.itemStyle.color is set // 2. color is encoded by visualMap if (fromPalette) { var itemStyle = data.ensureUniqueItemVisual(idx, 'style'); var name_1 = dataAll.getName(rawIdx) || rawIdx + ''; var dataCount = dataAll.count(); itemStyle[colorKey] = seriesModel.getColorFromPalette(name_1, colorScope, dataCount); } }); }); } }; var PI$3 = Math.PI; /** * @param {module:echarts/ExtensionAPI} api * @param {Object} [opts] * @param {string} [opts.text] * @param {string} [opts.color] * @param {string} [opts.textColor] * @return {module:zrender/Element} */ function defaultLoading(api, opts) { opts = opts || {}; defaults(opts, { text: 'loading', textColor: '#000', fontSize: 12, fontWeight: 'normal', fontStyle: 'normal', fontFamily: 'sans-serif', maskColor: 'rgba(255, 255, 255, 0.8)', showSpinner: true, color: '#5470c6', spinnerRadius: 10, lineWidth: 5, zlevel: 0 }); var group = new Group(); var mask = new Rect({ style: { fill: opts.maskColor }, zlevel: opts.zlevel, z: 10000 }); group.add(mask); var textContent = new ZRText({ style: { text: opts.text, fill: opts.textColor, fontSize: opts.fontSize, fontWeight: opts.fontWeight, fontStyle: opts.fontStyle, fontFamily: opts.fontFamily }, zlevel: opts.zlevel, z: 10001 }); var labelRect = new Rect({ style: { fill: 'none' }, textContent: textContent, textConfig: { position: 'right', distance: 10 }, zlevel: opts.zlevel, z: 10001 }); group.add(labelRect); var arc; if (opts.showSpinner) { arc = new Arc({ shape: { startAngle: -PI$3 / 2, endAngle: -PI$3 / 2 + 0.1, r: opts.spinnerRadius }, style: { stroke: opts.color, lineCap: 'round', lineWidth: opts.lineWidth }, zlevel: opts.zlevel, z: 10001 }); arc.animateShape(true).when(1000, { endAngle: PI$3 * 3 / 2 }).start('circularInOut'); arc.animateShape(true).when(1000, { startAngle: PI$3 * 3 / 2 }).delay(300).start('circularInOut'); group.add(arc); } // Inject resize group.resize = function () { var textWidth = textContent.getBoundingRect().width; var r = opts.showSpinner ? opts.spinnerRadius : 0; // cx = (containerWidth - arcDiameter - textDistance - textWidth) / 2 // textDistance needs to be calculated when both animation and text exist var cx = (api.getWidth() - r * 2 - (opts.showSpinner && textWidth ? 10 : 0) - textWidth) / 2 - (opts.showSpinner && textWidth ? 0 : 5 + textWidth / 2) // only show the text + (opts.showSpinner ? 0 : textWidth / 2) // only show the spinner + (textWidth ? 0 : r); var cy = api.getHeight() / 2; opts.showSpinner && arc.setShape({ cx: cx, cy: cy }); labelRect.setShape({ x: cx - r, y: cy - r, width: r * 2, height: r * 2 }); mask.setShape({ x: 0, y: 0, width: api.getWidth(), height: api.getHeight() }); }; group.resize(); return group; } var Scheduler = /** @class */ function () { function Scheduler(ecInstance, api, dataProcessorHandlers, visualHandlers) { // key: handlerUID this._stageTaskMap = createHashMap(); this.ecInstance = ecInstance; this.api = api; // Fix current processors in case that in some rear cases that // processors might be registered after echarts instance created. // Register processors incrementally for a echarts instance is // not supported by this stream architecture. dataProcessorHandlers = this._dataProcessorHandlers = dataProcessorHandlers.slice(); visualHandlers = this._visualHandlers = visualHandlers.slice(); this._allHandlers = dataProcessorHandlers.concat(visualHandlers); } Scheduler.prototype.restoreData = function (ecModel, payload) { // TODO: Only restore needed series and components, but not all components. // Currently `restoreData` of all of the series and component will be called. // But some independent components like `title`, `legend`, `graphic`, `toolbox`, // `tooltip`, `axisPointer`, etc, do not need series refresh when `setOption`, // and some components like coordinate system, axes, dataZoom, visualMap only // need their target series refresh. // (1) If we are implementing this feature some day, we should consider these cases: // if a data processor depends on a component (e.g., dataZoomProcessor depends // on the settings of `dataZoom`), it should be re-performed if the component // is modified by `setOption`. // (2) If a processor depends on sevral series, speicified by its `getTargetSeries`, // it should be re-performed when the result array of `getTargetSeries` changed. // We use `dependencies` to cover these issues. // (3) How to update target series when coordinate system related components modified. // TODO: simply the dirty mechanism? Check whether only the case here can set tasks dirty, // and this case all of the tasks will be set as dirty. ecModel.restoreData(payload); // Theoretically an overall task not only depends on each of its target series, but also // depends on all of the series. // The overall task is not in pipeline, and `ecModel.restoreData` only set pipeline tasks // dirty. If `getTargetSeries` of an overall task returns nothing, we should also ensure // that the overall task is set as dirty and to be performed, otherwise it probably cause // state chaos. So we have to set dirty of all of the overall tasks manually, otherwise it // probably cause state chaos (consider `dataZoomProcessor`). this._stageTaskMap.each(function (taskRecord) { var overallTask = taskRecord.overallTask; overallTask && overallTask.dirty(); }); }; // If seriesModel provided, incremental threshold is check by series data. Scheduler.prototype.getPerformArgs = function (task, isBlock) { // For overall task if (!task.__pipeline) { return; } var pipeline = this._pipelineMap.get(task.__pipeline.id); var pCtx = pipeline.context; var incremental = !isBlock && pipeline.progressiveEnabled && (!pCtx || pCtx.progressiveRender) && task.__idxInPipeline > pipeline.blockIndex; var step = incremental ? pipeline.step : null; var modDataCount = pCtx && pCtx.modDataCount; var modBy = modDataCount != null ? Math.ceil(modDataCount / step) : null; return { step: step, modBy: modBy, modDataCount: modDataCount }; }; Scheduler.prototype.getPipeline = function (pipelineId) { return this._pipelineMap.get(pipelineId); }; /** * Current, progressive rendering starts from visual and layout. * Always detect render mode in the same stage, avoiding that incorrect * detection caused by data filtering. * Caution: * `updateStreamModes` use `seriesModel.getData()`. */ Scheduler.prototype.updateStreamModes = function (seriesModel, view) { var pipeline = this._pipelineMap.get(seriesModel.uid); var data = seriesModel.getData(); var dataLen = data.count(); // `progressiveRender` means that can render progressively in each // animation frame. Note that some types of series do not provide // `view.incrementalPrepareRender` but support `chart.appendData`. We // use the term `incremental` but not `progressive` to describe the // case that `chart.appendData`. var progressiveRender = pipeline.progressiveEnabled && view.incrementalPrepareRender && dataLen >= pipeline.threshold; var large = seriesModel.get('large') && dataLen >= seriesModel.get('largeThreshold'); // TODO: modDataCount should not updated if `appendData`, otherwise cause whole repaint. // see `test/candlestick-large3.html` var modDataCount = seriesModel.get('progressiveChunkMode') === 'mod' ? dataLen : null; seriesModel.pipelineContext = pipeline.context = { progressiveRender: progressiveRender, modDataCount: modDataCount, large: large }; }; Scheduler.prototype.restorePipelines = function (ecModel) { var scheduler = this; var pipelineMap = scheduler._pipelineMap = createHashMap(); ecModel.eachSeries(function (seriesModel) { var progressive = seriesModel.getProgressive(); var pipelineId = seriesModel.uid; pipelineMap.set(pipelineId, { id: pipelineId, head: null, tail: null, threshold: seriesModel.getProgressiveThreshold(), progressiveEnabled: progressive && !(seriesModel.preventIncremental && seriesModel.preventIncremental()), blockIndex: -1, step: Math.round(progressive || 700), count: 0 }); scheduler._pipe(seriesModel, seriesModel.dataTask); }); }; Scheduler.prototype.prepareStageTasks = function () { var stageTaskMap = this._stageTaskMap; var ecModel = this.api.getModel(); var api = this.api; each(this._allHandlers, function (handler) { var record = stageTaskMap.get(handler.uid) || stageTaskMap.set(handler.uid, {}); var errMsg = ''; if ("development" !== 'production') { // Currently do not need to support to sepecify them both. errMsg = '"reset" and "overallReset" must not be both specified.'; } assert(!(handler.reset && handler.overallReset), errMsg); handler.reset && this._createSeriesStageTask(handler, record, ecModel, api); handler.overallReset && this._createOverallStageTask(handler, record, ecModel, api); }, this); }; Scheduler.prototype.prepareView = function (view, model, ecModel, api) { var renderTask = view.renderTask; var context = renderTask.context; context.model = model; context.ecModel = ecModel; context.api = api; renderTask.__block = !view.incrementalPrepareRender; this._pipe(model, renderTask); }; Scheduler.prototype.performDataProcessorTasks = function (ecModel, payload) { // If we do not use `block` here, it should be considered when to update modes. this._performStageTasks(this._dataProcessorHandlers, ecModel, payload, { block: true }); }; Scheduler.prototype.performVisualTasks = function (ecModel, payload, opt) { this._performStageTasks(this._visualHandlers, ecModel, payload, opt); }; Scheduler.prototype._performStageTasks = function (stageHandlers, ecModel, payload, opt) { opt = opt || {}; var unfinished = false; var scheduler = this; each(stageHandlers, function (stageHandler, idx) { if (opt.visualType && opt.visualType !== stageHandler.visualType) { return; } var stageHandlerRecord = scheduler._stageTaskMap.get(stageHandler.uid); var seriesTaskMap = stageHandlerRecord.seriesTaskMap; var overallTask = stageHandlerRecord.overallTask; if (overallTask) { var overallNeedDirty_1; var agentStubMap = overallTask.agentStubMap; agentStubMap.each(function (stub) { if (needSetDirty(opt, stub)) { stub.dirty(); overallNeedDirty_1 = true; } }); overallNeedDirty_1 && overallTask.dirty(); scheduler.updatePayload(overallTask, payload); var performArgs_1 = scheduler.getPerformArgs(overallTask, opt.block); // Execute stubs firstly, which may set the overall task dirty, // then execute the overall task. And stub will call seriesModel.setData, // which ensures that in the overallTask seriesModel.getData() will not // return incorrect data. agentStubMap.each(function (stub) { stub.perform(performArgs_1); }); if (overallTask.perform(performArgs_1)) { unfinished = true; } } else if (seriesTaskMap) { seriesTaskMap.each(function (task, pipelineId) { if (needSetDirty(opt, task)) { task.dirty(); } var performArgs = scheduler.getPerformArgs(task, opt.block); // FIXME // if intending to decalare `performRawSeries` in handlers, only // stream-independent (specifically, data item independent) operations can be // performed. Because is a series is filtered, most of the tasks will not // be performed. A stream-dependent operation probably cause wrong biz logic. // Perhaps we should not provide a separate callback for this case instead // of providing the config `performRawSeries`. The stream-dependent operaions // and stream-independent operations should better not be mixed. performArgs.skip = !stageHandler.performRawSeries && ecModel.isSeriesFiltered(task.context.model); scheduler.updatePayload(task, payload); if (task.perform(performArgs)) { unfinished = true; } }); } }); function needSetDirty(opt, task) { return opt.setDirty && (!opt.dirtyMap || opt.dirtyMap.get(task.__pipeline.id)); } this.unfinished = unfinished || this.unfinished; }; Scheduler.prototype.performSeriesTasks = function (ecModel) { var unfinished; ecModel.eachSeries(function (seriesModel) { // Progress to the end for dataInit and dataRestore. unfinished = seriesModel.dataTask.perform() || unfinished; }); this.unfinished = unfinished || this.unfinished; }; Scheduler.prototype.plan = function () { // Travel pipelines, check block. this._pipelineMap.each(function (pipeline) { var task = pipeline.tail; do { if (task.__block) { pipeline.blockIndex = task.__idxInPipeline; break; } task = task.getUpstream(); } while (task); }); }; Scheduler.prototype.updatePayload = function (task, payload) { payload !== 'remain' && (task.context.payload = payload); }; Scheduler.prototype._createSeriesStageTask = function (stageHandler, stageHandlerRecord, ecModel, api) { var scheduler = this; var oldSeriesTaskMap = stageHandlerRecord.seriesTaskMap; // The count of stages are totally about only several dozen, so // do not need to reuse the map. var newSeriesTaskMap = stageHandlerRecord.seriesTaskMap = createHashMap(); var seriesType = stageHandler.seriesType; var getTargetSeries = stageHandler.getTargetSeries; // If a stageHandler should cover all series, `createOnAllSeries` should be declared mandatorily, // to avoid some typo or abuse. Otherwise if an extension do not specify a `seriesType`, // it works but it may cause other irrelevant charts blocked. if (stageHandler.createOnAllSeries) { ecModel.eachRawSeries(create); } else if (seriesType) { ecModel.eachRawSeriesByType(seriesType, create); } else if (getTargetSeries) { getTargetSeries(ecModel, api).each(create); } function create(seriesModel) { var pipelineId = seriesModel.uid; // Init tasks for each seriesModel only once. // Reuse original task instance. var task = newSeriesTaskMap.set(pipelineId, oldSeriesTaskMap && oldSeriesTaskMap.get(pipelineId) || createTask({ plan: seriesTaskPlan, reset: seriesTaskReset, count: seriesTaskCount })); task.context = { model: seriesModel, ecModel: ecModel, api: api, // PENDING: `useClearVisual` not used? useClearVisual: stageHandler.isVisual && !stageHandler.isLayout, plan: stageHandler.plan, reset: stageHandler.reset, scheduler: scheduler }; scheduler._pipe(seriesModel, task); } }; Scheduler.prototype._createOverallStageTask = function (stageHandler, stageHandlerRecord, ecModel, api) { var scheduler = this; var overallTask = stageHandlerRecord.overallTask = stageHandlerRecord.overallTask // For overall task, the function only be called on reset stage. || createTask({ reset: overallTaskReset }); overallTask.context = { ecModel: ecModel, api: api, overallReset: stageHandler.overallReset, scheduler: scheduler }; var oldAgentStubMap = overallTask.agentStubMap; // The count of stages are totally about only several dozen, so // do not need to reuse the map. var newAgentStubMap = overallTask.agentStubMap = createHashMap(); var seriesType = stageHandler.seriesType; var getTargetSeries = stageHandler.getTargetSeries; var overallProgress = true; var shouldOverallTaskDirty = false; // FIXME:TS never used, so comment it // let modifyOutputEnd = stageHandler.modifyOutputEnd; // An overall task with seriesType detected or has `getTargetSeries`, we add // stub in each pipelines, it will set the overall task dirty when the pipeline // progress. Moreover, to avoid call the overall task each frame (too frequent), // we set the pipeline block. var errMsg = ''; if ("development" !== 'production') { errMsg = '"createOnAllSeries" do not supported for "overallReset", ' + 'becuase it will block all streams.'; } assert(!stageHandler.createOnAllSeries, errMsg); if (seriesType) { ecModel.eachRawSeriesByType(seriesType, createStub); } else if (getTargetSeries) { getTargetSeries(ecModel, api).each(createStub); } // Otherwise, (usually it is legancy case), the overall task will only be // executed when upstream dirty. Otherwise the progressive rendering of all // pipelines will be disabled unexpectedly. But it still needs stubs to receive // dirty info from upsteam. else { overallProgress = false; each(ecModel.getSeries(), createStub); } function createStub(seriesModel) { var pipelineId = seriesModel.uid; var stub = newAgentStubMap.set(pipelineId, oldAgentStubMap && oldAgentStubMap.get(pipelineId) || ( // When the result of `getTargetSeries` changed, the overallTask // should be set as dirty and re-performed. shouldOverallTaskDirty = true, createTask({ reset: stubReset, onDirty: stubOnDirty }))); stub.context = { model: seriesModel, overallProgress: overallProgress // FIXME:TS never used, so comment it // modifyOutputEnd: modifyOutputEnd }; stub.agent = overallTask; stub.__block = overallProgress; scheduler._pipe(seriesModel, stub); } if (shouldOverallTaskDirty) { overallTask.dirty(); } }; Scheduler.prototype._pipe = function (seriesModel, task) { var pipelineId = seriesModel.uid; var pipeline = this._pipelineMap.get(pipelineId); !pipeline.head && (pipeline.head = task); pipeline.tail && pipeline.tail.pipe(task); pipeline.tail = task; task.__idxInPipeline = pipeline.count++; task.__pipeline = pipeline; }; Scheduler.wrapStageHandler = function (stageHandler, visualType) { if (isFunction(stageHandler)) { stageHandler = { overallReset: stageHandler, seriesType: detectSeriseType(stageHandler) }; } stageHandler.uid = getUID('stageHandler'); visualType && (stageHandler.visualType = visualType); return stageHandler; }; return Scheduler; }(); function overallTaskReset(context) { context.overallReset(context.ecModel, context.api, context.payload); } function stubReset(context) { return context.overallProgress && stubProgress; } function stubProgress() { this.agent.dirty(); this.getDownstream().dirty(); } function stubOnDirty() { this.agent && this.agent.dirty(); } function seriesTaskPlan(context) { return context.plan ? context.plan(context.model, context.ecModel, context.api, context.payload) : null; } function seriesTaskReset(context) { if (context.useClearVisual) { context.data.clearAllVisual(); } var resetDefines = context.resetDefines = normalizeToArray(context.reset(context.model, context.ecModel, context.api, context.payload)); return resetDefines.length > 1 ? map(resetDefines, function (v, idx) { return makeSeriesTaskProgress(idx); }) : singleSeriesTaskProgress; } var singleSeriesTaskProgress = makeSeriesTaskProgress(0); function makeSeriesTaskProgress(resetDefineIdx) { return function (params, context) { var data = context.data; var resetDefine = context.resetDefines[resetDefineIdx]; if (resetDefine && resetDefine.dataEach) { for (var i = params.start; i < params.end; i++) { resetDefine.dataEach(data, i); } } else if (resetDefine && resetDefine.progress) { resetDefine.progress(params, data); } }; } function seriesTaskCount(context) { return context.data.count(); } /** * Only some legacy stage handlers (usually in echarts extensions) are pure function. * To ensure that they can work normally, they should work in block mode, that is, * they should not be started util the previous tasks finished. So they cause the * progressive rendering disabled. We try to detect the series type, to narrow down * the block range to only the series type they concern, but not all series. */ function detectSeriseType(legacyFunc) { seriesType = null; try { // Assume there is no async when calling `eachSeriesByType`. legacyFunc(ecModelMock, apiMock); } catch (e) {} return seriesType; } var ecModelMock = {}; var apiMock = {}; var seriesType; mockMethods(ecModelMock, GlobalModel); mockMethods(apiMock, ExtensionAPI); ecModelMock.eachSeriesByType = ecModelMock.eachRawSeriesByType = function (type) { seriesType = type; }; ecModelMock.eachComponent = function (cond) { if (cond.mainType === 'series' && cond.subType) { seriesType = cond.subType; } }; function mockMethods(target, Clz) { /* eslint-disable */ for (var name_1 in Clz.prototype) { // Do not use hasOwnProperty target[name_1] = noop; } /* eslint-enable */ } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ var colorAll = ['#37A2DA', '#32C5E9', '#67E0E3', '#9FE6B8', '#FFDB5C', '#ff9f7f', '#fb7293', '#E062AE', '#E690D1', '#e7bcf3', '#9d96f5', '#8378EA', '#96BFFF']; var lightTheme = { color: colorAll, colorLayer: [['#37A2DA', '#ffd85c', '#fd7b5f'], ['#37A2DA', '#67E0E3', '#FFDB5C', '#ff9f7f', '#E062AE', '#9d96f5'], ['#37A2DA', '#32C5E9', '#9FE6B8', '#FFDB5C', '#ff9f7f', '#fb7293', '#e7bcf3', '#8378EA', '#96BFFF'], colorAll] }; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ var contrastColor = '#B9B8CE'; var backgroundColor = '#100C2A'; var axisCommon = function () { return { axisLine: { lineStyle: { color: contrastColor } }, splitLine: { lineStyle: { color: '#484753' } }, splitArea: { areaStyle: { color: ['rgba(255,255,255,0.02)', 'rgba(255,255,255,0.05)'] } }, minorSplitLine: { lineStyle: { color: '#20203B' } } }; }; var colorPalette = ['#4992ff', '#7cffb2', '#fddd60', '#ff6e76', '#58d9f9', '#05c091', '#ff8a45', '#8d48e3', '#dd79ff']; var theme = { darkMode: true, color: colorPalette, backgroundColor: backgroundColor, axisPointer: { lineStyle: { color: '#817f91' }, crossStyle: { color: '#817f91' }, label: { // TODO Contrast of label backgorundColor color: '#fff' } }, legend: { textStyle: { color: contrastColor } }, textStyle: { color: contrastColor }, title: { textStyle: { color: '#EEF1FA' }, subtextStyle: { color: '#B9B8CE' } }, toolbox: { iconStyle: { borderColor: contrastColor } }, dataZoom: { borderColor: '#71708A', textStyle: { color: contrastColor }, brushStyle: { color: 'rgba(135,163,206,0.3)' }, handleStyle: { color: '#353450', borderColor: '#C5CBE3' }, moveHandleStyle: { color: '#B0B6C3', opacity: 0.3 }, fillerColor: 'rgba(135,163,206,0.2)', emphasis: { handleStyle: { borderColor: '#91B7F2', color: '#4D587D' }, moveHandleStyle: { color: '#636D9A', opacity: 0.7 } }, dataBackground: { lineStyle: { color: '#71708A', width: 1 }, areaStyle: { color: '#71708A' } }, selectedDataBackground: { lineStyle: { color: '#87A3CE' }, areaStyle: { color: '#87A3CE' } } }, visualMap: { textStyle: { color: contrastColor } }, timeline: { lineStyle: { color: contrastColor }, label: { color: contrastColor }, controlStyle: { color: contrastColor, borderColor: contrastColor } }, calendar: { itemStyle: { color: backgroundColor }, dayLabel: { color: contrastColor }, monthLabel: { color: contrastColor }, yearLabel: { color: contrastColor } }, timeAxis: axisCommon(), logAxis: axisCommon(), valueAxis: axisCommon(), categoryAxis: axisCommon(), line: { symbol: 'circle' }, graph: { color: colorPalette }, gauge: { title: { color: contrastColor }, axisLine: { lineStyle: { color: [[1, 'rgba(207,212,219,0.2)']] } }, axisLabel: { color: contrastColor }, detail: { color: '#EEF1FA' } }, candlestick: { itemStyle: { color: '#f64e56', color0: '#54ea92', borderColor: '#f64e56', borderColor0: '#54ea92' // borderColor: '#ca2824', // borderColor0: '#09a443' } } }; theme.categoryAxis.splitLine.show = false; /** * Usage of query: * `chart.on('click', query, handler);` * The `query` can be: * + The component type query string, only `mainType` or `mainType.subType`, * like: 'xAxis', 'series', 'xAxis.category' or 'series.line'. * + The component query object, like: * `{seriesIndex: 2}`, `{seriesName: 'xx'}`, `{seriesId: 'some'}`, * `{xAxisIndex: 2}`, `{xAxisName: 'xx'}`, `{xAxisId: 'some'}`. * + The data query object, like: * `{dataIndex: 123}`, `{dataType: 'link'}`, `{name: 'some'}`. * + The other query object (cmponent customized query), like: * `{element: 'some'}` (only available in custom series). * * Caveat: If a prop in the `query` object is `null/undefined`, it is the * same as there is no such prop in the `query` object. */ var ECEventProcessor = /** @class */ function () { function ECEventProcessor() {} ECEventProcessor.prototype.normalizeQuery = function (query) { var cptQuery = {}; var dataQuery = {}; var otherQuery = {}; // `query` is `mainType` or `mainType.subType` of component. if (isString(query)) { var condCptType = parseClassType(query); // `.main` and `.sub` may be ''. cptQuery.mainType = condCptType.main || null; cptQuery.subType = condCptType.sub || null; } // `query` is an object, convert to {mainType, index, name, id}. else { // `xxxIndex`, `xxxName`, `xxxId`, `name`, `dataIndex`, `dataType` is reserved, // can not be used in `compomentModel.filterForExposedEvent`. var suffixes_1 = ['Index', 'Name', 'Id']; var dataKeys_1 = { name: 1, dataIndex: 1, dataType: 1 }; each(query, function (val, key) { var reserved = false; for (var i = 0; i < suffixes_1.length; i++) { var propSuffix = suffixes_1[i]; var suffixPos = key.lastIndexOf(propSuffix); if (suffixPos > 0 && suffixPos === key.length - propSuffix.length) { var mainType = key.slice(0, suffixPos); // Consider `dataIndex`. if (mainType !== 'data') { cptQuery.mainType = mainType; cptQuery[propSuffix.toLowerCase()] = val; reserved = true; } } } if (dataKeys_1.hasOwnProperty(key)) { dataQuery[key] = val; reserved = true; } if (!reserved) { otherQuery[key] = val; } }); } return { cptQuery: cptQuery, dataQuery: dataQuery, otherQuery: otherQuery }; }; ECEventProcessor.prototype.filter = function (eventType, query) { // They should be assigned before each trigger call. var eventInfo = this.eventInfo; if (!eventInfo) { return true; } var targetEl = eventInfo.targetEl; var packedEvent = eventInfo.packedEvent; var model = eventInfo.model; var view = eventInfo.view; // For event like 'globalout'. if (!model || !view) { return true; } var cptQuery = query.cptQuery; var dataQuery = query.dataQuery; return check(cptQuery, model, 'mainType') && check(cptQuery, model, 'subType') && check(cptQuery, model, 'index', 'componentIndex') && check(cptQuery, model, 'name') && check(cptQuery, model, 'id') && check(dataQuery, packedEvent, 'name') && check(dataQuery, packedEvent, 'dataIndex') && check(dataQuery, packedEvent, 'dataType') && (!view.filterForExposedEvent || view.filterForExposedEvent(eventType, query.otherQuery, targetEl, packedEvent)); function check(query, host, prop, propOnHost) { return query[prop] == null || host[propOnHost || prop] === query[prop]; } }; ECEventProcessor.prototype.afterTrigger = function () { // Make sure the eventInfo wont be used in next trigger. this.eventInfo = null; }; return ECEventProcessor; }(); var seriesSymbolTask = { createOnAllSeries: true, // For legend. performRawSeries: true, reset: function (seriesModel, ecModel) { var data = seriesModel.getData(); if (seriesModel.legendSymbol) { data.setVisual('legendSymbol', seriesModel.legendSymbol); } if (!seriesModel.hasSymbolVisual) { return; } var symbolType = seriesModel.get('symbol'); var symbolSize = seriesModel.get('symbolSize'); var keepAspect = seriesModel.get('symbolKeepAspect'); var symbolRotate = seriesModel.get('symbolRotate'); var symbolOffset = seriesModel.get('symbolOffset'); var hasSymbolTypeCallback = isFunction(symbolType); var hasSymbolSizeCallback = isFunction(symbolSize); var hasSymbolRotateCallback = isFunction(symbolRotate); var hasSymbolOffsetCallback = isFunction(symbolOffset); var hasCallback = hasSymbolTypeCallback || hasSymbolSizeCallback || hasSymbolRotateCallback || hasSymbolOffsetCallback; var seriesSymbol = !hasSymbolTypeCallback && symbolType ? symbolType : seriesModel.defaultSymbol; var seriesSymbolSize = !hasSymbolSizeCallback ? symbolSize : null; var seriesSymbolRotate = !hasSymbolRotateCallback ? symbolRotate : null; var seriesSymbolOffset = !hasSymbolOffsetCallback ? symbolOffset : null; data.setVisual({ legendSymbol: seriesModel.legendSymbol || seriesSymbol, // If seting callback functions on `symbol` or `symbolSize`, for simplicity and avoiding // to bring trouble, we do not pick a reuslt from one of its calling on data item here, // but just use the default value. Callback on `symbol` or `symbolSize` is convenient in // some cases but generally it is not recommanded. symbol: seriesSymbol, symbolSize: seriesSymbolSize, symbolKeepAspect: keepAspect, symbolRotate: seriesSymbolRotate, symbolOffset: seriesSymbolOffset }); // Only visible series has each data be visual encoded if (ecModel.isSeriesFiltered(seriesModel)) { return; } function dataEach(data, idx) { var rawValue = seriesModel.getRawValue(idx); var params = seriesModel.getDataParams(idx); hasSymbolTypeCallback && data.setItemVisual(idx, 'symbol', symbolType(rawValue, params)); hasSymbolSizeCallback && data.setItemVisual(idx, 'symbolSize', symbolSize(rawValue, params)); hasSymbolRotateCallback && data.setItemVisual(idx, 'symbolRotate', symbolRotate(rawValue, params)); hasSymbolOffsetCallback && data.setItemVisual(idx, 'symbolOffset', symbolOffset(rawValue, params)); } return { dataEach: hasCallback ? dataEach : null }; } }; var dataSymbolTask = { createOnAllSeries: true, // For legend. performRawSeries: true, reset: function (seriesModel, ecModel) { if (!seriesModel.hasSymbolVisual) { return; } // Only visible series has each data be visual encoded if (ecModel.isSeriesFiltered(seriesModel)) { return; } var data = seriesModel.getData(); function dataEach(data, idx) { var itemModel = data.getItemModel(idx); var itemSymbolType = itemModel.getShallow('symbol', true); var itemSymbolSize = itemModel.getShallow('symbolSize', true); var itemSymbolRotate = itemModel.getShallow('symbolRotate', true); var itemSymbolOffset = itemModel.getShallow('symbolOffset', true); var itemSymbolKeepAspect = itemModel.getShallow('symbolKeepAspect', true); // If has item symbol if (itemSymbolType != null) { data.setItemVisual(idx, 'symbol', itemSymbolType); } if (itemSymbolSize != null) { // PENDING Transform symbolSize ? data.setItemVisual(idx, 'symbolSize', itemSymbolSize); } if (itemSymbolRotate != null) { data.setItemVisual(idx, 'symbolRotate', itemSymbolRotate); } if (itemSymbolOffset != null) { data.setItemVisual(idx, 'symbolOffset', itemSymbolOffset); } if (itemSymbolKeepAspect != null) { data.setItemVisual(idx, 'symbolKeepAspect', itemSymbolKeepAspect); } } return { dataEach: data.hasItemOption ? dataEach : null }; } }; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ function getItemVisualFromData(data, dataIndex, key) { switch (key) { case 'color': var style = data.getItemVisual(dataIndex, 'style'); return style[data.getVisual('drawType')]; case 'opacity': return data.getItemVisual(dataIndex, 'style').opacity; case 'symbol': case 'symbolSize': case 'liftZ': return data.getItemVisual(dataIndex, key); default: if ("development" !== 'production') { console.warn("Unknown visual type " + key); } } } function getVisualFromData(data, key) { switch (key) { case 'color': var style = data.getVisual('style'); return style[data.getVisual('drawType')]; case 'opacity': return data.getVisual('style').opacity; case 'symbol': case 'symbolSize': case 'liftZ': return data.getVisual(key); default: if ("development" !== 'production') { console.warn("Unknown visual type " + key); } } } function setItemVisualFromData(data, dataIndex, key, value) { switch (key) { case 'color': // Make sure not sharing style object. var style = data.ensureUniqueItemVisual(dataIndex, 'style'); style[data.getVisual('drawType')] = value; // Mark the color has been changed, not from palette anymore data.setItemVisual(dataIndex, 'colorFromPalette', false); break; case 'opacity': data.ensureUniqueItemVisual(dataIndex, 'style').opacity = value; break; case 'symbol': case 'symbolSize': case 'liftZ': data.setItemVisual(dataIndex, key, value); break; default: if ("development" !== 'production') { console.warn("Unknown visual type " + key); } } } var PI2$6 = Math.PI * 2; var CMD$3 = PathProxy.CMD; var DEFAULT_SEARCH_SPACE = ['top', 'right', 'bottom', 'left']; function getCandidateAnchor(pos, distance, rect, outPt, outDir) { var width = rect.width; var height = rect.height; switch (pos) { case 'top': outPt.set(rect.x + width / 2, rect.y - distance); outDir.set(0, -1); break; case 'bottom': outPt.set(rect.x + width / 2, rect.y + height + distance); outDir.set(0, 1); break; case 'left': outPt.set(rect.x - distance, rect.y + height / 2); outDir.set(-1, 0); break; case 'right': outPt.set(rect.x + width + distance, rect.y + height / 2); outDir.set(1, 0); break; } } function projectPointToArc(cx, cy, r, startAngle, endAngle, anticlockwise, x, y, out) { x -= cx; y -= cy; var d = Math.sqrt(x * x + y * y); x /= d; y /= d; // Intersect point. var ox = x * r + cx; var oy = y * r + cy; if (Math.abs(startAngle - endAngle) % PI2$6 < 1e-4) { // Is a circle out[0] = ox; out[1] = oy; return d - r; } if (anticlockwise) { var tmp = startAngle; startAngle = normalizeRadian(endAngle); endAngle = normalizeRadian(tmp); } else { startAngle = normalizeRadian(startAngle); endAngle = normalizeRadian(endAngle); } if (startAngle > endAngle) { endAngle += PI2$6; } var angle = Math.atan2(y, x); if (angle < 0) { angle += PI2$6; } if (angle >= startAngle && angle <= endAngle || angle + PI2$6 >= startAngle && angle + PI2$6 <= endAngle) { // Project point is on the arc. out[0] = ox; out[1] = oy; return d - r; } var x1 = r * Math.cos(startAngle) + cx; var y1 = r * Math.sin(startAngle) + cy; var x2 = r * Math.cos(endAngle) + cx; var y2 = r * Math.sin(endAngle) + cy; var d1 = (x1 - x) * (x1 - x) + (y1 - y) * (y1 - y); var d2 = (x2 - x) * (x2 - x) + (y2 - y) * (y2 - y); if (d1 < d2) { out[0] = x1; out[1] = y1; return Math.sqrt(d1); } else { out[0] = x2; out[1] = y2; return Math.sqrt(d2); } } function projectPointToLine(x1, y1, x2, y2, x, y, out, limitToEnds) { var dx = x - x1; var dy = y - y1; var dx1 = x2 - x1; var dy1 = y2 - y1; var lineLen = Math.sqrt(dx1 * dx1 + dy1 * dy1); dx1 /= lineLen; dy1 /= lineLen; // dot product var projectedLen = dx * dx1 + dy * dy1; var t = projectedLen / lineLen; if (limitToEnds) { t = Math.min(Math.max(t, 0), 1); } t *= lineLen; var ox = out[0] = x1 + t * dx1; var oy = out[1] = y1 + t * dy1; return Math.sqrt((ox - x) * (ox - x) + (oy - y) * (oy - y)); } function projectPointToRect(x1, y1, width, height, x, y, out) { if (width < 0) { x1 = x1 + width; width = -width; } if (height < 0) { y1 = y1 + height; height = -height; } var x2 = x1 + width; var y2 = y1 + height; var ox = out[0] = Math.min(Math.max(x, x1), x2); var oy = out[1] = Math.min(Math.max(y, y1), y2); return Math.sqrt((ox - x) * (ox - x) + (oy - y) * (oy - y)); } var tmpPt = []; function nearestPointOnRect(pt, rect, out) { var dist = projectPointToRect(rect.x, rect.y, rect.width, rect.height, pt.x, pt.y, tmpPt); out.set(tmpPt[0], tmpPt[1]); return dist; } /** * Calculate min distance corresponding point. * This method won't evaluate if point is in the path. */ function nearestPointOnPath(pt, path, out) { var xi = 0; var yi = 0; var x0 = 0; var y0 = 0; var x1; var y1; var minDist = Infinity; var data = path.data; var x = pt.x; var y = pt.y; for (var i = 0; i < data.length;) { var cmd = data[i++]; if (i === 1) { xi = data[i]; yi = data[i + 1]; x0 = xi; y0 = yi; } var d = minDist; switch (cmd) { case CMD$3.M: // moveTo 命令重新创建一个新的 subpath, 并且更新新的起点 // 在 closePath 的时候使用 x0 = data[i++]; y0 = data[i++]; xi = x0; yi = y0; break; case CMD$3.L: d = projectPointToLine(xi, yi, data[i], data[i + 1], x, y, tmpPt, true); xi = data[i++]; yi = data[i++]; break; case CMD$3.C: d = cubicProjectPoint(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], x, y, tmpPt); xi = data[i++]; yi = data[i++]; break; case CMD$3.Q: d = quadraticProjectPoint(xi, yi, data[i++], data[i++], data[i], data[i + 1], x, y, tmpPt); xi = data[i++]; yi = data[i++]; break; case CMD$3.A: // TODO Arc 判断的开销比较大 var cx = data[i++]; var cy = data[i++]; var rx = data[i++]; var ry = data[i++]; var theta = data[i++]; var dTheta = data[i++]; // TODO Arc 旋转 i += 1; var anticlockwise = !!(1 - data[i++]); x1 = Math.cos(theta) * rx + cx; y1 = Math.sin(theta) * ry + cy; // 不是直接使用 arc 命令 if (i <= 1) { // 第一个命令起点还未定义 x0 = x1; y0 = y1; } // zr 使用scale来模拟椭圆, 这里也对x做一定的缩放 var _x = (x - cx) * ry / rx + cx; d = projectPointToArc(cx, cy, ry, theta, theta + dTheta, anticlockwise, _x, y, tmpPt); xi = Math.cos(theta + dTheta) * rx + cx; yi = Math.sin(theta + dTheta) * ry + cy; break; case CMD$3.R: x0 = xi = data[i++]; y0 = yi = data[i++]; var width = data[i++]; var height = data[i++]; d = projectPointToRect(x0, y0, width, height, x, y, tmpPt); break; case CMD$3.Z: d = projectPointToLine(xi, yi, x0, y0, x, y, tmpPt, true); xi = x0; yi = y0; break; } if (d < minDist) { minDist = d; out.set(tmpPt[0], tmpPt[1]); } } return minDist; } // Temporal varible for intermediate usage. var pt0 = new Point(); var pt1 = new Point(); var pt2 = new Point(); var dir = new Point(); var dir2 = new Point(); /** * Calculate a proper guide line based on the label position and graphic element definition * @param label * @param labelRect * @param target * @param targetRect */ function updateLabelLinePoints(target, labelLineModel) { if (!target) { return; } var labelLine = target.getTextGuideLine(); var label = target.getTextContent(); // Needs to create text guide in each charts. if (!(label && labelLine)) { return; } var labelGuideConfig = target.textGuideLineConfig || {}; var points = [[0, 0], [0, 0], [0, 0]]; var searchSpace = labelGuideConfig.candidates || DEFAULT_SEARCH_SPACE; var labelRect = label.getBoundingRect().clone(); labelRect.applyTransform(label.getComputedTransform()); var minDist = Infinity; var anchorPoint = labelGuideConfig.anchor; var targetTransform = target.getComputedTransform(); var targetInversedTransform = targetTransform && invert([], targetTransform); var len = labelLineModel.get('length2') || 0; if (anchorPoint) { pt2.copy(anchorPoint); } for (var i = 0; i < searchSpace.length; i++) { var candidate = searchSpace[i]; getCandidateAnchor(candidate, 0, labelRect, pt0, dir); Point.scaleAndAdd(pt1, pt0, dir, len); // Transform to target coord space. pt1.transform(targetInversedTransform); // Note: getBoundingRect will ensure the `path` being created. var boundingRect = target.getBoundingRect(); var dist = anchorPoint ? anchorPoint.distance(pt1) : target instanceof Path ? nearestPointOnPath(pt1, target.path, pt2) : nearestPointOnRect(pt1, boundingRect, pt2); // TODO pt2 is in the path if (dist < minDist) { minDist = dist; // Transform back to global space. pt1.transform(targetTransform); pt2.transform(targetTransform); pt2.toArray(points[0]); pt1.toArray(points[1]); pt0.toArray(points[2]); } } limitTurnAngle(points, labelLineModel.get('minTurnAngle')); labelLine.setShape({ points: points }); } // Temporal variable for the limitTurnAngle function var tmpArr = []; var tmpProjPoint = new Point(); /** * Reduce the line segment attached to the label to limit the turn angle between two segments. * @param linePoints * @param minTurnAngle Radian of minimum turn angle. 0 - 180 */ function limitTurnAngle(linePoints, minTurnAngle) { if (!(minTurnAngle <= 180 && minTurnAngle > 0)) { return; } minTurnAngle = minTurnAngle / 180 * Math.PI; // The line points can be // /pt1----pt2 (label) // / // pt0/ pt0.fromArray(linePoints[0]); pt1.fromArray(linePoints[1]); pt2.fromArray(linePoints[2]); Point.sub(dir, pt0, pt1); Point.sub(dir2, pt2, pt1); var len1 = dir.len(); var len2 = dir2.len(); if (len1 < 1e-3 || len2 < 1e-3) { return; } dir.scale(1 / len1); dir2.scale(1 / len2); var angleCos = dir.dot(dir2); var minTurnAngleCos = Math.cos(minTurnAngle); if (minTurnAngleCos < angleCos) { // Smaller than minTurnAngle // Calculate project point of pt0 on pt1-pt2 var d = projectPointToLine(pt1.x, pt1.y, pt2.x, pt2.y, pt0.x, pt0.y, tmpArr, false); tmpProjPoint.fromArray(tmpArr); // Calculate new projected length with limited minTurnAngle and get the new connect point tmpProjPoint.scaleAndAdd(dir2, d / Math.tan(Math.PI - minTurnAngle)); // Limit the new calculated connect point between pt1 and pt2. var t = pt2.x !== pt1.x ? (tmpProjPoint.x - pt1.x) / (pt2.x - pt1.x) : (tmpProjPoint.y - pt1.y) / (pt2.y - pt1.y); if (isNaN(t)) { return; } if (t < 0) { Point.copy(tmpProjPoint, pt1); } else if (t > 1) { Point.copy(tmpProjPoint, pt2); } tmpProjPoint.toArray(linePoints[1]); } } /** * Limit the angle of line and the surface * @param maxSurfaceAngle Radian of minimum turn angle. 0 - 180. 0 is same direction to normal. 180 is opposite */ function limitSurfaceAngle(linePoints, surfaceNormal, maxSurfaceAngle) { if (!(maxSurfaceAngle <= 180 && maxSurfaceAngle > 0)) { return; } maxSurfaceAngle = maxSurfaceAngle / 180 * Math.PI; pt0.fromArray(linePoints[0]); pt1.fromArray(linePoints[1]); pt2.fromArray(linePoints[2]); Point.sub(dir, pt1, pt0); Point.sub(dir2, pt2, pt1); var len1 = dir.len(); var len2 = dir2.len(); if (len1 < 1e-3 || len2 < 1e-3) { return; } dir.scale(1 / len1); dir2.scale(1 / len2); var angleCos = dir.dot(surfaceNormal); var maxSurfaceAngleCos = Math.cos(maxSurfaceAngle); if (angleCos < maxSurfaceAngleCos) { // Calculate project point of pt0 on pt1-pt2 var d = projectPointToLine(pt1.x, pt1.y, pt2.x, pt2.y, pt0.x, pt0.y, tmpArr, false); tmpProjPoint.fromArray(tmpArr); var HALF_PI = Math.PI / 2; var angle2 = Math.acos(dir2.dot(surfaceNormal)); var newAngle = HALF_PI + angle2 - maxSurfaceAngle; if (newAngle >= HALF_PI) { // parallel Point.copy(tmpProjPoint, pt2); } else { // Calculate new projected length with limited minTurnAngle and get the new connect point tmpProjPoint.scaleAndAdd(dir2, d / Math.tan(Math.PI / 2 - newAngle)); // Limit the new calculated connect point between pt1 and pt2. var t = pt2.x !== pt1.x ? (tmpProjPoint.x - pt1.x) / (pt2.x - pt1.x) : (tmpProjPoint.y - pt1.y) / (pt2.y - pt1.y); if (isNaN(t)) { return; } if (t < 0) { Point.copy(tmpProjPoint, pt1); } else if (t > 1) { Point.copy(tmpProjPoint, pt2); } } tmpProjPoint.toArray(linePoints[1]); } } function setLabelLineState(labelLine, ignore, stateName, stateModel) { var isNormal = stateName === 'normal'; var stateObj = isNormal ? labelLine : labelLine.ensureState(stateName); // Make sure display. stateObj.ignore = ignore; // Set smooth var smooth = stateModel.get('smooth'); if (smooth && smooth === true) { smooth = 0.3; } stateObj.shape = stateObj.shape || {}; if (smooth > 0) { stateObj.shape.smooth = smooth; } var styleObj = stateModel.getModel('lineStyle').getLineStyle(); isNormal ? labelLine.useStyle(styleObj) : stateObj.style = styleObj; } function buildLabelLinePath(path, shape) { var smooth = shape.smooth; var points = shape.points; if (!points) { return; } path.moveTo(points[0][0], points[0][1]); if (smooth > 0 && points.length >= 3) { var len1 = dist(points[0], points[1]); var len2 = dist(points[1], points[2]); if (!len1 || !len2) { path.lineTo(points[1][0], points[1][1]); path.lineTo(points[2][0], points[2][1]); return; } var moveLen = Math.min(len1, len2) * smooth; var midPoint0 = lerp([], points[1], points[0], moveLen / len1); var midPoint2 = lerp([], points[1], points[2], moveLen / len2); var midPoint1 = lerp([], midPoint0, midPoint2, 0.5); path.bezierCurveTo(midPoint0[0], midPoint0[1], midPoint0[0], midPoint0[1], midPoint1[0], midPoint1[1]); path.bezierCurveTo(midPoint2[0], midPoint2[1], midPoint2[0], midPoint2[1], points[2][0], points[2][1]); } else { for (var i = 1; i < points.length; i++) { path.lineTo(points[i][0], points[i][1]); } } } /** * Create a label line if necessary and set it's style. */ function setLabelLineStyle(targetEl, statesModels, defaultStyle) { var labelLine = targetEl.getTextGuideLine(); var label = targetEl.getTextContent(); if (!label) { // Not show label line if there is no label. if (labelLine) { targetEl.removeTextGuideLine(); } return; } var normalModel = statesModels.normal; var showNormal = normalModel.get('show'); var labelIgnoreNormal = label.ignore; for (var i = 0; i < DISPLAY_STATES.length; i++) { var stateName = DISPLAY_STATES[i]; var stateModel = statesModels[stateName]; var isNormal = stateName === 'normal'; if (stateModel) { var stateShow = stateModel.get('show'); var isLabelIgnored = isNormal ? labelIgnoreNormal : retrieve2(label.states[stateName] && label.states[stateName].ignore, labelIgnoreNormal); if (isLabelIgnored // Not show when label is not shown in this state. || !retrieve2(stateShow, showNormal) // Use normal state by default if not set. ) { var stateObj = isNormal ? labelLine : labelLine && labelLine.states.normal; if (stateObj) { stateObj.ignore = true; } continue; } // Create labelLine if not exists if (!labelLine) { labelLine = new Polyline(); targetEl.setTextGuideLine(labelLine); // Reset state of normal because it's new created. // NOTE: NORMAL should always been the first! if (!isNormal && (labelIgnoreNormal || !showNormal)) { setLabelLineState(labelLine, true, 'normal', statesModels.normal); } // Use same state proxy. if (targetEl.stateProxy) { labelLine.stateProxy = targetEl.stateProxy; } } setLabelLineState(labelLine, false, stateName, stateModel); } } if (labelLine) { defaults(labelLine.style, defaultStyle); // Not fill. labelLine.style.fill = null; var showAbove = normalModel.get('showAbove'); var labelLineConfig = targetEl.textGuideLineConfig = targetEl.textGuideLineConfig || {}; labelLineConfig.showAbove = showAbove || false; // Custom the buildPath. labelLine.buildPath = buildLabelLinePath; } } function getLabelLineStatesModels(itemModel, labelLineName) { labelLineName = labelLineName || 'labelLine'; var statesModels = { normal: itemModel.getModel(labelLineName) }; for (var i = 0; i < SPECIAL_STATES.length; i++) { var stateName = SPECIAL_STATES[i]; statesModels[stateName] = itemModel.getModel([stateName, labelLineName]); } return statesModels; } function prepareLayoutList(input) { var list = []; for (var i = 0; i < input.length; i++) { var rawItem = input[i]; if (rawItem.defaultAttr.ignore) { continue; } var label = rawItem.label; var transform = label.getComputedTransform(); // NOTE: Get bounding rect after getComputedTransform, or label may not been updated by the host el. var localRect = label.getBoundingRect(); var isAxisAligned = !transform || transform[1] < 1e-5 && transform[2] < 1e-5; var minMargin = label.style.margin || 0; var globalRect = localRect.clone(); globalRect.applyTransform(transform); globalRect.x -= minMargin / 2; globalRect.y -= minMargin / 2; globalRect.width += minMargin; globalRect.height += minMargin; var obb = isAxisAligned ? new OrientedBoundingRect(localRect, transform) : null; list.push({ label: label, labelLine: rawItem.labelLine, rect: globalRect, localRect: localRect, obb: obb, priority: rawItem.priority, defaultAttr: rawItem.defaultAttr, layoutOption: rawItem.computedLayoutOption, axisAligned: isAxisAligned, transform: transform }); } return list; } function shiftLayout(list, xyDim, sizeDim, minBound, maxBound, balanceShift) { var len = list.length; if (len < 2) { return; } list.sort(function (a, b) { return a.rect[xyDim] - b.rect[xyDim]; }); var lastPos = 0; var delta; var adjusted = false; var totalShifts = 0; for (var i = 0; i < len; i++) { var item = list[i]; var rect = item.rect; delta = rect[xyDim] - lastPos; if (delta < 0) { // shiftForward(i, len, -delta); rect[xyDim] -= delta; item.label[xyDim] -= delta; adjusted = true; } var shift = Math.max(-delta, 0); totalShifts += shift; lastPos = rect[xyDim] + rect[sizeDim]; } if (totalShifts > 0 && balanceShift) { // Shift back to make the distribution more equally. shiftList(-totalShifts / len, 0, len); } // TODO bleedMargin? var first = list[0]; var last = list[len - 1]; var minGap; var maxGap; updateMinMaxGap(); // If ends exceed two bounds, squeeze at most 80%, then take the gap of two bounds. minGap < 0 && squeezeGaps(-minGap, 0.8); maxGap < 0 && squeezeGaps(maxGap, 0.8); updateMinMaxGap(); takeBoundsGap(minGap, maxGap, 1); takeBoundsGap(maxGap, minGap, -1); // Handle bailout when there is not enough space. updateMinMaxGap(); if (minGap < 0) { squeezeWhenBailout(-minGap); } if (maxGap < 0) { squeezeWhenBailout(maxGap); } function updateMinMaxGap() { minGap = first.rect[xyDim] - minBound; maxGap = maxBound - last.rect[xyDim] - last.rect[sizeDim]; } function takeBoundsGap(gapThisBound, gapOtherBound, moveDir) { if (gapThisBound < 0) { // Move from other gap if can. var moveFromMaxGap = Math.min(gapOtherBound, -gapThisBound); if (moveFromMaxGap > 0) { shiftList(moveFromMaxGap * moveDir, 0, len); var remained = moveFromMaxGap + gapThisBound; if (remained < 0) { squeezeGaps(-remained * moveDir, 1); } } else { squeezeGaps(-gapThisBound * moveDir, 1); } } } function shiftList(delta, start, end) { if (delta !== 0) { adjusted = true; } for (var i = start; i < end; i++) { var item = list[i]; var rect = item.rect; rect[xyDim] += delta; item.label[xyDim] += delta; } } // Squeeze gaps if the labels exceed margin. function squeezeGaps(delta, maxSqeezePercent) { var gaps = []; var totalGaps = 0; for (var i = 1; i < len; i++) { var prevItemRect = list[i - 1].rect; var gap = Math.max(list[i].rect[xyDim] - prevItemRect[xyDim] - prevItemRect[sizeDim], 0); gaps.push(gap); totalGaps += gap; } if (!totalGaps) { return; } var squeezePercent = Math.min(Math.abs(delta) / totalGaps, maxSqeezePercent); if (delta > 0) { for (var i = 0; i < len - 1; i++) { // Distribute the shift delta to all gaps. var movement = gaps[i] * squeezePercent; // Forward shiftList(movement, 0, i + 1); } } else { // Backward for (var i = len - 1; i > 0; i--) { // Distribute the shift delta to all gaps. var movement = gaps[i - 1] * squeezePercent; shiftList(-movement, i, len); } } } /** * Squeeze to allow overlap if there is no more space available. * Let other overlapping strategy like hideOverlap do the job instead of keep exceeding the bounds. */ function squeezeWhenBailout(delta) { var dir = delta < 0 ? -1 : 1; delta = Math.abs(delta); var moveForEachLabel = Math.ceil(delta / (len - 1)); for (var i = 0; i < len - 1; i++) { if (dir > 0) { // Forward shiftList(moveForEachLabel, 0, i + 1); } else { // Backward shiftList(-moveForEachLabel, len - i - 1, len); } delta -= moveForEachLabel; if (delta <= 0) { return; } } } return adjusted; } /** * Adjust labels on x direction to avoid overlap. */ function shiftLayoutOnX(list, leftBound, rightBound, // If average the shifts on all labels and add them to 0 // TODO: Not sure if should enable it. // Pros: The angle of lines will distribute more equally // Cons: In some layout. It may not what user wanted. like in pie. the label of last sector is usually changed unexpectedly. balanceShift) { return shiftLayout(list, 'x', 'width', leftBound, rightBound, balanceShift); } /** * Adjust labels on y direction to avoid overlap. */ function shiftLayoutOnY(list, topBound, bottomBound, // If average the shifts on all labels and add them to 0 balanceShift) { return shiftLayout(list, 'y', 'height', topBound, bottomBound, balanceShift); } function hideOverlap(labelList) { var displayedLabels = []; // TODO, render overflow visible first, put in the displayedLabels. labelList.sort(function (a, b) { return b.priority - a.priority; }); var globalRect = new BoundingRect(0, 0, 0, 0); function hideEl(el) { if (!el.ignore) { // Show on emphasis. var emphasisState = el.ensureState('emphasis'); if (emphasisState.ignore == null) { emphasisState.ignore = false; } } el.ignore = true; } for (var i = 0; i < labelList.length; i++) { var labelItem = labelList[i]; var isAxisAligned = labelItem.axisAligned; var localRect = labelItem.localRect; var transform = labelItem.transform; var label = labelItem.label; var labelLine = labelItem.labelLine; globalRect.copy(labelItem.rect); // Add a threshold because layout may be aligned precisely. globalRect.width -= 0.1; globalRect.height -= 0.1; globalRect.x += 0.05; globalRect.y += 0.05; var obb = labelItem.obb; var overlapped = false; for (var j = 0; j < displayedLabels.length; j++) { var existsTextCfg = displayedLabels[j]; // Fast rejection. if (!globalRect.intersect(existsTextCfg.rect)) { continue; } if (isAxisAligned && existsTextCfg.axisAligned) { // Is overlapped overlapped = true; break; } if (!existsTextCfg.obb) { // If self is not axis aligned. But other is. existsTextCfg.obb = new OrientedBoundingRect(existsTextCfg.localRect, existsTextCfg.transform); } if (!obb) { // If self is axis aligned. But other is not. obb = new OrientedBoundingRect(localRect, transform); } if (obb.intersect(existsTextCfg.obb)) { overlapped = true; break; } } // TODO Callback to determine if this overlap should be handled? if (overlapped) { hideEl(label); labelLine && hideEl(labelLine); } else { label.attr('ignore', labelItem.defaultAttr.ignore); labelLine && labelLine.attr('ignore', labelItem.defaultAttr.labelGuideIgnore); displayedLabels.push(labelItem); } } } function cloneArr(points) { if (points) { var newPoints = []; for (var i = 0; i < points.length; i++) { newPoints.push(points[i].slice()); } return newPoints; } } function prepareLayoutCallbackParams(labelItem, hostEl) { var label = labelItem.label; var labelLine = hostEl && hostEl.getTextGuideLine(); return { dataIndex: labelItem.dataIndex, dataType: labelItem.dataType, seriesIndex: labelItem.seriesModel.seriesIndex, text: labelItem.label.style.text, rect: labelItem.hostRect, labelRect: labelItem.rect, // x: labelAttr.x, // y: labelAttr.y, align: label.style.align, verticalAlign: label.style.verticalAlign, labelLinePoints: cloneArr(labelLine && labelLine.shape.points) }; } var LABEL_OPTION_TO_STYLE_KEYS = ['align', 'verticalAlign', 'width', 'height', 'fontSize']; var dummyTransformable = new Transformable(); var labelLayoutInnerStore = makeInner(); var labelLineAnimationStore = makeInner(); function extendWithKeys(target, source, keys) { for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (source[key] != null) { target[key] = source[key]; } } } var LABEL_LAYOUT_PROPS = ['x', 'y', 'rotation']; var LabelManager = /** @class */ function () { function LabelManager() { this._labelList = []; this._chartViewList = []; } LabelManager.prototype.clearLabels = function () { this._labelList = []; this._chartViewList = []; }; /** * Add label to manager */ LabelManager.prototype._addLabel = function (dataIndex, dataType, seriesModel, label, layoutOption) { var labelStyle = label.style; var hostEl = label.__hostTarget; var textConfig = hostEl.textConfig || {}; // TODO: If label is in other state. var labelTransform = label.getComputedTransform(); var labelRect = label.getBoundingRect().plain(); BoundingRect.applyTransform(labelRect, labelRect, labelTransform); if (labelTransform) { dummyTransformable.setLocalTransform(labelTransform); } else { // Identity transform. dummyTransformable.x = dummyTransformable.y = dummyTransformable.rotation = dummyTransformable.originX = dummyTransformable.originY = 0; dummyTransformable.scaleX = dummyTransformable.scaleY = 1; } var host = label.__hostTarget; var hostRect; if (host) { hostRect = host.getBoundingRect().plain(); var transform = host.getComputedTransform(); BoundingRect.applyTransform(hostRect, hostRect, transform); } var labelGuide = hostRect && host.getTextGuideLine(); this._labelList.push({ label: label, labelLine: labelGuide, seriesModel: seriesModel, dataIndex: dataIndex, dataType: dataType, layoutOption: layoutOption, computedLayoutOption: null, rect: labelRect, hostRect: hostRect, // Label with lower priority will be hidden when overlapped // Use rect size as default priority priority: hostRect ? hostRect.width * hostRect.height : 0, // Save default label attributes. // For restore if developers want get back to default value in callback. defaultAttr: { ignore: label.ignore, labelGuideIgnore: labelGuide && labelGuide.ignore, x: dummyTransformable.x, y: dummyTransformable.y, scaleX: dummyTransformable.scaleX, scaleY: dummyTransformable.scaleY, rotation: dummyTransformable.rotation, style: { x: labelStyle.x, y: labelStyle.y, align: labelStyle.align, verticalAlign: labelStyle.verticalAlign, width: labelStyle.width, height: labelStyle.height, fontSize: labelStyle.fontSize }, cursor: label.cursor, attachedPos: textConfig.position, attachedRot: textConfig.rotation } }); }; LabelManager.prototype.addLabelsOfSeries = function (chartView) { var _this = this; this._chartViewList.push(chartView); var seriesModel = chartView.__model; var layoutOption = seriesModel.get('labelLayout'); /** * Ignore layouting if it's not specified anything. */ if (!(isFunction(layoutOption) || keys(layoutOption).length)) { return; } chartView.group.traverse(function (child) { if (child.ignore) { return true; // Stop traverse descendants. } // Only support label being hosted on graphic elements. var textEl = child.getTextContent(); var ecData = getECData(child); // Can only attach the text on the element with dataIndex if (textEl && !textEl.disableLabelLayout) { _this._addLabel(ecData.dataIndex, ecData.dataType, seriesModel, textEl, layoutOption); } }); }; LabelManager.prototype.updateLayoutConfig = function (api) { var width = api.getWidth(); var height = api.getHeight(); function createDragHandler(el, labelLineModel) { return function () { updateLabelLinePoints(el, labelLineModel); }; } for (var i = 0; i < this._labelList.length; i++) { var labelItem = this._labelList[i]; var label = labelItem.label; var hostEl = label.__hostTarget; var defaultLabelAttr = labelItem.defaultAttr; var layoutOption = void 0; // TODO A global layout option? if (typeof labelItem.layoutOption === 'function') { layoutOption = labelItem.layoutOption(prepareLayoutCallbackParams(labelItem, hostEl)); } else { layoutOption = labelItem.layoutOption; } layoutOption = layoutOption || {}; labelItem.computedLayoutOption = layoutOption; var degreeToRadian = Math.PI / 180; // TODO hostEl should always exists. // Or label should not have parent because the x, y is all in global space. if (hostEl) { hostEl.setTextConfig({ // Force to set local false. local: false, // Ignore position and rotation config on the host el if x or y is changed. position: layoutOption.x != null || layoutOption.y != null ? null : defaultLabelAttr.attachedPos, // Ignore rotation config on the host el if rotation is changed. rotation: layoutOption.rotate != null ? layoutOption.rotate * degreeToRadian : defaultLabelAttr.attachedRot, offset: [layoutOption.dx || 0, layoutOption.dy || 0] }); } var needsUpdateLabelLine = false; if (layoutOption.x != null) { // TODO width of chart view. label.x = parsePercent$1(layoutOption.x, width); label.setStyle('x', 0); // Ignore movement in style. TODO: origin. needsUpdateLabelLine = true; } else { label.x = defaultLabelAttr.x; label.setStyle('x', defaultLabelAttr.style.x); } if (layoutOption.y != null) { // TODO height of chart view. label.y = parsePercent$1(layoutOption.y, height); label.setStyle('y', 0); // Ignore movement in style. needsUpdateLabelLine = true; } else { label.y = defaultLabelAttr.y; label.setStyle('y', defaultLabelAttr.style.y); } if (layoutOption.labelLinePoints) { var guideLine = hostEl.getTextGuideLine(); if (guideLine) { guideLine.setShape({ points: layoutOption.labelLinePoints }); // Not update needsUpdateLabelLine = false; } } var labelLayoutStore = labelLayoutInnerStore(label); labelLayoutStore.needsUpdateLabelLine = needsUpdateLabelLine; label.rotation = layoutOption.rotate != null ? layoutOption.rotate * degreeToRadian : defaultLabelAttr.rotation; label.scaleX = defaultLabelAttr.scaleX; label.scaleY = defaultLabelAttr.scaleY; for (var k = 0; k < LABEL_OPTION_TO_STYLE_KEYS.length; k++) { var key = LABEL_OPTION_TO_STYLE_KEYS[k]; label.setStyle(key, layoutOption[key] != null ? layoutOption[key] : defaultLabelAttr.style[key]); } if (layoutOption.draggable) { label.draggable = true; label.cursor = 'move'; if (hostEl) { var hostModel = labelItem.seriesModel; if (labelItem.dataIndex != null) { var data = labelItem.seriesModel.getData(labelItem.dataType); hostModel = data.getItemModel(labelItem.dataIndex); } label.on('drag', createDragHandler(hostEl, hostModel.getModel('labelLine'))); } } else { // TODO Other drag functions? label.off('drag'); label.cursor = defaultLabelAttr.cursor; } } }; LabelManager.prototype.layout = function (api) { var width = api.getWidth(); var height = api.getHeight(); var labelList = prepareLayoutList(this._labelList); var labelsNeedsAdjustOnX = filter(labelList, function (item) { return item.layoutOption.moveOverlap === 'shiftX'; }); var labelsNeedsAdjustOnY = filter(labelList, function (item) { return item.layoutOption.moveOverlap === 'shiftY'; }); shiftLayoutOnX(labelsNeedsAdjustOnX, 0, width); shiftLayoutOnY(labelsNeedsAdjustOnY, 0, height); var labelsNeedsHideOverlap = filter(labelList, function (item) { return item.layoutOption.hideOverlap; }); hideOverlap(labelsNeedsHideOverlap); }; /** * Process all labels. Not only labels with layoutOption. */ LabelManager.prototype.processLabelsOverall = function () { var _this = this; each(this._chartViewList, function (chartView) { var seriesModel = chartView.__model; var ignoreLabelLineUpdate = chartView.ignoreLabelLineUpdate; var animationEnabled = seriesModel.isAnimationEnabled(); chartView.group.traverse(function (child) { if (child.ignore) { return true; // Stop traverse descendants. } var needsUpdateLabelLine = !ignoreLabelLineUpdate; var label = child.getTextContent(); if (!needsUpdateLabelLine && label) { needsUpdateLabelLine = labelLayoutInnerStore(label).needsUpdateLabelLine; } if (needsUpdateLabelLine) { _this._updateLabelLine(child, seriesModel); } if (animationEnabled) { _this._animateLabels(child, seriesModel); } }); }); }; LabelManager.prototype._updateLabelLine = function (el, seriesModel) { // Only support label being hosted on graphic elements. var textEl = el.getTextContent(); // Update label line style. var ecData = getECData(el); var dataIndex = ecData.dataIndex; // Only support labelLine on the labels represent data. if (textEl && dataIndex != null) { var data = seriesModel.getData(ecData.dataType); var itemModel = data.getItemModel(dataIndex); var defaultStyle = {}; var visualStyle = data.getItemVisual(dataIndex, 'style'); var visualType = data.getVisual('drawType'); // Default to be same with main color defaultStyle.stroke = visualStyle[visualType]; var labelLineModel = itemModel.getModel('labelLine'); setLabelLineStyle(el, getLabelLineStatesModels(itemModel), defaultStyle); updateLabelLinePoints(el, labelLineModel); } }; LabelManager.prototype._animateLabels = function (el, seriesModel) { var textEl = el.getTextContent(); var guideLine = el.getTextGuideLine(); // Animate if (textEl && !textEl.ignore && !textEl.invisible && !el.disableLabelAnimation && !isElementRemoved(el)) { var layoutStore = labelLayoutInnerStore(textEl); var oldLayout = layoutStore.oldLayout; var ecData = getECData(el); var dataIndex = ecData.dataIndex; var newProps = { x: textEl.x, y: textEl.y, rotation: textEl.rotation }; var data = seriesModel.getData(ecData.dataType); if (!oldLayout) { textEl.attr(newProps); // Disable fade in animation if value animation is enabled. if (!labelInner(textEl).valueAnimation) { var oldOpacity = retrieve2(textEl.style.opacity, 1); // Fade in animation textEl.style.opacity = 0; initProps(textEl, { style: { opacity: oldOpacity } }, seriesModel, dataIndex); } } else { textEl.attr(oldLayout); // Make sure the animation from is in the right status. var prevStates = el.prevStates; if (prevStates) { if (indexOf(prevStates, 'select') >= 0) { textEl.attr(layoutStore.oldLayoutSelect); } if (indexOf(prevStates, 'emphasis') >= 0) { textEl.attr(layoutStore.oldLayoutEmphasis); } } updateProps(textEl, newProps, seriesModel, dataIndex); } layoutStore.oldLayout = newProps; if (textEl.states.select) { var layoutSelect = layoutStore.oldLayoutSelect = {}; extendWithKeys(layoutSelect, newProps, LABEL_LAYOUT_PROPS); extendWithKeys(layoutSelect, textEl.states.select, LABEL_LAYOUT_PROPS); } if (textEl.states.emphasis) { var layoutEmphasis = layoutStore.oldLayoutEmphasis = {}; extendWithKeys(layoutEmphasis, newProps, LABEL_LAYOUT_PROPS); extendWithKeys(layoutEmphasis, textEl.states.emphasis, LABEL_LAYOUT_PROPS); } animateLabelValue(textEl, dataIndex, data, seriesModel, seriesModel); } if (guideLine && !guideLine.ignore && !guideLine.invisible) { var layoutStore = labelLineAnimationStore(guideLine); var oldLayout = layoutStore.oldLayout; var newLayout = { points: guideLine.shape.points }; if (!oldLayout) { guideLine.setShape(newLayout); guideLine.style.strokePercent = 0; initProps(guideLine, { style: { strokePercent: 1 } }, seriesModel); } else { guideLine.attr({ shape: oldLayout }); updateProps(guideLine, { shape: newLayout }, seriesModel); } layoutStore.oldLayout = newLayout; } }; return LabelManager; }(); // Inlucdes: pieSelect, pieUnSelect, pieToggleSelect, mapSelect, mapUnSelect, mapToggleSelect function createLegacyDataSelectAction(seriesType, ecRegisterAction) { function getSeriesIndices(ecModel, payload) { var seriesIndices = []; ecModel.eachComponent({ mainType: 'series', subType: seriesType, query: payload }, function (seriesModel) { seriesIndices.push(seriesModel.seriesIndex); }); return seriesIndices; } each([[seriesType + 'ToggleSelect', 'toggleSelect'], [seriesType + 'Select', 'select'], [seriesType + 'UnSelect', 'unselect']], function (eventsMap) { ecRegisterAction(eventsMap[0], function (payload, ecModel, api) { payload = extend({}, payload); if ("development" !== 'production') { deprecateReplaceLog(payload.type, eventsMap[1]); } api.dispatchAction(extend(payload, { type: eventsMap[1], seriesIndex: getSeriesIndices(ecModel, payload) })); }); }); } function handleSeriesLegacySelectEvents(type, eventPostfix, ecIns, ecModel, payload) { var legacyEventName = type + eventPostfix; if (!ecIns.isSilent(legacyEventName)) { if ("development" !== 'production') { deprecateLog("event " + legacyEventName + " is deprecated."); } ecModel.eachComponent({ mainType: 'series', subType: 'pie' }, function (seriesModel) { var seriesIndex = seriesModel.seriesIndex; var selected = payload.selected; for (var i = 0; i < selected.length; i++) { if (selected[i].seriesIndex === seriesIndex) { var data = seriesModel.getData(); var dataIndex = queryDataIndex(data, payload.fromActionPayload); ecIns.trigger(legacyEventName, { type: legacyEventName, seriesId: seriesModel.id, name: isArray(dataIndex) ? data.getName(dataIndex[0]) : data.getName(dataIndex), selected: extend({}, seriesModel.option.selectedMap) }); } } }); } } function handleLegacySelectEvents(messageCenter, ecIns, api) { messageCenter.on('selectchanged', function (params) { var ecModel = api.getModel(); if (params.isFromClick) { handleSeriesLegacySelectEvents('map', 'selectchanged', ecIns, ecModel, params); handleSeriesLegacySelectEvents('pie', 'selectchanged', ecIns, ecModel, params); } else if (params.fromAction === 'select') { handleSeriesLegacySelectEvents('map', 'selected', ecIns, ecModel, params); handleSeriesLegacySelectEvents('pie', 'selected', ecIns, ecModel, params); } else if (params.fromAction === 'unselect') { handleSeriesLegacySelectEvents('map', 'unselected', ecIns, ecModel, params); handleSeriesLegacySelectEvents('pie', 'unselected', ecIns, ecModel, params); } }); } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ function findEventDispatcher(target, det, returnFirstMatch) { var found; while (target) { if (det(target)) { found = target; if (returnFirstMatch) { break; } } target = target.__hostTarget || target.parent; } return found; } var wmUniqueIndex = Math.round(Math.random() * 9); var WeakMap = (function () { function WeakMap() { this._id = '__ec_inner_' + wmUniqueIndex++; } WeakMap.prototype.get = function (key) { return this._guard(key)[this._id]; }; WeakMap.prototype.set = function (key, value) { var target = this._guard(key); if (typeof Object.defineProperty === 'function') { Object.defineProperty(target, this._id, { value: value, enumerable: false, configurable: true }); } else { target[this._id] = value; } return this; }; WeakMap.prototype["delete"] = function (key) { if (this.has(key)) { delete this._guard(key)[this._id]; return true; } return false; }; WeakMap.prototype.has = function (key) { return !!this._guard(key)[this._id]; }; WeakMap.prototype._guard = function (key) { if (key !== Object(key)) { throw TypeError('Value of WeakMap is not a non-null object.'); } return key; }; return WeakMap; }()); /** * Triangle shape * @inner */ var Triangle = Path.extend({ type: 'triangle', shape: { cx: 0, cy: 0, width: 0, height: 0 }, buildPath: function (path, shape) { var cx = shape.cx; var cy = shape.cy; var width = shape.width / 2; var height = shape.height / 2; path.moveTo(cx, cy - height); path.lineTo(cx + width, cy + height); path.lineTo(cx - width, cy + height); path.closePath(); } }); /** * Diamond shape * @inner */ var Diamond = Path.extend({ type: 'diamond', shape: { cx: 0, cy: 0, width: 0, height: 0 }, buildPath: function (path, shape) { var cx = shape.cx; var cy = shape.cy; var width = shape.width / 2; var height = shape.height / 2; path.moveTo(cx, cy - height); path.lineTo(cx + width, cy); path.lineTo(cx, cy + height); path.lineTo(cx - width, cy); path.closePath(); } }); /** * Pin shape * @inner */ var Pin = Path.extend({ type: 'pin', shape: { // x, y on the cusp x: 0, y: 0, width: 0, height: 0 }, buildPath: function (path, shape) { var x = shape.x; var y = shape.y; var w = shape.width / 5 * 3; // Height must be larger than width var h = Math.max(w, shape.height); var r = w / 2; // Dist on y with tangent point and circle center var dy = r * r / (h - r); var cy = y - h + r + dy; var angle = Math.asin(dy / r); // Dist on x with tangent point and circle center var dx = Math.cos(angle) * r; var tanX = Math.sin(angle); var tanY = Math.cos(angle); var cpLen = r * 0.6; var cpLen2 = r * 0.7; path.moveTo(x - dx, cy + dy); path.arc(x, cy, r, Math.PI - angle, Math.PI * 2 + angle); path.bezierCurveTo(x + dx - tanX * cpLen, cy + dy + tanY * cpLen, x, y - cpLen2, x, y); path.bezierCurveTo(x, y - cpLen2, x - dx + tanX * cpLen, cy + dy + tanY * cpLen, x - dx, cy + dy); path.closePath(); } }); /** * Arrow shape * @inner */ var Arrow = Path.extend({ type: 'arrow', shape: { x: 0, y: 0, width: 0, height: 0 }, buildPath: function (ctx, shape) { var height = shape.height; var width = shape.width; var x = shape.x; var y = shape.y; var dx = width / 3 * 2; ctx.moveTo(x, y); ctx.lineTo(x + dx, y + height); ctx.lineTo(x, y + height / 4 * 3); ctx.lineTo(x - dx, y + height); ctx.lineTo(x, y); ctx.closePath(); } }); /** * Map of path contructors */ // TODO Use function to build symbol path. var symbolCtors = { line: Line, rect: Rect, roundRect: Rect, square: Rect, circle: Circle, diamond: Diamond, pin: Pin, arrow: Arrow, triangle: Triangle }; var symbolShapeMakers = { line: function (x, y, w, h, shape) { shape.x1 = x; shape.y1 = y + h / 2; shape.x2 = x + w; shape.y2 = y + h / 2; }, rect: function (x, y, w, h, shape) { shape.x = x; shape.y = y; shape.width = w; shape.height = h; }, roundRect: function (x, y, w, h, shape) { shape.x = x; shape.y = y; shape.width = w; shape.height = h; shape.r = Math.min(w, h) / 4; }, square: function (x, y, w, h, shape) { var size = Math.min(w, h); shape.x = x; shape.y = y; shape.width = size; shape.height = size; }, circle: function (x, y, w, h, shape) { // Put circle in the center of square shape.cx = x + w / 2; shape.cy = y + h / 2; shape.r = Math.min(w, h) / 2; }, diamond: function (x, y, w, h, shape) { shape.cx = x + w / 2; shape.cy = y + h / 2; shape.width = w; shape.height = h; }, pin: function (x, y, w, h, shape) { shape.x = x + w / 2; shape.y = y + h / 2; shape.width = w; shape.height = h; }, arrow: function (x, y, w, h, shape) { shape.x = x + w / 2; shape.y = y + h / 2; shape.width = w; shape.height = h; }, triangle: function (x, y, w, h, shape) { shape.cx = x + w / 2; shape.cy = y + h / 2; shape.width = w; shape.height = h; } }; var symbolBuildProxies = {}; each(symbolCtors, function (Ctor, name) { symbolBuildProxies[name] = new Ctor(); }); var SymbolClz = Path.extend({ type: 'symbol', shape: { symbolType: '', x: 0, y: 0, width: 0, height: 0 }, calculateTextPosition: function (out, config, rect) { var res = calculateTextPosition(out, config, rect); var shape = this.shape; if (shape && shape.symbolType === 'pin' && config.position === 'inside') { res.y = rect.y + rect.height * 0.4; } return res; }, buildPath: function (ctx, shape, inBundle) { var symbolType = shape.symbolType; if (symbolType !== 'none') { var proxySymbol = symbolBuildProxies[symbolType]; if (!proxySymbol) { // Default rect symbolType = 'rect'; proxySymbol = symbolBuildProxies[symbolType]; } symbolShapeMakers[symbolType](shape.x, shape.y, shape.width, shape.height, proxySymbol.shape); proxySymbol.buildPath(ctx, proxySymbol.shape, inBundle); } } }); // Provide setColor helper method to avoid determine if set the fill or stroke outside function symbolPathSetColor(color, innerColor) { if (this.type !== 'image') { var symbolStyle = this.style; if (this.__isEmptyBrush) { symbolStyle.stroke = color; symbolStyle.fill = innerColor || '#fff'; // TODO Same width with lineStyle in LineView symbolStyle.lineWidth = 2; } else if (this.shape.symbolType === 'line') { symbolStyle.stroke = color; } else { symbolStyle.fill = color; } this.markRedraw(); } } /** * Create a symbol element with given symbol configuration: shape, x, y, width, height, color */ function createSymbol(symbolType, x, y, w, h, color, // whether to keep the ratio of w/h, keepAspect) { // TODO Support image object, DynamicImage. var isEmpty = symbolType.indexOf('empty') === 0; if (isEmpty) { symbolType = symbolType.substr(5, 1).toLowerCase() + symbolType.substr(6); } var symbolPath; if (symbolType.indexOf('image://') === 0) { symbolPath = makeImage(symbolType.slice(8), new BoundingRect(x, y, w, h), keepAspect ? 'center' : 'cover'); } else if (symbolType.indexOf('path://') === 0) { symbolPath = makePath(symbolType.slice(7), {}, new BoundingRect(x, y, w, h), keepAspect ? 'center' : 'cover'); } else { symbolPath = new SymbolClz({ shape: { symbolType: symbolType, x: x, y: y, width: w, height: h } }); } symbolPath.__isEmptyBrush = isEmpty; // TODO Should deprecate setColor symbolPath.setColor = symbolPathSetColor; if (color) { symbolPath.setColor(color); } return symbolPath; } function createLinearGradient(ctx, obj, rect) { var x = obj.x == null ? 0 : obj.x; var x2 = obj.x2 == null ? 1 : obj.x2; var y = obj.y == null ? 0 : obj.y; var y2 = obj.y2 == null ? 0 : obj.y2; if (!obj.global) { x = x * rect.width + rect.x; x2 = x2 * rect.width + rect.x; y = y * rect.height + rect.y; y2 = y2 * rect.height + rect.y; } x = isNaN(x) ? 0 : x; x2 = isNaN(x2) ? 1 : x2; y = isNaN(y) ? 0 : y; y2 = isNaN(y2) ? 0 : y2; var canvasGradient = ctx.createLinearGradient(x, y, x2, y2); return canvasGradient; } function createRadialGradient(ctx, obj, rect) { var width = rect.width; var height = rect.height; var min = Math.min(width, height); var x = obj.x == null ? 0.5 : obj.x; var y = obj.y == null ? 0.5 : obj.y; var r = obj.r == null ? 0.5 : obj.r; if (!obj.global) { x = x * width + rect.x; y = y * height + rect.y; r = r * min; } var canvasGradient = ctx.createRadialGradient(x, y, 0, x, y, r); return canvasGradient; } function getCanvasGradient(ctx, obj, rect) { var canvasGradient = obj.type === 'radial' ? createRadialGradient(ctx, obj, rect) : createLinearGradient(ctx, obj, rect); var colorStops = obj.colorStops; for (var i = 0; i < colorStops.length; i++) { canvasGradient.addColorStop(colorStops[i].offset, colorStops[i].color); } return canvasGradient; } function isClipPathChanged(clipPaths, prevClipPaths) { if (clipPaths === prevClipPaths || (!clipPaths && !prevClipPaths)) { return false; } if (!clipPaths || !prevClipPaths || (clipPaths.length !== prevClipPaths.length)) { return true; } for (var i = 0; i < clipPaths.length; i++) { if (clipPaths[i] !== prevClipPaths[i]) { return true; } } return false; } function normalizeLineDash(lineType, lineWidth) { if (!lineType || lineType === 'solid' || !(lineWidth > 0)) { return null; } lineWidth = lineWidth || 1; return lineType === 'dashed' ? [4 * lineWidth, 2 * lineWidth] : lineType === 'dotted' ? [lineWidth] : isNumber(lineType) ? [lineType] : isArray(lineType) ? lineType : null; } var pathProxyForDraw = new PathProxy(true); function styleHasStroke(style) { var stroke = style.stroke; return !(stroke == null || stroke === 'none' || !(style.lineWidth > 0)); } function styleHasFill(style) { var fill = style.fill; return fill != null && fill !== 'none'; } function doFillPath(ctx, style) { if (style.fillOpacity != null && style.fillOpacity !== 1) { var originalGlobalAlpha = ctx.globalAlpha; ctx.globalAlpha = style.fillOpacity * style.opacity; ctx.fill(); ctx.globalAlpha = originalGlobalAlpha; } else { ctx.fill(); } } function doStrokePath(ctx, style) { if (style.strokeOpacity != null && style.strokeOpacity !== 1) { var originalGlobalAlpha = ctx.globalAlpha; ctx.globalAlpha = style.strokeOpacity * style.opacity; ctx.stroke(); ctx.globalAlpha = originalGlobalAlpha; } else { ctx.stroke(); } } function createCanvasPattern(ctx, pattern, el) { var image = createOrUpdateImage(pattern.image, pattern.__image, el); if (isImageReady(image)) { var canvasPattern = ctx.createPattern(image, pattern.repeat || 'repeat'); if (typeof DOMMatrix === 'function' && canvasPattern.setTransform) { var matrix = new DOMMatrix(); matrix.rotateSelf(0, 0, (pattern.rotation || 0) / Math.PI * 180); matrix.scaleSelf((pattern.scaleX || 1), (pattern.scaleY || 1)); matrix.translateSelf((pattern.x || 0), (pattern.y || 0)); canvasPattern.setTransform(matrix); } return canvasPattern; } } function brushPath(ctx, el, style, inBatch) { var hasStroke = styleHasStroke(style); var hasFill = styleHasFill(style); var strokePercent = style.strokePercent; var strokePart = strokePercent < 1; var firstDraw = !el.path; if ((!el.silent || strokePart) && firstDraw) { el.createPathProxy(); } var path = el.path || pathProxyForDraw; if (!inBatch) { var fill = style.fill; var stroke = style.stroke; var hasFillGradient = hasFill && !!fill.colorStops; var hasStrokeGradient = hasStroke && !!stroke.colorStops; var hasFillPattern = hasFill && !!fill.image; var hasStrokePattern = hasStroke && !!stroke.image; var fillGradient = void 0; var strokeGradient = void 0; var fillPattern = void 0; var strokePattern = void 0; var rect = void 0; if (hasFillGradient || hasStrokeGradient) { rect = el.getBoundingRect(); } if (hasFillGradient) { fillGradient = el.__dirty ? getCanvasGradient(ctx, fill, rect) : el.__canvasFillGradient; el.__canvasFillGradient = fillGradient; } if (hasStrokeGradient) { strokeGradient = el.__dirty ? getCanvasGradient(ctx, stroke, rect) : el.__canvasStrokeGradient; el.__canvasStrokeGradient = strokeGradient; } if (hasFillPattern) { fillPattern = (el.__dirty || !el.__canvasFillPattern) ? createCanvasPattern(ctx, fill, el) : el.__canvasFillPattern; el.__canvasFillPattern = fillPattern; } if (hasStrokePattern) { strokePattern = (el.__dirty || !el.__canvasStrokePattern) ? createCanvasPattern(ctx, stroke, el) : el.__canvasStrokePattern; el.__canvasStrokePattern = fillPattern; } if (hasFillGradient) { ctx.fillStyle = fillGradient; } else if (hasFillPattern) { if (fillPattern) { ctx.fillStyle = fillPattern; } else { hasFill = false; } } if (hasStrokeGradient) { ctx.strokeStyle = strokeGradient; } else if (hasStrokePattern) { if (strokePattern) { ctx.strokeStyle = strokePattern; } else { hasStroke = false; } } } var lineDash = style.lineDash && style.lineWidth > 0 && normalizeLineDash(style.lineDash, style.lineWidth); var lineDashOffset = style.lineDashOffset; var ctxLineDash = !!ctx.setLineDash; var scale = el.getGlobalScale(); path.setScale(scale[0], scale[1], el.segmentIgnoreThreshold); if (lineDash) { var lineScale_1 = (style.strokeNoScale && el.getLineScale) ? el.getLineScale() : 1; if (lineScale_1 && lineScale_1 !== 1) { lineDash = map(lineDash, function (rawVal) { return rawVal / lineScale_1; }); lineDashOffset /= lineScale_1; } } var needsRebuild = true; if (firstDraw || (el.__dirty & Path.SHAPE_CHANGED_BIT) || (lineDash && !ctxLineDash && hasStroke)) { path.setDPR(ctx.dpr); if (strokePart) { path.setContext(null); } else { path.setContext(ctx); needsRebuild = false; } path.reset(); if (lineDash && !ctxLineDash) { path.setLineDash(lineDash); path.setLineDashOffset(lineDashOffset); } el.buildPath(path, el.shape, inBatch); path.toStatic(); el.pathUpdated(); } if (needsRebuild) { path.rebuildPath(ctx, strokePart ? strokePercent : 1); } if (lineDash && ctxLineDash) { ctx.setLineDash(lineDash); ctx.lineDashOffset = lineDashOffset; } if (!inBatch) { if (style.strokeFirst) { if (hasStroke) { doStrokePath(ctx, style); } if (hasFill) { doFillPath(ctx, style); } } else { if (hasFill) { doFillPath(ctx, style); } if (hasStroke) { doStrokePath(ctx, style); } } } if (lineDash && ctxLineDash) { ctx.setLineDash([]); } } function brushImage(ctx, el, style) { var image = el.__image = createOrUpdateImage(style.image, el.__image, el, el.onload); if (!image || !isImageReady(image)) { return; } var x = style.x || 0; var y = style.y || 0; var width = el.getWidth(); var height = el.getHeight(); var aspect = image.width / image.height; if (width == null && height != null) { width = height * aspect; } else if (height == null && width != null) { height = width / aspect; } else if (width == null && height == null) { width = image.width; height = image.height; } if (style.sWidth && style.sHeight) { var sx = style.sx || 0; var sy = style.sy || 0; ctx.drawImage(image, sx, sy, style.sWidth, style.sHeight, x, y, width, height); } else if (style.sx && style.sy) { var sx = style.sx; var sy = style.sy; var sWidth = width - sx; var sHeight = height - sy; ctx.drawImage(image, sx, sy, sWidth, sHeight, x, y, width, height); } else { ctx.drawImage(image, x, y, width, height); } } function brushText(ctx, el, style) { var text = style.text; text != null && (text += ''); if (text) { ctx.font = style.font || DEFAULT_FONT; ctx.textAlign = style.textAlign; ctx.textBaseline = style.textBaseline; var hasLineDash = void 0; if (ctx.setLineDash) { var lineDash = style.lineDash && style.lineWidth > 0 && normalizeLineDash(style.lineDash, style.lineWidth); var lineDashOffset = style.lineDashOffset; if (lineDash) { var lineScale_2 = (style.strokeNoScale && el.getLineScale) ? el.getLineScale() : 1; if (lineScale_2 && lineScale_2 !== 1) { lineDash = map(lineDash, function (rawVal) { return rawVal / lineScale_2; }); lineDashOffset /= lineScale_2; } ctx.setLineDash(lineDash); ctx.lineDashOffset = lineDashOffset; hasLineDash = true; } } if (style.strokeFirst) { if (styleHasStroke(style)) { ctx.strokeText(text, style.x, style.y); } if (styleHasFill(style)) { ctx.fillText(text, style.x, style.y); } } else { if (styleHasFill(style)) { ctx.fillText(text, style.x, style.y); } if (styleHasStroke(style)) { ctx.strokeText(text, style.x, style.y); } } if (hasLineDash) { ctx.setLineDash([]); } } } var SHADOW_NUMBER_PROPS = ['shadowBlur', 'shadowOffsetX', 'shadowOffsetY']; var STROKE_PROPS = [ ['lineCap', 'butt'], ['lineJoin', 'miter'], ['miterLimit', 10] ]; function bindCommonProps(ctx, style, prevStyle, forceSetAll, scope) { var styleChanged = false; if (!forceSetAll) { prevStyle = prevStyle || {}; if (style === prevStyle) { return false; } } if (forceSetAll || style.opacity !== prevStyle.opacity) { if (!styleChanged) { flushPathDrawn(ctx, scope); styleChanged = true; } var opacity = Math.max(Math.min(style.opacity, 1), 0); ctx.globalAlpha = isNaN(opacity) ? DEFAULT_COMMON_STYLE.opacity : opacity; } if (forceSetAll || style.blend !== prevStyle.blend) { if (!styleChanged) { flushPathDrawn(ctx, scope); styleChanged = true; } ctx.globalCompositeOperation = style.blend || DEFAULT_COMMON_STYLE.blend; } for (var i = 0; i < SHADOW_NUMBER_PROPS.length; i++) { var propName = SHADOW_NUMBER_PROPS[i]; if (forceSetAll || style[propName] !== prevStyle[propName]) { if (!styleChanged) { flushPathDrawn(ctx, scope); styleChanged = true; } ctx[propName] = ctx.dpr * (style[propName] || 0); } } if (forceSetAll || style.shadowColor !== prevStyle.shadowColor) { if (!styleChanged) { flushPathDrawn(ctx, scope); styleChanged = true; } ctx.shadowColor = style.shadowColor || DEFAULT_COMMON_STYLE.shadowColor; } return styleChanged; } function bindPathAndTextCommonStyle(ctx, el, prevEl, forceSetAll, scope) { var style = getStyle(el, scope.inHover); var prevStyle = forceSetAll ? null : (prevEl && getStyle(prevEl, scope.inHover) || {}); if (style === prevStyle) { return false; } var styleChanged = bindCommonProps(ctx, style, prevStyle, forceSetAll, scope); if (forceSetAll || style.fill !== prevStyle.fill) { if (!styleChanged) { flushPathDrawn(ctx, scope); styleChanged = true; } ctx.fillStyle = style.fill; } if (forceSetAll || style.stroke !== prevStyle.stroke) { if (!styleChanged) { flushPathDrawn(ctx, scope); styleChanged = true; } ctx.strokeStyle = style.stroke; } if (forceSetAll || style.opacity !== prevStyle.opacity) { if (!styleChanged) { flushPathDrawn(ctx, scope); styleChanged = true; } ctx.globalAlpha = style.opacity == null ? 1 : style.opacity; } if (el.hasStroke()) { var lineWidth = style.lineWidth; var newLineWidth = lineWidth / ((style.strokeNoScale && el && el.getLineScale) ? el.getLineScale() : 1); if (ctx.lineWidth !== newLineWidth) { if (!styleChanged) { flushPathDrawn(ctx, scope); styleChanged = true; } ctx.lineWidth = newLineWidth; } } for (var i = 0; i < STROKE_PROPS.length; i++) { var prop = STROKE_PROPS[i]; var propName = prop[0]; if (forceSetAll || style[propName] !== prevStyle[propName]) { if (!styleChanged) { flushPathDrawn(ctx, scope); styleChanged = true; } ctx[propName] = style[propName] || prop[1]; } } return styleChanged; } function bindImageStyle(ctx, el, prevEl, forceSetAll, scope) { return bindCommonProps(ctx, getStyle(el, scope.inHover), prevEl && getStyle(prevEl, scope.inHover), forceSetAll, scope); } function setContextTransform(ctx, el) { var m = el.transform; var dpr = ctx.dpr || 1; if (m) { ctx.setTransform(dpr * m[0], dpr * m[1], dpr * m[2], dpr * m[3], dpr * m[4], dpr * m[5]); } else { ctx.setTransform(dpr, 0, 0, dpr, 0, 0); } } function updateClipStatus(clipPaths, ctx, scope) { var allClipped = false; for (var i = 0; i < clipPaths.length; i++) { var clipPath = clipPaths[i]; allClipped = allClipped || clipPath.isZeroArea(); setContextTransform(ctx, clipPath); ctx.beginPath(); clipPath.buildPath(ctx, clipPath.shape); ctx.clip(); } scope.allClipped = allClipped; } function isTransformChanged(m0, m1) { if (m0 && m1) { return m0[0] !== m1[0] || m0[1] !== m1[1] || m0[2] !== m1[2] || m0[3] !== m1[3] || m0[4] !== m1[4] || m0[5] !== m1[5]; } else if (!m0 && !m1) { return false; } return true; } var DRAW_TYPE_PATH = 1; var DRAW_TYPE_IMAGE = 2; var DRAW_TYPE_TEXT = 3; var DRAW_TYPE_INCREMENTAL = 4; function canPathBatch(style) { var hasFill = styleHasFill(style); var hasStroke = styleHasStroke(style); return !(style.lineDash || !(+hasFill ^ +hasStroke) || (hasFill && typeof style.fill !== 'string') || (hasStroke && typeof style.stroke !== 'string') || style.strokePercent < 1 || style.strokeOpacity < 1 || style.fillOpacity < 1); } function flushPathDrawn(ctx, scope) { scope.batchFill && ctx.fill(); scope.batchStroke && ctx.stroke(); scope.batchFill = ''; scope.batchStroke = ''; } function getStyle(el, inHover) { return inHover ? (el.__hoverStyle || el.style) : el.style; } function brushSingle(ctx, el) { brush(ctx, el, { inHover: false, viewWidth: 0, viewHeight: 0 }, true); } function brush(ctx, el, scope, isLast) { var m = el.transform; if (!el.shouldBePainted(scope.viewWidth, scope.viewHeight, false, false)) { el.__dirty &= ~Element.REDARAW_BIT; el.__isRendered = false; return; } var clipPaths = el.__clipPaths; var prevElClipPaths = scope.prevElClipPaths; var forceSetTransform = false; var forceSetStyle = false; if (!prevElClipPaths || isClipPathChanged(clipPaths, prevElClipPaths)) { if (prevElClipPaths && prevElClipPaths.length) { flushPathDrawn(ctx, scope); ctx.restore(); forceSetStyle = forceSetTransform = true; scope.prevElClipPaths = null; scope.allClipped = false; scope.prevEl = null; } if (clipPaths && clipPaths.length) { flushPathDrawn(ctx, scope); ctx.save(); updateClipStatus(clipPaths, ctx, scope); forceSetTransform = true; } scope.prevElClipPaths = clipPaths; } if (scope.allClipped) { el.__isRendered = false; return; } el.beforeBrush && el.beforeBrush(); el.innerBeforeBrush(); var prevEl = scope.prevEl; if (!prevEl) { forceSetStyle = forceSetTransform = true; } var canBatchPath = el instanceof Path && el.autoBatch && canPathBatch(el.style); if (forceSetTransform || isTransformChanged(m, prevEl.transform)) { flushPathDrawn(ctx, scope); setContextTransform(ctx, el); } else if (!canBatchPath) { flushPathDrawn(ctx, scope); } var style = getStyle(el, scope.inHover); if (el instanceof Path) { if (scope.lastDrawType !== DRAW_TYPE_PATH) { forceSetStyle = true; scope.lastDrawType = DRAW_TYPE_PATH; } bindPathAndTextCommonStyle(ctx, el, prevEl, forceSetStyle, scope); if (!canBatchPath || (!scope.batchFill && !scope.batchStroke)) { ctx.beginPath(); } brushPath(ctx, el, style, canBatchPath); if (canBatchPath) { scope.batchFill = style.fill || ''; scope.batchStroke = style.stroke || ''; } } else { if (el instanceof TSpan) { if (scope.lastDrawType !== DRAW_TYPE_TEXT) { forceSetStyle = true; scope.lastDrawType = DRAW_TYPE_TEXT; } bindPathAndTextCommonStyle(ctx, el, prevEl, forceSetStyle, scope); brushText(ctx, el, style); } else if (el instanceof ZRImage) { if (scope.lastDrawType !== DRAW_TYPE_IMAGE) { forceSetStyle = true; scope.lastDrawType = DRAW_TYPE_IMAGE; } bindImageStyle(ctx, el, prevEl, forceSetStyle, scope); brushImage(ctx, el, style); } else if (el instanceof IncrementalDisplayable) { if (scope.lastDrawType !== DRAW_TYPE_INCREMENTAL) { forceSetStyle = true; scope.lastDrawType = DRAW_TYPE_INCREMENTAL; } brushIncremental(ctx, el, scope); } } if (canBatchPath && isLast) { flushPathDrawn(ctx, scope); } el.innerAfterBrush(); el.afterBrush && el.afterBrush(); scope.prevEl = el; el.__dirty = 0; el.__isRendered = true; } function brushIncremental(ctx, el, scope) { var displayables = el.getDisplayables(); var temporalDisplayables = el.getTemporalDisplayables(); ctx.save(); var innerScope = { prevElClipPaths: null, prevEl: null, allClipped: false, viewWidth: scope.viewWidth, viewHeight: scope.viewHeight, inHover: scope.inHover }; var i; var len; for (i = el.getCursor(), len = displayables.length; i < len; i++) { var displayable = displayables[i]; displayable.beforeBrush && displayable.beforeBrush(); displayable.innerBeforeBrush(); brush(ctx, displayable, innerScope, i === len - 1); displayable.innerAfterBrush(); displayable.afterBrush && displayable.afterBrush(); innerScope.prevEl = displayable; } for (var i_1 = 0, len_1 = temporalDisplayables.length; i_1 < len_1; i_1++) { var displayable = temporalDisplayables[i_1]; displayable.beforeBrush && displayable.beforeBrush(); displayable.innerBeforeBrush(); brush(ctx, displayable, innerScope, i_1 === len_1 - 1); displayable.innerAfterBrush(); displayable.afterBrush && displayable.afterBrush(); innerScope.prevEl = displayable; } el.clearTemporalDisplayables(); el.notClear = true; ctx.restore(); } var decalMap = new WeakMap(); var decalCache = new LRU(100); var decalKeys = ['symbol', 'symbolSize', 'symbolKeepAspect', 'color', 'backgroundColor', 'dashArrayX', 'dashArrayY', 'maxTileWidth', 'maxTileHeight']; /** * Create or update pattern image from decal options * * @param {InnerDecalObject | 'none'} decalObject decal options, 'none' if no decal * @return {Pattern} pattern with generated image, null if no decal */ function createOrUpdatePatternFromDecal(decalObject, api) { if (decalObject === 'none') { return null; } var dpr = api.getDevicePixelRatio(); var zr = api.getZr(); var isSVG = zr.painter.type === 'svg'; if (decalObject.dirty) { decalMap["delete"](decalObject); } var oldPattern = decalMap.get(decalObject); if (oldPattern) { return oldPattern; } var decalOpt = defaults(decalObject, { symbol: 'rect', symbolSize: 1, symbolKeepAspect: true, color: 'rgba(0, 0, 0, 0.2)', backgroundColor: null, dashArrayX: 5, dashArrayY: 5, rotation: 0, maxTileWidth: 512, maxTileHeight: 512 }); if (decalOpt.backgroundColor === 'none') { decalOpt.backgroundColor = null; } var pattern = { repeat: 'repeat' }; setPatternnSource(pattern); pattern.rotation = decalOpt.rotation; pattern.scaleX = pattern.scaleY = isSVG ? 1 : 1 / dpr; decalMap.set(decalObject, pattern); decalObject.dirty = false; return pattern; function setPatternnSource(pattern) { var keys = [dpr]; var isValidKey = true; for (var i = 0; i < decalKeys.length; ++i) { var value = decalOpt[decalKeys[i]]; var valueType = typeof value; if (value != null && !isArray(value) && valueType !== 'string' && valueType !== 'number' && valueType !== 'boolean') { isValidKey = false; break; } keys.push(value); } var cacheKey; if (isValidKey) { cacheKey = keys.join(',') + (isSVG ? '-svg' : ''); var cache = decalCache.get(cacheKey); if (cache) { isSVG ? pattern.svgElement = cache : pattern.image = cache; } } var dashArrayX = normalizeDashArrayX(decalOpt.dashArrayX); var dashArrayY = normalizeDashArrayY(decalOpt.dashArrayY); var symbolArray = normalizeSymbolArray(decalOpt.symbol); var lineBlockLengthsX = getLineBlockLengthX(dashArrayX); var lineBlockLengthY = getLineBlockLengthY(dashArrayY); var canvas = !isSVG && createCanvas(); var svgRoot = isSVG && zr.painter.createSVGElement('g'); var pSize = getPatternSize(); var ctx; if (canvas) { canvas.width = pSize.width * dpr; canvas.height = pSize.height * dpr; ctx = canvas.getContext('2d'); } brushDecal(); if (isValidKey) { decalCache.put(cacheKey, canvas || svgRoot); } pattern.image = canvas; pattern.svgElement = svgRoot; pattern.svgWidth = pSize.width; pattern.svgHeight = pSize.height; /** * Get minumum length that can make a repeatable pattern. * * @return {Object} pattern width and height */ function getPatternSize() { /** * For example, if dash is [[3, 2], [2, 1]] for X, it looks like * |--- --- --- --- --- ... * |-- -- -- -- -- -- -- -- ... * |--- --- --- --- --- ... * |-- -- -- -- -- -- -- -- ... * So the minumum length of X is 15, * which is the least common multiple of `3 + 2` and `2 + 1` * |--- --- --- |--- --- ... * |-- -- -- -- -- |-- -- -- ... */ var width = 1; for (var i = 0, xlen = lineBlockLengthsX.length; i < xlen; ++i) { width = getLeastCommonMultiple(width, lineBlockLengthsX[i]); } var symbolRepeats = 1; for (var i = 0, xlen = symbolArray.length; i < xlen; ++i) { symbolRepeats = getLeastCommonMultiple(symbolRepeats, symbolArray[i].length); } width *= symbolRepeats; var height = lineBlockLengthY * lineBlockLengthsX.length * symbolArray.length; if ("development" !== 'production') { var warn = function (attrName) { /* eslint-disable-next-line */ console.warn("Calculated decal size is greater than " + attrName + " due to decal option settings so " + attrName + " is used for the decal size. Please consider changing the decal option to make a smaller decal or set " + attrName + " to be larger to avoid incontinuity."); }; if (width > decalOpt.maxTileWidth) { warn('maxTileWidth'); } if (height > decalOpt.maxTileHeight) { warn('maxTileHeight'); } } return { width: Math.max(1, Math.min(width, decalOpt.maxTileWidth)), height: Math.max(1, Math.min(height, decalOpt.maxTileHeight)) }; } function brushDecal() { if (ctx) { ctx.clearRect(0, 0, canvas.width, canvas.height); if (decalOpt.backgroundColor) { ctx.fillStyle = decalOpt.backgroundColor; ctx.fillRect(0, 0, canvas.width, canvas.height); } } var ySum = 0; for (var i = 0; i < dashArrayY.length; ++i) { ySum += dashArrayY[i]; } if (ySum <= 0) { // dashArrayY is 0, draw nothing return; } var y = -lineBlockLengthY; var yId = 0; var yIdTotal = 0; var xId0 = 0; while (y < pSize.height) { if (yId % 2 === 0) { var symbolYId = yIdTotal / 2 % symbolArray.length; var x = 0; var xId1 = 0; var xId1Total = 0; while (x < pSize.width * 2) { var xSum = 0; for (var i = 0; i < dashArrayX[xId0].length; ++i) { xSum += dashArrayX[xId0][i]; } if (xSum <= 0) { // Skip empty line break; } // E.g., [15, 5, 20, 5] draws only for 15 and 20 if (xId1 % 2 === 0) { var size = (1 - decalOpt.symbolSize) * 0.5; var left = x + dashArrayX[xId0][xId1] * size; var top_1 = y + dashArrayY[yId] * size; var width = dashArrayX[xId0][xId1] * decalOpt.symbolSize; var height = dashArrayY[yId] * decalOpt.symbolSize; var symbolXId = xId1Total / 2 % symbolArray[symbolYId].length; brushSymbol(left, top_1, width, height, symbolArray[symbolYId][symbolXId]); } x += dashArrayX[xId0][xId1]; ++xId1Total; ++xId1; if (xId1 === dashArrayX[xId0].length) { xId1 = 0; } } ++xId0; if (xId0 === dashArrayX.length) { xId0 = 0; } } y += dashArrayY[yId]; ++yIdTotal; ++yId; if (yId === dashArrayY.length) { yId = 0; } } function brushSymbol(x, y, width, height, symbolType) { var scale = isSVG ? 1 : dpr; var symbol = createSymbol(symbolType, x * scale, y * scale, width * scale, height * scale, decalOpt.color, decalOpt.symbolKeepAspect); if (isSVG) { svgRoot.appendChild(zr.painter.paintOne(symbol)); } else { // Paint to canvas for all other renderers. brushSingle(ctx, symbol); } } } } } /** * Convert symbol array into normalized array * * @param {string | (string | string[])[]} symbol symbol input * @return {string[][]} normolized symbol array */ function normalizeSymbolArray(symbol) { if (!symbol || symbol.length === 0) { return [['rect']]; } if (typeof symbol === 'string') { return [[symbol]]; } var isAllString = true; for (var i = 0; i < symbol.length; ++i) { if (typeof symbol[i] !== 'string') { isAllString = false; break; } } if (isAllString) { return normalizeSymbolArray([symbol]); } var result = []; for (var i = 0; i < symbol.length; ++i) { if (typeof symbol[i] === 'string') { result.push([symbol[i]]); } else { result.push(symbol[i]); } } return result; } /** * Convert dash input into dashArray * * @param {DecalDashArrayX} dash dash input * @return {number[][]} normolized dash array */ function normalizeDashArrayX(dash) { if (!dash || dash.length === 0) { return [[0, 0]]; } if (typeof dash === 'number') { var dashValue = Math.ceil(dash); return [[dashValue, dashValue]]; } /** * [20, 5] should be normalized into [[20, 5]], * while [20, [5, 10]] should be normalized into [[20, 20], [5, 10]] */ var isAllNumber = true; for (var i = 0; i < dash.length; ++i) { if (typeof dash[i] !== 'number') { isAllNumber = false; break; } } if (isAllNumber) { return normalizeDashArrayX([dash]); } var result = []; for (var i = 0; i < dash.length; ++i) { if (typeof dash[i] === 'number') { var dashValue = Math.ceil(dash[i]); result.push([dashValue, dashValue]); } else { var dashValue = map(dash[i], function (n) { return Math.ceil(n); }); if (dashValue.length % 2 === 1) { // [4, 2, 1] means |---- - -- |---- - -- | // so normalize it to be [4, 2, 1, 4, 2, 1] result.push(dashValue.concat(dashValue)); } else { result.push(dashValue); } } } return result; } /** * Convert dash input into dashArray * * @param {DecalDashArrayY} dash dash input * @return {number[]} normolized dash array */ function normalizeDashArrayY(dash) { if (!dash || typeof dash === 'object' && dash.length === 0) { return [0, 0]; } if (typeof dash === 'number') { var dashValue_1 = Math.ceil(dash); return [dashValue_1, dashValue_1]; } var dashValue = map(dash, function (n) { return Math.ceil(n); }); return dash.length % 2 ? dashValue.concat(dashValue) : dashValue; } /** * Get block length of each line. A block is the length of dash line and space. * For example, a line with [4, 1] has a dash line of 4 and a space of 1 after * that, so the block length of this line is 5. * * @param {number[][]} dash dash arrary of X or Y * @return {number[]} block length of each line */ function getLineBlockLengthX(dash) { return map(dash, function (line) { return getLineBlockLengthY(line); }); } function getLineBlockLengthY(dash) { var blockLength = 0; for (var i = 0; i < dash.length; ++i) { blockLength += dash[i]; } if (dash.length % 2 === 1) { // [4, 2, 1] means |---- - -- |---- - -- | // So total length is (4 + 2 + 1) * 2 return blockLength * 2; } return blockLength; } function decalVisual(ecModel, api) { ecModel.eachRawSeries(function (seriesModel) { if (ecModel.isSeriesFiltered(seriesModel)) { return; } var data = seriesModel.getData(); if (data.hasItemVisual()) { data.each(function (idx) { var decal = data.getItemVisual(idx, 'decal'); if (decal) { var itemStyle = data.ensureUniqueItemVisual(idx, 'style'); itemStyle.decal = createOrUpdatePatternFromDecal(decal, api); } }); } var decal = data.getVisual('decal'); if (decal) { var style = data.getVisual('style'); style.decal = createOrUpdatePatternFromDecal(decal, api); } }); } function parseXML(svg) { if (isString(svg)) { var parser = new DOMParser(); svg = parser.parseFromString(svg, 'text/xml'); } var svgNode = svg; if (svgNode.nodeType === 9) { svgNode = svgNode.firstChild; } while (svgNode.nodeName.toLowerCase() !== 'svg' || svgNode.nodeType !== 1) { svgNode = svgNode.nextSibling; } return svgNode; } var nodeParsers; var INHERITABLE_STYLE_ATTRIBUTES_MAP = { 'fill': 'fill', 'stroke': 'stroke', 'stroke-width': 'lineWidth', 'opacity': 'opacity', 'fill-opacity': 'fillOpacity', 'stroke-opacity': 'strokeOpacity', 'stroke-dasharray': 'lineDash', 'stroke-dashoffset': 'lineDashOffset', 'stroke-linecap': 'lineCap', 'stroke-linejoin': 'lineJoin', 'stroke-miterlimit': 'miterLimit', 'font-family': 'fontFamily', 'font-size': 'fontSize', 'font-style': 'fontStyle', 'font-weight': 'fontWeight', 'text-anchor': 'textAlign', 'visibility': 'visibility', 'display': 'display' }; var INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS = keys(INHERITABLE_STYLE_ATTRIBUTES_MAP); var SELF_STYLE_ATTRIBUTES_MAP = { 'alignment-baseline': 'textBaseline', 'stop-color': 'stopColor' }; var SELF_STYLE_ATTRIBUTES_MAP_KEYS = keys(SELF_STYLE_ATTRIBUTES_MAP); var SVGParser = (function () { function SVGParser() { this._defs = {}; this._root = null; } SVGParser.prototype.parse = function (xml, opt) { opt = opt || {}; var svg = parseXML(xml); if (!svg) { throw new Error('Illegal svg'); } this._defsUsePending = []; var root = new Group(); this._root = root; var named = []; var viewBox = svg.getAttribute('viewBox') || ''; var width = parseFloat((svg.getAttribute('width') || opt.width)); var height = parseFloat((svg.getAttribute('height') || opt.height)); isNaN(width) && (width = null); isNaN(height) && (height = null); parseAttributes(svg, root, null, true, false); var child = svg.firstChild; while (child) { this._parseNode(child, root, named, null, false, false); child = child.nextSibling; } applyDefs(this._defs, this._defsUsePending); this._defsUsePending = []; var viewBoxRect; var viewBoxTransform; if (viewBox) { var viewBoxArr = splitNumberSequence(viewBox); if (viewBoxArr.length >= 4) { viewBoxRect = { x: parseFloat((viewBoxArr[0] || 0)), y: parseFloat((viewBoxArr[1] || 0)), width: parseFloat(viewBoxArr[2]), height: parseFloat(viewBoxArr[3]) }; } } if (viewBoxRect && width != null && height != null) { viewBoxTransform = makeViewBoxTransform(viewBoxRect, { x: 0, y: 0, width: width, height: height }); if (!opt.ignoreViewBox) { var elRoot = root; root = new Group(); root.add(elRoot); elRoot.scaleX = elRoot.scaleY = viewBoxTransform.scale; elRoot.x = viewBoxTransform.x; elRoot.y = viewBoxTransform.y; } } if (!opt.ignoreRootClip && width != null && height != null) { root.setClipPath(new Rect({ shape: { x: 0, y: 0, width: width, height: height } })); } return { root: root, width: width, height: height, viewBoxRect: viewBoxRect, viewBoxTransform: viewBoxTransform, named: named }; }; SVGParser.prototype._parseNode = function (xmlNode, parentGroup, named, namedFrom, isInDefs, isInText) { var nodeName = xmlNode.nodeName.toLowerCase(); var el; var namedFromForSub = namedFrom; if (nodeName === 'defs') { isInDefs = true; } if (nodeName === 'text') { isInText = true; } if (nodeName === 'defs' || nodeName === 'switch') { el = parentGroup; } else { if (!isInDefs) { var parser_1 = nodeParsers[nodeName]; if (parser_1 && hasOwn(nodeParsers, nodeName)) { el = parser_1.call(this, xmlNode, parentGroup); var nameAttr = xmlNode.getAttribute('name'); if (nameAttr) { var newNamed = { name: nameAttr, namedFrom: null, svgNodeTagLower: nodeName, el: el }; named.push(newNamed); if (nodeName === 'g') { namedFromForSub = newNamed; } } else if (namedFrom) { named.push({ name: namedFrom.name, namedFrom: namedFrom, svgNodeTagLower: nodeName, el: el }); } parentGroup.add(el); } } var parser = paintServerParsers[nodeName]; if (parser && hasOwn(paintServerParsers, nodeName)) { var def = parser.call(this, xmlNode); var id = xmlNode.getAttribute('id'); if (id) { this._defs[id] = def; } } } if (el && el.isGroup) { var child = xmlNode.firstChild; while (child) { if (child.nodeType === 1) { this._parseNode(child, el, named, namedFromForSub, isInDefs, isInText); } else if (child.nodeType === 3 && isInText) { this._parseText(child, el); } child = child.nextSibling; } } }; SVGParser.prototype._parseText = function (xmlNode, parentGroup) { var text = new TSpan({ style: { text: xmlNode.textContent }, silent: true, x: this._textX || 0, y: this._textY || 0 }); inheritStyle(parentGroup, text); parseAttributes(xmlNode, text, this._defsUsePending, false, false); applyTextAlignment(text, parentGroup); var textStyle = text.style; var fontSize = textStyle.fontSize; if (fontSize && fontSize < 9) { textStyle.fontSize = 9; text.scaleX *= fontSize / 9; text.scaleY *= fontSize / 9; } var font = (textStyle.fontSize || textStyle.fontFamily) && [ textStyle.fontStyle, textStyle.fontWeight, (textStyle.fontSize || 12) + 'px', textStyle.fontFamily || 'sans-serif' ].join(' '); textStyle.font = font; var rect = text.getBoundingRect(); this._textX += rect.width; parentGroup.add(text); return text; }; SVGParser.internalField = (function () { nodeParsers = { 'g': function (xmlNode, parentGroup) { var g = new Group(); inheritStyle(parentGroup, g); parseAttributes(xmlNode, g, this._defsUsePending, false, false); return g; }, 'rect': function (xmlNode, parentGroup) { var rect = new Rect(); inheritStyle(parentGroup, rect); parseAttributes(xmlNode, rect, this._defsUsePending, false, false); rect.setShape({ x: parseFloat(xmlNode.getAttribute('x') || '0'), y: parseFloat(xmlNode.getAttribute('y') || '0'), width: parseFloat(xmlNode.getAttribute('width') || '0'), height: parseFloat(xmlNode.getAttribute('height') || '0') }); rect.silent = true; return rect; }, 'circle': function (xmlNode, parentGroup) { var circle = new Circle(); inheritStyle(parentGroup, circle); parseAttributes(xmlNode, circle, this._defsUsePending, false, false); circle.setShape({ cx: parseFloat(xmlNode.getAttribute('cx') || '0'), cy: parseFloat(xmlNode.getAttribute('cy') || '0'), r: parseFloat(xmlNode.getAttribute('r') || '0') }); circle.silent = true; return circle; }, 'line': function (xmlNode, parentGroup) { var line = new Line(); inheritStyle(parentGroup, line); parseAttributes(xmlNode, line, this._defsUsePending, false, false); line.setShape({ x1: parseFloat(xmlNode.getAttribute('x1') || '0'), y1: parseFloat(xmlNode.getAttribute('y1') || '0'), x2: parseFloat(xmlNode.getAttribute('x2') || '0'), y2: parseFloat(xmlNode.getAttribute('y2') || '0') }); line.silent = true; return line; }, 'ellipse': function (xmlNode, parentGroup) { var ellipse = new Ellipse(); inheritStyle(parentGroup, ellipse); parseAttributes(xmlNode, ellipse, this._defsUsePending, false, false); ellipse.setShape({ cx: parseFloat(xmlNode.getAttribute('cx') || '0'), cy: parseFloat(xmlNode.getAttribute('cy') || '0'), rx: parseFloat(xmlNode.getAttribute('rx') || '0'), ry: parseFloat(xmlNode.getAttribute('ry') || '0') }); ellipse.silent = true; return ellipse; }, 'polygon': function (xmlNode, parentGroup) { var pointsStr = xmlNode.getAttribute('points'); var pointsArr; if (pointsStr) { pointsArr = parsePoints(pointsStr); } var polygon = new Polygon({ shape: { points: pointsArr || [] }, silent: true }); inheritStyle(parentGroup, polygon); parseAttributes(xmlNode, polygon, this._defsUsePending, false, false); return polygon; }, 'polyline': function (xmlNode, parentGroup) { var pointsStr = xmlNode.getAttribute('points'); var pointsArr; if (pointsStr) { pointsArr = parsePoints(pointsStr); } var polyline = new Polyline({ shape: { points: pointsArr || [] }, silent: true }); inheritStyle(parentGroup, polyline); parseAttributes(xmlNode, polyline, this._defsUsePending, false, false); return polyline; }, 'image': function (xmlNode, parentGroup) { var img = new ZRImage(); inheritStyle(parentGroup, img); parseAttributes(xmlNode, img, this._defsUsePending, false, false); img.setStyle({ image: xmlNode.getAttribute('xlink:href'), x: +xmlNode.getAttribute('x'), y: +xmlNode.getAttribute('y'), width: +xmlNode.getAttribute('width'), height: +xmlNode.getAttribute('height') }); img.silent = true; return img; }, 'text': function (xmlNode, parentGroup) { var x = xmlNode.getAttribute('x') || '0'; var y = xmlNode.getAttribute('y') || '0'; var dx = xmlNode.getAttribute('dx') || '0'; var dy = xmlNode.getAttribute('dy') || '0'; this._textX = parseFloat(x) + parseFloat(dx); this._textY = parseFloat(y) + parseFloat(dy); var g = new Group(); inheritStyle(parentGroup, g); parseAttributes(xmlNode, g, this._defsUsePending, false, true); return g; }, 'tspan': function (xmlNode, parentGroup) { var x = xmlNode.getAttribute('x'); var y = xmlNode.getAttribute('y'); if (x != null) { this._textX = parseFloat(x); } if (y != null) { this._textY = parseFloat(y); } var dx = xmlNode.getAttribute('dx') || '0'; var dy = xmlNode.getAttribute('dy') || '0'; var g = new Group(); inheritStyle(parentGroup, g); parseAttributes(xmlNode, g, this._defsUsePending, false, true); this._textX += parseFloat(dx); this._textY += parseFloat(dy); return g; }, 'path': function (xmlNode, parentGroup) { var d = xmlNode.getAttribute('d') || ''; var path = createFromString(d); inheritStyle(parentGroup, path); parseAttributes(xmlNode, path, this._defsUsePending, false, false); path.silent = true; return path; } }; })(); return SVGParser; }()); var paintServerParsers = { 'lineargradient': function (xmlNode) { var x1 = parseInt(xmlNode.getAttribute('x1') || '0', 10); var y1 = parseInt(xmlNode.getAttribute('y1') || '0', 10); var x2 = parseInt(xmlNode.getAttribute('x2') || '10', 10); var y2 = parseInt(xmlNode.getAttribute('y2') || '0', 10); var gradient = new LinearGradient(x1, y1, x2, y2); parsePaintServerUnit(xmlNode, gradient); parseGradientColorStops(xmlNode, gradient); return gradient; }, 'radialgradient': function (xmlNode) { var cx = parseInt(xmlNode.getAttribute('cx') || '0', 10); var cy = parseInt(xmlNode.getAttribute('cy') || '0', 10); var r = parseInt(xmlNode.getAttribute('r') || '0', 10); var gradient = new RadialGradient(cx, cy, r); parsePaintServerUnit(xmlNode, gradient); parseGradientColorStops(xmlNode, gradient); return gradient; } }; function parsePaintServerUnit(xmlNode, gradient) { var gradientUnits = xmlNode.getAttribute('gradientUnits'); if (gradientUnits === 'userSpaceOnUse') { gradient.global = true; } } function parseGradientColorStops(xmlNode, gradient) { var stop = xmlNode.firstChild; while (stop) { if (stop.nodeType === 1 && stop.nodeName.toLocaleLowerCase() === 'stop') { var offsetStr = stop.getAttribute('offset'); var offset = void 0; if (offsetStr && offsetStr.indexOf('%') > 0) { offset = parseInt(offsetStr, 10) / 100; } else if (offsetStr) { offset = parseFloat(offsetStr); } else { offset = 0; } var styleVals = {}; parseInlineStyle(stop, styleVals, styleVals); var stopColor = styleVals.stopColor || stop.getAttribute('stop-color') || '#000000'; gradient.colorStops.push({ offset: offset, color: stopColor }); } stop = stop.nextSibling; } } function inheritStyle(parent, child) { if (parent && parent.__inheritedStyle) { if (!child.__inheritedStyle) { child.__inheritedStyle = {}; } defaults(child.__inheritedStyle, parent.__inheritedStyle); } } function parsePoints(pointsString) { var list = splitNumberSequence(pointsString); var points = []; for (var i = 0; i < list.length; i += 2) { var x = parseFloat(list[i]); var y = parseFloat(list[i + 1]); points.push([x, y]); } return points; } function parseAttributes(xmlNode, el, defsUsePending, onlyInlineStyle, isTextGroup) { var disp = el; var inheritedStyle = disp.__inheritedStyle = disp.__inheritedStyle || {}; var selfStyle = {}; if (xmlNode.nodeType === 1) { parseTransformAttribute(xmlNode, el); parseInlineStyle(xmlNode, inheritedStyle, selfStyle); if (!onlyInlineStyle) { parseAttributeStyle(xmlNode, inheritedStyle, selfStyle); } } disp.style = disp.style || {}; if (inheritedStyle.fill != null) { disp.style.fill = getFillStrokeStyle(disp, 'fill', inheritedStyle.fill, defsUsePending); } if (inheritedStyle.stroke != null) { disp.style.stroke = getFillStrokeStyle(disp, 'stroke', inheritedStyle.stroke, defsUsePending); } each([ 'lineWidth', 'opacity', 'fillOpacity', 'strokeOpacity', 'miterLimit', 'fontSize' ], function (propName) { if (inheritedStyle[propName] != null) { disp.style[propName] = parseFloat(inheritedStyle[propName]); } }); each([ 'lineDashOffset', 'lineCap', 'lineJoin', 'fontWeight', 'fontFamily', 'fontStyle', 'textAlign' ], function (propName) { if (inheritedStyle[propName] != null) { disp.style[propName] = inheritedStyle[propName]; } }); if (isTextGroup) { disp.__selfStyle = selfStyle; } if (inheritedStyle.lineDash) { disp.style.lineDash = map(splitNumberSequence(inheritedStyle.lineDash), function (str) { return parseFloat(str); }); } if (inheritedStyle.visibility === 'hidden' || inheritedStyle.visibility === 'collapse') { disp.invisible = true; } if (inheritedStyle.display === 'none') { disp.ignore = true; } disp.z = -10000; disp.z2 = -1000; } function applyTextAlignment(text, parentGroup) { var parentSelfStyle = parentGroup.__selfStyle; if (parentSelfStyle) { var textBaseline = parentSelfStyle.textBaseline; var zrTextBaseline = textBaseline; if (!textBaseline || textBaseline === 'auto') { zrTextBaseline = 'alphabetic'; } else if (textBaseline === 'baseline') { zrTextBaseline = 'alphabetic'; } else if (textBaseline === 'before-edge' || textBaseline === 'text-before-edge') { zrTextBaseline = 'top'; } else if (textBaseline === 'after-edge' || textBaseline === 'text-after-edge') { zrTextBaseline = 'bottom'; } else if (textBaseline === 'central' || textBaseline === 'mathematical') { zrTextBaseline = 'middle'; } text.style.textBaseline = zrTextBaseline; } var parentInheritedStyle = parentGroup.__inheritedStyle; if (parentInheritedStyle) { var textAlign = parentInheritedStyle.textAlign; var zrTextAlign = textAlign; if (textAlign) { if (textAlign === 'middle') { zrTextAlign = 'center'; } text.style.textAlign = zrTextAlign; } } } var urlRegex = /^url\(\s*#(.*?)\)/; function getFillStrokeStyle(el, method, str, defsUsePending) { var urlMatch = str && str.match(urlRegex); if (urlMatch) { var url = trim(urlMatch[1]); defsUsePending.push([el, method, url]); return; } if (str === 'none') { str = null; } return str; } function applyDefs(defs, defsUsePending) { for (var i = 0; i < defsUsePending.length; i++) { var item = defsUsePending[i]; item[0].style[item[1]] = defs[item[2]]; } } var numberReg$1 = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g; function splitNumberSequence(rawStr) { return rawStr.match(numberReg$1) || []; } var transformRegex = /(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g; function parseTransformAttribute(xmlNode, node) { var transform = xmlNode.getAttribute('transform'); if (transform) { transform = transform.replace(/,/g, ' '); var transformOps_1 = []; var mt = null; transform.replace(transformRegex, function (str, type, value) { transformOps_1.push(type, value); return ''; }); for (var i = transformOps_1.length - 1; i > 0; i -= 2) { var value = transformOps_1[i]; var type = transformOps_1[i - 1]; var valueArr = void 0; mt = mt || create$1(); switch (type) { case 'translate': valueArr = splitNumberSequence(value); translate(mt, mt, [parseFloat(valueArr[0]), parseFloat(valueArr[1] || '0')]); break; case 'scale': valueArr = splitNumberSequence(value); scale$1(mt, mt, [parseFloat(valueArr[0]), parseFloat(valueArr[1] || valueArr[0])]); break; case 'rotate': valueArr = splitNumberSequence(value); rotate(mt, mt, -parseFloat(valueArr[0]) / 180 * Math.PI); break; case 'skew': valueArr = splitNumberSequence(value); console.warn('Skew transform is not supported yet'); break; case 'matrix': valueArr = splitNumberSequence(value); mt[0] = parseFloat(valueArr[0]); mt[1] = parseFloat(valueArr[1]); mt[2] = parseFloat(valueArr[2]); mt[3] = parseFloat(valueArr[3]); mt[4] = parseFloat(valueArr[4]); mt[5] = parseFloat(valueArr[5]); break; } } node.setLocalTransform(mt); } } var styleRegex = /([^\s:;]+)\s*:\s*([^:;]+)/g; function parseInlineStyle(xmlNode, inheritableStyleResult, selfStyleResult) { var style = xmlNode.getAttribute('style'); if (!style) { return; } styleRegex.lastIndex = 0; var styleRegResult; while ((styleRegResult = styleRegex.exec(style)) != null) { var svgStlAttr = styleRegResult[1]; var zrInheritableStlAttr = hasOwn(INHERITABLE_STYLE_ATTRIBUTES_MAP, svgStlAttr) ? INHERITABLE_STYLE_ATTRIBUTES_MAP[svgStlAttr] : null; if (zrInheritableStlAttr) { inheritableStyleResult[zrInheritableStlAttr] = styleRegResult[2]; } var zrSelfStlAttr = hasOwn(SELF_STYLE_ATTRIBUTES_MAP, svgStlAttr) ? SELF_STYLE_ATTRIBUTES_MAP[svgStlAttr] : null; if (zrSelfStlAttr) { selfStyleResult[zrSelfStlAttr] = styleRegResult[2]; } } } function parseAttributeStyle(xmlNode, inheritableStyleResult, selfStyleResult) { for (var i = 0; i < INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS.length; i++) { var svgAttrName = INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS[i]; var attrValue = xmlNode.getAttribute(svgAttrName); if (attrValue != null) { inheritableStyleResult[INHERITABLE_STYLE_ATTRIBUTES_MAP[svgAttrName]] = attrValue; } } for (var i = 0; i < SELF_STYLE_ATTRIBUTES_MAP_KEYS.length; i++) { var svgAttrName = SELF_STYLE_ATTRIBUTES_MAP_KEYS[i]; var attrValue = xmlNode.getAttribute(svgAttrName); if (attrValue != null) { selfStyleResult[SELF_STYLE_ATTRIBUTES_MAP[svgAttrName]] = attrValue; } } } function makeViewBoxTransform(viewBoxRect, boundingRect) { var scaleX = boundingRect.width / viewBoxRect.width; var scaleY = boundingRect.height / viewBoxRect.height; var scale = Math.min(scaleX, scaleY); return { scale: scale, x: -(viewBoxRect.x + viewBoxRect.width / 2) * scale + (boundingRect.x + boundingRect.width / 2), y: -(viewBoxRect.y + viewBoxRect.height / 2) * scale + (boundingRect.y + boundingRect.height / 2) }; } function parseSVG(xml, opt) { var parser = new SVGParser(); return parser.parse(xml, opt); } var EPSILON$3 = 1e-8; function isAroundEqual$1(a, b) { return Math.abs(a - b) < EPSILON$3; } function contain$1(points, x, y) { var w = 0; var p = points[0]; if (!p) { return false; } for (var i = 1; i < points.length; i++) { var p2 = points[i]; w += windingLine(p[0], p[1], p2[0], p2[1], x, y); p = p2; } var p0 = points[0]; if (!isAroundEqual$1(p[0], p0[0]) || !isAroundEqual$1(p[1], p0[1])) { w += windingLine(p[0], p[1], p0[0], p0[1], x, y); } return w !== 0; } var TMP_TRANSFORM = []; var Region = /** @class */ function () { function Region(name) { this.name = name; } /** * Get center point in data unit. That is, * for GeoJSONRegion, the unit is lat/lng, * for GeoSVGRegion, the unit is SVG local coord. */ Region.prototype.getCenter = function () { return; }; return Region; }(); var GeoJSONRegion = /** @class */ function (_super) { __extends(GeoJSONRegion, _super); function GeoJSONRegion(name, geometries, cp) { var _this = _super.call(this, name) || this; _this.type = 'geoJSON'; _this.geometries = geometries; if (!cp) { var rect = _this.getBoundingRect(); cp = [rect.x + rect.width / 2, rect.y + rect.height / 2]; } else { cp = [cp[0], cp[1]]; } _this._center = cp; return _this; } GeoJSONRegion.prototype.getBoundingRect = function () { var rect = this._rect; if (rect) { return rect; } var MAX_NUMBER = Number.MAX_VALUE; var min$1 = [MAX_NUMBER, MAX_NUMBER]; var max$1 = [-MAX_NUMBER, -MAX_NUMBER]; var min2 = []; var max2 = []; var geometries = this.geometries; var i = 0; for (; i < geometries.length; i++) { // Only support polygon if (geometries[i].type !== 'polygon') { continue; } // Doesn't consider hole var exterior = geometries[i].exterior; fromPoints(exterior, min2, max2); min(min$1, min$1, min2); max(max$1, max$1, max2); } // No data if (i === 0) { min$1[0] = min$1[1] = max$1[0] = max$1[1] = 0; } return this._rect = new BoundingRect(min$1[0], min$1[1], max$1[0] - min$1[0], max$1[1] - min$1[1]); }; GeoJSONRegion.prototype.contain = function (coord) { var rect = this.getBoundingRect(); var geometries = this.geometries; if (!rect.contain(coord[0], coord[1])) { return false; } loopGeo: for (var i = 0, len = geometries.length; i < len; i++) { // Only support polygon. if (geometries[i].type !== 'polygon') { continue; } var exterior = geometries[i].exterior; var interiors = geometries[i].interiors; if (contain$1(exterior, coord[0], coord[1])) { // Not in the region if point is in the hole. for (var k = 0; k < (interiors ? interiors.length : 0); k++) { if (contain$1(interiors[k], coord[0], coord[1])) { continue loopGeo; } } return true; } } return false; }; GeoJSONRegion.prototype.transformTo = function (x, y, width, height) { var rect = this.getBoundingRect(); var aspect = rect.width / rect.height; if (!width) { width = aspect * height; } else if (!height) { height = width / aspect; } var target = new BoundingRect(x, y, width, height); var transform = rect.calculateTransform(target); var geometries = this.geometries; for (var i = 0; i < geometries.length; i++) { // Only support polygon. if (geometries[i].type !== 'polygon') { continue; } var exterior = geometries[i].exterior; var interiors = geometries[i].interiors; for (var p = 0; p < exterior.length; p++) { applyTransform(exterior[p], exterior[p], transform); } for (var h = 0; h < (interiors ? interiors.length : 0); h++) { for (var p = 0; p < interiors[h].length; p++) { applyTransform(interiors[h][p], interiors[h][p], transform); } } } rect = this._rect; rect.copy(target); // Update center this._center = [rect.x + rect.width / 2, rect.y + rect.height / 2]; }; GeoJSONRegion.prototype.cloneShallow = function (name) { name == null && (name = this.name); var newRegion = new GeoJSONRegion(name, this.geometries, this._center); newRegion._rect = this._rect; newRegion.transformTo = null; // Simply avoid to be called. return newRegion; }; GeoJSONRegion.prototype.getCenter = function () { return this._center; }; GeoJSONRegion.prototype.setCenter = function (center) { this._center = center; }; return GeoJSONRegion; }(Region); var GeoSVGRegion = /** @class */ function (_super) { __extends(GeoSVGRegion, _super); function GeoSVGRegion(name, elOnlyForCalculate) { var _this = _super.call(this, name) || this; _this.type = 'geoSVG'; _this._elOnlyForCalculate = elOnlyForCalculate; return _this; } GeoSVGRegion.prototype.getCenter = function () { var center = this._center; if (!center) { // In most cases there are no need to calculate this center. // So calculate only when called. center = this._center = this._calculateCenter(); } return center; }; GeoSVGRegion.prototype._calculateCenter = function () { var el = this._elOnlyForCalculate; var rect = el.getBoundingRect(); var center = [rect.x + rect.width / 2, rect.y + rect.height / 2]; var mat = identity(TMP_TRANSFORM); var target = el; while (target && !target.isGeoSVGGraphicRoot) { mul$1(mat, target.getLocalTransform(), mat); target = target.parent; } invert(mat, mat); applyTransform(center, center, mat); return center; }; return GeoSVGRegion; }(Region); /** * "region available" means that: enable users to set attribute `name="xxx"` on those tags * to make it be a region. * 1. region styles and its label styles can be defined in echarts opton: * ```js * geo: { * regions: [{ * name: 'xxx', * itemStyle: { ... }, * label: { ... } * }, { * ... * }, * ...] * }; * ``` * 2. name can be duplicated in different SVG tag. All of the tags with the same name share * a region option. For exampel if there are two representing two lung lobes. They have * no common parents but both of them need to display label "lung" inside. */ var REGION_AVAILABLE_SVG_TAG_MAP = createHashMap(['rect', 'circle', 'line', 'ellipse', 'polygon', 'polyline', 'path', // are also enabled becuase some SVG might paint text itself, // but still need to trigger events or tooltip. 'text', 'tspan', // is also enabled because this case: if multiple tags share one name // and need label displayed, every tags will display the name, which is not // expected. So we can put them into a . Thereby only one label // displayed and located based on the bounding rect of the . 'g']); var GeoSVGResource = /** @class */ function () { function GeoSVGResource(mapName, svg) { this.type = 'geoSVG'; // All used graphics. key: hostKey, value: root this._usedGraphicMap = createHashMap(); // All unused graphics. this._freedGraphics = []; this._mapName = mapName; // Only perform parse to XML object here, which might be time // consiming for large SVG. // Although convert XML to zrender element is also time consiming, // if we do it here, the clone of zrender elements has to be // required. So we do it once for each geo instance, util real // performance issues call for optimizing it. this._parsedXML = parseXML(svg); } GeoSVGResource.prototype.load = function () /* nameMap: NameMap */ { // In the "load" stage, graphic need to be built to // get boundingRect for geo coordinate system. var firstGraphic = this._firstGraphic; // Create the return data structure only when first graphic created. // Because they will be used in geo coordinate system update stage, // and `regions` will be mounted at `geo` coordinate system, // in which there is no "view" info, so that it should better not to // make references to graphic elements. if (!firstGraphic) { firstGraphic = this._firstGraphic = this._buildGraphic(this._parsedXML); this._freedGraphics.push(firstGraphic); this._boundingRect = this._firstGraphic.boundingRect.clone(); // PENDING: `nameMap` will not be supported until some real requirement come. // if (nameMap) { // named = applyNameMap(named, nameMap); // } var _a = createRegions(firstGraphic.named), regions = _a.regions, regionsMap = _a.regionsMap; this._regions = regions; this._regionsMap = regionsMap; } return { boundingRect: this._boundingRect, regions: this._regions, regionsMap: this._regionsMap }; }; GeoSVGResource.prototype._buildGraphic = function (svgXML) { var result; var rootFromParse; try { result = svgXML && parseSVG(svgXML, { ignoreViewBox: true, ignoreRootClip: true }) || {}; rootFromParse = result.root; assert(rootFromParse != null); } catch (e) { throw new Error('Invalid svg format\n' + e.message); } // Note: we keep the covenant that the root has no transform. So always add an extra root. var root = new Group(); root.add(rootFromParse); root.isGeoSVGGraphicRoot = true; // [THE_RULE_OF_VIEWPORT_AND_VIEWBOX] // // Consider: `` // - the `width/height` we call it `svgWidth/svgHeight` for short. // - `(0, 0, svgWidth, svgHeight)` defines the viewport of the SVG, or say, // "viewport boundingRect", or `boundingRect` for short. // - `viewBox` defines the transform from the real content ot the viewport. // `viewBox` has the same unit as the content of SVG. // If `viewBox` exists, a transform is defined, so the unit of `svgWidth/svgHeight` become // different from the content of SVG. Otherwise, they are the same. // // If both `svgWidth/svgHeight/viewBox` are specified in a SVG file, the transform rule will be: // 0. `boundingRect` is `(0, 0, svgWidth, svgHeight)`. Set it to Geo['_rect'] (View['_rect']). // 1. Make a transform from `viewBox` to `boundingRect`. // Note: only suport `preserveAspectRatio 'xMidYMid'` here. That is, this transform will preserve // the aspect ratio. // 2. Make a transform from boundingRect to Geo['_viewRect'] (View['_viewRect']) // (`Geo`/`View` will do this job). // Note: this transform might not preserve aspect radio, which depending on how users specify // viewRect in echarts option (e.g., `geo.left/top/width/height` will not preserve aspect ratio, // but `geo.layoutCenter/layoutSize` will preserve aspect ratio). // // If `svgWidth/svgHeight` not specified, we use `viewBox` as the `boundingRect` to make the SVG // layout look good. // // If neither `svgWidth/svgHeight` nor `viewBox` are not specified, we calculate the boundingRect // of the SVG content and use them to make SVG layout look good. var svgWidth = result.width; var svgHeight = result.height; var viewBoxRect = result.viewBoxRect; var boundingRect = this._boundingRect; if (!boundingRect) { var bRectX = void 0; var bRectY = void 0; var bRectWidth = void 0; var bRectHeight = void 0; if (svgWidth != null) { bRectX = 0; bRectWidth = svgWidth; } else if (viewBoxRect) { bRectX = viewBoxRect.x; bRectWidth = viewBoxRect.width; } if (svgHeight != null) { bRectY = 0; bRectHeight = svgHeight; } else if (viewBoxRect) { bRectY = viewBoxRect.y; bRectHeight = viewBoxRect.height; } // If both viewBox and svgWidth/svgHeight not specified, // we have to determine how to layout those element to make them look good. if (bRectX == null || bRectY == null) { var calculatedBoundingRect = rootFromParse.getBoundingRect(); if (bRectX == null) { bRectX = calculatedBoundingRect.x; bRectWidth = calculatedBoundingRect.width; } if (bRectY == null) { bRectY = calculatedBoundingRect.y; bRectHeight = calculatedBoundingRect.height; } } boundingRect = this._boundingRect = new BoundingRect(bRectX, bRectY, bRectWidth, bRectHeight); } if (viewBoxRect) { var viewBoxTransform = makeViewBoxTransform(viewBoxRect, boundingRect); // Only support `preserveAspectRatio 'xMidYMid'` rootFromParse.scaleX = rootFromParse.scaleY = viewBoxTransform.scale; rootFromParse.x = viewBoxTransform.x; rootFromParse.y = viewBoxTransform.y; } // SVG needs to clip based on `viewBox`. And some SVG files really rely on this feature. // They do not strictly confine all of the content inside a display rect, but deliberately // use a `viewBox` to define a displayable rect. // PENDING: // The drawback of the `setClipPath` here is: the region label (genereted by echarts) near the // edge might also be clipped, because region labels are put as `textContent` of the SVG path. root.setClipPath(new Rect({ shape: boundingRect.plain() })); var named = []; each(result.named, function (namedItem) { if (REGION_AVAILABLE_SVG_TAG_MAP.get(namedItem.svgNodeTagLower) != null) { named.push(namedItem); setSilent(namedItem.el); } }); return { root: root, boundingRect: boundingRect, named: named }; }; /** * Consider: * (1) One graphic element can not be shared by different `geoView` running simultaneously. * Notice, also need to consider multiple echarts instances share a `mapRecord`. * (2) Converting SVG to graphic elements is time consuming. * (3) In the current architecture, `load` should be called frequently to get boundingRect, * and it is called without view info. * So we maintain graphic elements in this module, and enables `view` to use/return these * graphics from/to the pool with it's uid. */ GeoSVGResource.prototype.useGraphic = function (hostKey /*, nameMap: NameMap */ ) { var usedRootMap = this._usedGraphicMap; var svgGraphic = usedRootMap.get(hostKey); if (svgGraphic) { return svgGraphic; } svgGraphic = this._freedGraphics.pop() // use the first boundingRect to avoid duplicated boundingRect calculation. || this._buildGraphic(this._parsedXML); usedRootMap.set(hostKey, svgGraphic); // PENDING: `nameMap` will not be supported until some real requirement come. // `nameMap` can only be obtained from echarts option. // The original `named` must not be modified. // if (nameMap) { // svgGraphic = extend({}, svgGraphic); // svgGraphic.named = applyNameMap(svgGraphic.named, nameMap); // } return svgGraphic; }; GeoSVGResource.prototype.freeGraphic = function (hostKey) { var usedRootMap = this._usedGraphicMap; var svgGraphic = usedRootMap.get(hostKey); if (svgGraphic) { usedRootMap.removeKey(hostKey); this._freedGraphics.push(svgGraphic); } }; return GeoSVGResource; }(); function setSilent(el) { // Only named element has silent: false, other elements should // act as background and has no user interaction. el.silent = false; // text|tspan will be converted to group. if (el.isGroup) { el.traverse(function (child) { child.silent = false; }); } } function createRegions(named) { var regions = []; var regionsMap = createHashMap(); // Create resions only for the first graphic. each(named, function (namedItem) { // Region has feature to calculate center for tooltip or other features. // If there is a , the center should be the center of the // bounding rect of the g. if (namedItem.namedFrom != null) { return; } var region = new GeoSVGRegion(namedItem.name, namedItem.el); // PENDING: if `nameMap` supported, this region can not be mounted on // `this`, but can only be created each time `load()` called. regions.push(region); // PENDING: if multiple tag named with the same name, only one will be // found by `_regionsMap`. `_regionsMap` is used to find a coordinate // by name. We use `region.getCenter()` as the coordinate. regionsMap.set(namedItem.name, region); }); return { regions: regions, regionsMap: regionsMap }; } // PENDING: `nameMap` will not be supported until some real requirement come. // /** // * Use the alias in geoNameMap. // * The input `named` must not be modified. // */ // function applyNameMap( // named: GeoSVGGraphicRecord['named'], // nameMap: NameMap // ): GeoSVGGraphicRecord['named'] { // const result = [] as GeoSVGGraphicRecord['named']; // for (let i = 0; i < named.length; i++) { // let regionGraphic = named[i]; // const name = regionGraphic.name; // if (nameMap && nameMap.hasOwnProperty(name)) { // regionGraphic = extend({}, regionGraphic); // regionGraphic.name = name; // } // result.push(regionGraphic); // } // return result; // } function decode(json) { if (!json.UTF8Encoding) { return json; } var jsonCompressed = json; var encodeScale = jsonCompressed.UTF8Scale; if (encodeScale == null) { encodeScale = 1024; } var features = jsonCompressed.features; for (var f = 0; f < features.length; f++) { var feature = features[f]; var geometry = feature.geometry; if (geometry.type === 'Polygon') { var coordinates = geometry.coordinates; for (var c = 0; c < coordinates.length; c++) { coordinates[c] = decodePolygon(coordinates[c], geometry.encodeOffsets[c], encodeScale); } } else if (geometry.type === 'MultiPolygon') { var coordinates = geometry.coordinates; for (var c = 0; c < coordinates.length; c++) { var coordinate = coordinates[c]; for (var c2 = 0; c2 < coordinate.length; c2++) { coordinate[c2] = decodePolygon(coordinate[c2], geometry.encodeOffsets[c][c2], encodeScale); } } } } // Has been decoded jsonCompressed.UTF8Encoding = false; return jsonCompressed; } function decodePolygon(coordinate, encodeOffsets, encodeScale) { var result = []; var prevX = encodeOffsets[0]; var prevY = encodeOffsets[1]; for (var i = 0; i < coordinate.length; i += 2) { var x = coordinate.charCodeAt(i) - 64; var y = coordinate.charCodeAt(i + 1) - 64; // ZigZag decoding x = x >> 1 ^ -(x & 1); y = y >> 1 ^ -(y & 1); // Delta deocding x += prevX; y += prevY; prevX = x; prevY = y; // Dequantize result.push([x / encodeScale, y / encodeScale]); } return result; } function parseGeoJSON(geoJson, nameProperty) { geoJson = decode(geoJson); return map(filter(geoJson.features, function (featureObj) { // Output of mapshaper may have geometry null return featureObj.geometry && featureObj.properties && featureObj.geometry.coordinates.length > 0; }), function (featureObj) { var properties = featureObj.properties; var geo = featureObj.geometry; var geometries = []; if (geo.type === 'Polygon') { var coordinates = geo.coordinates; geometries.push({ type: 'polygon', // According to the GeoJSON specification. // First must be exterior, and the rest are all interior(holes). exterior: coordinates[0], interiors: coordinates.slice(1) }); } if (geo.type === 'MultiPolygon') { var coordinates = geo.coordinates; each(coordinates, function (item) { if (item[0]) { geometries.push({ type: 'polygon', exterior: item[0], interiors: item.slice(1) }); } }); } var region = new GeoJSONRegion(properties[nameProperty || 'name'], geometries, properties.cp); region.properties = properties; return region; }); } var geoCoord = [126, 25]; var points$1 = [[[0, 3.5], [7, 11.2], [15, 11.9], [30, 7], [42, 0.7], [52, 0.7], [56, 7.7], [59, 0.7], [64, 0.7], [64, 0], [5, 0], [0, 3.5]], [[13, 16.1], [19, 14.7], [16, 21.7], [11, 23.1], [13, 16.1]], [[12, 32.2], [14, 38.5], [15, 38.5], [13, 32.2], [12, 32.2]], [[16, 47.6], [12, 53.2], [13, 53.2], [18, 47.6], [16, 47.6]], [[6, 64.4], [8, 70], [9, 70], [8, 64.4], [6, 64.4]], [[23, 82.6], [29, 79.8], [30, 79.8], [25, 82.6], [23, 82.6]], [[37, 70.7], [43, 62.3], [44, 62.3], [39, 70.7], [37, 70.7]], [[48, 51.1], [51, 45.5], [53, 45.5], [50, 51.1], [48, 51.1]], [[51, 35], [51, 28.7], [53, 28.7], [53, 35], [51, 35]], [[52, 22.4], [55, 17.5], [56, 17.5], [53, 22.4], [52, 22.4]], [[58, 12.6], [62, 7], [63, 7], [60, 12.6], [58, 12.6]], [[0, 3.5], [0, 93.1], [64, 93.1], [64, 0], [63, 0], [63, 92.4], [1, 92.4], [1, 3.5], [0, 3.5]]]; for (var i = 0; i < points$1.length; i++) { for (var k = 0; k < points$1[i].length; k++) { points$1[i][k][0] /= 10.5; points$1[i][k][1] /= -10.5 / 0.75; points$1[i][k][0] += geoCoord[0]; points$1[i][k][1] += geoCoord[1]; } } function fixNanhai(mapType, regions) { if (mapType === 'china') { regions.push(new GeoJSONRegion('南海诸岛', map(points$1, function (exterior) { return { type: 'polygon', exterior: exterior }; }), geoCoord)); } } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ var coordsOffsetMap = { '南海诸岛': [32, 80], // 全国 '广东': [0, -10], '香港': [10, 5], '澳门': [-10, 10], //'北京': [-10, 0], '天津': [5, 5] }; function fixTextCoords(mapType, region) { if (mapType === 'china') { var coordFix = coordsOffsetMap[region.name]; if (coordFix) { var cp = region.getCenter(); cp[0] += coordFix[0] / 10.5; cp[1] += -coordFix[1] / (10.5 / 0.75); region.setCenter(cp); } } } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ var geoCoordMap = { 'Russia': [100, 60], 'United States': [-99, 38], 'United States of America': [-99, 38] }; function fixGeoCoords(mapType, region) { if (mapType === 'world') { var geoCoord = geoCoordMap[region.name]; if (geoCoord) { var cp = [geoCoord[0], geoCoord[1]]; region.setCenter(cp); } } } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ // Fix for 钓鱼岛 // let Region = require('../Region'); // let zrUtil = require('zrender/lib/core/util'); // let geoCoord = [126, 25]; var points$2 = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]]; function fixDiaoyuIsland(mapType, region) { if (mapType === 'china' && region.name === '台湾') { region.geometries.push({ type: 'polygon', exterior: points$2[0] }); } } var DEFAULT_NAME_PROPERTY = 'name'; var GeoJSONResource = /** @class */ function () { function GeoJSONResource(mapName, geoJSON, specialAreas) { this.type = 'geoJSON'; this._parsedMap = createHashMap(); this._mapName = mapName; this._specialAreas = specialAreas; // PENDING: delay the parse to the first usage to rapid up the FMP? this._geoJSON = parseInput(geoJSON); } /** * @param nameMap can be null/undefined * @param nameProperty can be null/undefined */ GeoJSONResource.prototype.load = function (nameMap, nameProperty) { nameProperty = nameProperty || DEFAULT_NAME_PROPERTY; var parsed = this._parsedMap.get(nameProperty); if (!parsed) { var rawRegions = this._parseToRegions(nameProperty); parsed = this._parsedMap.set(nameProperty, { regions: rawRegions, boundingRect: calculateBoundingRect(rawRegions) }); } var regionsMap = createHashMap(); var finalRegions = []; each(parsed.regions, function (region) { var regionName = region.name; // Try use the alias in geoNameMap if (nameMap && nameMap.hasOwnProperty(regionName)) { region = region.cloneShallow(regionName = nameMap[regionName]); } finalRegions.push(region); regionsMap.set(regionName, region); }); return { regions: finalRegions, boundingRect: parsed.boundingRect || new BoundingRect(0, 0, 0, 0), regionsMap: regionsMap }; }; GeoJSONResource.prototype._parseToRegions = function (nameProperty) { var mapName = this._mapName; var geoJSON = this._geoJSON; var rawRegions; // https://jsperf.com/try-catch-performance-overhead try { rawRegions = geoJSON ? parseGeoJSON(geoJSON, nameProperty) : []; } catch (e) { throw new Error('Invalid geoJson format\n' + e.message); } fixNanhai(mapName, rawRegions); each(rawRegions, function (region) { var regionName = region.name; fixTextCoords(mapName, region); fixGeoCoords(mapName, region); fixDiaoyuIsland(mapName, region); // Some area like Alaska in USA map needs to be tansformed // to look better var specialArea = this._specialAreas && this._specialAreas[regionName]; if (specialArea) { region.transformTo(specialArea.left, specialArea.top, specialArea.width, specialArea.height); } }, this); return rawRegions; }; /** * Only for exporting to users. * **MUST NOT** used internally. */ GeoJSONResource.prototype.getMapForUser = function () { return { // For backward compatibility, use geoJson // PENDING: it has been returning them without clone. // do we need to avoid outsite modification? geoJson: this._geoJSON, geoJSON: this._geoJSON, specialAreas: this._specialAreas }; }; return GeoJSONResource; }(); function calculateBoundingRect(regions) { var rect; for (var i = 0; i < regions.length; i++) { var regionRect = regions[i].getBoundingRect(); rect = rect || regionRect.clone(); rect.union(regionRect); } return rect; } function parseInput(source) { return !isString(source) ? source : typeof JSON !== 'undefined' && JSON.parse ? JSON.parse(source) : new Function('return (' + source + ');')(); } var storage = createHashMap(); var geoSourceManager = { /** * Compatible with previous `echarts.registerMap`. * * @usage * ```js * * echarts.registerMap('USA', geoJson, specialAreas); * * echarts.registerMap('USA', { * geoJson: geoJson, * specialAreas: {...} * }); * echarts.registerMap('USA', { * geoJSON: geoJson, * specialAreas: {...} * }); * * echarts.registerMap('airport', { * svg: svg * } * ``` * * Note: * Do not support that register multiple geoJSON or SVG * one map name. Because different geoJSON and SVG have * different unit. It's not easy to make sure how those * units are mapping/normalize. * If intending to use multiple geoJSON or SVG, we can * use multiple geo coordinate system. */ registerMap: function (mapName, rawDef, rawSpecialAreas) { if (rawDef.svg) { var resource = new GeoSVGResource(mapName, rawDef.svg); storage.set(mapName, resource); } else { // Recommend: // echarts.registerMap('eu', { geoJSON: xxx, specialAreas: xxx }); // Backward compatibility: // echarts.registerMap('eu', geoJSON, specialAreas); // echarts.registerMap('eu', { geoJson: xxx, specialAreas: xxx }); var geoJSON = rawDef.geoJson || rawDef.geoJSON; if (geoJSON && !rawDef.features) { rawSpecialAreas = rawDef.specialAreas; } else { geoJSON = rawDef; } var resource = new GeoJSONResource(mapName, geoJSON, rawSpecialAreas); storage.set(mapName, resource); } }, getGeoResource: function (mapName) { return storage.get(mapName); }, /** * Only for exporting to users. * **MUST NOT** used internally. */ getMapForUser: function (mapName) { var resource = storage.get(mapName); // Do not support return SVG until some real requirement come. return resource && resource.type === 'geoJSON' && resource.getMapForUser(); }, load: function (mapName, nameMap, nameProperty) { var resource = storage.get(mapName); if (!resource) { if ("development" !== 'production') { console.error('Map ' + mapName + ' not exists. The GeoJSON of the map must be provided.'); } return; } return resource.load(nameMap, nameProperty); } }; var assert$1 = assert; var each$3 = each; var isFunction$1 = isFunction; var isObject$2 = isObject; var indexOf$1 = indexOf; var hasWindow = typeof window !== 'undefined'; var version$1 = '5.1.1'; var dependencies = { zrender: '5.1.0' }; var TEST_FRAME_REMAIN_TIME = 1; var PRIORITY_PROCESSOR_SERIES_FILTER = 800; // Some data processors depends on the stack result dimension (to calculate data extent). // So data stack stage should be in front of data processing stage. var PRIORITY_PROCESSOR_DATASTACK = 900; // "Data filter" will block the stream, so it should be // put at the begining of data processing. var PRIORITY_PROCESSOR_FILTER = 1000; var PRIORITY_PROCESSOR_DEFAULT = 2000; var PRIORITY_PROCESSOR_STATISTIC = 5000; var PRIORITY_VISUAL_LAYOUT = 1000; var PRIORITY_VISUAL_PROGRESSIVE_LAYOUT = 1100; var PRIORITY_VISUAL_GLOBAL = 2000; var PRIORITY_VISUAL_CHART = 3000; var PRIORITY_VISUAL_COMPONENT = 4000; // Visual property in data. Greater than `PRIORITY_VISUAL_COMPONENT` to enable to // overwrite the viusal result of component (like `visualMap`) // using data item specific setting (like itemStyle.xxx on data item) var PRIORITY_VISUAL_CHART_DATA_CUSTOM = 4500; // Greater than `PRIORITY_VISUAL_CHART_DATA_CUSTOM` to enable to layout based on // visual result like `symbolSize`. var PRIORITY_VISUAL_POST_CHART_LAYOUT = 4600; var PRIORITY_VISUAL_BRUSH = 5000; var PRIORITY_VISUAL_ARIA = 6000; var PRIORITY_VISUAL_DECAL = 7000; var PRIORITY = { PROCESSOR: { FILTER: PRIORITY_PROCESSOR_FILTER, SERIES_FILTER: PRIORITY_PROCESSOR_SERIES_FILTER, STATISTIC: PRIORITY_PROCESSOR_STATISTIC }, VISUAL: { LAYOUT: PRIORITY_VISUAL_LAYOUT, PROGRESSIVE_LAYOUT: PRIORITY_VISUAL_PROGRESSIVE_LAYOUT, GLOBAL: PRIORITY_VISUAL_GLOBAL, CHART: PRIORITY_VISUAL_CHART, POST_CHART_LAYOUT: PRIORITY_VISUAL_POST_CHART_LAYOUT, COMPONENT: PRIORITY_VISUAL_COMPONENT, BRUSH: PRIORITY_VISUAL_BRUSH, CHART_ITEM: PRIORITY_VISUAL_CHART_DATA_CUSTOM, ARIA: PRIORITY_VISUAL_ARIA, DECAL: PRIORITY_VISUAL_DECAL } }; // Main process have three entries: `setOption`, `dispatchAction` and `resize`, // where they must not be invoked nestedly, except the only case: invoke // dispatchAction with updateMethod "none" in main process. // This flag is used to carry out this rule. // All events will be triggered out side main process (i.e. when !this[IN_MAIN_PROCESS]). var IN_MAIN_PROCESS_KEY = '__flagInMainProcess'; var OPTION_UPDATED_KEY = '__optionUpdated'; var STATUS_NEEDS_UPDATE_KEY = '__needsUpdateStatus'; var ACTION_REG = /^[a-zA-Z0-9_]+$/; var CONNECT_STATUS_KEY = '__connectUpdateStatus'; var CONNECT_STATUS_PENDING = 0; var CONNECT_STATUS_UPDATING = 1; var CONNECT_STATUS_UPDATED = 2; function createRegisterEventWithLowercaseECharts(method) { return function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } if (this.isDisposed()) { disposedWarning(this.id); return; } return toLowercaseNameAndCallEventful(this, method, args); }; } function createRegisterEventWithLowercaseMessageCenter(method) { return function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } return toLowercaseNameAndCallEventful(this, method, args); }; } function toLowercaseNameAndCallEventful(host, method, args) { // `args[0]` is event name. Event name is all lowercase. args[0] = args[0] && args[0].toLowerCase(); return Eventful.prototype[method].apply(host, args); } var MessageCenter = /** @class */ function (_super) { __extends(MessageCenter, _super); function MessageCenter() { return _super !== null && _super.apply(this, arguments) || this; } return MessageCenter; }(Eventful); var messageCenterProto = MessageCenter.prototype; messageCenterProto.on = createRegisterEventWithLowercaseMessageCenter('on'); messageCenterProto.off = createRegisterEventWithLowercaseMessageCenter('off'); // --------------------------------------- // Internal method names for class ECharts // --------------------------------------- var prepare; var prepareView; var updateDirectly; var updateMethods; var doConvertPixel; var updateStreamModes; var doDispatchAction; var flushPendingActions; var triggerUpdatedEvent; var bindRenderedEvent; var bindMouseEvent; var clearColorPalette; var render; var renderComponents; var renderSeries; var performPostUpdateFuncs; var createExtensionAPI; var enableConnect; var setTransitionOpt; var markStatusToUpdate; var applyChangedStates; var ECharts = /** @class */ function (_super) { __extends(ECharts, _super); function ECharts(dom, // Theme name or themeOption. theme, opts) { var _this = _super.call(this, new ECEventProcessor()) || this; _this._chartsViews = []; _this._chartsMap = {}; _this._componentsViews = []; _this._componentsMap = {}; // Can't dispatch action during rendering procedure _this._pendingActions = []; opts = opts || {}; // Get theme by name if (typeof theme === 'string') { theme = themeStorage[theme]; } _this._dom = dom; var defaultRenderer = 'canvas'; var defaultUseDirtyRect = false; if ("development" !== 'production') { var root = /* eslint-disable-next-line */ hasWindow ? window : global; defaultRenderer = root.__ECHARTS__DEFAULT__RENDERER__ || defaultRenderer; var devUseDirtyRect = root.__ECHARTS__DEFAULT__USE_DIRTY_RECT__; defaultUseDirtyRect = devUseDirtyRect == null ? defaultUseDirtyRect : devUseDirtyRect; } var zr = _this._zr = init(dom, { renderer: opts.renderer || defaultRenderer, devicePixelRatio: opts.devicePixelRatio, width: opts.width, height: opts.height, useDirtyRect: opts.useDirtyRect == null ? defaultUseDirtyRect : opts.useDirtyRect }); // Expect 60 fps. _this._throttledZrFlush = throttle(bind(zr.flush, zr), 17); theme = clone(theme); theme && globalBackwardCompat(theme, true); _this._theme = theme; _this._locale = createLocaleObject(opts.locale || SYSTEM_LANG); _this._coordSysMgr = new CoordinateSystemManager(); var api = _this._api = createExtensionAPI(_this); // Sort on demand function prioritySortFunc(a, b) { return a.__prio - b.__prio; } sort(visualFuncs, prioritySortFunc); sort(dataProcessorFuncs, prioritySortFunc); _this._scheduler = new Scheduler(_this, api, dataProcessorFuncs, visualFuncs); _this._messageCenter = new MessageCenter(); _this._labelManager = new LabelManager(); // Init mouse events _this._initEvents(); // In case some people write `window.onresize = chart.resize` _this.resize = bind(_this.resize, _this); zr.animation.on('frame', _this._onframe, _this); bindRenderedEvent(zr, _this); bindMouseEvent(zr, _this); // ECharts instance can be used as value. setAsPrimitive(_this); return _this; } ECharts.prototype._onframe = function () { if (this._disposed) { return; } applyChangedStates(this); var scheduler = this._scheduler; // Lazy update if (this[OPTION_UPDATED_KEY]) { var silent = this[OPTION_UPDATED_KEY].silent; this[IN_MAIN_PROCESS_KEY] = true; prepare(this); updateMethods.update.call(this); // At present, in each frame, zrender performs: // (1) animation step forward. // (2) trigger('frame') (where this `_onframe` is called) // (3) zrender flush (render). // If we do nothing here, since we use `setToFinal: true`, the step (3) above // will render the final state of the elements before the real animation started. this._zr.flush(); this[IN_MAIN_PROCESS_KEY] = false; this[OPTION_UPDATED_KEY] = false; flushPendingActions.call(this, silent); triggerUpdatedEvent.call(this, silent); } // Avoid do both lazy update and progress in one frame. else if (scheduler.unfinished) { // Stream progress. var remainTime = TEST_FRAME_REMAIN_TIME; var ecModel = this._model; var api = this._api; scheduler.unfinished = false; do { var startTime = +new Date(); scheduler.performSeriesTasks(ecModel); // Currently dataProcessorFuncs do not check threshold. scheduler.performDataProcessorTasks(ecModel); updateStreamModes(this, ecModel); // Do not update coordinate system here. Because that coord system update in // each frame is not a good user experience. So we follow the rule that // the extent of the coordinate system is determin in the first frame (the // frame is executed immedietely after task reset. // this._coordSysMgr.update(ecModel, api); // console.log('--- ec frame visual ---', remainTime); scheduler.performVisualTasks(ecModel); renderSeries(this, this._model, api, 'remain'); remainTime -= +new Date() - startTime; } while (remainTime > 0 && scheduler.unfinished); // Call flush explicitly for trigger finished event. if (!scheduler.unfinished) { this._zr.flush(); } // Else, zr flushing be ensue within the same frame, // because zr flushing is after onframe event. } }; ECharts.prototype.getDom = function () { return this._dom; }; ECharts.prototype.getId = function () { return this.id; }; ECharts.prototype.getZr = function () { return this._zr; }; /* eslint-disable-next-line */ ECharts.prototype.setOption = function (option, notMerge, lazyUpdate) { if ("development" !== 'production') { assert$1(!this[IN_MAIN_PROCESS_KEY], '`setOption` should not be called during main process.'); } if (this._disposed) { disposedWarning(this.id); return; } var silent; var replaceMerge; var transitionOpt; if (isObject$2(notMerge)) { lazyUpdate = notMerge.lazyUpdate; silent = notMerge.silent; replaceMerge = notMerge.replaceMerge; transitionOpt = notMerge.transition; notMerge = notMerge.notMerge; } this[IN_MAIN_PROCESS_KEY] = true; if (!this._model || notMerge) { var optionManager = new OptionManager(this._api); var theme = this._theme; var ecModel = this._model = new GlobalModel(); ecModel.scheduler = this._scheduler; ecModel.init(null, null, null, theme, this._locale, optionManager); } this._model.setOption(option, { replaceMerge: replaceMerge }, optionPreprocessorFuncs); setTransitionOpt(this, transitionOpt); if (lazyUpdate) { this[OPTION_UPDATED_KEY] = { silent: silent }; this[IN_MAIN_PROCESS_KEY] = false; // `setOption(option, {lazyMode: true})` may be called when zrender has been slept. // It should wake it up to make sure zrender start to render at the next frame. this.getZr().wakeUp(); } else { prepare(this); updateMethods.update.call(this); // Ensure zr refresh sychronously, and then pixel in canvas can be // fetched after `setOption`. this._zr.flush(); this[OPTION_UPDATED_KEY] = false; this[IN_MAIN_PROCESS_KEY] = false; flushPendingActions.call(this, silent); triggerUpdatedEvent.call(this, silent); } }; /** * @DEPRECATED */ ECharts.prototype.setTheme = function () { console.error('ECharts#setTheme() is DEPRECATED in ECharts 3.0'); }; // We don't want developers to use getModel directly. ECharts.prototype.getModel = function () { return this._model; }; ECharts.prototype.getOption = function () { return this._model && this._model.getOption(); }; ECharts.prototype.getWidth = function () { return this._zr.getWidth(); }; ECharts.prototype.getHeight = function () { return this._zr.getHeight(); }; ECharts.prototype.getDevicePixelRatio = function () { return this._zr.painter.dpr /* eslint-disable-next-line */ || hasWindow && window.devicePixelRatio || 1; }; /** * Get canvas which has all thing rendered */ ECharts.prototype.getRenderedCanvas = function (opts) { if (!env.canvasSupported) { return; } opts = extend({}, opts || {}); opts.pixelRatio = opts.pixelRatio || this.getDevicePixelRatio(); opts.backgroundColor = opts.backgroundColor || this._model.get('backgroundColor'); var zr = this._zr; // let list = zr.storage.getDisplayList(); // Stop animations // Never works before in init animation, so remove it. // zrUtil.each(list, function (el) { // el.stopAnimation(true); // }); return zr.painter.getRenderedCanvas(opts); }; /** * Get svg data url */ ECharts.prototype.getSvgDataURL = function () { if (!env.svgSupported) { return; } var zr = this._zr; var list = zr.storage.getDisplayList(); // Stop animations each(list, function (el) { el.stopAnimation(null, true); }); return zr.painter.toDataURL(); }; ECharts.prototype.getDataURL = function (opts) { if (this._disposed) { disposedWarning(this.id); return; } opts = opts || {}; var excludeComponents = opts.excludeComponents; var ecModel = this._model; var excludesComponentViews = []; var self = this; each$3(excludeComponents, function (componentType) { ecModel.eachComponent({ mainType: componentType }, function (component) { var view = self._componentsMap[component.__viewId]; if (!view.group.ignore) { excludesComponentViews.push(view); view.group.ignore = true; } }); }); var url = this._zr.painter.getType() === 'svg' ? this.getSvgDataURL() : this.getRenderedCanvas(opts).toDataURL('image/' + (opts && opts.type || 'png')); each$3(excludesComponentViews, function (view) { view.group.ignore = false; }); return url; }; ECharts.prototype.getConnectedDataURL = function (opts) { if (this._disposed) { disposedWarning(this.id); return; } if (!env.canvasSupported) { return; } var isSvg = opts.type === 'svg'; var groupId = this.group; var mathMin = Math.min; var mathMax = Math.max; var MAX_NUMBER = Infinity; if (connectedGroups[groupId]) { var left_1 = MAX_NUMBER; var top_1 = MAX_NUMBER; var right_1 = -MAX_NUMBER; var bottom_1 = -MAX_NUMBER; var canvasList_1 = []; var dpr_1 = opts && opts.pixelRatio || this.getDevicePixelRatio(); each(instances$1, function (chart, id) { if (chart.group === groupId) { var canvas = isSvg ? chart.getZr().painter.getSvgDom().innerHTML : chart.getRenderedCanvas(clone(opts)); var boundingRect = chart.getDom().getBoundingClientRect(); left_1 = mathMin(boundingRect.left, left_1); top_1 = mathMin(boundingRect.top, top_1); right_1 = mathMax(boundingRect.right, right_1); bottom_1 = mathMax(boundingRect.bottom, bottom_1); canvasList_1.push({ dom: canvas, left: boundingRect.left, top: boundingRect.top }); } }); left_1 *= dpr_1; top_1 *= dpr_1; right_1 *= dpr_1; bottom_1 *= dpr_1; var width = right_1 - left_1; var height = bottom_1 - top_1; var targetCanvas = createCanvas(); var zr_1 = init(targetCanvas, { renderer: isSvg ? 'svg' : 'canvas' }); zr_1.resize({ width: width, height: height }); if (isSvg) { var content_1 = ''; each$3(canvasList_1, function (item) { var x = item.left - left_1; var y = item.top - top_1; content_1 += '' + item.dom + ''; }); zr_1.painter.getSvgRoot().innerHTML = content_1; if (opts.connectedBackgroundColor) { zr_1.painter.setBackgroundColor(opts.connectedBackgroundColor); } zr_1.refreshImmediately(); return zr_1.painter.toDataURL(); } else { // Background between the charts if (opts.connectedBackgroundColor) { zr_1.add(new Rect({ shape: { x: 0, y: 0, width: width, height: height }, style: { fill: opts.connectedBackgroundColor } })); } each$3(canvasList_1, function (item) { var img = new ZRImage({ style: { x: item.left * dpr_1 - left_1, y: item.top * dpr_1 - top_1, image: item.dom } }); zr_1.add(img); }); zr_1.refreshImmediately(); return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png')); } } else { return this.getDataURL(opts); } }; ECharts.prototype.convertToPixel = function (finder, value) { return doConvertPixel(this, 'convertToPixel', finder, value); }; ECharts.prototype.convertFromPixel = function (finder, value) { return doConvertPixel(this, 'convertFromPixel', finder, value); }; /** * Is the specified coordinate systems or components contain the given pixel point. * @param {Array|number} value * @return {boolean} result */ ECharts.prototype.containPixel = function (finder, value) { if (this._disposed) { disposedWarning(this.id); return; } var ecModel = this._model; var result; var findResult = parseFinder(ecModel, finder); each(findResult, function (models, key) { key.indexOf('Models') >= 0 && each(models, function (model) { var coordSys = model.coordinateSystem; if (coordSys && coordSys.containPoint) { result = result || !!coordSys.containPoint(value); } else if (key === 'seriesModels') { var view = this._chartsMap[model.__viewId]; if (view && view.containPoint) { result = result || view.containPoint(value, model); } else { if ("development" !== 'production') { console.warn(key + ': ' + (view ? 'The found component do not support containPoint.' : 'No view mapping to the found component.')); } } } else { if ("development" !== 'production') { console.warn(key + ': containPoint is not supported'); } } }, this); }, this); return !!result; }; /** * Get visual from series or data. * @param finder * If string, e.g., 'series', means {seriesIndex: 0}. * If Object, could contain some of these properties below: * { * seriesIndex / seriesId / seriesName, * dataIndex / dataIndexInside * } * If dataIndex is not specified, series visual will be fetched, * but not data item visual. * If all of seriesIndex, seriesId, seriesName are not specified, * visual will be fetched from first series. * @param visualType 'color', 'symbol', 'symbolSize' */ ECharts.prototype.getVisual = function (finder, visualType) { var ecModel = this._model; var parsedFinder = parseFinder(ecModel, finder, { defaultMainType: 'series' }); var seriesModel = parsedFinder.seriesModel; if ("development" !== 'production') { if (!seriesModel) { console.warn('There is no specified seires model'); } } var data = seriesModel.getData(); var dataIndexInside = parsedFinder.hasOwnProperty('dataIndexInside') ? parsedFinder.dataIndexInside : parsedFinder.hasOwnProperty('dataIndex') ? data.indexOfRawIndex(parsedFinder.dataIndex) : null; return dataIndexInside != null ? getItemVisualFromData(data, dataIndexInside, visualType) : getVisualFromData(data, visualType); }; /** * Get view of corresponding component model */ ECharts.prototype.getViewOfComponentModel = function (componentModel) { return this._componentsMap[componentModel.__viewId]; }; /** * Get view of corresponding series model */ ECharts.prototype.getViewOfSeriesModel = function (seriesModel) { return this._chartsMap[seriesModel.__viewId]; }; ECharts.prototype._initEvents = function () { var _this = this; each$3(MOUSE_EVENT_NAMES, function (eveName) { var handler = function (e) { var ecModel = _this.getModel(); var el = e.target; var params; var isGlobalOut = eveName === 'globalout'; // no e.target when 'globalout'. if (isGlobalOut) { params = {}; } else { el && findEventDispatcher(el, function (parent) { var ecData = getECData(parent); if (ecData && ecData.dataIndex != null) { var dataModel = ecData.dataModel || ecModel.getSeriesByIndex(ecData.seriesIndex); params = dataModel && dataModel.getDataParams(ecData.dataIndex, ecData.dataType) || {}; return true; } // If element has custom eventData of components else if (ecData.eventData) { params = extend({}, ecData.eventData); return true; } }, true); } // Contract: if params prepared in mouse event, // these properties must be specified: // { // componentType: string (component main type) // componentIndex: number // } // Otherwise event query can not work. if (params) { var componentType = params.componentType; var componentIndex = params.componentIndex; // Special handling for historic reason: when trigger by // markLine/markPoint/markArea, the componentType is // 'markLine'/'markPoint'/'markArea', but we should better // enable them to be queried by seriesIndex, since their // option is set in each series. if (componentType === 'markLine' || componentType === 'markPoint' || componentType === 'markArea') { componentType = 'series'; componentIndex = params.seriesIndex; } var model = componentType && componentIndex != null && ecModel.getComponent(componentType, componentIndex); var view = model && _this[model.mainType === 'series' ? '_chartsMap' : '_componentsMap'][model.__viewId]; if ("development" !== 'production') { // `event.componentType` and `event[componentTpype + 'Index']` must not // be missed, otherwise there is no way to distinguish source component. // See `dataFormat.getDataParams`. if (!isGlobalOut && !(model && view)) { console.warn('model or view can not be found by params'); } } params.event = e; params.type = eveName; _this._$eventProcessor.eventInfo = { targetEl: el, packedEvent: params, model: model, view: view }; _this.trigger(eveName, params); } }; // Consider that some component (like tooltip, brush, ...) // register zr event handler, but user event handler might // do anything, such as call `setOption` or `dispatchAction`, // which probably update any of the content and probably // cause problem if it is called previous other inner handlers. handler.zrEventfulCallAtLast = true; _this._zr.on(eveName, handler, _this); }); each$3(eventActionMap, function (actionType, eventType) { _this._messageCenter.on(eventType, function (event) { this.trigger(eventType, event); }, _this); }); // Extra events // TODO register? each$3(['selectchanged'], function (eventType) { _this._messageCenter.on(eventType, function (event) { this.trigger(eventType, event); }, _this); }); handleLegacySelectEvents(this._messageCenter, this, this._api); }; ECharts.prototype.isDisposed = function () { return this._disposed; }; ECharts.prototype.clear = function () { if (this._disposed) { disposedWarning(this.id); return; } this.setOption({ series: [] }, true); }; ECharts.prototype.dispose = function () { if (this._disposed) { disposedWarning(this.id); return; } this._disposed = true; setAttribute(this.getDom(), DOM_ATTRIBUTE_KEY, ''); var api = this._api; var ecModel = this._model; each$3(this._componentsViews, function (component) { component.dispose(ecModel, api); }); each$3(this._chartsViews, function (chart) { chart.dispose(ecModel, api); }); // Dispose after all views disposed this._zr.dispose(); delete instances$1[this.id]; }; /** * Resize the chart */ ECharts.prototype.resize = function (opts) { if ("development" !== 'production') { assert$1(!this[IN_MAIN_PROCESS_KEY], '`resize` should not be called during main process.'); } if (this._disposed) { disposedWarning(this.id); return; } this._zr.resize(opts); var ecModel = this._model; // Resize loading effect this._loadingFX && this._loadingFX.resize(); if (!ecModel) { return; } var optionChanged = ecModel.resetOption('media'); var silent = opts && opts.silent; this[IN_MAIN_PROCESS_KEY] = true; optionChanged && prepare(this); updateMethods.update.call(this, { type: 'resize', animation: extend({ // Disable animation duration: 0 }, opts && opts.animation) }); this[IN_MAIN_PROCESS_KEY] = false; flushPendingActions.call(this, silent); triggerUpdatedEvent.call(this, silent); }; ECharts.prototype.showLoading = function (name, cfg) { if (this._disposed) { disposedWarning(this.id); return; } if (isObject$2(name)) { cfg = name; name = ''; } name = name || 'default'; this.hideLoading(); if (!loadingEffects[name]) { if ("development" !== 'production') { console.warn('Loading effects ' + name + ' not exists.'); } return; } var el = loadingEffects[name](this._api, cfg); var zr = this._zr; this._loadingFX = el; zr.add(el); }; /** * Hide loading effect */ ECharts.prototype.hideLoading = function () { if (this._disposed) { disposedWarning(this.id); return; } this._loadingFX && this._zr.remove(this._loadingFX); this._loadingFX = null; }; ECharts.prototype.makeActionFromEvent = function (eventObj) { var payload = extend({}, eventObj); payload.type = eventActionMap[eventObj.type]; return payload; }; /** * @param opt If pass boolean, means opt.silent * @param opt.silent Default `false`. Whether trigger events. * @param opt.flush Default `undefined`. * true: Flush immediately, and then pixel in canvas can be fetched * immediately. Caution: it might affect performance. * false: Not flush. * undefined: Auto decide whether perform flush. */ ECharts.prototype.dispatchAction = function (payload, opt) { if (this._disposed) { disposedWarning(this.id); return; } if (!isObject$2(opt)) { opt = { silent: !!opt }; } if (!actions[payload.type]) { return; } // Avoid dispatch action before setOption. Especially in `connect`. if (!this._model) { return; } // May dispatchAction in rendering procedure if (this[IN_MAIN_PROCESS_KEY]) { this._pendingActions.push(payload); return; } var silent = opt.silent; doDispatchAction.call(this, payload, silent); var flush = opt.flush; if (flush) { this._zr.flush(); } else if (flush !== false && env.browser.weChat) { // In WeChat embeded browser, `requestAnimationFrame` and `setInterval` // hang when sliding page (on touch event), which cause that zr does not // refresh util user interaction finished, which is not expected. // But `dispatchAction` may be called too frequently when pan on touch // screen, which impacts performance if do not throttle them. this._throttledZrFlush(); } flushPendingActions.call(this, silent); triggerUpdatedEvent.call(this, silent); }; ECharts.prototype.updateLabelLayout = function () { var labelManager = this._labelManager; labelManager.updateLayoutConfig(this._api); labelManager.layout(this._api); labelManager.processLabelsOverall(); }; ECharts.prototype.appendData = function (params) { if (this._disposed) { disposedWarning(this.id); return; } var seriesIndex = params.seriesIndex; var ecModel = this.getModel(); var seriesModel = ecModel.getSeriesByIndex(seriesIndex); if ("development" !== 'production') { assert$1(params.data && seriesModel); } seriesModel.appendData(params); // Note: `appendData` does not support that update extent of coordinate // system, util some scenario require that. In the expected usage of // `appendData`, the initial extent of coordinate system should better // be fixed by axis `min`/`max` setting or initial data, otherwise if // the extent changed while `appendData`, the location of the painted // graphic elements have to be changed, which make the usage of // `appendData` meaningless. this._scheduler.unfinished = true; this.getZr().wakeUp(); }; // A work around for no `internal` modifier in ts yet but // need to strictly hide private methods to JS users. ECharts.internalField = function () { prepare = function (ecIns) { var scheduler = ecIns._scheduler; scheduler.restorePipelines(ecIns._model); scheduler.prepareStageTasks(); prepareView(ecIns, true); prepareView(ecIns, false); scheduler.plan(); }; /** * Prepare view instances of charts and components */ prepareView = function (ecIns, isComponent) { var ecModel = ecIns._model; var scheduler = ecIns._scheduler; var viewList = isComponent ? ecIns._componentsViews : ecIns._chartsViews; var viewMap = isComponent ? ecIns._componentsMap : ecIns._chartsMap; var zr = ecIns._zr; var api = ecIns._api; for (var i = 0; i < viewList.length; i++) { viewList[i].__alive = false; } isComponent ? ecModel.eachComponent(function (componentType, model) { componentType !== 'series' && doPrepare(model); }) : ecModel.eachSeries(doPrepare); function doPrepare(model) { // By defaut view will be reused if possible for the case that `setOption` with "notMerge" // mode and need to enable transition animation. (Usually, when they have the same id, or // especially no id but have the same type & name & index. See the `model.id` generation // rule in `makeIdAndName` and `viewId` generation rule here). // But in `replaceMerge` mode, this feature should be able to disabled when it is clear that // the new model has nothing to do with the old model. var requireNewView = model.__requireNewView; // This command should not work twice. model.__requireNewView = false; // Consider: id same and type changed. var viewId = '_ec_' + model.id + '_' + model.type; var view = !requireNewView && viewMap[viewId]; if (!view) { var classType = parseClassType(model.type); var Clazz = isComponent ? ComponentView.getClass(classType.main, classType.sub) : // FIXME:TS // (ChartView as ChartViewConstructor).getClass('series', classType.sub) // For backward compat, still support a chart type declared as only subType // like "liquidfill", but recommend "series.liquidfill" // But need a base class to make a type series. ChartView.getClass(classType.sub); if ("development" !== 'production') { assert$1(Clazz, classType.sub + ' does not exist.'); } view = new Clazz(); view.init(ecModel, api); viewMap[viewId] = view; viewList.push(view); zr.add(view.group); } model.__viewId = view.__id = viewId; view.__alive = true; view.__model = model; view.group.__ecComponentInfo = { mainType: model.mainType, index: model.componentIndex }; !isComponent && scheduler.prepareView(view, model, ecModel, api); } for (var i = 0; i < viewList.length;) { var view = viewList[i]; if (!view.__alive) { !isComponent && view.renderTask.dispose(); zr.remove(view.group); view.dispose(ecModel, api); viewList.splice(i, 1); if (viewMap[view.__id] === view) { delete viewMap[view.__id]; } view.__id = view.group.__ecComponentInfo = null; } else { i++; } } }; updateDirectly = function (ecIns, method, payload, mainType, subType) { var ecModel = ecIns._model; ecModel.setUpdatePayload(payload); // broadcast if (!mainType) { // FIXME // Chart will not be update directly here, except set dirty. // But there is no such scenario now. each$3([].concat(ecIns._componentsViews).concat(ecIns._chartsViews), callView); return; } var query = {}; query[mainType + 'Id'] = payload[mainType + 'Id']; query[mainType + 'Index'] = payload[mainType + 'Index']; query[mainType + 'Name'] = payload[mainType + 'Name']; var condition = { mainType: mainType, query: query }; subType && (condition.subType = subType); // subType may be '' by parseClassType; var excludeSeriesId = payload.excludeSeriesId; var excludeSeriesIdMap; if (excludeSeriesId != null) { excludeSeriesIdMap = createHashMap(); each$3(normalizeToArray(excludeSeriesId), function (id) { var modelId = convertOptionIdName(id, null); if (modelId != null) { excludeSeriesIdMap.set(modelId, true); } }); } if (isHighDownPayload(payload)) { allLeaveBlur(ecIns._api); } // If dispatchAction before setOption, do nothing. ecModel && ecModel.eachComponent(condition, function (model) { if (!excludeSeriesIdMap || excludeSeriesIdMap.get(model.id) == null) { if (isHighDownPayload(payload)) { if (model instanceof SeriesModel) { if (payload.type === HIGHLIGHT_ACTION_TYPE && !payload.notBlur) { blurSeriesFromHighlightPayload(model, payload, ecIns._api); } } else { var _a = findComponentHighDownDispatchers(model.mainType, model.componentIndex, payload.name, ecIns._api), focusSelf = _a.focusSelf, dispatchers = _a.dispatchers; if (payload.type === HIGHLIGHT_ACTION_TYPE && focusSelf && !payload.notBlur) { blurComponent(model.mainType, model.componentIndex, ecIns._api); } // PENDING: // Whether to put this "enter emphasis" code in `ComponentView`, // which will be the same as `ChartView` but might be not necessary // and will be far from this logic. if (dispatchers) { each$3(dispatchers, function (dispatcher) { payload.type === HIGHLIGHT_ACTION_TYPE ? enterEmphasis(dispatcher) : leaveEmphasis(dispatcher); }); } } } else if (isSelectChangePayload(payload)) { // TODO geo if (model instanceof SeriesModel) { toggleSelectionFromPayload(model, payload, ecIns._api); updateSeriesElementSelection(model); markStatusToUpdate(ecIns); } } callView(ecIns[mainType === 'series' ? '_chartsMap' : '_componentsMap'][model.__viewId]); } }, ecIns); function callView(view) { view && view.__alive && view[method] && view[method](view.__model, ecModel, ecIns._api, payload); } }; updateMethods = { prepareAndUpdate: function (payload) { prepare(this); updateMethods.update.call(this, payload); }, update: function (payload) { // console.profile && console.profile('update'); var ecModel = this._model; var api = this._api; var zr = this._zr; var coordSysMgr = this._coordSysMgr; var scheduler = this._scheduler; // update before setOption if (!ecModel) { return; } ecModel.setUpdatePayload(payload); scheduler.restoreData(ecModel, payload); scheduler.performSeriesTasks(ecModel); // TODO // Save total ecModel here for undo/redo (after restoring data and before processing data). // Undo (restoration of total ecModel) can be carried out in 'action' or outside API call. // Create new coordinate system each update // In LineView may save the old coordinate system and use it to get the orignal point coordSysMgr.create(ecModel, api); scheduler.performDataProcessorTasks(ecModel, payload); // Current stream render is not supported in data process. So we can update // stream modes after data processing, where the filtered data is used to // deteming whether use progressive rendering. updateStreamModes(this, ecModel); // We update stream modes before coordinate system updated, then the modes info // can be fetched when coord sys updating (consider the barGrid extent fix). But // the drawback is the full coord info can not be fetched. Fortunately this full // coord is not requied in stream mode updater currently. coordSysMgr.update(ecModel, api); clearColorPalette(ecModel); scheduler.performVisualTasks(ecModel, payload); render(this, ecModel, api, payload); // Set background var backgroundColor = ecModel.get('backgroundColor') || 'transparent'; var darkMode = ecModel.get('darkMode'); // In IE8 if (!env.canvasSupported) { var colorArr = parse(backgroundColor); backgroundColor = stringify(colorArr, 'rgb'); if (colorArr[3] === 0) { backgroundColor = 'transparent'; } } else { zr.setBackgroundColor(backgroundColor); // Force set dark mode. if (darkMode != null && darkMode !== 'auto') { zr.setDarkMode(darkMode); } } performPostUpdateFuncs(ecModel, api); // console.profile && console.profileEnd('update'); }, updateTransform: function (payload) { var _this = this; var ecModel = this._model; var api = this._api; // update before setOption if (!ecModel) { return; } ecModel.setUpdatePayload(payload); // ChartView.markUpdateMethod(payload, 'updateTransform'); var componentDirtyList = []; ecModel.eachComponent(function (componentType, componentModel) { if (componentType === 'series') { return; } var componentView = _this.getViewOfComponentModel(componentModel); if (componentView && componentView.__alive) { if (componentView.updateTransform) { var result = componentView.updateTransform(componentModel, ecModel, api, payload); result && result.update && componentDirtyList.push(componentView); } else { componentDirtyList.push(componentView); } } }); var seriesDirtyMap = createHashMap(); ecModel.eachSeries(function (seriesModel) { var chartView = _this._chartsMap[seriesModel.__viewId]; if (chartView.updateTransform) { var result = chartView.updateTransform(seriesModel, ecModel, api, payload); result && result.update && seriesDirtyMap.set(seriesModel.uid, 1); } else { seriesDirtyMap.set(seriesModel.uid, 1); } }); clearColorPalette(ecModel); // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline. // this._scheduler.performVisualTasks(ecModel, payload, 'layout', true); this._scheduler.performVisualTasks(ecModel, payload, { setDirty: true, dirtyMap: seriesDirtyMap }); // Currently, not call render of components. Geo render cost a lot. // renderComponents(ecIns, ecModel, api, payload, componentDirtyList); renderSeries(this, ecModel, api, payload, seriesDirtyMap); performPostUpdateFuncs(ecModel, this._api); }, updateView: function (payload) { var ecModel = this._model; // update before setOption if (!ecModel) { return; } ecModel.setUpdatePayload(payload); ChartView.markUpdateMethod(payload, 'updateView'); clearColorPalette(ecModel); // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline. this._scheduler.performVisualTasks(ecModel, payload, { setDirty: true }); render(this, this._model, this._api, payload); performPostUpdateFuncs(ecModel, this._api); }, updateVisual: function (payload) { // updateMethods.update.call(this, payload); var _this = this; var ecModel = this._model; // update before setOption if (!ecModel) { return; } ecModel.setUpdatePayload(payload); // clear all visual ecModel.eachSeries(function (seriesModel) { seriesModel.getData().clearAllVisual(); }); // Perform visual ChartView.markUpdateMethod(payload, 'updateVisual'); clearColorPalette(ecModel); // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline. this._scheduler.performVisualTasks(ecModel, payload, { visualType: 'visual', setDirty: true }); ecModel.eachComponent(function (componentType, componentModel) { if (componentType !== 'series') { var componentView = _this.getViewOfComponentModel(componentModel); componentView && componentView.__alive && componentView.updateVisual(componentModel, ecModel, _this._api, payload); } }); ecModel.eachSeries(function (seriesModel) { var chartView = _this._chartsMap[seriesModel.__viewId]; chartView.updateVisual(seriesModel, ecModel, _this._api, payload); }); performPostUpdateFuncs(ecModel, this._api); }, updateLayout: function (payload) { updateMethods.update.call(this, payload); } }; doConvertPixel = function (ecIns, methodName, finder, value) { if (ecIns._disposed) { disposedWarning(ecIns.id); return; } var ecModel = ecIns._model; var coordSysList = ecIns._coordSysMgr.getCoordinateSystems(); var result; var parsedFinder = parseFinder(ecModel, finder); for (var i = 0; i < coordSysList.length; i++) { var coordSys = coordSysList[i]; if (coordSys[methodName] && (result = coordSys[methodName](ecModel, parsedFinder, value)) != null) { return result; } } if ("development" !== 'production') { console.warn('No coordinate system that supports ' + methodName + ' found by the given finder.'); } }; updateStreamModes = function (ecIns, ecModel) { var chartsMap = ecIns._chartsMap; var scheduler = ecIns._scheduler; ecModel.eachSeries(function (seriesModel) { scheduler.updateStreamModes(seriesModel, chartsMap[seriesModel.__viewId]); }); }; doDispatchAction = function (payload, silent) { var _this = this; var ecModel = this.getModel(); var payloadType = payload.type; var escapeConnect = payload.escapeConnect; var actionWrap = actions[payloadType]; var actionInfo = actionWrap.actionInfo; var cptTypeTmp = (actionInfo.update || 'update').split(':'); var updateMethod = cptTypeTmp.pop(); var cptType = cptTypeTmp[0] != null && parseClassType(cptTypeTmp[0]); this[IN_MAIN_PROCESS_KEY] = true; var payloads = [payload]; var batched = false; // Batch action if (payload.batch) { batched = true; payloads = map(payload.batch, function (item) { item = defaults(extend({}, item), payload); item.batch = null; return item; }); } var eventObjBatch = []; var eventObj; var isSelectChange = isSelectChangePayload(payload); var isHighDown = isHighDownPayload(payload); each$3(payloads, function (batchItem) { // Action can specify the event by return it. eventObj = actionWrap.action(batchItem, _this._model, _this._api); // Emit event outside eventObj = eventObj || extend({}, batchItem); // Convert type to eventType eventObj.type = actionInfo.event || eventObj.type; eventObjBatch.push(eventObj); // light update does not perform data process, layout and visual. if (isHighDown) { var _a = preParseFinder(payload), queryOptionMap = _a.queryOptionMap, mainTypeSpecified = _a.mainTypeSpecified; var componentMainType = mainTypeSpecified ? queryOptionMap.keys()[0] : 'series'; updateDirectly(_this, updateMethod, batchItem, componentMainType); markStatusToUpdate(_this); } else if (isSelectChange) { // At present `dispatchAction({ type: 'select', ... })` is not supported on components. // geo still use 'geoselect'. updateDirectly(_this, updateMethod, batchItem, 'series'); markStatusToUpdate(_this); } else if (cptType) { updateDirectly(_this, updateMethod, batchItem, cptType.main, cptType.sub); } }); if (updateMethod !== 'none' && !isHighDown && !isSelectChange && !cptType) { // Still dirty if (this[OPTION_UPDATED_KEY]) { prepare(this); updateMethods.update.call(this, payload); this[OPTION_UPDATED_KEY] = false; } else { updateMethods[updateMethod].call(this, payload); } } // Follow the rule of action batch if (batched) { eventObj = { type: actionInfo.event || payloadType, escapeConnect: escapeConnect, batch: eventObjBatch }; } else { eventObj = eventObjBatch[0]; } this[IN_MAIN_PROCESS_KEY] = false; if (!silent) { var messageCenter = this._messageCenter; messageCenter.trigger(eventObj.type, eventObj); // Extra triggered 'selectchanged' event if (isSelectChange) { var newObj = { type: 'selectchanged', escapeConnect: escapeConnect, selected: getAllSelectedIndices(ecModel), isFromClick: payload.isFromClick || false, fromAction: payload.type, fromActionPayload: payload }; messageCenter.trigger(newObj.type, newObj); } } }; flushPendingActions = function (silent) { var pendingActions = this._pendingActions; while (pendingActions.length) { var payload = pendingActions.shift(); doDispatchAction.call(this, payload, silent); } }; triggerUpdatedEvent = function (silent) { !silent && this.trigger('updated'); }; /** * Event `rendered` is triggered when zr * rendered. It is useful for realtime * snapshot (reflect animation). * * Event `finished` is triggered when: * (1) zrender rendering finished. * (2) initial animation finished. * (3) progressive rendering finished. * (4) no pending action. * (5) no delayed setOption needs to be processed. */ bindRenderedEvent = function (zr, ecIns) { zr.on('rendered', function (params) { ecIns.trigger('rendered', params); // The `finished` event should not be triggered repeatly, // so it should only be triggered when rendering indeed happend // in zrender. (Consider the case that dipatchAction is keep // triggering when mouse move). if ( // Although zr is dirty if initial animation is not finished // and this checking is called on frame, we also check // animation finished for robustness. zr.animation.isFinished() && !ecIns[OPTION_UPDATED_KEY] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) { ecIns.trigger('finished'); } }); }; bindMouseEvent = function (zr, ecIns) { zr.on('mouseover', function (e) { var el = e.target; var dispatcher = findEventDispatcher(el, isHighDownDispatcher); if (dispatcher) { handleGlobalMouseOverForHighDown(dispatcher, e, ecIns._api); markStatusToUpdate(ecIns); } }).on('mouseout', function (e) { var el = e.target; var dispatcher = findEventDispatcher(el, isHighDownDispatcher); if (dispatcher) { handleGlboalMouseOutForHighDown(dispatcher, e, ecIns._api); markStatusToUpdate(ecIns); } }).on('click', function (e) { var el = e.target; var dispatcher = findEventDispatcher(el, function (target) { return getECData(target).dataIndex != null; }, true); if (dispatcher) { var actionType = dispatcher.selected ? 'unselect' : 'select'; var ecData = getECData(dispatcher); ecIns._api.dispatchAction({ type: actionType, dataType: ecData.dataType, dataIndexInside: ecData.dataIndex, seriesIndex: ecData.seriesIndex, isFromClick: true }); } }); }; clearColorPalette = function (ecModel) { ecModel.clearColorPalette(); ecModel.eachSeries(function (seriesModel) { seriesModel.clearColorPalette(); }); }; render = function (ecIns, ecModel, api, payload) { renderComponents(ecIns, ecModel, api, payload); each$3(ecIns._chartsViews, function (chart) { chart.__alive = false; }); renderSeries(ecIns, ecModel, api, payload); // Remove groups of unrendered charts each$3(ecIns._chartsViews, function (chart) { if (!chart.__alive) { chart.remove(ecModel, api); } }); }; renderComponents = function (ecIns, ecModel, api, payload, dirtyList) { each$3(dirtyList || ecIns._componentsViews, function (componentView) { var componentModel = componentView.__model; clearStates(componentModel, componentView); componentView.render(componentModel, ecModel, api, payload); updateZ(componentModel, componentView); updateStates(componentModel, componentView); }); }; /** * Render each chart and component */ renderSeries = function (ecIns, ecModel, api, payload, dirtyMap) { // Render all charts var scheduler = ecIns._scheduler; var labelManager = ecIns._labelManager; labelManager.clearLabels(); var unfinished = false; ecModel.eachSeries(function (seriesModel) { var chartView = ecIns._chartsMap[seriesModel.__viewId]; chartView.__alive = true; var renderTask = chartView.renderTask; scheduler.updatePayload(renderTask, payload); // TODO states on marker. clearStates(seriesModel, chartView); if (dirtyMap && dirtyMap.get(seriesModel.uid)) { renderTask.dirty(); } if (renderTask.perform(scheduler.getPerformArgs(renderTask))) { unfinished = true; } seriesModel.__transientTransitionOpt = null; chartView.group.silent = !!seriesModel.get('silent'); // Should not call markRedraw on group, because it will disable zrender // increamental render (alway render from the __startIndex each frame) // chartView.group.markRedraw(); updateBlend(seriesModel, chartView); updateSeriesElementSelection(seriesModel); // Add labels. labelManager.addLabelsOfSeries(chartView); }); scheduler.unfinished = unfinished || scheduler.unfinished; labelManager.updateLayoutConfig(api); labelManager.layout(api); labelManager.processLabelsOverall(); ecModel.eachSeries(function (seriesModel) { var chartView = ecIns._chartsMap[seriesModel.__viewId]; // Update Z after labels updated. Before applying states. updateZ(seriesModel, chartView); // NOTE: Update states after label is updated. // label should be in normal status when layouting. updateStates(seriesModel, chartView); }); // If use hover layer updateHoverLayerStatus(ecIns, ecModel); }; performPostUpdateFuncs = function (ecModel, api) { each$3(postUpdateFuncs, function (func) { func(ecModel, api); }); }; markStatusToUpdate = function (ecIns) { ecIns[STATUS_NEEDS_UPDATE_KEY] = true; // Wake up zrender if it's sleep. Let it update states in the next frame. ecIns.getZr().wakeUp(); }; applyChangedStates = function (ecIns) { if (!ecIns[STATUS_NEEDS_UPDATE_KEY]) { return; } ecIns.getZr().storage.traverse(function (el) { // Not applied on removed elements, it may still in fading. if (isElementRemoved(el)) { return; } applyElementStates(el); }); ecIns[STATUS_NEEDS_UPDATE_KEY] = false; }; function applyElementStates(el) { var newStates = []; var oldStates = el.currentStates; // Keep other states. for (var i = 0; i < oldStates.length; i++) { var stateName = oldStates[i]; if (!(stateName === 'emphasis' || stateName === 'blur' || stateName === 'select')) { newStates.push(stateName); } } // Only use states when it's exists. if (el.selected && el.states.select) { newStates.push('select'); } if (el.hoverState === HOVER_STATE_EMPHASIS && el.states.emphasis) { newStates.push('emphasis'); } else if (el.hoverState === HOVER_STATE_BLUR && el.states.blur) { newStates.push('blur'); } el.useStates(newStates); } function updateHoverLayerStatus(ecIns, ecModel) { var zr = ecIns._zr; var storage = zr.storage; var elCount = 0; storage.traverse(function (el) { if (!el.isGroup) { elCount++; } }); if (elCount > ecModel.get('hoverLayerThreshold') && !env.node && !env.worker) { ecModel.eachSeries(function (seriesModel) { if (seriesModel.preventUsingHoverLayer) { return; } var chartView = ecIns._chartsMap[seriesModel.__viewId]; if (chartView.__alive) { chartView.group.traverse(function (el) { if (el.states.emphasis) { el.states.emphasis.hoverLayer = true; } }); } }); } } /** * Update chart and blend. */ function updateBlend(seriesModel, chartView) { var blendMode = seriesModel.get('blendMode') || null; if ("development" !== 'production') { if (!env.canvasSupported && blendMode && blendMode !== 'source-over') { console.warn('Only canvas support blendMode'); } } chartView.group.traverse(function (el) { // FIXME marker and other components if (!el.isGroup) { // DONT mark the element dirty. In case element is incremental and don't wan't to rerender. el.style.blend = blendMode; } if (el.eachPendingDisplayable) { el.eachPendingDisplayable(function (displayable) { displayable.style.blend = blendMode; }); } }); } function updateZ(model, view) { if (model.preventAutoZ) { return; } // Set z and zlevel _updateZ(view.group, model.get('z') || 0, model.get('zlevel') || 0, -Infinity); } function _updateZ(el, z, zlevel, maxZ2) { // Group may also have textContent var label = el.getTextContent(); var labelLine = el.getTextGuideLine(); var isGroup = el.isGroup; if (isGroup) { // set z & zlevel of children elements of Group // el.traverse((childEl: Element) => _updateZ(childEl, z, zlevel)); var children = el.childrenRef(); for (var i = 0; i < children.length; i++) { maxZ2 = Math.max(_updateZ(children[i], z, zlevel, maxZ2), maxZ2); } } else { // not Group el.z = z; el.zlevel = zlevel; maxZ2 = Math.max(el.z2, maxZ2); } // always set z and zlevel if label/labelLine exists if (label) { label.z = z; label.zlevel = zlevel; // lift z2 of text content // TODO if el.emphasis.z2 is spcefied, what about textContent. isFinite(maxZ2) && (label.z2 = maxZ2 + 2); } if (labelLine) { var textGuideLineConfig = el.textGuideLineConfig; labelLine.z = z; labelLine.zlevel = zlevel; isFinite(maxZ2) && (labelLine.z2 = maxZ2 + (textGuideLineConfig && textGuideLineConfig.showAbove ? 1 : -1)); } return maxZ2; } // Clear states without animation. // TODO States on component. function clearStates(model, view) { view.group.traverse(function (el) { // Not applied on removed elements, it may still in fading. if (isElementRemoved(el)) { return; } var textContent = el.getTextContent(); var textGuide = el.getTextGuideLine(); if (el.stateTransition) { el.stateTransition = null; } if (textContent && textContent.stateTransition) { textContent.stateTransition = null; } if (textGuide && textGuide.stateTransition) { textGuide.stateTransition = null; } // TODO If el is incremental. if (el.hasState()) { el.prevStates = el.currentStates; el.clearStates(); } else if (el.prevStates) { el.prevStates = null; } }); } function updateStates(model, view) { var stateAnimationModel = model.getModel('stateAnimation'); var enableAnimation = model.isAnimationEnabled(); var duration = stateAnimationModel.get('duration'); var stateTransition = duration > 0 ? { duration: duration, delay: stateAnimationModel.get('delay'), easing: stateAnimationModel.get('easing') // additive: stateAnimationModel.get('additive') } : null; view.group.traverse(function (el) { if (el.states && el.states.emphasis) { // Not applied on removed elements, it may still in fading. if (isElementRemoved(el)) { return; } if (el instanceof Path) { savePathStates(el); } // Only updated on changed element. In case element is incremental and don't wan't to rerender. // TODO, a more proper way? if (el.__dirty) { var prevStates = el.prevStates; // Restore states without animation if (prevStates) { el.useStates(prevStates); } } // Update state transition and enable animation again. if (enableAnimation) { el.stateTransition = stateTransition; var textContent = el.getTextContent(); var textGuide = el.getTextGuideLine(); // TODO Is it necessary to animate label? if (textContent) { textContent.stateTransition = stateTransition; } if (textGuide) { textGuide.stateTransition = stateTransition; } } // The use higlighted and selected flag to toggle states. if (el.__dirty) { applyElementStates(el); } } }); } createExtensionAPI = function (ecIns) { return new ( /** @class */ function (_super) { __extends(class_1, _super); function class_1() { return _super !== null && _super.apply(this, arguments) || this; } class_1.prototype.getCoordinateSystems = function () { return ecIns._coordSysMgr.getCoordinateSystems(); }; class_1.prototype.getComponentByElement = function (el) { while (el) { var modelInfo = el.__ecComponentInfo; if (modelInfo != null) { return ecIns._model.getComponent(modelInfo.mainType, modelInfo.index); } el = el.parent; } }; class_1.prototype.enterEmphasis = function (el, highlightDigit) { enterEmphasis(el, highlightDigit); markStatusToUpdate(ecIns); }; class_1.prototype.leaveEmphasis = function (el, highlightDigit) { leaveEmphasis(el, highlightDigit); markStatusToUpdate(ecIns); }; class_1.prototype.enterBlur = function (el) { enterBlur(el); markStatusToUpdate(ecIns); }; class_1.prototype.leaveBlur = function (el) { leaveBlur(el); markStatusToUpdate(ecIns); }; class_1.prototype.enterSelect = function (el) { enterSelect(el); markStatusToUpdate(ecIns); }; class_1.prototype.leaveSelect = function (el) { leaveSelect(el); markStatusToUpdate(ecIns); }; class_1.prototype.getModel = function () { return ecIns.getModel(); }; class_1.prototype.getViewOfComponentModel = function (componentModel) { return ecIns.getViewOfComponentModel(componentModel); }; class_1.prototype.getViewOfSeriesModel = function (seriesModel) { return ecIns.getViewOfSeriesModel(seriesModel); }; return class_1; }(ExtensionAPI))(ecIns); }; enableConnect = function (chart) { function updateConnectedChartsStatus(charts, status) { for (var i = 0; i < charts.length; i++) { var otherChart = charts[i]; otherChart[CONNECT_STATUS_KEY] = status; } } each$3(eventActionMap, function (actionType, eventType) { chart._messageCenter.on(eventType, function (event) { if (connectedGroups[chart.group] && chart[CONNECT_STATUS_KEY] !== CONNECT_STATUS_PENDING) { if (event && event.escapeConnect) { return; } var action_1 = chart.makeActionFromEvent(event); var otherCharts_1 = []; each$3(instances$1, function (otherChart) { if (otherChart !== chart && otherChart.group === chart.group) { otherCharts_1.push(otherChart); } }); updateConnectedChartsStatus(otherCharts_1, CONNECT_STATUS_PENDING); each$3(otherCharts_1, function (otherChart) { if (otherChart[CONNECT_STATUS_KEY] !== CONNECT_STATUS_UPDATING) { otherChart.dispatchAction(action_1); } }); updateConnectedChartsStatus(otherCharts_1, CONNECT_STATUS_UPDATED); } }); }); }; setTransitionOpt = function (chart, transitionOpt) { var ecModel = chart._model; each(normalizeToArray(transitionOpt), function (transOpt) { var errMsg; var fromOpt = transOpt.from; var toOpt = transOpt.to; if (toOpt == null) { if ("development" !== 'production') { errMsg = '`transition.to` must be specified.'; } throwError(errMsg); } var finderOpt = { includeMainTypes: ['series'], enableAll: false, enableNone: false }; var fromResult = fromOpt ? parseFinder(ecModel, fromOpt, finderOpt) : null; var toResult = parseFinder(ecModel, toOpt, finderOpt); var toSeries = toResult.seriesModel; if (toSeries == null) { errMsg = ''; if ("development" !== 'production') { errMsg = '`transition` is only supported on series.'; } } if (fromResult && fromResult.seriesModel !== toSeries) { errMsg = ''; if ("development" !== 'production') { errMsg = '`transition.from` and `transition.to` must be specified to the same series.'; } } if (errMsg != null) { throwError(errMsg); } // Just a temp solution: mount them on series. toSeries.__transientTransitionOpt = { from: fromOpt ? fromOpt.dimension : null, to: toOpt.dimension, dividingMethod: transOpt.dividingMethod }; }); }; }(); return ECharts; }(Eventful); var echartsProto = ECharts.prototype; echartsProto.on = createRegisterEventWithLowercaseECharts('on'); echartsProto.off = createRegisterEventWithLowercaseECharts('off'); /** * @deprecated */ // @ts-ignore echartsProto.one = function (eventName, cb, ctx) { var self = this; deprecateLog('ECharts#one is deprecated.'); function wrapped() { var args2 = []; for (var _i = 0; _i < arguments.length; _i++) { args2[_i] = arguments[_i]; } cb && cb.apply && cb.apply(this, args2); // @ts-ignore self.off(eventName, wrapped); } this.on.call(this, eventName, wrapped, ctx); }; // /** // * Encode visual infomation from data after data processing // * // * @param {module:echarts/model/Global} ecModel // * @param {object} layout // * @param {boolean} [layoutFilter] `true`: only layout, // * `false`: only not layout, // * `null`/`undefined`: all. // * @param {string} taskBaseTag // * @private // */ // function startVisualEncoding(ecIns, ecModel, api, payload, layoutFilter) { // each(visualFuncs, function (visual, index) { // let isLayout = visual.isLayout; // if (layoutFilter == null // || (layoutFilter === false && !isLayout) // || (layoutFilter === true && isLayout) // ) { // visual.func(ecModel, api, payload); // } // }); // } var MOUSE_EVENT_NAMES = ['click', 'dblclick', 'mouseover', 'mouseout', 'mousemove', 'mousedown', 'mouseup', 'globalout', 'contextmenu']; function disposedWarning(id) { if ("development" !== 'production') { console.warn('Instance ' + id + ' has been disposed'); } } var actions = {}; /** * Map eventType to actionType */ var eventActionMap = {}; var dataProcessorFuncs = []; var optionPreprocessorFuncs = []; var postInitFuncs = []; var postUpdateFuncs = []; var visualFuncs = []; var themeStorage = {}; var loadingEffects = {}; var instances$1 = {}; var connectedGroups = {}; var idBase = +new Date() - 0; var groupIdBase = +new Date() - 0; var DOM_ATTRIBUTE_KEY = '_echarts_instance_'; /** * @param opts.devicePixelRatio Use window.devicePixelRatio by default * @param opts.renderer Can choose 'canvas' or 'svg' to render the chart. * @param opts.width Use clientWidth of the input `dom` by default. * Can be 'auto' (the same as null/undefined) * @param opts.height Use clientHeight of the input `dom` by default. * Can be 'auto' (the same as null/undefined) */ function init$1(dom, theme, opts) { if ("development" !== 'production') { if (!dom) { throw new Error('Initialize failed: invalid dom.'); } } var existInstance = getInstanceByDom(dom); if (existInstance) { if ("development" !== 'production') { console.warn('There is a chart instance already initialized on the dom.'); } return existInstance; } if ("development" !== 'production') { if (isDom(dom) && dom.nodeName.toUpperCase() !== 'CANVAS' && (!dom.clientWidth && (!opts || opts.width == null) || !dom.clientHeight && (!opts || opts.height == null))) { console.warn('Can\'t get DOM width or height. Please check ' + 'dom.clientWidth and dom.clientHeight. They should not be 0.' + 'For example, you may need to call this in the callback ' + 'of window.onload.'); } } var chart = new ECharts(dom, theme, opts); chart.id = 'ec_' + idBase++; instances$1[chart.id] = chart; setAttribute(dom, DOM_ATTRIBUTE_KEY, chart.id); enableConnect(chart); each$3(postInitFuncs, function (postInitFunc) { postInitFunc(chart); }); return chart; } /** * @usage * (A) * ```js * let chart1 = echarts.init(dom1); * let chart2 = echarts.init(dom2); * chart1.group = 'xxx'; * chart2.group = 'xxx'; * echarts.connect('xxx'); * ``` * (B) * ```js * let chart1 = echarts.init(dom1); * let chart2 = echarts.init(dom2); * echarts.connect('xxx', [chart1, chart2]); * ``` */ function connect(groupId) { // Is array of charts if (isArray(groupId)) { var charts = groupId; groupId = null; // If any chart has group each$3(charts, function (chart) { if (chart.group != null) { groupId = chart.group; } }); groupId = groupId || 'g_' + groupIdBase++; each$3(charts, function (chart) { chart.group = groupId; }); } connectedGroups[groupId] = true; return groupId; } /** * @deprecated */ function disConnect(groupId) { connectedGroups[groupId] = false; } /** * Alias and backword compat */ var disconnect = disConnect; /** * Dispose a chart instance */ function dispose$1(chart) { if (typeof chart === 'string') { chart = instances$1[chart]; } else if (!(chart instanceof ECharts)) { // Try to treat as dom chart = getInstanceByDom(chart); } if (chart instanceof ECharts && !chart.isDisposed()) { chart.dispose(); } } function getInstanceByDom(dom) { return instances$1[getAttribute(dom, DOM_ATTRIBUTE_KEY)]; } function getInstanceById(key) { return instances$1[key]; } /** * Register theme */ function registerTheme(name, theme) { themeStorage[name] = theme; } /** * Register option preprocessor */ function registerPreprocessor(preprocessorFunc) { if (indexOf$1(optionPreprocessorFuncs, preprocessorFunc) < 0) { optionPreprocessorFuncs.push(preprocessorFunc); } } function registerProcessor(priority, processor) { normalizeRegister(dataProcessorFuncs, priority, processor, PRIORITY_PROCESSOR_DEFAULT); } /** * Register postIniter * @param {Function} postInitFunc */ function registerPostInit(postInitFunc) { if (indexOf$1(postInitFuncs, postInitFunc) < 0) { postInitFunc && postInitFuncs.push(postInitFunc); } } /** * Register postUpdater * @param {Function} postUpdateFunc */ function registerPostUpdate(postUpdateFunc) { if (indexOf$1(postUpdateFuncs, postUpdateFunc) < 0) { postUpdateFunc && postUpdateFuncs.push(postUpdateFunc); } } function registerAction(actionInfo, eventName, action) { if (typeof eventName === 'function') { action = eventName; eventName = ''; } var actionType = isObject$2(actionInfo) ? actionInfo.type : [actionInfo, actionInfo = { event: eventName }][0]; // Event name is all lowercase actionInfo.event = (actionInfo.event || actionType).toLowerCase(); eventName = actionInfo.event; if (eventActionMap[eventName]) { // Already registered. return; } // Validate action type and event name. assert$1(ACTION_REG.test(actionType) && ACTION_REG.test(eventName)); if (!actions[actionType]) { actions[actionType] = { action: action, actionInfo: actionInfo }; } eventActionMap[eventName] = actionType; } function registerCoordinateSystem(type, coordSysCreator) { CoordinateSystemManager.register(type, coordSysCreator); } /** * Get dimensions of specified coordinate system. * @param {string} type * @return {Array.} */ function getCoordinateSystemDimensions(type) { var coordSysCreator = CoordinateSystemManager.get(type); if (coordSysCreator) { return coordSysCreator.getDimensionsInfo ? coordSysCreator.getDimensionsInfo() : coordSysCreator.dimensions.slice(); } } function registerLayout(priority, layoutTask) { normalizeRegister(visualFuncs, priority, layoutTask, PRIORITY_VISUAL_LAYOUT, 'layout'); } function registerVisual(priority, visualTask) { normalizeRegister(visualFuncs, priority, visualTask, PRIORITY_VISUAL_CHART, 'visual'); } var registeredTasks = []; function normalizeRegister(targetList, priority, fn, defaultPriority, visualType) { if (isFunction$1(priority) || isObject$2(priority)) { fn = priority; priority = defaultPriority; } if ("development" !== 'production') { if (isNaN(priority) || priority == null) { throw new Error('Illegal priority'); } // Check duplicate each$3(targetList, function (wrap) { assert$1(wrap.__raw !== fn); }); } // Already registered if (indexOf$1(registeredTasks, fn) >= 0) { return; } registeredTasks.push(fn); var stageHandler = Scheduler.wrapStageHandler(fn, visualType); stageHandler.__prio = priority; stageHandler.__raw = fn; targetList.push(stageHandler); } function registerLoading(name, loadingFx) { loadingEffects[name] = loadingFx; } /** * ZRender need a canvas context to do measureText. * But in node environment canvas may be created by node-canvas. * So we need to specify how to create a canvas instead of using document.createElement('canvas') * * Be careful of using it in the browser. * * @example * let Canvas = require('canvas'); * let echarts = require('echarts'); * echarts.setCanvasCreator(function () { * // Small size is enough. * return new Canvas(32, 32); * }); */ function setCanvasCreator(creator) { $override('createCanvas', creator); } /** * The parameters and usage: see `geoSourceManager.registerMap`. * Compatible with previous `echarts.registerMap`. */ function registerMap(mapName, geoJson, specialAreas) { geoSourceManager.registerMap(mapName, geoJson, specialAreas); } function getMap(mapName) { return geoSourceManager.getMapForUser(mapName); } var registerTransform = registerExternalTransform; /** * Globa dispatchAction to a specified chart instance. */ // export function dispatchAction(payload: { chartId: string } & Payload, opt?: Parameters[1]) { // if (!payload || !payload.chartId) { // // Must have chartId to find chart // return; // } // const chart = instances[payload.chartId]; // if (chart) { // chart.dispatchAction(payload, opt); // } // } // Buitlin global visual registerVisual(PRIORITY_VISUAL_GLOBAL, seriesStyleTask); registerVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM, dataStyleTask); registerVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM, dataColorPaletteTask); registerVisual(PRIORITY_VISUAL_GLOBAL, seriesSymbolTask); registerVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM, dataSymbolTask); registerVisual(PRIORITY_VISUAL_DECAL, decalVisual); registerPreprocessor(globalBackwardCompat); registerProcessor(PRIORITY_PROCESSOR_DATASTACK, dataStack); registerLoading('default', defaultLoading); // Default actions registerAction({ type: HIGHLIGHT_ACTION_TYPE, event: HIGHLIGHT_ACTION_TYPE, update: HIGHLIGHT_ACTION_TYPE }, noop); registerAction({ type: DOWNPLAY_ACTION_TYPE, event: DOWNPLAY_ACTION_TYPE, update: DOWNPLAY_ACTION_TYPE }, noop); registerAction({ type: SELECT_ACTION_TYPE, event: SELECT_ACTION_TYPE, update: SELECT_ACTION_TYPE }, noop); registerAction({ type: UNSELECT_ACTION_TYPE, event: UNSELECT_ACTION_TYPE, update: UNSELECT_ACTION_TYPE }, noop); registerAction({ type: TOGGLE_SELECT_ACTION_TYPE, event: TOGGLE_SELECT_ACTION_TYPE, update: TOGGLE_SELECT_ACTION_TYPE }, noop); // Default theme registerTheme('light', lightTheme); registerTheme('dark', theme); // For backward compatibility, where the namespace `dataTool` will // be mounted on `echarts` is the extension `dataTool` is imported. var dataTool = {}; var extensions = []; var extensionRegisters = { registerPreprocessor: registerPreprocessor, registerProcessor: registerProcessor, registerPostInit: registerPostInit, registerPostUpdate: registerPostUpdate, registerAction: registerAction, registerCoordinateSystem: registerCoordinateSystem, registerLayout: registerLayout, registerVisual: registerVisual, registerTransform: registerTransform, registerLoading: registerLoading, registerMap: registerMap, PRIORITY: PRIORITY, ComponentModel: ComponentModel, ComponentView: ComponentView, SeriesModel: SeriesModel, ChartView: ChartView, // TODO Use ComponentModel and SeriesModel instead of Constructor registerComponentModel: function (ComponentModelClass) { ComponentModel.registerClass(ComponentModelClass); }, registerComponentView: function (ComponentViewClass) { ComponentView.registerClass(ComponentViewClass); }, registerSeriesModel: function (SeriesModelClass) { SeriesModel.registerClass(SeriesModelClass); }, registerChartView: function (ChartViewClass) { ChartView.registerClass(ChartViewClass); }, registerSubTypeDefaulter: function (componentType, defaulter) { ComponentModel.registerSubTypeDefaulter(componentType, defaulter); }, registerPainter: function (painterType, PainterCtor) { registerPainter(painterType, PainterCtor); } }; function use(ext) { if (isArray(ext)) { // use([ChartLine, ChartBar]); each(ext, function (singleExt) { use(singleExt); }); return; } if (indexOf(extensions, ext) >= 0) { return; } extensions.push(ext); if (isFunction(ext)) { ext = { install: ext }; } ext.install(extensionRegisters); } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ function dataIndexMapValueLength(valNumOrArrLengthMoreThan2) { return valNumOrArrLengthMoreThan2 == null ? 0 : valNumOrArrLengthMoreThan2.length || 1; } function defaultKeyGetter(item) { return item; } var DataDiffer = /** @class */ function () { /** * @param context Can be visited by this.context in callback. */ function DataDiffer(oldArr, newArr, oldKeyGetter, newKeyGetter, context, // By default: 'oneToOne'. diffMode) { this._old = oldArr; this._new = newArr; this._oldKeyGetter = oldKeyGetter || defaultKeyGetter; this._newKeyGetter = newKeyGetter || defaultKeyGetter; // Visible in callback via `this.context`; this.context = context; this._diffModeMultiple = diffMode === 'multiple'; } /** * Callback function when add a data */ DataDiffer.prototype.add = function (func) { this._add = func; return this; }; /** * Callback function when update a data */ DataDiffer.prototype.update = function (func) { this._update = func; return this; }; /** * Callback function when update a data and only work in `cbMode: 'byKey'`. */ DataDiffer.prototype.updateManyToOne = function (func) { this._updateManyToOne = func; return this; }; /** * Callback function when update a data and only work in `cbMode: 'byKey'`. */ DataDiffer.prototype.updateOneToMany = function (func) { this._updateOneToMany = func; return this; }; /** * Callback function when remove a data */ DataDiffer.prototype.remove = function (func) { this._remove = func; return this; }; DataDiffer.prototype.execute = function () { this[this._diffModeMultiple ? '_executeMultiple' : '_executeOneToOne'](); }; DataDiffer.prototype._executeOneToOne = function () { var oldArr = this._old; var newArr = this._new; var newDataIndexMap = {}; var oldDataKeyArr = new Array(oldArr.length); var newDataKeyArr = new Array(newArr.length); this._initIndexMap(oldArr, null, oldDataKeyArr, '_oldKeyGetter'); this._initIndexMap(newArr, newDataIndexMap, newDataKeyArr, '_newKeyGetter'); for (var i = 0; i < oldArr.length; i++) { var oldKey = oldDataKeyArr[i]; var newIdxMapVal = newDataIndexMap[oldKey]; var newIdxMapValLen = dataIndexMapValueLength(newIdxMapVal); // idx can never be empty array here. see 'set null' logic below. if (newIdxMapValLen > 1) { // Consider there is duplicate key (for example, use dataItem.name as key). // We should make sure every item in newArr and oldArr can be visited. var newIdx = newIdxMapVal.shift(); if (newIdxMapVal.length === 1) { newDataIndexMap[oldKey] = newIdxMapVal[0]; } this._update && this._update(newIdx, i); } else if (newIdxMapValLen === 1) { newDataIndexMap[oldKey] = null; this._update && this._update(newIdxMapVal, i); } else { this._remove && this._remove(i); } } this._performRestAdd(newDataKeyArr, newDataIndexMap); }; /** * For example, consider the case: * oldData: [o0, o1, o2, o3, o4, o5, o6, o7], * newData: [n0, n1, n2, n3, n4, n5, n6, n7, n8], * Where: * o0, o1, n0 has key 'a' (many to one) * o5, n4, n5, n6 has key 'b' (one to many) * o2, n1 has key 'c' (one to one) * n2, n3 has key 'd' (add) * o3, o4 has key 'e' (remove) * o6, o7, n7, n8 has key 'f' (many to many, treated as add and remove) * Then: * (The order of the following directives are not ensured.) * this._updateManyToOne(n0, [o0, o1]); * this._updateOneToMany([n4, n5, n6], o5); * this._update(n1, o2); * this._remove(o3); * this._remove(o4); * this._remove(o6); * this._remove(o7); * this._add(n2); * this._add(n3); * this._add(n7); * this._add(n8); */ DataDiffer.prototype._executeMultiple = function () { var oldArr = this._old; var newArr = this._new; var oldDataIndexMap = {}; var newDataIndexMap = {}; var oldDataKeyArr = []; var newDataKeyArr = []; this._initIndexMap(oldArr, oldDataIndexMap, oldDataKeyArr, '_oldKeyGetter'); this._initIndexMap(newArr, newDataIndexMap, newDataKeyArr, '_newKeyGetter'); for (var i = 0; i < oldDataKeyArr.length; i++) { var oldKey = oldDataKeyArr[i]; var oldIdxMapVal = oldDataIndexMap[oldKey]; var newIdxMapVal = newDataIndexMap[oldKey]; var oldIdxMapValLen = dataIndexMapValueLength(oldIdxMapVal); var newIdxMapValLen = dataIndexMapValueLength(newIdxMapVal); if (oldIdxMapValLen > 1 && newIdxMapValLen === 1) { this._updateManyToOne && this._updateManyToOne(newIdxMapVal, oldIdxMapVal); newDataIndexMap[oldKey] = null; } else if (oldIdxMapValLen === 1 && newIdxMapValLen > 1) { this._updateOneToMany && this._updateOneToMany(newIdxMapVal, oldIdxMapVal); newDataIndexMap[oldKey] = null; } else if (oldIdxMapValLen === 1 && newIdxMapValLen === 1) { this._update && this._update(newIdxMapVal, oldIdxMapVal); newDataIndexMap[oldKey] = null; } else if (oldIdxMapValLen > 1) { for (var i_1 = 0; i_1 < oldIdxMapValLen; i_1++) { this._remove && this._remove(oldIdxMapVal[i_1]); } } else { this._remove && this._remove(oldIdxMapVal); } } this._performRestAdd(newDataKeyArr, newDataIndexMap); }; DataDiffer.prototype._performRestAdd = function (newDataKeyArr, newDataIndexMap) { for (var i = 0; i < newDataKeyArr.length; i++) { var newKey = newDataKeyArr[i]; var newIdxMapVal = newDataIndexMap[newKey]; var idxMapValLen = dataIndexMapValueLength(newIdxMapVal); if (idxMapValLen > 1) { for (var j = 0; j < idxMapValLen; j++) { this._add && this._add(newIdxMapVal[j]); } } else if (idxMapValLen === 1) { this._add && this._add(newIdxMapVal); } // Support both `newDataKeyArr` are duplication removed or not removed. newDataIndexMap[newKey] = null; } }; DataDiffer.prototype._initIndexMap = function (arr, // Can be null. map, // In 'byKey', the output `keyArr` is duplication removed. // In 'byIndex', the output `keyArr` is not duplication removed and // its indices are accurately corresponding to `arr`. keyArr, keyGetterName) { var cbModeMultiple = this._diffModeMultiple; for (var i = 0; i < arr.length; i++) { // Add prefix to avoid conflict with Object.prototype. var key = '_ec_' + this[keyGetterName](arr[i], i); if (!cbModeMultiple) { keyArr[i] = key; } if (!map) { continue; } var idxMapVal = map[key]; var idxMapValLen = dataIndexMapValueLength(idxMapVal); if (idxMapValLen === 0) { // Simple optimize: in most cases, one index has one key, // do not need array. map[key] = i; if (cbModeMultiple) { keyArr.push(key); } } else if (idxMapValLen === 1) { map[key] = [idxMapVal, i]; } else { idxMapVal.push(i); } } }; return DataDiffer; }(); function summarizeDimensions(data) { var summary = {}; var encode = summary.encode = {}; var notExtraCoordDimMap = createHashMap(); var defaultedLabel = []; var defaultedTooltip = []; // See the comment of `List.js#userOutput`. var userOutput = summary.userOutput = { dimensionNames: data.dimensions.slice(), encode: {} }; each(data.dimensions, function (dimName) { var dimItem = data.getDimensionInfo(dimName); var coordDim = dimItem.coordDim; if (coordDim) { if ("development" !== 'production') { assert(VISUAL_DIMENSIONS.get(coordDim) == null); } var coordDimIndex = dimItem.coordDimIndex; getOrCreateEncodeArr(encode, coordDim)[coordDimIndex] = dimName; if (!dimItem.isExtraCoord) { notExtraCoordDimMap.set(coordDim, 1); // Use the last coord dim (and label friendly) as default label, // because when dataset is used, it is hard to guess which dimension // can be value dimension. If both show x, y on label is not look good, // and conventionally y axis is focused more. if (mayLabelDimType(dimItem.type)) { defaultedLabel[0] = dimName; } // User output encode do not contain generated coords. // And it only has index. User can use index to retrieve value from the raw item array. getOrCreateEncodeArr(userOutput.encode, coordDim)[coordDimIndex] = dimItem.index; } if (dimItem.defaultTooltip) { defaultedTooltip.push(dimName); } } VISUAL_DIMENSIONS.each(function (v, otherDim) { var encodeArr = getOrCreateEncodeArr(encode, otherDim); var dimIndex = dimItem.otherDims[otherDim]; if (dimIndex != null && dimIndex !== false) { encodeArr[dimIndex] = dimItem.name; } }); }); var dataDimsOnCoord = []; var encodeFirstDimNotExtra = {}; notExtraCoordDimMap.each(function (v, coordDim) { var dimArr = encode[coordDim]; encodeFirstDimNotExtra[coordDim] = dimArr[0]; // Not necessary to remove duplicate, because a data // dim canot on more than one coordDim. dataDimsOnCoord = dataDimsOnCoord.concat(dimArr); }); summary.dataDimsOnCoord = dataDimsOnCoord; summary.encodeFirstDimNotExtra = encodeFirstDimNotExtra; var encodeLabel = encode.label; // FIXME `encode.label` is not recommanded, because formatter can not be set // in this way. Use label.formatter instead. May be remove this approach someday. if (encodeLabel && encodeLabel.length) { defaultedLabel = encodeLabel.slice(); } var encodeTooltip = encode.tooltip; if (encodeTooltip && encodeTooltip.length) { defaultedTooltip = encodeTooltip.slice(); } else if (!defaultedTooltip.length) { defaultedTooltip = defaultedLabel.slice(); } encode.defaultedLabel = defaultedLabel; encode.defaultedTooltip = defaultedTooltip; return summary; } function getOrCreateEncodeArr(encode, dim) { if (!encode.hasOwnProperty(dim)) { encode[dim] = []; } return encode[dim]; } // FIXME:TS should be type `AxisType` function getDimensionTypeByAxis(axisType) { return axisType === 'category' ? 'ordinal' : axisType === 'time' ? 'time' : 'float'; } function mayLabelDimType(dimType) { // In most cases, ordinal and time do not suitable for label. // Ordinal info can be displayed on axis. Time is too long. return !(dimType === 'ordinal' || dimType === 'time'); } // function findTheLastDimMayLabel(data) { // // Get last value dim // let dimensions = data.dimensions.slice(); // let valueType; // let valueDim; // while (dimensions.length && ( // valueDim = dimensions.pop(), // valueType = data.getDimensionInfo(valueDim).type, // valueType === 'ordinal' || valueType === 'time' // )) {} // jshint ignore:line // return valueDim; // } var DataDimensionInfo = /** @class */ function () { /** * @param opt All of the fields will be shallow copied. */ function DataDimensionInfo(opt) { /** * The format of `otherDims` is: * ```js * { * tooltip: number optional, * label: number optional, * itemName: number optional, * seriesName: number optional, * } * ``` * * A `series.encode` can specified these fields: * ```js * encode: { * // "3, 1, 5" is the index of data dimension. * tooltip: [3, 1, 5], * label: [0, 3], * ... * } * ``` * `otherDims` is the parse result of the `series.encode` above, like: * ```js * // Suppose the index of this data dimension is `3`. * this.otherDims = { * // `3` is at the index `0` of the `encode.tooltip` * tooltip: 0, * // `3` is at the index `1` of the `encode.tooltip` * label: 1 * }; * ``` * * This prop should never be `null`/`undefined` after initialized. */ this.otherDims = {}; if (opt != null) { extend(this, opt); } } return DataDimensionInfo; }(); var mathFloor = Math.floor; var isObject$3 = isObject; var map$1 = map; var UNDEFINED = 'undefined'; var INDEX_NOT_FOUND = -1; // Use prefix to avoid index to be the same as otherIdList[idx], // which will cause weird udpate animation. var ID_PREFIX = 'e\0\0'; var dataCtors = { 'float': typeof Float64Array === UNDEFINED ? Array : Float64Array, 'int': typeof Int32Array === UNDEFINED ? Array : Int32Array, // Ordinal data type can be string or int 'ordinal': Array, 'number': Array, 'time': Array }; // Caution: MUST not use `new CtorUint32Array(arr, 0, len)`, because the Ctor of array is // different from the Ctor of typed array. var CtorUint32Array = typeof Uint32Array === UNDEFINED ? Array : Uint32Array; var CtorInt32Array = typeof Int32Array === UNDEFINED ? Array : Int32Array; var CtorUint16Array = typeof Uint16Array === UNDEFINED ? Array : Uint16Array; var TRANSFERABLE_PROPERTIES = ['hasItemOption', '_nameList', '_idList', '_invertedIndicesMap', '_rawData', '_dimValueGetter', '_count', '_rawCount', '_nameDimIdx', '_idDimIdx', '_nameRepeatCount']; var CLONE_PROPERTIES = ['_extent', '_approximateExtent', '_rawExtent']; // ----------------------------- // Internal method declarations: // ----------------------------- var defaultDimValueGetters; var prepareInvertedIndex; var getIndicesCtor; var prepareStorage; var getRawIndexWithoutIndices; var getRawIndexWithIndices; var getId; var getIdNameFromStore; var makeIdFromName; var normalizeDimensions; var validateDimensions; var cloneListForMapAndSample; var getInitialExtent; var setItemDataAndSeriesIndex; var transferProperties; var List = /** @class */ function () { /** * @param dimensions * For example, ['someDimName', {name: 'someDimName', type: 'someDimType'}, ...]. * Dimensions should be concrete names like x, y, z, lng, lat, angle, radius */ function List(dimensions, hostModel) { this.type = 'list'; this._count = 0; this._rawCount = 0; this._storage = {}; // We have an extra array store here. It's faster to be acessed than KV structured `_storage`. // We profile the code `storage[dim]` and it seems to be KeyedLoadIC_Megamorphic instead of fast property access. // Not sure why this happens. But using an extra array seems leads to faster `initData` // See https://github.com/apache/incubator-echarts/pull/13314 for more explanation. this._storageArr = []; this._nameList = []; this._idList = []; // Models of data option is stored sparse for optimizing memory cost // Never used yet (not used yet). // private _optionModels: Model[] = []; // Global visual properties after visual coding this._visual = {}; // Globel layout properties. this._layout = {}; // Item visual properties after visual coding this._itemVisuals = []; // Item layout properties after layout this._itemLayouts = []; // Graphic elemnents this._graphicEls = []; // Raw extent will not be cloned, but only transfered. // It will not be calculated util needed. this._rawExtent = {}; this._extent = {}; // key: dim, value: extent this._approximateExtent = {}; this._calculationInfo = {}; // Having detected that there is data item is non primitive type // (in type `OptionDataItemObject`). // Like `data: [ { value: xx, itemStyle: {...} }, ...]` // At present it only happen in `SOURCE_FORMAT_ORIGINAL`. this.hasItemOption = true; // Methods that create a new list based on this list should be listed here. // Notice that those method should `RETURN` the new list. this.TRANSFERABLE_METHODS = ['cloneShallow', 'downSample', 'lttbDownSample', 'map']; // Methods that change indices of this list should be listed here. this.CHANGABLE_METHODS = ['filterSelf', 'selectRange']; this.DOWNSAMPLE_METHODS = ['downSample', 'lttbDownSample']; /** * Get raw data index. * Do not initialize. * Default `getRawIndex`. And it can be changed. */ this.getRawIndex = getRawIndexWithoutIndices; dimensions = dimensions || ['x', 'y']; var dimensionInfos = {}; var dimensionNames = []; var invertedIndicesMap = {}; for (var i = 0; i < dimensions.length; i++) { // Use the original dimensions[i], where other flag props may exists. var dimInfoInput = dimensions[i]; var dimensionInfo = isString(dimInfoInput) ? new DataDimensionInfo({ name: dimInfoInput }) : !(dimInfoInput instanceof DataDimensionInfo) ? new DataDimensionInfo(dimInfoInput) : dimInfoInput; var dimensionName = dimensionInfo.name; dimensionInfo.type = dimensionInfo.type || 'float'; if (!dimensionInfo.coordDim) { dimensionInfo.coordDim = dimensionName; dimensionInfo.coordDimIndex = 0; } var otherDims = dimensionInfo.otherDims = dimensionInfo.otherDims || {}; dimensionNames.push(dimensionName); dimensionInfos[dimensionName] = dimensionInfo; dimensionInfo.index = i; if (dimensionInfo.createInvertedIndices) { invertedIndicesMap[dimensionName] = []; } if (otherDims.itemName === 0) { this._nameDimIdx = i; this._nameOrdinalMeta = dimensionInfo.ordinalMeta; } if (otherDims.itemId === 0) { this._idDimIdx = i; this._idOrdinalMeta = dimensionInfo.ordinalMeta; } } this.dimensions = dimensionNames; this._dimensionInfos = dimensionInfos; this.hostModel = hostModel; // Cache summary info for fast visit. See "dimensionHelper". this._dimensionsSummary = summarizeDimensions(this); this._invertedIndicesMap = invertedIndicesMap; this.userOutput = this._dimensionsSummary.userOutput; } /** * The meanings of the input parameter `dim`: * * + If dim is a number (e.g., `1`), it means the index of the dimension. * For example, `getDimension(0)` will return 'x' or 'lng' or 'radius'. * + If dim is a number-like string (e.g., `"1"`): * + If there is the same concrete dim name defined in `this.dimensions`, it means that concrete name. * + If not, it will be converted to a number, which means the index of the dimension. * (why? because of the backward compatbility. We have been tolerating number-like string in * dimension setting, although now it seems that it is not a good idea.) * For example, `visualMap[i].dimension: "1"` is the same meaning as `visualMap[i].dimension: 1`, * if no dimension name is defined as `"1"`. * + If dim is a not-number-like string, it means the concrete dim name. * For example, it can be be default name `"x"`, `"y"`, `"z"`, `"lng"`, `"lat"`, `"angle"`, `"radius"`, * or customized in `dimensions` property of option like `"age"`. * * Get dimension name * @param dim See above. * @return Concrete dim name. */ List.prototype.getDimension = function (dim) { if (typeof dim === 'number' // If being a number-like string but not being defined a dimension name. || !isNaN(dim) && !this._dimensionInfos.hasOwnProperty(dim)) { dim = this.dimensions[dim]; } return dim; }; /** * Get type and calculation info of particular dimension * @param dim * Dimension can be concrete names like x, y, z, lng, lat, angle, radius * Or a ordinal number. For example getDimensionInfo(0) will return 'x' or 'lng' or 'radius' */ List.prototype.getDimensionInfo = function (dim) { // Do not clone, because there may be categories in dimInfo. return this._dimensionInfos[this.getDimension(dim)]; }; /** * concrete dimension name list on coord. */ List.prototype.getDimensionsOnCoord = function () { return this._dimensionsSummary.dataDimsOnCoord.slice(); }; List.prototype.mapDimension = function (coordDim, idx) { var dimensionsSummary = this._dimensionsSummary; if (idx == null) { return dimensionsSummary.encodeFirstDimNotExtra[coordDim]; } var dims = dimensionsSummary.encode[coordDim]; return dims ? dims[idx] : null; }; List.prototype.mapDimensionsAll = function (coordDim) { var dimensionsSummary = this._dimensionsSummary; var dims = dimensionsSummary.encode[coordDim]; return (dims || []).slice(); }; /** * Initialize from data * @param data source or data or data provider. * @param nameList The name of a datum is used on data diff and * default label/tooltip. * A name can be specified in encode.itemName, * or dataItem.name (only for series option data), * or provided in nameList from outside. */ List.prototype.initData = function (data, nameList, dimValueGetter) { var notProvider = isSourceInstance(data) || isArrayLike(data); var provider = notProvider ? new DefaultDataProvider(data, this.dimensions.length) : data; if ("development" !== 'production') { assert(notProvider || isFunction(provider.getItem) && isFunction(provider.count), 'Inavlid data provider.'); } this._rawData = provider; var sourceFormat = provider.getSource().sourceFormat; // Clear this._storage = {}; this._indices = null; this._dontMakeIdFromName = this._idDimIdx != null || sourceFormat === SOURCE_FORMAT_TYPED_ARRAY // Cosndier performance. || !!provider.fillStorage; this._nameList = (nameList || []).slice(); this._idList = []; this._nameRepeatCount = {}; if (!dimValueGetter) { this.hasItemOption = false; } this.defaultDimValueGetter = defaultDimValueGetters[sourceFormat]; // Default dim value getter this._dimValueGetter = dimValueGetter = dimValueGetter || this.defaultDimValueGetter; this._dimValueGetterArrayRows = defaultDimValueGetters.arrayRows; // Reset raw extent. this._rawExtent = {}; this._initDataFromProvider(0, provider.count()); // If data has no item option. if (provider.pure) { this.hasItemOption = false; } }; List.prototype.getProvider = function () { return this._rawData; }; /** * Caution: Can be only called on raw data (before `this._indices` created). */ List.prototype.appendData = function (data) { if ("development" !== 'production') { assert(!this._indices, 'appendData can only be called on raw data.'); } var rawData = this._rawData; var start = this.count(); rawData.appendData(data); var end = rawData.count(); if (!rawData.persistent) { end += start; } this._initDataFromProvider(start, end, true); }; /** * Caution: Can be only called on raw data (before `this._indices` created). * This method does not modify `rawData` (`dataProvider`), but only * add values to storage. * * The final count will be increased by `Math.max(values.length, names.length)`. * * @param values That is the SourceType: 'arrayRows', like * [ * [12, 33, 44], * [NaN, 43, 1], * ['-', 'asdf', 0] * ] * Each item is exaclty cooresponding to a dimension. */ List.prototype.appendValues = function (values, names) { var storage = this._storage; var dimensions = this.dimensions; var dimLen = dimensions.length; var rawExtent = this._rawExtent; var start = this.count(); var end = start + Math.max(values.length, names ? names.length : 0); for (var i = 0; i < dimLen; i++) { var dim = dimensions[i]; if (!rawExtent[dim]) { rawExtent[dim] = getInitialExtent(); } prepareStorage(storage, this._dimensionInfos[dim], end, true); } var rawExtentArr = map$1(dimensions, function (dim) { return rawExtent[dim]; }); var storageArr = this._storageArr = map$1(dimensions, function (dim) { return storage[dim]; }); var emptyDataItem = []; for (var idx = start; idx < end; idx++) { var sourceIdx = idx - start; // Store the data by dimensions for (var dimIdx = 0; dimIdx < dimLen; dimIdx++) { var dim = dimensions[dimIdx]; var val = this._dimValueGetterArrayRows(values[sourceIdx] || emptyDataItem, dim, sourceIdx, dimIdx); storageArr[dimIdx][idx] = val; var dimRawExtent = rawExtentArr[dimIdx]; val < dimRawExtent[0] && (dimRawExtent[0] = val); val > dimRawExtent[1] && (dimRawExtent[1] = val); } if (names) { this._nameList[idx] = names[sourceIdx]; if (!this._dontMakeIdFromName) { makeIdFromName(this, idx); } } } this._rawCount = this._count = end; // Reset data extent this._extent = {}; prepareInvertedIndex(this); }; List.prototype._initDataFromProvider = function (start, end, append) { if (start >= end) { return; } var rawData = this._rawData; var storage = this._storage; var dimensions = this.dimensions; var dimLen = dimensions.length; var dimensionInfoMap = this._dimensionInfos; var nameList = this._nameList; var idList = this._idList; var rawExtent = this._rawExtent; var sourceFormat = rawData.getSource().sourceFormat; var isFormatOriginal = sourceFormat === SOURCE_FORMAT_ORIGINAL; for (var i = 0; i < dimLen; i++) { var dim = dimensions[i]; if (!rawExtent[dim]) { rawExtent[dim] = getInitialExtent(); } prepareStorage(storage, dimensionInfoMap[dim], end, append); } var storageArr = this._storageArr = map$1(dimensions, function (dim) { return storage[dim]; }); var rawExtentArr = map$1(dimensions, function (dim) { return rawExtent[dim]; }); if (rawData.fillStorage) { rawData.fillStorage(start, end, storageArr, rawExtentArr); } else { var dataItem = []; for (var idx = start; idx < end; idx++) { // NOTICE: Try not to write things into dataItem dataItem = rawData.getItem(idx, dataItem); // Each data item is value // [1, 2] // 2 // Bar chart, line chart which uses category axis // only gives the 'y' value. 'x' value is the indices of category // Use a tempValue to normalize the value to be a (x, y) value // Store the data by dimensions for (var dimIdx = 0; dimIdx < dimLen; dimIdx++) { var dim = dimensions[dimIdx]; var dimStorage = storageArr[dimIdx]; // PENDING NULL is empty or zero var val = this._dimValueGetter(dataItem, dim, idx, dimIdx); dimStorage[idx] = val; var dimRawExtent = rawExtentArr[dimIdx]; val < dimRawExtent[0] && (dimRawExtent[0] = val); val > dimRawExtent[1] && (dimRawExtent[1] = val); } // If dataItem is {name: ...} or {id: ...}, it has highest priority. // This kind of ids and names are always stored `_nameList` and `_idList`. if (isFormatOriginal && !rawData.pure && dataItem) { var itemName = dataItem.name; if (nameList[idx] == null && itemName != null) { nameList[idx] = convertOptionIdName(itemName, null); } var itemId = dataItem.id; if (idList[idx] == null && itemId != null) { idList[idx] = convertOptionIdName(itemId, null); } } if (!this._dontMakeIdFromName) { makeIdFromName(this, idx); } } } if (!rawData.persistent && rawData.clean) { // Clean unused data if data source is typed array. rawData.clean(); } this._rawCount = this._count = end; // Reset data extent this._extent = {}; prepareInvertedIndex(this); }; List.prototype.count = function () { return this._count; }; List.prototype.getIndices = function () { var newIndices; var indices = this._indices; if (indices) { var Ctor = indices.constructor; var thisCount = this._count; // `new Array(a, b, c)` is different from `new Uint32Array(a, b, c)`. if (Ctor === Array) { newIndices = new Ctor(thisCount); for (var i = 0; i < thisCount; i++) { newIndices[i] = indices[i]; } } else { newIndices = new Ctor(indices.buffer, 0, thisCount); } } else { var Ctor = getIndicesCtor(this); newIndices = new Ctor(this.count()); for (var i = 0; i < newIndices.length; i++) { newIndices[i] = i; } } return newIndices; }; // Get data by index of dimension. // Because in v8 access array by number variable is faster than access object by string variable // Not sure why but the optimization just works. List.prototype.getByDimIdx = function (dimIdx, idx) { if (!(idx >= 0 && idx < this._count)) { return NaN; } var dimStore = this._storageArr[dimIdx]; return dimStore ? dimStore[this.getRawIndex(idx)] : NaN; }; /** * Get value. Return NaN if idx is out of range. * @param dim Dim must be concrete name. */ List.prototype.get = function (dim, idx) { if (!(idx >= 0 && idx < this._count)) { return NaN; } var dimStore = this._storage[dim]; return dimStore ? dimStore[this.getRawIndex(idx)] : NaN; }; /** * @param dim concrete dim */ List.prototype.getByRawIndex = function (dim, rawIdx) { if (!(rawIdx >= 0 && rawIdx < this._rawCount)) { return NaN; } var dimStore = this._storage[dim]; return dimStore ? dimStore[rawIdx] : NaN; }; List.prototype.getValues = function (dimensions, idx) { var values = []; if (!isArray(dimensions)) { // stack = idx; idx = dimensions; dimensions = this.dimensions; } for (var i = 0, len = dimensions.length; i < len; i++) { values.push(this.get(dimensions[i], idx /*, stack */ )); } return values; }; /** * If value is NaN. Inlcuding '-' * Only check the coord dimensions. */ List.prototype.hasValue = function (idx) { var dataDimsOnCoord = this._dimensionsSummary.dataDimsOnCoord; for (var i = 0, len = dataDimsOnCoord.length; i < len; i++) { // Ordinal type originally can be string or number. // But when an ordinal type is used on coord, it can // not be string but only number. So we can also use isNaN. if (isNaN(this.get(dataDimsOnCoord[i], idx))) { return false; } } return true; }; /** * Get extent of data in one dimension */ List.prototype.getDataExtent = function (dim) { // Make sure use concrete dim as cache name. dim = this.getDimension(dim); var dimData = this._storage[dim]; var initialExtent = getInitialExtent(); // stack = !!((stack || false) && this.getCalculationInfo(dim)); if (!dimData) { return initialExtent; } // Make more strict checkings to ensure hitting cache. var currEnd = this.count(); // let cacheName = [dim, !!stack].join('_'); // let cacheName = dim; // Consider the most cases when using data zoom, `getDataExtent` // happened before filtering. We cache raw extent, which is not // necessary to be cleared and recalculated when restore data. var useRaw = !this._indices; // && !stack; var dimExtent; if (useRaw) { return this._rawExtent[dim].slice(); } dimExtent = this._extent[dim]; if (dimExtent) { return dimExtent.slice(); } dimExtent = initialExtent; var min = dimExtent[0]; var max = dimExtent[1]; for (var i = 0; i < currEnd; i++) { var rawIdx = this.getRawIndex(i); var value = dimData[rawIdx]; value < min && (min = value); value > max && (max = value); } dimExtent = [min, max]; this._extent[dim] = dimExtent; return dimExtent; }; /** * PENDING: In fact currently this function is only used to short-circuit * the calling of `scale.unionExtentFromData` when data have been filtered by modules * like "dataZoom". `scale.unionExtentFromData` is used to calculate data extent for series on * an axis, but if a "axis related data filter module" is used, the extent of the axis have * been fixed and no need to calling `scale.unionExtentFromData` actually. * But if we add "custom data filter" in future, which is not "axis related", this method may * be still needed. * * Optimize for the scenario that data is filtered by a given extent. * Consider that if data amount is more than hundreds of thousand, * extent calculation will cost more than 10ms and the cache will * be erased because of the filtering. */ List.prototype.getApproximateExtent = function (dim) { dim = this.getDimension(dim); return this._approximateExtent[dim] || this.getDataExtent(dim); }; /** * Calculate extent on a filtered data might be time consuming. * Approximate extent is only used for: calculte extent of filtered data outside. */ List.prototype.setApproximateExtent = function (extent, dim) { dim = this.getDimension(dim); this._approximateExtent[dim] = extent.slice(); }; List.prototype.getCalculationInfo = function (key) { return this._calculationInfo[key]; }; List.prototype.setCalculationInfo = function (key, value) { isObject$3(key) ? extend(this._calculationInfo, key) : this._calculationInfo[key] = value; }; /** * Get sum of data in one dimension */ List.prototype.getSum = function (dim) { var dimData = this._storage[dim]; var sum = 0; if (dimData) { for (var i = 0, len = this.count(); i < len; i++) { var value = this.get(dim, i); if (!isNaN(value)) { sum += value; } } } return sum; }; /** * Get median of data in one dimension */ List.prototype.getMedian = function (dim) { var dimDataArray = []; // map all data of one dimension this.each(dim, function (val) { if (!isNaN(val)) { dimDataArray.push(val); } }); // TODO // Use quick select? var sortedDimDataArray = dimDataArray.sort(function (a, b) { return a - b; }); var len = this.count(); // calculate median return len === 0 ? 0 : len % 2 === 1 ? sortedDimDataArray[(len - 1) / 2] : (sortedDimDataArray[len / 2] + sortedDimDataArray[len / 2 - 1]) / 2; }; // /** // * Retreive the index with given value // * @param {string} dim Concrete dimension. // * @param {number} value // * @return {number} // */ // Currently incorrect: should return dataIndex but not rawIndex. // Do not fix it until this method is to be used somewhere. // FIXME Precision of float value // indexOf(dim, value) { // let storage = this._storage; // let dimData = storage[dim]; // let chunkSize = this._chunkSize; // if (dimData) { // for (let i = 0, len = this.count(); i < len; i++) { // let chunkIndex = mathFloor(i / chunkSize); // let chunkOffset = i % chunkSize; // if (dimData[chunkIndex][chunkOffset] === value) { // return i; // } // } // } // return -1; // } /** * Only support the dimension which inverted index created. * Do not support other cases until required. * @param dim concrete dim * @param value ordinal index * @return rawIndex */ List.prototype.rawIndexOf = function (dim, value) { var invertedIndices = dim && this._invertedIndicesMap[dim]; if ("development" !== 'production') { if (!invertedIndices) { throw new Error('Do not supported yet'); } } var rawIndex = invertedIndices[value]; if (rawIndex == null || isNaN(rawIndex)) { return INDEX_NOT_FOUND; } return rawIndex; }; /** * Retreive the index with given name */ List.prototype.indexOfName = function (name) { for (var i = 0, len = this.count(); i < len; i++) { if (this.getName(i) === name) { return i; } } return -1; }; /** * Retreive the index with given raw data index */ List.prototype.indexOfRawIndex = function (rawIndex) { if (rawIndex >= this._rawCount || rawIndex < 0) { return -1; } if (!this._indices) { return rawIndex; } // Indices are ascending var indices = this._indices; // If rawIndex === dataIndex var rawDataIndex = indices[rawIndex]; if (rawDataIndex != null && rawDataIndex < this._count && rawDataIndex === rawIndex) { return rawIndex; } var left = 0; var right = this._count - 1; while (left <= right) { var mid = (left + right) / 2 | 0; if (indices[mid] < rawIndex) { left = mid + 1; } else if (indices[mid] > rawIndex) { right = mid - 1; } else { return mid; } } return -1; }; /** * Retreive the index of nearest value * @param dim * @param value * @param [maxDistance=Infinity] * @return If and only if multiple indices has * the same value, they are put to the result. */ List.prototype.indicesOfNearest = function (dim, value, maxDistance) { var storage = this._storage; var dimData = storage[dim]; var nearestIndices = []; if (!dimData) { return nearestIndices; } if (maxDistance == null) { maxDistance = Infinity; } var minDist = Infinity; var minDiff = -1; var nearestIndicesLen = 0; // Check the test case of `test/ut/spec/data/List.js`. for (var i = 0, len = this.count(); i < len; i++) { var dataIndex = this.getRawIndex(i); var diff = value - dimData[dataIndex]; var dist = Math.abs(diff); if (dist <= maxDistance) { // When the `value` is at the middle of `this.get(dim, i)` and `this.get(dim, i+1)`, // we'd better not push both of them to `nearestIndices`, otherwise it is easy to // get more than one item in `nearestIndices` (more specifically, in `tooltip`). // So we chose the one that `diff >= 0` in this csae. // But if `this.get(dim, i)` and `this.get(dim, j)` get the same value, both of them // should be push to `nearestIndices`. if (dist < minDist || dist === minDist && diff >= 0 && minDiff < 0) { minDist = dist; minDiff = diff; nearestIndicesLen = 0; } if (diff === minDiff) { nearestIndices[nearestIndicesLen++] = i; } } } nearestIndices.length = nearestIndicesLen; return nearestIndices; }; /** * Get raw data item */ List.prototype.getRawDataItem = function (idx) { if (!this._rawData.persistent) { var val = []; for (var i = 0; i < this.dimensions.length; i++) { var dim = this.dimensions[i]; val.push(this.get(dim, idx)); } return val; } else { return this._rawData.getItem(this.getRawIndex(idx)); } }; /** * @return Never be null/undefined. `number` will be converted to string. Becuase: * In most cases, name is used in display, where returning a string is more convenient. * In other cases, name is used in query (see `indexOfName`), where we can keep the * rule that name `2` equals to name `'2'`. */ List.prototype.getName = function (idx) { var rawIndex = this.getRawIndex(idx); var name = this._nameList[rawIndex]; if (name == null && this._nameDimIdx != null) { name = getIdNameFromStore(this, this._nameDimIdx, this._nameOrdinalMeta, rawIndex); } if (name == null) { name = ''; } return name; }; /** * @return Never null/undefined. `number` will be converted to string. Becuase: * In all cases having encountered at present, id is used in making diff comparison, which * are usually based on hash map. We can keep the rule that the internal id are always string * (treat `2` is the same as `'2'`) to make the related logic simple. */ List.prototype.getId = function (idx) { return getId(this, this.getRawIndex(idx)); }; List.prototype.each = function (dims, cb, ctx, ctxCompat) { var _this = this; if (!this._count) { return; } if (typeof dims === 'function') { ctxCompat = ctx; ctx = cb; cb = dims; dims = []; } // ctxCompat just for compat echarts3 var fCtx = ctx || ctxCompat || this; var dimNames = map$1(normalizeDimensions(dims), this.getDimension, this); if ("development" !== 'production') { validateDimensions(this, dimNames); } var dimSize = dimNames.length; var dimIndices = map$1(dimNames, function (dimName) { return _this._dimensionInfos[dimName].index; }); var storageArr = this._storageArr; for (var i = 0, len = this.count(); i < len; i++) { var rawIdx = this.getRawIndex(i); // Simple optimization switch (dimSize) { case 0: cb.call(fCtx, i); break; case 1: cb.call(fCtx, storageArr[dimIndices[0]][rawIdx], i); break; case 2: cb.call(fCtx, storageArr[dimIndices[0]][rawIdx], storageArr[dimIndices[1]][rawIdx], i); break; default: var k = 0; var value = []; for (; k < dimSize; k++) { value[k] = storageArr[dimIndices[k]][rawIdx]; } // Index value[k] = i; cb.apply(fCtx, value); } } }; List.prototype.filterSelf = function (dims, cb, ctx, ctxCompat) { var _this = this; if (!this._count) { return; } if (typeof dims === 'function') { ctxCompat = ctx; ctx = cb; cb = dims; dims = []; } // ctxCompat just for compat echarts3 var fCtx = ctx || ctxCompat || this; var dimNames = map$1(normalizeDimensions(dims), this.getDimension, this); if ("development" !== 'production') { validateDimensions(this, dimNames); } var count = this.count(); var Ctor = getIndicesCtor(this); var newIndices = new Ctor(count); var value = []; var dimSize = dimNames.length; var offset = 0; var dimIndices = map$1(dimNames, function (dimName) { return _this._dimensionInfos[dimName].index; }); var dim0 = dimIndices[0]; var storageArr = this._storageArr; for (var i = 0; i < count; i++) { var keep = void 0; var rawIdx = this.getRawIndex(i); // Simple optimization if (dimSize === 0) { keep = cb.call(fCtx, i); } else if (dimSize === 1) { var val = storageArr[dim0][rawIdx]; keep = cb.call(fCtx, val, i); } else { var k = 0; for (; k < dimSize; k++) { value[k] = storageArr[dimIndices[k]][rawIdx]; } value[k] = i; keep = cb.apply(fCtx, value); } if (keep) { newIndices[offset++] = rawIdx; } } // Set indices after filtered. if (offset < count) { this._indices = newIndices; } this._count = offset; // Reset data extent this._extent = {}; this.getRawIndex = this._indices ? getRawIndexWithIndices : getRawIndexWithoutIndices; return this; }; /** * Select data in range. (For optimization of filter) * (Manually inline code, support 5 million data filtering in data zoom.) */ List.prototype.selectRange = function (range) { var _this = this; var len = this._count; if (!len) { return; } var dimensions = []; for (var dim in range) { if (range.hasOwnProperty(dim)) { dimensions.push(dim); } } if ("development" !== 'production') { validateDimensions(this, dimensions); } var dimSize = dimensions.length; if (!dimSize) { return; } var originalCount = this.count(); var Ctor = getIndicesCtor(this); var newIndices = new Ctor(originalCount); var offset = 0; var dim0 = dimensions[0]; var dimIndices = map$1(dimensions, function (dimName) { return _this._dimensionInfos[dimName].index; }); var min = range[dim0][0]; var max = range[dim0][1]; var storageArr = this._storageArr; var quickFinished = false; if (!this._indices) { // Extreme optimization for common case. About 2x faster in chrome. var idx = 0; if (dimSize === 1) { var dimStorage = storageArr[dimIndices[0]]; for (var i = 0; i < len; i++) { var val = dimStorage[i]; // NaN will not be filtered. Consider the case, in line chart, empty // value indicates the line should be broken. But for the case like // scatter plot, a data item with empty value will not be rendered, // but the axis extent may be effected if some other dim of the data // item has value. Fortunately it is not a significant negative effect. if (val >= min && val <= max || isNaN(val)) { newIndices[offset++] = idx; } idx++; } quickFinished = true; } else if (dimSize === 2) { var dimStorage = storageArr[dimIndices[0]]; var dimStorage2 = storageArr[dimIndices[1]]; var min2 = range[dimensions[1]][0]; var max2 = range[dimensions[1]][1]; for (var i = 0; i < len; i++) { var val = dimStorage[i]; var val2 = dimStorage2[i]; // Do not filter NaN, see comment above. if ((val >= min && val <= max || isNaN(val)) && (val2 >= min2 && val2 <= max2 || isNaN(val2))) { newIndices[offset++] = idx; } idx++; } quickFinished = true; } } if (!quickFinished) { if (dimSize === 1) { for (var i = 0; i < originalCount; i++) { var rawIndex = this.getRawIndex(i); var val = storageArr[dimIndices[0]][rawIndex]; // Do not filter NaN, see comment above. if (val >= min && val <= max || isNaN(val)) { newIndices[offset++] = rawIndex; } } } else { for (var i = 0; i < originalCount; i++) { var keep = true; var rawIndex = this.getRawIndex(i); for (var k = 0; k < dimSize; k++) { var dimk = dimensions[k]; var val = storageArr[dimIndices[k]][rawIndex]; // Do not filter NaN, see comment above. if (val < range[dimk][0] || val > range[dimk][1]) { keep = false; } } if (keep) { newIndices[offset++] = this.getRawIndex(i); } } } } // Set indices after filtered. if (offset < originalCount) { this._indices = newIndices; } this._count = offset; // Reset data extent this._extent = {}; this.getRawIndex = this._indices ? getRawIndexWithIndices : getRawIndexWithoutIndices; return this; }; /* eslint-enable */ List.prototype.mapArray = function (dims, cb, ctx, ctxCompat) { if (typeof dims === 'function') { ctxCompat = ctx; ctx = cb; cb = dims; dims = []; } // ctxCompat just for compat echarts3 ctx = ctx || ctxCompat || this; var result = []; this.each(dims, function () { result.push(cb && cb.apply(this, arguments)); }, ctx); return result; }; List.prototype.map = function (dims, cb, ctx, ctxCompat) { var fCtx = ctx || ctxCompat || this; var dimNames = map$1(normalizeDimensions(dims), this.getDimension, this); if ("development" !== 'production') { validateDimensions(this, dimNames); } var list = cloneListForMapAndSample(this, dimNames); var storage = list._storage; // Following properties are all immutable. // So we can reference to the same value list._indices = this._indices; list.getRawIndex = list._indices ? getRawIndexWithIndices : getRawIndexWithoutIndices; var tmpRetValue = []; var dimSize = dimNames.length; var dataCount = this.count(); var values = []; var rawExtent = list._rawExtent; for (var dataIndex = 0; dataIndex < dataCount; dataIndex++) { for (var dimIndex = 0; dimIndex < dimSize; dimIndex++) { values[dimIndex] = this.get(dimNames[dimIndex], dataIndex); } values[dimSize] = dataIndex; var retValue = cb && cb.apply(fCtx, values); if (retValue != null) { // a number or string (in oridinal dimension)? if (typeof retValue !== 'object') { tmpRetValue[0] = retValue; retValue = tmpRetValue; } var rawIndex = this.getRawIndex(dataIndex); for (var i = 0; i < retValue.length; i++) { var dim = dimNames[i]; var val = retValue[i]; var rawExtentOnDim = rawExtent[dim]; var dimStore = storage[dim]; if (dimStore) { dimStore[rawIndex] = val; } if (val < rawExtentOnDim[0]) { rawExtentOnDim[0] = val; } if (val > rawExtentOnDim[1]) { rawExtentOnDim[1] = val; } } } } return list; }; /** * Large data down sampling on given dimension * @param sampleIndex Sample index for name and id */ List.prototype.downSample = function (dimension, rate, sampleValue, sampleIndex) { var list = cloneListForMapAndSample(this, [dimension]); var targetStorage = list._storage; var frameValues = []; var frameSize = mathFloor(1 / rate); var dimStore = targetStorage[dimension]; var len = this.count(); var rawExtentOnDim = list._rawExtent[dimension]; var newIndices = new (getIndicesCtor(this))(len); var offset = 0; for (var i = 0; i < len; i += frameSize) { // Last frame if (frameSize > len - i) { frameSize = len - i; frameValues.length = frameSize; } for (var k = 0; k < frameSize; k++) { var dataIdx = this.getRawIndex(i + k); frameValues[k] = dimStore[dataIdx]; } var value = sampleValue(frameValues); var sampleFrameIdx = this.getRawIndex(Math.min(i + sampleIndex(frameValues, value) || 0, len - 1)); // Only write value on the filtered data dimStore[sampleFrameIdx] = value; if (value < rawExtentOnDim[0]) { rawExtentOnDim[0] = value; } if (value > rawExtentOnDim[1]) { rawExtentOnDim[1] = value; } newIndices[offset++] = sampleFrameIdx; } list._count = offset; list._indices = newIndices; list.getRawIndex = getRawIndexWithIndices; return list; }; /** * Large data down sampling using largest-triangle-three-buckets * @param {string} valueDimension * @param {number} targetCount */ List.prototype.lttbDownSample = function (valueDimension, rate) { var list = cloneListForMapAndSample(this, []); var targetStorage = list._storage; var dimStore = targetStorage[valueDimension]; var len = this.count(); var newIndices = new (getIndicesCtor(this))(len); var sampledIndex = 0; var frameSize = mathFloor(1 / rate); var currentRawIndex = this.getRawIndex(0); var maxArea; var area; var nextRawIndex; // First frame use the first data. newIndices[sampledIndex++] = currentRawIndex; for (var i = 1; i < len - 1; i += frameSize) { var nextFrameStart = Math.min(i + frameSize, len - 1); var nextFrameEnd = Math.min(i + frameSize * 2, len); var avgX = (nextFrameEnd + nextFrameStart) / 2; var avgY = 0; for (var idx = nextFrameStart; idx < nextFrameEnd; idx++) { var rawIndex = this.getRawIndex(idx); var y = dimStore[rawIndex]; if (isNaN(y)) { continue; } avgY += y; } avgY /= nextFrameEnd - nextFrameStart; var frameStart = i; var frameEnd = Math.min(i + frameSize, len); var pointAX = i - 1; var pointAY = dimStore[currentRawIndex]; maxArea = -1; nextRawIndex = frameStart; // Find a point from current frame that construct a triangel with largest area with previous selected point // And the average of next frame. for (var idx = frameStart; idx < frameEnd; idx++) { var rawIndex = this.getRawIndex(idx); var y = dimStore[rawIndex]; if (isNaN(y)) { continue; } // Calculate triangle area over three buckets area = Math.abs((pointAX - avgX) * (y - pointAY) - (pointAX - idx) * (avgY - pointAY)); if (area > maxArea) { maxArea = area; nextRawIndex = rawIndex; // Next a is this b } } newIndices[sampledIndex++] = nextRawIndex; currentRawIndex = nextRawIndex; // This a is the next a (chosen b) } // First frame use the last data. newIndices[sampledIndex++] = this.getRawIndex(len - 1); list._count = sampledIndex; list._indices = newIndices; list.getRawIndex = getRawIndexWithIndices; return list; }; /** * Get model of one data item. */ // TODO: Type of data item List.prototype.getItemModel = function (idx) { var hostModel = this.hostModel; var dataItem = this.getRawDataItem(idx); return new Model(dataItem, hostModel, hostModel && hostModel.ecModel); }; /** * Create a data differ */ List.prototype.diff = function (otherList) { var thisList = this; return new DataDiffer(otherList ? otherList.getIndices() : [], this.getIndices(), function (idx) { return getId(otherList, idx); }, function (idx) { return getId(thisList, idx); }); }; /** * Get visual property. */ List.prototype.getVisual = function (key) { var visual = this._visual; return visual && visual[key]; }; List.prototype.setVisual = function (kvObj, val) { this._visual = this._visual || {}; if (isObject$3(kvObj)) { extend(this._visual, kvObj); } else { this._visual[kvObj] = val; } }; /** * Get visual property of single data item */ // eslint-disable-next-line List.prototype.getItemVisual = function (idx, key) { var itemVisual = this._itemVisuals[idx]; var val = itemVisual && itemVisual[key]; if (val == null) { // Use global visual property return this.getVisual(key); } return val; }; /** * If exists visual property of single data item */ List.prototype.hasItemVisual = function () { return this._itemVisuals.length > 0; }; /** * Make sure itemVisual property is unique */ // TODO: use key to save visual to reduce memory. List.prototype.ensureUniqueItemVisual = function (idx, key) { var itemVisuals = this._itemVisuals; var itemVisual = itemVisuals[idx]; if (!itemVisual) { itemVisual = itemVisuals[idx] = {}; } var val = itemVisual[key]; if (val == null) { val = this.getVisual(key); // TODO Performance? if (isArray(val)) { val = val.slice(); } else if (isObject$3(val)) { val = extend({}, val); } itemVisual[key] = val; } return val; }; // eslint-disable-next-line List.prototype.setItemVisual = function (idx, key, value) { var itemVisual = this._itemVisuals[idx] || {}; this._itemVisuals[idx] = itemVisual; if (isObject$3(key)) { extend(itemVisual, key); } else { itemVisual[key] = value; } }; /** * Clear itemVisuals and list visual. */ List.prototype.clearAllVisual = function () { this._visual = {}; this._itemVisuals = []; }; List.prototype.setLayout = function (key, val) { if (isObject$3(key)) { for (var name_1 in key) { if (key.hasOwnProperty(name_1)) { this.setLayout(name_1, key[name_1]); } } return; } this._layout[key] = val; }; /** * Get layout property. */ List.prototype.getLayout = function (key) { return this._layout[key]; }; /** * Get layout of single data item */ List.prototype.getItemLayout = function (idx) { return this._itemLayouts[idx]; }; /** * Set layout of single data item */ List.prototype.setItemLayout = function (idx, layout, merge) { this._itemLayouts[idx] = merge ? extend(this._itemLayouts[idx] || {}, layout) : layout; }; /** * Clear all layout of single data item */ List.prototype.clearItemLayouts = function () { this._itemLayouts.length = 0; }; /** * Set graphic element relative to data. It can be set as null */ List.prototype.setItemGraphicEl = function (idx, el) { var hostModel = this.hostModel; if (el) { var ecData = getECData(el); // Add data index and series index for indexing the data by element // Useful in tooltip ecData.dataIndex = idx; ecData.dataType = this.dataType; ecData.seriesIndex = hostModel && hostModel.seriesIndex; // TODO: not store dataIndex on children. if (el.type === 'group') { el.traverse(setItemDataAndSeriesIndex, el); } } this._graphicEls[idx] = el; }; List.prototype.getItemGraphicEl = function (idx) { return this._graphicEls[idx]; }; List.prototype.eachItemGraphicEl = function (cb, context) { each(this._graphicEls, function (el, idx) { if (el) { cb && cb.call(context, el, idx); } }); }; /** * Shallow clone a new list except visual and layout properties, and graph elements. * New list only change the indices. */ List.prototype.cloneShallow = function (list) { if (!list) { var dimensionInfoList = map$1(this.dimensions, this.getDimensionInfo, this); list = new List(dimensionInfoList, this.hostModel); } // FIXME list._storage = this._storage; list._storageArr = this._storageArr; transferProperties(list, this); // Clone will not change the data extent and indices if (this._indices) { var Ctor = this._indices.constructor; if (Ctor === Array) { var thisCount = this._indices.length; list._indices = new Ctor(thisCount); for (var i = 0; i < thisCount; i++) { list._indices[i] = this._indices[i]; } } else { list._indices = new Ctor(this._indices); } } else { list._indices = null; } list.getRawIndex = list._indices ? getRawIndexWithIndices : getRawIndexWithoutIndices; return list; }; /** * Wrap some method to add more feature */ List.prototype.wrapMethod = function (methodName, injectFunction) { var originalMethod = this[methodName]; if (typeof originalMethod !== 'function') { return; } this.__wrappedMethods = this.__wrappedMethods || []; this.__wrappedMethods.push(methodName); this[methodName] = function () { var res = originalMethod.apply(this, arguments); return injectFunction.apply(this, [res].concat(slice(arguments))); }; }; // ---------------------------------------------------------- // A work around for internal method visiting private member. // ---------------------------------------------------------- List.internalField = function () { defaultDimValueGetters = { arrayRows: getDimValueSimply, objectRows: function (dataItem, dimName, dataIndex, dimIndex) { return parseDataValue(dataItem[dimName], this._dimensionInfos[dimName]); }, keyedColumns: getDimValueSimply, original: function (dataItem, dimName, dataIndex, dimIndex) { // Performance sensitive, do not use modelUtil.getDataItemValue. // If dataItem is an plain object with no value field, the let `value` // will be assigned with the object, but it will be tread correctly // in the `convertValue`. var value = dataItem && (dataItem.value == null ? dataItem : dataItem.value); // If any dataItem is like { value: 10 } if (!this._rawData.pure && isDataItemOption(dataItem)) { this.hasItemOption = true; } return parseDataValue(value instanceof Array ? value[dimIndex] // If value is a single number or something else not array. : value, this._dimensionInfos[dimName]); }, typedArray: function (dataItem, dimName, dataIndex, dimIndex) { return dataItem[dimIndex]; } }; function getDimValueSimply(dataItem, dimName, dataIndex, dimIndex) { return parseDataValue(dataItem[dimIndex], this._dimensionInfos[dimName]); } prepareInvertedIndex = function (list) { var invertedIndicesMap = list._invertedIndicesMap; each(invertedIndicesMap, function (invertedIndices, dim) { var dimInfo = list._dimensionInfos[dim]; // Currently, only dimensions that has ordinalMeta can create inverted indices. var ordinalMeta = dimInfo.ordinalMeta; if (ordinalMeta) { invertedIndices = invertedIndicesMap[dim] = new CtorInt32Array(ordinalMeta.categories.length); // The default value of TypedArray is 0. To avoid miss // mapping to 0, we should set it as INDEX_NOT_FOUND. for (var i = 0; i < invertedIndices.length; i++) { invertedIndices[i] = INDEX_NOT_FOUND; } for (var i = 0; i < list._count; i++) { // Only support the case that all values are distinct. invertedIndices[list.get(dim, i)] = i; } } }); }; getIdNameFromStore = function (list, dimIdx, ordinalMeta, rawIndex) { var val; var chunk = list._storageArr[dimIdx]; if (chunk) { val = chunk[rawIndex]; if (ordinalMeta && ordinalMeta.categories.length) { val = ordinalMeta.categories[val]; } } return convertOptionIdName(val, null); }; getIndicesCtor = function (list) { // The possible max value in this._indicies is always this._rawCount despite of filtering. return list._rawCount > 65535 ? CtorUint32Array : CtorUint16Array; }; prepareStorage = function (storage, dimInfo, end, append) { var DataCtor = dataCtors[dimInfo.type]; var dim = dimInfo.name; if (append) { var oldStore = storage[dim]; var oldLen = oldStore && oldStore.length; if (!(oldLen === end)) { var newStore = new DataCtor(end); // The cost of the copy is probably inconsiderable // within the initial chunkSize. for (var j = 0; j < oldLen; j++) { newStore[j] = oldStore[j]; } storage[dim] = newStore; } } else { storage[dim] = new DataCtor(end); } }; getRawIndexWithoutIndices = function (idx) { return idx; }; getRawIndexWithIndices = function (idx) { if (idx < this._count && idx >= 0) { return this._indices[idx]; } return -1; }; /** * @see the comment of `List['getId']`. */ getId = function (list, rawIndex) { var id = list._idList[rawIndex]; if (id == null && list._idDimIdx != null) { id = getIdNameFromStore(list, list._idDimIdx, list._idOrdinalMeta, rawIndex); } if (id == null) { id = ID_PREFIX + rawIndex; } return id; }; normalizeDimensions = function (dimensions) { if (!isArray(dimensions)) { dimensions = dimensions != null ? [dimensions] : []; } return dimensions; }; validateDimensions = function (list, dims) { for (var i = 0; i < dims.length; i++) { // stroage may be empty when no data, so use // dimensionInfos to check. if (!list._dimensionInfos[dims[i]]) { console.error('Unkown dimension ' + dims[i]); } } }; // Data in excludeDimensions is copied, otherwise transfered. cloneListForMapAndSample = function (original, excludeDimensions) { var allDimensions = original.dimensions; var list = new List(map$1(allDimensions, original.getDimensionInfo, original), original.hostModel); // FIXME If needs stackedOn, value may already been stacked transferProperties(list, original); var storage = list._storage = {}; var originalStorage = original._storage; var storageArr = list._storageArr = []; // Init storage for (var i = 0; i < allDimensions.length; i++) { var dim = allDimensions[i]; if (originalStorage[dim]) { // Notice that we do not reset invertedIndicesMap here, becuase // there is no scenario of mapping or sampling ordinal dimension. if (indexOf(excludeDimensions, dim) >= 0) { storage[dim] = cloneChunk(originalStorage[dim]); list._rawExtent[dim] = getInitialExtent(); list._extent[dim] = null; } else { // Direct reference for other dimensions storage[dim] = originalStorage[dim]; } storageArr.push(storage[dim]); } } return list; }; function cloneChunk(originalChunk) { var Ctor = originalChunk.constructor; // Only shallow clone is enough when Array. return Ctor === Array ? originalChunk.slice() : new Ctor(originalChunk); } getInitialExtent = function () { return [Infinity, -Infinity]; }; setItemDataAndSeriesIndex = function (child) { var childECData = getECData(child); var thisECData = getECData(this); childECData.seriesIndex = thisECData.seriesIndex; childECData.dataIndex = thisECData.dataIndex; childECData.dataType = thisECData.dataType; }; transferProperties = function (target, source) { each(TRANSFERABLE_PROPERTIES.concat(source.__wrappedMethods || []), function (propName) { if (source.hasOwnProperty(propName)) { target[propName] = source[propName]; } }); target.__wrappedMethods = source.__wrappedMethods; each(CLONE_PROPERTIES, function (propName) { target[propName] = clone(source[propName]); }); target._calculationInfo = extend({}, source._calculationInfo); }; makeIdFromName = function (list, idx) { var nameList = list._nameList; var idList = list._idList; var nameDimIdx = list._nameDimIdx; var idDimIdx = list._idDimIdx; var name = nameList[idx]; var id = idList[idx]; if (name == null && nameDimIdx != null) { nameList[idx] = name = getIdNameFromStore(list, nameDimIdx, list._nameOrdinalMeta, idx); } if (id == null && idDimIdx != null) { idList[idx] = id = getIdNameFromStore(list, idDimIdx, list._idOrdinalMeta, idx); } if (id == null && name != null) { var nameRepeatCount = list._nameRepeatCount; var nmCnt = nameRepeatCount[name] = (nameRepeatCount[name] || 0) + 1; id = name; if (nmCnt > 1) { id += '__ec__' + nmCnt; } idList[idx] = id; } }; }(); return List; }(); /** * @see {module:echarts/test/ut/spec/data/completeDimensions} * * This method builds the relationship between: * + "what the coord sys or series requires (see `sysDims`)", * + "what the user defines (in `encode` and `dimensions`, see `opt.dimsDef` and `opt.encodeDef`)" * + "what the data source provids (see `source`)". * * Some guess strategy will be adapted if user does not define something. * If no 'value' dimension specified, the first no-named dimension will be * named as 'value'. * * @param {Array.} sysDims Necessary dimensions, like ['x', 'y'], which * provides not only dim template, but also default order. * properties: 'name', 'type', 'displayName'. * `name` of each item provides default coord name. * [{dimsDef: [string|Object, ...]}, ...] dimsDef of sysDim item provides default dim name, and * provide dims count that the sysDim required. * [{ordinalMeta}] can be specified. * @param {module:echarts/data/Source|Array|Object} source or data (for compatibal with pervious) * @param {Object} [opt] * @param {Array.} [opt.dimsDef] option.series.dimensions User defined dimensions * For example: ['asdf', {name, type}, ...]. * @param {Object|HashMap} [opt.encodeDef] option.series.encode {x: 2, y: [3, 1], tooltip: [1, 2], label: 3} * @param {Function} [opt.encodeDefaulter] Called if no `opt.encodeDef` exists. * If not specified, auto find the next available data dim. * param source {module:data/Source} * param dimCount {number} * return {Object} encode Never be `null/undefined`. * @param {string} [opt.generateCoord] Generate coord dim with the given name. * If not specified, extra dim names will be: * 'value', 'value0', 'value1', ... * @param {number} [opt.generateCoordCount] By default, the generated dim name is `generateCoord`. * If `generateCoordCount` specified, the generated dim names will be: * `generateCoord` + 0, `generateCoord` + 1, ... * can be Infinity, indicate that use all of the remain columns. * @param {number} [opt.dimCount] If not specified, guess by the first data item. * @return {Array.} */ function completeDimensions(sysDims, source, opt) { if (!isSourceInstance(source)) { source = createSourceFromSeriesDataOption(source); } opt = opt || {}; sysDims = (sysDims || []).slice(); var dimsDef = (opt.dimsDef || []).slice(); var dataDimNameMap = createHashMap(); var coordDimNameMap = createHashMap(); // let valueCandidate; var result = []; var dimCount = getDimCount(source, sysDims, dimsDef, opt.dimCount); // Apply user defined dims (`name` and `type`) and init result. for (var i = 0; i < dimCount; i++) { var dimDefItemRaw = dimsDef[i]; var dimDefItem = dimsDef[i] = extend({}, isObject(dimDefItemRaw) ? dimDefItemRaw : { name: dimDefItemRaw }); var userDimName = dimDefItem.name; var resultItem = result[i] = new DataDimensionInfo(); // Name will be applied later for avoiding duplication. if (userDimName != null && dataDimNameMap.get(userDimName) == null) { // Only if `series.dimensions` is defined in option // displayName, will be set, and dimension will be diplayed vertically in // tooltip by default. resultItem.name = resultItem.displayName = userDimName; dataDimNameMap.set(userDimName, i); } dimDefItem.type != null && (resultItem.type = dimDefItem.type); dimDefItem.displayName != null && (resultItem.displayName = dimDefItem.displayName); } var encodeDef = opt.encodeDef; if (!encodeDef && opt.encodeDefaulter) { encodeDef = opt.encodeDefaulter(source, dimCount); } var encodeDefMap = createHashMap(encodeDef); // Set `coordDim` and `coordDimIndex` by `encodeDefMap` and normalize `encodeDefMap`. encodeDefMap.each(function (dataDimsRaw, coordDim) { var dataDims = normalizeToArray(dataDimsRaw).slice(); // Note: It is allowed that `dataDims.length` is `0`, e.g., options is // `{encode: {x: -1, y: 1}}`. Should not filter anything in // this case. if (dataDims.length === 1 && !isString(dataDims[0]) && dataDims[0] < 0) { encodeDefMap.set(coordDim, false); return; } var validDataDims = encodeDefMap.set(coordDim, []); each(dataDims, function (resultDimIdxOrName, idx) { // The input resultDimIdx can be dim name or index. var resultDimIdx = isString(resultDimIdxOrName) ? dataDimNameMap.get(resultDimIdxOrName) : resultDimIdxOrName; if (resultDimIdx != null && resultDimIdx < dimCount) { validDataDims[idx] = resultDimIdx; applyDim(result[resultDimIdx], coordDim, idx); } }); }); // Apply templetes and default order from `sysDims`. var availDimIdx = 0; each(sysDims, function (sysDimItemRaw) { var coordDim; var sysDimItemDimsDef; var sysDimItemOtherDims; var sysDimItem; if (isString(sysDimItemRaw)) { coordDim = sysDimItemRaw; sysDimItem = {}; } else { sysDimItem = sysDimItemRaw; coordDim = sysDimItem.name; var ordinalMeta = sysDimItem.ordinalMeta; sysDimItem.ordinalMeta = null; sysDimItem = clone(sysDimItem); sysDimItem.ordinalMeta = ordinalMeta; // `coordDimIndex` should not be set directly. sysDimItemDimsDef = sysDimItem.dimsDef; sysDimItemOtherDims = sysDimItem.otherDims; sysDimItem.name = sysDimItem.coordDim = sysDimItem.coordDimIndex = sysDimItem.dimsDef = sysDimItem.otherDims = null; } var dataDims = encodeDefMap.get(coordDim); // negative resultDimIdx means no need to mapping. if (dataDims === false) { return; } dataDims = normalizeToArray(dataDims); // dimensions provides default dim sequences. if (!dataDims.length) { for (var i = 0; i < (sysDimItemDimsDef && sysDimItemDimsDef.length || 1); i++) { while (availDimIdx < result.length && result[availDimIdx].coordDim != null) { availDimIdx++; } availDimIdx < result.length && dataDims.push(availDimIdx++); } } // Apply templates. each(dataDims, function (resultDimIdx, coordDimIndex) { var resultItem = result[resultDimIdx]; applyDim(defaults(resultItem, sysDimItem), coordDim, coordDimIndex); if (resultItem.name == null && sysDimItemDimsDef) { var sysDimItemDimsDefItem = sysDimItemDimsDef[coordDimIndex]; !isObject(sysDimItemDimsDefItem) && (sysDimItemDimsDefItem = { name: sysDimItemDimsDefItem }); resultItem.name = resultItem.displayName = sysDimItemDimsDefItem.name; resultItem.defaultTooltip = sysDimItemDimsDefItem.defaultTooltip; } // FIXME refactor, currently only used in case: {otherDims: {tooltip: false}} sysDimItemOtherDims && defaults(resultItem.otherDims, sysDimItemOtherDims); }); }); function applyDim(resultItem, coordDim, coordDimIndex) { if (VISUAL_DIMENSIONS.get(coordDim) != null) { resultItem.otherDims[coordDim] = coordDimIndex; } else { resultItem.coordDim = coordDim; resultItem.coordDimIndex = coordDimIndex; coordDimNameMap.set(coordDim, true); } } // Make sure the first extra dim is 'value'. var generateCoord = opt.generateCoord; var generateCoordCount = opt.generateCoordCount; var fromZero = generateCoordCount != null; generateCoordCount = generateCoord ? generateCoordCount || 1 : 0; var extra = generateCoord || 'value'; // Set dim `name` and other `coordDim` and other props. for (var resultDimIdx = 0; resultDimIdx < dimCount; resultDimIdx++) { var resultItem = result[resultDimIdx] = result[resultDimIdx] || new DataDimensionInfo(); var coordDim = resultItem.coordDim; if (coordDim == null) { resultItem.coordDim = genName(extra, coordDimNameMap, fromZero); resultItem.coordDimIndex = 0; if (!generateCoord || generateCoordCount <= 0) { resultItem.isExtraCoord = true; } generateCoordCount--; } resultItem.name == null && (resultItem.name = genName(resultItem.coordDim, dataDimNameMap, false)); if (resultItem.type == null && (guessOrdinal(source, resultDimIdx) === BE_ORDINAL.Must // Consider the case: // { // dataset: {source: [ // ['2001', 123], // ['2002', 456], // ... // ['The others', 987], // ]}, // series: {type: 'pie'} // } // The first colum should better be treated as a "ordinal" although it // might not able to be detected as an "ordinal" by `guessOrdinal`. || resultItem.isExtraCoord && (resultItem.otherDims.itemName != null || resultItem.otherDims.seriesName != null))) { resultItem.type = 'ordinal'; } } return result; } // ??? TODO // Originally detect dimCount by data[0]. Should we // optimize it to only by sysDims and dimensions and encode. // So only necessary dims will be initialized. // But // (1) custom series should be considered. where other dims // may be visited. // (2) sometimes user need to calcualte bubble size or use visualMap // on other dimensions besides coordSys needed. // So, dims that is not used by system, should be shared in storage? function getDimCount(source, sysDims, dimsDef, optDimCount) { // Note that the result dimCount should not small than columns count // of data, otherwise `dataDimNameMap` checking will be incorrect. var dimCount = Math.max(source.dimensionsDetectedCount || 1, sysDims.length, dimsDef.length, optDimCount || 0); each(sysDims, function (sysDimItem) { var sysDimItemDimsDef; if (isObject(sysDimItem) && (sysDimItemDimsDef = sysDimItem.dimsDef)) { dimCount = Math.max(dimCount, sysDimItemDimsDef.length); } }); return dimCount; } function genName(name, map, fromZero) { if (fromZero || map.get(name) != null) { var i = 0; while (map.get(name + i) != null) { i++; } name += i; } map.set(name, true); return name; } /** * @param opt.coordDimensions * @param opt.dimensionsDefine By default `source.dimensionsDefine` Overwrite source define. * @param opt.encodeDefine By default `source.encodeDefine` Overwrite source define. * @param opt.encodeDefaulter Make default encode if user not specified. */ function createDimensions( // TODO: TYPE completeDimensions type source, opt) { opt = opt || {}; return completeDimensions(opt.coordDimensions || [], source, { // FIXME:TS detect whether source then call `.dimensionsDefine` and `.encodeDefine`? dimsDef: opt.dimensionsDefine || source.dimensionsDefine, encodeDef: opt.encodeDefine || source.encodeDefine, dimCount: opt.dimensionsCount, encodeDefaulter: opt.encodeDefaulter, generateCoord: opt.generateCoord, generateCoordCount: opt.generateCoordCount }); } /** * @class * For example: * { * coordSysName: 'cartesian2d', * coordSysDims: ['x', 'y', ...], * axisMap: HashMap({ * x: xAxisModel, * y: yAxisModel * }), * categoryAxisMap: HashMap({ * x: xAxisModel, * y: undefined * }), * // The index of the first category axis in `coordSysDims`. * // `null/undefined` means no category axis exists. * firstCategoryDimIndex: 1, * // To replace user specified encode. * } */ var CoordSysInfo = /** @class */ function () { function CoordSysInfo(coordSysName) { this.coordSysDims = []; this.axisMap = createHashMap(); this.categoryAxisMap = createHashMap(); this.coordSysName = coordSysName; } return CoordSysInfo; }(); function getCoordSysInfoBySeries(seriesModel) { var coordSysName = seriesModel.get('coordinateSystem'); var result = new CoordSysInfo(coordSysName); var fetch = fetchers[coordSysName]; if (fetch) { fetch(seriesModel, result, result.axisMap, result.categoryAxisMap); return result; } } var fetchers = { cartesian2d: function (seriesModel, result, axisMap, categoryAxisMap) { var xAxisModel = seriesModel.getReferringComponents('xAxis', SINGLE_REFERRING).models[0]; var yAxisModel = seriesModel.getReferringComponents('yAxis', SINGLE_REFERRING).models[0]; if ("development" !== 'production') { if (!xAxisModel) { throw new Error('xAxis "' + retrieve(seriesModel.get('xAxisIndex'), seriesModel.get('xAxisId'), 0) + '" not found'); } if (!yAxisModel) { throw new Error('yAxis "' + retrieve(seriesModel.get('xAxisIndex'), seriesModel.get('yAxisId'), 0) + '" not found'); } } result.coordSysDims = ['x', 'y']; axisMap.set('x', xAxisModel); axisMap.set('y', yAxisModel); if (isCategory(xAxisModel)) { categoryAxisMap.set('x', xAxisModel); result.firstCategoryDimIndex = 0; } if (isCategory(yAxisModel)) { categoryAxisMap.set('y', yAxisModel); result.firstCategoryDimIndex == null && (result.firstCategoryDimIndex = 1); } }, singleAxis: function (seriesModel, result, axisMap, categoryAxisMap) { var singleAxisModel = seriesModel.getReferringComponents('singleAxis', SINGLE_REFERRING).models[0]; if ("development" !== 'production') { if (!singleAxisModel) { throw new Error('singleAxis should be specified.'); } } result.coordSysDims = ['single']; axisMap.set('single', singleAxisModel); if (isCategory(singleAxisModel)) { categoryAxisMap.set('single', singleAxisModel); result.firstCategoryDimIndex = 0; } }, polar: function (seriesModel, result, axisMap, categoryAxisMap) { var polarModel = seriesModel.getReferringComponents('polar', SINGLE_REFERRING).models[0]; var radiusAxisModel = polarModel.findAxisModel('radiusAxis'); var angleAxisModel = polarModel.findAxisModel('angleAxis'); if ("development" !== 'production') { if (!angleAxisModel) { throw new Error('angleAxis option not found'); } if (!radiusAxisModel) { throw new Error('radiusAxis option not found'); } } result.coordSysDims = ['radius', 'angle']; axisMap.set('radius', radiusAxisModel); axisMap.set('angle', angleAxisModel); if (isCategory(radiusAxisModel)) { categoryAxisMap.set('radius', radiusAxisModel); result.firstCategoryDimIndex = 0; } if (isCategory(angleAxisModel)) { categoryAxisMap.set('angle', angleAxisModel); result.firstCategoryDimIndex == null && (result.firstCategoryDimIndex = 1); } }, geo: function (seriesModel, result, axisMap, categoryAxisMap) { result.coordSysDims = ['lng', 'lat']; }, parallel: function (seriesModel, result, axisMap, categoryAxisMap) { var ecModel = seriesModel.ecModel; var parallelModel = ecModel.getComponent('parallel', seriesModel.get('parallelIndex')); var coordSysDims = result.coordSysDims = parallelModel.dimensions.slice(); each(parallelModel.parallelAxisIndex, function (axisIndex, index) { var axisModel = ecModel.getComponent('parallelAxis', axisIndex); var axisDim = coordSysDims[index]; axisMap.set(axisDim, axisModel); if (isCategory(axisModel)) { categoryAxisMap.set(axisDim, axisModel); if (result.firstCategoryDimIndex == null) { result.firstCategoryDimIndex = index; } } }); } }; function isCategory(axisModel) { return axisModel.get('type') === 'category'; } /** * Note that it is too complicated to support 3d stack by value * (have to create two-dimension inverted index), so in 3d case * we just support that stacked by index. * * @param seriesModel * @param dimensionInfoList The same as the input of . * The input dimensionInfoList will be modified. * @param opt * @param opt.stackedCoordDimension Specify a coord dimension if needed. * @param opt.byIndex=false * @return calculationInfo * { * stackedDimension: string * stackedByDimension: string * isStackedByIndex: boolean * stackedOverDimension: string * stackResultDimension: string * } */ function enableDataStack(seriesModel, dimensionInfoList, opt) { opt = opt || {}; var byIndex = opt.byIndex; var stackedCoordDimension = opt.stackedCoordDimension; // Compatibal: when `stack` is set as '', do not stack. var mayStack = !!(seriesModel && seriesModel.get('stack')); var stackedByDimInfo; var stackedDimInfo; var stackResultDimension; var stackedOverDimension; each(dimensionInfoList, function (dimensionInfo, index) { if (isString(dimensionInfo)) { dimensionInfoList[index] = dimensionInfo = { name: dimensionInfo }; } if (mayStack && !dimensionInfo.isExtraCoord) { // Find the first ordinal dimension as the stackedByDimInfo. if (!byIndex && !stackedByDimInfo && dimensionInfo.ordinalMeta) { stackedByDimInfo = dimensionInfo; } // Find the first stackable dimension as the stackedDimInfo. if (!stackedDimInfo && dimensionInfo.type !== 'ordinal' && dimensionInfo.type !== 'time' && (!stackedCoordDimension || stackedCoordDimension === dimensionInfo.coordDim)) { stackedDimInfo = dimensionInfo; } } }); if (stackedDimInfo && !byIndex && !stackedByDimInfo) { // Compatible with previous design, value axis (time axis) only stack by index. // It may make sense if the user provides elaborately constructed data. byIndex = true; } // Add stack dimension, they can be both calculated by coordinate system in `unionExtent`. // That put stack logic in List is for using conveniently in echarts extensions, but it // might not be a good way. if (stackedDimInfo) { // Use a weird name that not duplicated with other names. stackResultDimension = '__\0ecstackresult'; stackedOverDimension = '__\0ecstackedover'; // Create inverted index to fast query index by value. if (stackedByDimInfo) { stackedByDimInfo.createInvertedIndices = true; } var stackedDimCoordDim_1 = stackedDimInfo.coordDim; var stackedDimType = stackedDimInfo.type; var stackedDimCoordIndex_1 = 0; each(dimensionInfoList, function (dimensionInfo) { if (dimensionInfo.coordDim === stackedDimCoordDim_1) { stackedDimCoordIndex_1++; } }); dimensionInfoList.push({ name: stackResultDimension, coordDim: stackedDimCoordDim_1, coordDimIndex: stackedDimCoordIndex_1, type: stackedDimType, isExtraCoord: true, isCalculationCoord: true }); stackedDimCoordIndex_1++; dimensionInfoList.push({ name: stackedOverDimension, // This dimension contains stack base (generally, 0), so do not set it as // `stackedDimCoordDim` to avoid extent calculation, consider log scale. coordDim: stackedOverDimension, coordDimIndex: stackedDimCoordIndex_1, type: stackedDimType, isExtraCoord: true, isCalculationCoord: true }); } return { stackedDimension: stackedDimInfo && stackedDimInfo.name, stackedByDimension: stackedByDimInfo && stackedByDimInfo.name, isStackedByIndex: byIndex, stackedOverDimension: stackedOverDimension, stackResultDimension: stackResultDimension }; } function isDimensionStacked(data, stackedDim /*, stackedByDim*/ ) { // Each single series only maps to one pair of axis. So we do not need to // check stackByDim, whatever stacked by a dimension or stacked by index. return !!stackedDim && stackedDim === data.getCalculationInfo('stackedDimension'); // && ( // stackedByDim != null // ? stackedByDim === data.getCalculationInfo('stackedByDimension') // : data.getCalculationInfo('isStackedByIndex') // ); } function getStackedDimension(data, targetDim) { return isDimensionStacked(data, targetDim) ? data.getCalculationInfo('stackResultDimension') : targetDim; } function createListFromArray(source, seriesModel, opt) { opt = opt || {}; if (!isSourceInstance(source)) { source = createSourceFromSeriesDataOption(source); } var coordSysName = seriesModel.get('coordinateSystem'); var registeredCoordSys = CoordinateSystemManager.get(coordSysName); var coordSysInfo = getCoordSysInfoBySeries(seriesModel); var coordSysDimDefs; if (coordSysInfo && coordSysInfo.coordSysDims) { coordSysDimDefs = map(coordSysInfo.coordSysDims, function (dim) { var dimInfo = { name: dim }; var axisModel = coordSysInfo.axisMap.get(dim); if (axisModel) { var axisType = axisModel.get('type'); dimInfo.type = getDimensionTypeByAxis(axisType); // dimInfo.stackable = isStackable(axisType); } return dimInfo; }); } if (!coordSysDimDefs) { // Get dimensions from registered coordinate system coordSysDimDefs = registeredCoordSys && (registeredCoordSys.getDimensionsInfo ? registeredCoordSys.getDimensionsInfo() : registeredCoordSys.dimensions.slice()) || ['x', 'y']; } var useEncodeDefaulter = opt.useEncodeDefaulter; var dimInfoList = createDimensions(source, { coordDimensions: coordSysDimDefs, generateCoord: opt.generateCoord, encodeDefaulter: isFunction(useEncodeDefaulter) ? useEncodeDefaulter : useEncodeDefaulter ? curry(makeSeriesEncodeForAxisCoordSys, coordSysDimDefs, seriesModel) : null }); var firstCategoryDimIndex; var hasNameEncode; coordSysInfo && each(dimInfoList, function (dimInfo, dimIndex) { var coordDim = dimInfo.coordDim; var categoryAxisModel = coordSysInfo.categoryAxisMap.get(coordDim); if (categoryAxisModel) { if (firstCategoryDimIndex == null) { firstCategoryDimIndex = dimIndex; } dimInfo.ordinalMeta = categoryAxisModel.getOrdinalMeta(); if (opt.createInvertedIndices) { dimInfo.createInvertedIndices = true; } } if (dimInfo.otherDims.itemName != null) { hasNameEncode = true; } }); if (!hasNameEncode && firstCategoryDimIndex != null) { dimInfoList[firstCategoryDimIndex].otherDims.itemName = 0; } var stackCalculationInfo = enableDataStack(seriesModel, dimInfoList); var list = new List(dimInfoList, seriesModel); list.setCalculationInfo(stackCalculationInfo); var dimValueGetter = firstCategoryDimIndex != null && isNeedCompleteOrdinalData(source) ? function (itemOpt, dimName, dataIndex, dimIndex) { // Use dataIndex as ordinal value in categoryAxis return dimIndex === firstCategoryDimIndex ? dataIndex : this.defaultDimValueGetter(itemOpt, dimName, dataIndex, dimIndex); } : null; list.hasItemOption = false; list.initData(source, null, dimValueGetter); return list; } function isNeedCompleteOrdinalData(source) { if (source.sourceFormat === SOURCE_FORMAT_ORIGINAL) { var sampleItem = firstDataNotNull(source.data || []); return sampleItem != null && !isArray(getDataItemValue(sampleItem)); } } function firstDataNotNull(data) { var i = 0; while (i < data.length && data[i] == null) { i++; } return data[i]; } var Scale = /** @class */ function () { function Scale(setting) { this._setting = setting || {}; this._extent = [Infinity, -Infinity]; } Scale.prototype.getSetting = function (name) { return this._setting[name]; }; /** * Set extent from data */ Scale.prototype.unionExtent = function (other) { var extent = this._extent; other[0] < extent[0] && (extent[0] = other[0]); other[1] > extent[1] && (extent[1] = other[1]); // not setExtent because in log axis it may transformed to power // this.setExtent(extent[0], extent[1]); }; /** * Set extent from data */ Scale.prototype.unionExtentFromData = function (data, dim) { this.unionExtent(data.getApproximateExtent(dim)); }; /** * Get extent * * Extent is always in increase order. */ Scale.prototype.getExtent = function () { return this._extent.slice(); }; /** * Set extent */ Scale.prototype.setExtent = function (start, end) { var thisExtent = this._extent; if (!isNaN(start)) { thisExtent[0] = start; } if (!isNaN(end)) { thisExtent[1] = end; } }; /** * If value is in extent range */ Scale.prototype.isInExtentRange = function (value) { return this._extent[0] <= value && this._extent[1] >= value; }; /** * When axis extent depends on data and no data exists, * axis ticks should not be drawn, which is named 'blank'. */ Scale.prototype.isBlank = function () { return this._isBlank; }; /** * When axis extent depends on data and no data exists, * axis ticks should not be drawn, which is named 'blank'. */ Scale.prototype.setBlank = function (isBlank) { this._isBlank = isBlank; }; return Scale; }(); enableClassManagement(Scale); var OrdinalMeta = /** @class */ function () { function OrdinalMeta(opt) { this.categories = opt.categories || []; this._needCollect = opt.needCollect; this._deduplication = opt.deduplication; } OrdinalMeta.createByAxisModel = function (axisModel) { var option = axisModel.option; var data = option.data; var categories = data && map(data, getName); return new OrdinalMeta({ categories: categories, needCollect: !categories, // deduplication is default in axis. deduplication: option.dedplication !== false }); }; OrdinalMeta.prototype.getOrdinal = function (category) { // @ts-ignore return this._getOrCreateMap().get(category); }; /** * @return The ordinal. If not found, return NaN. */ OrdinalMeta.prototype.parseAndCollect = function (category) { var index; var needCollect = this._needCollect; // The value of category dim can be the index of the given category set. // This feature is only supported when !needCollect, because we should // consider a common case: a value is 2017, which is a number but is // expected to be tread as a category. This case usually happen in dataset, // where it happent to be no need of the index feature. if (typeof category !== 'string' && !needCollect) { return category; } // Optimize for the scenario: // category is ['2012-01-01', '2012-01-02', ...], where the input // data has been ensured not duplicate and is large data. // Notice, if a dataset dimension provide categroies, usually echarts // should remove duplication except user tell echarts dont do that // (set axis.deduplication = false), because echarts do not know whether // the values in the category dimension has duplication (consider the // parallel-aqi example) if (needCollect && !this._deduplication) { index = this.categories.length; this.categories[index] = category; return index; } var map = this._getOrCreateMap(); // @ts-ignore index = map.get(category); if (index == null) { if (needCollect) { index = this.categories.length; this.categories[index] = category; // @ts-ignore map.set(category, index); } else { index = NaN; } } return index; }; // Consider big data, do not create map until needed. OrdinalMeta.prototype._getOrCreateMap = function () { return this._map || (this._map = createHashMap(this.categories)); }; return OrdinalMeta; }(); function getName(obj) { if (isObject(obj) && obj.value != null) { return obj.value; } else { return obj + ''; } } var roundNumber = round; /** * @param extent Both extent[0] and extent[1] should be valid number. * Should be extent[0] < extent[1]. * @param splitNumber splitNumber should be >= 1. */ function intervalScaleNiceTicks(extent, splitNumber, minInterval, maxInterval) { var result = {}; var span = extent[1] - extent[0]; var interval = result.interval = nice(span / splitNumber, true); if (minInterval != null && interval < minInterval) { interval = result.interval = minInterval; } if (maxInterval != null && interval > maxInterval) { interval = result.interval = maxInterval; } // Tow more digital for tick. var precision = result.intervalPrecision = getIntervalPrecision(interval); // Niced extent inside original extent var niceTickExtent = result.niceTickExtent = [roundNumber(Math.ceil(extent[0] / interval) * interval, precision), roundNumber(Math.floor(extent[1] / interval) * interval, precision)]; fixExtent(niceTickExtent, extent); return result; } /** * @return interval precision */ function getIntervalPrecision(interval) { // Tow more digital for tick. return getPrecisionSafe(interval) + 2; } function clamp(niceTickExtent, idx, extent) { niceTickExtent[idx] = Math.max(Math.min(niceTickExtent[idx], extent[1]), extent[0]); } // In some cases (e.g., splitNumber is 1), niceTickExtent may be out of extent. function fixExtent(niceTickExtent, extent) { !isFinite(niceTickExtent[0]) && (niceTickExtent[0] = extent[0]); !isFinite(niceTickExtent[1]) && (niceTickExtent[1] = extent[1]); clamp(niceTickExtent, 0, extent); clamp(niceTickExtent, 1, extent); if (niceTickExtent[0] > niceTickExtent[1]) { niceTickExtent[0] = niceTickExtent[1]; } } function contain$2(val, extent) { return val >= extent[0] && val <= extent[1]; } function normalize$1(val, extent) { if (extent[1] === extent[0]) { return 0.5; } return (val - extent[0]) / (extent[1] - extent[0]); } function scale$2(val, extent) { return val * (extent[1] - extent[0]) + extent[0]; } var OrdinalScale = /** @class */ function (_super) { __extends(OrdinalScale, _super); function OrdinalScale(setting) { var _this = _super.call(this, setting) || this; _this.type = 'ordinal'; var ordinalMeta = _this.getSetting('ordinalMeta'); // Caution: Should not use instanceof, consider ec-extensions using // import approach to get OrdinalMeta class. if (!ordinalMeta) { ordinalMeta = new OrdinalMeta({}); } if (isArray(ordinalMeta)) { ordinalMeta = new OrdinalMeta({ categories: map(ordinalMeta, function (item) { return isObject(item) ? item.value : item; }) }); } _this._ordinalMeta = ordinalMeta; _this._extent = _this.getSetting('extent') || [0, ordinalMeta.categories.length - 1]; return _this; } OrdinalScale.prototype.parse = function (val) { return typeof val === 'string' ? this._ordinalMeta.getOrdinal(val) // val might be float. : Math.round(val); }; OrdinalScale.prototype.contain = function (rank) { rank = this.parse(rank); return contain$2(rank, this._extent) && this._ordinalMeta.categories[rank] != null; }; /** * Normalize given rank or name to linear [0, 1] * @param val raw ordinal number. * @return normalized value in [0, 1]. */ OrdinalScale.prototype.normalize = function (val) { val = this._getTickNumber(this.parse(val)); return normalize$1(val, this._extent); }; /** * @param val normalized value in [0, 1]. * @return raw ordinal number. */ OrdinalScale.prototype.scale = function (val) { val = Math.round(scale$2(val, this._extent)); return this.getRawOrdinalNumber(val); }; OrdinalScale.prototype.getTicks = function () { var ticks = []; var extent = this._extent; var rank = extent[0]; while (rank <= extent[1]) { ticks.push({ value: rank }); rank++; } return ticks; }; OrdinalScale.prototype.getMinorTicks = function (splitNumber) { // Not support. return; }; /** * @see `Ordinal['_ordinalNumbersByTick']` */ OrdinalScale.prototype.setSortInfo = function (info) { if (info == null) { this._ordinalNumbersByTick = this._ticksByOrdinalNumber = null; return; } var infoOrdinalNumbers = info.ordinalNumbers; var ordinalsByTick = this._ordinalNumbersByTick = []; var ticksByOrdinal = this._ticksByOrdinalNumber = []; // Unnecessary support negative tick in `realtimeSort`. var tickNum = 0; var allCategoryLen = this._ordinalMeta.categories.length; for (var len = Math.min(allCategoryLen, infoOrdinalNumbers.length); tickNum < len; ++tickNum) { var ordinalNumber = infoOrdinalNumbers[tickNum]; ordinalsByTick[tickNum] = ordinalNumber; ticksByOrdinal[ordinalNumber] = tickNum; } // Handle that `series.data` only covers part of the `axis.category.data`. var unusedOrdinal = 0; for (; tickNum < allCategoryLen; ++tickNum) { while (ticksByOrdinal[unusedOrdinal] != null) { unusedOrdinal++; } ordinalsByTick.push(unusedOrdinal); ticksByOrdinal[unusedOrdinal] = tickNum; } }; OrdinalScale.prototype._getTickNumber = function (ordinal) { var ticksByOrdinalNumber = this._ticksByOrdinalNumber; // also support ordinal out of range of `ordinalMeta.categories.length`, // where ordinal numbers are used as tick value directly. return ticksByOrdinalNumber && ordinal >= 0 && ordinal < ticksByOrdinalNumber.length ? ticksByOrdinalNumber[ordinal] : ordinal; }; /** * @usage * ```js * const ordinalNumber = ordinalScale.getRawOrdinalNumber(tickVal); * * // case0 * const rawOrdinalValue = axisModel.getCategories()[ordinalNumber]; * // case1 * const rawOrdinalValue = this._ordinalMeta.categories[ordinalNumber]; * // case2 * const coord = axis.dataToCoord(ordinalNumber); * ``` * * @param {OrdinalNumber} tickNumber index of display */ OrdinalScale.prototype.getRawOrdinalNumber = function (tickNumber) { var ordinalNumbersByTick = this._ordinalNumbersByTick; // tickNumber may be out of range, e.g., when axis max is larger than `ordinalMeta.categories.length`., // where ordinal numbers are used as tick value directly. return ordinalNumbersByTick && tickNumber >= 0 && tickNumber < ordinalNumbersByTick.length ? ordinalNumbersByTick[tickNumber] : tickNumber; }; /** * Get item on tick */ OrdinalScale.prototype.getLabel = function (tick) { if (!this.isBlank()) { var ordinalNumber = this.getRawOrdinalNumber(tick.value); var cateogry = this._ordinalMeta.categories[ordinalNumber]; // Note that if no data, ordinalMeta.categories is an empty array. // Return empty if it's not exist. return cateogry == null ? '' : cateogry + ''; } }; OrdinalScale.prototype.count = function () { return this._extent[1] - this._extent[0] + 1; }; OrdinalScale.prototype.unionExtentFromData = function (data, dim) { this.unionExtent(data.getApproximateExtent(dim)); }; /** * @override * If value is in extent range */ OrdinalScale.prototype.isInExtentRange = function (value) { value = this._getTickNumber(value); return this._extent[0] <= value && this._extent[1] >= value; }; OrdinalScale.prototype.getOrdinalMeta = function () { return this._ordinalMeta; }; OrdinalScale.prototype.niceTicks = function () {}; OrdinalScale.prototype.niceExtent = function () {}; OrdinalScale.type = 'ordinal'; return OrdinalScale; }(Scale); Scale.registerClass(OrdinalScale); var roundNumber$1 = round; var IntervalScale = /** @class */ function (_super) { __extends(IntervalScale, _super); function IntervalScale() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'interval'; // Step is calculated in adjustExtent. _this._interval = 0; _this._intervalPrecision = 2; return _this; } IntervalScale.prototype.parse = function (val) { return val; }; IntervalScale.prototype.contain = function (val) { return contain$2(val, this._extent); }; IntervalScale.prototype.normalize = function (val) { return normalize$1(val, this._extent); }; IntervalScale.prototype.scale = function (val) { return scale$2(val, this._extent); }; IntervalScale.prototype.setExtent = function (start, end) { var thisExtent = this._extent; // start,end may be a Number like '25',so... if (!isNaN(start)) { thisExtent[0] = parseFloat(start); } if (!isNaN(end)) { thisExtent[1] = parseFloat(end); } }; IntervalScale.prototype.unionExtent = function (other) { var extent = this._extent; other[0] < extent[0] && (extent[0] = other[0]); other[1] > extent[1] && (extent[1] = other[1]); // unionExtent may called by it's sub classes this.setExtent(extent[0], extent[1]); }; IntervalScale.prototype.getInterval = function () { return this._interval; }; IntervalScale.prototype.setInterval = function (interval) { this._interval = interval; // Dropped auto calculated niceExtent and use user setted extent // We assume user wan't to set both interval, min, max to get a better result this._niceExtent = this._extent.slice(); this._intervalPrecision = getIntervalPrecision(interval); }; /** * @param expandToNicedExtent Whether expand the ticks to niced extent. */ IntervalScale.prototype.getTicks = function (expandToNicedExtent) { var interval = this._interval; var extent = this._extent; var niceTickExtent = this._niceExtent; var intervalPrecision = this._intervalPrecision; var ticks = []; // If interval is 0, return []; if (!interval) { return ticks; } // Consider this case: using dataZoom toolbox, zoom and zoom. var safeLimit = 10000; if (extent[0] < niceTickExtent[0]) { if (expandToNicedExtent) { ticks.push({ value: roundNumber$1(niceTickExtent[0] - interval, intervalPrecision) }); } else { ticks.push({ value: extent[0] }); } } var tick = niceTickExtent[0]; while (tick <= niceTickExtent[1]) { ticks.push({ value: tick }); // Avoid rounding error tick = roundNumber$1(tick + interval, intervalPrecision); if (tick === ticks[ticks.length - 1].value) { // Consider out of safe float point, e.g., // -3711126.9907707 + 2e-10 === -3711126.9907707 break; } if (ticks.length > safeLimit) { return []; } } // Consider this case: the last item of ticks is smaller // than niceTickExtent[1] and niceTickExtent[1] === extent[1]. var lastNiceTick = ticks.length ? ticks[ticks.length - 1].value : niceTickExtent[1]; if (extent[1] > lastNiceTick) { if (expandToNicedExtent) { ticks.push({ value: roundNumber$1(lastNiceTick + interval, intervalPrecision) }); } else { ticks.push({ value: extent[1] }); } } return ticks; }; IntervalScale.prototype.getMinorTicks = function (splitNumber) { var ticks = this.getTicks(true); var minorTicks = []; var extent = this.getExtent(); for (var i = 1; i < ticks.length; i++) { var nextTick = ticks[i]; var prevTick = ticks[i - 1]; var count = 0; var minorTicksGroup = []; var interval = nextTick.value - prevTick.value; var minorInterval = interval / splitNumber; while (count < splitNumber - 1) { var minorTick = roundNumber$1(prevTick.value + (count + 1) * minorInterval); // For the first and last interval. The count may be less than splitNumber. if (minorTick > extent[0] && minorTick < extent[1]) { minorTicksGroup.push(minorTick); } count++; } minorTicks.push(minorTicksGroup); } return minorTicks; }; /** * @param opt.precision If 'auto', use nice presision. * @param opt.pad returns 1.50 but not 1.5 if precision is 2. */ IntervalScale.prototype.getLabel = function (data, opt) { if (data == null) { return ''; } var precision = opt && opt.precision; if (precision == null) { precision = getPrecisionSafe(data.value) || 0; } else if (precision === 'auto') { // Should be more precise then tick. precision = this._intervalPrecision; } // (1) If `precision` is set, 12.005 should be display as '12.00500'. // (2) Use roundNumber (toFixed) to avoid scientific notation like '3.5e-7'. var dataNum = roundNumber$1(data.value, precision, true); return addCommas(dataNum); }; /** * @param splitNumber By default `5`. */ IntervalScale.prototype.niceTicks = function (splitNumber, minInterval, maxInterval) { splitNumber = splitNumber || 5; var extent = this._extent; var span = extent[1] - extent[0]; if (!isFinite(span)) { return; } // User may set axis min 0 and data are all negative // FIXME If it needs to reverse ? if (span < 0) { span = -span; extent.reverse(); } var result = intervalScaleNiceTicks(extent, splitNumber, minInterval, maxInterval); this._intervalPrecision = result.intervalPrecision; this._interval = result.interval; this._niceExtent = result.niceTickExtent; }; IntervalScale.prototype.niceExtent = function (opt) { var extent = this._extent; // If extent start and end are same, expand them if (extent[0] === extent[1]) { if (extent[0] !== 0) { // Expand extent var expandSize = extent[0]; // In the fowllowing case // Axis has been fixed max 100 // Plus data are all 100 and axis extent are [100, 100]. // Extend to the both side will cause expanded max is larger than fixed max. // So only expand to the smaller side. if (!opt.fixMax) { extent[1] += expandSize / 2; extent[0] -= expandSize / 2; } else { extent[0] -= expandSize / 2; } } else { extent[1] = 1; } } var span = extent[1] - extent[0]; // If there are no data and extent are [Infinity, -Infinity] if (!isFinite(span)) { extent[0] = 0; extent[1] = 1; } this.niceTicks(opt.splitNumber, opt.minInterval, opt.maxInterval); // let extent = this._extent; var interval = this._interval; if (!opt.fixMin) { extent[0] = roundNumber$1(Math.floor(extent[0] / interval) * interval); } if (!opt.fixMax) { extent[1] = roundNumber$1(Math.ceil(extent[1] / interval) * interval); } }; IntervalScale.type = 'interval'; return IntervalScale; }(Scale); Scale.registerClass(IntervalScale); var STACK_PREFIX = '__ec_stack_'; var LARGE_BAR_MIN_WIDTH = 0.5; var LargeArr = typeof Float32Array !== 'undefined' ? Float32Array : Array; function getSeriesStackId(seriesModel) { return seriesModel.get('stack') || STACK_PREFIX + seriesModel.seriesIndex; } function getAxisKey(axis) { return axis.dim + axis.index; } /** * @return {Object} {width, offset, offsetCenter} If axis.type is not 'category', return undefined. */ function getLayoutOnAxis(opt) { var params = []; var baseAxis = opt.axis; var axisKey = 'axis0'; if (baseAxis.type !== 'category') { return; } var bandWidth = baseAxis.getBandWidth(); for (var i = 0; i < opt.count || 0; i++) { params.push(defaults({ bandWidth: bandWidth, axisKey: axisKey, stackId: STACK_PREFIX + i }, opt)); } var widthAndOffsets = doCalBarWidthAndOffset(params); var result = []; for (var i = 0; i < opt.count; i++) { var item = widthAndOffsets[axisKey][STACK_PREFIX + i]; item.offsetCenter = item.offset + item.width / 2; result.push(item); } return result; } function prepareLayoutBarSeries(seriesType, ecModel) { var seriesModels = []; ecModel.eachSeriesByType(seriesType, function (seriesModel) { // Check series coordinate, do layout for cartesian2d only if (isOnCartesian(seriesModel) && !isInLargeMode(seriesModel)) { seriesModels.push(seriesModel); } }); return seriesModels; } /** * Map from (baseAxis.dim + '_' + baseAxis.index) to min gap of two adjacent * values. * This works for time axes, value axes, and log axes. * For a single time axis, return value is in the form like * {'x_0': [1000000]}. * The value of 1000000 is in milliseconds. */ function getValueAxesMinGaps(barSeries) { /** * Map from axis.index to values. * For a single time axis, axisValues is in the form like * {'x_0': [1495555200000, 1495641600000, 1495728000000]}. * Items in axisValues[x], e.g. 1495555200000, are time values of all * series. */ var axisValues = {}; each(barSeries, function (seriesModel) { var cartesian = seriesModel.coordinateSystem; var baseAxis = cartesian.getBaseAxis(); if (baseAxis.type !== 'time' && baseAxis.type !== 'value') { return; } var data = seriesModel.getData(); var key = baseAxis.dim + '_' + baseAxis.index; var dim = data.mapDimension(baseAxis.dim); for (var i = 0, cnt = data.count(); i < cnt; ++i) { var value = data.get(dim, i); if (!axisValues[key]) { // No previous data for the axis axisValues[key] = [value]; } else { // No value in previous series axisValues[key].push(value); } // Ignore duplicated time values in the same axis } }); var axisMinGaps = {}; for (var key in axisValues) { if (axisValues.hasOwnProperty(key)) { var valuesInAxis = axisValues[key]; if (valuesInAxis) { // Sort axis values into ascending order to calculate gaps valuesInAxis.sort(function (a, b) { return a - b; }); var min = null; for (var j = 1; j < valuesInAxis.length; ++j) { var delta = valuesInAxis[j] - valuesInAxis[j - 1]; if (delta > 0) { // Ignore 0 delta because they are of the same axis value min = min === null ? delta : Math.min(min, delta); } } // Set to null if only have one data axisMinGaps[key] = min; } } } return axisMinGaps; } function makeColumnLayout(barSeries) { var axisMinGaps = getValueAxesMinGaps(barSeries); var seriesInfoList = []; each(barSeries, function (seriesModel) { var cartesian = seriesModel.coordinateSystem; var baseAxis = cartesian.getBaseAxis(); var axisExtent = baseAxis.getExtent(); var bandWidth; if (baseAxis.type === 'category') { bandWidth = baseAxis.getBandWidth(); } else if (baseAxis.type === 'value' || baseAxis.type === 'time') { var key = baseAxis.dim + '_' + baseAxis.index; var minGap = axisMinGaps[key]; var extentSpan = Math.abs(axisExtent[1] - axisExtent[0]); var scale = baseAxis.scale.getExtent(); var scaleSpan = Math.abs(scale[1] - scale[0]); bandWidth = minGap ? extentSpan / scaleSpan * minGap : extentSpan; // When there is only one data value } else { var data = seriesModel.getData(); bandWidth = Math.abs(axisExtent[1] - axisExtent[0]) / data.count(); } var barWidth = parsePercent$1(seriesModel.get('barWidth'), bandWidth); var barMaxWidth = parsePercent$1(seriesModel.get('barMaxWidth'), bandWidth); var barMinWidth = parsePercent$1( // barMinWidth by default is 1 in cartesian. Because in value axis, // the auto-calculated bar width might be less than 1. seriesModel.get('barMinWidth') || 1, bandWidth); var barGap = seriesModel.get('barGap'); var barCategoryGap = seriesModel.get('barCategoryGap'); seriesInfoList.push({ bandWidth: bandWidth, barWidth: barWidth, barMaxWidth: barMaxWidth, barMinWidth: barMinWidth, barGap: barGap, barCategoryGap: barCategoryGap, axisKey: getAxisKey(baseAxis), stackId: getSeriesStackId(seriesModel) }); }); return doCalBarWidthAndOffset(seriesInfoList); } function doCalBarWidthAndOffset(seriesInfoList) { // Columns info on each category axis. Key is cartesian name var columnsMap = {}; each(seriesInfoList, function (seriesInfo, idx) { var axisKey = seriesInfo.axisKey; var bandWidth = seriesInfo.bandWidth; var columnsOnAxis = columnsMap[axisKey] || { bandWidth: bandWidth, remainedWidth: bandWidth, autoWidthCount: 0, categoryGap: null, gap: '20%', stacks: {} }; var stacks = columnsOnAxis.stacks; columnsMap[axisKey] = columnsOnAxis; var stackId = seriesInfo.stackId; if (!stacks[stackId]) { columnsOnAxis.autoWidthCount++; } stacks[stackId] = stacks[stackId] || { width: 0, maxWidth: 0 }; // Caution: In a single coordinate system, these barGrid attributes // will be shared by series. Consider that they have default values, // only the attributes set on the last series will work. // Do not change this fact unless there will be a break change. var barWidth = seriesInfo.barWidth; if (barWidth && !stacks[stackId].width) { // See #6312, do not restrict width. stacks[stackId].width = barWidth; barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth); columnsOnAxis.remainedWidth -= barWidth; } var barMaxWidth = seriesInfo.barMaxWidth; barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth); var barMinWidth = seriesInfo.barMinWidth; barMinWidth && (stacks[stackId].minWidth = barMinWidth); var barGap = seriesInfo.barGap; barGap != null && (columnsOnAxis.gap = barGap); var barCategoryGap = seriesInfo.barCategoryGap; barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap); }); var result = {}; each(columnsMap, function (columnsOnAxis, coordSysName) { result[coordSysName] = {}; var stacks = columnsOnAxis.stacks; var bandWidth = columnsOnAxis.bandWidth; var categoryGapPercent = columnsOnAxis.categoryGap; if (categoryGapPercent == null) { var columnCount = keys(stacks).length; // More columns in one group // the spaces between group is smaller. Or the column will be too thin. categoryGapPercent = Math.max(35 - columnCount * 4, 15) + '%'; } var categoryGap = parsePercent$1(categoryGapPercent, bandWidth); var barGapPercent = parsePercent$1(columnsOnAxis.gap, 1); var remainedWidth = columnsOnAxis.remainedWidth; var autoWidthCount = columnsOnAxis.autoWidthCount; var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent); autoWidth = Math.max(autoWidth, 0); // Find if any auto calculated bar exceeded maxBarWidth each(stacks, function (column) { var maxWidth = column.maxWidth; var minWidth = column.minWidth; if (!column.width) { var finalWidth = autoWidth; if (maxWidth && maxWidth < finalWidth) { finalWidth = Math.min(maxWidth, remainedWidth); } // `minWidth` has higher priority. `minWidth` decide that wheter the // bar is able to be visible. So `minWidth` should not be restricted // by `maxWidth` or `remainedWidth` (which is from `bandWidth`). In // the extreme cases for `value` axis, bars are allowed to overlap // with each other if `minWidth` specified. if (minWidth && minWidth > finalWidth) { finalWidth = minWidth; } if (finalWidth !== autoWidth) { column.width = finalWidth; remainedWidth -= finalWidth + barGapPercent * finalWidth; autoWidthCount--; } } else { // `barMinWidth/barMaxWidth` has higher priority than `barWidth`, as // CSS does. Becuase barWidth can be a percent value, where // `barMaxWidth` can be used to restrict the final width. var finalWidth = column.width; if (maxWidth) { finalWidth = Math.min(finalWidth, maxWidth); } // `minWidth` has higher priority, as described above if (minWidth) { finalWidth = Math.max(finalWidth, minWidth); } column.width = finalWidth; remainedWidth -= finalWidth + barGapPercent * finalWidth; autoWidthCount--; } }); // Recalculate width again autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent); autoWidth = Math.max(autoWidth, 0); var widthSum = 0; var lastColumn; each(stacks, function (column, idx) { if (!column.width) { column.width = autoWidth; } lastColumn = column; widthSum += column.width * (1 + barGapPercent); }); if (lastColumn) { widthSum -= lastColumn.width * barGapPercent; } var offset = -widthSum / 2; each(stacks, function (column, stackId) { result[coordSysName][stackId] = result[coordSysName][stackId] || { bandWidth: bandWidth, offset: offset, width: column.width }; offset += column.width * (1 + barGapPercent); }); }); return result; } function retrieveColumnLayout(barWidthAndOffset, axis, seriesModel) { if (barWidthAndOffset && axis) { var result = barWidthAndOffset[getAxisKey(axis)]; if (result != null && seriesModel != null) { return result[getSeriesStackId(seriesModel)]; } return result; } } function layout(seriesType, ecModel) { var seriesModels = prepareLayoutBarSeries(seriesType, ecModel); var barWidthAndOffset = makeColumnLayout(seriesModels); var lastStackCoords = {}; each(seriesModels, function (seriesModel) { var data = seriesModel.getData(); var cartesian = seriesModel.coordinateSystem; var baseAxis = cartesian.getBaseAxis(); var stackId = getSeriesStackId(seriesModel); var columnLayoutInfo = barWidthAndOffset[getAxisKey(baseAxis)][stackId]; var columnOffset = columnLayoutInfo.offset; var columnWidth = columnLayoutInfo.width; var valueAxis = cartesian.getOtherAxis(baseAxis); var barMinHeight = seriesModel.get('barMinHeight') || 0; lastStackCoords[stackId] = lastStackCoords[stackId] || []; data.setLayout({ bandWidth: columnLayoutInfo.bandWidth, offset: columnOffset, size: columnWidth }); var valueDim = data.mapDimension(valueAxis.dim); var baseDim = data.mapDimension(baseAxis.dim); var stacked = isDimensionStacked(data, valueDim /*, baseDim*/ ); var isValueAxisH = valueAxis.isHorizontal(); var valueAxisStart = getValueAxisStart(baseAxis, valueAxis); for (var idx = 0, len = data.count(); idx < len; idx++) { var value = data.get(valueDim, idx); var baseValue = data.get(baseDim, idx); var sign = value >= 0 ? 'p' : 'n'; var baseCoord = valueAxisStart; // Because of the barMinHeight, we can not use the value in // stackResultDimension directly. if (stacked) { // Only ordinal axis can be stacked. if (!lastStackCoords[stackId][baseValue]) { lastStackCoords[stackId][baseValue] = { p: valueAxisStart, n: valueAxisStart // Negative stack }; } // Should also consider #4243 baseCoord = lastStackCoords[stackId][baseValue][sign]; } var x = void 0; var y = void 0; var width = void 0; var height = void 0; if (isValueAxisH) { var coord = cartesian.dataToPoint([value, baseValue]); x = baseCoord; y = coord[1] + columnOffset; width = coord[0] - valueAxisStart; height = columnWidth; if (Math.abs(width) < barMinHeight) { width = (width < 0 ? -1 : 1) * barMinHeight; } // Ignore stack from NaN value if (!isNaN(width)) { stacked && (lastStackCoords[stackId][baseValue][sign] += width); } } else { var coord = cartesian.dataToPoint([baseValue, value]); x = coord[0] + columnOffset; y = baseCoord; width = columnWidth; height = coord[1] - valueAxisStart; if (Math.abs(height) < barMinHeight) { // Include zero to has a positive bar height = (height <= 0 ? -1 : 1) * barMinHeight; } // Ignore stack from NaN value if (!isNaN(height)) { stacked && (lastStackCoords[stackId][baseValue][sign] += height); } } data.setItemLayout(idx, { x: x, y: y, width: width, height: height }); } }); } // TODO: Do not support stack in large mode yet. var largeLayout = { seriesType: 'bar', plan: createRenderPlanner(), reset: function (seriesModel) { if (!isOnCartesian(seriesModel) || !isInLargeMode(seriesModel)) { return; } var data = seriesModel.getData(); var cartesian = seriesModel.coordinateSystem; var coordLayout = cartesian.master.getRect(); var baseAxis = cartesian.getBaseAxis(); var valueAxis = cartesian.getOtherAxis(baseAxis); var valueDim = data.mapDimension(valueAxis.dim); var baseDim = data.mapDimension(baseAxis.dim); var valueAxisHorizontal = valueAxis.isHorizontal(); var valueDimIdx = valueAxisHorizontal ? 0 : 1; var barWidth = retrieveColumnLayout(makeColumnLayout([seriesModel]), baseAxis, seriesModel).width; if (!(barWidth > LARGE_BAR_MIN_WIDTH)) { // jshint ignore:line barWidth = LARGE_BAR_MIN_WIDTH; } return { progress: function (params, data) { var count = params.count; var largePoints = new LargeArr(count * 2); var largeBackgroundPoints = new LargeArr(count * 2); var largeDataIndices = new LargeArr(count); var dataIndex; var coord = []; var valuePair = []; var pointsOffset = 0; var idxOffset = 0; while ((dataIndex = params.next()) != null) { valuePair[valueDimIdx] = data.get(valueDim, dataIndex); valuePair[1 - valueDimIdx] = data.get(baseDim, dataIndex); coord = cartesian.dataToPoint(valuePair, null, coord); // Data index might not be in order, depends on `progressiveChunkMode`. largeBackgroundPoints[pointsOffset] = valueAxisHorizontal ? coordLayout.x + coordLayout.width : coord[0]; largePoints[pointsOffset++] = coord[0]; largeBackgroundPoints[pointsOffset] = valueAxisHorizontal ? coord[1] : coordLayout.y + coordLayout.height; largePoints[pointsOffset++] = coord[1]; largeDataIndices[idxOffset++] = dataIndex; } data.setLayout({ largePoints: largePoints, largeDataIndices: largeDataIndices, largeBackgroundPoints: largeBackgroundPoints, barWidth: barWidth, valueAxisStart: getValueAxisStart(baseAxis, valueAxis), backgroundStart: valueAxisHorizontal ? coordLayout.x : coordLayout.y, valueAxisHorizontal: valueAxisHorizontal }); } }; } }; function isOnCartesian(seriesModel) { return seriesModel.coordinateSystem && seriesModel.coordinateSystem.type === 'cartesian2d'; } function isInLargeMode(seriesModel) { return seriesModel.pipelineContext && seriesModel.pipelineContext.large; } // See cases in `test/bar-start.html` and `#7412`, `#8747`. function getValueAxisStart(baseAxis, valueAxis, stacked) { return valueAxis.toGlobalCoord(valueAxis.dataToCoord(valueAxis.type === 'log' ? 1 : 0)); } var bisect = function (a, x, lo, hi) { while (lo < hi) { var mid = lo + hi >>> 1; if (a[mid][1] < x) { lo = mid + 1; } else { hi = mid; } } return lo; }; var TimeScale = /** @class */ function (_super) { __extends(TimeScale, _super); function TimeScale(settings) { var _this = _super.call(this, settings) || this; _this.type = 'time'; return _this; } /** * Get label is mainly for other components like dataZoom, tooltip. */ TimeScale.prototype.getLabel = function (tick) { var useUTC = this.getSetting('useUTC'); return format(tick.value, fullLeveledFormatter[getDefaultFormatPrecisionOfInterval(getPrimaryTimeUnit(this._minLevelUnit))] || fullLeveledFormatter.second, useUTC, this.getSetting('locale')); }; TimeScale.prototype.getFormattedLabel = function (tick, idx, labelFormatter) { var isUTC = this.getSetting('useUTC'); var lang = this.getSetting('locale'); return leveledFormat(tick, idx, labelFormatter, lang, isUTC); }; /** * @override * @param expandToNicedExtent Whether expand the ticks to niced extent. */ TimeScale.prototype.getTicks = function (expandToNicedExtent) { var interval = this._interval; var extent = this._extent; var ticks = []; // If interval is 0, return []; if (!interval) { return ticks; } ticks.push({ value: extent[0], level: 0 }); var useUTC = this.getSetting('useUTC'); var innerTicks = getIntervalTicks(this._minLevelUnit, this._approxInterval, useUTC, extent); ticks = ticks.concat(innerTicks); ticks.push({ value: extent[1], level: 0 }); return ticks; }; TimeScale.prototype.niceExtent = function (opt) { var extent = this._extent; // If extent start and end are same, expand them if (extent[0] === extent[1]) { // Expand extent extent[0] -= ONE_DAY; extent[1] += ONE_DAY; } // If there are no data and extent are [Infinity, -Infinity] if (extent[1] === -Infinity && extent[0] === Infinity) { var d = new Date(); extent[1] = +new Date(d.getFullYear(), d.getMonth(), d.getDate()); extent[0] = extent[1] - ONE_DAY; } this.niceTicks(opt.splitNumber, opt.minInterval, opt.maxInterval); }; TimeScale.prototype.niceTicks = function (approxTickNum, minInterval, maxInterval) { approxTickNum = approxTickNum || 10; var extent = this._extent; var span = extent[1] - extent[0]; this._approxInterval = span / approxTickNum; if (minInterval != null && this._approxInterval < minInterval) { this._approxInterval = minInterval; } if (maxInterval != null && this._approxInterval > maxInterval) { this._approxInterval = maxInterval; } var scaleIntervalsLen = scaleIntervals.length; var idx = Math.min(bisect(scaleIntervals, this._approxInterval, 0, scaleIntervalsLen), scaleIntervalsLen - 1); // Interval that can be used to calculate ticks this._interval = scaleIntervals[idx][1]; // Min level used when picking ticks from top down. // We check one more level to avoid the ticks are to sparse in some case. this._minLevelUnit = scaleIntervals[Math.max(idx - 1, 0)][0]; }; TimeScale.prototype.parse = function (val) { // val might be float. return typeof val === 'number' ? val : +parseDate(val); }; TimeScale.prototype.contain = function (val) { return contain$2(this.parse(val), this._extent); }; TimeScale.prototype.normalize = function (val) { return normalize$1(this.parse(val), this._extent); }; TimeScale.prototype.scale = function (val) { return scale$2(val, this._extent); }; TimeScale.type = 'time'; return TimeScale; }(IntervalScale); /** * This implementation was originally copied from "d3.js" * * with some modifications made for this program. * See the license statement at the head of this file. */ var scaleIntervals = [// Format interval ['second', ONE_SECOND], ['minute', ONE_MINUTE], ['hour', ONE_HOUR], ['quarter-day', ONE_HOUR * 6], ['half-day', ONE_HOUR * 12], ['day', ONE_DAY * 1.2], ['half-week', ONE_DAY * 3.5], ['week', ONE_DAY * 7], ['month', ONE_DAY * 31], ['quarter', ONE_DAY * 95], ['half-year', ONE_YEAR / 2], ['year', ONE_YEAR] // 1Y ]; function isUnitValueSame(unit, valueA, valueB, isUTC) { var dateA = parseDate(valueA); var dateB = parseDate(valueB); var isSame = function (unit) { return getUnitValue(dateA, unit, isUTC) === getUnitValue(dateB, unit, isUTC); }; var isSameYear = function () { return isSame('year'); }; // const isSameHalfYear = () => isSameYear() && isSame('half-year'); // const isSameQuater = () => isSameYear() && isSame('quarter'); var isSameMonth = function () { return isSameYear() && isSame('month'); }; var isSameDay = function () { return isSameMonth() && isSame('day'); }; // const isSameHalfDay = () => isSameDay() && isSame('half-day'); var isSameHour = function () { return isSameDay() && isSame('hour'); }; var isSameMinute = function () { return isSameHour() && isSame('minute'); }; var isSameSecond = function () { return isSameMinute() && isSame('second'); }; var isSameMilliSecond = function () { return isSameSecond() && isSame('millisecond'); }; switch (unit) { case 'year': return isSameYear(); case 'month': return isSameMonth(); case 'day': return isSameDay(); case 'hour': return isSameHour(); case 'minute': return isSameMinute(); case 'second': return isSameSecond(); case 'millisecond': return isSameMilliSecond(); } } // const primaryUnitGetters = { // year: fullYearGetterName(), // month: monthGetterName(), // day: dateGetterName(), // hour: hoursGetterName(), // minute: minutesGetterName(), // second: secondsGetterName(), // millisecond: millisecondsGetterName() // }; // const primaryUnitUTCGetters = { // year: fullYearGetterName(true), // month: monthGetterName(true), // day: dateGetterName(true), // hour: hoursGetterName(true), // minute: minutesGetterName(true), // second: secondsGetterName(true), // millisecond: millisecondsGetterName(true) // }; // function moveTick(date: Date, unitName: TimeUnit, step: number, isUTC: boolean) { // step = step || 1; // switch (getPrimaryTimeUnit(unitName)) { // case 'year': // date[fullYearSetterName(isUTC)](date[fullYearGetterName(isUTC)]() + step); // break; // case 'month': // date[monthSetterName(isUTC)](date[monthGetterName(isUTC)]() + step); // break; // case 'day': // date[dateSetterName(isUTC)](date[dateGetterName(isUTC)]() + step); // break; // case 'hour': // date[hoursSetterName(isUTC)](date[hoursGetterName(isUTC)]() + step); // break; // case 'minute': // date[minutesSetterName(isUTC)](date[minutesGetterName(isUTC)]() + step); // break; // case 'second': // date[secondsSetterName(isUTC)](date[secondsGetterName(isUTC)]() + step); // break; // case 'millisecond': // date[millisecondsSetterName(isUTC)](date[millisecondsGetterName(isUTC)]() + step); // break; // } // return date.getTime(); // } // const DATE_INTERVALS = [[8, 7.5], [4, 3.5], [2, 1.5]]; // const MONTH_INTERVALS = [[6, 5.5], [3, 2.5], [2, 1.5]]; // const MINUTES_SECONDS_INTERVALS = [[30, 30], [20, 20], [15, 15], [10, 10], [5, 5], [2, 2]]; function getDateInterval(approxInterval, daysInMonth) { approxInterval /= ONE_DAY; return approxInterval > 16 ? 16 // Math.floor(daysInMonth / 2) + 1 // In this case we only want one tick betwen two month. : approxInterval > 7.5 ? 7 // TODO week 7 or day 8? : approxInterval > 3.5 ? 4 : approxInterval > 1.5 ? 2 : 1; } function getMonthInterval(approxInterval) { var APPROX_ONE_MONTH = 30 * ONE_DAY; approxInterval /= APPROX_ONE_MONTH; return approxInterval > 6 ? 6 : approxInterval > 3 ? 3 : approxInterval > 2 ? 2 : 1; } function getHourInterval(approxInterval) { approxInterval /= ONE_HOUR; return approxInterval > 12 ? 12 : approxInterval > 6 ? 6 : approxInterval > 3.5 ? 4 : approxInterval > 2 ? 2 : 1; } function getMinutesAndSecondsInterval(approxInterval, isMinutes) { approxInterval /= isMinutes ? ONE_MINUTE : ONE_SECOND; return approxInterval > 30 ? 30 : approxInterval > 20 ? 20 : approxInterval > 15 ? 15 : approxInterval > 10 ? 10 : approxInterval > 5 ? 5 : approxInterval > 2 ? 2 : 1; } function getMillisecondsInterval(approxInterval) { return nice(approxInterval, true); } function getFirstTimestampOfUnit(date, unitName, isUTC) { var outDate = new Date(date); switch (getPrimaryTimeUnit(unitName)) { case 'year': case 'month': outDate[monthSetterName(isUTC)](0); case 'day': outDate[dateSetterName(isUTC)](1); case 'hour': outDate[hoursSetterName(isUTC)](0); case 'minute': outDate[minutesSetterName(isUTC)](0); case 'second': outDate[secondsSetterName(isUTC)](0); outDate[millisecondsSetterName(isUTC)](0); } return outDate.getTime(); } function getIntervalTicks(bottomUnitName, approxInterval, isUTC, extent) { var safeLimit = 10000; var unitNames = timeUnits; var iter = 0; function addTicksInSpan(interval, minTimestamp, maxTimestamp, getMethodName, setMethodName, isDate, out) { var date = new Date(minTimestamp); var dateTime = minTimestamp; var d = date[getMethodName](); // if (isDate) { // d -= 1; // Starts with 0; PENDING // } while (dateTime < maxTimestamp && dateTime <= extent[1]) { out.push({ value: dateTime }); d += interval; date[setMethodName](d); dateTime = date.getTime(); } // This extra tick is for calcuating ticks of next level. Will not been added to the final result out.push({ value: dateTime, notAdd: true }); } function addLevelTicks(unitName, lastLevelTicks, levelTicks) { var newAddedTicks = []; var isFirstLevel = !lastLevelTicks.length; if (isUnitValueSame(getPrimaryTimeUnit(unitName), extent[0], extent[1], isUTC)) { return; } if (isFirstLevel) { lastLevelTicks = [{ // TODO Optimize. Not include so may ticks. value: getFirstTimestampOfUnit(new Date(extent[0]), unitName, isUTC) }, { value: extent[1] }]; } for (var i = 0; i < lastLevelTicks.length - 1; i++) { var startTick = lastLevelTicks[i].value; var endTick = lastLevelTicks[i + 1].value; if (startTick === endTick) { continue; } var interval = void 0; var getterName = void 0; var setterName = void 0; var isDate = false; switch (unitName) { case 'year': interval = Math.max(1, Math.round(approxInterval / ONE_DAY / 365)); getterName = fullYearGetterName(isUTC); setterName = fullYearSetterName(isUTC); break; case 'half-year': case 'quarter': case 'month': interval = getMonthInterval(approxInterval); getterName = monthGetterName(isUTC); setterName = monthSetterName(isUTC); break; case 'week': // PENDING If week is added. Ignore day. case 'half-week': case 'day': interval = getDateInterval(approxInterval); // Use 32 days and let interval been 16 getterName = dateGetterName(isUTC); setterName = dateSetterName(isUTC); isDate = true; break; case 'half-day': case 'quarter-day': case 'hour': interval = getHourInterval(approxInterval); getterName = hoursGetterName(isUTC); setterName = hoursSetterName(isUTC); break; case 'minute': interval = getMinutesAndSecondsInterval(approxInterval, true); getterName = minutesGetterName(isUTC); setterName = minutesSetterName(isUTC); break; case 'second': interval = getMinutesAndSecondsInterval(approxInterval, false); getterName = secondsGetterName(isUTC); setterName = secondsSetterName(isUTC); break; case 'millisecond': interval = getMillisecondsInterval(approxInterval); getterName = millisecondsGetterName(isUTC); setterName = millisecondsSetterName(isUTC); break; } addTicksInSpan(interval, startTick, endTick, getterName, setterName, isDate, newAddedTicks); if (unitName === 'year' && levelTicks.length > 1 && i === 0) { // Add nearest years to the left extent. levelTicks.unshift({ value: levelTicks[0].value - interval }); } } for (var i = 0; i < newAddedTicks.length; i++) { levelTicks.push(newAddedTicks[i]); } // newAddedTicks.length && console.log(unitName, newAddedTicks); return newAddedTicks; } var levelsTicks = []; var currentLevelTicks = []; var tickCount = 0; var lastLevelTickCount = 0; for (var i = 0; i < unitNames.length && iter++ < safeLimit; ++i) { var primaryTimeUnit = getPrimaryTimeUnit(unitNames[i]); if (!isPrimaryTimeUnit(unitNames[i])) { // TODO continue; } addLevelTicks(unitNames[i], levelsTicks[levelsTicks.length - 1] || [], currentLevelTicks); var nextPrimaryTimeUnit = unitNames[i + 1] ? getPrimaryTimeUnit(unitNames[i + 1]) : null; if (primaryTimeUnit !== nextPrimaryTimeUnit) { if (currentLevelTicks.length) { lastLevelTickCount = tickCount; // Remove the duplicate so the tick count can be precisely. currentLevelTicks.sort(function (a, b) { return a.value - b.value; }); var levelTicksRemoveDuplicated = []; for (var i_1 = 0; i_1 < currentLevelTicks.length; ++i_1) { var tickValue = currentLevelTicks[i_1].value; if (i_1 === 0 || currentLevelTicks[i_1 - 1].value !== tickValue) { levelTicksRemoveDuplicated.push(currentLevelTicks[i_1]); if (tickValue >= extent[0] && tickValue <= extent[1]) { tickCount++; } } } var targetTickNum = (extent[1] - extent[0]) / approxInterval; // Added too much in this level and not too less in last level if (tickCount > targetTickNum * 1.5 && lastLevelTickCount > targetTickNum / 1.5) { break; } // Only treat primary time unit as one level. levelsTicks.push(levelTicksRemoveDuplicated); if (tickCount > targetTickNum || bottomUnitName === unitNames[i]) { break; } } // Reset if next unitName is primary currentLevelTicks = []; } } if ("development" !== 'production') { if (iter >= safeLimit) { warn('Exceed safe limit.'); } } var levelsTicksInExtent = filter(map(levelsTicks, function (levelTicks) { return filter(levelTicks, function (tick) { return tick.value >= extent[0] && tick.value <= extent[1] && !tick.notAdd; }); }), function (levelTicks) { return levelTicks.length > 0; }); var ticks = []; var maxLevel = levelsTicksInExtent.length - 1; for (var i = 0; i < levelsTicksInExtent.length; ++i) { var levelTicks = levelsTicksInExtent[i]; for (var k = 0; k < levelTicks.length; ++k) { ticks.push({ value: levelTicks[k].value, level: maxLevel - i }); } } ticks.sort(function (a, b) { return a.value - b.value; }); // Remove duplicates var result = []; for (var i = 0; i < ticks.length; ++i) { if (i === 0 || ticks[i].value !== ticks[i - 1].value) { result.push(ticks[i]); } } return result; } Scale.registerClass(TimeScale); var scaleProto = Scale.prototype; // FIXME:TS refactor: not good to call it directly with `this`? var intervalScaleProto = IntervalScale.prototype; var getPrecisionSafe$1 = getPrecisionSafe; var roundingErrorFix = round; var mathFloor$1 = Math.floor; var mathCeil = Math.ceil; var mathPow$1 = Math.pow; var mathLog = Math.log; var LogScale = /** @class */ function (_super) { __extends(LogScale, _super); function LogScale() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'log'; _this.base = 10; _this._originalScale = new IntervalScale(); // FIXME:TS actually used by `IntervalScale` _this._interval = 0; return _this; } /** * @param Whether expand the ticks to niced extent. */ LogScale.prototype.getTicks = function (expandToNicedExtent) { var originalScale = this._originalScale; var extent = this._extent; var originalExtent = originalScale.getExtent(); var ticks = intervalScaleProto.getTicks.call(this, expandToNicedExtent); return map(ticks, function (tick) { var val = tick.value; var powVal = round(mathPow$1(this.base, val)); // Fix #4158 powVal = val === extent[0] && this._fixMin ? fixRoundingError(powVal, originalExtent[0]) : powVal; powVal = val === extent[1] && this._fixMax ? fixRoundingError(powVal, originalExtent[1]) : powVal; return { value: powVal }; }, this); }; LogScale.prototype.setExtent = function (start, end) { var base = this.base; start = mathLog(start) / mathLog(base); end = mathLog(end) / mathLog(base); intervalScaleProto.setExtent.call(this, start, end); }; /** * @return {number} end */ LogScale.prototype.getExtent = function () { var base = this.base; var extent = scaleProto.getExtent.call(this); extent[0] = mathPow$1(base, extent[0]); extent[1] = mathPow$1(base, extent[1]); // Fix #4158 var originalScale = this._originalScale; var originalExtent = originalScale.getExtent(); this._fixMin && (extent[0] = fixRoundingError(extent[0], originalExtent[0])); this._fixMax && (extent[1] = fixRoundingError(extent[1], originalExtent[1])); return extent; }; LogScale.prototype.unionExtent = function (extent) { this._originalScale.unionExtent(extent); var base = this.base; extent[0] = mathLog(extent[0]) / mathLog(base); extent[1] = mathLog(extent[1]) / mathLog(base); scaleProto.unionExtent.call(this, extent); }; LogScale.prototype.unionExtentFromData = function (data, dim) { // TODO // filter value that <= 0 this.unionExtent(data.getApproximateExtent(dim)); }; /** * Update interval and extent of intervals for nice ticks * @param approxTickNum default 10 Given approx tick number */ LogScale.prototype.niceTicks = function (approxTickNum) { approxTickNum = approxTickNum || 10; var extent = this._extent; var span = extent[1] - extent[0]; if (span === Infinity || span <= 0) { return; } var interval = quantity(span); var err = approxTickNum / span * interval; // Filter ticks to get closer to the desired count. if (err <= 0.5) { interval *= 10; } // Interval should be integer while (!isNaN(interval) && Math.abs(interval) < 1 && Math.abs(interval) > 0) { interval *= 10; } var niceExtent = [round(mathCeil(extent[0] / interval) * interval), round(mathFloor$1(extent[1] / interval) * interval)]; this._interval = interval; this._niceExtent = niceExtent; }; LogScale.prototype.niceExtent = function (opt) { intervalScaleProto.niceExtent.call(this, opt); this._fixMin = opt.fixMin; this._fixMax = opt.fixMax; }; LogScale.prototype.parse = function (val) { return val; }; LogScale.prototype.contain = function (val) { val = mathLog(val) / mathLog(this.base); return contain$2(val, this._extent); }; LogScale.prototype.normalize = function (val) { val = mathLog(val) / mathLog(this.base); return normalize$1(val, this._extent); }; LogScale.prototype.scale = function (val) { val = scale$2(val, this._extent); return mathPow$1(this.base, val); }; LogScale.type = 'log'; return LogScale; }(Scale); var proto = LogScale.prototype; proto.getMinorTicks = intervalScaleProto.getMinorTicks; proto.getLabel = intervalScaleProto.getLabel; function fixRoundingError(val, originalVal) { return roundingErrorFix(val, getPrecisionSafe$1(originalVal)); } Scale.registerClass(LogScale); var ScaleRawExtentInfo = /** @class */ function () { function ScaleRawExtentInfo(scale, model, // Usually: data extent from all series on this axis. originalExtent) { this._prepareParams(scale, model, originalExtent); } /** * Parameters depending on ouside (like model, user callback) * are prepared and fixed here. */ ScaleRawExtentInfo.prototype._prepareParams = function (scale, model, // Usually: data extent from all series on this axis. dataExtent) { if (dataExtent[1] < dataExtent[0]) { dataExtent = [NaN, NaN]; } this._dataMin = dataExtent[0]; this._dataMax = dataExtent[1]; var isOrdinal = this._isOrdinal = scale.type === 'ordinal'; this._needCrossZero = model.getNeedCrossZero && model.getNeedCrossZero(); var modelMinRaw = this._modelMinRaw = model.get('min', true); if (isFunction(modelMinRaw)) { // This callback alway provide users the full data extent (before data filtered). this._modelMinNum = parseAxisModelMinMax(scale, modelMinRaw({ min: dataExtent[0], max: dataExtent[1] })); } else if (modelMinRaw !== 'dataMin') { this._modelMinNum = parseAxisModelMinMax(scale, modelMinRaw); } var modelMaxRaw = this._modelMaxRaw = model.get('max', true); if (isFunction(modelMaxRaw)) { // This callback alway provide users the full data extent (before data filtered). this._modelMaxNum = parseAxisModelMinMax(scale, modelMaxRaw({ min: dataExtent[0], max: dataExtent[1] })); } else if (modelMaxRaw !== 'dataMax') { this._modelMaxNum = parseAxisModelMinMax(scale, modelMaxRaw); } if (isOrdinal) { // FIXME: there is a flaw here: if there is no "block" data processor like `dataZoom`, // and progressive rendering is using, here the category result might just only contain // the processed chunk rather than the entire result. this._axisDataLen = model.getCategories().length; } else { var boundaryGap = model.get('boundaryGap'); var boundaryGapArr = isArray(boundaryGap) ? boundaryGap : [boundaryGap || 0, boundaryGap || 0]; if (typeof boundaryGapArr[0] === 'boolean' || typeof boundaryGapArr[1] === 'boolean') { if ("development" !== 'production') { console.warn('Boolean type for boundaryGap is only ' + 'allowed for ordinal axis. Please use string in ' + 'percentage instead, e.g., "20%". Currently, ' + 'boundaryGap is set to be 0.'); } this._boundaryGapInner = [0, 0]; } else { this._boundaryGapInner = [parsePercent(boundaryGapArr[0], 1), parsePercent(boundaryGapArr[1], 1)]; } } }; /** * Calculate extent by prepared parameters. * This method has no external dependency and can be called duplicatedly, * getting the same result. * If parameters changed, should call this method to recalcuate. */ ScaleRawExtentInfo.prototype.calculate = function () { // Notice: When min/max is not set (that is, when there are null/undefined, // which is the most common case), these cases should be ensured: // (1) For 'ordinal', show all axis.data. // (2) For others: // + `boundaryGap` is applied (if min/max set, boundaryGap is // disabled). // + If `needCrossZero`, min/max should be zero, otherwise, min/max should // be the result that originalExtent enlarged by boundaryGap. // (3) If no data, it should be ensured that `scale.setBlank` is set. var isOrdinal = this._isOrdinal; var dataMin = this._dataMin; var dataMax = this._dataMax; var axisDataLen = this._axisDataLen; var boundaryGapInner = this._boundaryGapInner; var span = !isOrdinal ? dataMax - dataMin || Math.abs(dataMin) : null; // Currently if a `'value'` axis model min is specified as 'dataMin'/'dataMax', // `boundaryGap` will not be used. It's the different from specifying as `null`/`undefined`. var min = this._modelMinRaw === 'dataMin' ? dataMin : this._modelMinNum; var max = this._modelMaxRaw === 'dataMax' ? dataMax : this._modelMaxNum; // If `_modelMinNum`/`_modelMaxNum` is `null`/`undefined`, should not be fixed. var minFixed = min != null; var maxFixed = max != null; if (min == null) { min = isOrdinal ? axisDataLen ? 0 : NaN : dataMin - boundaryGapInner[0] * span; } if (max == null) { max = isOrdinal ? axisDataLen ? axisDataLen - 1 : NaN : dataMax + boundaryGapInner[1] * span; } (min == null || !isFinite(min)) && (min = NaN); (max == null || !isFinite(max)) && (max = NaN); if (min > max) { min = NaN; max = NaN; } var isBlank = eqNaN(min) || eqNaN(max) || isOrdinal && !axisDataLen; // If data extent modified, need to recalculated to ensure cross zero. if (this._needCrossZero) { // Axis is over zero and min is not set if (min > 0 && max > 0 && !minFixed) { min = 0; // minFixed = true; } // Axis is under zero and max is not set if (min < 0 && max < 0 && !maxFixed) { max = 0; // maxFixed = true; } // PENDING: // When `needCrossZero` and all data is positive/negative, should it be ensured // that the results processed by boundaryGap are positive/negative? // If so, here `minFixed`/`maxFixed` need to be set. } var determinedMin = this._determinedMin; var determinedMax = this._determinedMax; if (determinedMin != null) { min = determinedMin; minFixed = true; } if (determinedMax != null) { max = determinedMax; maxFixed = true; } // Ensure min/max be finite number or NaN here. (not to be null/undefined) // `NaN` means min/max axis is blank. return { min: min, max: max, minFixed: minFixed, maxFixed: maxFixed, isBlank: isBlank }; }; ScaleRawExtentInfo.prototype.modifyDataMinMax = function (minMaxName, val) { if ("development" !== 'production') { assert(!this.frozen); } this[DATA_MIN_MAX_ATTR[minMaxName]] = val; }; ScaleRawExtentInfo.prototype.setDeterminedMinMax = function (minMaxName, val) { var attr = DETERMINED_MIN_MAX_ATTR[minMaxName]; if ("development" !== 'production') { assert(!this.frozen // Earse them usually means logic flaw. && this[attr] == null); } this[attr] = val; }; ScaleRawExtentInfo.prototype.freeze = function () { // @ts-ignore this.frozen = true; }; return ScaleRawExtentInfo; }(); var DETERMINED_MIN_MAX_ATTR = { min: '_determinedMin', max: '_determinedMax' }; var DATA_MIN_MAX_ATTR = { min: '_dataMin', max: '_dataMax' }; /** * Get scale min max and related info only depends on model settings. * This method can be called after coordinate system created. * For example, in data processing stage. * * Scale extent info probably be required multiple times during a workflow. * For example: * (1) `dataZoom` depends it to get the axis extent in "100%" state. * (2) `processor/extentCalculator` depends it to make sure whether axis extent is specified. * (3) `coordSys.update` use it to finally decide the scale extent. * But the callback of `min`/`max` should not be called multiple times. * The code below should not be implemented repeatedly either. * So we cache the result in the scale instance, which will be recreated at the begining * of the workflow (because `scale` instance will be recreated each round of the workflow). */ function ensureScaleRawExtentInfo(scale, model, // Usually: data extent from all series on this axis. originalExtent) { // Do not permit to recreate. var rawExtentInfo = scale.rawExtentInfo; if (rawExtentInfo) { return rawExtentInfo; } rawExtentInfo = new ScaleRawExtentInfo(scale, model, originalExtent); // @ts-ignore scale.rawExtentInfo = rawExtentInfo; return rawExtentInfo; } function parseAxisModelMinMax(scale, minMax) { return minMax == null ? null : eqNaN(minMax) ? NaN : scale.parse(minMax); } /** * Get axis scale extent before niced. * Item of returned array can only be number (including Infinity and NaN). * * Caution: * Precondition of calling this method: * The scale extent has been initialized using series data extent via * `scale.setExtent` or `scale.unionExtentFromData`; */ function getScaleExtent(scale, model) { var scaleType = scale.type; var rawExtentResult = ensureScaleRawExtentInfo(scale, model, scale.getExtent()).calculate(); scale.setBlank(rawExtentResult.isBlank); var min = rawExtentResult.min; var max = rawExtentResult.max; // If bars are placed on a base axis of type time or interval account for axis boundary overflow and current axis // is base axis // FIXME // (1) Consider support value axis, where below zero and axis `onZero` should be handled properly. // (2) Refactor the logic with `barGrid`. Is it not need to `makeBarWidthAndOffsetInfo` twice with different extent? // Should not depend on series type `bar`? // (3) Fix that might overlap when using dataZoom. // (4) Consider other chart types using `barGrid`? // See #6728, #4862, `test/bar-overflow-time-plot.html` var ecModel = model.ecModel; if (ecModel && scaleType === 'time' /*|| scaleType === 'interval' */ ) { var barSeriesModels = prepareLayoutBarSeries('bar', ecModel); var isBaseAxisAndHasBarSeries_1 = false; each(barSeriesModels, function (seriesModel) { isBaseAxisAndHasBarSeries_1 = isBaseAxisAndHasBarSeries_1 || seriesModel.getBaseAxis() === model.axis; }); if (isBaseAxisAndHasBarSeries_1) { // Calculate placement of bars on axis. TODO should be decoupled // with barLayout var barWidthAndOffset = makeColumnLayout(barSeriesModels); // Adjust axis min and max to account for overflow var adjustedScale = adjustScaleForOverflow(min, max, model, barWidthAndOffset); min = adjustedScale.min; max = adjustedScale.max; } } return { extent: [min, max], // "fix" means "fixed", the value should not be // changed in the subsequent steps. fixMin: rawExtentResult.minFixed, fixMax: rawExtentResult.maxFixed }; } function adjustScaleForOverflow(min, max, model, // Only support cartesian coord yet. barWidthAndOffset) { // Get Axis Length var axisExtent = model.axis.getExtent(); var axisLength = axisExtent[1] - axisExtent[0]; // Get bars on current base axis and calculate min and max overflow var barsOnCurrentAxis = retrieveColumnLayout(barWidthAndOffset, model.axis); if (barsOnCurrentAxis === undefined) { return { min: min, max: max }; } var minOverflow = Infinity; each(barsOnCurrentAxis, function (item) { minOverflow = Math.min(item.offset, minOverflow); }); var maxOverflow = -Infinity; each(barsOnCurrentAxis, function (item) { maxOverflow = Math.max(item.offset + item.width, maxOverflow); }); minOverflow = Math.abs(minOverflow); maxOverflow = Math.abs(maxOverflow); var totalOverFlow = minOverflow + maxOverflow; // Calculate required buffer based on old range and overflow var oldRange = max - min; var oldRangePercentOfNew = 1 - (minOverflow + maxOverflow) / axisLength; var overflowBuffer = oldRange / oldRangePercentOfNew - oldRange; max += overflowBuffer * (maxOverflow / totalOverFlow); min -= overflowBuffer * (minOverflow / totalOverFlow); return { min: min, max: max }; } // Precondition of calling this method: // The scale extent has been initailized using series data extent via // `scale.setExtent` or `scale.unionExtentFromData`; function niceScaleExtent(scale, model) { var extentInfo = getScaleExtent(scale, model); var extent = extentInfo.extent; var splitNumber = model.get('splitNumber'); if (scale instanceof LogScale) { scale.base = model.get('logBase'); } var scaleType = scale.type; scale.setExtent(extent[0], extent[1]); scale.niceExtent({ splitNumber: splitNumber, fixMin: extentInfo.fixMin, fixMax: extentInfo.fixMax, minInterval: scaleType === 'interval' || scaleType === 'time' ? model.get('minInterval') : null, maxInterval: scaleType === 'interval' || scaleType === 'time' ? model.get('maxInterval') : null }); // If some one specified the min, max. And the default calculated interval // is not good enough. He can specify the interval. It is often appeared // in angle axis with angle 0 - 360. Interval calculated in interval scale is hard // to be 60. // FIXME var interval = model.get('interval'); if (interval != null) { scale.setInterval && scale.setInterval(interval); } } /** * @param axisType Default retrieve from model.type */ function createScaleByModel(model, axisType) { axisType = axisType || model.get('type'); if (axisType) { switch (axisType) { // Buildin scale case 'category': return new OrdinalScale({ ordinalMeta: model.getOrdinalMeta ? model.getOrdinalMeta() : model.getCategories(), extent: [Infinity, -Infinity] }); case 'time': return new TimeScale({ locale: model.ecModel.getLocaleModel(), useUTC: model.ecModel.get('useUTC') }); default: // case 'value'/'interval', 'log', or others. return new (Scale.getClass(axisType) || IntervalScale)(); } } } /** * Check if the axis cross 0 */ function ifAxisCrossZero(axis) { var dataExtent = axis.scale.getExtent(); var min = dataExtent[0]; var max = dataExtent[1]; return !(min > 0 && max > 0 || min < 0 && max < 0); } /** * @param axis * @return Label formatter function. * param: {number} tickValue, * param: {number} idx, the index in all ticks. * If category axis, this param is not required. * return: {string} label string. */ function makeLabelFormatter(axis) { var labelFormatter = axis.getLabelModel().get('formatter'); var categoryTickStart = axis.type === 'category' ? axis.scale.getExtent()[0] : null; if (axis.scale.type === 'time') { return function (tpl) { return function (tick, idx) { return axis.scale.getFormattedLabel(tick, idx, tpl); }; }(labelFormatter); } else if (typeof labelFormatter === 'string') { return function (tpl) { return function (tick) { // For category axis, get raw value; for numeric axis, // get formatted label like '1,333,444'. var label = axis.scale.getLabel(tick); var text = tpl.replace('{value}', label != null ? label : ''); return text; }; }(labelFormatter); } else if (typeof labelFormatter === 'function') { return function (cb) { return function (tick, idx) { // The original intention of `idx` is "the index of the tick in all ticks". // But the previous implementation of category axis do not consider the // `axisLabel.interval`, which cause that, for example, the `interval` is // `1`, then the ticks "name5", "name7", "name9" are displayed, where the // corresponding `idx` are `0`, `2`, `4`, but not `0`, `1`, `2`. So we keep // the definition here for back compatibility. if (categoryTickStart != null) { idx = tick.value - categoryTickStart; } return cb(getAxisRawValue(axis, tick), idx, tick.level != null ? { level: tick.level } : null); }; }(labelFormatter); } else { return function (tick) { return axis.scale.getLabel(tick); }; } } function getAxisRawValue(axis, tick) { // In category axis with data zoom, tick is not the original // index of axis.data. So tick should not be exposed to user // in category axis. return axis.type === 'category' ? axis.scale.getLabel(tick) : tick.value; } /** * @param axis * @return Be null/undefined if no labels. */ function estimateLabelUnionRect(axis) { var axisModel = axis.model; var scale = axis.scale; if (!axisModel.get(['axisLabel', 'show']) || scale.isBlank()) { return; } var realNumberScaleTicks; var tickCount; var categoryScaleExtent = scale.getExtent(); // Optimize for large category data, avoid call `getTicks()`. if (scale instanceof OrdinalScale) { tickCount = scale.count(); } else { realNumberScaleTicks = scale.getTicks(); tickCount = realNumberScaleTicks.length; } var axisLabelModel = axis.getLabelModel(); var labelFormatter = makeLabelFormatter(axis); var rect; var step = 1; // Simple optimization for large amount of labels if (tickCount > 40) { step = Math.ceil(tickCount / 40); } for (var i = 0; i < tickCount; i += step) { var tick = realNumberScaleTicks ? realNumberScaleTicks[i] : { value: categoryScaleExtent[0] + i }; var label = labelFormatter(tick, i); var unrotatedSingleRect = axisLabelModel.getTextRect(label); var singleRect = rotateTextRect(unrotatedSingleRect, axisLabelModel.get('rotate') || 0); rect ? rect.union(singleRect) : rect = singleRect; } return rect; } function rotateTextRect(textRect, rotate) { var rotateRadians = rotate * Math.PI / 180; var beforeWidth = textRect.width; var beforeHeight = textRect.height; var afterWidth = beforeWidth * Math.abs(Math.cos(rotateRadians)) + Math.abs(beforeHeight * Math.sin(rotateRadians)); var afterHeight = beforeWidth * Math.abs(Math.sin(rotateRadians)) + Math.abs(beforeHeight * Math.cos(rotateRadians)); var rotatedRect = new BoundingRect(textRect.x, textRect.y, afterWidth, afterHeight); return rotatedRect; } /** * @param model axisLabelModel or axisTickModel * @return {number|String} Can be null|'auto'|number|function */ function getOptionCategoryInterval(model) { var interval = model.get('interval'); return interval == null ? 'auto' : interval; } /** * Set `categoryInterval` as 0 implicitly indicates that * show all labels reguardless of overlap. * @param {Object} axis axisModel.axis */ function shouldShowAllLabels(axis) { return axis.type === 'category' && getOptionCategoryInterval(axis.getLabelModel()) === 0; } function getDataDimensionsOnAxis(data, axisDim) { // Remove duplicated dat dimensions caused by `getStackedDimension`. var dataDimMap = {}; // Currently `mapDimensionsAll` will contain stack result dimension ('__\0ecstackresult'). // PENDING: is it reasonable? Do we need to remove the original dim from "coord dim" since // there has been stacked result dim? each(data.mapDimensionsAll(axisDim), function (dataDim) { // For example, the extent of the original dimension // is [0.1, 0.5], the extent of the `stackResultDimension` // is [7, 9], the final extent should NOT include [0.1, 0.5], // because there is no graphic corresponding to [0.1, 0.5]. // See the case in `test/area-stack.html` `main1`, where area line // stack needs `yAxis` not start from 0. dataDimMap[getStackedDimension(data, dataDim)] = true; }); return keys(dataDimMap); } function unionAxisExtentFromData(dataExtent, data, axisDim) { if (data) { each(getDataDimensionsOnAxis(data, axisDim), function (dim) { var seriesExtent = data.getApproximateExtent(dim); seriesExtent[0] < dataExtent[0] && (dataExtent[0] = seriesExtent[0]); seriesExtent[1] > dataExtent[1] && (dataExtent[1] = seriesExtent[1]); }); } } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ var AxisModelCommonMixin = /** @class */ function () { function AxisModelCommonMixin() {} AxisModelCommonMixin.prototype.getNeedCrossZero = function () { var option = this.option; return !option.scale; }; /** * Should be implemented by each axis model if necessary. * @return coordinate system model */ AxisModelCommonMixin.prototype.getCoordSysModel = function () { return; }; return AxisModelCommonMixin; }(); /** * Create a muti dimension List structure from seriesModel. */ function createList(seriesModel) { return createListFromArray(seriesModel.getSource(), seriesModel); } // export function createGraph(seriesModel) { var dataStack$1 = { isDimensionStacked: isDimensionStacked, enableDataStack: enableDataStack, getStackedDimension: getStackedDimension }; /** * Create scale * @param {Array.} dataExtent * @param {Object|module:echarts/Model} option If `optoin.type` * is secified, it can only be `'value'` currently. */ function createScale(dataExtent, option) { var axisModel = option; if (!(option instanceof Model)) { axisModel = new Model(option); // FIXME // Currently AxisModelCommonMixin has nothing to do with the // the requirements of `axisHelper.createScaleByModel`. For // example the method `getCategories` and `getOrdinalMeta` // are required for `'category'` axis, and ecModel are required // for `'time'` axis. But occationally echarts-gl happened // to only use `'value'` axis. // zrUtil.mixin(axisModel, AxisModelCommonMixin); } var scale = createScaleByModel(axisModel); scale.setExtent(dataExtent[0], dataExtent[1]); niceScaleExtent(scale, axisModel); return scale; } /** * Mixin common methods to axis model, * * Inlcude methods * `getFormattedLabels() => Array.` * `getCategories() => Array.` * `getMin(origin: boolean) => number` * `getMax(origin: boolean) => number` * `getNeedCrossZero() => boolean` */ function mixinAxisModelCommonMethods(Model) { mixin(Model, AxisModelCommonMixin); } function createTextStyle$1(textStyleModel, opts) { opts = opts || {}; return createTextStyle(textStyleModel, null, null, opts.state !== 'normal'); } var helper = /*#__PURE__*/Object.freeze({ __proto__: null, createList: createList, getLayoutRect: getLayoutRect, dataStack: dataStack$1, createScale: createScale, mixinAxisModelCommonMethods: mixinAxisModelCommonMethods, getECData: getECData, createTextStyle: createTextStyle$1, createDimensions: createDimensions, createSymbol: createSymbol, enableHoverEmphasis: enableHoverEmphasis }); var number = /*#__PURE__*/Object.freeze({ __proto__: null, linearMap: linearMap, round: round, asc: asc, getPrecision: getPrecision, getPrecisionSafe: getPrecisionSafe, getPixelPrecision: getPixelPrecision, getPercentWithPrecision: getPercentWithPrecision, MAX_SAFE_INTEGER: MAX_SAFE_INTEGER, remRadian: remRadian, isRadianAroundZero: isRadianAroundZero, parseDate: parseDate, quantity: quantity, quantityExponent: quantityExponent, nice: nice, quantile: quantile, reformIntervals: reformIntervals, isNumeric: isNumeric, numericToNumber: numericToNumber }); var time = /*#__PURE__*/Object.freeze({ __proto__: null, parse: parseDate, format: format }); var graphic$1 = /*#__PURE__*/Object.freeze({ __proto__: null, extendShape: extendShape, extendPath: extendPath, makePath: makePath, makeImage: makeImage, mergePath: mergePath$1, resizePath: resizePath, createIcon: createIcon, updateProps: updateProps, initProps: initProps, getTransform: getTransform, clipPointsByRect: clipPointsByRect, clipRectByRect: clipRectByRect, registerShape: registerShape, getShapeClass: getShapeClass, Group: Group, Image: ZRImage, Text: ZRText, Circle: Circle, Ellipse: Ellipse, Sector: Sector, Ring: Ring, Polygon: Polygon, Polyline: Polyline, Rect: Rect, Line: Line, BezierCurve: BezierCurve, Arc: Arc, IncrementalDisplayable: IncrementalDisplayable, CompoundPath: CompoundPath, LinearGradient: LinearGradient, RadialGradient: RadialGradient, BoundingRect: BoundingRect }); var format$1 = /*#__PURE__*/Object.freeze({ __proto__: null, addCommas: addCommas, toCamelCase: toCamelCase, normalizeCssArray: normalizeCssArray$1, encodeHTML: encodeHTML, formatTpl: formatTpl, getTooltipMarker: getTooltipMarker, formatTime: formatTime, capitalFirst: capitalFirst, truncateText: truncateText, getTextRect: getTextRect }); var util$1 = /*#__PURE__*/Object.freeze({ __proto__: null, map: map, each: each, indexOf: indexOf, inherits: inherits, reduce: reduce, filter: filter, bind: bind, curry: curry, isArray: isArray, isString: isString, isObject: isObject, isFunction: isFunction, extend: extend, defaults: defaults, clone: clone, merge: merge }); var inner$4 = makeInner(); function createAxisLabels(axis) { // Only ordinal scale support tick interval return axis.type === 'category' ? makeCategoryLabels(axis) : makeRealNumberLabels(axis); } /** * @param {module:echats/coord/Axis} axis * @param {module:echarts/model/Model} tickModel For example, can be axisTick, splitLine, splitArea. * @return {Object} { * ticks: Array. * tickCategoryInterval: number * } */ function createAxisTicks(axis, tickModel) { // Only ordinal scale support tick interval return axis.type === 'category' ? makeCategoryTicks(axis, tickModel) : { ticks: map(axis.scale.getTicks(), function (tick) { return tick.value; }) }; } function makeCategoryLabels(axis) { var labelModel = axis.getLabelModel(); var result = makeCategoryLabelsActually(axis, labelModel); return !labelModel.get('show') || axis.scale.isBlank() ? { labels: [], labelCategoryInterval: result.labelCategoryInterval } : result; } function makeCategoryLabelsActually(axis, labelModel) { var labelsCache = getListCache(axis, 'labels'); var optionLabelInterval = getOptionCategoryInterval(labelModel); var result = listCacheGet(labelsCache, optionLabelInterval); if (result) { return result; } var labels; var numericLabelInterval; if (isFunction(optionLabelInterval)) { labels = makeLabelsByCustomizedCategoryInterval(axis, optionLabelInterval); } else { numericLabelInterval = optionLabelInterval === 'auto' ? makeAutoCategoryInterval(axis) : optionLabelInterval; labels = makeLabelsByNumericCategoryInterval(axis, numericLabelInterval); } // Cache to avoid calling interval function repeatly. return listCacheSet(labelsCache, optionLabelInterval, { labels: labels, labelCategoryInterval: numericLabelInterval }); } function makeCategoryTicks(axis, tickModel) { var ticksCache = getListCache(axis, 'ticks'); var optionTickInterval = getOptionCategoryInterval(tickModel); var result = listCacheGet(ticksCache, optionTickInterval); if (result) { return result; } var ticks; var tickCategoryInterval; // Optimize for the case that large category data and no label displayed, // we should not return all ticks. if (!tickModel.get('show') || axis.scale.isBlank()) { ticks = []; } if (isFunction(optionTickInterval)) { ticks = makeLabelsByCustomizedCategoryInterval(axis, optionTickInterval, true); } // Always use label interval by default despite label show. Consider this // scenario, Use multiple grid with the xAxis sync, and only one xAxis shows // labels. `splitLine` and `axisTick` should be consistent in this case. else if (optionTickInterval === 'auto') { var labelsResult = makeCategoryLabelsActually(axis, axis.getLabelModel()); tickCategoryInterval = labelsResult.labelCategoryInterval; ticks = map(labelsResult.labels, function (labelItem) { return labelItem.tickValue; }); } else { tickCategoryInterval = optionTickInterval; ticks = makeLabelsByNumericCategoryInterval(axis, tickCategoryInterval, true); } // Cache to avoid calling interval function repeatly. return listCacheSet(ticksCache, optionTickInterval, { ticks: ticks, tickCategoryInterval: tickCategoryInterval }); } function makeRealNumberLabels(axis) { var ticks = axis.scale.getTicks(); var labelFormatter = makeLabelFormatter(axis); return { labels: map(ticks, function (tick, idx) { return { formattedLabel: labelFormatter(tick, idx), rawLabel: axis.scale.getLabel(tick), tickValue: tick.value }; }) }; } function getListCache(axis, prop) { // Because key can be funciton, and cache size always be small, we use array cache. return inner$4(axis)[prop] || (inner$4(axis)[prop] = []); } function listCacheGet(cache, key) { for (var i = 0; i < cache.length; i++) { if (cache[i].key === key) { return cache[i].value; } } } function listCacheSet(cache, key, value) { cache.push({ key: key, value: value }); return value; } function makeAutoCategoryInterval(axis) { var result = inner$4(axis).autoInterval; return result != null ? result : inner$4(axis).autoInterval = axis.calculateCategoryInterval(); } /** * Calculate interval for category axis ticks and labels. * To get precise result, at least one of `getRotate` and `isHorizontal` * should be implemented in axis. */ function calculateCategoryInterval(axis) { var params = fetchAutoCategoryIntervalCalculationParams(axis); var labelFormatter = makeLabelFormatter(axis); var rotation = (params.axisRotate - params.labelRotate) / 180 * Math.PI; var ordinalScale = axis.scale; var ordinalExtent = ordinalScale.getExtent(); // Providing this method is for optimization: // avoid generating a long array by `getTicks` // in large category data case. var tickCount = ordinalScale.count(); if (ordinalExtent[1] - ordinalExtent[0] < 1) { return 0; } var step = 1; // Simple optimization. Empirical value: tick count should less than 40. if (tickCount > 40) { step = Math.max(1, Math.floor(tickCount / 40)); } var tickValue = ordinalExtent[0]; var unitSpan = axis.dataToCoord(tickValue + 1) - axis.dataToCoord(tickValue); var unitW = Math.abs(unitSpan * Math.cos(rotation)); var unitH = Math.abs(unitSpan * Math.sin(rotation)); var maxW = 0; var maxH = 0; // Caution: Performance sensitive for large category data. // Consider dataZoom, we should make appropriate step to avoid O(n) loop. for (; tickValue <= ordinalExtent[1]; tickValue += step) { var width = 0; var height = 0; // Not precise, do not consider align and vertical align // and each distance from axis line yet. var rect = getBoundingRect(labelFormatter({ value: tickValue }), params.font, 'center', 'top'); // Magic number width = rect.width * 1.3; height = rect.height * 1.3; // Min size, void long loop. maxW = Math.max(maxW, width, 7); maxH = Math.max(maxH, height, 7); } var dw = maxW / unitW; var dh = maxH / unitH; // 0/0 is NaN, 1/0 is Infinity. isNaN(dw) && (dw = Infinity); isNaN(dh) && (dh = Infinity); var interval = Math.max(0, Math.floor(Math.min(dw, dh))); var cache = inner$4(axis.model); var axisExtent = axis.getExtent(); var lastAutoInterval = cache.lastAutoInterval; var lastTickCount = cache.lastTickCount; // Use cache to keep interval stable while moving zoom window, // otherwise the calculated interval might jitter when the zoom // window size is close to the interval-changing size. // For example, if all of the axis labels are `a, b, c, d, e, f, g`. // The jitter will cause that sometimes the displayed labels are // `a, d, g` (interval: 2) sometimes `a, c, e`(interval: 1). if (lastAutoInterval != null && lastTickCount != null && Math.abs(lastAutoInterval - interval) <= 1 && Math.abs(lastTickCount - tickCount) <= 1 // Always choose the bigger one, otherwise the critical // point is not the same when zooming in or zooming out. && lastAutoInterval > interval // If the axis change is caused by chart resize, the cache should not // be used. Otherwise some hiden labels might not be shown again. && cache.axisExtent0 === axisExtent[0] && cache.axisExtent1 === axisExtent[1]) { interval = lastAutoInterval; } // Only update cache if cache not used, otherwise the // changing of interval is too insensitive. else { cache.lastTickCount = tickCount; cache.lastAutoInterval = interval; cache.axisExtent0 = axisExtent[0]; cache.axisExtent1 = axisExtent[1]; } return interval; } function fetchAutoCategoryIntervalCalculationParams(axis) { var labelModel = axis.getLabelModel(); return { axisRotate: axis.getRotate ? axis.getRotate() : axis.isHorizontal && !axis.isHorizontal() ? 90 : 0, labelRotate: labelModel.get('rotate') || 0, font: labelModel.getFont() }; } function makeLabelsByNumericCategoryInterval(axis, categoryInterval, onlyTick) { var labelFormatter = makeLabelFormatter(axis); var ordinalScale = axis.scale; var ordinalExtent = ordinalScale.getExtent(); var labelModel = axis.getLabelModel(); var result = []; // TODO: axisType: ordinalTime, pick the tick from each month/day/year/... var step = Math.max((categoryInterval || 0) + 1, 1); var startTick = ordinalExtent[0]; var tickCount = ordinalScale.count(); // Calculate start tick based on zero if possible to keep label consistent // while zooming and moving while interval > 0. Otherwise the selection // of displayable ticks and symbols probably keep changing. // 3 is empirical value. if (startTick !== 0 && step > 1 && tickCount / step > 2) { startTick = Math.round(Math.ceil(startTick / step) * step); } // (1) Only add min max label here but leave overlap checking // to render stage, which also ensure the returned list // suitable for splitLine and splitArea rendering. // (2) Scales except category always contain min max label so // do not need to perform this process. var showAllLabel = shouldShowAllLabels(axis); var includeMinLabel = labelModel.get('showMinLabel') || showAllLabel; var includeMaxLabel = labelModel.get('showMaxLabel') || showAllLabel; if (includeMinLabel && startTick !== ordinalExtent[0]) { addItem(ordinalExtent[0]); } // Optimize: avoid generating large array by `ordinalScale.getTicks()`. var tickValue = startTick; for (; tickValue <= ordinalExtent[1]; tickValue += step) { addItem(tickValue); } if (includeMaxLabel && tickValue - step !== ordinalExtent[1]) { addItem(ordinalExtent[1]); } function addItem(tickValue) { var tickObj = { value: tickValue }; result.push(onlyTick ? tickValue : { formattedLabel: labelFormatter(tickObj), rawLabel: ordinalScale.getLabel(tickObj), tickValue: tickValue }); } return result; } function makeLabelsByCustomizedCategoryInterval(axis, categoryInterval, onlyTick) { var ordinalScale = axis.scale; var labelFormatter = makeLabelFormatter(axis); var result = []; each(ordinalScale.getTicks(), function (tick) { var rawLabel = ordinalScale.getLabel(tick); var tickValue = tick.value; if (categoryInterval(tick.value, rawLabel)) { result.push(onlyTick ? tickValue : { formattedLabel: labelFormatter(tick), rawLabel: rawLabel, tickValue: tickValue }); } }); return result; } var NORMALIZED_EXTENT = [0, 1]; /** * Base class of Axis. */ var Axis = /** @class */ function () { function Axis(dim, scale, extent) { this.onBand = false; this.inverse = false; this.dim = dim; this.scale = scale; this._extent = extent || [0, 0]; } /** * If axis extent contain given coord */ Axis.prototype.contain = function (coord) { var extent = this._extent; var min = Math.min(extent[0], extent[1]); var max = Math.max(extent[0], extent[1]); return coord >= min && coord <= max; }; /** * If axis extent contain given data */ Axis.prototype.containData = function (data) { return this.scale.contain(data); }; /** * Get coord extent. */ Axis.prototype.getExtent = function () { return this._extent.slice(); }; /** * Get precision used for formatting */ Axis.prototype.getPixelPrecision = function (dataExtent) { return getPixelPrecision(dataExtent || this.scale.getExtent(), this._extent); }; /** * Set coord extent */ Axis.prototype.setExtent = function (start, end) { var extent = this._extent; extent[0] = start; extent[1] = end; }; /** * Convert data to coord. Data is the rank if it has an ordinal scale */ Axis.prototype.dataToCoord = function (data, clamp) { var extent = this._extent; var scale = this.scale; data = scale.normalize(data); if (this.onBand && scale.type === 'ordinal') { extent = extent.slice(); fixExtentWithBands(extent, scale.count()); } return linearMap(data, NORMALIZED_EXTENT, extent, clamp); }; /** * Convert coord to data. Data is the rank if it has an ordinal scale */ Axis.prototype.coordToData = function (coord, clamp) { var extent = this._extent; var scale = this.scale; if (this.onBand && scale.type === 'ordinal') { extent = extent.slice(); fixExtentWithBands(extent, scale.count()); } var t = linearMap(coord, extent, NORMALIZED_EXTENT, clamp); return this.scale.scale(t); }; /** * Convert pixel point to data in axis */ Axis.prototype.pointToData = function (point, clamp) { // Should be implemented in derived class if necessary. return; }; /** * Different from `zrUtil.map(axis.getTicks(), axis.dataToCoord, axis)`, * `axis.getTicksCoords` considers `onBand`, which is used by * `boundaryGap:true` of category axis and splitLine and splitArea. * @param opt.tickModel default: axis.model.getModel('axisTick') * @param opt.clamp If `true`, the first and the last * tick must be at the axis end points. Otherwise, clip ticks * that outside the axis extent. */ Axis.prototype.getTicksCoords = function (opt) { opt = opt || {}; var tickModel = opt.tickModel || this.getTickModel(); var result = createAxisTicks(this, tickModel); var ticks = result.ticks; var ticksCoords = map(ticks, function (tickVal) { return { coord: this.dataToCoord(this.scale.type === 'ordinal' ? this.scale.getRawOrdinalNumber(tickVal) : tickVal), tickValue: tickVal }; }, this); var alignWithLabel = tickModel.get('alignWithLabel'); fixOnBandTicksCoords(this, ticksCoords, alignWithLabel, opt.clamp); return ticksCoords; }; Axis.prototype.getMinorTicksCoords = function () { if (this.scale.type === 'ordinal') { // Category axis doesn't support minor ticks return []; } var minorTickModel = this.model.getModel('minorTick'); var splitNumber = minorTickModel.get('splitNumber'); // Protection. if (!(splitNumber > 0 && splitNumber < 100)) { splitNumber = 5; } var minorTicks = this.scale.getMinorTicks(splitNumber); var minorTicksCoords = map(minorTicks, function (minorTicksGroup) { return map(minorTicksGroup, function (minorTick) { return { coord: this.dataToCoord(minorTick), tickValue: minorTick }; }, this); }, this); return minorTicksCoords; }; Axis.prototype.getViewLabels = function () { return createAxisLabels(this).labels; }; Axis.prototype.getLabelModel = function () { return this.model.getModel('axisLabel'); }; /** * Notice here we only get the default tick model. For splitLine * or splitArea, we should pass the splitLineModel or splitAreaModel * manually when calling `getTicksCoords`. * In GL, this method may be overrided to: * `axisModel.getModel('axisTick', grid3DModel.getModel('axisTick'));` */ Axis.prototype.getTickModel = function () { return this.model.getModel('axisTick'); }; /** * Get width of band */ Axis.prototype.getBandWidth = function () { var axisExtent = this._extent; var dataExtent = this.scale.getExtent(); var len = dataExtent[1] - dataExtent[0] + (this.onBand ? 1 : 0); // Fix #2728, avoid NaN when only one data. len === 0 && (len = 1); var size = Math.abs(axisExtent[1] - axisExtent[0]); return Math.abs(size) / len; }; /** * Only be called in category axis. * Can be overrided, consider other axes like in 3D. * @return Auto interval for cateogry axis tick and label */ Axis.prototype.calculateCategoryInterval = function () { return calculateCategoryInterval(this); }; return Axis; }(); function fixExtentWithBands(extent, nTick) { var size = extent[1] - extent[0]; var len = nTick; var margin = size / len / 2; extent[0] += margin; extent[1] -= margin; } // If axis has labels [1, 2, 3, 4]. Bands on the axis are // |---1---|---2---|---3---|---4---|. // So the displayed ticks and splitLine/splitArea should between // each data item, otherwise cause misleading (e.g., split tow bars // of a single data item when there are two bar series). // Also consider if tickCategoryInterval > 0 and onBand, ticks and // splitLine/spliteArea should layout appropriately corresponding // to displayed labels. (So we should not use `getBandWidth` in this // case). function fixOnBandTicksCoords(axis, ticksCoords, alignWithLabel, clamp) { var ticksLen = ticksCoords.length; if (!axis.onBand || alignWithLabel || !ticksLen) { return; } var axisExtent = axis.getExtent(); var last; var diffSize; if (ticksLen === 1) { ticksCoords[0].coord = axisExtent[0]; last = ticksCoords[1] = { coord: axisExtent[0] }; } else { var crossLen = ticksCoords[ticksLen - 1].tickValue - ticksCoords[0].tickValue; var shift_1 = (ticksCoords[ticksLen - 1].coord - ticksCoords[0].coord) / crossLen; each(ticksCoords, function (ticksItem) { ticksItem.coord -= shift_1 / 2; }); var dataExtent = axis.scale.getExtent(); diffSize = 1 + dataExtent[1] - ticksCoords[ticksLen - 1].tickValue; last = { coord: ticksCoords[ticksLen - 1].coord + shift_1 * diffSize }; ticksCoords.push(last); } var inverse = axisExtent[0] > axisExtent[1]; // Handling clamp. if (littleThan(ticksCoords[0].coord, axisExtent[0])) { clamp ? ticksCoords[0].coord = axisExtent[0] : ticksCoords.shift(); } if (clamp && littleThan(axisExtent[0], ticksCoords[0].coord)) { ticksCoords.unshift({ coord: axisExtent[0] }); } if (littleThan(axisExtent[1], last.coord)) { clamp ? last.coord = axisExtent[1] : ticksCoords.pop(); } if (clamp && littleThan(last.coord, axisExtent[1])) { ticksCoords.push({ coord: axisExtent[1] }); } function littleThan(a, b) { // Avoid rounding error cause calculated tick coord different with extent. // It may cause an extra unecessary tick added. a = round(a); b = round(b); return inverse ? a > b : a < b; } } // Should use `ComponentModel.extend` or `class XXXX extend ComponentModel` to create class. // Then use `registerComponentModel` in `install` parameter when `use` this extension. For example: // class Bar3DModel extends ComponentModel {} // export function install(registers) { regsiters.registerComponentModel(Bar3DModel); } // echarts.use(install); function extendComponentModel(proto) { var Model = ComponentModel.extend(proto); ComponentModel.registerClass(Model); return Model; } function extendComponentView(proto) { var View = ComponentView.extend(proto); ComponentView.registerClass(View); return View; } function extendSeriesModel(proto) { var Model = SeriesModel.extend(proto); SeriesModel.registerClass(Model); return Model; } function extendChartView(proto) { var View = ChartView.extend(proto); ChartView.registerClass(View); return View; } function createElement(name) { return document.createElementNS('http://www.w3.org/2000/svg', name); } function diff(oldArr, newArr, equals) { if (!equals) { equals = function (a, b) { return a === b; }; } oldArr = oldArr.slice(); newArr = newArr.slice(); var newLen = newArr.length; var oldLen = oldArr.length; var editLength = 1; var maxEditLength = newLen + oldLen; var bestPath = [{ newPos: -1, components: [] }]; var oldPos = extractCommon(bestPath[0], newArr, oldArr, 0, equals); if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { var indices = []; for (var i = 0; i < newArr.length; i++) { indices.push(i); } return [{ indices: indices, count: newArr.length, added: false, removed: false }]; } function execEditLength() { for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { var basePath; var addPath = bestPath[diagonalPath - 1]; var removePath = bestPath[diagonalPath + 1]; var oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; if (addPath) { bestPath[diagonalPath - 1] = undefined; } var canAdd = addPath && addPath.newPos + 1 < newLen; var canRemove = removePath && 0 <= oldPos && oldPos < oldLen; if (!canAdd && !canRemove) { bestPath[diagonalPath] = undefined; continue; } if (!canAdd || (canRemove && addPath.newPos < removePath.newPos)) { basePath = clonePath(removePath); pushComponent(basePath.components, false, true); } else { basePath = addPath; basePath.newPos++; pushComponent(basePath.components, true, false); } oldPos = extractCommon(basePath, newArr, oldArr, diagonalPath, equals); if (basePath.newPos + 1 >= newLen && oldPos + 1 >= oldLen) { return buildValues(basePath.components); } else { bestPath[diagonalPath] = basePath; } } editLength++; } while (editLength <= maxEditLength) { var ret = execEditLength(); if (ret) { return ret; } } } function extractCommon(basePath, newArr, oldArr, diagonalPath, equals) { var newLen = newArr.length; var oldLen = oldArr.length; var newPos = basePath.newPos; var oldPos = newPos - diagonalPath; var commonCount = 0; while (newPos + 1 < newLen && oldPos + 1 < oldLen && equals(newArr[newPos + 1], oldArr[oldPos + 1])) { newPos++; oldPos++; commonCount++; } if (commonCount) { basePath.components.push({ count: commonCount, added: false, removed: false, indices: [] }); } basePath.newPos = newPos; return oldPos; } function pushComponent(components, added, removed) { var last = components[components.length - 1]; if (last && last.added === added && last.removed === removed) { components[components.length - 1] = { count: last.count + 1, added: added, removed: removed, indices: [] }; } else { components.push({ count: 1, added: added, removed: removed, indices: [] }); } } function buildValues(components) { var componentPos = 0; var componentLen = components.length; var newPos = 0; var oldPos = 0; for (; componentPos < componentLen; componentPos++) { var component = components[componentPos]; if (!component.removed) { var indices = []; for (var i = newPos; i < newPos + component.count; i++) { indices.push(i); } component.indices = indices; newPos += component.count; if (!component.added) { oldPos += component.count; } } else { for (var i = oldPos; i < oldPos + component.count; i++) { component.indices.push(i); } oldPos += component.count; } } return components; } function clonePath(path) { return { newPos: path.newPos, components: path.components.slice(0) }; } function arrayDiff(oldArr, newArr, equal) { return diff(oldArr, newArr, equal); } var NONE = 'none'; var mathRound = Math.round; var mathSin$4 = Math.sin; var mathCos$4 = Math.cos; var PI$4 = Math.PI; var PI2$7 = Math.PI * 2; var degree = 180 / PI$4; var EPSILON$4 = 1e-4; function round3(val) { return mathRound(val * 1e3) / 1e3; } function round4(val) { return mathRound(val * 1e4) / 1e4; } function isAroundZero$1(val) { return val < EPSILON$4 && val > -EPSILON$4; } function pathHasFill(style) { var fill = style.fill; return fill != null && fill !== NONE; } function pathHasStroke(style) { var stroke = style.stroke; return stroke != null && stroke !== NONE; } function setTransform(svgEl, m) { if (m) { attr(svgEl, 'transform', 'matrix(' + round3(m[0]) + ',' + round3(m[1]) + ',' + round3(m[2]) + ',' + round3(m[3]) + ',' + round4(m[4]) + ',' + round4(m[5]) + ')'); } } function attr(el, key, val) { if (!val || val.type !== 'linear' && val.type !== 'radial') { el.setAttribute(key, val); } } function attrXLink(el, key, val) { el.setAttributeNS('http://www.w3.org/1999/xlink', key, val); } function attrXML(el, key, val) { el.setAttributeNS('http://www.w3.org/XML/1998/namespace', key, val); } function bindStyle(svgEl, style, el) { var opacity = style.opacity == null ? 1 : style.opacity; if (el instanceof ZRImage) { svgEl.style.opacity = opacity + ''; return; } if (pathHasFill(style)) { var fill = style.fill; fill = fill === 'transparent' ? NONE : fill; attr(svgEl, 'fill', fill); attr(svgEl, 'fill-opacity', (style.fillOpacity != null ? style.fillOpacity * opacity : opacity) + ''); } else { attr(svgEl, 'fill', NONE); } if (pathHasStroke(style)) { var stroke = style.stroke; stroke = stroke === 'transparent' ? NONE : stroke; attr(svgEl, 'stroke', stroke); var strokeWidth = style.lineWidth; var strokeScale_1 = style.strokeNoScale ? el.getLineScale() : 1; attr(svgEl, 'stroke-width', (strokeScale_1 ? strokeWidth / strokeScale_1 : 0) + ''); attr(svgEl, 'paint-order', style.strokeFirst ? 'stroke' : 'fill'); attr(svgEl, 'stroke-opacity', (style.strokeOpacity != null ? style.strokeOpacity * opacity : opacity) + ''); var lineDash = style.lineDash && strokeWidth > 0 && normalizeLineDash(style.lineDash, strokeWidth); if (lineDash) { var lineDashOffset = style.lineDashOffset; if (strokeScale_1 && strokeScale_1 !== 1) { lineDash = map(lineDash, function (rawVal) { return rawVal / strokeScale_1; }); if (lineDashOffset) { lineDashOffset /= strokeScale_1; lineDashOffset = mathRound(lineDashOffset); } } attr(svgEl, 'stroke-dasharray', lineDash.join(',')); attr(svgEl, 'stroke-dashoffset', (lineDashOffset || 0) + ''); } else { attr(svgEl, 'stroke-dasharray', ''); } style.lineCap && attr(svgEl, 'stroke-linecap', style.lineCap); style.lineJoin && attr(svgEl, 'stroke-linejoin', style.lineJoin); style.miterLimit && attr(svgEl, 'stroke-miterlimit', style.miterLimit + ''); } else { attr(svgEl, 'stroke', NONE); } } var SVGPathRebuilder = (function () { function SVGPathRebuilder() { } SVGPathRebuilder.prototype.reset = function () { this._d = []; this._str = ''; }; SVGPathRebuilder.prototype.moveTo = function (x, y) { this._add('M', x, y); }; SVGPathRebuilder.prototype.lineTo = function (x, y) { this._add('L', x, y); }; SVGPathRebuilder.prototype.bezierCurveTo = function (x, y, x2, y2, x3, y3) { this._add('C', x, y, x2, y2, x3, y3); }; SVGPathRebuilder.prototype.quadraticCurveTo = function (x, y, x2, y2) { this._add('Q', x, y, x2, y2); }; SVGPathRebuilder.prototype.arc = function (cx, cy, r, startAngle, endAngle, anticlockwise) { this.ellipse(cx, cy, r, r, 0, startAngle, endAngle, anticlockwise); }; SVGPathRebuilder.prototype.ellipse = function (cx, cy, rx, ry, psi, startAngle, endAngle, anticlockwise) { var firstCmd = this._d.length === 0; var dTheta = endAngle - startAngle; var clockwise = !anticlockwise; var dThetaPositive = Math.abs(dTheta); var isCircle = isAroundZero$1(dThetaPositive - PI2$7) || (clockwise ? dTheta >= PI2$7 : -dTheta >= PI2$7); var unifiedTheta = dTheta > 0 ? dTheta % PI2$7 : (dTheta % PI2$7 + PI2$7); var large = false; if (isCircle) { large = true; } else if (isAroundZero$1(dThetaPositive)) { large = false; } else { large = (unifiedTheta >= PI$4) === !!clockwise; } var x0 = round4(cx + rx * mathCos$4(startAngle)); var y0 = round4(cy + ry * mathSin$4(startAngle)); if (isCircle) { if (clockwise) { dTheta = PI2$7 - 1e-4; } else { dTheta = -PI2$7 + 1e-4; } large = true; if (firstCmd) { this._d.push('M', x0, y0); } } var x = round4(cx + rx * mathCos$4(startAngle + dTheta)); var y = round4(cy + ry * mathSin$4(startAngle + dTheta)); if (isNaN(x0) || isNaN(y0) || isNaN(rx) || isNaN(ry) || isNaN(psi) || isNaN(degree) || isNaN(x) || isNaN(y)) { return ''; } this._d.push('A', round4(rx), round4(ry), mathRound(psi * degree), +large, +clockwise, x, y); }; SVGPathRebuilder.prototype.rect = function (x, y, w, h) { this._add('M', x, y); this._add('L', x + w, y); this._add('L', x + w, y + h); this._add('L', x, y + h); this._add('L', x, y); }; SVGPathRebuilder.prototype.closePath = function () { if (this._d.length > 0) { this._add('Z'); } }; SVGPathRebuilder.prototype._add = function (cmd, a, b, c, d, e, f, g, h) { this._d.push(cmd); for (var i = 1; i < arguments.length; i++) { var val = arguments[i]; if (isNaN(val)) { this._invalid = true; return; } this._d.push(round4(val)); } }; SVGPathRebuilder.prototype.generateStr = function () { this._str = this._invalid ? '' : this._d.join(' '); this._d = []; }; SVGPathRebuilder.prototype.getStr = function () { return this._str; }; return SVGPathRebuilder; }()); var svgPath = { brush: function (el) { var style = el.style; var svgEl = el.__svgEl; if (!svgEl) { svgEl = createElement('path'); el.__svgEl = svgEl; } if (!el.path) { el.createPathProxy(); } var path = el.path; if (el.shapeChanged()) { path.beginPath(); el.buildPath(path, el.shape); el.pathUpdated(); } var pathVersion = path.getVersion(); var elExt = el; var svgPathBuilder = elExt.__svgPathBuilder; if (elExt.__svgPathVersion !== pathVersion || !svgPathBuilder || el.style.strokePercent < 1) { if (!svgPathBuilder) { svgPathBuilder = elExt.__svgPathBuilder = new SVGPathRebuilder(); } svgPathBuilder.reset(); path.rebuildPath(svgPathBuilder, el.style.strokePercent); svgPathBuilder.generateStr(); elExt.__svgPathVersion = pathVersion; } attr(svgEl, 'd', svgPathBuilder.getStr()); bindStyle(svgEl, style, el); setTransform(svgEl, el.transform); } }; var svgImage = { brush: function (el) { var style = el.style; var image = style.image; if (image instanceof HTMLImageElement) { image = image.src; } else if (image instanceof HTMLCanvasElement) { image = image.toDataURL(); } if (!image) { return; } var x = style.x || 0; var y = style.y || 0; var dw = style.width; var dh = style.height; var svgEl = el.__svgEl; if (!svgEl) { svgEl = createElement('image'); el.__svgEl = svgEl; } if (image !== el.__imageSrc) { attrXLink(svgEl, 'href', image); el.__imageSrc = image; } attr(svgEl, 'width', dw + ''); attr(svgEl, 'height', dh + ''); attr(svgEl, 'x', x + ''); attr(svgEl, 'y', y + ''); bindStyle(svgEl, style, el); setTransform(svgEl, el.transform); } }; var TEXT_ALIGN_TO_ANCHOR = { left: 'start', right: 'end', center: 'middle', middle: 'middle' }; function adjustTextY$1(y, lineHeight, textBaseline) { if (textBaseline === 'top') { y += lineHeight / 2; } else if (textBaseline === 'bottom') { y -= lineHeight / 2; } return y; } var svgText = { brush: function (el) { var style = el.style; var text = style.text; text != null && (text += ''); if (!text || isNaN(style.x) || isNaN(style.y)) { return; } var textSvgEl = el.__svgEl; if (!textSvgEl) { textSvgEl = createElement('text'); attrXML(textSvgEl, 'xml:space', 'preserve'); el.__svgEl = textSvgEl; } var font = style.font || DEFAULT_FONT; var textSvgElStyle = textSvgEl.style; textSvgElStyle.font = font; textSvgEl.textContent = text; bindStyle(textSvgEl, style, el); setTransform(textSvgEl, el.transform); var x = style.x || 0; var y = adjustTextY$1(style.y || 0, getLineHeight(font), style.textBaseline); var textAlign = TEXT_ALIGN_TO_ANCHOR[style.textAlign] || style.textAlign; attr(textSvgEl, 'dominant-baseline', 'central'); attr(textSvgEl, 'text-anchor', textAlign); attr(textSvgEl, 'x', x + ''); attr(textSvgEl, 'y', y + ''); } }; var MARK_UNUSED = '0'; var MARK_USED = '1'; var Definable = (function () { function Definable(zrId, svgRoot, tagNames, markLabel, domName) { this.nextId = 0; this._domName = '_dom'; this.createElement = createElement; this._zrId = zrId; this._svgRoot = svgRoot; this._tagNames = typeof tagNames === 'string' ? [tagNames] : tagNames; this._markLabel = markLabel; if (domName) { this._domName = domName; } } Definable.prototype.getDefs = function (isForceCreating) { var svgRoot = this._svgRoot; var defs = this._svgRoot.getElementsByTagName('defs'); if (defs.length === 0) { if (isForceCreating) { var defs_1 = svgRoot.insertBefore(this.createElement('defs'), svgRoot.firstChild); if (!defs_1.contains) { defs_1.contains = function (el) { var children = defs_1.children; if (!children) { return false; } for (var i = children.length - 1; i >= 0; --i) { if (children[i] === el) { return true; } } return false; }; } return defs_1; } else { return null; } } else { return defs[0]; } }; Definable.prototype.doUpdate = function (target, onUpdate) { if (!target) { return; } var defs = this.getDefs(false); if (target[this._domName] && defs.contains(target[this._domName])) { if (typeof onUpdate === 'function') { onUpdate(target); } } else { var dom = this.add(target); if (dom) { target[this._domName] = dom; } } }; Definable.prototype.add = function (target) { return null; }; Definable.prototype.addDom = function (dom) { var defs = this.getDefs(true); if (dom.parentNode !== defs) { defs.appendChild(dom); } }; Definable.prototype.removeDom = function (target) { var defs = this.getDefs(false); if (defs && target[this._domName]) { defs.removeChild(target[this._domName]); target[this._domName] = null; } }; Definable.prototype.getDoms = function () { var defs = this.getDefs(false); if (!defs) { return []; } var doms = []; each(this._tagNames, function (tagName) { var tags = defs.getElementsByTagName(tagName); for (var i = 0; i < tags.length; i++) { doms.push(tags[i]); } }); return doms; }; Definable.prototype.markAllUnused = function () { var doms = this.getDoms(); var that = this; each(doms, function (dom) { dom[that._markLabel] = MARK_UNUSED; }); }; Definable.prototype.markDomUsed = function (dom) { dom && (dom[this._markLabel] = MARK_USED); }; Definable.prototype.markDomUnused = function (dom) { dom && (dom[this._markLabel] = MARK_UNUSED); }; Definable.prototype.isDomUnused = function (dom) { return dom && dom[this._markLabel] !== MARK_USED; }; Definable.prototype.removeUnused = function () { var _this = this; var defs = this.getDefs(false); if (!defs) { return; } var doms = this.getDoms(); each(doms, function (dom) { if (_this.isDomUnused(dom)) { defs.removeChild(dom); } }); }; Definable.prototype.getSvgProxy = function (displayable) { if (displayable instanceof Path) { return svgPath; } else if (displayable instanceof ZRImage) { return svgImage; } else if (displayable instanceof TSpan) { return svgText; } else { return svgPath; } }; Definable.prototype.getSvgElement = function (displayable) { return displayable.__svgEl; }; return Definable; }()); function isLinearGradient(value) { return value.type === 'linear'; } function isRadialGradient(value) { return value.type === 'radial'; } function isGradient(value) { return value && (value.type === 'linear' || value.type === 'radial'); } var GradientManager = (function (_super) { __extends(GradientManager, _super); function GradientManager(zrId, svgRoot) { return _super.call(this, zrId, svgRoot, ['linearGradient', 'radialGradient'], '__gradient_in_use__') || this; } GradientManager.prototype.addWithoutUpdate = function (svgElement, displayable) { if (displayable && displayable.style) { var that_1 = this; each(['fill', 'stroke'], function (fillOrStroke) { var value = displayable.style[fillOrStroke]; if (isGradient(value)) { var gradient = value; var defs = that_1.getDefs(true); var dom = void 0; if (gradient.__dom) { dom = gradient.__dom; if (!defs.contains(gradient.__dom)) { that_1.addDom(dom); } } else { dom = that_1.add(gradient); } that_1.markUsed(displayable); var id = dom.getAttribute('id'); svgElement.setAttribute(fillOrStroke, 'url(#' + id + ')'); } }); } }; GradientManager.prototype.add = function (gradient) { var dom; if (isLinearGradient(gradient)) { dom = this.createElement('linearGradient'); } else if (isRadialGradient(gradient)) { dom = this.createElement('radialGradient'); } else { logError('Illegal gradient type.'); return null; } gradient.id = gradient.id || this.nextId++; dom.setAttribute('id', 'zr' + this._zrId + '-gradient-' + gradient.id); this.updateDom(gradient, dom); this.addDom(dom); return dom; }; GradientManager.prototype.update = function (gradient) { if (!isGradient(gradient)) { return; } var that = this; this.doUpdate(gradient, function () { var dom = gradient.__dom; if (!dom) { return; } var tagName = dom.tagName; var type = gradient.type; if (type === 'linear' && tagName === 'linearGradient' || type === 'radial' && tagName === 'radialGradient') { that.updateDom(gradient, gradient.__dom); } else { that.removeDom(gradient); that.add(gradient); } }); }; GradientManager.prototype.updateDom = function (gradient, dom) { if (isLinearGradient(gradient)) { dom.setAttribute('x1', gradient.x + ''); dom.setAttribute('y1', gradient.y + ''); dom.setAttribute('x2', gradient.x2 + ''); dom.setAttribute('y2', gradient.y2 + ''); } else if (isRadialGradient(gradient)) { dom.setAttribute('cx', gradient.x + ''); dom.setAttribute('cy', gradient.y + ''); dom.setAttribute('r', gradient.r + ''); } else { logError('Illegal gradient type.'); return; } if (gradient.global) { dom.setAttribute('gradientUnits', 'userSpaceOnUse'); } else { dom.setAttribute('gradientUnits', 'objectBoundingBox'); } dom.innerHTML = ''; var colors = gradient.colorStops; for (var i = 0, len = colors.length; i < len; ++i) { var stop_1 = this.createElement('stop'); stop_1.setAttribute('offset', colors[i].offset * 100 + '%'); var color$1 = colors[i].color; if (color$1.indexOf('rgba') > -1) { var opacity = parse(color$1)[3]; var hex = toHex(color$1); stop_1.setAttribute('stop-color', '#' + hex); stop_1.setAttribute('stop-opacity', opacity + ''); } else { stop_1.setAttribute('stop-color', colors[i].color); } dom.appendChild(stop_1); } gradient.__dom = dom; }; GradientManager.prototype.markUsed = function (displayable) { if (displayable.style) { var gradient = displayable.style.fill; if (gradient && gradient.__dom) { _super.prototype.markDomUsed.call(this, gradient.__dom); } gradient = displayable.style.stroke; if (gradient && gradient.__dom) { _super.prototype.markDomUsed.call(this, gradient.__dom); } } }; return GradientManager; }(Definable)); function isPattern(value) { return value && (!!value.image || !!value.svgElement); } var patternDomMap = new WeakMap(); var PatternManager = (function (_super) { __extends(PatternManager, _super); function PatternManager(zrId, svgRoot) { return _super.call(this, zrId, svgRoot, ['pattern'], '__pattern_in_use__') || this; } PatternManager.prototype.addWithoutUpdate = function (svgElement, displayable) { if (displayable && displayable.style) { var that_1 = this; each(['fill', 'stroke'], function (fillOrStroke) { var pattern = displayable.style[fillOrStroke]; if (isPattern(pattern)) { var defs = that_1.getDefs(true); var dom = patternDomMap.get(pattern); if (dom) { if (!defs.contains(dom)) { that_1.addDom(dom); } } else { dom = that_1.add(pattern); } that_1.markUsed(displayable); var id = dom.getAttribute('id'); svgElement.setAttribute(fillOrStroke, 'url(#' + id + ')'); } }); } }; PatternManager.prototype.add = function (pattern) { if (!isPattern(pattern)) { return; } var dom = this.createElement('pattern'); pattern.id = pattern.id == null ? this.nextId++ : pattern.id; dom.setAttribute('id', 'zr' + this._zrId + '-pattern-' + pattern.id); dom.setAttribute('x', '0'); dom.setAttribute('y', '0'); dom.setAttribute('patternUnits', 'userSpaceOnUse'); this.updateDom(pattern, dom); this.addDom(dom); return dom; }; PatternManager.prototype.update = function (pattern) { if (!isPattern(pattern)) { return; } var that = this; this.doUpdate(pattern, function () { var dom = patternDomMap.get(pattern); that.updateDom(pattern, dom); }); }; PatternManager.prototype.updateDom = function (pattern, patternDom) { var svgElement = pattern.svgElement; if (svgElement instanceof SVGElement) { if (svgElement.parentNode !== patternDom) { patternDom.innerHTML = ''; patternDom.appendChild(svgElement); patternDom.setAttribute('width', pattern.svgWidth + ''); patternDom.setAttribute('height', pattern.svgHeight + ''); } } else { var img = void 0; var prevImage = patternDom.getElementsByTagName('image'); if (prevImage.length) { if (pattern.image) { img = prevImage[0]; } else { patternDom.removeChild(prevImage[0]); return; } } else if (pattern.image) { img = this.createElement('image'); } if (img) { var imageSrc = void 0; if (typeof pattern.image === 'string') { imageSrc = pattern.image; } else if (pattern.image instanceof HTMLImageElement) { imageSrc = pattern.image.src; } else if (pattern.image instanceof HTMLCanvasElement) { imageSrc = pattern.image.toDataURL(); } if (imageSrc) { img.setAttribute('href', imageSrc); img.setAttribute('x', '0'); img.setAttribute('y', '0'); var hostEl = { dirty: function () { } }; var createdImage = createOrUpdateImage(imageSrc, img, hostEl, function (img) { patternDom.setAttribute('width', img.width + ''); patternDom.setAttribute('height', img.height + ''); }); if (createdImage && createdImage.width && createdImage.height) { patternDom.setAttribute('width', createdImage.width + ''); patternDom.setAttribute('height', createdImage.height + ''); } patternDom.appendChild(img); } } } var x = pattern.x || 0; var y = pattern.y || 0; var rotation = (pattern.rotation || 0) / Math.PI * 180; var scaleX = pattern.scaleX || 1; var scaleY = pattern.scaleY || 1; var transform = "translate(" + x + ", " + y + ") rotate(" + rotation + ") scale(" + scaleX + ", " + scaleY + ")"; patternDom.setAttribute('patternTransform', transform); patternDomMap.set(pattern, patternDom); }; PatternManager.prototype.markUsed = function (displayable) { if (displayable.style) { if (isPattern(displayable.style.fill)) { _super.prototype.markDomUsed.call(this, patternDomMap.get(displayable.style.fill)); } if (isPattern(displayable.style.stroke)) { _super.prototype.markDomUsed.call(this, patternDomMap.get(displayable.style.stroke)); } } }; return PatternManager; }(Definable)); function generateClipPathsKey(clipPaths) { var key = []; if (clipPaths) { for (var i = 0; i < clipPaths.length; i++) { var clipPath = clipPaths[i]; key.push(clipPath.id); } } return key.join(','); } function hasClipPath(displayable) { var clipPaths = displayable.__clipPaths; return clipPaths && clipPaths.length > 0; } var ClippathManager = (function (_super) { __extends(ClippathManager, _super); function ClippathManager(zrId, svgRoot) { var _this = _super.call(this, zrId, svgRoot, 'clipPath', '__clippath_in_use__') || this; _this._refGroups = {}; _this._keyDuplicateCount = {}; return _this; } ClippathManager.prototype.markAllUnused = function () { _super.prototype.markAllUnused.call(this); for (var key in this._refGroups) { this.markDomUnused(this._refGroups[key]); } this._keyDuplicateCount = {}; }; ClippathManager.prototype._getClipPathGroup = function (displayable, prevDisplayable) { if (!hasClipPath(displayable)) { return; } var clipPaths = displayable.__clipPaths; var keyDuplicateCount = this._keyDuplicateCount; var clipPathKey = generateClipPathsKey(clipPaths); if (isClipPathChanged(clipPaths, prevDisplayable && prevDisplayable.__clipPaths)) { keyDuplicateCount[clipPathKey] = keyDuplicateCount[clipPathKey] || 0; keyDuplicateCount[clipPathKey] && (clipPathKey += '-' + keyDuplicateCount[clipPathKey]); keyDuplicateCount[clipPathKey]++; } return this._refGroups[clipPathKey] || (this._refGroups[clipPathKey] = this.createElement('g')); }; ClippathManager.prototype.update = function (displayable, prevDisplayable) { var clipGroup = this._getClipPathGroup(displayable, prevDisplayable); if (clipGroup) { this.markDomUsed(clipGroup); this.updateDom(clipGroup, displayable.__clipPaths); } return clipGroup; }; ClippathManager.prototype.updateDom = function (parentEl, clipPaths) { if (clipPaths && clipPaths.length > 0) { var defs = this.getDefs(true); var clipPath = clipPaths[0]; var clipPathEl = void 0; var id = void 0; if (clipPath._dom) { id = clipPath._dom.getAttribute('id'); clipPathEl = clipPath._dom; if (!defs.contains(clipPathEl)) { defs.appendChild(clipPathEl); } } else { id = 'zr' + this._zrId + '-clip-' + this.nextId; ++this.nextId; clipPathEl = this.createElement('clipPath'); clipPathEl.setAttribute('id', id); defs.appendChild(clipPathEl); clipPath._dom = clipPathEl; } var svgProxy = this.getSvgProxy(clipPath); svgProxy.brush(clipPath); var pathEl = this.getSvgElement(clipPath); clipPathEl.innerHTML = ''; clipPathEl.appendChild(pathEl); parentEl.setAttribute('clip-path', 'url(#' + id + ')'); if (clipPaths.length > 1) { this.updateDom(clipPathEl, clipPaths.slice(1)); } } else { if (parentEl) { parentEl.setAttribute('clip-path', 'none'); } } }; ClippathManager.prototype.markUsed = function (displayable) { var _this = this; if (displayable.__clipPaths) { each(displayable.__clipPaths, function (clipPath) { if (clipPath._dom) { _super.prototype.markDomUsed.call(_this, clipPath._dom); } }); } }; ClippathManager.prototype.removeUnused = function () { _super.prototype.removeUnused.call(this); var newRefGroupsMap = {}; for (var key in this._refGroups) { var group = this._refGroups[key]; if (!this.isDomUnused(group)) { newRefGroupsMap[key] = group; } else if (group.parentNode) { group.parentNode.removeChild(group); } } this._refGroups = newRefGroupsMap; }; return ClippathManager; }(Definable)); var ShadowManager = (function (_super) { __extends(ShadowManager, _super); function ShadowManager(zrId, svgRoot) { var _this = _super.call(this, zrId, svgRoot, ['filter'], '__filter_in_use__', '_shadowDom') || this; _this._shadowDomMap = {}; _this._shadowDomPool = []; return _this; } ShadowManager.prototype._getFromPool = function () { var shadowDom = this._shadowDomPool.pop(); if (!shadowDom) { shadowDom = this.createElement('filter'); shadowDom.setAttribute('id', 'zr' + this._zrId + '-shadow-' + this.nextId++); var domChild = this.createElement('feDropShadow'); shadowDom.appendChild(domChild); this.addDom(shadowDom); } return shadowDom; }; ShadowManager.prototype.update = function (svgElement, displayable) { var style = displayable.style; if (hasShadow(style)) { var shadowKey = getShadowKey(displayable); var shadowDom = displayable._shadowDom = this._shadowDomMap[shadowKey]; if (!shadowDom) { shadowDom = this._getFromPool(); this._shadowDomMap[shadowKey] = shadowDom; } this.updateDom(svgElement, displayable, shadowDom); } else { this.remove(svgElement, displayable); } }; ShadowManager.prototype.remove = function (svgElement, displayable) { if (displayable._shadowDom != null) { displayable._shadowDom = null; svgElement.style.filter = ''; } }; ShadowManager.prototype.updateDom = function (svgElement, displayable, shadowDom) { var domChild = shadowDom.children[0]; var style = displayable.style; var globalScale = displayable.getGlobalScale(); var scaleX = globalScale[0]; var scaleY = globalScale[1]; if (!scaleX || !scaleY) { return; } var offsetX = style.shadowOffsetX || 0; var offsetY = style.shadowOffsetY || 0; var blur = style.shadowBlur; var color = style.shadowColor; domChild.setAttribute('dx', offsetX / scaleX + ''); domChild.setAttribute('dy', offsetY / scaleY + ''); domChild.setAttribute('flood-color', color); var stdDx = blur / 2 / scaleX; var stdDy = blur / 2 / scaleY; var stdDeviation = stdDx + ' ' + stdDy; domChild.setAttribute('stdDeviation', stdDeviation); shadowDom.setAttribute('x', '-100%'); shadowDom.setAttribute('y', '-100%'); shadowDom.setAttribute('width', '300%'); shadowDom.setAttribute('height', '300%'); displayable._shadowDom = shadowDom; var id = shadowDom.getAttribute('id'); svgElement.style.filter = 'url(#' + id + ')'; }; ShadowManager.prototype.removeUnused = function () { var defs = this.getDefs(false); if (!defs) { return; } var shadowDomsPool = this._shadowDomPool; for (var key in this._shadowDomMap) { var dom = this._shadowDomMap[key]; shadowDomsPool.push(dom); } this._shadowDomMap = {}; }; return ShadowManager; }(Definable)); function hasShadow(style) { return style && (style.shadowBlur || style.shadowOffsetX || style.shadowOffsetY); } function getShadowKey(displayable) { var style = displayable.style; var globalScale = displayable.getGlobalScale(); return [ style.shadowColor, (style.shadowBlur || 0).toFixed(2), (style.shadowOffsetX || 0).toFixed(2), (style.shadowOffsetY || 0).toFixed(2), globalScale[0], globalScale[1] ].join(','); } function parseInt10(val) { return parseInt(val, 10); } function getSvgProxy(el) { if (el instanceof Path) { return svgPath; } else if (el instanceof ZRImage) { return svgImage; } else if (el instanceof TSpan) { return svgText; } else { return svgPath; } } function checkParentAvailable(parent, child) { return child && parent && child.parentNode !== parent; } function insertAfter(parent, child, prevSibling) { if (checkParentAvailable(parent, child) && prevSibling) { var nextSibling = prevSibling.nextSibling; nextSibling ? parent.insertBefore(child, nextSibling) : parent.appendChild(child); } } function prepend(parent, child) { if (checkParentAvailable(parent, child)) { var firstChild = parent.firstChild; firstChild ? parent.insertBefore(child, firstChild) : parent.appendChild(child); } } function remove(parent, child) { if (child && parent && child.parentNode === parent) { parent.removeChild(child); } } function removeFromMyParent(child) { if (child && child.parentNode) { child.parentNode.removeChild(child); } } function getSvgElement(displayable) { return displayable.__svgEl; } var SVGPainter = (function () { function SVGPainter(root, storage, opts, zrId) { this.type = 'svg'; this.refreshHover = createMethodNotSupport('refreshHover'); this.pathToImage = createMethodNotSupport('pathToImage'); this.configLayer = createMethodNotSupport('configLayer'); this.root = root; this.storage = storage; this._opts = opts = extend({}, opts || {}); var svgDom = createElement('svg'); svgDom.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns', 'http://www.w3.org/2000/svg'); svgDom.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xlink', 'http://www.w3.org/1999/xlink'); svgDom.setAttribute('version', '1.1'); svgDom.setAttribute('baseProfile', 'full'); svgDom.style.cssText = 'user-select:none;position:absolute;left:0;top:0;'; var bgRoot = createElement('g'); svgDom.appendChild(bgRoot); var svgRoot = createElement('g'); svgDom.appendChild(svgRoot); this._gradientManager = new GradientManager(zrId, svgRoot); this._patternManager = new PatternManager(zrId, svgRoot); this._clipPathManager = new ClippathManager(zrId, svgRoot); this._shadowManager = new ShadowManager(zrId, svgRoot); var viewport = document.createElement('div'); viewport.style.cssText = 'overflow:hidden;position:relative'; this._svgDom = svgDom; this._svgRoot = svgRoot; this._backgroundRoot = bgRoot; this._viewport = viewport; root.appendChild(viewport); viewport.appendChild(svgDom); this.resize(opts.width, opts.height); this._visibleList = []; } SVGPainter.prototype.getType = function () { return 'svg'; }; SVGPainter.prototype.getViewportRoot = function () { return this._viewport; }; SVGPainter.prototype.getSvgDom = function () { return this._svgDom; }; SVGPainter.prototype.getSvgRoot = function () { return this._svgRoot; }; SVGPainter.prototype.getViewportRootOffset = function () { var viewportRoot = this.getViewportRoot(); if (viewportRoot) { return { offsetLeft: viewportRoot.offsetLeft || 0, offsetTop: viewportRoot.offsetTop || 0 }; } }; SVGPainter.prototype.refresh = function () { var list = this.storage.getDisplayList(true); this._paintList(list); }; SVGPainter.prototype.setBackgroundColor = function (backgroundColor) { if (this._backgroundRoot && this._backgroundNode) { this._backgroundRoot.removeChild(this._backgroundNode); } var bgNode = createElement('rect'); bgNode.setAttribute('width', this.getWidth()); bgNode.setAttribute('height', this.getHeight()); bgNode.setAttribute('x', 0); bgNode.setAttribute('y', 0); bgNode.setAttribute('id', 0); bgNode.style.fill = backgroundColor; this._backgroundRoot.appendChild(bgNode); this._backgroundNode = bgNode; }; SVGPainter.prototype.createSVGElement = function (tag) { return createElement(tag); }; SVGPainter.prototype.paintOne = function (el) { var svgProxy = getSvgProxy(el); svgProxy && svgProxy.brush(el); return getSvgElement(el); }; SVGPainter.prototype._paintList = function (list) { var gradientManager = this._gradientManager; var patternManager = this._patternManager; var clipPathManager = this._clipPathManager; var shadowManager = this._shadowManager; gradientManager.markAllUnused(); patternManager.markAllUnused(); clipPathManager.markAllUnused(); shadowManager.markAllUnused(); var svgRoot = this._svgRoot; var visibleList = this._visibleList; var listLen = list.length; var newVisibleList = []; for (var i = 0; i < listLen; i++) { var displayable = list[i]; var svgProxy = getSvgProxy(displayable); var svgElement = getSvgElement(displayable); if (!displayable.invisible) { if (displayable.__dirty || !svgElement) { svgProxy && svgProxy.brush(displayable); svgElement = getSvgElement(displayable); if (svgElement && displayable.style) { gradientManager.update(displayable.style.fill); gradientManager.update(displayable.style.stroke); patternManager.update(displayable.style.fill); patternManager.update(displayable.style.stroke); shadowManager.update(svgElement, displayable); } displayable.__dirty = 0; } if (svgElement) { newVisibleList.push(displayable); } } } var diff = arrayDiff(visibleList, newVisibleList); var prevSvgElement; var topPrevSvgElement; for (var i = 0; i < diff.length; i++) { var item = diff[i]; if (item.removed) { for (var k = 0; k < item.count; k++) { var displayable = visibleList[item.indices[k]]; var svgElement = getSvgElement(displayable); hasClipPath(displayable) ? removeFromMyParent(svgElement) : remove(svgRoot, svgElement); } } } var prevDisplayable; var currentClipGroup; for (var i = 0; i < diff.length; i++) { var item = diff[i]; if (item.removed) { continue; } for (var k = 0; k < item.count; k++) { var displayable = newVisibleList[item.indices[k]]; var clipGroup = clipPathManager.update(displayable, prevDisplayable); if (clipGroup !== currentClipGroup) { prevSvgElement = topPrevSvgElement; if (clipGroup) { prevSvgElement ? insertAfter(svgRoot, clipGroup, prevSvgElement) : prepend(svgRoot, clipGroup); topPrevSvgElement = clipGroup; prevSvgElement = null; } currentClipGroup = clipGroup; } var svgElement = getSvgElement(displayable); prevSvgElement ? insertAfter(currentClipGroup || svgRoot, svgElement, prevSvgElement) : prepend(currentClipGroup || svgRoot, svgElement); prevSvgElement = svgElement || prevSvgElement; if (!currentClipGroup) { topPrevSvgElement = prevSvgElement; } gradientManager.markUsed(displayable); gradientManager.addWithoutUpdate(svgElement, displayable); patternManager.markUsed(displayable); patternManager.addWithoutUpdate(svgElement, displayable); clipPathManager.markUsed(displayable); prevDisplayable = displayable; } } gradientManager.removeUnused(); patternManager.removeUnused(); clipPathManager.removeUnused(); shadowManager.removeUnused(); this._visibleList = newVisibleList; }; SVGPainter.prototype.resize = function (width, height) { var viewport = this._viewport; viewport.style.display = 'none'; var opts = this._opts; width != null && (opts.width = width); height != null && (opts.height = height); width = this._getSize(0); height = this._getSize(1); viewport.style.display = ''; if (this._width !== width || this._height !== height) { this._width = width; this._height = height; var viewportStyle = viewport.style; viewportStyle.width = width + 'px'; viewportStyle.height = height + 'px'; var svgRoot = this._svgDom; svgRoot.setAttribute('width', width + ''); svgRoot.setAttribute('height', height + ''); } if (this._backgroundNode) { this._backgroundNode.setAttribute('width', width); this._backgroundNode.setAttribute('height', height); } }; SVGPainter.prototype.getWidth = function () { return this._width; }; SVGPainter.prototype.getHeight = function () { return this._height; }; SVGPainter.prototype._getSize = function (whIdx) { var opts = this._opts; var wh = ['width', 'height'][whIdx]; var cwh = ['clientWidth', 'clientHeight'][whIdx]; var plt = ['paddingLeft', 'paddingTop'][whIdx]; var prb = ['paddingRight', 'paddingBottom'][whIdx]; if (opts[wh] != null && opts[wh] !== 'auto') { return parseFloat(opts[wh]); } var root = this.root; var stl = document.defaultView.getComputedStyle(root); return ((root[cwh] || parseInt10(stl[wh]) || parseInt10(root.style[wh])) - (parseInt10(stl[plt]) || 0) - (parseInt10(stl[prb]) || 0)) | 0; }; SVGPainter.prototype.dispose = function () { this.root.innerHTML = ''; this._svgRoot = this._backgroundRoot = this._svgDom = this._backgroundNode = this._viewport = this.storage = null; }; SVGPainter.prototype.clear = function () { var viewportNode = this._viewport; if (viewportNode && viewportNode.parentNode) { viewportNode.parentNode.removeChild(viewportNode); } }; SVGPainter.prototype.toDataURL = function () { this.refresh(); var svgDom = this._svgDom; var outerHTML = svgDom.outerHTML || (svgDom.parentNode && svgDom.parentNode).innerHTML; var html = encodeURIComponent(outerHTML.replace(/>\n\r<')); return 'data:image/svg+xml;charset=UTF-8,' + html; }; return SVGPainter; }()); function createMethodNotSupport(method) { return function () { logError('In SVG mode painter not support method "' + method + '"'); }; } function install(registers) { registers.registerPainter('svg', SVGPainter); } function returnFalse() { return false; } function createDom(id, painter, dpr) { var newDom = createCanvas(); var width = painter.getWidth(); var height = painter.getHeight(); var newDomStyle = newDom.style; if (newDomStyle) { newDomStyle.position = 'absolute'; newDomStyle.left = '0'; newDomStyle.top = '0'; newDomStyle.width = width + 'px'; newDomStyle.height = height + 'px'; newDom.setAttribute('data-zr-dom-id', id); } newDom.width = width * dpr; newDom.height = height * dpr; return newDom; } var Layer = (function (_super) { __extends(Layer, _super); function Layer(id, painter, dpr) { var _this = _super.call(this) || this; _this.motionBlur = false; _this.lastFrameAlpha = 0.7; _this.dpr = 1; _this.virtual = false; _this.config = {}; _this.incremental = false; _this.zlevel = 0; _this.maxRepaintRectCount = 5; _this.__dirty = true; _this.__firstTimePaint = true; _this.__used = false; _this.__drawIndex = 0; _this.__startIndex = 0; _this.__endIndex = 0; _this.__prevStartIndex = null; _this.__prevEndIndex = null; var dom; dpr = dpr || devicePixelRatio; if (typeof id === 'string') { dom = createDom(id, painter, dpr); } else if (isObject(id)) { dom = id; id = dom.id; } _this.id = id; _this.dom = dom; var domStyle = dom.style; if (domStyle) { dom.onselectstart = returnFalse; domStyle.webkitUserSelect = 'none'; domStyle.userSelect = 'none'; domStyle.webkitTapHighlightColor = 'rgba(0,0,0,0)'; domStyle['-webkit-touch-callout'] = 'none'; domStyle.padding = '0'; domStyle.margin = '0'; domStyle.borderWidth = '0'; } _this.domBack = null; _this.ctxBack = null; _this.painter = painter; _this.config = null; _this.dpr = dpr; return _this; } Layer.prototype.getElementCount = function () { return this.__endIndex - this.__startIndex; }; Layer.prototype.afterBrush = function () { this.__prevStartIndex = this.__startIndex; this.__prevEndIndex = this.__endIndex; }; Layer.prototype.initContext = function () { this.ctx = this.dom.getContext('2d'); this.ctx.dpr = this.dpr; }; Layer.prototype.setUnpainted = function () { this.__firstTimePaint = true; }; Layer.prototype.createBackBuffer = function () { var dpr = this.dpr; this.domBack = createDom('back-' + this.id, this.painter, dpr); this.ctxBack = this.domBack.getContext('2d'); if (dpr !== 1) { this.ctxBack.scale(dpr, dpr); } }; Layer.prototype.createRepaintRects = function (displayList, prevList, viewWidth, viewHeight) { if (this.__firstTimePaint) { this.__firstTimePaint = false; return null; } var mergedRepaintRects = []; var maxRepaintRectCount = this.maxRepaintRectCount; var full = false; var pendingRect = new BoundingRect(0, 0, 0, 0); function addRectToMergePool(rect) { if (!rect.isFinite() || rect.isZero()) { return; } if (mergedRepaintRects.length === 0) { var boundingRect = new BoundingRect(0, 0, 0, 0); boundingRect.copy(rect); mergedRepaintRects.push(boundingRect); } else { var isMerged = false; var minDeltaArea = Infinity; var bestRectToMergeIdx = 0; for (var i = 0; i < mergedRepaintRects.length; ++i) { var mergedRect = mergedRepaintRects[i]; if (mergedRect.intersect(rect)) { var pendingRect_1 = new BoundingRect(0, 0, 0, 0); pendingRect_1.copy(mergedRect); pendingRect_1.union(rect); mergedRepaintRects[i] = pendingRect_1; isMerged = true; break; } else if (full) { pendingRect.copy(rect); pendingRect.union(mergedRect); var aArea = rect.width * rect.height; var bArea = mergedRect.width * mergedRect.height; var pendingArea = pendingRect.width * pendingRect.height; var deltaArea = pendingArea - aArea - bArea; if (deltaArea < minDeltaArea) { minDeltaArea = deltaArea; bestRectToMergeIdx = i; } } } if (full) { mergedRepaintRects[bestRectToMergeIdx].union(rect); isMerged = true; } if (!isMerged) { var boundingRect = new BoundingRect(0, 0, 0, 0); boundingRect.copy(rect); mergedRepaintRects.push(boundingRect); } if (!full) { full = mergedRepaintRects.length >= maxRepaintRectCount; } } } for (var i = this.__startIndex; i < this.__endIndex; ++i) { var el = displayList[i]; if (el) { var shouldPaint = el.shouldBePainted(viewWidth, viewHeight, true, true); var prevRect = el.__isRendered && ((el.__dirty & Element.REDARAW_BIT) || !shouldPaint) ? el.getPrevPaintRect() : null; if (prevRect) { addRectToMergePool(prevRect); } var curRect = shouldPaint && ((el.__dirty & Element.REDARAW_BIT) || !el.__isRendered) ? el.getPaintRect() : null; if (curRect) { addRectToMergePool(curRect); } } } for (var i = this.__prevStartIndex; i < this.__prevEndIndex; ++i) { var el = prevList[i]; var shouldPaint = el.shouldBePainted(viewWidth, viewHeight, true, true); if (el && (!shouldPaint || !el.__zr) && el.__isRendered) { var prevRect = el.getPrevPaintRect(); if (prevRect) { addRectToMergePool(prevRect); } } } var hasIntersections; do { hasIntersections = false; for (var i = 0; i < mergedRepaintRects.length;) { if (mergedRepaintRects[i].isZero()) { mergedRepaintRects.splice(i, 1); continue; } for (var j = i + 1; j < mergedRepaintRects.length;) { if (mergedRepaintRects[i].intersect(mergedRepaintRects[j])) { hasIntersections = true; mergedRepaintRects[i].union(mergedRepaintRects[j]); mergedRepaintRects.splice(j, 1); } else { j++; } } i++; } } while (hasIntersections); this._paintRects = mergedRepaintRects; return mergedRepaintRects; }; Layer.prototype.debugGetPaintRects = function () { return (this._paintRects || []).slice(); }; Layer.prototype.resize = function (width, height) { var dpr = this.dpr; var dom = this.dom; var domStyle = dom.style; var domBack = this.domBack; if (domStyle) { domStyle.width = width + 'px'; domStyle.height = height + 'px'; } dom.width = width * dpr; dom.height = height * dpr; if (domBack) { domBack.width = width * dpr; domBack.height = height * dpr; if (dpr !== 1) { this.ctxBack.scale(dpr, dpr); } } }; Layer.prototype.clear = function (clearAll, clearColor, repaintRects) { var dom = this.dom; var ctx = this.ctx; var width = dom.width; var height = dom.height; clearColor = clearColor || this.clearColor; var haveMotionBLur = this.motionBlur && !clearAll; var lastFrameAlpha = this.lastFrameAlpha; var dpr = this.dpr; var self = this; if (haveMotionBLur) { if (!this.domBack) { this.createBackBuffer(); } this.ctxBack.globalCompositeOperation = 'copy'; this.ctxBack.drawImage(dom, 0, 0, width / dpr, height / dpr); } var domBack = this.domBack; function doClear(x, y, width, height) { ctx.clearRect(x, y, width, height); if (clearColor && clearColor !== 'transparent') { var clearColorGradientOrPattern = void 0; if (isGradientObject(clearColor)) { clearColorGradientOrPattern = clearColor.__canvasGradient || getCanvasGradient(ctx, clearColor, { x: 0, y: 0, width: width, height: height }); clearColor.__canvasGradient = clearColorGradientOrPattern; } else if (isPatternObject(clearColor)) { clearColorGradientOrPattern = createCanvasPattern(ctx, clearColor, { dirty: function () { self.setUnpainted(); self.__painter.refresh(); } }); } ctx.save(); ctx.fillStyle = clearColorGradientOrPattern || clearColor; ctx.fillRect(x, y, width, height); ctx.restore(); } if (haveMotionBLur) { ctx.save(); ctx.globalAlpha = lastFrameAlpha; ctx.drawImage(domBack, x, y, width, height); ctx.restore(); } } if (!repaintRects || haveMotionBLur) { doClear(0, 0, width, height); } else if (repaintRects.length) { each(repaintRects, function (rect) { doClear(rect.x * dpr, rect.y * dpr, rect.width * dpr, rect.height * dpr); }); } }; return Layer; }(Eventful)); var HOVER_LAYER_ZLEVEL = 1e5; var CANVAS_ZLEVEL = 314159; var EL_AFTER_INCREMENTAL_INC = 0.01; var INCREMENTAL_INC = 0.001; function parseInt10$1(val) { return parseInt(val, 10); } function isLayerValid(layer) { if (!layer) { return false; } if (layer.__builtin__) { return true; } if (typeof (layer.resize) !== 'function' || typeof (layer.refresh) !== 'function') { return false; } return true; } function createRoot(width, height) { var domRoot = document.createElement('div'); domRoot.style.cssText = [ 'position:relative', 'width:' + width + 'px', 'height:' + height + 'px', 'padding:0', 'margin:0', 'border-width:0' ].join(';') + ';'; return domRoot; } var CanvasPainter = (function () { function CanvasPainter(root, storage, opts, id) { this.type = 'canvas'; this._zlevelList = []; this._prevDisplayList = []; this._layers = {}; this._layerConfig = {}; this._needsManuallyCompositing = false; this.type = 'canvas'; var singleCanvas = !root.nodeName || root.nodeName.toUpperCase() === 'CANVAS'; this._opts = opts = extend({}, opts || {}); this.dpr = opts.devicePixelRatio || devicePixelRatio; this._singleCanvas = singleCanvas; this.root = root; var rootStyle = root.style; if (rootStyle) { rootStyle.webkitTapHighlightColor = 'transparent'; rootStyle.webkitUserSelect = 'none'; rootStyle.userSelect = 'none'; rootStyle['-webkit-touch-callout'] = 'none'; root.innerHTML = ''; } this.storage = storage; var zlevelList = this._zlevelList; this._prevDisplayList = []; var layers = this._layers; if (!singleCanvas) { this._width = this._getSize(0); this._height = this._getSize(1); var domRoot = this._domRoot = createRoot(this._width, this._height); root.appendChild(domRoot); } else { var rootCanvas = root; var width = rootCanvas.width; var height = rootCanvas.height; if (opts.width != null) { width = opts.width; } if (opts.height != null) { height = opts.height; } this.dpr = opts.devicePixelRatio || 1; rootCanvas.width = width * this.dpr; rootCanvas.height = height * this.dpr; this._width = width; this._height = height; var mainLayer = new Layer(rootCanvas, this, this.dpr); mainLayer.__builtin__ = true; mainLayer.initContext(); layers[CANVAS_ZLEVEL] = mainLayer; mainLayer.zlevel = CANVAS_ZLEVEL; zlevelList.push(CANVAS_ZLEVEL); this._domRoot = root; } } CanvasPainter.prototype.getType = function () { return 'canvas'; }; CanvasPainter.prototype.isSingleCanvas = function () { return this._singleCanvas; }; CanvasPainter.prototype.getViewportRoot = function () { return this._domRoot; }; CanvasPainter.prototype.getViewportRootOffset = function () { var viewportRoot = this.getViewportRoot(); if (viewportRoot) { return { offsetLeft: viewportRoot.offsetLeft || 0, offsetTop: viewportRoot.offsetTop || 0 }; } }; CanvasPainter.prototype.refresh = function (paintAll) { var list = this.storage.getDisplayList(true); var prevList = this._prevDisplayList; var zlevelList = this._zlevelList; this._redrawId = Math.random(); this._paintList(list, prevList, paintAll, this._redrawId); for (var i = 0; i < zlevelList.length; i++) { var z = zlevelList[i]; var layer = this._layers[z]; if (!layer.__builtin__ && layer.refresh) { var clearColor = i === 0 ? this._backgroundColor : null; layer.refresh(clearColor); } } if (this._opts.useDirtyRect) { this._prevDisplayList = list.slice(); } return this; }; CanvasPainter.prototype.refreshHover = function () { this._paintHoverList(this.storage.getDisplayList(false)); }; CanvasPainter.prototype._paintHoverList = function (list) { var len = list.length; var hoverLayer = this._hoverlayer; hoverLayer && hoverLayer.clear(); if (!len) { return; } var scope = { inHover: true, viewWidth: this._width, viewHeight: this._height }; var ctx; for (var i = 0; i < len; i++) { var el = list[i]; if (el.__inHover) { if (!hoverLayer) { hoverLayer = this._hoverlayer = this.getLayer(HOVER_LAYER_ZLEVEL); } if (!ctx) { ctx = hoverLayer.ctx; ctx.save(); } brush(ctx, el, scope, i === len - 1); } } if (ctx) { ctx.restore(); } }; CanvasPainter.prototype.getHoverLayer = function () { return this.getLayer(HOVER_LAYER_ZLEVEL); }; CanvasPainter.prototype.paintOne = function (ctx, el) { brushSingle(ctx, el); }; CanvasPainter.prototype._paintList = function (list, prevList, paintAll, redrawId) { if (this._redrawId !== redrawId) { return; } paintAll = paintAll || false; this._updateLayerStatus(list); var _a = this._doPaintList(list, prevList, paintAll), finished = _a.finished, needsRefreshHover = _a.needsRefreshHover; if (this._needsManuallyCompositing) { this._compositeManually(); } if (needsRefreshHover) { this._paintHoverList(list); } if (!finished) { var self_1 = this; requestAnimationFrame$1(function () { self_1._paintList(list, prevList, paintAll, redrawId); }); } else { this.eachLayer(function (layer) { layer.afterBrush && layer.afterBrush(); }); } }; CanvasPainter.prototype._compositeManually = function () { var ctx = this.getLayer(CANVAS_ZLEVEL).ctx; var width = this._domRoot.width; var height = this._domRoot.height; ctx.clearRect(0, 0, width, height); this.eachBuiltinLayer(function (layer) { if (layer.virtual) { ctx.drawImage(layer.dom, 0, 0, width, height); } }); }; CanvasPainter.prototype._doPaintList = function (list, prevList, paintAll) { var _this = this; var layerList = []; var useDirtyRect = this._opts.useDirtyRect; for (var zi = 0; zi < this._zlevelList.length; zi++) { var zlevel = this._zlevelList[zi]; var layer = this._layers[zlevel]; if (layer.__builtin__ && layer !== this._hoverlayer && (layer.__dirty || paintAll)) { layerList.push(layer); } } var finished = true; var needsRefreshHover = false; var _loop_1 = function (k) { var layer = layerList[k]; var ctx = layer.ctx; var repaintRects = useDirtyRect && layer.createRepaintRects(list, prevList, this_1._width, this_1._height); ctx.save(); var start = paintAll ? layer.__startIndex : layer.__drawIndex; var useTimer = !paintAll && layer.incremental && Date.now; var startTime = useTimer && Date.now(); var clearColor = layer.zlevel === this_1._zlevelList[0] ? this_1._backgroundColor : null; if (layer.__startIndex === layer.__endIndex) { layer.clear(false, clearColor, repaintRects); } else if (start === layer.__startIndex) { var firstEl = list[start]; if (!firstEl.incremental || !firstEl.notClear || paintAll) { layer.clear(false, clearColor, repaintRects); } } if (start === -1) { console.error('For some unknown reason. drawIndex is -1'); start = layer.__startIndex; } var i; var repaint = function (repaintRect) { var scope = { inHover: false, allClipped: false, prevEl: null, viewWidth: _this._width, viewHeight: _this._height }; for (i = start; i < layer.__endIndex; i++) { var el = list[i]; if (el.__inHover) { needsRefreshHover = true; } _this._doPaintEl(el, layer, useDirtyRect, repaintRect, scope, i === layer.__endIndex - 1); if (useTimer) { var dTime = Date.now() - startTime; if (dTime > 15) { break; } } } if (scope.prevElClipPaths) { ctx.restore(); } }; if (repaintRects) { if (repaintRects.length === 0) { i = layer.__endIndex; } else { var dpr = this_1.dpr; for (var r = 0; r < repaintRects.length; ++r) { var rect = repaintRects[r]; ctx.save(); ctx.beginPath(); ctx.rect(rect.x * dpr, rect.y * dpr, rect.width * dpr, rect.height * dpr); ctx.clip(); repaint(rect); ctx.restore(); } } } else { ctx.save(); repaint(); ctx.restore(); } layer.__drawIndex = i; if (layer.__drawIndex < layer.__endIndex) { finished = false; } }; var this_1 = this; for (var k = 0; k < layerList.length; k++) { _loop_1(k); } if (env.wxa) { each(this._layers, function (layer) { if (layer && layer.ctx && layer.ctx.draw) { layer.ctx.draw(); } }); } return { finished: finished, needsRefreshHover: needsRefreshHover }; }; CanvasPainter.prototype._doPaintEl = function (el, currentLayer, useDirtyRect, repaintRect, scope, isLast) { var ctx = currentLayer.ctx; if (useDirtyRect) { var paintRect = el.getPaintRect(); if (!repaintRect || paintRect && paintRect.intersect(repaintRect)) { brush(ctx, el, scope, isLast); el.setPrevPaintRect(paintRect); } } else { brush(ctx, el, scope, isLast); } }; CanvasPainter.prototype.getLayer = function (zlevel, virtual) { if (this._singleCanvas && !this._needsManuallyCompositing) { zlevel = CANVAS_ZLEVEL; } var layer = this._layers[zlevel]; if (!layer) { layer = new Layer('zr_' + zlevel, this, this.dpr); layer.zlevel = zlevel; layer.__builtin__ = true; if (this._layerConfig[zlevel]) { merge(layer, this._layerConfig[zlevel], true); } else if (this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC]) { merge(layer, this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC], true); } if (virtual) { layer.virtual = virtual; } this.insertLayer(zlevel, layer); layer.initContext(); } return layer; }; CanvasPainter.prototype.insertLayer = function (zlevel, layer) { var layersMap = this._layers; var zlevelList = this._zlevelList; var len = zlevelList.length; var domRoot = this._domRoot; var prevLayer = null; var i = -1; if (layersMap[zlevel]) { logError('ZLevel ' + zlevel + ' has been used already'); return; } if (!isLayerValid(layer)) { logError('Layer of zlevel ' + zlevel + ' is not valid'); return; } if (len > 0 && zlevel > zlevelList[0]) { for (i = 0; i < len - 1; i++) { if (zlevelList[i] < zlevel && zlevelList[i + 1] > zlevel) { break; } } prevLayer = layersMap[zlevelList[i]]; } zlevelList.splice(i + 1, 0, zlevel); layersMap[zlevel] = layer; if (!layer.virtual) { if (prevLayer) { var prevDom = prevLayer.dom; if (prevDom.nextSibling) { domRoot.insertBefore(layer.dom, prevDom.nextSibling); } else { domRoot.appendChild(layer.dom); } } else { if (domRoot.firstChild) { domRoot.insertBefore(layer.dom, domRoot.firstChild); } else { domRoot.appendChild(layer.dom); } } } layer.__painter = this; }; CanvasPainter.prototype.eachLayer = function (cb, context) { var zlevelList = this._zlevelList; for (var i = 0; i < zlevelList.length; i++) { var z = zlevelList[i]; cb.call(context, this._layers[z], z); } }; CanvasPainter.prototype.eachBuiltinLayer = function (cb, context) { var zlevelList = this._zlevelList; for (var i = 0; i < zlevelList.length; i++) { var z = zlevelList[i]; var layer = this._layers[z]; if (layer.__builtin__) { cb.call(context, layer, z); } } }; CanvasPainter.prototype.eachOtherLayer = function (cb, context) { var zlevelList = this._zlevelList; for (var i = 0; i < zlevelList.length; i++) { var z = zlevelList[i]; var layer = this._layers[z]; if (!layer.__builtin__) { cb.call(context, layer, z); } } }; CanvasPainter.prototype.getLayers = function () { return this._layers; }; CanvasPainter.prototype._updateLayerStatus = function (list) { this.eachBuiltinLayer(function (layer, z) { layer.__dirty = layer.__used = false; }); function updatePrevLayer(idx) { if (prevLayer) { if (prevLayer.__endIndex !== idx) { prevLayer.__dirty = true; } prevLayer.__endIndex = idx; } } if (this._singleCanvas) { for (var i_1 = 1; i_1 < list.length; i_1++) { var el = list[i_1]; if (el.zlevel !== list[i_1 - 1].zlevel || el.incremental) { this._needsManuallyCompositing = true; break; } } } var prevLayer = null; var incrementalLayerCount = 0; var prevZlevel; var i; for (i = 0; i < list.length; i++) { var el = list[i]; var zlevel = el.zlevel; var layer = void 0; if (prevZlevel !== zlevel) { prevZlevel = zlevel; incrementalLayerCount = 0; } if (el.incremental) { layer = this.getLayer(zlevel + INCREMENTAL_INC, this._needsManuallyCompositing); layer.incremental = true; incrementalLayerCount = 1; } else { layer = this.getLayer(zlevel + (incrementalLayerCount > 0 ? EL_AFTER_INCREMENTAL_INC : 0), this._needsManuallyCompositing); } if (!layer.__builtin__) { logError('ZLevel ' + zlevel + ' has been used by unkown layer ' + layer.id); } if (layer !== prevLayer) { layer.__used = true; if (layer.__startIndex !== i) { layer.__dirty = true; } layer.__startIndex = i; if (!layer.incremental) { layer.__drawIndex = i; } else { layer.__drawIndex = -1; } updatePrevLayer(i); prevLayer = layer; } if ((el.__dirty & Element.REDARAW_BIT) && !el.__inHover) { layer.__dirty = true; if (layer.incremental && layer.__drawIndex < 0) { layer.__drawIndex = i; } } } updatePrevLayer(i); this.eachBuiltinLayer(function (layer, z) { if (!layer.__used && layer.getElementCount() > 0) { layer.__dirty = true; layer.__startIndex = layer.__endIndex = layer.__drawIndex = 0; } if (layer.__dirty && layer.__drawIndex < 0) { layer.__drawIndex = layer.__startIndex; } }); }; CanvasPainter.prototype.clear = function () { this.eachBuiltinLayer(this._clearLayer); return this; }; CanvasPainter.prototype._clearLayer = function (layer) { layer.clear(); }; CanvasPainter.prototype.setBackgroundColor = function (backgroundColor) { this._backgroundColor = backgroundColor; each(this._layers, function (layer) { layer.setUnpainted(); }); }; CanvasPainter.prototype.configLayer = function (zlevel, config) { if (config) { var layerConfig = this._layerConfig; if (!layerConfig[zlevel]) { layerConfig[zlevel] = config; } else { merge(layerConfig[zlevel], config, true); } for (var i = 0; i < this._zlevelList.length; i++) { var _zlevel = this._zlevelList[i]; if (_zlevel === zlevel || _zlevel === zlevel + EL_AFTER_INCREMENTAL_INC) { var layer = this._layers[_zlevel]; merge(layer, layerConfig[zlevel], true); } } } }; CanvasPainter.prototype.delLayer = function (zlevel) { var layers = this._layers; var zlevelList = this._zlevelList; var layer = layers[zlevel]; if (!layer) { return; } layer.dom.parentNode.removeChild(layer.dom); delete layers[zlevel]; zlevelList.splice(indexOf(zlevelList, zlevel), 1); }; CanvasPainter.prototype.resize = function (width, height) { if (!this._domRoot.style) { if (width == null || height == null) { return; } this._width = width; this._height = height; this.getLayer(CANVAS_ZLEVEL).resize(width, height); } else { var domRoot = this._domRoot; domRoot.style.display = 'none'; var opts = this._opts; width != null && (opts.width = width); height != null && (opts.height = height); width = this._getSize(0); height = this._getSize(1); domRoot.style.display = ''; if (this._width !== width || height !== this._height) { domRoot.style.width = width + 'px'; domRoot.style.height = height + 'px'; for (var id in this._layers) { if (this._layers.hasOwnProperty(id)) { this._layers[id].resize(width, height); } } this.refresh(true); } this._width = width; this._height = height; } return this; }; CanvasPainter.prototype.clearLayer = function (zlevel) { var layer = this._layers[zlevel]; if (layer) { layer.clear(); } }; CanvasPainter.prototype.dispose = function () { this.root.innerHTML = ''; this.root = this.storage = this._domRoot = this._layers = null; }; CanvasPainter.prototype.getRenderedCanvas = function (opts) { opts = opts || {}; if (this._singleCanvas && !this._compositeManually) { return this._layers[CANVAS_ZLEVEL].dom; } var imageLayer = new Layer('image', this, opts.pixelRatio || this.dpr); imageLayer.initContext(); imageLayer.clear(false, opts.backgroundColor || this._backgroundColor); var ctx = imageLayer.ctx; if (opts.pixelRatio <= this.dpr) { this.refresh(); var width_1 = imageLayer.dom.width; var height_1 = imageLayer.dom.height; this.eachLayer(function (layer) { if (layer.__builtin__) { ctx.drawImage(layer.dom, 0, 0, width_1, height_1); } else if (layer.renderToCanvas) { ctx.save(); layer.renderToCanvas(ctx); ctx.restore(); } }); } else { var scope = { inHover: false, viewWidth: this._width, viewHeight: this._height }; var displayList = this.storage.getDisplayList(true); for (var i = 0, len = displayList.length; i < len; i++) { var el = displayList[i]; brush(ctx, el, scope, i === len - 1); } } return imageLayer.dom; }; CanvasPainter.prototype.getWidth = function () { return this._width; }; CanvasPainter.prototype.getHeight = function () { return this._height; }; CanvasPainter.prototype._getSize = function (whIdx) { var opts = this._opts; var wh = ['width', 'height'][whIdx]; var cwh = ['clientWidth', 'clientHeight'][whIdx]; var plt = ['paddingLeft', 'paddingTop'][whIdx]; var prb = ['paddingRight', 'paddingBottom'][whIdx]; if (opts[wh] != null && opts[wh] !== 'auto') { return parseFloat(opts[wh]); } var root = this.root; var stl = document.defaultView.getComputedStyle(root); return ((root[cwh] || parseInt10$1(stl[wh]) || parseInt10$1(root.style[wh])) - (parseInt10$1(stl[plt]) || 0) - (parseInt10$1(stl[prb]) || 0)) | 0; }; CanvasPainter.prototype.pathToImage = function (path, dpr) { dpr = dpr || this.dpr; var canvas = document.createElement('canvas'); var ctx = canvas.getContext('2d'); var rect = path.getBoundingRect(); var style = path.style; var shadowBlurSize = style.shadowBlur * dpr; var shadowOffsetX = style.shadowOffsetX * dpr; var shadowOffsetY = style.shadowOffsetY * dpr; var lineWidth = path.hasStroke() ? style.lineWidth : 0; var leftMargin = Math.max(lineWidth / 2, -shadowOffsetX + shadowBlurSize); var rightMargin = Math.max(lineWidth / 2, shadowOffsetX + shadowBlurSize); var topMargin = Math.max(lineWidth / 2, -shadowOffsetY + shadowBlurSize); var bottomMargin = Math.max(lineWidth / 2, shadowOffsetY + shadowBlurSize); var width = rect.width + leftMargin + rightMargin; var height = rect.height + topMargin + bottomMargin; canvas.width = width * dpr; canvas.height = height * dpr; ctx.scale(dpr, dpr); ctx.clearRect(0, 0, width, height); ctx.dpr = dpr; var pathTransform = { x: path.x, y: path.y, scaleX: path.scaleX, scaleY: path.scaleY, rotation: path.rotation, originX: path.originX, originY: path.originY }; path.x = leftMargin - rect.x; path.y = topMargin - rect.y; path.rotation = 0; path.scaleX = 1; path.scaleY = 1; path.updateTransform(); if (path) { brush(ctx, path, { inHover: false, viewWidth: this._width, viewHeight: this._height }, true); } var imgShape = new ZRImage({ style: { x: 0, y: 0, image: canvas } }); extend(path, pathTransform); return imgShape; }; return CanvasPainter; }()); function install$1(registers) { registers.registerPainter('canvas', CanvasPainter); } var LineSeriesModel = /** @class */ function (_super) { __extends(LineSeriesModel, _super); function LineSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = LineSeriesModel.type; _this.hasSymbolVisual = true; return _this; } LineSeriesModel.prototype.getInitialData = function (option) { if ("development" !== 'production') { var coordSys = option.coordinateSystem; if (coordSys !== 'polar' && coordSys !== 'cartesian2d') { throw new Error('Line not support coordinateSystem besides cartesian and polar'); } } return createListFromArray(this.getSource(), this, { useEncodeDefaulter: true }); }; LineSeriesModel.prototype.getLegendIcon = function (opt) { var group = new Group(); var line = createSymbol('line', 0, opt.itemHeight / 2, opt.itemWidth, 0, opt.lineStyle.stroke, false); group.add(line); line.setStyle(opt.lineStyle); var visualType = this.getData().getVisual('symbol'); var symbolType = visualType === 'none' ? 'circle' : visualType; // Symbol size is 80% when there is a line var size = opt.itemHeight * 0.8; var symbol = createSymbol(symbolType, (opt.itemWidth - size) / 2, (opt.itemHeight - size) / 2, size, size, opt.itemStyle.fill, opt.symbolKeepAspect); group.add(symbol); symbol.setStyle(opt.itemStyle); if (symbolType.indexOf('empty') > -1) { symbol.style.stroke = symbol.style.fill; symbol.style.fill = '#fff'; symbol.style.lineWidth = 2; } return group; }; LineSeriesModel.type = 'series.line'; LineSeriesModel.dependencies = ['grid', 'polar']; LineSeriesModel.defaultOption = { zlevel: 0, z: 3, coordinateSystem: 'cartesian2d', legendHoverLink: true, clip: true, label: { position: 'top' }, // itemStyle: { // }, endLabel: { show: false, valueAnimation: true, distance: 8 }, lineStyle: { width: 2, type: 'solid' }, emphasis: { scale: true, lineStyle: { width: 'bolder' } }, // areaStyle: { // origin of areaStyle. Valid values: // `'auto'/null/undefined`: from axisLine to data // `'start'`: from min to data // `'end'`: from data to max // origin: 'auto' // }, // false, 'start', 'end', 'middle' step: false, // Disabled if step is true smooth: false, smoothMonotone: null, symbol: 'emptyCircle', symbolSize: 4, symbolRotate: null, showSymbol: true, // `false`: follow the label interval strategy. // `true`: show all symbols. // `'auto'`: If possible, show all symbols, otherwise // follow the label interval strategy. showAllSymbol: 'auto', // Whether to connect break point. connectNulls: false, // Sampling for large data. Can be: 'average', 'max', 'min', 'sum', 'lttb'. sampling: 'none', animationEasing: 'linear', // Disable progressive progressive: 0, hoverLayerThreshold: Infinity }; return LineSeriesModel; }(SeriesModel); /** * @return label string. Not null/undefined */ function getDefaultLabel(data, dataIndex) { var labelDims = data.mapDimensionsAll('defaultedLabel'); var len = labelDims.length; // Simple optimization (in lots of cases, label dims length is 1) if (len === 1) { var rawVal = retrieveRawValue(data, dataIndex, labelDims[0]); return rawVal != null ? rawVal + '' : null; } else if (len) { var vals = []; for (var i = 0; i < labelDims.length; i++) { vals.push(retrieveRawValue(data, dataIndex, labelDims[i])); } return vals.join(' '); } } function getDefaultInterpolatedLabel(data, interpolatedValue) { var labelDims = data.mapDimensionsAll('defaultedLabel'); if (!isArray(interpolatedValue)) { return interpolatedValue + ''; } var vals = []; for (var i = 0; i < labelDims.length; i++) { var dimInfo = data.getDimensionInfo(labelDims[i]); if (dimInfo) { vals.push(interpolatedValue[dimInfo.index]); } } return vals.join(' '); } var Symbol = /** @class */ function (_super) { __extends(Symbol, _super); function Symbol(data, idx, seriesScope, opts) { var _this = _super.call(this) || this; _this.updateData(data, idx, seriesScope, opts); return _this; } Symbol.prototype._createSymbol = function (symbolType, data, idx, symbolSize, keepAspect) { // Remove paths created before this.removeAll(); // let symbolPath = createSymbol( // symbolType, -0.5, -0.5, 1, 1, color // ); // If width/height are set too small (e.g., set to 1) on ios10 // and macOS Sierra, a circle stroke become a rect, no matter what // the scale is set. So we set width/height as 2. See #4150. var symbolPath = createSymbol(symbolType, -1, -1, 2, 2, null, keepAspect); symbolPath.attr({ z2: 100, culling: true, scaleX: symbolSize[0] / 2, scaleY: symbolSize[1] / 2 }); // Rewrite drift method symbolPath.drift = driftSymbol; this._symbolType = symbolType; this.add(symbolPath); }; /** * Stop animation * @param {boolean} toLastFrame */ Symbol.prototype.stopSymbolAnimation = function (toLastFrame) { this.childAt(0).stopAnimation(null, toLastFrame); }; /** * FIXME: * Caution: This method breaks the encapsulation of this module, * but it indeed brings convenience. So do not use the method * unless you detailedly know all the implements of `Symbol`, * especially animation. * * Get symbol path element. */ Symbol.prototype.getSymbolPath = function () { return this.childAt(0); }; /** * Highlight symbol */ Symbol.prototype.highlight = function () { enterEmphasis(this.childAt(0)); }; /** * Downplay symbol */ Symbol.prototype.downplay = function () { leaveEmphasis(this.childAt(0)); }; /** * @param {number} zlevel * @param {number} z */ Symbol.prototype.setZ = function (zlevel, z) { var symbolPath = this.childAt(0); symbolPath.zlevel = zlevel; symbolPath.z = z; }; Symbol.prototype.setDraggable = function (draggable) { var symbolPath = this.childAt(0); symbolPath.draggable = draggable; symbolPath.cursor = draggable ? 'move' : symbolPath.cursor; }; /** * Update symbol properties */ Symbol.prototype.updateData = function (data, idx, seriesScope, opts) { this.silent = false; var symbolType = data.getItemVisual(idx, 'symbol') || 'circle'; var seriesModel = data.hostModel; var symbolSize = Symbol.getSymbolSize(data, idx); var isInit = symbolType !== this._symbolType; var disableAnimation = opts && opts.disableAnimation; if (isInit) { var keepAspect = data.getItemVisual(idx, 'symbolKeepAspect'); this._createSymbol(symbolType, data, idx, symbolSize, keepAspect); } else { var symbolPath = this.childAt(0); symbolPath.silent = false; var target = { scaleX: symbolSize[0] / 2, scaleY: symbolSize[1] / 2 }; disableAnimation ? symbolPath.attr(target) : updateProps(symbolPath, target, seriesModel, idx); } this._updateCommon(data, idx, symbolSize, seriesScope, opts); if (isInit) { var symbolPath = this.childAt(0); if (!disableAnimation) { var target = { scaleX: this._sizeX, scaleY: this._sizeY, style: { // Always fadeIn. Because it has fadeOut animation when symbol is removed.. opacity: symbolPath.style.opacity } }; symbolPath.scaleX = symbolPath.scaleY = 0; symbolPath.style.opacity = 0; initProps(symbolPath, target, seriesModel, idx); } } if (disableAnimation) { // Must stop remove animation manually if don't call initProps or updateProps. this.childAt(0).stopAnimation('remove'); } this._seriesModel = seriesModel; }; Symbol.prototype._updateCommon = function (data, idx, symbolSize, seriesScope, opts) { var symbolPath = this.childAt(0); var seriesModel = data.hostModel; var emphasisItemStyle; var blurItemStyle; var selectItemStyle; var focus; var blurScope; var labelStatesModels; var hoverScale; var cursorStyle; if (seriesScope) { emphasisItemStyle = seriesScope.emphasisItemStyle; blurItemStyle = seriesScope.blurItemStyle; selectItemStyle = seriesScope.selectItemStyle; focus = seriesScope.focus; blurScope = seriesScope.blurScope; labelStatesModels = seriesScope.labelStatesModels; hoverScale = seriesScope.hoverScale; cursorStyle = seriesScope.cursorStyle; } if (!seriesScope || data.hasItemOption) { var itemModel = seriesScope && seriesScope.itemModel ? seriesScope.itemModel : data.getItemModel(idx); var emphasisModel = itemModel.getModel('emphasis'); emphasisItemStyle = emphasisModel.getModel('itemStyle').getItemStyle(); selectItemStyle = itemModel.getModel(['select', 'itemStyle']).getItemStyle(); blurItemStyle = itemModel.getModel(['blur', 'itemStyle']).getItemStyle(); focus = emphasisModel.get('focus'); blurScope = emphasisModel.get('blurScope'); labelStatesModels = getLabelStatesModels(itemModel); hoverScale = emphasisModel.getShallow('scale'); cursorStyle = itemModel.getShallow('cursor'); } var symbolRotate = data.getItemVisual(idx, 'symbolRotate'); symbolPath.attr('rotation', (symbolRotate || 0) * Math.PI / 180 || 0); var symbolOffset = data.getItemVisual(idx, 'symbolOffset') || 0; if (symbolOffset) { if (!isArray(symbolOffset)) { symbolOffset = [symbolOffset, symbolOffset]; } symbolPath.x = parsePercent$1(symbolOffset[0], symbolSize[0]); symbolPath.y = parsePercent$1(retrieve2(symbolOffset[1], symbolOffset[0]) || 0, symbolSize[1]); } cursorStyle && symbolPath.attr('cursor', cursorStyle); var symbolStyle = data.getItemVisual(idx, 'style'); var visualColor = symbolStyle.fill; if (symbolPath instanceof ZRImage) { var pathStyle = symbolPath.style; symbolPath.useStyle(extend({ // TODO other properties like x, y ? image: pathStyle.image, x: pathStyle.x, y: pathStyle.y, width: pathStyle.width, height: pathStyle.height }, symbolStyle)); } else { if (symbolPath.__isEmptyBrush) { // fill and stroke will be swapped if it's empty. // So we cloned a new style to avoid it affecting the original style in visual storage. // TODO Better implementation. No empty logic! symbolPath.useStyle(extend({}, symbolStyle)); } else { symbolPath.useStyle(symbolStyle); } // Disable decal because symbol scale will been applied on the decal. symbolPath.style.decal = null; symbolPath.setColor(visualColor, opts && opts.symbolInnerColor); symbolPath.style.strokeNoScale = true; } var liftZ = data.getItemVisual(idx, 'liftZ'); var z2Origin = this._z2; if (liftZ != null) { if (z2Origin == null) { this._z2 = symbolPath.z2; symbolPath.z2 += liftZ; } } else if (z2Origin != null) { symbolPath.z2 = z2Origin; this._z2 = null; } var useNameLabel = opts && opts.useNameLabel; setLabelStyle(symbolPath, labelStatesModels, { labelFetcher: seriesModel, labelDataIndex: idx, defaultText: getLabelDefaultText, inheritColor: visualColor, defaultOpacity: symbolStyle.opacity }); // Do not execute util needed. function getLabelDefaultText(idx) { return useNameLabel ? data.getName(idx) : getDefaultLabel(data, idx); } this._sizeX = symbolSize[0] / 2; this._sizeY = symbolSize[1] / 2; var emphasisState = symbolPath.ensureState('emphasis'); emphasisState.style = emphasisItemStyle; symbolPath.ensureState('select').style = selectItemStyle; symbolPath.ensureState('blur').style = blurItemStyle; if (hoverScale) { var scaleRatio = Math.max(1.1, 3 / this._sizeY); emphasisState.scaleX = this._sizeX * scaleRatio; emphasisState.scaleY = this._sizeY * scaleRatio; } this.setSymbolScale(1); enableHoverEmphasis(this, focus, blurScope); }; Symbol.prototype.setSymbolScale = function (scale) { this.scaleX = this.scaleY = scale; }; Symbol.prototype.fadeOut = function (cb, opt) { var symbolPath = this.childAt(0); var seriesModel = this._seriesModel; var dataIndex = getECData(this).dataIndex; var animationOpt = opt && opt.animation; // Avoid mistaken hover when fading out this.silent = symbolPath.silent = true; // Not show text when animating if (opt && opt.fadeLabel) { var textContent = symbolPath.getTextContent(); if (textContent) { removeElement(textContent, { style: { opacity: 0 } }, seriesModel, { dataIndex: dataIndex, removeOpt: animationOpt, cb: function () { symbolPath.removeTextContent(); } }); } } else { symbolPath.removeTextContent(); } removeElement(symbolPath, { style: { opacity: 0 }, scaleX: 0, scaleY: 0 }, seriesModel, { dataIndex: dataIndex, cb: cb, removeOpt: animationOpt }); }; Symbol.getSymbolSize = function (data, idx) { var symbolSize = data.getItemVisual(idx, 'symbolSize'); return isArray(symbolSize) ? symbolSize.slice() : [+symbolSize, +symbolSize]; }; return Symbol; }(Group); function driftSymbol(dx, dy) { this.parent.drift(dx, dy); } function symbolNeedsDraw(data, point, idx, opt) { return point && !isNaN(point[0]) && !isNaN(point[1]) && !(opt.isIgnore && opt.isIgnore(idx)) // We do not set clipShape on group, because it will cut part of // the symbol element shape. We use the same clip shape here as // the line clip. && !(opt.clipShape && !opt.clipShape.contain(point[0], point[1])) && data.getItemVisual(idx, 'symbol') !== 'none'; } function normalizeUpdateOpt(opt) { if (opt != null && !isObject(opt)) { opt = { isIgnore: opt }; } return opt || {}; } function makeSeriesScope(data) { var seriesModel = data.hostModel; var emphasisModel = seriesModel.getModel('emphasis'); return { emphasisItemStyle: emphasisModel.getModel('itemStyle').getItemStyle(), blurItemStyle: seriesModel.getModel(['blur', 'itemStyle']).getItemStyle(), selectItemStyle: seriesModel.getModel(['select', 'itemStyle']).getItemStyle(), focus: emphasisModel.get('focus'), blurScope: emphasisModel.get('blurScope'), hoverScale: emphasisModel.get('scale'), labelStatesModels: getLabelStatesModels(seriesModel), cursorStyle: seriesModel.get('cursor') }; } var SymbolDraw = /** @class */ function () { function SymbolDraw(SymbolCtor) { this.group = new Group(); this._SymbolCtor = SymbolCtor || Symbol; } /** * Update symbols draw by new data */ SymbolDraw.prototype.updateData = function (data, opt) { opt = normalizeUpdateOpt(opt); var group = this.group; var seriesModel = data.hostModel; var oldData = this._data; var SymbolCtor = this._SymbolCtor; var disableAnimation = opt.disableAnimation; var seriesScope = makeSeriesScope(data); var symbolUpdateOpt = { disableAnimation: disableAnimation }; var getSymbolPoint = opt.getSymbolPoint || function (idx) { return data.getItemLayout(idx); }; // There is no oldLineData only when first rendering or switching from // stream mode to normal mode, where previous elements should be removed. if (!oldData) { group.removeAll(); } data.diff(oldData).add(function (newIdx) { var point = getSymbolPoint(newIdx); if (symbolNeedsDraw(data, point, newIdx, opt)) { var symbolEl = new SymbolCtor(data, newIdx, seriesScope, symbolUpdateOpt); symbolEl.setPosition(point); data.setItemGraphicEl(newIdx, symbolEl); group.add(symbolEl); } }).update(function (newIdx, oldIdx) { var symbolEl = oldData.getItemGraphicEl(oldIdx); var point = getSymbolPoint(newIdx); if (!symbolNeedsDraw(data, point, newIdx, opt)) { group.remove(symbolEl); return; } if (!symbolEl) { symbolEl = new SymbolCtor(data, newIdx); symbolEl.setPosition(point); } else { symbolEl.updateData(data, newIdx, seriesScope, symbolUpdateOpt); var target = { x: point[0], y: point[1] }; disableAnimation ? symbolEl.attr(target) : updateProps(symbolEl, target, seriesModel); } // Add back group.add(symbolEl); data.setItemGraphicEl(newIdx, symbolEl); }).remove(function (oldIdx) { var el = oldData.getItemGraphicEl(oldIdx); el && el.fadeOut(function () { group.remove(el); }); }).execute(); this._getSymbolPoint = getSymbolPoint; this._data = data; }; SymbolDraw.prototype.isPersistent = function () { return true; }; SymbolDraw.prototype.updateLayout = function () { var _this = this; var data = this._data; if (data) { // Not use animation data.eachItemGraphicEl(function (el, idx) { var point = _this._getSymbolPoint(idx); el.setPosition(point); el.markRedraw(); }); } }; SymbolDraw.prototype.incrementalPrepareUpdate = function (data) { this._seriesScope = makeSeriesScope(data); this._data = null; this.group.removeAll(); }; /** * Update symbols draw by new data */ SymbolDraw.prototype.incrementalUpdate = function (taskParams, data, opt) { opt = normalizeUpdateOpt(opt); function updateIncrementalAndHover(el) { if (!el.isGroup) { el.incremental = true; el.ensureState('emphasis').hoverLayer = true; } } for (var idx = taskParams.start; idx < taskParams.end; idx++) { var point = data.getItemLayout(idx); if (symbolNeedsDraw(data, point, idx, opt)) { var el = new this._SymbolCtor(data, idx, this._seriesScope); el.traverse(updateIncrementalAndHover); el.setPosition(point); this.group.add(el); data.setItemGraphicEl(idx, el); } } }; SymbolDraw.prototype.remove = function (enableAnimation) { var group = this.group; var data = this._data; // Incremental model do not have this._data. if (data && enableAnimation) { data.eachItemGraphicEl(function (el) { el.fadeOut(function () { group.remove(el); }); }); } else { group.removeAll(); } }; return SymbolDraw; }(); function prepareDataCoordInfo(coordSys, data, valueOrigin) { var baseAxis = coordSys.getBaseAxis(); var valueAxis = coordSys.getOtherAxis(baseAxis); var valueStart = getValueStart(valueAxis, valueOrigin); var baseAxisDim = baseAxis.dim; var valueAxisDim = valueAxis.dim; var valueDim = data.mapDimension(valueAxisDim); var baseDim = data.mapDimension(baseAxisDim); var baseDataOffset = valueAxisDim === 'x' || valueAxisDim === 'radius' ? 1 : 0; var dims = map(coordSys.dimensions, function (coordDim) { return data.mapDimension(coordDim); }); var stacked = false; var stackResultDim = data.getCalculationInfo('stackResultDimension'); if (isDimensionStacked(data, dims[0] /*, dims[1]*/ )) { // jshint ignore:line stacked = true; dims[0] = stackResultDim; } if (isDimensionStacked(data, dims[1] /*, dims[0]*/ )) { // jshint ignore:line stacked = true; dims[1] = stackResultDim; } return { dataDimsForPoint: dims, valueStart: valueStart, valueAxisDim: valueAxisDim, baseAxisDim: baseAxisDim, stacked: !!stacked, valueDim: valueDim, baseDim: baseDim, baseDataOffset: baseDataOffset, stackedOverDimension: data.getCalculationInfo('stackedOverDimension') }; } function getValueStart(valueAxis, valueOrigin) { var valueStart = 0; var extent = valueAxis.scale.getExtent(); if (valueOrigin === 'start') { valueStart = extent[0]; } else if (valueOrigin === 'end') { valueStart = extent[1]; } // auto else { // Both positive if (extent[0] > 0) { valueStart = extent[0]; } // Both negative else if (extent[1] < 0) { valueStart = extent[1]; } // If is one positive, and one negative, onZero shall be true } return valueStart; } function getStackedOnPoint(dataCoordInfo, coordSys, data, idx) { var value = NaN; if (dataCoordInfo.stacked) { value = data.get(data.getCalculationInfo('stackedOverDimension'), idx); } if (isNaN(value)) { value = dataCoordInfo.valueStart; } var baseDataOffset = dataCoordInfo.baseDataOffset; var stackedData = []; stackedData[baseDataOffset] = data.get(dataCoordInfo.baseDim, idx); stackedData[1 - baseDataOffset] = value; return coordSys.dataToPoint(stackedData); } /* global Float32Array */ var supportFloat32Array = typeof Float32Array !== 'undefined'; var Float32ArrayCtor = !supportFloat32Array ? Array : Float32Array; function createFloat32Array(arg) { if (isArray(arg)) { // Return self directly if don't support TypedArray. return supportFloat32Array ? new Float32Array(arg) : arg; } // Else is number return new Float32ArrayCtor(arg); } function diffData(oldData, newData) { var diffResult = []; newData.diff(oldData).add(function (idx) { diffResult.push({ cmd: '+', idx: idx }); }).update(function (newIdx, oldIdx) { diffResult.push({ cmd: '=', idx: oldIdx, idx1: newIdx }); }).remove(function (idx) { diffResult.push({ cmd: '-', idx: idx }); }).execute(); return diffResult; } function lineAnimationDiff(oldData, newData, oldStackedOnPoints, newStackedOnPoints, oldCoordSys, newCoordSys, oldValueOrigin, newValueOrigin) { var diff = diffData(oldData, newData); // let newIdList = newData.mapArray(newData.getId); // let oldIdList = oldData.mapArray(oldData.getId); // convertToIntId(newIdList, oldIdList); // // FIXME One data ? // diff = arrayDiff(oldIdList, newIdList); var currPoints = []; var nextPoints = []; // Points for stacking base line var currStackedPoints = []; var nextStackedPoints = []; var status = []; var sortedIndices = []; var rawIndices = []; var newDataOldCoordInfo = prepareDataCoordInfo(oldCoordSys, newData, oldValueOrigin); var oldDataNewCoordInfo = prepareDataCoordInfo(newCoordSys, oldData, newValueOrigin); var oldPoints = oldData.getLayout('points') || []; var newPoints = newData.getLayout('points') || []; for (var i = 0; i < diff.length; i++) { var diffItem = diff[i]; var pointAdded = true; var oldIdx2 = void 0; var newIdx2 = void 0; // FIXME, animation is not so perfect when dataZoom window moves fast // Which is in case remvoing or add more than one data in the tail or head switch (diffItem.cmd) { case '=': oldIdx2 = diffItem.idx * 2; newIdx2 = diffItem.idx1 * 2; var currentX = oldPoints[oldIdx2]; var currentY = oldPoints[oldIdx2 + 1]; var nextX = newPoints[newIdx2]; var nextY = newPoints[newIdx2 + 1]; // If previous data is NaN, use next point directly if (isNaN(currentX) || isNaN(currentY)) { currentX = nextX; currentY = nextY; } currPoints.push(currentX, currentY); nextPoints.push(nextX, nextY); currStackedPoints.push(oldStackedOnPoints[oldIdx2], oldStackedOnPoints[oldIdx2 + 1]); nextStackedPoints.push(newStackedOnPoints[newIdx2], newStackedOnPoints[newIdx2 + 1]); rawIndices.push(newData.getRawIndex(diffItem.idx1)); break; case '+': var newIdx = diffItem.idx; var newDataDimsForPoint = newDataOldCoordInfo.dataDimsForPoint; var oldPt = oldCoordSys.dataToPoint([newData.get(newDataDimsForPoint[0], newIdx), newData.get(newDataDimsForPoint[1], newIdx)]); newIdx2 = newIdx * 2; currPoints.push(oldPt[0], oldPt[1]); nextPoints.push(newPoints[newIdx2], newPoints[newIdx2 + 1]); var stackedOnPoint = getStackedOnPoint(newDataOldCoordInfo, oldCoordSys, newData, newIdx); currStackedPoints.push(stackedOnPoint[0], stackedOnPoint[1]); nextStackedPoints.push(newStackedOnPoints[newIdx2], newStackedOnPoints[newIdx2 + 1]); rawIndices.push(newData.getRawIndex(newIdx)); break; case '-': pointAdded = false; } // Original indices if (pointAdded) { status.push(diffItem); sortedIndices.push(sortedIndices.length); } } // Diff result may be crossed if all items are changed // Sort by data index sortedIndices.sort(function (a, b) { return rawIndices[a] - rawIndices[b]; }); var len = currPoints.length; var sortedCurrPoints = createFloat32Array(len); var sortedNextPoints = createFloat32Array(len); var sortedCurrStackedPoints = createFloat32Array(len); var sortedNextStackedPoints = createFloat32Array(len); var sortedStatus = []; for (var i = 0; i < sortedIndices.length; i++) { var idx = sortedIndices[i]; var i2 = i * 2; var idx2 = idx * 2; sortedCurrPoints[i2] = currPoints[idx2]; sortedCurrPoints[i2 + 1] = currPoints[idx2 + 1]; sortedNextPoints[i2] = nextPoints[idx2]; sortedNextPoints[i2 + 1] = nextPoints[idx2 + 1]; sortedCurrStackedPoints[i2] = currStackedPoints[idx2]; sortedCurrStackedPoints[i2 + 1] = currStackedPoints[idx2 + 1]; sortedNextStackedPoints[i2] = nextStackedPoints[idx2]; sortedNextStackedPoints[i2 + 1] = nextStackedPoints[idx2 + 1]; sortedStatus[i] = status[idx]; } return { current: sortedCurrPoints, next: sortedNextPoints, stackedOnCurrent: sortedCurrStackedPoints, stackedOnNext: sortedNextStackedPoints, status: sortedStatus }; } var mathMin$5 = Math.min; var mathMax$5 = Math.max; function isPointNull(x, y) { return isNaN(x) || isNaN(y); } /** * Draw smoothed line in non-monotone, in may cause undesired curve in extreme * situations. This should be used when points are non-monotone neither in x or * y dimension. */ function drawSegment(ctx, points, start, segLen, allLen, dir, smooth, smoothMonotone, connectNulls) { var prevX; var prevY; var cpx0; var cpy0; var cpx1; var cpy1; var idx = start; var k = 0; for (; k < segLen; k++) { var x = points[idx * 2]; var y = points[idx * 2 + 1]; if (idx >= allLen || idx < 0) { break; } if (isPointNull(x, y)) { if (connectNulls) { idx += dir; continue; } break; } if (idx === start) { ctx[dir > 0 ? 'moveTo' : 'lineTo'](x, y); cpx0 = x; cpy0 = y; } else { var dx = x - prevX; var dy = y - prevY; // Ignore tiny segment. if (dx * dx + dy * dy < 0.5) { idx += dir; continue; } if (smooth > 0) { var nextIdx = idx + dir; var nextX = points[nextIdx * 2]; var nextY = points[nextIdx * 2 + 1]; var tmpK = k + 1; if (connectNulls) { // Find next point not null while (isPointNull(nextX, nextY) && tmpK < segLen) { tmpK++; nextIdx += dir; nextX = points[nextIdx * 2]; nextY = points[nextIdx * 2 + 1]; } } var ratioNextSeg = 0.5; var vx = 0; var vy = 0; var nextCpx0 = void 0; var nextCpy0 = void 0; // Is last point if (tmpK >= segLen || isPointNull(nextX, nextY)) { cpx1 = x; cpy1 = y; } else { vx = nextX - prevX; vy = nextY - prevY; var dx0 = x - prevX; var dx1 = nextX - x; var dy0 = y - prevY; var dy1 = nextY - y; var lenPrevSeg = void 0; var lenNextSeg = void 0; if (smoothMonotone === 'x') { lenPrevSeg = Math.abs(dx0); lenNextSeg = Math.abs(dx1); cpx1 = x - lenPrevSeg * smooth; cpy1 = y; nextCpx0 = x + lenPrevSeg * smooth; nextCpy0 = y; } else if (smoothMonotone === 'y') { lenPrevSeg = Math.abs(dy0); lenNextSeg = Math.abs(dy1); cpx1 = x; cpy1 = y - lenPrevSeg * smooth; nextCpx0 = x; nextCpy0 = y + lenPrevSeg * smooth; } else { lenPrevSeg = Math.sqrt(dx0 * dx0 + dy0 * dy0); lenNextSeg = Math.sqrt(dx1 * dx1 + dy1 * dy1); // Use ratio of seg length ratioNextSeg = lenNextSeg / (lenNextSeg + lenPrevSeg); cpx1 = x - vx * smooth * (1 - ratioNextSeg); cpy1 = y - vy * smooth * (1 - ratioNextSeg); // cp0 of next segment nextCpx0 = x + vx * smooth * ratioNextSeg; nextCpy0 = y + vy * smooth * ratioNextSeg; // Smooth constraint between point and next point. // Avoid exceeding extreme after smoothing. nextCpx0 = mathMin$5(nextCpx0, mathMax$5(nextX, x)); nextCpy0 = mathMin$5(nextCpy0, mathMax$5(nextY, y)); nextCpx0 = mathMax$5(nextCpx0, mathMin$5(nextX, x)); nextCpy0 = mathMax$5(nextCpy0, mathMin$5(nextY, y)); // Reclaculate cp1 based on the adjusted cp0 of next seg. vx = nextCpx0 - x; vy = nextCpy0 - y; cpx1 = x - vx * lenPrevSeg / lenNextSeg; cpy1 = y - vy * lenPrevSeg / lenNextSeg; // Smooth constraint between point and prev point. // Avoid exceeding extreme after smoothing. cpx1 = mathMin$5(cpx1, mathMax$5(prevX, x)); cpy1 = mathMin$5(cpy1, mathMax$5(prevY, y)); cpx1 = mathMax$5(cpx1, mathMin$5(prevX, x)); cpy1 = mathMax$5(cpy1, mathMin$5(prevY, y)); // Adjust next cp0 again. vx = x - cpx1; vy = y - cpy1; nextCpx0 = x + vx * lenNextSeg / lenPrevSeg; nextCpy0 = y + vy * lenNextSeg / lenPrevSeg; } } ctx.bezierCurveTo(cpx0, cpy0, cpx1, cpy1, x, y); cpx0 = nextCpx0; cpy0 = nextCpy0; } else { ctx.lineTo(x, y); } } prevX = x; prevY = y; idx += dir; } return k; } var ECPolylineShape = /** @class */ function () { function ECPolylineShape() { this.smooth = 0; this.smoothConstraint = true; } return ECPolylineShape; }(); var ECPolyline = /** @class */ function (_super) { __extends(ECPolyline, _super); function ECPolyline(opts) { var _this = _super.call(this, opts) || this; _this.type = 'ec-polyline'; return _this; } ECPolyline.prototype.getDefaultStyle = function () { return { stroke: '#000', fill: null }; }; ECPolyline.prototype.getDefaultShape = function () { return new ECPolylineShape(); }; ECPolyline.prototype.buildPath = function (ctx, shape) { var points = shape.points; var i = 0; var len = points.length / 2; // const result = getBoundingBox(points, shape.smoothConstraint); if (shape.connectNulls) { // Must remove first and last null values avoid draw error in polygon for (; len > 0; len--) { if (!isPointNull(points[len * 2 - 2], points[len * 2 - 1])) { break; } } for (; i < len; i++) { if (!isPointNull(points[i * 2], points[i * 2 + 1])) { break; } } } while (i < len) { i += drawSegment(ctx, points, i, len, len, 1, shape.smooth, shape.smoothMonotone, shape.connectNulls) + 1; } }; ECPolyline.prototype.getPointOn = function (xOrY, dim) { if (!this.path) { this.createPathProxy(); this.buildPath(this.path, this.shape); } var path = this.path; var data = path.data; var CMD = PathProxy.CMD; var x0; var y0; var isDimX = dim === 'x'; var roots = []; for (var i = 0; i < data.length;) { var cmd = data[i++]; var x = void 0; var y = void 0; var x2 = void 0; var y2 = void 0; var x3 = void 0; var y3 = void 0; var t = void 0; switch (cmd) { case CMD.M: x0 = data[i++]; y0 = data[i++]; break; case CMD.L: x = data[i++]; y = data[i++]; t = isDimX ? (xOrY - x0) / (x - x0) : (xOrY - y0) / (y - y0); if (t <= 1 && t >= 0) { var val = isDimX ? (y - y0) * t + y0 : (x - x0) * t + x0; return isDimX ? [xOrY, val] : [val, xOrY]; } x0 = x; y0 = y; break; case CMD.C: x = data[i++]; y = data[i++]; x2 = data[i++]; y2 = data[i++]; x3 = data[i++]; y3 = data[i++]; var nRoot = isDimX ? cubicRootAt(x0, x, x2, x3, xOrY, roots) : cubicRootAt(y0, y, y2, y3, xOrY, roots); if (nRoot > 0) { for (var i_1 = 0; i_1 < nRoot; i_1++) { var t_1 = roots[i_1]; if (t_1 <= 1 && t_1 >= 0) { var val = isDimX ? cubicAt(y0, y, y2, y3, t_1) : cubicAt(x0, x, x2, x3, t_1); return isDimX ? [xOrY, val] : [val, xOrY]; } } } x0 = x3; y0 = y3; break; } } }; return ECPolyline; }(Path); var ECPolygonShape = /** @class */ function (_super) { __extends(ECPolygonShape, _super); function ECPolygonShape() { return _super !== null && _super.apply(this, arguments) || this; } return ECPolygonShape; }(ECPolylineShape); var ECPolygon = /** @class */ function (_super) { __extends(ECPolygon, _super); function ECPolygon(opts) { var _this = _super.call(this, opts) || this; _this.type = 'ec-polygon'; return _this; } ECPolygon.prototype.getDefaultShape = function () { return new ECPolygonShape(); }; ECPolygon.prototype.buildPath = function (ctx, shape) { var points = shape.points; var stackedOnPoints = shape.stackedOnPoints; var i = 0; var len = points.length / 2; var smoothMonotone = shape.smoothMonotone; if (shape.connectNulls) { // Must remove first and last null values avoid draw error in polygon for (; len > 0; len--) { if (!isPointNull(points[len * 2 - 2], points[len * 2 - 1])) { break; } } for (; i < len; i++) { if (!isPointNull(points[i * 2], points[i * 2 + 1])) { break; } } } while (i < len) { var k = drawSegment(ctx, points, i, len, len, 1, shape.smooth, smoothMonotone, shape.connectNulls); drawSegment(ctx, stackedOnPoints, i + k - 1, k, len, -1, shape.stackedOnSmooth, smoothMonotone, shape.connectNulls); i += k + 1; ctx.closePath(); } }; return ECPolygon; }(Path); function createGridClipPath(cartesian, hasAnimation, seriesModel, done, during) { var rect = cartesian.getArea(); var x = rect.x; var y = rect.y; var width = rect.width; var height = rect.height; var lineWidth = seriesModel.get(['lineStyle', 'width']) || 2; // Expand the clip path a bit to avoid the border is clipped and looks thinner x -= lineWidth / 2; y -= lineWidth / 2; width += lineWidth; height += lineWidth; // fix: https://github.com/apache/incubator-echarts/issues/11369 x = Math.floor(x); width = Math.round(width); var clipPath = new Rect({ shape: { x: x, y: y, width: width, height: height } }); if (hasAnimation) { var baseAxis = cartesian.getBaseAxis(); var isHorizontal = baseAxis.isHorizontal(); var isAxisInversed = baseAxis.inverse; if (isHorizontal) { if (isAxisInversed) { clipPath.shape.x += width; } clipPath.shape.width = 0; } else { if (!isAxisInversed) { clipPath.shape.y += height; } clipPath.shape.height = 0; } var duringCb = typeof during === 'function' ? function (percent) { during(percent, clipPath); } : null; initProps(clipPath, { shape: { width: width, height: height, x: x, y: y } }, seriesModel, null, done, duringCb); } return clipPath; } function createPolarClipPath(polar, hasAnimation, seriesModel) { var sectorArea = polar.getArea(); // Avoid float number rounding error for symbol on the edge of axis extent. var r0 = round(sectorArea.r0, 1); var r = round(sectorArea.r, 1); var clipPath = new Sector({ shape: { cx: round(polar.cx, 1), cy: round(polar.cy, 1), r0: r0, r: r, startAngle: sectorArea.startAngle, endAngle: sectorArea.endAngle, clockwise: sectorArea.clockwise } }); if (hasAnimation) { var isRadial = polar.getBaseAxis().dim === 'angle'; if (isRadial) { clipPath.shape.endAngle = sectorArea.startAngle; } else { clipPath.shape.r = r0; } initProps(clipPath, { shape: { endAngle: sectorArea.endAngle, r: r } }, seriesModel); } return clipPath; } function createClipPath(coordSys, hasAnimation, seriesModel, done, during) { if (!coordSys) { return null; } else if (coordSys.type === 'polar') { return createPolarClipPath(coordSys, hasAnimation, seriesModel); } else if (coordSys.type === 'cartesian2d') { return createGridClipPath(coordSys, hasAnimation, seriesModel, done, during); } return null; } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ function isCoordinateSystemType(coordSys, type) { return coordSys.type === type; } function isPointsSame(points1, points2) { if (points1.length !== points2.length) { return; } for (var i = 0; i < points1.length; i++) { if (points1[i] !== points2[i]) { return; } } return true; } function bboxFromPoints(points) { var minX = Infinity; var minY = Infinity; var maxX = -Infinity; var maxY = -Infinity; for (var i = 0; i < points.length;) { var x = points[i++]; var y = points[i++]; if (!isNaN(x)) { minX = Math.min(x, minX); maxX = Math.max(x, maxX); } if (!isNaN(y)) { minY = Math.min(y, minY); maxY = Math.max(y, maxY); } } return [[minX, minY], [maxX, maxY]]; } function getBoundingDiff(points1, points2) { var _a = bboxFromPoints(points1), min1 = _a[0], max1 = _a[1]; var _b = bboxFromPoints(points2), min2 = _b[0], max2 = _b[1]; // Get a max value from each corner of two boundings. return Math.max(Math.abs(min1[0] - min2[0]), Math.abs(min1[1] - min2[1]), Math.abs(max1[0] - max2[0]), Math.abs(max1[1] - max2[1])); } function getSmooth(smooth) { return typeof smooth === 'number' ? smooth : smooth ? 0.5 : 0; } function getStackedOnPoints(coordSys, data, dataCoordInfo) { if (!dataCoordInfo.valueDim) { return []; } var len = data.count(); var points = createFloat32Array(len * 2); for (var idx = 0; idx < len; idx++) { var pt = getStackedOnPoint(dataCoordInfo, coordSys, data, idx); points[idx * 2] = pt[0]; points[idx * 2 + 1] = pt[1]; } return points; } function turnPointsIntoStep(points, coordSys, stepTurnAt) { var baseAxis = coordSys.getBaseAxis(); var baseIndex = baseAxis.dim === 'x' || baseAxis.dim === 'radius' ? 0 : 1; var stepPoints = []; var i = 0; var stepPt = []; var pt = []; var nextPt = []; for (; i < points.length - 2; i += 2) { nextPt[0] = points[i + 2]; nextPt[1] = points[i + 3]; pt[0] = points[i]; pt[1] = points[i + 1]; stepPoints.push(pt[0], pt[1]); switch (stepTurnAt) { case 'end': stepPt[baseIndex] = nextPt[baseIndex]; stepPt[1 - baseIndex] = pt[1 - baseIndex]; stepPoints.push(stepPt[0], stepPt[1]); break; case 'middle': var middle = (pt[baseIndex] + nextPt[baseIndex]) / 2; var stepPt2 = []; stepPt[baseIndex] = stepPt2[baseIndex] = middle; stepPt[1 - baseIndex] = pt[1 - baseIndex]; stepPt2[1 - baseIndex] = nextPt[1 - baseIndex]; stepPoints.push(stepPt[0], stepPt[1]); stepPoints.push(stepPt2[0], stepPt2[1]); break; default: // default is start stepPt[baseIndex] = pt[baseIndex]; stepPt[1 - baseIndex] = nextPt[1 - baseIndex]; stepPoints.push(stepPt[0], stepPt[1]); } } // Last points stepPoints.push(points[i++], points[i++]); return stepPoints; } function getVisualGradient(data, coordSys) { var visualMetaList = data.getVisual('visualMeta'); if (!visualMetaList || !visualMetaList.length || !data.count()) { // When data.count() is 0, gradient range can not be calculated. return; } if (coordSys.type !== 'cartesian2d') { if ("development" !== 'production') { console.warn('Visual map on line style is only supported on cartesian2d.'); } return; } var coordDim; var visualMeta; for (var i = visualMetaList.length - 1; i >= 0; i--) { var dimIndex = visualMetaList[i].dimension; var dimName = data.dimensions[dimIndex]; var dimInfo = data.getDimensionInfo(dimName); coordDim = dimInfo && dimInfo.coordDim; // Can only be x or y if (coordDim === 'x' || coordDim === 'y') { visualMeta = visualMetaList[i]; break; } } if (!visualMeta) { if ("development" !== 'production') { console.warn('Visual map on line style only support x or y dimension.'); } return; } // If the area to be rendered is bigger than area defined by LinearGradient, // the canvas spec prescribes that the color of the first stop and the last // stop should be used. But if two stops are added at offset 0, in effect // browsers use the color of the second stop to render area outside // LinearGradient. So we can only infinitesimally extend area defined in // LinearGradient to render `outerColors`. var axis = coordSys.getAxis(coordDim); // dataToCoor mapping may not be linear, but must be monotonic. var colorStops = map(visualMeta.stops, function (stop) { return { offset: 0, coord: axis.toGlobalCoord(axis.dataToCoord(stop.value)), color: stop.color }; }); var stopLen = colorStops.length; var outerColors = visualMeta.outerColors.slice(); if (stopLen && colorStops[0].coord > colorStops[stopLen - 1].coord) { colorStops.reverse(); outerColors.reverse(); } var tinyExtent = 10; // Arbitrary value: 10px var minCoord = colorStops[0].coord - tinyExtent; var maxCoord = colorStops[stopLen - 1].coord + tinyExtent; var coordSpan = maxCoord - minCoord; if (coordSpan < 1e-3) { return 'transparent'; } each(colorStops, function (stop) { stop.offset = (stop.coord - minCoord) / coordSpan; }); colorStops.push({ offset: stopLen ? colorStops[stopLen - 1].offset : 0.5, color: outerColors[1] || 'transparent' }); colorStops.unshift({ offset: stopLen ? colorStops[0].offset : 0.5, color: outerColors[0] || 'transparent' }); // zrUtil.each(colorStops, function (colorStop) { // // Make sure each offset has rounded px to avoid not sharp edge // colorStop.offset = (Math.round(colorStop.offset * (end - start) + start) - start) / (end - start); // }); var gradient = new LinearGradient(0, 0, 0, 0, colorStops, true); gradient[coordDim] = minCoord; gradient[coordDim + '2'] = maxCoord; return gradient; } function getIsIgnoreFunc(seriesModel, data, coordSys) { var showAllSymbol = seriesModel.get('showAllSymbol'); var isAuto = showAllSymbol === 'auto'; if (showAllSymbol && !isAuto) { return; } var categoryAxis = coordSys.getAxesByScale('ordinal')[0]; if (!categoryAxis) { return; } // Note that category label interval strategy might bring some weird effect // in some scenario: users may wonder why some of the symbols are not // displayed. So we show all symbols as possible as we can. if (isAuto // Simplify the logic, do not determine label overlap here. && canShowAllSymbolForCategory(categoryAxis, data)) { return; } // Otherwise follow the label interval strategy on category axis. var categoryDataDim = data.mapDimension(categoryAxis.dim); var labelMap = {}; each(categoryAxis.getViewLabels(), function (labelItem) { var ordinalNumber = categoryAxis.scale.getRawOrdinalNumber(labelItem.tickValue); labelMap[ordinalNumber] = 1; }); return function (dataIndex) { return !labelMap.hasOwnProperty(data.get(categoryDataDim, dataIndex)); }; } function canShowAllSymbolForCategory(categoryAxis, data) { // In mose cases, line is monotonous on category axis, and the label size // is close with each other. So we check the symbol size and some of the // label size alone with the category axis to estimate whether all symbol // can be shown without overlap. var axisExtent = categoryAxis.getExtent(); var availSize = Math.abs(axisExtent[1] - axisExtent[0]) / categoryAxis.scale.count(); isNaN(availSize) && (availSize = 0); // 0/0 is NaN. // Sampling some points, max 5. var dataLen = data.count(); var step = Math.max(1, Math.round(dataLen / 5)); for (var dataIndex = 0; dataIndex < dataLen; dataIndex += step) { if (Symbol.getSymbolSize(data, dataIndex // Only for cartesian, where `isHorizontal` exists. )[categoryAxis.isHorizontal() ? 1 : 0] // Empirical number * 1.5 > availSize) { return false; } } return true; } function isPointNull$1(x, y) { return isNaN(x) || isNaN(y); } function getLastIndexNotNull(points) { var len = points.length / 2; for (; len > 0; len--) { if (!isPointNull$1(points[len * 2 - 2], points[len * 2 - 1])) { break; } } return len - 1; } function getPointAtIndex(points, idx) { return [points[idx * 2], points[idx * 2 + 1]]; } function getIndexRange(points, xOrY, dim) { var len = points.length / 2; var dimIdx = dim === 'x' ? 0 : 1; var a; var b; var prevIndex = 0; var nextIndex = -1; for (var i = 0; i < len; i++) { b = points[i * 2 + dimIdx]; if (isNaN(b) || isNaN(points[i * 2 + 1 - dimIdx])) { continue; } if (i === 0) { a = b; continue; } if (a <= xOrY && b >= xOrY || a >= xOrY && b <= xOrY) { nextIndex = i; break; } prevIndex = i; a = b; } return { range: [prevIndex, nextIndex], t: (xOrY - a) / (b - a) }; } function createLineClipPath(lineView, coordSys, hasAnimation, seriesModel) { if (isCoordinateSystemType(coordSys, 'cartesian2d')) { var endLabelModel_1 = seriesModel.getModel('endLabel'); var showEndLabel = endLabelModel_1.get('show'); var valueAnimation_1 = endLabelModel_1.get('valueAnimation'); var data_1 = seriesModel.getData(); var labelAnimationRecord_1 = { lastFrameIndex: 0 }; var during = showEndLabel ? function (percent, clipRect) { lineView._endLabelOnDuring(percent, clipRect, data_1, labelAnimationRecord_1, valueAnimation_1, endLabelModel_1, coordSys); } : null; var isHorizontal = coordSys.getBaseAxis().isHorizontal(); var clipPath = createGridClipPath(coordSys, hasAnimation, seriesModel, function () { var endLabel = lineView._endLabel; if (endLabel && hasAnimation) { if (labelAnimationRecord_1.originalX != null) { endLabel.attr({ x: labelAnimationRecord_1.originalX, y: labelAnimationRecord_1.originalY }); } } }, during); // Expand clip shape to avoid clipping when line value exceeds axis if (!seriesModel.get('clip', true)) { var rectShape = clipPath.shape; var expandSize = Math.max(rectShape.width, rectShape.height); if (isHorizontal) { rectShape.y -= expandSize; rectShape.height += expandSize * 2; } else { rectShape.x -= expandSize; rectShape.width += expandSize * 2; } } // Set to the final frame. To make sure label layout is right. if (during) { during(1, clipPath); } return clipPath; } else { if ("development" !== 'production') { if (seriesModel.get(['endLabel', 'show'])) { console.warn('endLabel is not supported for lines in polar systems.'); } } return createPolarClipPath(coordSys, hasAnimation, seriesModel); } } function getEndLabelStateSpecified(endLabelModel, coordSys) { var baseAxis = coordSys.getBaseAxis(); var isHorizontal = baseAxis.isHorizontal(); var isBaseInversed = baseAxis.inverse; var align = isHorizontal ? isBaseInversed ? 'right' : 'left' : 'center'; var verticalAlign = isHorizontal ? 'middle' : isBaseInversed ? 'top' : 'bottom'; return { normal: { align: endLabelModel.get('align') || align, verticalAlign: endLabelModel.get('verticalAlign') || verticalAlign } }; } var LineView = /** @class */ function (_super) { __extends(LineView, _super); function LineView() { return _super !== null && _super.apply(this, arguments) || this; } LineView.prototype.init = function () { var lineGroup = new Group(); var symbolDraw = new SymbolDraw(); this.group.add(symbolDraw.group); this._symbolDraw = symbolDraw; this._lineGroup = lineGroup; }; LineView.prototype.render = function (seriesModel, ecModel, api) { var _this = this; var coordSys = seriesModel.coordinateSystem; var group = this.group; var data = seriesModel.getData(); var lineStyleModel = seriesModel.getModel('lineStyle'); var areaStyleModel = seriesModel.getModel('areaStyle'); var points = data.getLayout('points') || []; var isCoordSysPolar = coordSys.type === 'polar'; var prevCoordSys = this._coordSys; var symbolDraw = this._symbolDraw; var polyline = this._polyline; var polygon = this._polygon; var lineGroup = this._lineGroup; var hasAnimation = seriesModel.get('animation'); var isAreaChart = !areaStyleModel.isEmpty(); var valueOrigin = areaStyleModel.get('origin'); var dataCoordInfo = prepareDataCoordInfo(coordSys, data, valueOrigin); var stackedOnPoints = isAreaChart && getStackedOnPoints(coordSys, data, dataCoordInfo); var showSymbol = seriesModel.get('showSymbol'); var isIgnoreFunc = showSymbol && !isCoordSysPolar && getIsIgnoreFunc(seriesModel, data, coordSys); // Remove temporary symbols var oldData = this._data; oldData && oldData.eachItemGraphicEl(function (el, idx) { if (el.__temp) { group.remove(el); oldData.setItemGraphicEl(idx, null); } }); // Remove previous created symbols if showSymbol changed to false if (!showSymbol) { symbolDraw.remove(); } group.add(lineGroup); // FIXME step not support polar var step = !isCoordSysPolar ? seriesModel.get('step') : false; var clipShapeForSymbol; if (coordSys && coordSys.getArea && seriesModel.get('clip', true)) { clipShapeForSymbol = coordSys.getArea(); // Avoid float number rounding error for symbol on the edge of axis extent. // See #7913 and `test/dataZoom-clip.html`. if (clipShapeForSymbol.width != null) { clipShapeForSymbol.x -= 0.1; clipShapeForSymbol.y -= 0.1; clipShapeForSymbol.width += 0.2; clipShapeForSymbol.height += 0.2; } else if (clipShapeForSymbol.r0) { clipShapeForSymbol.r0 -= 0.5; clipShapeForSymbol.r += 0.5; } } this._clipShapeForSymbol = clipShapeForSymbol; var visualColor = getVisualGradient(data, coordSys) || data.getVisual('style')[data.getVisual('drawType')]; // Initialization animation or coordinate system changed if (!(polyline && prevCoordSys.type === coordSys.type && step === this._step)) { showSymbol && symbolDraw.updateData(data, { isIgnore: isIgnoreFunc, clipShape: clipShapeForSymbol, disableAnimation: true, getSymbolPoint: function (idx) { return [points[idx * 2], points[idx * 2 + 1]]; } }); hasAnimation && this._initSymbolLabelAnimation(data, coordSys, clipShapeForSymbol); if (step) { // TODO If stacked series is not step points = turnPointsIntoStep(points, coordSys, step); if (stackedOnPoints) { stackedOnPoints = turnPointsIntoStep(stackedOnPoints, coordSys, step); } } polyline = this._newPolyline(points); if (isAreaChart) { polygon = this._newPolygon(points, stackedOnPoints); } // NOTE: Must update _endLabel before setClipPath. if (!isCoordSysPolar) { this._initOrUpdateEndLabel(seriesModel, coordSys, convertToColorString(visualColor)); } lineGroup.setClipPath(createLineClipPath(this, coordSys, true, seriesModel)); } else { if (isAreaChart && !polygon) { // If areaStyle is added polygon = this._newPolygon(points, stackedOnPoints); } else if (polygon && !isAreaChart) { // If areaStyle is removed lineGroup.remove(polygon); polygon = this._polygon = null; } // NOTE: Must update _endLabel before setClipPath. if (!isCoordSysPolar) { this._initOrUpdateEndLabel(seriesModel, coordSys, convertToColorString(visualColor)); } // Update clipPath lineGroup.setClipPath(createLineClipPath(this, coordSys, false, seriesModel)); // Always update, or it is wrong in the case turning on legend // because points are not changed showSymbol && symbolDraw.updateData(data, { isIgnore: isIgnoreFunc, clipShape: clipShapeForSymbol, disableAnimation: true, getSymbolPoint: function (idx) { return [points[idx * 2], points[idx * 2 + 1]]; } }); // In the case data zoom triggerred refreshing frequently // Data may not change if line has a category axis. So it should animate nothing if (!isPointsSame(this._stackedOnPoints, stackedOnPoints) || !isPointsSame(this._points, points)) { if (hasAnimation) { this._doUpdateAnimation(data, stackedOnPoints, coordSys, api, step, valueOrigin); } else { // Not do it in update with animation if (step) { // TODO If stacked series is not step points = turnPointsIntoStep(points, coordSys, step); if (stackedOnPoints) { stackedOnPoints = turnPointsIntoStep(stackedOnPoints, coordSys, step); } } polyline.setShape({ points: points }); polygon && polygon.setShape({ points: points, stackedOnPoints: stackedOnPoints }); } } } var focus = seriesModel.get(['emphasis', 'focus']); var blurScope = seriesModel.get(['emphasis', 'blurScope']); polyline.useStyle(defaults( // Use color in lineStyle first lineStyleModel.getLineStyle(), { fill: 'none', stroke: visualColor, lineJoin: 'bevel' })); setStatesStylesFromModel(polyline, seriesModel, 'lineStyle'); if (polyline.style.lineWidth > 0 && seriesModel.get(['emphasis', 'lineStyle', 'width']) === 'bolder') { var emphasisLineStyle = polyline.getState('emphasis').style; emphasisLineStyle.lineWidth = +polyline.style.lineWidth + 1; } // Needs seriesIndex for focus getECData(polyline).seriesIndex = seriesModel.seriesIndex; enableHoverEmphasis(polyline, focus, blurScope); var smooth = getSmooth(seriesModel.get('smooth')); var smoothMonotone = seriesModel.get('smoothMonotone'); var connectNulls = seriesModel.get('connectNulls'); polyline.setShape({ smooth: smooth, smoothMonotone: smoothMonotone, connectNulls: connectNulls }); if (polygon) { var stackedOnSeries = data.getCalculationInfo('stackedOnSeries'); var stackedOnSmooth = 0; polygon.useStyle(defaults(areaStyleModel.getAreaStyle(), { fill: visualColor, opacity: 0.7, lineJoin: 'bevel', decal: data.getVisual('style').decal })); if (stackedOnSeries) { stackedOnSmooth = getSmooth(stackedOnSeries.get('smooth')); } polygon.setShape({ smooth: smooth, stackedOnSmooth: stackedOnSmooth, smoothMonotone: smoothMonotone, connectNulls: connectNulls }); setStatesStylesFromModel(polygon, seriesModel, 'areaStyle'); // Needs seriesIndex for focus getECData(polygon).seriesIndex = seriesModel.seriesIndex; enableHoverEmphasis(polygon, focus, blurScope); } var changePolyState = function (toState) { _this._changePolyState(toState); }; data.eachItemGraphicEl(function (el) { // Switch polyline / polygon state if element changed its state. el && (el.onHoverStateChange = changePolyState); }); this._polyline.onHoverStateChange = changePolyState; this._data = data; // Save the coordinate system for transition animation when data changed this._coordSys = coordSys; this._stackedOnPoints = stackedOnPoints; this._points = points; this._step = step; this._valueOrigin = valueOrigin; }; LineView.prototype.dispose = function () {}; LineView.prototype.highlight = function (seriesModel, ecModel, api, payload) { var data = seriesModel.getData(); var dataIndex = queryDataIndex(data, payload); this._changePolyState('emphasis'); if (!(dataIndex instanceof Array) && dataIndex != null && dataIndex >= 0) { var points = data.getLayout('points'); var symbol = data.getItemGraphicEl(dataIndex); if (!symbol) { // Create a temporary symbol if it is not exists var x = points[dataIndex * 2]; var y = points[dataIndex * 2 + 1]; if (isNaN(x) || isNaN(y)) { // Null data return; } // fix #11360: should't draw symbol outside clipShapeForSymbol if (this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(x, y)) { return; } symbol = new Symbol(data, dataIndex); symbol.x = x; symbol.y = y; symbol.setZ(seriesModel.get('zlevel'), seriesModel.get('z')); // ensure label text of the temporal symbol is on the top of line and area polygon var symbolLabel = symbol.getSymbolPath().getTextContent(); symbolLabel && (symbolLabel.z2 = this._polyline.z2 + 1); symbol.__temp = true; data.setItemGraphicEl(dataIndex, symbol); // Stop scale animation symbol.stopSymbolAnimation(true); this.group.add(symbol); } symbol.highlight(); } else { // Highlight whole series ChartView.prototype.highlight.call(this, seriesModel, ecModel, api, payload); } }; LineView.prototype.downplay = function (seriesModel, ecModel, api, payload) { var data = seriesModel.getData(); var dataIndex = queryDataIndex(data, payload); this._changePolyState('normal'); if (dataIndex != null && dataIndex >= 0) { var symbol = data.getItemGraphicEl(dataIndex); if (symbol) { if (symbol.__temp) { data.setItemGraphicEl(dataIndex, null); this.group.remove(symbol); } else { symbol.downplay(); } } } else { // FIXME // can not downplay completely. // Downplay whole series ChartView.prototype.downplay.call(this, seriesModel, ecModel, api, payload); } }; LineView.prototype._changePolyState = function (toState) { var polygon = this._polygon; setStatesFlag(this._polyline, toState); polygon && setStatesFlag(polygon, toState); }; LineView.prototype._newPolyline = function (points) { var polyline = this._polyline; // Remove previous created polyline if (polyline) { this._lineGroup.remove(polyline); } polyline = new ECPolyline({ shape: { points: points }, segmentIgnoreThreshold: 2, z2: 10 }); this._lineGroup.add(polyline); this._polyline = polyline; return polyline; }; LineView.prototype._newPolygon = function (points, stackedOnPoints) { var polygon = this._polygon; // Remove previous created polygon if (polygon) { this._lineGroup.remove(polygon); } polygon = new ECPolygon({ shape: { points: points, stackedOnPoints: stackedOnPoints }, segmentIgnoreThreshold: 2 }); this._lineGroup.add(polygon); this._polygon = polygon; return polygon; }; LineView.prototype._initSymbolLabelAnimation = function (data, coordSys, clipShape) { var isHorizontalOrRadial; var isCoordSysPolar; var baseAxis = coordSys.getBaseAxis(); var isAxisInverse = baseAxis.inverse; if (coordSys.type === 'cartesian2d') { isHorizontalOrRadial = baseAxis.isHorizontal(); isCoordSysPolar = false; } else if (coordSys.type === 'polar') { isHorizontalOrRadial = baseAxis.dim === 'angle'; isCoordSysPolar = true; } var seriesModel = data.hostModel; var seriesDuration = seriesModel.get('animationDuration'); if (typeof seriesDuration === 'function') { seriesDuration = seriesDuration(null); } var seriesDalay = seriesModel.get('animationDelay') || 0; var seriesDalayValue = typeof seriesDalay === 'function' ? seriesDalay(null) : seriesDalay; data.eachItemGraphicEl(function (symbol, idx) { var el = symbol; if (el) { var point = [symbol.x, symbol.y]; var start = void 0; var end = void 0; var current = void 0; if (isCoordSysPolar) { var polarClip = clipShape; var coord = coordSys.pointToCoord(point); if (isHorizontalOrRadial) { start = polarClip.startAngle; end = polarClip.endAngle; current = -coord[1] / 180 * Math.PI; } else { start = polarClip.r0; end = polarClip.r; current = coord[0]; } } else { var gridClip = clipShape; if (isHorizontalOrRadial) { start = gridClip.x; end = gridClip.x + gridClip.width; current = symbol.x; } else { start = gridClip.y + gridClip.height; end = gridClip.y; current = symbol.y; } } var ratio = end === start ? 0 : (current - start) / (end - start); if (isAxisInverse) { ratio = 1 - ratio; } var delay = typeof seriesDalay === 'function' ? seriesDalay(idx) : seriesDuration * ratio + seriesDalayValue; var symbolPath = el.getSymbolPath(); var text = symbolPath.getTextContent(); el.attr({ scaleX: 0, scaleY: 0 }); el.animateTo({ scaleX: 1, scaleY: 1 }, { duration: 200, delay: delay }); if (text) { text.animateFrom({ style: { opacity: 0 } }, { duration: 300, delay: delay }); } symbolPath.disableLabelAnimation = true; } }); }; LineView.prototype._initOrUpdateEndLabel = function (seriesModel, coordSys, inheritColor) { var endLabelModel = seriesModel.getModel('endLabel'); if (endLabelModel.get('show')) { var data_2 = seriesModel.getData(); var polyline = this._polyline; var endLabel = this._endLabel; if (!endLabel) { endLabel = this._endLabel = new ZRText({ z2: 200 // should be higher than item symbol }); endLabel.ignoreClip = true; polyline.setTextContent(this._endLabel); polyline.disableLabelAnimation = true; } // Find last non-NaN data to display data var dataIndex = getLastIndexNotNull(data_2.getLayout('points')); if (dataIndex >= 0) { setLabelStyle(polyline, getLabelStatesModels(seriesModel, 'endLabel'), { inheritColor: inheritColor, labelFetcher: seriesModel, labelDataIndex: dataIndex, defaultText: function (dataIndex, opt, interpolatedValue) { return interpolatedValue != null ? getDefaultInterpolatedLabel(data_2, interpolatedValue) : getDefaultLabel(data_2, dataIndex); }, enableTextSetter: true }, getEndLabelStateSpecified(endLabelModel, coordSys)); polyline.textConfig.position = null; } } else if (this._endLabel) { this._polyline.removeTextContent(); this._endLabel = null; } }; LineView.prototype._endLabelOnDuring = function (percent, clipRect, data, animationRecord, valueAnimation, endLabelModel, coordSys) { var endLabel = this._endLabel; var polyline = this._polyline; if (endLabel) { // NOTE: Don't remove percent < 1. percent === 1 means the first frame during render. // The label is not prepared at this time. if (percent < 1 && animationRecord.originalX == null) { animationRecord.originalX = endLabel.x; animationRecord.originalY = endLabel.y; } var points = data.getLayout('points'); var seriesModel = data.hostModel; var connectNulls = seriesModel.get('connectNulls'); var precision = endLabelModel.get('precision'); var distance = endLabelModel.get('distance') || 0; var baseAxis = coordSys.getBaseAxis(); var isHorizontal = baseAxis.isHorizontal(); var isBaseInversed = baseAxis.inverse; var clipShape = clipRect.shape; var xOrY = isBaseInversed ? isHorizontal ? clipShape.x : clipShape.y + clipShape.height : isHorizontal ? clipShape.x + clipShape.width : clipShape.y; var distanceX = (isHorizontal ? distance : 0) * (isBaseInversed ? -1 : 1); var distanceY = (isHorizontal ? 0 : -distance) * (isBaseInversed ? -1 : 1); var dim = isHorizontal ? 'x' : 'y'; var dataIndexRange = getIndexRange(points, xOrY, dim); var indices = dataIndexRange.range; var diff = indices[1] - indices[0]; var value = void 0; if (diff >= 1) { // diff > 1 && connectNulls, which is on the null data. if (diff > 1 && !connectNulls) { var pt = getPointAtIndex(points, indices[0]); endLabel.attr({ x: pt[0] + distanceX, y: pt[1] + distanceY }); valueAnimation && (value = seriesModel.getRawValue(indices[0])); } else { var pt = polyline.getPointOn(xOrY, dim); pt && endLabel.attr({ x: pt[0] + distanceX, y: pt[1] + distanceY }); var startValue = seriesModel.getRawValue(indices[0]); var endValue = seriesModel.getRawValue(indices[1]); valueAnimation && (value = interpolateRawValues(data, precision, startValue, endValue, dataIndexRange.t)); } animationRecord.lastFrameIndex = indices[0]; } else { // If diff <= 0, which is the range is not found(Include NaN) // Choose the first point or last point. var idx = percent === 1 || animationRecord.lastFrameIndex > 0 ? indices[0] : 0; var pt = getPointAtIndex(points, idx); valueAnimation && (value = seriesModel.getRawValue(idx)); endLabel.attr({ x: pt[0] + distanceX, y: pt[1] + distanceY }); } if (valueAnimation) { labelInner(endLabel).setLabelText(value); } } }; /** * @private */ // FIXME Two value axis LineView.prototype._doUpdateAnimation = function (data, stackedOnPoints, coordSys, api, step, valueOrigin) { var polyline = this._polyline; var polygon = this._polygon; var seriesModel = data.hostModel; var diff = lineAnimationDiff(this._data, data, this._stackedOnPoints, stackedOnPoints, this._coordSys, coordSys, this._valueOrigin, valueOrigin); var current = diff.current; var stackedOnCurrent = diff.stackedOnCurrent; var next = diff.next; var stackedOnNext = diff.stackedOnNext; if (step) { // TODO If stacked series is not step current = turnPointsIntoStep(diff.current, coordSys, step); stackedOnCurrent = turnPointsIntoStep(diff.stackedOnCurrent, coordSys, step); next = turnPointsIntoStep(diff.next, coordSys, step); stackedOnNext = turnPointsIntoStep(diff.stackedOnNext, coordSys, step); } // Don't apply animation if diff is large. // For better result and avoid memory explosion problems like // https://github.com/apache/incubator-echarts/issues/12229 if (getBoundingDiff(current, next) > 3000 || polygon && getBoundingDiff(stackedOnCurrent, stackedOnNext) > 3000) { polyline.setShape({ points: next }); if (polygon) { polygon.setShape({ points: next, stackedOnPoints: stackedOnNext }); } return; } polyline.shape.__points = diff.current; polyline.shape.points = current; var target = { shape: { points: next } }; // Also animate the original points. // If points reference is changed when turning into step line. if (diff.current !== current) { target.shape.__points = diff.next; } // Stop previous animation. polyline.stopAnimation(); updateProps(polyline, target, seriesModel); if (polygon) { polygon.setShape({ // Reuse the points with polyline. points: current, stackedOnPoints: stackedOnCurrent }); polygon.stopAnimation(); updateProps(polygon, { shape: { stackedOnPoints: stackedOnNext } }, seriesModel); // If use attr directly in updateProps. if (polyline.shape.points !== polygon.shape.points) { polygon.shape.points = polyline.shape.points; } } var updatedDataInfo = []; var diffStatus = diff.status; for (var i = 0; i < diffStatus.length; i++) { var cmd = diffStatus[i].cmd; if (cmd === '=') { var el = data.getItemGraphicEl(diffStatus[i].idx1); if (el) { updatedDataInfo.push({ el: el, ptIdx: i // Index of points }); } } } if (polyline.animators && polyline.animators.length) { polyline.animators[0].during(function () { polygon && polygon.dirtyShape(); var points = polyline.shape.__points; for (var i = 0; i < updatedDataInfo.length; i++) { var el = updatedDataInfo[i].el; var offset = updatedDataInfo[i].ptIdx * 2; el.x = points[offset]; el.y = points[offset + 1]; el.markRedraw(); } }); } }; LineView.prototype.remove = function (ecModel) { var group = this.group; var oldData = this._data; this._lineGroup.removeAll(); this._symbolDraw.remove(true); // Remove temporary created elements when highlighting oldData && oldData.eachItemGraphicEl(function (el, idx) { if (el.__temp) { group.remove(el); oldData.setItemGraphicEl(idx, null); } }); this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._endLabel = this._data = null; }; LineView.type = 'line'; return LineView; }(ChartView); function pointsLayout(seriesType, forceStoreInTypedArray) { return { seriesType: seriesType, plan: createRenderPlanner(), reset: function (seriesModel) { var data = seriesModel.getData(); var coordSys = seriesModel.coordinateSystem; var pipelineContext = seriesModel.pipelineContext; var useTypedArray = forceStoreInTypedArray || pipelineContext.large; if (!coordSys) { return; } var dims = map(coordSys.dimensions, function (dim) { return data.mapDimension(dim); }).slice(0, 2); var dimLen = dims.length; var stackResultDim = data.getCalculationInfo('stackResultDimension'); if (isDimensionStacked(data, dims[0] /*, dims[1]*/ )) { dims[0] = stackResultDim; } if (isDimensionStacked(data, dims[1] /*, dims[0]*/ )) { dims[1] = stackResultDim; } var dimInfo0 = data.getDimensionInfo(dims[0]); var dimInfo1 = data.getDimensionInfo(dims[1]); var dimIdx0 = dimInfo0 && dimInfo0.index; var dimIdx1 = dimInfo1 && dimInfo1.index; return dimLen && { progress: function (params, data) { var segCount = params.end - params.start; var points = useTypedArray && createFloat32Array(segCount * dimLen); var tmpIn = []; var tmpOut = []; for (var i = params.start, offset = 0; i < params.end; i++) { var point = void 0; if (dimLen === 1) { var x = data.getByDimIdx(dimIdx0, i); // NOTE: Make sure the second parameter is null to use default strategy. point = coordSys.dataToPoint(x, null, tmpOut); } else { tmpIn[0] = data.getByDimIdx(dimIdx0, i); tmpIn[1] = data.getByDimIdx(dimIdx1, i); // Let coordinate system to handle the NaN data. point = coordSys.dataToPoint(tmpIn, null, tmpOut); } if (useTypedArray) { points[offset++] = point[0]; points[offset++] = point[1]; } else { data.setItemLayout(i, point.slice()); } } useTypedArray && data.setLayout('points', points); } }; } }; } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ var samplers = { average: function (frame) { var sum = 0; var count = 0; for (var i = 0; i < frame.length; i++) { if (!isNaN(frame[i])) { sum += frame[i]; count++; } } // Return NaN if count is 0 return count === 0 ? NaN : sum / count; }, sum: function (frame) { var sum = 0; for (var i = 0; i < frame.length; i++) { // Ignore NaN sum += frame[i] || 0; } return sum; }, max: function (frame) { var max = -Infinity; for (var i = 0; i < frame.length; i++) { frame[i] > max && (max = frame[i]); } // NaN will cause illegal axis extent. return isFinite(max) ? max : NaN; }, min: function (frame) { var min = Infinity; for (var i = 0; i < frame.length; i++) { frame[i] < min && (min = frame[i]); } // NaN will cause illegal axis extent. return isFinite(min) ? min : NaN; }, // TODO // Median nearest: function (frame) { return frame[0]; } }; var indexSampler = function (frame) { return Math.round(frame.length / 2); }; function dataSample(seriesType) { return { seriesType: seriesType, // FIXME:TS never used, so comment it // modifyOutputEnd: true, reset: function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var sampling = seriesModel.get('sampling'); var coordSys = seriesModel.coordinateSystem; var count = data.count(); // Only cartesian2d support down sampling. Disable it when there is few data. if (count > 10 && coordSys.type === 'cartesian2d' && sampling) { var baseAxis = coordSys.getBaseAxis(); var valueAxis = coordSys.getOtherAxis(baseAxis); var extent = baseAxis.getExtent(); var dpr = api.getDevicePixelRatio(); // Coordinste system has been resized var size = Math.abs(extent[1] - extent[0]) * (dpr || 1); var rate = Math.round(count / size); if (rate > 1) { if (sampling === 'lttb') { seriesModel.setData(data.lttbDownSample(data.mapDimension(valueAxis.dim), 1 / rate)); } var sampler = void 0; if (typeof sampling === 'string') { sampler = samplers[sampling]; } else if (typeof sampling === 'function') { sampler = sampling; } if (sampler) { // Only support sample the first dim mapped from value axis. seriesModel.setData(data.downSample(data.mapDimension(valueAxis.dim), 1 / rate, sampler, indexSampler)); } } } } }; } function install$2(registers) { registers.registerChartView(LineView); registers.registerSeriesModel(LineSeriesModel); registers.registerLayout(pointsLayout('line', true)); registers.registerVisual({ seriesType: 'line', reset: function (seriesModel) { var data = seriesModel.getData(); // Visual coding for legend var lineStyle = seriesModel.getModel('lineStyle').getLineStyle(); if (lineStyle && !lineStyle.stroke) { // Fill in visual should be palette color if // has color callback lineStyle.stroke = data.getVisual('style').fill; } data.setVisual('legendLineStyle', lineStyle); } }); // Down sample after filter registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, dataSample('line')); } var BaseBarSeriesModel = /** @class */ function (_super) { __extends(BaseBarSeriesModel, _super); function BaseBarSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = BaseBarSeriesModel.type; return _this; } BaseBarSeriesModel.prototype.getInitialData = function (option, ecModel) { return createListFromArray(this.getSource(), this, { useEncodeDefaulter: true }); }; BaseBarSeriesModel.prototype.getMarkerPosition = function (value) { var coordSys = this.coordinateSystem; if (coordSys) { // PENDING if clamp ? var pt = coordSys.dataToPoint(coordSys.clampData(value)); var data = this.getData(); var offset = data.getLayout('offset'); var size = data.getLayout('size'); var offsetIndex = coordSys.getBaseAxis().isHorizontal() ? 0 : 1; pt[offsetIndex] += offset + size / 2; return pt; } return [NaN, NaN]; }; BaseBarSeriesModel.type = 'series.__base_bar__'; BaseBarSeriesModel.defaultOption = { zlevel: 0, z: 2, coordinateSystem: 'cartesian2d', legendHoverLink: true, // stack: null // Cartesian coordinate system // xAxisIndex: 0, // yAxisIndex: 0, barMinHeight: 0, barMinAngle: 0, // cursor: null, large: false, largeThreshold: 400, progressive: 3e3, progressiveChunkMode: 'mod' }; return BaseBarSeriesModel; }(SeriesModel); SeriesModel.registerClass(BaseBarSeriesModel); var BarSeriesModel = /** @class */ function (_super) { __extends(BarSeriesModel, _super); function BarSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = BarSeriesModel.type; return _this; } BarSeriesModel.prototype.getInitialData = function () { return createListFromArray(this.getSource(), this, { useEncodeDefaulter: true, createInvertedIndices: !!this.get('realtimeSort', true) || null }); }; /** * @override */ BarSeriesModel.prototype.getProgressive = function () { // Do not support progressive in normal mode. return this.get('large') ? this.get('progressive') : false; }; /** * @override */ BarSeriesModel.prototype.getProgressiveThreshold = function () { // Do not support progressive in normal mode. var progressiveThreshold = this.get('progressiveThreshold'); var largeThreshold = this.get('largeThreshold'); if (largeThreshold > progressiveThreshold) { progressiveThreshold = largeThreshold; } return progressiveThreshold; }; BarSeriesModel.prototype.brushSelector = function (dataIndex, data, selectors) { return selectors.rect(data.getItemLayout(dataIndex)); }; BarSeriesModel.type = 'series.bar'; BarSeriesModel.dependencies = ['grid', 'polar']; BarSeriesModel.defaultOption = inheritDefaultOption(BaseBarSeriesModel.defaultOption, { // If clipped // Only available on cartesian2d clip: true, roundCap: false, showBackground: false, backgroundStyle: { color: 'rgba(180, 180, 180, 0.2)', borderColor: null, borderWidth: 0, borderType: 'solid', borderRadius: 0, shadowBlur: 0, shadowColor: null, shadowOffsetX: 0, shadowOffsetY: 0, opacity: 1 }, select: { itemStyle: { borderColor: '#212121' } }, realtimeSort: false }); return BarSeriesModel; }(BaseBarSeriesModel); /** * Sausage: similar to sector, but have half circle on both sides */ var SausageShape = /** @class */ function () { function SausageShape() { this.cx = 0; this.cy = 0; this.r0 = 0; this.r = 0; this.startAngle = 0; this.endAngle = Math.PI * 2; this.clockwise = true; } return SausageShape; }(); var SausagePath = /** @class */ function (_super) { __extends(SausagePath, _super); function SausagePath(opts) { var _this = _super.call(this, opts) || this; _this.type = 'sausage'; return _this; } SausagePath.prototype.getDefaultShape = function () { return new SausageShape(); }; SausagePath.prototype.buildPath = function (ctx, shape) { var x = shape.cx; var y = shape.cy; var r0 = Math.max(shape.r0 || 0, 0); var r = Math.max(shape.r, 0); var dr = (r - r0) * 0.5; var rCenter = r0 + dr; var startAngle = shape.startAngle; var endAngle = shape.endAngle; var clockwise = shape.clockwise; var unitStartX = Math.cos(startAngle); var unitStartY = Math.sin(startAngle); var unitEndX = Math.cos(endAngle); var unitEndY = Math.sin(endAngle); var lessThanCircle = clockwise ? endAngle - startAngle < Math.PI * 2 : startAngle - endAngle < Math.PI * 2; if (lessThanCircle) { ctx.moveTo(unitStartX * r0 + x, unitStartY * r0 + y); ctx.arc(unitStartX * rCenter + x, unitStartY * rCenter + y, dr, -Math.PI + startAngle, startAngle, !clockwise); } ctx.arc(x, y, r, startAngle, endAngle, !clockwise); ctx.moveTo(unitEndX * r + x, unitEndY * r + y); ctx.arc(unitEndX * rCenter + x, unitEndY * rCenter + y, dr, endAngle - Math.PI * 2, endAngle - Math.PI, !clockwise); if (r0 !== 0) { ctx.arc(x, y, r0, endAngle, startAngle, clockwise); ctx.moveTo(unitStartX * r0 + x, unitEndY * r0 + y); } ctx.closePath(); }; return SausagePath; }(Path); var _eventPos = [0, 0]; var mathMax$6 = Math.max; var mathMin$6 = Math.min; function getClipArea(coord, data) { var coordSysClipArea = coord.getArea && coord.getArea(); if (isCoordinateSystemType(coord, 'cartesian2d')) { var baseAxis = coord.getBaseAxis(); // When boundaryGap is false or using time axis. bar may exceed the grid. // We should not clip this part. // See test/bar2.html if (baseAxis.type !== 'category' || !baseAxis.onBand) { var expandWidth = data.getLayout('bandWidth'); if (baseAxis.isHorizontal()) { coordSysClipArea.x -= expandWidth; coordSysClipArea.width += expandWidth * 2; } else { coordSysClipArea.y -= expandWidth; coordSysClipArea.height += expandWidth * 2; } } } return coordSysClipArea; } var BarView = /** @class */ function (_super) { __extends(BarView, _super); function BarView() { var _this = _super.call(this) || this; _this.type = BarView.type; _this._isFirstFrame = true; return _this; } BarView.prototype.render = function (seriesModel, ecModel, api, payload) { this._model = seriesModel; this._removeOnRenderedListener(api); this._updateDrawMode(seriesModel); var coordinateSystemType = seriesModel.get('coordinateSystem'); if (coordinateSystemType === 'cartesian2d' || coordinateSystemType === 'polar') { this._isLargeDraw ? this._renderLarge(seriesModel, ecModel, api) : this._renderNormal(seriesModel, ecModel, api, payload); } else if ("development" !== 'production') { warn('Only cartesian2d and polar supported for bar.'); } }; BarView.prototype.incrementalPrepareRender = function (seriesModel) { this._clear(); this._updateDrawMode(seriesModel); // incremental also need to clip, otherwise might be overlow. // But must not set clip in each frame, otherwise all of the children will be marked redraw. this._updateLargeClip(seriesModel); }; BarView.prototype.incrementalRender = function (params, seriesModel) { // Do not support progressive in normal mode. this._incrementalRenderLarge(params, seriesModel); }; BarView.prototype._updateDrawMode = function (seriesModel) { var isLargeDraw = seriesModel.pipelineContext.large; if (this._isLargeDraw == null || isLargeDraw !== this._isLargeDraw) { this._isLargeDraw = isLargeDraw; this._clear(); } }; BarView.prototype._renderNormal = function (seriesModel, ecModel, api, payload) { var group = this.group; var data = seriesModel.getData(); var oldData = this._data; var coord = seriesModel.coordinateSystem; var baseAxis = coord.getBaseAxis(); var isHorizontalOrRadial; if (coord.type === 'cartesian2d') { isHorizontalOrRadial = baseAxis.isHorizontal(); } else if (coord.type === 'polar') { isHorizontalOrRadial = baseAxis.dim === 'angle'; } var animationModel = seriesModel.isAnimationEnabled() ? seriesModel : null; var realtimeSortCfg = shouldRealtimeSort(seriesModel, coord); if (realtimeSortCfg) { this._enableRealtimeSort(realtimeSortCfg, data, api); } var needsClip = seriesModel.get('clip', true) || realtimeSortCfg; var coordSysClipArea = getClipArea(coord, data); // If there is clipPath created in large mode. Remove it. group.removeClipPath(); // We don't use clipPath in normal mode because we needs a perfect animation // And don't want the label are clipped. var roundCap = seriesModel.get('roundCap', true); var drawBackground = seriesModel.get('showBackground', true); var backgroundModel = seriesModel.getModel('backgroundStyle'); var barBorderRadius = backgroundModel.get('borderRadius') || 0; var bgEls = []; var oldBgEls = this._backgroundEls; var isInitSort = payload && payload.isInitSort; var isChangeOrder = payload && payload.type === 'changeAxisOrder'; function createBackground(dataIndex) { var bgLayout = getLayout[coord.type](data, dataIndex); var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, bgLayout); bgEl.useStyle(backgroundModel.getItemStyle()); // Only cartesian2d support borderRadius. if (coord.type === 'cartesian2d') { bgEl.setShape('r', barBorderRadius); } bgEls[dataIndex] = bgEl; return bgEl; } data.diff(oldData).add(function (dataIndex) { var itemModel = data.getItemModel(dataIndex); var layout = getLayout[coord.type](data, dataIndex, itemModel); if (drawBackground) { createBackground(dataIndex); } // If dataZoom in filteMode: 'empty', the baseValue can be set as NaN in "axisProxy". if (!data.hasValue(dataIndex)) { return; } var isClipped = false; if (needsClip) { // Clip will modify the layout params. // And return a boolean to determine if the shape are fully clipped. isClipped = clip[coord.type](coordSysClipArea, layout); } var el = elementCreator[coord.type](seriesModel, data, dataIndex, layout, isHorizontalOrRadial, animationModel, baseAxis.model, false, roundCap); updateStyle(el, data, dataIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, coord.type === 'polar'); if (isInitSort) { el.attr({ shape: layout }); } else if (realtimeSortCfg) { updateRealtimeAnimation(realtimeSortCfg, animationModel, el, layout, dataIndex, isHorizontalOrRadial, false, false); } else { initProps(el, { shape: layout }, seriesModel, dataIndex); } data.setItemGraphicEl(dataIndex, el); group.add(el); el.ignore = isClipped; }).update(function (newIndex, oldIndex) { var itemModel = data.getItemModel(newIndex); var layout = getLayout[coord.type](data, newIndex, itemModel); if (drawBackground) { var bgEl = void 0; if (oldBgEls.length === 0) { bgEl = createBackground(oldIndex); } else { bgEl = oldBgEls[oldIndex]; bgEl.useStyle(backgroundModel.getItemStyle()); // Only cartesian2d support borderRadius. if (coord.type === 'cartesian2d') { bgEl.setShape('r', barBorderRadius); } bgEls[newIndex] = bgEl; } var bgLayout = getLayout[coord.type](data, newIndex); var shape = createBackgroundShape(isHorizontalOrRadial, bgLayout, coord); updateProps(bgEl, { shape: shape }, animationModel, newIndex); } var el = oldData.getItemGraphicEl(oldIndex); if (!data.hasValue(newIndex)) { group.remove(el); el = null; return; } var isClipped = false; if (needsClip) { isClipped = clip[coord.type](coordSysClipArea, layout); if (isClipped) { group.remove(el); } } if (!el) { el = elementCreator[coord.type](seriesModel, data, newIndex, layout, isHorizontalOrRadial, animationModel, baseAxis.model, !!el, roundCap); } // Not change anything if only order changed. // Especially not change label. if (!isChangeOrder) { updateStyle(el, data, newIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, coord.type === 'polar'); } if (isInitSort) { el.attr({ shape: layout }); } else if (realtimeSortCfg) { updateRealtimeAnimation(realtimeSortCfg, animationModel, el, layout, newIndex, isHorizontalOrRadial, true, isChangeOrder); } else { updateProps(el, { shape: layout }, seriesModel, newIndex, null); } data.setItemGraphicEl(newIndex, el); el.ignore = isClipped; group.add(el); }).remove(function (dataIndex) { var el = oldData.getItemGraphicEl(dataIndex); el && removeElementWithFadeOut(el, seriesModel, dataIndex); }).execute(); var bgGroup = this._backgroundGroup || (this._backgroundGroup = new Group()); bgGroup.removeAll(); for (var i = 0; i < bgEls.length; ++i) { bgGroup.add(bgEls[i]); } group.add(bgGroup); this._backgroundEls = bgEls; this._data = data; }; BarView.prototype._renderLarge = function (seriesModel, ecModel, api) { this._clear(); createLarge(seriesModel, this.group); this._updateLargeClip(seriesModel); }; BarView.prototype._incrementalRenderLarge = function (params, seriesModel) { this._removeBackground(); createLarge(seriesModel, this.group, true); }; BarView.prototype._updateLargeClip = function (seriesModel) { // Use clipPath in large mode. var clipPath = seriesModel.get('clip', true) ? createClipPath(seriesModel.coordinateSystem, false, seriesModel) : null; if (clipPath) { this.group.setClipPath(clipPath); } else { this.group.removeClipPath(); } }; BarView.prototype._enableRealtimeSort = function (realtimeSortCfg, data, api) { var _this = this; // If no data in the first frame, wait for data to initSort if (!data.count()) { return; } var baseAxis = realtimeSortCfg.baseAxis; if (this._isFirstFrame) { this._dispatchInitSort(data, realtimeSortCfg, api); this._isFirstFrame = false; } else { var orderMapping_1 = function (idx) { var el = data.getItemGraphicEl(idx); if (el) { var shape = el.shape; // If data is NaN, shape.xxx may be NaN, so use || 0 here in case return (baseAxis.isHorizontal() // The result should be consistent with the initial sort by data value. // Do not support the case that both positive and negative exist. ? Math.abs(shape.height) : Math.abs(shape.width)) || 0; } else { return 0; } }; this._onRendered = function () { _this._updateSortWithinSameData(data, orderMapping_1, baseAxis, api); }; api.getZr().on('rendered', this._onRendered); } }; BarView.prototype._dataSort = function (data, baseAxis, orderMapping) { var info = []; data.each(data.mapDimension(baseAxis.dim), function (ordinalNumber, dataIdx) { var mappedValue = orderMapping(dataIdx); mappedValue = mappedValue == null ? NaN : mappedValue; info.push({ dataIndex: dataIdx, mappedValue: mappedValue, ordinalNumber: ordinalNumber }); }); info.sort(function (a, b) { // If NaN, it will be treated as min val. return b.mappedValue - a.mappedValue; }); return { ordinalNumbers: map(info, function (item) { return item.ordinalNumber; }) }; }; BarView.prototype._isOrderChangedWithinSameData = function (data, orderMapping, baseAxis) { var scale = baseAxis.scale; var ordinalDataDim = data.mapDimension(baseAxis.dim); var lastValue = Number.MAX_VALUE; for (var tickNum = 0, len = scale.getOrdinalMeta().categories.length; tickNum < len; ++tickNum) { var rawIdx = data.rawIndexOf(ordinalDataDim, scale.getRawOrdinalNumber(tickNum)); var value = rawIdx < 0 // If some tick have no bar, the tick will be treated as min. ? Number.MIN_VALUE // PENDING: if dataZoom on baseAxis exits, is it a performance issue? : orderMapping(data.indexOfRawIndex(rawIdx)); if (value > lastValue) { return true; } lastValue = value; } return false; }; /* * Consider the case when A and B changed order, whose representing * bars are both out of sight, we don't wish to trigger reorder action * as long as the order in the view doesn't change. */ BarView.prototype._isOrderDifferentInView = function (orderInfo, baseAxis) { var scale = baseAxis.scale; var extent = scale.getExtent(); var tickNum = Math.max(0, extent[0]); var tickMax = Math.min(extent[1], scale.getOrdinalMeta().categories.length - 1); for (; tickNum <= tickMax; ++tickNum) { if (orderInfo.ordinalNumbers[tickNum] !== scale.getRawOrdinalNumber(tickNum)) { return true; } } }; BarView.prototype._updateSortWithinSameData = function (data, orderMapping, baseAxis, api) { if (!this._isOrderChangedWithinSameData(data, orderMapping, baseAxis)) { return; } var sortInfo = this._dataSort(data, baseAxis, orderMapping); if (this._isOrderDifferentInView(sortInfo, baseAxis)) { this._removeOnRenderedListener(api); api.dispatchAction({ type: 'changeAxisOrder', componentType: baseAxis.dim + 'Axis', axisId: baseAxis.index, sortInfo: sortInfo }); } }; BarView.prototype._dispatchInitSort = function (data, realtimeSortCfg, api) { var baseAxis = realtimeSortCfg.baseAxis; var sortResult = this._dataSort(data, baseAxis, function (dataIdx) { return data.get(data.mapDimension(realtimeSortCfg.otherAxis.dim), dataIdx); }); api.dispatchAction({ type: 'changeAxisOrder', componentType: baseAxis.dim + 'Axis', isInitSort: true, axisId: baseAxis.index, sortInfo: sortResult, animation: { // Update the axis label from the natural initial layout to // sorted layout should has no animation. duration: 0 } }); }; BarView.prototype.remove = function (ecModel, api) { this._clear(this._model); this._removeOnRenderedListener(api); }; BarView.prototype.dispose = function (ecModel, api) { this._removeOnRenderedListener(api); }; BarView.prototype._removeOnRenderedListener = function (api) { if (this._onRendered) { api.getZr().off('rendered', this._onRendered); this._onRendered = null; } }; BarView.prototype._clear = function (model) { var group = this.group; var data = this._data; if (model && model.isAnimationEnabled() && data && !this._isLargeDraw) { this._removeBackground(); this._backgroundEls = []; data.eachItemGraphicEl(function (el) { removeElementWithFadeOut(el, model, getECData(el).dataIndex); }); } else { group.removeAll(); } this._data = null; this._isFirstFrame = true; }; BarView.prototype._removeBackground = function () { this.group.remove(this._backgroundGroup); this._backgroundGroup = null; }; BarView.type = 'bar'; return BarView; }(ChartView); var clip = { cartesian2d: function (coordSysBoundingRect, layout) { var signWidth = layout.width < 0 ? -1 : 1; var signHeight = layout.height < 0 ? -1 : 1; // Needs positive width and height if (signWidth < 0) { layout.x += layout.width; layout.width = -layout.width; } if (signHeight < 0) { layout.y += layout.height; layout.height = -layout.height; } var coordSysX2 = coordSysBoundingRect.x + coordSysBoundingRect.width; var coordSysY2 = coordSysBoundingRect.y + coordSysBoundingRect.height; var x = mathMax$6(layout.x, coordSysBoundingRect.x); var x2 = mathMin$6(layout.x + layout.width, coordSysX2); var y = mathMax$6(layout.y, coordSysBoundingRect.y); var y2 = mathMin$6(layout.y + layout.height, coordSysY2); var xClipped = x2 < x; var yClipped = y2 < y; // When xClipped or yClipped, the element will be marked as `ignore`. // But we should also place the element at the edge of the coord sys bounding rect. // Beause if data changed and the bar show again, its transition animaiton // will begin at this place. layout.x = xClipped && x > coordSysX2 ? x2 : x; layout.y = yClipped && y > coordSysY2 ? y2 : y; layout.width = xClipped ? 0 : x2 - x; layout.height = yClipped ? 0 : y2 - y; // Reverse back if (signWidth < 0) { layout.x += layout.width; layout.width = -layout.width; } if (signHeight < 0) { layout.y += layout.height; layout.height = -layout.height; } return xClipped || yClipped; }, polar: function (coordSysClipArea, layout) { var signR = layout.r0 <= layout.r ? 1 : -1; // Make sure r is larger than r0 if (signR < 0) { var tmp = layout.r; layout.r = layout.r0; layout.r0 = tmp; } var r = mathMin$6(layout.r, coordSysClipArea.r); var r0 = mathMax$6(layout.r0, coordSysClipArea.r0); layout.r = r; layout.r0 = r0; var clipped = r - r0 < 0; // Reverse back if (signR < 0) { var tmp = layout.r; layout.r = layout.r0; layout.r0 = tmp; } return clipped; } }; var elementCreator = { cartesian2d: function (seriesModel, data, newIndex, layout, isHorizontal, animationModel, axisModel, isUpdate, roundCap) { var rect = new Rect({ shape: extend({}, layout), z2: 1 }); rect.__dataIndex = newIndex; rect.name = 'item'; if (animationModel) { var rectShape = rect.shape; var animateProperty = isHorizontal ? 'height' : 'width'; rectShape[animateProperty] = 0; } return rect; }, polar: function (seriesModel, data, newIndex, layout, isRadial, animationModel, axisModel, isUpdate, roundCap) { // Keep the same logic with bar in catesion: use end value to control // direction. Notice that if clockwise is true (by default), the sector // will always draw clockwisely, no matter whether endAngle is greater // or less than startAngle. var clockwise = layout.startAngle < layout.endAngle; var ShapeClass = !isRadial && roundCap ? SausagePath : Sector; var sector = new ShapeClass({ shape: defaults({ clockwise: clockwise }, layout), z2: 1 }); sector.name = 'item'; // Animation if (animationModel) { var sectorShape = sector.shape; var animateProperty = isRadial ? 'r' : 'endAngle'; var animateTarget = {}; sectorShape[animateProperty] = isRadial ? 0 : layout.startAngle; animateTarget[animateProperty] = layout[animateProperty]; (isUpdate ? updateProps : initProps)(sector, { shape: animateTarget // __value: typeof dataValue === 'string' ? parseInt(dataValue, 10) : dataValue }, animationModel); } return sector; } }; function shouldRealtimeSort(seriesModel, coordSys) { var realtimeSortOption = seriesModel.get('realtimeSort', true); var baseAxis = coordSys.getBaseAxis(); if ("development" !== 'production') { if (realtimeSortOption) { if (baseAxis.type !== 'category') { warn('`realtimeSort` will not work because this bar series is not based on a category axis.'); } if (coordSys.type !== 'cartesian2d') { warn('`realtimeSort` will not work because this bar series is not on cartesian2d.'); } } } if (realtimeSortOption && baseAxis.type === 'category' && coordSys.type === 'cartesian2d') { return { baseAxis: baseAxis, otherAxis: coordSys.getOtherAxis(baseAxis) }; } } function updateRealtimeAnimation(realtimeSortCfg, seriesAnimationModel, el, layout, newIndex, isHorizontal, isUpdate, isChangeOrder) { var seriesTarget; var axisTarget; if (isHorizontal) { axisTarget = { x: layout.x, width: layout.width }; seriesTarget = { y: layout.y, height: layout.height }; } else { axisTarget = { y: layout.y, height: layout.height }; seriesTarget = { x: layout.x, width: layout.width }; } if (!isChangeOrder) { // Keep the original growth animation if only axis order changed. // Not start a new animation. (isUpdate ? updateProps : initProps)(el, { shape: seriesTarget }, seriesAnimationModel, newIndex, null); } var axisAnimationModel = seriesAnimationModel ? realtimeSortCfg.baseAxis.model : null; (isUpdate ? updateProps : initProps)(el, { shape: axisTarget }, axisAnimationModel, newIndex); } var getLayout = { // itemModel is only used to get borderWidth, which is not needed // when calculating bar background layout. cartesian2d: function (data, dataIndex, itemModel) { var layout = data.getItemLayout(dataIndex); var fixedLineWidth = itemModel ? getLineWidth(itemModel, layout) : 0; // fix layout with lineWidth var signX = layout.width > 0 ? 1 : -1; var signY = layout.height > 0 ? 1 : -1; return { x: layout.x + signX * fixedLineWidth / 2, y: layout.y + signY * fixedLineWidth / 2, width: layout.width - signX * fixedLineWidth, height: layout.height - signY * fixedLineWidth }; }, polar: function (data, dataIndex, itemModel) { var layout = data.getItemLayout(dataIndex); return { cx: layout.cx, cy: layout.cy, r0: layout.r0, r: layout.r, startAngle: layout.startAngle, endAngle: layout.endAngle }; } }; function isZeroOnPolar(layout) { return layout.startAngle != null && layout.endAngle != null && layout.startAngle === layout.endAngle; } function updateStyle(el, data, dataIndex, itemModel, layout, seriesModel, isHorizontal, isPolar) { var style = data.getItemVisual(dataIndex, 'style'); if (!isPolar) { el.setShape('r', itemModel.get(['itemStyle', 'borderRadius']) || 0); } el.useStyle(style); var cursorStyle = itemModel.getShallow('cursor'); cursorStyle && el.attr('cursor', cursorStyle); if (!isPolar) { var labelPositionOutside = isHorizontal ? layout.height > 0 ? 'bottom' : 'top' : layout.width > 0 ? 'left' : 'right'; var labelStatesModels = getLabelStatesModels(itemModel); setLabelStyle(el, labelStatesModels, { labelFetcher: seriesModel, labelDataIndex: dataIndex, defaultText: getDefaultLabel(seriesModel.getData(), dataIndex), inheritColor: style.fill, defaultOpacity: style.opacity, defaultOutsidePosition: labelPositionOutside }); var label = el.getTextContent(); setLabelValueAnimation(label, labelStatesModels, seriesModel.getRawValue(dataIndex), function (value) { return getDefaultInterpolatedLabel(data, value); }); } var emphasisModel = itemModel.getModel(['emphasis']); enableHoverEmphasis(el, emphasisModel.get('focus'), emphasisModel.get('blurScope')); setStatesStylesFromModel(el, itemModel); if (isZeroOnPolar(layout)) { el.style.fill = 'none'; el.style.stroke = 'none'; each(el.states, function (state) { if (state.style) { state.style.fill = state.style.stroke = 'none'; } }); } } // In case width or height are too small. function getLineWidth(itemModel, rawLayout) { // Has no border. var borderColor = itemModel.get(['itemStyle', 'borderColor']); if (!borderColor || borderColor === 'none') { return 0; } var lineWidth = itemModel.get(['itemStyle', 'borderWidth']) || 0; // width or height may be NaN for empty data var width = isNaN(rawLayout.width) ? Number.MAX_VALUE : Math.abs(rawLayout.width); var height = isNaN(rawLayout.height) ? Number.MAX_VALUE : Math.abs(rawLayout.height); return Math.min(lineWidth, width, height); } var LagePathShape = /** @class */ function () { function LagePathShape() {} return LagePathShape; }(); var LargePath = /** @class */ function (_super) { __extends(LargePath, _super); function LargePath(opts) { var _this = _super.call(this, opts) || this; _this.type = 'largeBar'; return _this; } LargePath.prototype.getDefaultShape = function () { return new LagePathShape(); }; LargePath.prototype.buildPath = function (ctx, shape) { // Drawing lines is more efficient than drawing // a whole line or drawing rects. var points = shape.points; var startPoint = this.__startPoint; var baseDimIdx = this.__baseDimIdx; for (var i = 0; i < points.length; i += 2) { startPoint[baseDimIdx] = points[i + baseDimIdx]; ctx.moveTo(startPoint[0], startPoint[1]); ctx.lineTo(points[i], points[i + 1]); } }; return LargePath; }(Path); function createLarge(seriesModel, group, incremental) { // TODO support polar var data = seriesModel.getData(); var startPoint = []; var baseDimIdx = data.getLayout('valueAxisHorizontal') ? 1 : 0; startPoint[1 - baseDimIdx] = data.getLayout('valueAxisStart'); var largeDataIndices = data.getLayout('largeDataIndices'); var barWidth = data.getLayout('barWidth'); var backgroundModel = seriesModel.getModel('backgroundStyle'); var drawBackground = seriesModel.get('showBackground', true); if (drawBackground) { var points = data.getLayout('largeBackgroundPoints'); var backgroundStartPoint = []; backgroundStartPoint[1 - baseDimIdx] = data.getLayout('backgroundStart'); var bgEl = new LargePath({ shape: { points: points }, incremental: !!incremental, silent: true, z2: 0 }); bgEl.__startPoint = backgroundStartPoint; bgEl.__baseDimIdx = baseDimIdx; bgEl.__largeDataIndices = largeDataIndices; bgEl.__barWidth = barWidth; setLargeBackgroundStyle(bgEl, backgroundModel, data); group.add(bgEl); } var el = new LargePath({ shape: { points: data.getLayout('largePoints') }, incremental: !!incremental }); el.__startPoint = startPoint; el.__baseDimIdx = baseDimIdx; el.__largeDataIndices = largeDataIndices; el.__barWidth = barWidth; group.add(el); setLargeStyle(el, seriesModel, data); // Enable tooltip and user mouse/touch event handlers. getECData(el).seriesIndex = seriesModel.seriesIndex; if (!seriesModel.get('silent')) { el.on('mousedown', largePathUpdateDataIndex); el.on('mousemove', largePathUpdateDataIndex); } } // Use throttle to avoid frequently traverse to find dataIndex. var largePathUpdateDataIndex = throttle(function (event) { var largePath = this; var dataIndex = largePathFindDataIndex(largePath, event.offsetX, event.offsetY); getECData(largePath).dataIndex = dataIndex >= 0 ? dataIndex : null; }, 30, false); function largePathFindDataIndex(largePath, x, y) { var baseDimIdx = largePath.__baseDimIdx; var valueDimIdx = 1 - baseDimIdx; var points = largePath.shape.points; var largeDataIndices = largePath.__largeDataIndices; var barWidthHalf = Math.abs(largePath.__barWidth / 2); var startValueVal = largePath.__startPoint[valueDimIdx]; _eventPos[0] = x; _eventPos[1] = y; var pointerBaseVal = _eventPos[baseDimIdx]; var pointerValueVal = _eventPos[1 - baseDimIdx]; var baseLowerBound = pointerBaseVal - barWidthHalf; var baseUpperBound = pointerBaseVal + barWidthHalf; for (var i = 0, len = points.length / 2; i < len; i++) { var ii = i * 2; var barBaseVal = points[ii + baseDimIdx]; var barValueVal = points[ii + valueDimIdx]; if (barBaseVal >= baseLowerBound && barBaseVal <= baseUpperBound && (startValueVal <= barValueVal ? pointerValueVal >= startValueVal && pointerValueVal <= barValueVal : pointerValueVal >= barValueVal && pointerValueVal <= startValueVal)) { return largeDataIndices[i]; } } return -1; } function setLargeStyle(el, seriesModel, data) { var globalStyle = data.getVisual('style'); el.useStyle(extend({}, globalStyle)); // Use stroke instead of fill. el.style.fill = null; el.style.stroke = globalStyle.fill; el.style.lineWidth = data.getLayout('barWidth'); } function setLargeBackgroundStyle(el, backgroundModel, data) { var borderColor = backgroundModel.get('borderColor') || backgroundModel.get('color'); var itemStyle = backgroundModel.getItemStyle(); el.useStyle(itemStyle); el.style.fill = null; el.style.stroke = borderColor; el.style.lineWidth = data.getLayout('barWidth'); } function createBackgroundShape(isHorizontalOrRadial, layout, coord) { if (isCoordinateSystemType(coord, 'cartesian2d')) { var rectShape = layout; var coordLayout = coord.getArea(); return { x: isHorizontalOrRadial ? rectShape.x : coordLayout.x, y: isHorizontalOrRadial ? coordLayout.y : rectShape.y, width: isHorizontalOrRadial ? rectShape.width : coordLayout.width, height: isHorizontalOrRadial ? coordLayout.height : rectShape.height }; } else { var coordLayout = coord.getArea(); var sectorShape = layout; return { cx: coordLayout.cx, cy: coordLayout.cy, r0: isHorizontalOrRadial ? coordLayout.r0 : sectorShape.r0, r: isHorizontalOrRadial ? coordLayout.r : sectorShape.r, startAngle: isHorizontalOrRadial ? sectorShape.startAngle : 0, endAngle: isHorizontalOrRadial ? sectorShape.endAngle : Math.PI * 2 }; } } function createBackgroundEl(coord, isHorizontalOrRadial, layout) { var ElementClz = coord.type === 'polar' ? Sector : Rect; return new ElementClz({ shape: createBackgroundShape(isHorizontalOrRadial, layout, coord), silent: true, z2: 0 }); } function install$3(registers) { registers.registerChartView(BarView); registers.registerSeriesModel(BarSeriesModel); registers.registerLayout(registers.PRIORITY.VISUAL.LAYOUT, curry(layout, 'bar')); // Use higher prority to avoid to be blocked by other overall layout, which do not // only exist in this module, but probably also exist in other modules, like `barPolar`. registers.registerLayout(registers.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, largeLayout); // Down sample after filter registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, dataSample('bar')); /** * @payload * @property {string} [componentType=series] * @property {number} [dx] * @property {number} [dy] * @property {number} [zoom] * @property {number} [originX] * @property {number} [originY] */ registers.registerAction({ type: 'changeAxisOrder', event: 'changeAxisOrder', update: 'update' }, function (payload, ecModel) { var componentType = payload.componentType || 'series'; ecModel.eachComponent({ mainType: componentType, query: payload }, function (componentModel) { if (payload.sortInfo) { componentModel.axis.setCategorySortInfo(payload.sortInfo); } }); }); } var PI2$8 = Math.PI * 2; var RADIAN = Math.PI / 180; function getViewRect(seriesModel, api) { return getLayoutRect(seriesModel.getBoxLayoutParams(), { width: api.getWidth(), height: api.getHeight() }); } function pieLayout(seriesType, ecModel, api) { ecModel.eachSeriesByType(seriesType, function (seriesModel) { var data = seriesModel.getData(); var valueDim = data.mapDimension('value'); var viewRect = getViewRect(seriesModel, api); var center = seriesModel.get('center'); var radius = seriesModel.get('radius'); if (!isArray(radius)) { radius = [0, radius]; } if (!isArray(center)) { center = [center, center]; } var width = parsePercent$1(viewRect.width, api.getWidth()); var height = parsePercent$1(viewRect.height, api.getHeight()); var size = Math.min(width, height); var cx = parsePercent$1(center[0], width) + viewRect.x; var cy = parsePercent$1(center[1], height) + viewRect.y; var r0 = parsePercent$1(radius[0], size / 2); var r = parsePercent$1(radius[1], size / 2); var startAngle = -seriesModel.get('startAngle') * RADIAN; var minAngle = seriesModel.get('minAngle') * RADIAN; var validDataCount = 0; data.each(valueDim, function (value) { !isNaN(value) && validDataCount++; }); var sum = data.getSum(valueDim); // Sum may be 0 var unitRadian = Math.PI / (sum || validDataCount) * 2; var clockwise = seriesModel.get('clockwise'); var roseType = seriesModel.get('roseType'); var stillShowZeroSum = seriesModel.get('stillShowZeroSum'); // [0...max] var extent = data.getDataExtent(valueDim); extent[0] = 0; // In the case some sector angle is smaller than minAngle var restAngle = PI2$8; var valueSumLargerThanMinAngle = 0; var currentAngle = startAngle; var dir = clockwise ? 1 : -1; data.setLayout({ viewRect: viewRect, r: r }); data.each(valueDim, function (value, idx) { var angle; if (isNaN(value)) { data.setItemLayout(idx, { angle: NaN, startAngle: NaN, endAngle: NaN, clockwise: clockwise, cx: cx, cy: cy, r0: r0, r: roseType ? NaN : r }); return; } // FIXME 兼容 2.0 但是 roseType 是 area 的时候才是这样? if (roseType !== 'area') { angle = sum === 0 && stillShowZeroSum ? unitRadian : value * unitRadian; } else { angle = PI2$8 / validDataCount; } if (angle < minAngle) { angle = minAngle; restAngle -= minAngle; } else { valueSumLargerThanMinAngle += value; } var endAngle = currentAngle + dir * angle; data.setItemLayout(idx, { angle: angle, startAngle: currentAngle, endAngle: endAngle, clockwise: clockwise, cx: cx, cy: cy, r0: r0, r: roseType ? linearMap(value, extent, [r0, r]) : r }); currentAngle = endAngle; }); // Some sector is constrained by minAngle // Rest sectors needs recalculate angle if (restAngle < PI2$8 && validDataCount) { // Average the angle if rest angle is not enough after all angles is // Constrained by minAngle if (restAngle <= 1e-3) { var angle_1 = PI2$8 / validDataCount; data.each(valueDim, function (value, idx) { if (!isNaN(value)) { var layout_1 = data.getItemLayout(idx); layout_1.angle = angle_1; layout_1.startAngle = startAngle + dir * idx * angle_1; layout_1.endAngle = startAngle + dir * (idx + 1) * angle_1; } }); } else { unitRadian = restAngle / valueSumLargerThanMinAngle; currentAngle = startAngle; data.each(valueDim, function (value, idx) { if (!isNaN(value)) { var layout_2 = data.getItemLayout(idx); var angle = layout_2.angle === minAngle ? minAngle : value * unitRadian; layout_2.startAngle = currentAngle; layout_2.endAngle = currentAngle + dir * angle; currentAngle += dir * angle; } }); } } }); } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ function dataFilter(seriesType) { return { seriesType: seriesType, reset: function (seriesModel, ecModel) { var legendModels = ecModel.findComponents({ mainType: 'legend' }); if (!legendModels || !legendModels.length) { return; } var data = seriesModel.getData(); data.filterSelf(function (idx) { var name = data.getName(idx); // If in any legend component the status is not selected. for (var i = 0; i < legendModels.length; i++) { // @ts-ignore FIXME: LegendModel if (!legendModels[i].isSelected(name)) { return false; } } return true; }); } }; } var RADIAN$1 = Math.PI / 180; function adjustSingleSide(list, cx, cy, r, dir, viewWidth, viewHeight, viewLeft, viewTop, farthestX) { if (list.length < 2) { return; } function recalculateXOnSemiToAlignOnEllipseCurve(semi) { var rB = semi.rB; var rB2 = rB * rB; for (var i = 0; i < semi.list.length; i++) { var item = semi.list[i]; var dy = Math.abs(item.label.y - cy); // horizontal r is always same with original r because x is not changed. var rA = r + item.len; var rA2 = rA * rA; // Use ellipse implicit function to calculate x var dx = Math.sqrt((1 - Math.abs(dy * dy / rB2)) * rA2); item.label.x = cx + (dx + item.len2) * dir; } } // Adjust X based on the shifted y. Make tight labels aligned on an ellipse curve. function recalculateX(items) { // Extremes of var topSemi = { list: [], maxY: 0 }; var bottomSemi = { list: [], maxY: 0 }; for (var i = 0; i < items.length; i++) { if (items[i].labelAlignTo !== 'none') { continue; } var item = items[i]; var semi = item.label.y > cy ? bottomSemi : topSemi; var dy = Math.abs(item.label.y - cy); if (dy > semi.maxY) { var dx = item.label.x - cx - item.len2 * dir; // horizontal r is always same with original r because x is not changed. var rA = r + item.len; // Canculate rB based on the topest / bottemest label. var rB = Math.abs(dx) < rA ? Math.sqrt(dy * dy / (1 - dx * dx / rA / rA)) : rA; semi.rB = rB; semi.maxY = dy; } semi.list.push(item); } recalculateXOnSemiToAlignOnEllipseCurve(topSemi); recalculateXOnSemiToAlignOnEllipseCurve(bottomSemi); } var len = list.length; for (var i = 0; i < len; i++) { if (list[i].position === 'outer' && list[i].labelAlignTo === 'labelLine') { var dx = list[i].label.x - farthestX; list[i].linePoints[1][0] += dx; list[i].label.x = farthestX; } } if (shiftLayoutOnY(list, viewTop, viewTop + viewHeight)) { recalculateX(list); } } function avoidOverlap(labelLayoutList, cx, cy, r, viewWidth, viewHeight, viewLeft, viewTop) { var leftList = []; var rightList = []; var leftmostX = Number.MAX_VALUE; var rightmostX = -Number.MAX_VALUE; for (var i = 0; i < labelLayoutList.length; i++) { var label = labelLayoutList[i].label; if (isPositionCenter(labelLayoutList[i])) { continue; } if (label.x < cx) { leftmostX = Math.min(leftmostX, label.x); leftList.push(labelLayoutList[i]); } else { rightmostX = Math.max(rightmostX, label.x); rightList.push(labelLayoutList[i]); } } adjustSingleSide(rightList, cx, cy, r, 1, viewWidth, viewHeight, viewLeft, viewTop, rightmostX); adjustSingleSide(leftList, cx, cy, r, -1, viewWidth, viewHeight, viewLeft, viewTop, leftmostX); for (var i = 0; i < labelLayoutList.length; i++) { var layout = labelLayoutList[i]; var label = layout.label; if (isPositionCenter(layout)) { continue; } var linePoints = layout.linePoints; if (linePoints) { var isAlignToEdge = layout.labelAlignTo === 'edge'; var realTextWidth = layout.rect.width; var targetTextWidth = void 0; if (isAlignToEdge) { if (label.x < cx) { targetTextWidth = linePoints[2][0] - layout.labelDistance - viewLeft - layout.edgeDistance; } else { targetTextWidth = viewLeft + viewWidth - layout.edgeDistance - linePoints[2][0] - layout.labelDistance; } } else { if (label.x < cx) { targetTextWidth = label.x - viewLeft - layout.bleedMargin; } else { targetTextWidth = viewLeft + viewWidth - label.x - layout.bleedMargin; } } if (targetTextWidth < layout.rect.width) { // TODOTODO // layout.text = textContain.truncateText(layout.text, targetTextWidth, layout.font); layout.label.style.width = targetTextWidth; if (layout.labelAlignTo === 'edge') { realTextWidth = targetTextWidth; // realTextWidth = textContain.getWidth(layout.text, layout.font); } } var dist = linePoints[1][0] - linePoints[2][0]; if (isAlignToEdge) { if (label.x < cx) { linePoints[2][0] = viewLeft + layout.edgeDistance + realTextWidth + layout.labelDistance; } else { linePoints[2][0] = viewLeft + viewWidth - layout.edgeDistance - realTextWidth - layout.labelDistance; } } else { if (label.x < cx) { linePoints[2][0] = label.x + layout.labelDistance; } else { linePoints[2][0] = label.x - layout.labelDistance; } linePoints[1][0] = linePoints[2][0] + dist; } linePoints[1][1] = linePoints[2][1] = label.y; } } } function isPositionCenter(sectorShape) { // Not change x for center label return sectorShape.position === 'center'; } function pieLabelLayout(seriesModel) { var data = seriesModel.getData(); var labelLayoutList = []; var cx; var cy; var hasLabelRotate = false; var minShowLabelRadian = (seriesModel.get('minShowLabelAngle') || 0) * RADIAN$1; var viewRect = data.getLayout('viewRect'); var r = data.getLayout('r'); var viewWidth = viewRect.width; var viewLeft = viewRect.x; var viewTop = viewRect.y; var viewHeight = viewRect.height; function setNotShow(el) { el.ignore = true; } function isLabelShown(label) { if (!label.ignore) { return true; } for (var key in label.states) { if (label.states[key].ignore === false) { return true; } } return false; } data.each(function (idx) { var sector = data.getItemGraphicEl(idx); var sectorShape = sector.shape; var label = sector.getTextContent(); var labelLine = sector.getTextGuideLine(); var itemModel = data.getItemModel(idx); var labelModel = itemModel.getModel('label'); // Use position in normal or emphasis var labelPosition = labelModel.get('position') || itemModel.get(['emphasis', 'label', 'position']); var labelDistance = labelModel.get('distanceToLabelLine'); var labelAlignTo = labelModel.get('alignTo'); var edgeDistance = parsePercent$1(labelModel.get('edgeDistance'), viewWidth); var bleedMargin = labelModel.get('bleedMargin'); var labelLineModel = itemModel.getModel('labelLine'); var labelLineLen = labelLineModel.get('length'); labelLineLen = parsePercent$1(labelLineLen, viewWidth); var labelLineLen2 = labelLineModel.get('length2'); labelLineLen2 = parsePercent$1(labelLineLen2, viewWidth); if (Math.abs(sectorShape.endAngle - sectorShape.startAngle) < minShowLabelRadian) { each(label.states, setNotShow); label.ignore = true; return; } if (!isLabelShown(label)) { return; } var midAngle = (sectorShape.startAngle + sectorShape.endAngle) / 2; var nx = Math.cos(midAngle); var ny = Math.sin(midAngle); var textX; var textY; var linePoints; var textAlign; cx = sectorShape.cx; cy = sectorShape.cy; var isLabelInside = labelPosition === 'inside' || labelPosition === 'inner'; if (labelPosition === 'center') { textX = sectorShape.cx; textY = sectorShape.cy; textAlign = 'center'; } else { var x1 = (isLabelInside ? (sectorShape.r + sectorShape.r0) / 2 * nx : sectorShape.r * nx) + cx; var y1 = (isLabelInside ? (sectorShape.r + sectorShape.r0) / 2 * ny : sectorShape.r * ny) + cy; textX = x1 + nx * 3; textY = y1 + ny * 3; if (!isLabelInside) { // For roseType var x2 = x1 + nx * (labelLineLen + r - sectorShape.r); var y2 = y1 + ny * (labelLineLen + r - sectorShape.r); var x3 = x2 + (nx < 0 ? -1 : 1) * labelLineLen2; var y3 = y2; if (labelAlignTo === 'edge') { // Adjust textX because text align of edge is opposite textX = nx < 0 ? viewLeft + edgeDistance : viewLeft + viewWidth - edgeDistance; } else { textX = x3 + (nx < 0 ? -labelDistance : labelDistance); } textY = y3; linePoints = [[x1, y1], [x2, y2], [x3, y3]]; } textAlign = isLabelInside ? 'center' : labelAlignTo === 'edge' ? nx > 0 ? 'right' : 'left' : nx > 0 ? 'left' : 'right'; } var labelRotate; var rotate = labelModel.get('rotate'); if (typeof rotate === 'number') { labelRotate = rotate * (Math.PI / 180); } else { labelRotate = rotate ? nx < 0 ? -midAngle + Math.PI : -midAngle : 0; } hasLabelRotate = !!labelRotate; label.x = textX; label.y = textY; label.rotation = labelRotate; label.setStyle({ verticalAlign: 'middle' }); // Not sectorShape the inside label if (!isLabelInside) { var textRect = label.getBoundingRect().clone(); textRect.applyTransform(label.getComputedTransform()); // Text has a default 1px stroke. Exclude this. var margin = (label.style.margin || 0) + 2.1; textRect.y -= margin / 2; textRect.height += margin; labelLayoutList.push({ label: label, labelLine: labelLine, position: labelPosition, len: labelLineLen, len2: labelLineLen2, minTurnAngle: labelLineModel.get('minTurnAngle'), maxSurfaceAngle: labelLineModel.get('maxSurfaceAngle'), surfaceNormal: new Point(nx, ny), linePoints: linePoints, textAlign: textAlign, labelDistance: labelDistance, labelAlignTo: labelAlignTo, edgeDistance: edgeDistance, bleedMargin: bleedMargin, rect: textRect }); } else { label.setStyle({ align: textAlign }); var selectState = label.states.select; if (selectState) { selectState.x += label.x; selectState.y += label.y; } } sector.setTextConfig({ inside: isLabelInside }); }); if (!hasLabelRotate && seriesModel.get('avoidLabelOverlap')) { avoidOverlap(labelLayoutList, cx, cy, r, viewWidth, viewHeight, viewLeft, viewTop); } for (var i = 0; i < labelLayoutList.length; i++) { var layout = labelLayoutList[i]; var label = layout.label; var labelLine = layout.labelLine; var notShowLabel = isNaN(label.x) || isNaN(label.y); if (label) { label.setStyle({ align: layout.textAlign }); if (notShowLabel) { each(label.states, setNotShow); label.ignore = true; } var selectState = label.states.select; if (selectState) { selectState.x += label.x; selectState.y += label.y; } } if (labelLine) { var linePoints = layout.linePoints; if (notShowLabel || !linePoints) { each(labelLine.states, setNotShow); labelLine.ignore = true; } else { limitTurnAngle(linePoints, layout.minTurnAngle); limitSurfaceAngle(linePoints, layout.surfaceNormal, layout.maxSurfaceAngle); labelLine.setShape({ points: linePoints }); // Set the anchor to the midpoint of sector label.__hostTarget.textGuideLineConfig = { anchor: new Point(linePoints[0][0], linePoints[0][1]) }; } } } } function getSectorCornerRadius(model, shape) { var cornerRadius = model.get('borderRadius'); if (cornerRadius == null) { return null; } if (!isArray(cornerRadius)) { cornerRadius = [cornerRadius, cornerRadius]; } return { innerCornerRadius: parsePercent(cornerRadius[0], shape.r0), cornerRadius: parsePercent(cornerRadius[1], shape.r) }; } /** * Piece of pie including Sector, Label, LabelLine */ var PiePiece = /** @class */ function (_super) { __extends(PiePiece, _super); function PiePiece(data, idx, startAngle) { var _this = _super.call(this) || this; _this.z2 = 2; var text = new ZRText(); _this.setTextContent(text); _this.updateData(data, idx, startAngle, true); return _this; } PiePiece.prototype.updateData = function (data, idx, startAngle, firstCreate) { var sector = this; var seriesModel = data.hostModel; var itemModel = data.getItemModel(idx); var emphasisModel = itemModel.getModel('emphasis'); var layout = data.getItemLayout(idx); var sectorShape = extend(getSectorCornerRadius(itemModel.getModel('itemStyle'), layout) || {}, layout); // Ignore NaN data. if (isNaN(sectorShape.startAngle)) { // Use NaN shape to avoid drawing shape. sector.setShape(sectorShape); return; } if (firstCreate) { sector.setShape(sectorShape); var animationType = seriesModel.getShallow('animationType'); if (animationType === 'scale') { sector.shape.r = layout.r0; initProps(sector, { shape: { r: layout.r } }, seriesModel, idx); } // Expansion else { if (startAngle != null) { sector.setShape({ startAngle: startAngle, endAngle: startAngle }); initProps(sector, { shape: { startAngle: layout.startAngle, endAngle: layout.endAngle } }, seriesModel, idx); } else { sector.shape.endAngle = layout.startAngle; updateProps(sector, { shape: { endAngle: layout.endAngle } }, seriesModel, idx); } } } else { // Transition animation from the old shape updateProps(sector, { shape: sectorShape }, seriesModel, idx); } sector.useStyle(data.getItemVisual(idx, 'style')); setStatesStylesFromModel(sector, itemModel); var midAngle = (layout.startAngle + layout.endAngle) / 2; var offset = seriesModel.get('selectedOffset'); var dx = Math.cos(midAngle) * offset; var dy = Math.sin(midAngle) * offset; var cursorStyle = itemModel.getShallow('cursor'); cursorStyle && sector.attr('cursor', cursorStyle); this._updateLabel(seriesModel, data, idx); sector.ensureState('emphasis').shape = __assign({ r: layout.r + (emphasisModel.get('scale') ? emphasisModel.get('scaleSize') || 0 : 0) }, getSectorCornerRadius(emphasisModel.getModel('itemStyle'), layout)); extend(sector.ensureState('select'), { x: dx, y: dy, shape: getSectorCornerRadius(itemModel.getModel(['select', 'itemStyle']), layout) }); extend(sector.ensureState('blur'), { shape: getSectorCornerRadius(itemModel.getModel(['blur', 'itemStyle']), layout) }); var labelLine = sector.getTextGuideLine(); var labelText = sector.getTextContent(); labelLine && extend(labelLine.ensureState('select'), { x: dx, y: dy }); // TODO: needs dx, dy in zrender? extend(labelText.ensureState('select'), { x: dx, y: dy }); enableHoverEmphasis(this, emphasisModel.get('focus'), emphasisModel.get('blurScope')); }; PiePiece.prototype._updateLabel = function (seriesModel, data, idx) { var sector = this; var itemModel = data.getItemModel(idx); var labelLineModel = itemModel.getModel('labelLine'); var style = data.getItemVisual(idx, 'style'); var visualColor = style && style.fill; var visualOpacity = style && style.opacity; setLabelStyle(sector, getLabelStatesModels(itemModel), { labelFetcher: data.hostModel, labelDataIndex: idx, inheritColor: visualColor, defaultOpacity: visualOpacity, defaultText: seriesModel.getFormattedLabel(idx, 'normal') || data.getName(idx) }); var labelText = sector.getTextContent(); // Set textConfig on sector. sector.setTextConfig({ // reset position, rotation position: null, rotation: null }); // Make sure update style on labelText after setLabelStyle. // Because setLabelStyle will replace a new style on it. labelText.attr({ z2: 10 }); var labelPosition = seriesModel.get(['label', 'position']); if (labelPosition !== 'outside' && labelPosition !== 'outer') { sector.removeTextGuideLine(); } else { var polyline = this.getTextGuideLine(); if (!polyline) { polyline = new Polyline(); this.setTextGuideLine(polyline); } // Default use item visual color setLabelLineStyle(this, getLabelLineStatesModels(itemModel), { stroke: visualColor, opacity: retrieve3(labelLineModel.get(['lineStyle', 'opacity']), visualOpacity, 1) }); } }; return PiePiece; }(Sector); // Pie view var PieView = /** @class */ function (_super) { __extends(PieView, _super); function PieView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.ignoreLabelLineUpdate = true; return _this; } PieView.prototype.init = function () { var sectorGroup = new Group(); this._sectorGroup = sectorGroup; }; PieView.prototype.render = function (seriesModel, ecModel, api, payload) { var data = seriesModel.getData(); var oldData = this._data; var group = this.group; var startAngle; // First render if (!oldData && data.count() > 0) { var shape = data.getItemLayout(0); for (var s = 1; isNaN(shape && shape.startAngle) && s < data.count(); ++s) { shape = data.getItemLayout(s); } if (shape) { startAngle = shape.startAngle; } } data.diff(oldData).add(function (idx) { var piePiece = new PiePiece(data, idx, startAngle); data.setItemGraphicEl(idx, piePiece); group.add(piePiece); }).update(function (newIdx, oldIdx) { var piePiece = oldData.getItemGraphicEl(oldIdx); piePiece.updateData(data, newIdx, startAngle); piePiece.off('click'); group.add(piePiece); data.setItemGraphicEl(newIdx, piePiece); }).remove(function (idx) { var piePiece = oldData.getItemGraphicEl(idx); removeElementWithFadeOut(piePiece, seriesModel, idx); }).execute(); pieLabelLayout(seriesModel); // Always use initial animation. if (seriesModel.get('animationTypeUpdate') !== 'expansion') { this._data = data; } }; PieView.prototype.dispose = function () {}; PieView.prototype.containPoint = function (point, seriesModel) { var data = seriesModel.getData(); var itemLayout = data.getItemLayout(0); if (itemLayout) { var dx = point[0] - itemLayout.cx; var dy = point[1] - itemLayout.cy; var radius = Math.sqrt(dx * dx + dy * dy); return radius <= itemLayout.r && radius >= itemLayout.r0; } }; PieView.type = 'pie'; return PieView; }(ChartView); /** * [Usage]: * (1) * createListSimply(seriesModel, ['value']); * (2) * createListSimply(seriesModel, { * coordDimensions: ['value'], * dimensionsCount: 5 * }); */ function createListSimply(seriesModel, opt, nameList) { opt = isArray(opt) && { coordDimensions: opt } || extend({}, opt); var source = seriesModel.getSource(); var dimensionsInfo = createDimensions(source, opt); var list = new List(dimensionsInfo, seriesModel); list.initData(source, nameList); return list; } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * LegendVisualProvider is an bridge that pick encoded color from data and * provide to the legend component. */ var LegendVisualProvider = /** @class */ function () { function LegendVisualProvider( // Function to get data after filtered. It stores all the encoding info getDataWithEncodedVisual, // Function to get raw data before filtered. getRawData) { this._getDataWithEncodedVisual = getDataWithEncodedVisual; this._getRawData = getRawData; } LegendVisualProvider.prototype.getAllNames = function () { var rawData = this._getRawData(); // We find the name from the raw data. In case it's filtered by the legend component. // Normally, the name can be found in rawData, but can't be found in filtered data will display as gray. return rawData.mapArray(rawData.getName); }; LegendVisualProvider.prototype.containName = function (name) { var rawData = this._getRawData(); return rawData.indexOfName(name) >= 0; }; LegendVisualProvider.prototype.indexOfName = function (name) { // Only get data when necessary. // Because LegendVisualProvider constructor may be new in the stage that data is not prepared yet. // Invoking Series#getData immediately will throw an error. var dataWithEncodedVisual = this._getDataWithEncodedVisual(); return dataWithEncodedVisual.indexOfName(name); }; LegendVisualProvider.prototype.getItemVisual = function (dataIndex, key) { // Get encoded visual properties from final filtered data. var dataWithEncodedVisual = this._getDataWithEncodedVisual(); return dataWithEncodedVisual.getItemVisual(dataIndex, key); }; return LegendVisualProvider; }(); var PieSeriesModel = /** @class */ function (_super) { __extends(PieSeriesModel, _super); function PieSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.useColorPaletteOnData = true; return _this; } /** * @overwrite */ PieSeriesModel.prototype.init = function (option) { _super.prototype.init.apply(this, arguments); // Enable legend selection for each data item // Use a function instead of direct access because data reference may changed this.legendVisualProvider = new LegendVisualProvider(bind(this.getData, this), bind(this.getRawData, this)); this._defaultLabelLine(option); }; /** * @overwrite */ PieSeriesModel.prototype.mergeOption = function () { _super.prototype.mergeOption.apply(this, arguments); }; /** * @overwrite */ PieSeriesModel.prototype.getInitialData = function () { return createListSimply(this, { coordDimensions: ['value'], encodeDefaulter: curry(makeSeriesEncodeForNameBased, this) }); }; /** * @overwrite */ PieSeriesModel.prototype.getDataParams = function (dataIndex) { var data = this.getData(); var params = _super.prototype.getDataParams.call(this, dataIndex); // FIXME toFixed? var valueList = []; data.each(data.mapDimension('value'), function (value) { valueList.push(value); }); params.percent = getPercentWithPrecision(valueList, dataIndex, data.hostModel.get('percentPrecision')); params.$vars.push('percent'); return params; }; PieSeriesModel.prototype._defaultLabelLine = function (option) { // Extend labelLine emphasis defaultEmphasis(option, 'labelLine', ['show']); var labelLineNormalOpt = option.labelLine; var labelLineEmphasisOpt = option.emphasis.labelLine; // Not show label line if `label.normal.show = false` labelLineNormalOpt.show = labelLineNormalOpt.show && option.label.show; labelLineEmphasisOpt.show = labelLineEmphasisOpt.show && option.emphasis.label.show; }; PieSeriesModel.type = 'series.pie'; PieSeriesModel.defaultOption = { zlevel: 0, z: 2, legendHoverLink: true, // 默认全局居中 center: ['50%', '50%'], radius: [0, '75%'], // 默认顺时针 clockwise: true, startAngle: 90, // 最小角度改为0 minAngle: 0, // If the angle of a sector less than `minShowLabelAngle`, // the label will not be displayed. minShowLabelAngle: 0, // 选中时扇区偏移量 selectedOffset: 10, // 选择模式,默认关闭,可选single,multiple // selectedMode: false, // 南丁格尔玫瑰图模式,'radius'(半径) | 'area'(面积) // roseType: null, percentPrecision: 2, // If still show when all data zero. stillShowZeroSum: true, // cursor: null, left: 0, top: 0, right: 0, bottom: 0, width: null, height: null, label: { // color: 'inherit', // If rotate around circle rotate: 0, show: true, overflow: 'truncate', // 'outer', 'inside', 'center' position: 'outer', // 'none', 'labelLine', 'edge'. Works only when position is 'outer' alignTo: 'none', // Closest distance between label and chart edge. // Works only position is 'outer' and alignTo is 'edge'. edgeDistance: '25%', // Works only position is 'outer' and alignTo is not 'edge'. bleedMargin: 10, // Distance between text and label line. distanceToLabelLine: 5 // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调 // 默认使用全局文本样式,详见TEXTSTYLE // distance: 当position为inner时有效,为label位置到圆心的距离与圆半径(环状图为内外半径和)的比例系数 }, // Enabled when label.normal.position is 'outer' labelLine: { show: true, // 引导线两段中的第一段长度 length: 15, // 引导线两段中的第二段长度 length2: 15, smooth: false, minTurnAngle: 90, maxSurfaceAngle: 90, lineStyle: { // color: 各异, width: 1, type: 'solid' } }, itemStyle: { borderWidth: 1 }, labelLayout: { // Hide the overlapped label. hideOverlap: true }, emphasis: { scale: true, scaleSize: 5 }, // If use strategy to avoid label overlapping avoidLabelOverlap: true, // Animation type. Valid values: expansion, scale animationType: 'expansion', animationDuration: 1000, // Animation type when update. Valid values: transition, expansion animationTypeUpdate: 'transition', animationEasingUpdate: 'cubicInOut', animationDurationUpdate: 500, animationEasing: 'cubicInOut' }; return PieSeriesModel; }(SeriesModel); function install$4(registers) { registers.registerChartView(PieView); registers.registerSeriesModel(PieSeriesModel); createLegacyDataSelectAction('pie', registers.registerAction); registers.registerLayout(curry(pieLayout, 'pie')); registers.registerProcessor(dataFilter('pie')); } var ScatterSeriesModel = /** @class */ function (_super) { __extends(ScatterSeriesModel, _super); function ScatterSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ScatterSeriesModel.type; _this.hasSymbolVisual = true; return _this; } ScatterSeriesModel.prototype.getInitialData = function (option, ecModel) { return createListFromArray(this.getSource(), this, { useEncodeDefaulter: true }); }; ScatterSeriesModel.prototype.getProgressive = function () { var progressive = this.option.progressive; if (progressive == null) { // PENDING return this.option.large ? 5e3 : this.get('progressive'); } return progressive; }; ScatterSeriesModel.prototype.getProgressiveThreshold = function () { var progressiveThreshold = this.option.progressiveThreshold; if (progressiveThreshold == null) { // PENDING return this.option.large ? 1e4 : this.get('progressiveThreshold'); } return progressiveThreshold; }; ScatterSeriesModel.prototype.brushSelector = function (dataIndex, data, selectors) { return selectors.point(data.getItemLayout(dataIndex)); }; ScatterSeriesModel.type = 'series.scatter'; ScatterSeriesModel.dependencies = ['grid', 'polar', 'geo', 'singleAxis', 'calendar']; ScatterSeriesModel.defaultOption = { coordinateSystem: 'cartesian2d', zlevel: 0, z: 2, legendHoverLink: true, symbolSize: 10, // symbolRotate: null, // 图形旋转控制 large: false, // Available when large is true largeThreshold: 2000, // cursor: null, itemStyle: { opacity: 0.8 // color: 各异 }, emphasis: { scale: true }, // If clip the overflow graphics // Works on cartesian / polar series clip: true, select: { itemStyle: { borderColor: '#212121' } } // progressive: null }; return ScatterSeriesModel; }(SeriesModel); var BOOST_SIZE_THRESHOLD = 4; var LargeSymbolPathShape = /** @class */ function () { function LargeSymbolPathShape() {} return LargeSymbolPathShape; }(); var LargeSymbolPath = /** @class */ function (_super) { __extends(LargeSymbolPath, _super); function LargeSymbolPath(opts) { return _super.call(this, opts) || this; } LargeSymbolPath.prototype.getDefaultShape = function () { return new LargeSymbolPathShape(); }; LargeSymbolPath.prototype.buildPath = function (path, shape) { var points = shape.points; var size = shape.size; var symbolProxy = this.symbolProxy; var symbolProxyShape = symbolProxy.shape; var ctx = path.getContext ? path.getContext() : path; var canBoost = ctx && size[0] < BOOST_SIZE_THRESHOLD; // Do draw in afterBrush. if (canBoost) { this._ctx = ctx; return; } this._ctx = null; for (var i = 0; i < points.length;) { var x = points[i++]; var y = points[i++]; if (isNaN(x) || isNaN(y)) { continue; } if (this.softClipShape && !this.softClipShape.contain(x, y)) { continue; } symbolProxyShape.x = x - size[0] / 2; symbolProxyShape.y = y - size[1] / 2; symbolProxyShape.width = size[0]; symbolProxyShape.height = size[1]; symbolProxy.buildPath(path, symbolProxyShape, true); } }; LargeSymbolPath.prototype.afterBrush = function () { var shape = this.shape; var points = shape.points; var size = shape.size; var ctx = this._ctx; if (!ctx) { return; } // PENDING If style or other canvas status changed? for (var i = 0; i < points.length;) { var x = points[i++]; var y = points[i++]; if (isNaN(x) || isNaN(y)) { continue; } if (this.softClipShape && !this.softClipShape.contain(x, y)) { continue; } // fillRect is faster than building a rect path and draw. // And it support light globalCompositeOperation. ctx.fillRect(x - size[0] / 2, y - size[1] / 2, size[0], size[1]); } }; LargeSymbolPath.prototype.findDataIndex = function (x, y) { // TODO ??? // Consider transform var shape = this.shape; var points = shape.points; var size = shape.size; var w = Math.max(size[0], 4); var h = Math.max(size[1], 4); // Not consider transform // Treat each element as a rect // top down traverse for (var idx = points.length / 2 - 1; idx >= 0; idx--) { var i = idx * 2; var x0 = points[i] - w / 2; var y0 = points[i + 1] - h / 2; if (x >= x0 && y >= y0 && x <= x0 + w && y <= y0 + h) { return idx; } } return -1; }; return LargeSymbolPath; }(Path); var LargeSymbolDraw = /** @class */ function () { function LargeSymbolDraw() { this.group = new Group(); } LargeSymbolDraw.prototype.isPersistent = function () { return !this._incremental; }; /** * Update symbols draw by new data */ LargeSymbolDraw.prototype.updateData = function (data, opt) { this.group.removeAll(); var symbolEl = new LargeSymbolPath({ rectHover: true, cursor: 'default' }); symbolEl.setShape({ points: data.getLayout('points') }); this._setCommon(symbolEl, data, false, opt); this.group.add(symbolEl); this._incremental = null; }; LargeSymbolDraw.prototype.updateLayout = function (data) { if (this._incremental) { return; } var points = data.getLayout('points'); this.group.eachChild(function (child) { if (child.startIndex != null) { var len = (child.endIndex - child.startIndex) * 2; var byteOffset = child.startIndex * 4 * 2; points = new Float32Array(points.buffer, byteOffset, len); } child.setShape('points', points); }); }; LargeSymbolDraw.prototype.incrementalPrepareUpdate = function (data) { this.group.removeAll(); this._clearIncremental(); // Only use incremental displayables when data amount is larger than 2 million. // PENDING Incremental data? if (data.count() > 2e6) { if (!this._incremental) { this._incremental = new IncrementalDisplayable({ silent: true }); } this.group.add(this._incremental); } else { this._incremental = null; } }; LargeSymbolDraw.prototype.incrementalUpdate = function (taskParams, data, opt) { var symbolEl; if (this._incremental) { symbolEl = new LargeSymbolPath(); this._incremental.addDisplayable(symbolEl, true); } else { symbolEl = new LargeSymbolPath({ rectHover: true, cursor: 'default', startIndex: taskParams.start, endIndex: taskParams.end }); symbolEl.incremental = true; this.group.add(symbolEl); } symbolEl.setShape({ points: data.getLayout('points') }); this._setCommon(symbolEl, data, !!this._incremental, opt); }; LargeSymbolDraw.prototype._setCommon = function (symbolEl, data, isIncremental, opt) { var hostModel = data.hostModel; opt = opt || {}; var size = data.getVisual('symbolSize'); symbolEl.setShape('size', size instanceof Array ? size : [size, size]); symbolEl.softClipShape = opt.clipShape || null; // Create symbolProxy to build path for each data symbolEl.symbolProxy = createSymbol(data.getVisual('symbol'), 0, 0, 0, 0); // Use symbolProxy setColor method symbolEl.setColor = symbolEl.symbolProxy.setColor; var extrudeShadow = symbolEl.shape.size[0] < BOOST_SIZE_THRESHOLD; symbolEl.useStyle( // Draw shadow when doing fillRect is extremely slow. hostModel.getModel('itemStyle').getItemStyle(extrudeShadow ? ['color', 'shadowBlur', 'shadowColor'] : ['color'])); var globalStyle = data.getVisual('style'); var visualColor = globalStyle && globalStyle.fill; if (visualColor) { symbolEl.setColor(visualColor); } if (!isIncremental) { var ecData_1 = getECData(symbolEl); // Enable tooltip // PENDING May have performance issue when path is extremely large ecData_1.seriesIndex = hostModel.seriesIndex; symbolEl.on('mousemove', function (e) { ecData_1.dataIndex = null; var dataIndex = symbolEl.findDataIndex(e.offsetX, e.offsetY); if (dataIndex >= 0) { // Provide dataIndex for tooltip ecData_1.dataIndex = dataIndex + (symbolEl.startIndex || 0); } }); } }; LargeSymbolDraw.prototype.remove = function () { this._clearIncremental(); this._incremental = null; this.group.removeAll(); }; LargeSymbolDraw.prototype._clearIncremental = function () { var incremental = this._incremental; if (incremental) { incremental.clearDisplaybles(); } }; return LargeSymbolDraw; }(); var ScatterView = /** @class */ function (_super) { __extends(ScatterView, _super); function ScatterView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ScatterView.type; return _this; } ScatterView.prototype.render = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var symbolDraw = this._updateSymbolDraw(data, seriesModel); symbolDraw.updateData(data, { // TODO // If this parameter should be a shape or a bounding volume // shape will be more general. // But bounding volume like bounding rect will be much faster in the contain calculation clipShape: this._getClipShape(seriesModel) }); this._finished = true; }; ScatterView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var symbolDraw = this._updateSymbolDraw(data, seriesModel); symbolDraw.incrementalPrepareUpdate(data); this._finished = false; }; ScatterView.prototype.incrementalRender = function (taskParams, seriesModel, ecModel) { this._symbolDraw.incrementalUpdate(taskParams, seriesModel.getData(), { clipShape: this._getClipShape(seriesModel) }); this._finished = taskParams.end === seriesModel.getData().count(); }; ScatterView.prototype.updateTransform = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); // Must mark group dirty and make sure the incremental layer will be cleared // PENDING this.group.dirty(); if (!this._finished || data.count() > 1e4 || !this._symbolDraw.isPersistent()) { return { update: true }; } else { var res = pointsLayout('').reset(seriesModel, ecModel, api); if (res.progress) { res.progress({ start: 0, end: data.count(), count: data.count() }, data); } this._symbolDraw.updateLayout(data); } }; ScatterView.prototype._getClipShape = function (seriesModel) { var coordSys = seriesModel.coordinateSystem; var clipArea = coordSys && coordSys.getArea && coordSys.getArea(); return seriesModel.get('clip', true) ? clipArea : null; }; ScatterView.prototype._updateSymbolDraw = function (data, seriesModel) { var symbolDraw = this._symbolDraw; var pipelineContext = seriesModel.pipelineContext; var isLargeDraw = pipelineContext.large; if (!symbolDraw || isLargeDraw !== this._isLargeDraw) { symbolDraw && symbolDraw.remove(); symbolDraw = this._symbolDraw = isLargeDraw ? new LargeSymbolDraw() : new SymbolDraw(); this._isLargeDraw = isLargeDraw; this.group.removeAll(); } this.group.add(symbolDraw.group); return symbolDraw; }; ScatterView.prototype.remove = function (ecModel, api) { this._symbolDraw && this._symbolDraw.remove(true); this._symbolDraw = null; }; ScatterView.prototype.dispose = function () {}; ScatterView.type = 'scatter'; return ScatterView; }(ChartView); var GridModel = /** @class */ function (_super) { __extends(GridModel, _super); function GridModel() { return _super !== null && _super.apply(this, arguments) || this; } GridModel.type = 'grid'; GridModel.dependencies = ['xAxis', 'yAxis']; GridModel.layoutMode = 'box'; GridModel.defaultOption = { show: false, zlevel: 0, z: 0, left: '10%', top: 60, right: '10%', bottom: 70, // If grid size contain label containLabel: false, // width: {totalWidth} - left - right, // height: {totalHeight} - top - bottom, backgroundColor: 'rgba(0,0,0,0)', borderWidth: 1, borderColor: '#ccc' }; return GridModel; }(ComponentModel); var CartesianAxisModel = /** @class */ function (_super) { __extends(CartesianAxisModel, _super); function CartesianAxisModel() { return _super !== null && _super.apply(this, arguments) || this; } CartesianAxisModel.prototype.getCoordSysModel = function () { return this.getReferringComponents('grid', SINGLE_REFERRING).models[0]; }; CartesianAxisModel.type = 'cartesian2dAxis'; return CartesianAxisModel; }(ComponentModel); mixin(CartesianAxisModel, AxisModelCommonMixin); var defaultOption = { show: true, zlevel: 0, z: 0, // Inverse the axis. inverse: false, // Axis name displayed. name: '', // 'start' | 'middle' | 'end' nameLocation: 'end', // By degree. By default auto rotate by nameLocation. nameRotate: null, nameTruncate: { maxWidth: null, ellipsis: '...', placeholder: '.' }, // Use global text style by default. nameTextStyle: {}, // The gap between axisName and axisLine. nameGap: 15, // Default `false` to support tooltip. silent: false, // Default `false` to avoid legacy user event listener fail. triggerEvent: false, tooltip: { show: false }, axisPointer: {}, axisLine: { show: true, onZero: true, onZeroAxisIndex: null, lineStyle: { color: '#6E7079', width: 1, type: 'solid' }, // The arrow at both ends the the axis. symbol: ['none', 'none'], symbolSize: [10, 15] }, axisTick: { show: true, // Whether axisTick is inside the grid or outside the grid. inside: false, // The length of axisTick. length: 5, lineStyle: { width: 1 } }, axisLabel: { show: true, // Whether axisLabel is inside the grid or outside the grid. inside: false, rotate: 0, // true | false | null/undefined (auto) showMinLabel: null, // true | false | null/undefined (auto) showMaxLabel: null, margin: 8, // formatter: null, fontSize: 12 }, splitLine: { show: true, lineStyle: { color: ['#E0E6F1'], width: 1, type: 'solid' } }, splitArea: { show: false, areaStyle: { color: ['rgba(250,250,250,0.2)', 'rgba(210,219,238,0.2)'] } } }; var categoryAxis = merge({ // The gap at both ends of the axis. For categoryAxis, boolean. boundaryGap: true, // Set false to faster category collection. deduplication: null, // splitArea: { // show: false // }, splitLine: { show: false }, axisTick: { // If tick is align with label when boundaryGap is true alignWithLabel: false, interval: 'auto' }, axisLabel: { interval: 'auto' } }, defaultOption); var valueAxis = merge({ boundaryGap: [0, 0], axisLine: { // Not shown when other axis is categoryAxis in cartesian show: 'auto' }, axisTick: { // Not shown when other axis is categoryAxis in cartesian show: 'auto' }, // TODO // min/max: [30, datamin, 60] or [20, datamin] or [datamin, 60] splitNumber: 5, minorTick: { // Minor tick, not available for cateogry axis. show: false, // Split number of minor ticks. The value should be in range of (0, 100) splitNumber: 5, // Lenght of minor tick length: 3, // Line style lineStyle: {// Default to be same with axisTick } }, minorSplitLine: { show: false, lineStyle: { color: '#F4F7FD', width: 1 } } }, defaultOption); var timeAxis = merge({ scale: true, splitNumber: 6, axisLabel: { // To eliminate labels that are not nice showMinLabel: false, showMaxLabel: false, rich: { primary: { fontWeight: 'bold' } } }, splitLine: { show: false } }, valueAxis); var logAxis = defaults({ scale: true, logBase: 10 }, valueAxis); var axisDefault = { category: categoryAxis, value: valueAxis, time: timeAxis, log: logAxis }; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ var AXIS_TYPES = { value: 1, category: 1, time: 1, log: 1 }; /** * Generate sub axis model class * @param axisName 'x' 'y' 'radius' 'angle' 'parallel' ... */ function axisModelCreator(registers, axisName, BaseAxisModelClass, extraDefaultOption) { each(AXIS_TYPES, function (v, axisType) { var defaultOption = merge(merge({}, axisDefault[axisType], true), extraDefaultOption, true); var AxisModel = /** @class */ function (_super) { __extends(AxisModel, _super); function AxisModel() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } var _this = _super.apply(this, args) || this; _this.type = axisName + 'Axis.' + axisType; return _this; } AxisModel.prototype.mergeDefaultAndTheme = function (option, ecModel) { var layoutMode = fetchLayoutMode(this); var inputPositionParams = layoutMode ? getLayoutParams(option) : {}; var themeModel = ecModel.getTheme(); merge(option, themeModel.get(axisType + 'Axis')); merge(option, this.getDefaultOption()); option.type = getAxisType(option); if (layoutMode) { mergeLayoutParam(option, inputPositionParams, layoutMode); } }; AxisModel.prototype.optionUpdated = function () { var thisOption = this.option; if (thisOption.type === 'category') { this.__ordinalMeta = OrdinalMeta.createByAxisModel(this); } }; /** * Should not be called before all of 'getInitailData' finished. * Because categories are collected during initializing data. */ AxisModel.prototype.getCategories = function (rawData) { var option = this.option; // FIXME // warning if called before all of 'getInitailData' finished. if (option.type === 'category') { if (rawData) { return option.data; } return this.__ordinalMeta.categories; } }; AxisModel.prototype.getOrdinalMeta = function () { return this.__ordinalMeta; }; AxisModel.type = axisName + 'Axis.' + axisType; AxisModel.defaultOption = defaultOption; return AxisModel; }(BaseAxisModelClass); registers.registerComponentModel(AxisModel); }); registers.registerSubTypeDefaulter(axisName + 'Axis', getAxisType); } function getAxisType(option) { // Default axis with data is category axis return option.type || (option.data ? 'category' : 'value'); } var Cartesian = /** @class */ function () { function Cartesian(name) { this.type = 'cartesian'; this._dimList = []; this._axes = {}; this.name = name || ''; } Cartesian.prototype.getAxis = function (dim) { return this._axes[dim]; }; Cartesian.prototype.getAxes = function () { return map(this._dimList, function (dim) { return this._axes[dim]; }, this); }; Cartesian.prototype.getAxesByScale = function (scaleType) { scaleType = scaleType.toLowerCase(); return filter(this.getAxes(), function (axis) { return axis.scale.type === scaleType; }); }; Cartesian.prototype.addAxis = function (axis) { var dim = axis.dim; this._axes[dim] = axis; this._dimList.push(dim); }; return Cartesian; }(); var cartesian2DDimensions = ['x', 'y']; function canCalculateAffineTransform(scale) { return scale.type === 'interval' || scale.type === 'time'; } var Cartesian2D = /** @class */ function (_super) { __extends(Cartesian2D, _super); function Cartesian2D() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'cartesian2d'; _this.dimensions = cartesian2DDimensions; return _this; } /** * Calculate an affine transform matrix if two axes are time or value. * It's mainly for accelartion on the large time series data. */ Cartesian2D.prototype.calcAffineTransform = function () { this._transform = this._invTransform = null; var xAxisScale = this.getAxis('x').scale; var yAxisScale = this.getAxis('y').scale; if (!canCalculateAffineTransform(xAxisScale) || !canCalculateAffineTransform(yAxisScale)) { return; } var xScaleExtent = xAxisScale.getExtent(); var yScaleExtent = yAxisScale.getExtent(); var start = this.dataToPoint([xScaleExtent[0], yScaleExtent[0]]); var end = this.dataToPoint([xScaleExtent[1], yScaleExtent[1]]); var xScaleSpan = xScaleExtent[1] - xScaleExtent[0]; var yScaleSpan = yScaleExtent[1] - yScaleExtent[0]; if (!xScaleSpan || !yScaleSpan) { return; } // Accelerate data to point calculation on the special large time series data. var scaleX = (end[0] - start[0]) / xScaleSpan; var scaleY = (end[1] - start[1]) / yScaleSpan; var translateX = start[0] - xScaleExtent[0] * scaleX; var translateY = start[1] - yScaleExtent[0] * scaleY; var m = this._transform = [scaleX, 0, 0, scaleY, translateX, translateY]; this._invTransform = invert([], m); }; /** * Base axis will be used on stacking. */ Cartesian2D.prototype.getBaseAxis = function () { return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAxis('x'); }; Cartesian2D.prototype.containPoint = function (point) { var axisX = this.getAxis('x'); var axisY = this.getAxis('y'); return axisX.contain(axisX.toLocalCoord(point[0])) && axisY.contain(axisY.toLocalCoord(point[1])); }; Cartesian2D.prototype.containData = function (data) { return this.getAxis('x').containData(data[0]) && this.getAxis('y').containData(data[1]); }; Cartesian2D.prototype.dataToPoint = function (data, reserved, out) { out = out || []; var xVal = data[0]; var yVal = data[1]; // Fast path if (this._transform // It's supported that if data is like `[Inifity, 123]`, where only Y pixel calculated. && xVal != null && isFinite(xVal) && yVal != null && isFinite(yVal)) { return applyTransform(out, data, this._transform); } var xAxis = this.getAxis('x'); var yAxis = this.getAxis('y'); out[0] = xAxis.toGlobalCoord(xAxis.dataToCoord(xVal)); out[1] = yAxis.toGlobalCoord(yAxis.dataToCoord(yVal)); return out; }; Cartesian2D.prototype.clampData = function (data, out) { var xScale = this.getAxis('x').scale; var yScale = this.getAxis('y').scale; var xAxisExtent = xScale.getExtent(); var yAxisExtent = yScale.getExtent(); var x = xScale.parse(data[0]); var y = yScale.parse(data[1]); out = out || []; out[0] = Math.min(Math.max(Math.min(xAxisExtent[0], xAxisExtent[1]), x), Math.max(xAxisExtent[0], xAxisExtent[1])); out[1] = Math.min(Math.max(Math.min(yAxisExtent[0], yAxisExtent[1]), y), Math.max(yAxisExtent[0], yAxisExtent[1])); return out; }; Cartesian2D.prototype.pointToData = function (point, out) { out = out || []; if (this._invTransform) { return applyTransform(out, point, this._invTransform); } var xAxis = this.getAxis('x'); var yAxis = this.getAxis('y'); out[0] = xAxis.coordToData(xAxis.toLocalCoord(point[0])); out[1] = yAxis.coordToData(yAxis.toLocalCoord(point[1])); return out; }; Cartesian2D.prototype.getOtherAxis = function (axis) { return this.getAxis(axis.dim === 'x' ? 'y' : 'x'); }; /** * Get rect area of cartesian. * Area will have a contain function to determine if a point is in the coordinate system. */ Cartesian2D.prototype.getArea = function () { var xExtent = this.getAxis('x').getGlobalExtent(); var yExtent = this.getAxis('y').getGlobalExtent(); var x = Math.min(xExtent[0], xExtent[1]); var y = Math.min(yExtent[0], yExtent[1]); var width = Math.max(xExtent[0], xExtent[1]) - x; var height = Math.max(yExtent[0], yExtent[1]) - y; return new BoundingRect(x, y, width, height); }; return Cartesian2D; }(Cartesian); var Axis2D = /** @class */ function (_super) { __extends(Axis2D, _super); function Axis2D(dim, scale, coordExtent, axisType, position) { var _this = _super.call(this, dim, scale, coordExtent) || this; /** * Index of axis, can be used as key * Injected outside. */ _this.index = 0; _this.type = axisType || 'value'; _this.position = position || 'bottom'; return _this; } Axis2D.prototype.isHorizontal = function () { var position = this.position; return position === 'top' || position === 'bottom'; }; /** * Each item cooresponds to this.getExtent(), which * means globalExtent[0] may greater than globalExtent[1], * unless `asc` is input. * * @param {boolean} [asc] * @return {Array.} */ Axis2D.prototype.getGlobalExtent = function (asc) { var ret = this.getExtent(); ret[0] = this.toGlobalCoord(ret[0]); ret[1] = this.toGlobalCoord(ret[1]); asc && ret[0] > ret[1] && ret.reverse(); return ret; }; Axis2D.prototype.pointToData = function (point, clamp) { return this.coordToData(this.toLocalCoord(point[this.dim === 'x' ? 0 : 1]), clamp); }; /** * Set ordinalSortInfo * @param info new OrdinalSortInfo */ Axis2D.prototype.setCategorySortInfo = function (info) { if (this.type !== 'category') { return false; } this.model.option.categorySortInfo = info; this.scale.setSortInfo(info); }; return Axis2D; }(Axis); /** * Can only be called after coordinate system creation stage. * (Can be called before coordinate system update stage). */ function layout$1(gridModel, axisModel, opt) { opt = opt || {}; var grid = gridModel.coordinateSystem; var axis = axisModel.axis; var layout = {}; var otherAxisOnZeroOf = axis.getAxesOnZeroOf()[0]; var rawAxisPosition = axis.position; var axisPosition = otherAxisOnZeroOf ? 'onZero' : rawAxisPosition; var axisDim = axis.dim; var rect = grid.getRect(); var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height]; var idx = { left: 0, right: 1, top: 0, bottom: 1, onZero: 2 }; var axisOffset = axisModel.get('offset') || 0; var posBound = axisDim === 'x' ? [rectBound[2] - axisOffset, rectBound[3] + axisOffset] : [rectBound[0] - axisOffset, rectBound[1] + axisOffset]; if (otherAxisOnZeroOf) { var onZeroCoord = otherAxisOnZeroOf.toGlobalCoord(otherAxisOnZeroOf.dataToCoord(0)); posBound[idx.onZero] = Math.max(Math.min(onZeroCoord, posBound[1]), posBound[0]); } // Axis position layout.position = [axisDim === 'y' ? posBound[idx[axisPosition]] : rectBound[0], axisDim === 'x' ? posBound[idx[axisPosition]] : rectBound[3]]; // Axis rotation layout.rotation = Math.PI / 2 * (axisDim === 'x' ? 0 : 1); // Tick and label direction, x y is axisDim var dirMap = { top: -1, bottom: 1, left: -1, right: 1 }; layout.labelDirection = layout.tickDirection = layout.nameDirection = dirMap[rawAxisPosition]; layout.labelOffset = otherAxisOnZeroOf ? posBound[idx[rawAxisPosition]] - posBound[idx.onZero] : 0; if (axisModel.get(['axisTick', 'inside'])) { layout.tickDirection = -layout.tickDirection; } if (retrieve(opt.labelInside, axisModel.get(['axisLabel', 'inside']))) { layout.labelDirection = -layout.labelDirection; } // Special label rotation var labelRotate = axisModel.get(['axisLabel', 'rotate']); layout.labelRotate = axisPosition === 'top' ? -labelRotate : labelRotate; // Over splitLine and splitArea layout.z2 = 1; return layout; } function isCartesian2DSeries(seriesModel) { return seriesModel.get('coordinateSystem') === 'cartesian2d'; } function findAxisModels(seriesModel) { var axisModelMap = { xAxisModel: null, yAxisModel: null }; each(axisModelMap, function (v, key) { var axisType = key.replace(/Model$/, ''); var axisModel = seriesModel.getReferringComponents(axisType, SINGLE_REFERRING).models[0]; if ("development" !== 'production') { if (!axisModel) { throw new Error(axisType + ' "' + retrieve3(seriesModel.get(axisType + 'Index'), seriesModel.get(axisType + 'Id'), 0) + '" not found'); } } axisModelMap[key] = axisModel; }); return axisModelMap; } var Grid = /** @class */ function () { function Grid(gridModel, ecModel, api) { // FIXME:TS where used (different from registered type 'cartesian2d')? this.type = 'grid'; this._coordsMap = {}; this._coordsList = []; this._axesMap = {}; this._axesList = []; this.axisPointerEnabled = true; this.dimensions = cartesian2DDimensions; this._initCartesian(gridModel, ecModel, api); this.model = gridModel; } Grid.prototype.getRect = function () { return this._rect; }; Grid.prototype.update = function (ecModel, api) { var axesMap = this._axesMap; this._updateScale(ecModel, this.model); each(axesMap.x, function (xAxis) { niceScaleExtent(xAxis.scale, xAxis.model); }); each(axesMap.y, function (yAxis) { niceScaleExtent(yAxis.scale, yAxis.model); }); // Key: axisDim_axisIndex, value: boolean, whether onZero target. var onZeroRecords = {}; each(axesMap.x, function (xAxis) { fixAxisOnZero(axesMap, 'y', xAxis, onZeroRecords); }); each(axesMap.y, function (yAxis) { fixAxisOnZero(axesMap, 'x', yAxis, onZeroRecords); }); // Resize again if containLabel is enabled // FIXME It may cause getting wrong grid size in data processing stage this.resize(this.model, api); }; /** * Resize the grid */ Grid.prototype.resize = function (gridModel, api, ignoreContainLabel) { var boxLayoutParams = gridModel.getBoxLayoutParams(); var isContainLabel = !ignoreContainLabel && gridModel.get('containLabel'); var gridRect = getLayoutRect(boxLayoutParams, { width: api.getWidth(), height: api.getHeight() }); this._rect = gridRect; var axesList = this._axesList; adjustAxes(); // Minus label size if (isContainLabel) { each(axesList, function (axis) { if (!axis.model.get(['axisLabel', 'inside'])) { var labelUnionRect = estimateLabelUnionRect(axis); if (labelUnionRect) { var dim = axis.isHorizontal() ? 'height' : 'width'; var margin = axis.model.get(['axisLabel', 'margin']); gridRect[dim] -= labelUnionRect[dim] + margin; if (axis.position === 'top') { gridRect.y += labelUnionRect.height + margin; } else if (axis.position === 'left') { gridRect.x += labelUnionRect.width + margin; } } } }); adjustAxes(); } each(this._coordsList, function (coord) { // Calculate affine matrix to accelerate the data to point transform. // If all the axes scales are time or value. coord.calcAffineTransform(); }); function adjustAxes() { each(axesList, function (axis) { var isHorizontal = axis.isHorizontal(); var extent = isHorizontal ? [0, gridRect.width] : [0, gridRect.height]; var idx = axis.inverse ? 1 : 0; axis.setExtent(extent[idx], extent[1 - idx]); updateAxisTransform(axis, isHorizontal ? gridRect.x : gridRect.y); }); } }; Grid.prototype.getAxis = function (dim, axisIndex) { var axesMapOnDim = this._axesMap[dim]; if (axesMapOnDim != null) { return axesMapOnDim[axisIndex || 0]; // if (axisIndex == null) { // Find first axis // for (let name in axesMapOnDim) { // if (axesMapOnDim.hasOwnProperty(name)) { // return axesMapOnDim[name]; // } // } // } // return axesMapOnDim[axisIndex]; } }; Grid.prototype.getAxes = function () { return this._axesList.slice(); }; Grid.prototype.getCartesian = function (xAxisIndex, yAxisIndex) { if (xAxisIndex != null && yAxisIndex != null) { var key = 'x' + xAxisIndex + 'y' + yAxisIndex; return this._coordsMap[key]; } if (isObject(xAxisIndex)) { yAxisIndex = xAxisIndex.yAxisIndex; xAxisIndex = xAxisIndex.xAxisIndex; } for (var i = 0, coordList = this._coordsList; i < coordList.length; i++) { if (coordList[i].getAxis('x').index === xAxisIndex || coordList[i].getAxis('y').index === yAxisIndex) { return coordList[i]; } } }; Grid.prototype.getCartesians = function () { return this._coordsList.slice(); }; /** * @implements */ Grid.prototype.convertToPixel = function (ecModel, finder, value) { var target = this._findConvertTarget(finder); return target.cartesian ? target.cartesian.dataToPoint(value) : target.axis ? target.axis.toGlobalCoord(target.axis.dataToCoord(value)) : null; }; /** * @implements */ Grid.prototype.convertFromPixel = function (ecModel, finder, value) { var target = this._findConvertTarget(finder); return target.cartesian ? target.cartesian.pointToData(value) : target.axis ? target.axis.coordToData(target.axis.toLocalCoord(value)) : null; }; Grid.prototype._findConvertTarget = function (finder) { var seriesModel = finder.seriesModel; var xAxisModel = finder.xAxisModel || seriesModel && seriesModel.getReferringComponents('xAxis', SINGLE_REFERRING).models[0]; var yAxisModel = finder.yAxisModel || seriesModel && seriesModel.getReferringComponents('yAxis', SINGLE_REFERRING).models[0]; var gridModel = finder.gridModel; var coordsList = this._coordsList; var cartesian; var axis; if (seriesModel) { cartesian = seriesModel.coordinateSystem; indexOf(coordsList, cartesian) < 0 && (cartesian = null); } else if (xAxisModel && yAxisModel) { cartesian = this.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex); } else if (xAxisModel) { axis = this.getAxis('x', xAxisModel.componentIndex); } else if (yAxisModel) { axis = this.getAxis('y', yAxisModel.componentIndex); } // Lowest priority. else if (gridModel) { var grid = gridModel.coordinateSystem; if (grid === this) { cartesian = this._coordsList[0]; } } return { cartesian: cartesian, axis: axis }; }; /** * @implements */ Grid.prototype.containPoint = function (point) { var coord = this._coordsList[0]; if (coord) { return coord.containPoint(point); } }; /** * Initialize cartesian coordinate systems */ Grid.prototype._initCartesian = function (gridModel, ecModel, api) { var _this = this; var grid = this; var axisPositionUsed = { left: false, right: false, top: false, bottom: false }; var axesMap = { x: {}, y: {} }; var axesCount = { x: 0, y: 0 }; /// Create axis ecModel.eachComponent('xAxis', createAxisCreator('x'), this); ecModel.eachComponent('yAxis', createAxisCreator('y'), this); if (!axesCount.x || !axesCount.y) { // Roll back when there no either x or y axis this._axesMap = {}; this._axesList = []; return; } this._axesMap = axesMap; /// Create cartesian2d each(axesMap.x, function (xAxis, xAxisIndex) { each(axesMap.y, function (yAxis, yAxisIndex) { var key = 'x' + xAxisIndex + 'y' + yAxisIndex; var cartesian = new Cartesian2D(key); cartesian.master = _this; cartesian.model = gridModel; _this._coordsMap[key] = cartesian; _this._coordsList.push(cartesian); cartesian.addAxis(xAxis); cartesian.addAxis(yAxis); }); }); function createAxisCreator(dimName) { return function (axisModel, idx) { if (!isAxisUsedInTheGrid(axisModel, gridModel)) { return; } var axisPosition = axisModel.get('position'); if (dimName === 'x') { // Fix position if (axisPosition !== 'top' && axisPosition !== 'bottom') { // Default bottom of X axisPosition = axisPositionUsed.bottom ? 'top' : 'bottom'; } } else { // Fix position if (axisPosition !== 'left' && axisPosition !== 'right') { // Default left of Y axisPosition = axisPositionUsed.left ? 'right' : 'left'; } } axisPositionUsed[axisPosition] = true; var axis = new Axis2D(dimName, createScaleByModel(axisModel), [0, 0], axisModel.get('type'), axisPosition); var isCategory = axis.type === 'category'; axis.onBand = isCategory && axisModel.get('boundaryGap'); axis.inverse = axisModel.get('inverse'); // Inject axis into axisModel axisModel.axis = axis; // Inject axisModel into axis axis.model = axisModel; // Inject grid info axis axis.grid = grid; // Index of axis, can be used as key axis.index = idx; grid._axesList.push(axis); axesMap[dimName][idx] = axis; axesCount[dimName]++; }; } }; /** * Update cartesian properties from series. */ Grid.prototype._updateScale = function (ecModel, gridModel) { // Reset scale each(this._axesList, function (axis) { axis.scale.setExtent(Infinity, -Infinity); if (axis.type === 'category') { var categorySortInfo = axis.model.get('categorySortInfo'); axis.scale.setSortInfo(categorySortInfo); } }); ecModel.eachSeries(function (seriesModel) { if (isCartesian2DSeries(seriesModel)) { var axesModelMap = findAxisModels(seriesModel); var xAxisModel = axesModelMap.xAxisModel; var yAxisModel = axesModelMap.yAxisModel; if (!isAxisUsedInTheGrid(xAxisModel, gridModel) || !isAxisUsedInTheGrid(yAxisModel, gridModel)) { return; } var cartesian = this.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex); var data = seriesModel.getData(); var xAxis = cartesian.getAxis('x'); var yAxis = cartesian.getAxis('y'); if (data.type === 'list') { unionExtent(data, xAxis); unionExtent(data, yAxis); } } }, this); function unionExtent(data, axis) { each(getDataDimensionsOnAxis(data, axis.dim), function (dim) { axis.scale.unionExtentFromData(data, dim); }); } }; /** * @param dim 'x' or 'y' or 'auto' or null/undefined */ Grid.prototype.getTooltipAxes = function (dim) { var baseAxes = []; var otherAxes = []; each(this.getCartesians(), function (cartesian) { var baseAxis = dim != null && dim !== 'auto' ? cartesian.getAxis(dim) : cartesian.getBaseAxis(); var otherAxis = cartesian.getOtherAxis(baseAxis); indexOf(baseAxes, baseAxis) < 0 && baseAxes.push(baseAxis); indexOf(otherAxes, otherAxis) < 0 && otherAxes.push(otherAxis); }); return { baseAxes: baseAxes, otherAxes: otherAxes }; }; Grid.create = function (ecModel, api) { var grids = []; ecModel.eachComponent('grid', function (gridModel, idx) { var grid = new Grid(gridModel, ecModel, api); grid.name = 'grid_' + idx; // dataSampling requires axis extent, so resize // should be performed in create stage. grid.resize(gridModel, api, true); gridModel.coordinateSystem = grid; grids.push(grid); }); // Inject the coordinateSystems into seriesModel ecModel.eachSeries(function (seriesModel) { if (!isCartesian2DSeries(seriesModel)) { return; } var axesModelMap = findAxisModels(seriesModel); var xAxisModel = axesModelMap.xAxisModel; var yAxisModel = axesModelMap.yAxisModel; var gridModel = xAxisModel.getCoordSysModel(); if ("development" !== 'production') { if (!gridModel) { throw new Error('Grid "' + retrieve3(xAxisModel.get('gridIndex'), xAxisModel.get('gridId'), 0) + '" not found'); } if (xAxisModel.getCoordSysModel() !== yAxisModel.getCoordSysModel()) { throw new Error('xAxis and yAxis must use the same grid'); } } var grid = gridModel.coordinateSystem; seriesModel.coordinateSystem = grid.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex); }); return grids; }; // For deciding which dimensions to use when creating list data Grid.dimensions = cartesian2DDimensions; return Grid; }(); /** * Check if the axis is used in the specified grid. */ function isAxisUsedInTheGrid(axisModel, gridModel) { return axisModel.getCoordSysModel() === gridModel; } function fixAxisOnZero(axesMap, otherAxisDim, axis, // Key: see `getOnZeroRecordKey` onZeroRecords) { axis.getAxesOnZeroOf = function () { // TODO: onZero of multiple axes. return otherAxisOnZeroOf ? [otherAxisOnZeroOf] : []; }; // onZero can not be enabled in these two situations: // 1. When any other axis is a category axis. // 2. When no axis is cross 0 point. var otherAxes = axesMap[otherAxisDim]; var otherAxisOnZeroOf; var axisModel = axis.model; var onZero = axisModel.get(['axisLine', 'onZero']); var onZeroAxisIndex = axisModel.get(['axisLine', 'onZeroAxisIndex']); if (!onZero) { return; } // If target axis is specified. if (onZeroAxisIndex != null) { if (canOnZeroToAxis(otherAxes[onZeroAxisIndex])) { otherAxisOnZeroOf = otherAxes[onZeroAxisIndex]; } } else { // Find the first available other axis. for (var idx in otherAxes) { if (otherAxes.hasOwnProperty(idx) && canOnZeroToAxis(otherAxes[idx]) // Consider that two Y axes on one value axis, // if both onZero, the two Y axes overlap. && !onZeroRecords[getOnZeroRecordKey(otherAxes[idx])]) { otherAxisOnZeroOf = otherAxes[idx]; break; } } } if (otherAxisOnZeroOf) { onZeroRecords[getOnZeroRecordKey(otherAxisOnZeroOf)] = true; } function getOnZeroRecordKey(axis) { return axis.dim + '_' + axis.index; } } function canOnZeroToAxis(axis) { return axis && axis.type !== 'category' && axis.type !== 'time' && ifAxisCrossZero(axis); } function updateAxisTransform(axis, coordBase) { var axisExtent = axis.getExtent(); var axisExtentSum = axisExtent[0] + axisExtent[1]; // Fast transform axis.toGlobalCoord = axis.dim === 'x' ? function (coord) { return coord + coordBase; } : function (coord) { return axisExtentSum - coord + coordBase; }; axis.toLocalCoord = axis.dim === 'x' ? function (coord) { return coord - coordBase; } : function (coord) { return axisExtentSum - coord + coordBase; }; } var PI$5 = Math.PI; /** * A final axis is translated and rotated from a "standard axis". * So opt.position and opt.rotation is required. * * A standard axis is and axis from [0, 0] to [0, axisExtent[1]], * for example: (0, 0) ------------> (0, 50) * * nameDirection or tickDirection or labelDirection is 1 means tick * or label is below the standard axis, whereas is -1 means above * the standard axis. labelOffset means offset between label and axis, * which is useful when 'onZero', where axisLabel is in the grid and * label in outside grid. * * Tips: like always, * positive rotation represents anticlockwise, and negative rotation * represents clockwise. * The direction of position coordinate is the same as the direction * of screen coordinate. * * Do not need to consider axis 'inverse', which is auto processed by * axis extent. */ var AxisBuilder = /** @class */ function () { function AxisBuilder(axisModel, opt) { this.group = new Group(); this.opt = opt; this.axisModel = axisModel; // Default value defaults(opt, { labelOffset: 0, nameDirection: 1, tickDirection: 1, labelDirection: 1, silent: true, handleAutoShown: function () { return true; } }); // FIXME Not use a seperate text group? var transformGroup = new Group({ x: opt.position[0], y: opt.position[1], rotation: opt.rotation }); // this.group.add(transformGroup); // this._transformGroup = transformGroup; transformGroup.updateTransform(); this._transformGroup = transformGroup; } AxisBuilder.prototype.hasBuilder = function (name) { return !!builders[name]; }; AxisBuilder.prototype.add = function (name) { builders[name](this.opt, this.axisModel, this.group, this._transformGroup); }; AxisBuilder.prototype.getGroup = function () { return this.group; }; AxisBuilder.innerTextLayout = function (axisRotation, textRotation, direction) { var rotationDiff = remRadian(textRotation - axisRotation); var textAlign; var textVerticalAlign; if (isRadianAroundZero(rotationDiff)) { // Label is parallel with axis line. textVerticalAlign = direction > 0 ? 'top' : 'bottom'; textAlign = 'center'; } else if (isRadianAroundZero(rotationDiff - PI$5)) { // Label is inverse parallel with axis line. textVerticalAlign = direction > 0 ? 'bottom' : 'top'; textAlign = 'center'; } else { textVerticalAlign = 'middle'; if (rotationDiff > 0 && rotationDiff < PI$5) { textAlign = direction > 0 ? 'right' : 'left'; } else { textAlign = direction > 0 ? 'left' : 'right'; } } return { rotation: rotationDiff, textAlign: textAlign, textVerticalAlign: textVerticalAlign }; }; AxisBuilder.makeAxisEventDataBase = function (axisModel) { var eventData = { componentType: axisModel.mainType, componentIndex: axisModel.componentIndex }; eventData[axisModel.mainType + 'Index'] = axisModel.componentIndex; return eventData; }; AxisBuilder.isLabelSilent = function (axisModel) { var tooltipOpt = axisModel.get('tooltip'); return axisModel.get('silent') // Consider mouse cursor, add these restrictions. || !(axisModel.get('triggerEvent') || tooltipOpt && tooltipOpt.show); }; return AxisBuilder; }(); var builders = { axisLine: function (opt, axisModel, group, transformGroup) { var shown = axisModel.get(['axisLine', 'show']); if (shown === 'auto' && opt.handleAutoShown) { shown = opt.handleAutoShown('axisLine'); } if (!shown) { return; } var extent = axisModel.axis.getExtent(); var matrix = transformGroup.transform; var pt1 = [extent[0], 0]; var pt2 = [extent[1], 0]; if (matrix) { applyTransform(pt1, pt1, matrix); applyTransform(pt2, pt2, matrix); } var lineStyle = extend({ lineCap: 'round' }, axisModel.getModel(['axisLine', 'lineStyle']).getLineStyle()); var line = new Line({ // Id for animation subPixelOptimize: true, shape: { x1: pt1[0], y1: pt1[1], x2: pt2[0], y2: pt2[1] }, style: lineStyle, strokeContainThreshold: opt.strokeContainThreshold || 5, silent: true, z2: 1 }); line.anid = 'line'; group.add(line); var arrows = axisModel.get(['axisLine', 'symbol']); var arrowSize = axisModel.get(['axisLine', 'symbolSize']); var arrowOffset = axisModel.get(['axisLine', 'symbolOffset']) || 0; if (typeof arrowOffset === 'number') { arrowOffset = [arrowOffset, arrowOffset]; } if (arrows != null) { if (typeof arrows === 'string') { // Use the same arrow for start and end point arrows = [arrows, arrows]; } if (typeof arrowSize === 'string' || typeof arrowSize === 'number') { // Use the same size for width and height arrowSize = [arrowSize, arrowSize]; } var symbolWidth_1 = arrowSize[0]; var symbolHeight_1 = arrowSize[1]; each([{ rotate: opt.rotation + Math.PI / 2, offset: arrowOffset[0], r: 0 }, { rotate: opt.rotation - Math.PI / 2, offset: arrowOffset[1], r: Math.sqrt((pt1[0] - pt2[0]) * (pt1[0] - pt2[0]) + (pt1[1] - pt2[1]) * (pt1[1] - pt2[1])) }], function (point, index) { if (arrows[index] !== 'none' && arrows[index] != null) { var symbol = createSymbol(arrows[index], -symbolWidth_1 / 2, -symbolHeight_1 / 2, symbolWidth_1, symbolHeight_1, lineStyle.stroke, true); // Calculate arrow position with offset var r = point.r + point.offset; symbol.attr({ rotation: point.rotate, x: pt1[0] + r * Math.cos(opt.rotation), y: pt1[1] - r * Math.sin(opt.rotation), silent: true, z2: 11 }); group.add(symbol); } }); } }, axisTickLabel: function (opt, axisModel, group, transformGroup) { var ticksEls = buildAxisMajorTicks(group, transformGroup, axisModel, opt); var labelEls = buildAxisLabel(group, transformGroup, axisModel, opt); fixMinMaxLabelShow(axisModel, labelEls, ticksEls); buildAxisMinorTicks(group, transformGroup, axisModel, opt.tickDirection); }, axisName: function (opt, axisModel, group, transformGroup) { var name = retrieve(opt.axisName, axisModel.get('name')); if (!name) { return; } var nameLocation = axisModel.get('nameLocation'); var nameDirection = opt.nameDirection; var textStyleModel = axisModel.getModel('nameTextStyle'); var gap = axisModel.get('nameGap') || 0; var extent = axisModel.axis.getExtent(); var gapSignal = extent[0] > extent[1] ? -1 : 1; var pos = [nameLocation === 'start' ? extent[0] - gapSignal * gap : nameLocation === 'end' ? extent[1] + gapSignal * gap : (extent[0] + extent[1]) / 2, // Reuse labelOffset. isNameLocationCenter(nameLocation) ? opt.labelOffset + nameDirection * gap : 0]; var labelLayout; var nameRotation = axisModel.get('nameRotate'); if (nameRotation != null) { nameRotation = nameRotation * PI$5 / 180; // To radian. } var axisNameAvailableWidth; if (isNameLocationCenter(nameLocation)) { labelLayout = AxisBuilder.innerTextLayout(opt.rotation, nameRotation != null ? nameRotation : opt.rotation, // Adapt to axis. nameDirection); } else { labelLayout = endTextLayout(opt.rotation, nameLocation, nameRotation || 0, extent); axisNameAvailableWidth = opt.axisNameAvailableWidth; if (axisNameAvailableWidth != null) { axisNameAvailableWidth = Math.abs(axisNameAvailableWidth / Math.sin(labelLayout.rotation)); !isFinite(axisNameAvailableWidth) && (axisNameAvailableWidth = null); } } var textFont = textStyleModel.getFont(); var truncateOpt = axisModel.get('nameTruncate', true) || {}; var ellipsis = truncateOpt.ellipsis; var maxWidth = retrieve(opt.nameTruncateMaxWidth, truncateOpt.maxWidth, axisNameAvailableWidth); var textEl = new ZRText({ x: pos[0], y: pos[1], rotation: labelLayout.rotation, silent: AxisBuilder.isLabelSilent(axisModel), style: createTextStyle(textStyleModel, { text: name, font: textFont, overflow: 'truncate', width: maxWidth, ellipsis: ellipsis, fill: textStyleModel.getTextColor() || axisModel.get(['axisLine', 'lineStyle', 'color']), align: textStyleModel.get('align') || labelLayout.textAlign, verticalAlign: textStyleModel.get('verticalAlign') || labelLayout.textVerticalAlign }), z2: 1 }); setTooltipConfig({ el: textEl, componentModel: axisModel, itemName: name }); textEl.__fullText = name; // Id for animation textEl.anid = 'name'; if (axisModel.get('triggerEvent')) { var eventData = AxisBuilder.makeAxisEventDataBase(axisModel); eventData.targetType = 'axisName'; eventData.name = name; getECData(textEl).eventData = eventData; } // FIXME transformGroup.add(textEl); textEl.updateTransform(); group.add(textEl); textEl.decomposeTransform(); } }; function endTextLayout(rotation, textPosition, textRotate, extent) { var rotationDiff = remRadian(textRotate - rotation); var textAlign; var textVerticalAlign; var inverse = extent[0] > extent[1]; var onLeft = textPosition === 'start' && !inverse || textPosition !== 'start' && inverse; if (isRadianAroundZero(rotationDiff - PI$5 / 2)) { textVerticalAlign = onLeft ? 'bottom' : 'top'; textAlign = 'center'; } else if (isRadianAroundZero(rotationDiff - PI$5 * 1.5)) { textVerticalAlign = onLeft ? 'top' : 'bottom'; textAlign = 'center'; } else { textVerticalAlign = 'middle'; if (rotationDiff < PI$5 * 1.5 && rotationDiff > PI$5 / 2) { textAlign = onLeft ? 'left' : 'right'; } else { textAlign = onLeft ? 'right' : 'left'; } } return { rotation: rotationDiff, textAlign: textAlign, textVerticalAlign: textVerticalAlign }; } function fixMinMaxLabelShow(axisModel, labelEls, tickEls) { if (shouldShowAllLabels(axisModel.axis)) { return; } // If min or max are user set, we need to check // If the tick on min(max) are overlap on their neighbour tick // If they are overlapped, we need to hide the min(max) tick label var showMinLabel = axisModel.get(['axisLabel', 'showMinLabel']); var showMaxLabel = axisModel.get(['axisLabel', 'showMaxLabel']); // FIXME // Have not consider onBand yet, where tick els is more than label els. labelEls = labelEls || []; tickEls = tickEls || []; var firstLabel = labelEls[0]; var nextLabel = labelEls[1]; var lastLabel = labelEls[labelEls.length - 1]; var prevLabel = labelEls[labelEls.length - 2]; var firstTick = tickEls[0]; var nextTick = tickEls[1]; var lastTick = tickEls[tickEls.length - 1]; var prevTick = tickEls[tickEls.length - 2]; if (showMinLabel === false) { ignoreEl(firstLabel); ignoreEl(firstTick); } else if (isTwoLabelOverlapped(firstLabel, nextLabel)) { if (showMinLabel) { ignoreEl(nextLabel); ignoreEl(nextTick); } else { ignoreEl(firstLabel); ignoreEl(firstTick); } } if (showMaxLabel === false) { ignoreEl(lastLabel); ignoreEl(lastTick); } else if (isTwoLabelOverlapped(prevLabel, lastLabel)) { if (showMaxLabel) { ignoreEl(prevLabel); ignoreEl(prevTick); } else { ignoreEl(lastLabel); ignoreEl(lastTick); } } } function ignoreEl(el) { el && (el.ignore = true); } function isTwoLabelOverlapped(current, next) { // current and next has the same rotation. var firstRect = current && current.getBoundingRect().clone(); var nextRect = next && next.getBoundingRect().clone(); if (!firstRect || !nextRect) { return; } // When checking intersect of two rotated labels, we use mRotationBack // to avoid that boundingRect is enlarge when using `boundingRect.applyTransform`. var mRotationBack = identity([]); rotate(mRotationBack, mRotationBack, -current.rotation); firstRect.applyTransform(mul$1([], mRotationBack, current.getLocalTransform())); nextRect.applyTransform(mul$1([], mRotationBack, next.getLocalTransform())); return firstRect.intersect(nextRect); } function isNameLocationCenter(nameLocation) { return nameLocation === 'middle' || nameLocation === 'center'; } function createTicks(ticksCoords, tickTransform, tickEndCoord, tickLineStyle, anidPrefix) { var tickEls = []; var pt1 = []; var pt2 = []; for (var i = 0; i < ticksCoords.length; i++) { var tickCoord = ticksCoords[i].coord; pt1[0] = tickCoord; pt1[1] = 0; pt2[0] = tickCoord; pt2[1] = tickEndCoord; if (tickTransform) { applyTransform(pt1, pt1, tickTransform); applyTransform(pt2, pt2, tickTransform); } // Tick line, Not use group transform to have better line draw var tickEl = new Line({ subPixelOptimize: true, shape: { x1: pt1[0], y1: pt1[1], x2: pt2[0], y2: pt2[1] }, style: tickLineStyle, z2: 2, autoBatch: true, silent: true }); tickEl.anid = anidPrefix + '_' + ticksCoords[i].tickValue; tickEls.push(tickEl); } return tickEls; } function buildAxisMajorTicks(group, transformGroup, axisModel, opt) { var axis = axisModel.axis; var tickModel = axisModel.getModel('axisTick'); var shown = tickModel.get('show'); if (shown === 'auto' && opt.handleAutoShown) { shown = opt.handleAutoShown('axisTick'); } if (!shown || axis.scale.isBlank()) { return; } var lineStyleModel = tickModel.getModel('lineStyle'); var tickEndCoord = opt.tickDirection * tickModel.get('length'); var ticksCoords = axis.getTicksCoords(); var ticksEls = createTicks(ticksCoords, transformGroup.transform, tickEndCoord, defaults(lineStyleModel.getLineStyle(), { stroke: axisModel.get(['axisLine', 'lineStyle', 'color']) }), 'ticks'); for (var i = 0; i < ticksEls.length; i++) { group.add(ticksEls[i]); } return ticksEls; } function buildAxisMinorTicks(group, transformGroup, axisModel, tickDirection) { var axis = axisModel.axis; var minorTickModel = axisModel.getModel('minorTick'); if (!minorTickModel.get('show') || axis.scale.isBlank()) { return; } var minorTicksCoords = axis.getMinorTicksCoords(); if (!minorTicksCoords.length) { return; } var lineStyleModel = minorTickModel.getModel('lineStyle'); var tickEndCoord = tickDirection * minorTickModel.get('length'); var minorTickLineStyle = defaults(lineStyleModel.getLineStyle(), defaults(axisModel.getModel('axisTick').getLineStyle(), { stroke: axisModel.get(['axisLine', 'lineStyle', 'color']) })); for (var i = 0; i < minorTicksCoords.length; i++) { var minorTicksEls = createTicks(minorTicksCoords[i], transformGroup.transform, tickEndCoord, minorTickLineStyle, 'minorticks_' + i); for (var k = 0; k < minorTicksEls.length; k++) { group.add(minorTicksEls[k]); } } } function buildAxisLabel(group, transformGroup, axisModel, opt) { var axis = axisModel.axis; var show = retrieve(opt.axisLabelShow, axisModel.get(['axisLabel', 'show'])); if (!show || axis.scale.isBlank()) { return; } var labelModel = axisModel.getModel('axisLabel'); var labelMargin = labelModel.get('margin'); var labels = axis.getViewLabels(); // Special label rotate. var labelRotation = (retrieve(opt.labelRotate, labelModel.get('rotate')) || 0) * PI$5 / 180; var labelLayout = AxisBuilder.innerTextLayout(opt.rotation, labelRotation, opt.labelDirection); var rawCategoryData = axisModel.getCategories && axisModel.getCategories(true); var labelEls = []; var silent = AxisBuilder.isLabelSilent(axisModel); var triggerEvent = axisModel.get('triggerEvent'); each(labels, function (labelItem, index) { var tickValue = axis.scale.type === 'ordinal' ? axis.scale.getRawOrdinalNumber(labelItem.tickValue) : labelItem.tickValue; var formattedLabel = labelItem.formattedLabel; var rawLabel = labelItem.rawLabel; var itemLabelModel = labelModel; if (rawCategoryData && rawCategoryData[tickValue]) { var rawCategoryItem = rawCategoryData[tickValue]; if (isObject(rawCategoryItem) && rawCategoryItem.textStyle) { itemLabelModel = new Model(rawCategoryItem.textStyle, labelModel, axisModel.ecModel); } } var textColor = itemLabelModel.getTextColor() || axisModel.get(['axisLine', 'lineStyle', 'color']); var tickCoord = axis.dataToCoord(tickValue); var textEl = new ZRText({ x: tickCoord, y: opt.labelOffset + opt.labelDirection * labelMargin, rotation: labelLayout.rotation, silent: silent, z2: 10, style: createTextStyle(itemLabelModel, { text: formattedLabel, align: itemLabelModel.getShallow('align', true) || labelLayout.textAlign, verticalAlign: itemLabelModel.getShallow('verticalAlign', true) || itemLabelModel.getShallow('baseline', true) || labelLayout.textVerticalAlign, fill: typeof textColor === 'function' ? textColor( // (1) In category axis with data zoom, tick is not the original // index of axis.data. So tick should not be exposed to user // in category axis. // (2) Compatible with previous version, which always use formatted label as // input. But in interval scale the formatted label is like '223,445', which // maked user repalce ','. So we modify it to return original val but remain // it as 'string' to avoid error in replacing. axis.type === 'category' ? rawLabel : axis.type === 'value' ? tickValue + '' : tickValue, index) : textColor }) }); textEl.anid = 'label_' + tickValue; // Pack data for mouse event if (triggerEvent) { var eventData = AxisBuilder.makeAxisEventDataBase(axisModel); eventData.targetType = 'axisLabel'; eventData.value = rawLabel; getECData(textEl).eventData = eventData; } // FIXME transformGroup.add(textEl); textEl.updateTransform(); labelEls.push(textEl); group.add(textEl); textEl.decomposeTransform(); }); return labelEls; } // allAxesInfo should be updated when setOption performed. function collect(ecModel, api) { var result = { /** * key: makeKey(axis.model) * value: { * axis, * coordSys, * axisPointerModel, * triggerTooltip, * involveSeries, * snap, * seriesModels, * seriesDataCount * } */ axesInfo: {}, seriesInvolved: false, /** * key: makeKey(coordSys.model) * value: Object: key makeKey(axis.model), value: axisInfo */ coordSysAxesInfo: {}, coordSysMap: {} }; collectAxesInfo(result, ecModel, api); // Check seriesInvolved for performance, in case too many series in some chart. result.seriesInvolved && collectSeriesInfo(result, ecModel); return result; } function collectAxesInfo(result, ecModel, api) { var globalTooltipModel = ecModel.getComponent('tooltip'); var globalAxisPointerModel = ecModel.getComponent('axisPointer'); // links can only be set on global. var linksOption = globalAxisPointerModel.get('link', true) || []; var linkGroups = []; // Collect axes info. each(api.getCoordinateSystems(), function (coordSys) { // Some coordinate system do not support axes, like geo. if (!coordSys.axisPointerEnabled) { return; } var coordSysKey = makeKey(coordSys.model); var axesInfoInCoordSys = result.coordSysAxesInfo[coordSysKey] = {}; result.coordSysMap[coordSysKey] = coordSys; // Set tooltip (like 'cross') is a convienent way to show axisPointer // for user. So we enable seting tooltip on coordSys model. var coordSysModel = coordSys.model; var baseTooltipModel = coordSysModel.getModel('tooltip', globalTooltipModel); each(coordSys.getAxes(), curry(saveTooltipAxisInfo, false, null)); // If axis tooltip used, choose tooltip axis for each coordSys. // Notice this case: coordSys is `grid` but not `cartesian2D` here. if (coordSys.getTooltipAxes && globalTooltipModel // If tooltip.showContent is set as false, tooltip will not // show but axisPointer will show as normal. && baseTooltipModel.get('show')) { // Compatible with previous logic. But series.tooltip.trigger: 'axis' // or series.data[n].tooltip.trigger: 'axis' are not support any more. var triggerAxis = baseTooltipModel.get('trigger') === 'axis'; var cross = baseTooltipModel.get(['axisPointer', 'type']) === 'cross'; var tooltipAxes = coordSys.getTooltipAxes(baseTooltipModel.get(['axisPointer', 'axis'])); if (triggerAxis || cross) { each(tooltipAxes.baseAxes, curry(saveTooltipAxisInfo, cross ? 'cross' : true, triggerAxis)); } if (cross) { each(tooltipAxes.otherAxes, curry(saveTooltipAxisInfo, 'cross', false)); } } // fromTooltip: true | false | 'cross' // triggerTooltip: true | false | null function saveTooltipAxisInfo(fromTooltip, triggerTooltip, axis) { var axisPointerModel = axis.model.getModel('axisPointer', globalAxisPointerModel); var axisPointerShow = axisPointerModel.get('show'); if (!axisPointerShow || axisPointerShow === 'auto' && !fromTooltip && !isHandleTrigger(axisPointerModel)) { return; } if (triggerTooltip == null) { triggerTooltip = axisPointerModel.get('triggerTooltip'); } axisPointerModel = fromTooltip ? makeAxisPointerModel(axis, baseTooltipModel, globalAxisPointerModel, ecModel, fromTooltip, triggerTooltip) : axisPointerModel; var snap = axisPointerModel.get('snap'); var axisKey = makeKey(axis.model); var involveSeries = triggerTooltip || snap || axis.type === 'category'; // If result.axesInfo[key] exist, override it (tooltip has higher priority). var axisInfo = result.axesInfo[axisKey] = { key: axisKey, axis: axis, coordSys: coordSys, axisPointerModel: axisPointerModel, triggerTooltip: triggerTooltip, involveSeries: involveSeries, snap: snap, useHandle: isHandleTrigger(axisPointerModel), seriesModels: [], linkGroup: null }; axesInfoInCoordSys[axisKey] = axisInfo; result.seriesInvolved = result.seriesInvolved || involveSeries; var groupIndex = getLinkGroupIndex(linksOption, axis); if (groupIndex != null) { var linkGroup = linkGroups[groupIndex] || (linkGroups[groupIndex] = { axesInfo: {} }); linkGroup.axesInfo[axisKey] = axisInfo; linkGroup.mapper = linksOption[groupIndex].mapper; axisInfo.linkGroup = linkGroup; } } }); } function makeAxisPointerModel(axis, baseTooltipModel, globalAxisPointerModel, ecModel, fromTooltip, triggerTooltip) { var tooltipAxisPointerModel = baseTooltipModel.getModel('axisPointer'); var fields = ['type', 'snap', 'lineStyle', 'shadowStyle', 'label', 'animation', 'animationDurationUpdate', 'animationEasingUpdate', 'z']; var volatileOption = {}; each(fields, function (field) { volatileOption[field] = clone(tooltipAxisPointerModel.get(field)); }); // category axis do not auto snap, otherwise some tick that do not // has value can not be hovered. value/time/log axis default snap if // triggered from tooltip and trigger tooltip. volatileOption.snap = axis.type !== 'category' && !!triggerTooltip; // Compatibel with previous behavior, tooltip axis do not show label by default. // Only these properties can be overrided from tooltip to axisPointer. if (tooltipAxisPointerModel.get('type') === 'cross') { volatileOption.type = 'line'; } var labelOption = volatileOption.label || (volatileOption.label = {}); // Follow the convention, do not show label when triggered by tooltip by default. labelOption.show == null && (labelOption.show = false); if (fromTooltip === 'cross') { // When 'cross', both axes show labels. var tooltipAxisPointerLabelShow = tooltipAxisPointerModel.get(['label', 'show']); labelOption.show = tooltipAxisPointerLabelShow != null ? tooltipAxisPointerLabelShow : true; // If triggerTooltip, this is a base axis, which should better not use cross style // (cross style is dashed by default) if (!triggerTooltip) { var crossStyle = volatileOption.lineStyle = tooltipAxisPointerModel.get('crossStyle'); crossStyle && defaults(labelOption, crossStyle.textStyle); } } return axis.model.getModel('axisPointer', new Model(volatileOption, globalAxisPointerModel, ecModel)); } function collectSeriesInfo(result, ecModel) { // Prepare data for axis trigger ecModel.eachSeries(function (seriesModel) { // Notice this case: this coordSys is `cartesian2D` but not `grid`. var coordSys = seriesModel.coordinateSystem; var seriesTooltipTrigger = seriesModel.get(['tooltip', 'trigger'], true); var seriesTooltipShow = seriesModel.get(['tooltip', 'show'], true); if (!coordSys || seriesTooltipTrigger === 'none' || seriesTooltipTrigger === false || seriesTooltipTrigger === 'item' || seriesTooltipShow === false || seriesModel.get(['axisPointer', 'show'], true) === false) { return; } each(result.coordSysAxesInfo[makeKey(coordSys.model)], function (axisInfo) { var axis = axisInfo.axis; if (coordSys.getAxis(axis.dim) === axis) { axisInfo.seriesModels.push(seriesModel); axisInfo.seriesDataCount == null && (axisInfo.seriesDataCount = 0); axisInfo.seriesDataCount += seriesModel.getData().count(); } }); }); } /** * For example: * { * axisPointer: { * links: [{ * xAxisIndex: [2, 4], * yAxisIndex: 'all' * }, { * xAxisId: ['a5', 'a7'], * xAxisName: 'xxx' * }] * } * } */ function getLinkGroupIndex(linksOption, axis) { var axisModel = axis.model; var dim = axis.dim; for (var i = 0; i < linksOption.length; i++) { var linkOption = linksOption[i] || {}; if (checkPropInLink(linkOption[dim + 'AxisId'], axisModel.id) || checkPropInLink(linkOption[dim + 'AxisIndex'], axisModel.componentIndex) || checkPropInLink(linkOption[dim + 'AxisName'], axisModel.name)) { return i; } } } function checkPropInLink(linkPropValue, axisPropValue) { return linkPropValue === 'all' || isArray(linkPropValue) && indexOf(linkPropValue, axisPropValue) >= 0 || linkPropValue === axisPropValue; } function fixValue(axisModel) { var axisInfo = getAxisInfo(axisModel); if (!axisInfo) { return; } var axisPointerModel = axisInfo.axisPointerModel; var scale = axisInfo.axis.scale; var option = axisPointerModel.option; var status = axisPointerModel.get('status'); var value = axisPointerModel.get('value'); // Parse init value for category and time axis. if (value != null) { value = scale.parse(value); } var useHandle = isHandleTrigger(axisPointerModel); // If `handle` used, `axisPointer` will always be displayed, so value // and status should be initialized. if (status == null) { option.status = useHandle ? 'show' : 'hide'; } var extent = scale.getExtent().slice(); extent[0] > extent[1] && extent.reverse(); if ( // Pick a value on axis when initializing. value == null // If both `handle` and `dataZoom` are used, value may be out of axis extent, // where we should re-pick a value to keep `handle` displaying normally. || value > extent[1]) { // Make handle displayed on the end of the axis when init, which looks better. value = extent[1]; } if (value < extent[0]) { value = extent[0]; } option.value = value; if (useHandle) { option.status = axisInfo.axis.scale.isBlank() ? 'hide' : 'show'; } } function getAxisInfo(axisModel) { var coordSysAxesInfo = (axisModel.ecModel.getComponent('axisPointer') || {}).coordSysAxesInfo; return coordSysAxesInfo && coordSysAxesInfo.axesInfo[makeKey(axisModel)]; } function getAxisPointerModel(axisModel) { var axisInfo = getAxisInfo(axisModel); return axisInfo && axisInfo.axisPointerModel; } function isHandleTrigger(axisPointerModel) { return !!axisPointerModel.get(['handle', 'show']); } /** * @param {module:echarts/model/Model} model * @return {string} unique key */ function makeKey(model) { return model.type + '||' + model.id; } var axisPointerClazz = {}; /** * Base class of AxisView. */ var AxisView = /** @class */ function (_super) { __extends(AxisView, _super); function AxisView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = AxisView.type; return _this; } /** * @override */ AxisView.prototype.render = function (axisModel, ecModel, api, payload) { // FIXME // This process should proformed after coordinate systems updated // (axis scale updated), and should be performed each time update. // So put it here temporarily, although it is not appropriate to // put a model-writing procedure in `view`. this.axisPointerClass && fixValue(axisModel); _super.prototype.render.apply(this, arguments); this._doUpdateAxisPointerClass(axisModel, api, true); }; /** * Action handler. */ AxisView.prototype.updateAxisPointer = function (axisModel, ecModel, api, payload) { this._doUpdateAxisPointerClass(axisModel, api, false); }; /** * @override */ AxisView.prototype.remove = function (ecModel, api) { var axisPointer = this._axisPointer; axisPointer && axisPointer.remove(api); }; /** * @override */ AxisView.prototype.dispose = function (ecModel, api) { this._disposeAxisPointer(api); _super.prototype.dispose.apply(this, arguments); }; AxisView.prototype._doUpdateAxisPointerClass = function (axisModel, api, forceRender) { var Clazz = AxisView.getAxisPointerClass(this.axisPointerClass); if (!Clazz) { return; } var axisPointerModel = getAxisPointerModel(axisModel); axisPointerModel ? (this._axisPointer || (this._axisPointer = new Clazz())).render(axisModel, axisPointerModel, api, forceRender) : this._disposeAxisPointer(api); }; AxisView.prototype._disposeAxisPointer = function (api) { this._axisPointer && this._axisPointer.dispose(api); this._axisPointer = null; }; AxisView.registerAxisPointerClass = function (type, clazz) { if ("development" !== 'production') { if (axisPointerClazz[type]) { throw new Error('axisPointer ' + type + ' exists'); } } axisPointerClazz[type] = clazz; }; AxisView.getAxisPointerClass = function (type) { return type && axisPointerClazz[type]; }; AxisView.type = 'axis'; return AxisView; }(ComponentView); var inner$5 = makeInner(); function rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, gridModel) { var axis = axisModel.axis; if (axis.scale.isBlank()) { return; } // TODO: TYPE var splitAreaModel = axisModel.getModel('splitArea'); var areaStyleModel = splitAreaModel.getModel('areaStyle'); var areaColors = areaStyleModel.get('color'); var gridRect = gridModel.coordinateSystem.getRect(); var ticksCoords = axis.getTicksCoords({ tickModel: splitAreaModel, clamp: true }); if (!ticksCoords.length) { return; } // For Making appropriate splitArea animation, the color and anid // should be corresponding to previous one if possible. var areaColorsLen = areaColors.length; var lastSplitAreaColors = inner$5(axisView).splitAreaColors; var newSplitAreaColors = createHashMap(); var colorIndex = 0; if (lastSplitAreaColors) { for (var i = 0; i < ticksCoords.length; i++) { var cIndex = lastSplitAreaColors.get(ticksCoords[i].tickValue); if (cIndex != null) { colorIndex = (cIndex + (areaColorsLen - 1) * i) % areaColorsLen; break; } } } var prev = axis.toGlobalCoord(ticksCoords[0].coord); var areaStyle = areaStyleModel.getAreaStyle(); areaColors = isArray(areaColors) ? areaColors : [areaColors]; for (var i = 1; i < ticksCoords.length; i++) { var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord); var x = void 0; var y = void 0; var width = void 0; var height = void 0; if (axis.isHorizontal()) { x = prev; y = gridRect.y; width = tickCoord - x; height = gridRect.height; prev = x + width; } else { x = gridRect.x; y = prev; width = gridRect.width; height = tickCoord - y; prev = y + height; } var tickValue = ticksCoords[i - 1].tickValue; tickValue != null && newSplitAreaColors.set(tickValue, colorIndex); axisGroup.add(new Rect({ anid: tickValue != null ? 'area_' + tickValue : null, shape: { x: x, y: y, width: width, height: height }, style: defaults({ fill: areaColors[colorIndex] }, areaStyle), autoBatch: true, silent: true })); colorIndex = (colorIndex + 1) % areaColorsLen; } inner$5(axisView).splitAreaColors = newSplitAreaColors; } function rectCoordAxisHandleRemove(axisView) { inner$5(axisView).splitAreaColors = null; } var axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName']; var selfBuilderAttrs = ['splitArea', 'splitLine', 'minorSplitLine']; var CartesianAxisView = /** @class */ function (_super) { __extends(CartesianAxisView, _super); function CartesianAxisView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = CartesianAxisView.type; _this.axisPointerClass = 'CartesianAxisPointer'; return _this; } /** * @override */ CartesianAxisView.prototype.render = function (axisModel, ecModel, api, payload) { this.group.removeAll(); var oldAxisGroup = this._axisGroup; this._axisGroup = new Group(); this.group.add(this._axisGroup); if (!axisModel.get('show')) { return; } var gridModel = axisModel.getCoordSysModel(); var layout = layout$1(gridModel, axisModel); var axisBuilder = new AxisBuilder(axisModel, extend({ handleAutoShown: function (elementType) { var cartesians = gridModel.coordinateSystem.getCartesians(); for (var i = 0; i < cartesians.length; i++) { var otherAxisType = cartesians[i].getOtherAxis(axisModel.axis).type; if (otherAxisType === 'value' || otherAxisType === 'log') { // Still show axis tick or axisLine if other axis is value / log return true; } } // Not show axisTick or axisLine if other axis is category / time return false; } }, layout)); each(axisBuilderAttrs, axisBuilder.add, axisBuilder); this._axisGroup.add(axisBuilder.getGroup()); each(selfBuilderAttrs, function (name) { if (axisModel.get([name, 'show'])) { axisElementBuilders[name](this, this._axisGroup, axisModel, gridModel); } }, this); groupTransition(oldAxisGroup, this._axisGroup, axisModel); _super.prototype.render.call(this, axisModel, ecModel, api, payload); }; CartesianAxisView.prototype.remove = function () { rectCoordAxisHandleRemove(this); }; CartesianAxisView.type = 'cartesianAxis'; return CartesianAxisView; }(AxisView); var axisElementBuilders = { splitLine: function (axisView, axisGroup, axisModel, gridModel) { var axis = axisModel.axis; if (axis.scale.isBlank()) { return; } var splitLineModel = axisModel.getModel('splitLine'); var lineStyleModel = splitLineModel.getModel('lineStyle'); var lineColors = lineStyleModel.get('color'); lineColors = isArray(lineColors) ? lineColors : [lineColors]; var gridRect = gridModel.coordinateSystem.getRect(); var isHorizontal = axis.isHorizontal(); var lineCount = 0; var ticksCoords = axis.getTicksCoords({ tickModel: splitLineModel }); var p1 = []; var p2 = []; var lineStyle = lineStyleModel.getLineStyle(); for (var i = 0; i < ticksCoords.length; i++) { var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord); if (isHorizontal) { p1[0] = tickCoord; p1[1] = gridRect.y; p2[0] = tickCoord; p2[1] = gridRect.y + gridRect.height; } else { p1[0] = gridRect.x; p1[1] = tickCoord; p2[0] = gridRect.x + gridRect.width; p2[1] = tickCoord; } var colorIndex = lineCount++ % lineColors.length; var tickValue = ticksCoords[i].tickValue; axisGroup.add(new Line({ anid: tickValue != null ? 'line_' + ticksCoords[i].tickValue : null, subPixelOptimize: true, autoBatch: true, shape: { x1: p1[0], y1: p1[1], x2: p2[0], y2: p2[1] }, style: defaults({ stroke: lineColors[colorIndex] }, lineStyle), silent: true })); } }, minorSplitLine: function (axisView, axisGroup, axisModel, gridModel) { var axis = axisModel.axis; var minorSplitLineModel = axisModel.getModel('minorSplitLine'); var lineStyleModel = minorSplitLineModel.getModel('lineStyle'); var gridRect = gridModel.coordinateSystem.getRect(); var isHorizontal = axis.isHorizontal(); var minorTicksCoords = axis.getMinorTicksCoords(); if (!minorTicksCoords.length) { return; } var p1 = []; var p2 = []; var lineStyle = lineStyleModel.getLineStyle(); for (var i = 0; i < minorTicksCoords.length; i++) { for (var k = 0; k < minorTicksCoords[i].length; k++) { var tickCoord = axis.toGlobalCoord(minorTicksCoords[i][k].coord); if (isHorizontal) { p1[0] = tickCoord; p1[1] = gridRect.y; p2[0] = tickCoord; p2[1] = gridRect.y + gridRect.height; } else { p1[0] = gridRect.x; p1[1] = tickCoord; p2[0] = gridRect.x + gridRect.width; p2[1] = tickCoord; } axisGroup.add(new Line({ anid: 'minor_line_' + minorTicksCoords[i][k].tickValue, subPixelOptimize: true, autoBatch: true, shape: { x1: p1[0], y1: p1[1], x2: p2[0], y2: p2[1] }, style: lineStyle, silent: true })); } } }, splitArea: function (axisView, axisGroup, axisModel, gridModel) { rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, gridModel); } }; var CartesianXAxisView = /** @class */ function (_super) { __extends(CartesianXAxisView, _super); function CartesianXAxisView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = CartesianXAxisView.type; return _this; } CartesianXAxisView.type = 'xAxis'; return CartesianXAxisView; }(CartesianAxisView); var CartesianYAxisView = /** @class */ function (_super) { __extends(CartesianYAxisView, _super); function CartesianYAxisView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = CartesianXAxisView.type; return _this; } CartesianYAxisView.type = 'yAxis'; return CartesianYAxisView; }(CartesianAxisView); var GridView = /** @class */ function (_super) { __extends(GridView, _super); function GridView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'grid'; return _this; } GridView.prototype.render = function (gridModel, ecModel) { this.group.removeAll(); if (gridModel.get('show')) { this.group.add(new Rect({ shape: gridModel.coordinateSystem.getRect(), style: defaults({ fill: gridModel.get('backgroundColor') }, gridModel.getItemStyle()), silent: true, z2: -1 })); } }; GridView.type = 'grid'; return GridView; }(ComponentView); var extraOption = { // gridIndex: 0, // gridId: '', offset: 0 }; function install$5(registers) { registers.registerComponentView(GridView); registers.registerComponentModel(GridModel); registers.registerCoordinateSystem('cartesian2d', Grid); axisModelCreator(registers, 'x', CartesianAxisModel, extraOption); axisModelCreator(registers, 'y', CartesianAxisModel, extraOption); registers.registerComponentView(CartesianXAxisView); registers.registerComponentView(CartesianYAxisView); registers.registerPreprocessor(function (option) { // Only create grid when need if (option.xAxis && option.yAxis && !option.grid) { option.grid = {}; } }); } function install$6(registers) { // In case developer forget to include grid component use(install$5); registers.registerSeriesModel(ScatterSeriesModel); registers.registerChartView(ScatterView); registers.registerLayout(pointsLayout('scatter')); } function radarLayout(ecModel) { ecModel.eachSeriesByType('radar', function (seriesModel) { var data = seriesModel.getData(); var points = []; var coordSys = seriesModel.coordinateSystem; if (!coordSys) { return; } var axes = coordSys.getIndicatorAxes(); each(axes, function (axis, axisIndex) { data.each(data.mapDimension(axes[axisIndex].dim), function (val, dataIndex) { points[dataIndex] = points[dataIndex] || []; var point = coordSys.dataToPoint(val, axisIndex); points[dataIndex][axisIndex] = isValidPoint(point) ? point : getValueMissingPoint(coordSys); }); }); // Close polygon data.each(function (idx) { // TODO // Is it appropriate to connect to the next data when some data is missing? // Or, should trade it like `connectNull` in line chart? var firstPoint = find(points[idx], function (point) { return isValidPoint(point); }) || getValueMissingPoint(coordSys); // Copy the first actual point to the end of the array points[idx].push(firstPoint.slice()); data.setItemLayout(idx, points[idx]); }); }); } function isValidPoint(point) { return !isNaN(point[0]) && !isNaN(point[1]); } function getValueMissingPoint(coordSys) { // It is error-prone to input [NaN, NaN] into polygon, polygon. // (probably cause problem when refreshing or animating) return [coordSys.cx, coordSys.cy]; } function radarBackwardCompat(option) { var polarOptArr = option.polar; if (polarOptArr) { if (!isArray(polarOptArr)) { polarOptArr = [polarOptArr]; } var polarNotRadar_1 = []; each(polarOptArr, function (polarOpt, idx) { if (polarOpt.indicator) { if (polarOpt.type && !polarOpt.shape) { polarOpt.shape = polarOpt.type; } option.radar = option.radar || []; if (!isArray(option.radar)) { option.radar = [option.radar]; } option.radar.push(polarOpt); } else { polarNotRadar_1.push(polarOpt); } }); option.polar = polarNotRadar_1; } each(option.series, function (seriesOpt) { if (seriesOpt && seriesOpt.type === 'radar' && seriesOpt.polarIndex) { seriesOpt.radarIndex = seriesOpt.polarIndex; } }); } function normalizeSymbolSize(symbolSize) { if (!isArray(symbolSize)) { symbolSize = [+symbolSize, +symbolSize]; } return symbolSize; } var RadarView = /** @class */ function (_super) { __extends(RadarView, _super); function RadarView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = RadarView.type; return _this; } RadarView.prototype.render = function (seriesModel, ecModel, api) { var polar = seriesModel.coordinateSystem; var group = this.group; var data = seriesModel.getData(); var oldData = this._data; function createSymbol$1(data, idx) { var symbolType = data.getItemVisual(idx, 'symbol') || 'circle'; if (symbolType === 'none') { return; } var symbolSize = normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize')); var symbolPath = createSymbol(symbolType, -1, -1, 2, 2); var symbolRotate = data.getItemVisual(idx, 'symbolRotate') || 0; symbolPath.attr({ style: { strokeNoScale: true }, z2: 100, scaleX: symbolSize[0] / 2, scaleY: symbolSize[1] / 2, rotation: symbolRotate * Math.PI / 180 || 0 }); return symbolPath; } function updateSymbols(oldPoints, newPoints, symbolGroup, data, idx, isInit) { // Simply rerender all symbolGroup.removeAll(); for (var i = 0; i < newPoints.length - 1; i++) { var symbolPath = createSymbol$1(data, idx); if (symbolPath) { symbolPath.__dimIdx = i; if (oldPoints[i]) { symbolPath.setPosition(oldPoints[i]); graphic[isInit ? 'initProps' : 'updateProps'](symbolPath, { x: newPoints[i][0], y: newPoints[i][1] }, seriesModel, idx); } else { symbolPath.setPosition(newPoints[i]); } symbolGroup.add(symbolPath); } } } function getInitialPoints(points) { return map(points, function (pt) { return [polar.cx, polar.cy]; }); } data.diff(oldData).add(function (idx) { var points = data.getItemLayout(idx); if (!points) { return; } var polygon = new Polygon(); var polyline = new Polyline(); var target = { shape: { points: points } }; polygon.shape.points = getInitialPoints(points); polyline.shape.points = getInitialPoints(points); initProps(polygon, target, seriesModel, idx); initProps(polyline, target, seriesModel, idx); var itemGroup = new Group(); var symbolGroup = new Group(); itemGroup.add(polyline); itemGroup.add(polygon); itemGroup.add(symbolGroup); updateSymbols(polyline.shape.points, points, symbolGroup, data, idx, true); data.setItemGraphicEl(idx, itemGroup); }).update(function (newIdx, oldIdx) { var itemGroup = oldData.getItemGraphicEl(oldIdx); var polyline = itemGroup.childAt(0); var polygon = itemGroup.childAt(1); var symbolGroup = itemGroup.childAt(2); var target = { shape: { points: data.getItemLayout(newIdx) } }; if (!target.shape.points) { return; } updateSymbols(polyline.shape.points, target.shape.points, symbolGroup, data, newIdx, false); updateProps(polyline, target, seriesModel); updateProps(polygon, target, seriesModel); data.setItemGraphicEl(newIdx, itemGroup); }).remove(function (idx) { group.remove(oldData.getItemGraphicEl(idx)); }).execute(); data.eachItemGraphicEl(function (itemGroup, idx) { var itemModel = data.getItemModel(idx); var polyline = itemGroup.childAt(0); var polygon = itemGroup.childAt(1); var symbolGroup = itemGroup.childAt(2); // Radar uses the visual encoded from itemStyle. var itemStyle = data.getItemVisual(idx, 'style'); var color = itemStyle.fill; group.add(itemGroup); polyline.useStyle(defaults(itemModel.getModel('lineStyle').getLineStyle(), { fill: 'none', stroke: color })); setStatesStylesFromModel(polyline, itemModel, 'lineStyle'); setStatesStylesFromModel(polygon, itemModel, 'areaStyle'); var areaStyleModel = itemModel.getModel('areaStyle'); var polygonIgnore = areaStyleModel.isEmpty() && areaStyleModel.parentModel.isEmpty(); polygon.ignore = polygonIgnore; each(['emphasis', 'select', 'blur'], function (stateName) { var stateModel = itemModel.getModel([stateName, 'areaStyle']); var stateIgnore = stateModel.isEmpty() && stateModel.parentModel.isEmpty(); // Won't be ignore if normal state is not ignore. polygon.ensureState(stateName).ignore = stateIgnore && polygonIgnore; }); polygon.useStyle(defaults(areaStyleModel.getAreaStyle(), { fill: color, opacity: 0.7, decal: itemStyle.decal })); var emphasisModel = itemModel.getModel('emphasis'); var itemHoverStyle = emphasisModel.getModel('itemStyle').getItemStyle(); symbolGroup.eachChild(function (symbolPath) { if (symbolPath instanceof ZRImage) { var pathStyle = symbolPath.style; symbolPath.useStyle(extend({ // TODO other properties like x, y ? image: pathStyle.image, x: pathStyle.x, y: pathStyle.y, width: pathStyle.width, height: pathStyle.height }, itemStyle)); } else { symbolPath.useStyle(itemStyle); symbolPath.setColor(color); } var pathEmphasisState = symbolPath.ensureState('emphasis'); pathEmphasisState.style = clone(itemHoverStyle); var defaultText = data.get(data.dimensions[symbolPath.__dimIdx], idx); (defaultText == null || isNaN(defaultText)) && (defaultText = ''); setLabelStyle(symbolPath, getLabelStatesModels(itemModel), { labelFetcher: data.hostModel, labelDataIndex: idx, labelDimIndex: symbolPath.__dimIdx, defaultText: defaultText, inheritColor: color, defaultOpacity: itemStyle.opacity }); }); enableHoverEmphasis(itemGroup, emphasisModel.get('focus'), emphasisModel.get('blurScope')); }); this._data = data; }; RadarView.prototype.remove = function () { this.group.removeAll(); this._data = null; }; RadarView.type = 'radar'; return RadarView; }(ChartView); var RadarSeriesModel = /** @class */ function (_super) { __extends(RadarSeriesModel, _super); function RadarSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = RadarSeriesModel.type; _this.useColorPaletteOnData = true; _this.hasSymbolVisual = true; return _this; } // Overwrite RadarSeriesModel.prototype.init = function (option) { _super.prototype.init.apply(this, arguments); // Enable legend selection for each data item // Use a function instead of direct access because data reference may changed this.legendVisualProvider = new LegendVisualProvider(bind(this.getData, this), bind(this.getRawData, this)); }; RadarSeriesModel.prototype.getInitialData = function (option, ecModel) { return createListSimply(this, { generateCoord: 'indicator_', generateCoordCount: Infinity }); }; RadarSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { var data = this.getData(); var coordSys = this.coordinateSystem; var indicatorAxes = coordSys.getIndicatorAxes(); var name = this.getData().getName(dataIndex); var nameToDisplay = name === '' ? this.name : name; var markerColor = retrieveVisualColorForTooltipMarker(this, dataIndex); return createTooltipMarkup('section', { header: nameToDisplay, sortBlocks: true, blocks: map(indicatorAxes, function (axis) { var val = data.get(data.mapDimension(axis.dim), dataIndex); return createTooltipMarkup('nameValue', { markerType: 'subItem', markerColor: markerColor, name: axis.name, value: val, sortParam: val }); }) }); }; RadarSeriesModel.prototype.getTooltipPosition = function (dataIndex) { if (dataIndex != null) { var data_1 = this.getData(); var coordSys = this.coordinateSystem; var values = data_1.getValues(map(coordSys.dimensions, function (dim) { return data_1.mapDimension(dim); }), dataIndex); for (var i = 0, len = values.length; i < len; i++) { if (!isNaN(values[i])) { var indicatorAxes = coordSys.getIndicatorAxes(); return coordSys.coordToPoint(indicatorAxes[i].dataToCoord(values[i]), i); } } } }; RadarSeriesModel.type = 'series.radar'; RadarSeriesModel.dependencies = ['radar']; RadarSeriesModel.defaultOption = { zlevel: 0, z: 2, coordinateSystem: 'radar', legendHoverLink: true, radarIndex: 0, lineStyle: { width: 2, type: 'solid' }, label: { position: 'top' }, // areaStyle: { // }, // itemStyle: {} symbolSize: 8 // symbolRotate: null }; return RadarSeriesModel; }(SeriesModel); var valueAxisDefault = axisDefault.value; function defaultsShow(opt, show) { return defaults({ show: show }, opt); } var RadarModel = /** @class */ function (_super) { __extends(RadarModel, _super); function RadarModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = RadarModel.type; return _this; } RadarModel.prototype.optionUpdated = function () { var boundaryGap = this.get('boundaryGap'); var splitNumber = this.get('splitNumber'); var scale = this.get('scale'); var axisLine = this.get('axisLine'); var axisTick = this.get('axisTick'); // let axisType = this.get('axisType'); var axisLabel = this.get('axisLabel'); var nameTextStyle = this.get('axisName'); var showName = this.get(['axisName', 'show']); var nameFormatter = this.get(['axisName', 'formatter']); var nameGap = this.get('axisNameGap'); var triggerEvent = this.get('triggerEvent'); var indicatorModels = map(this.get('indicator') || [], function (indicatorOpt) { // PENDING if (indicatorOpt.max != null && indicatorOpt.max > 0 && !indicatorOpt.min) { indicatorOpt.min = 0; } else if (indicatorOpt.min != null && indicatorOpt.min < 0 && !indicatorOpt.max) { indicatorOpt.max = 0; } var iNameTextStyle = nameTextStyle; if (indicatorOpt.color != null) { iNameTextStyle = defaults({ color: indicatorOpt.color }, nameTextStyle); } // Use same configuration var innerIndicatorOpt = merge(clone(indicatorOpt), { boundaryGap: boundaryGap, splitNumber: splitNumber, scale: scale, axisLine: axisLine, axisTick: axisTick, // axisType: axisType, axisLabel: axisLabel, // Compatible with 2 and use text name: indicatorOpt.text, nameLocation: 'end', nameGap: nameGap, // min: 0, nameTextStyle: iNameTextStyle, triggerEvent: triggerEvent }, false); if (!showName) { innerIndicatorOpt.name = ''; } if (typeof nameFormatter === 'string') { var indName = innerIndicatorOpt.name; innerIndicatorOpt.name = nameFormatter.replace('{value}', indName != null ? indName : ''); } else if (typeof nameFormatter === 'function') { innerIndicatorOpt.name = nameFormatter(innerIndicatorOpt.name, innerIndicatorOpt); } var model = new Model(innerIndicatorOpt, null, this.ecModel); mixin(model, AxisModelCommonMixin.prototype); // For triggerEvent. model.mainType = 'radar'; model.componentIndex = this.componentIndex; return model; }, this); this._indicatorModels = indicatorModels; }; RadarModel.prototype.getIndicatorModels = function () { return this._indicatorModels; }; RadarModel.type = 'radar'; RadarModel.defaultOption = { zlevel: 0, z: 0, center: ['50%', '50%'], radius: '75%', startAngle: 90, axisName: { show: true // formatter: null // textStyle: {} }, boundaryGap: [0, 0], splitNumber: 5, axisNameGap: 15, scale: false, // Polygon or circle shape: 'polygon', axisLine: merge({ lineStyle: { color: '#bbb' } }, valueAxisDefault.axisLine), axisLabel: defaultsShow(valueAxisDefault.axisLabel, false), axisTick: defaultsShow(valueAxisDefault.axisTick, false), // axisType: 'value', splitLine: defaultsShow(valueAxisDefault.splitLine, true), splitArea: defaultsShow(valueAxisDefault.splitArea, true), // {text, min, max} indicator: [] }; return RadarModel; }(ComponentModel); var axisBuilderAttrs$1 = ['axisLine', 'axisTickLabel', 'axisName']; var RadarView$1 = /** @class */ function (_super) { __extends(RadarView, _super); function RadarView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = RadarView.type; return _this; } RadarView.prototype.render = function (radarModel, ecModel, api) { var group = this.group; group.removeAll(); this._buildAxes(radarModel); this._buildSplitLineAndArea(radarModel); }; RadarView.prototype._buildAxes = function (radarModel) { var radar = radarModel.coordinateSystem; var indicatorAxes = radar.getIndicatorAxes(); var axisBuilders = map(indicatorAxes, function (indicatorAxis) { var axisBuilder = new AxisBuilder(indicatorAxis.model, { position: [radar.cx, radar.cy], rotation: indicatorAxis.angle, labelDirection: -1, tickDirection: -1, nameDirection: 1 }); return axisBuilder; }); each(axisBuilders, function (axisBuilder) { each(axisBuilderAttrs$1, axisBuilder.add, axisBuilder); this.group.add(axisBuilder.getGroup()); }, this); }; RadarView.prototype._buildSplitLineAndArea = function (radarModel) { var radar = radarModel.coordinateSystem; var indicatorAxes = radar.getIndicatorAxes(); if (!indicatorAxes.length) { return; } var shape = radarModel.get('shape'); var splitLineModel = radarModel.getModel('splitLine'); var splitAreaModel = radarModel.getModel('splitArea'); var lineStyleModel = splitLineModel.getModel('lineStyle'); var areaStyleModel = splitAreaModel.getModel('areaStyle'); var showSplitLine = splitLineModel.get('show'); var showSplitArea = splitAreaModel.get('show'); var splitLineColors = lineStyleModel.get('color'); var splitAreaColors = areaStyleModel.get('color'); var splitLineColorsArr = isArray(splitLineColors) ? splitLineColors : [splitLineColors]; var splitAreaColorsArr = isArray(splitAreaColors) ? splitAreaColors : [splitAreaColors]; var splitLines = []; var splitAreas = []; function getColorIndex(areaOrLine, areaOrLineColorList, idx) { var colorIndex = idx % areaOrLineColorList.length; areaOrLine[colorIndex] = areaOrLine[colorIndex] || []; return colorIndex; } if (shape === 'circle') { var ticksRadius = indicatorAxes[0].getTicksCoords(); var cx = radar.cx; var cy = radar.cy; for (var i = 0; i < ticksRadius.length; i++) { if (showSplitLine) { var colorIndex = getColorIndex(splitLines, splitLineColorsArr, i); splitLines[colorIndex].push(new Circle({ shape: { cx: cx, cy: cy, r: ticksRadius[i].coord } })); } if (showSplitArea && i < ticksRadius.length - 1) { var colorIndex = getColorIndex(splitAreas, splitAreaColorsArr, i); splitAreas[colorIndex].push(new Ring({ shape: { cx: cx, cy: cy, r0: ticksRadius[i].coord, r: ticksRadius[i + 1].coord } })); } } } // Polyyon else { var realSplitNumber_1; var axesTicksPoints = map(indicatorAxes, function (indicatorAxis, idx) { var ticksCoords = indicatorAxis.getTicksCoords(); realSplitNumber_1 = realSplitNumber_1 == null ? ticksCoords.length - 1 : Math.min(ticksCoords.length - 1, realSplitNumber_1); return map(ticksCoords, function (tickCoord) { return radar.coordToPoint(tickCoord.coord, idx); }); }); var prevPoints = []; for (var i = 0; i <= realSplitNumber_1; i++) { var points = []; for (var j = 0; j < indicatorAxes.length; j++) { points.push(axesTicksPoints[j][i]); } // Close if (points[0]) { points.push(points[0].slice()); } else { if ("development" !== 'production') { console.error('Can\'t draw value axis ' + i); } } if (showSplitLine) { var colorIndex = getColorIndex(splitLines, splitLineColorsArr, i); splitLines[colorIndex].push(new Polyline({ shape: { points: points } })); } if (showSplitArea && prevPoints) { var colorIndex = getColorIndex(splitAreas, splitAreaColorsArr, i - 1); splitAreas[colorIndex].push(new Polygon({ shape: { points: points.concat(prevPoints) } })); } prevPoints = points.slice().reverse(); } } var lineStyle = lineStyleModel.getLineStyle(); var areaStyle = areaStyleModel.getAreaStyle(); // Add splitArea before splitLine each(splitAreas, function (splitAreas, idx) { this.group.add(mergePath$1(splitAreas, { style: defaults({ stroke: 'none', fill: splitAreaColorsArr[idx % splitAreaColorsArr.length] }, areaStyle), silent: true })); }, this); each(splitLines, function (splitLines, idx) { this.group.add(mergePath$1(splitLines, { style: defaults({ fill: 'none', stroke: splitLineColorsArr[idx % splitLineColorsArr.length] }, lineStyle), silent: true })); }, this); }; RadarView.type = 'radar'; return RadarView; }(ComponentView); var IndicatorAxis = /** @class */ function (_super) { __extends(IndicatorAxis, _super); function IndicatorAxis(dim, scale, radiusExtent) { var _this = _super.call(this, dim, scale, radiusExtent) || this; _this.type = 'value'; _this.angle = 0; _this.name = ''; return _this; } return IndicatorAxis; }(Axis); var Radar = /** @class */ function () { function Radar(radarModel, ecModel, api) { /** * * Radar dimensions */ this.dimensions = []; this._model = radarModel; this._indicatorAxes = map(radarModel.getIndicatorModels(), function (indicatorModel, idx) { var dim = 'indicator_' + idx; var indicatorAxis = new IndicatorAxis(dim, new IntervalScale() // (indicatorModel.get('axisType') === 'log') ? new LogScale() : new IntervalScale() ); indicatorAxis.name = indicatorModel.get('name'); // Inject model and axis indicatorAxis.model = indicatorModel; indicatorModel.axis = indicatorAxis; this.dimensions.push(dim); return indicatorAxis; }, this); this.resize(radarModel, api); } Radar.prototype.getIndicatorAxes = function () { return this._indicatorAxes; }; Radar.prototype.dataToPoint = function (value, indicatorIndex) { var indicatorAxis = this._indicatorAxes[indicatorIndex]; return this.coordToPoint(indicatorAxis.dataToCoord(value), indicatorIndex); }; // TODO: API should be coordToPoint([coord, indicatorIndex]) Radar.prototype.coordToPoint = function (coord, indicatorIndex) { var indicatorAxis = this._indicatorAxes[indicatorIndex]; var angle = indicatorAxis.angle; var x = this.cx + coord * Math.cos(angle); var y = this.cy - coord * Math.sin(angle); return [x, y]; }; Radar.prototype.pointToData = function (pt) { var dx = pt[0] - this.cx; var dy = pt[1] - this.cy; var radius = Math.sqrt(dx * dx + dy * dy); dx /= radius; dy /= radius; var radian = Math.atan2(-dy, dx); // Find the closest angle // FIXME index can calculated directly var minRadianDiff = Infinity; var closestAxis; var closestAxisIdx = -1; for (var i = 0; i < this._indicatorAxes.length; i++) { var indicatorAxis = this._indicatorAxes[i]; var diff = Math.abs(radian - indicatorAxis.angle); if (diff < minRadianDiff) { closestAxis = indicatorAxis; closestAxisIdx = i; minRadianDiff = diff; } } return [closestAxisIdx, +(closestAxis && closestAxis.coordToData(radius))]; }; Radar.prototype.resize = function (radarModel, api) { var center = radarModel.get('center'); var viewWidth = api.getWidth(); var viewHeight = api.getHeight(); var viewSize = Math.min(viewWidth, viewHeight) / 2; this.cx = parsePercent$1(center[0], viewWidth); this.cy = parsePercent$1(center[1], viewHeight); this.startAngle = radarModel.get('startAngle') * Math.PI / 180; // radius may be single value like `20`, `'80%'`, or array like `[10, '80%']` var radius = radarModel.get('radius'); if (typeof radius === 'string' || typeof radius === 'number') { radius = [0, radius]; } this.r0 = parsePercent$1(radius[0], viewSize); this.r = parsePercent$1(radius[1], viewSize); each(this._indicatorAxes, function (indicatorAxis, idx) { indicatorAxis.setExtent(this.r0, this.r); var angle = this.startAngle + idx * Math.PI * 2 / this._indicatorAxes.length; // Normalize to [-PI, PI] angle = Math.atan2(Math.sin(angle), Math.cos(angle)); indicatorAxis.angle = angle; }, this); }; Radar.prototype.update = function (ecModel, api) { var indicatorAxes = this._indicatorAxes; var radarModel = this._model; each(indicatorAxes, function (indicatorAxis) { indicatorAxis.scale.setExtent(Infinity, -Infinity); }); ecModel.eachSeriesByType('radar', function (radarSeries, idx) { if (radarSeries.get('coordinateSystem') !== 'radar' // @ts-ignore || ecModel.getComponent('radar', radarSeries.get('radarIndex')) !== radarModel) { return; } var data = radarSeries.getData(); each(indicatorAxes, function (indicatorAxis) { indicatorAxis.scale.unionExtentFromData(data, data.mapDimension(indicatorAxis.dim)); }); }, this); var splitNumber = radarModel.get('splitNumber'); function increaseInterval(interval) { var exp10 = Math.pow(10, Math.floor(Math.log(interval) / Math.LN10)); // Increase interval var f = interval / exp10; if (f === 2) { f = 5; } else { // f is 2 or 5 f *= 2; } return f * exp10; } // Force all the axis fixing the maxSplitNumber. each(indicatorAxes, function (indicatorAxis, idx) { var rawExtent = getScaleExtent(indicatorAxis.scale, indicatorAxis.model).extent; niceScaleExtent(indicatorAxis.scale, indicatorAxis.model); var axisModel = indicatorAxis.model; var scale = indicatorAxis.scale; var fixedMin = parseAxisModelMinMax(scale, axisModel.get('min', true)); var fixedMax = parseAxisModelMinMax(scale, axisModel.get('max', true)); var interval = scale.getInterval(); if (fixedMin != null && fixedMax != null) { // User set min, max, divide to get new interval scale.setExtent(+fixedMin, +fixedMax); scale.setInterval((fixedMax - fixedMin) / splitNumber); } else if (fixedMin != null) { var max = void 0; // User set min, expand extent on the other side do { max = fixedMin + interval * splitNumber; scale.setExtent(+fixedMin, max); // Interval must been set after extent // FIXME scale.setInterval(interval); interval = increaseInterval(interval); } while (max < rawExtent[1] && isFinite(max) && isFinite(rawExtent[1])); } else if (fixedMax != null) { var min = void 0; // User set min, expand extent on the other side do { min = fixedMax - interval * splitNumber; scale.setExtent(min, +fixedMax); scale.setInterval(interval); interval = increaseInterval(interval); } while (min > rawExtent[0] && isFinite(min) && isFinite(rawExtent[0])); } else { var nicedSplitNumber = scale.getTicks().length - 1; if (nicedSplitNumber > splitNumber) { interval = increaseInterval(interval); } // TODO var max = Math.ceil(rawExtent[1] / interval) * interval; var min = round(max - interval * splitNumber); scale.setExtent(min, max); scale.setInterval(interval); } }); }; Radar.prototype.convertToPixel = function (ecModel, finder, value) { console.warn('Not implemented.'); return null; }; Radar.prototype.convertFromPixel = function (ecModel, finder, pixel) { console.warn('Not implemented.'); return null; }; Radar.prototype.containPoint = function (point) { console.warn('Not implemented.'); return false; }; Radar.create = function (ecModel, api) { var radarList = []; ecModel.eachComponent('radar', function (radarModel) { var radar = new Radar(radarModel, ecModel, api); radarList.push(radar); radarModel.coordinateSystem = radar; }); ecModel.eachSeriesByType('radar', function (radarSeries) { if (radarSeries.get('coordinateSystem') === 'radar') { // Inject coordinate system // @ts-ignore radarSeries.coordinateSystem = radarList[radarSeries.get('radarIndex') || 0]; } }); return radarList; }; /** * Radar dimensions is based on the data */ Radar.dimensions = []; return Radar; }(); function install$7(registers) { registers.registerCoordinateSystem('radar', Radar); registers.registerComponentModel(RadarModel); registers.registerComponentView(RadarView$1); registers.registerVisual({ seriesType: 'radar', reset: function (seriesModel) { var data = seriesModel.getData(); // itemVisual symbol is for selected data data.each(function (idx) { data.setItemVisual(idx, 'legendSymbol', 'roundRect'); }); // visual is for unselected data data.setVisual('legendSymbol', 'roundRect'); } }); } function install$8(registers) { use(install$7); registers.registerChartView(RadarView); registers.registerSeriesModel(RadarSeriesModel); registers.registerLayout(radarLayout); registers.registerProcessor(dataFilter('radar')); registers.registerPreprocessor(radarBackwardCompat); } var ATTR = '\0_ec_interaction_mutex'; function take(zr, resourceKey, userKey) { var store = getStore(zr); store[resourceKey] = userKey; } function release(zr, resourceKey, userKey) { var store = getStore(zr); var uKey = store[resourceKey]; if (uKey === userKey) { store[resourceKey] = null; } } function isTaken(zr, resourceKey) { return !!getStore(zr)[resourceKey]; } function getStore(zr) { return zr[ATTR] || (zr[ATTR] = {}); } /** * payload: { * type: 'takeGlobalCursor', * key: 'dataZoomSelect', or 'brush', or ..., * If no userKey, release global cursor. * } */ // TODO: SELF REGISTERED. registerAction({ type: 'takeGlobalCursor', event: 'globalCursorTaken', update: 'update' }, function () {}); var RoamController = /** @class */ function (_super) { __extends(RoamController, _super); function RoamController(zr) { var _this = _super.call(this) || this; _this._zr = zr; // Avoid two roamController bind the same handler var mousedownHandler = bind(_this._mousedownHandler, _this); var mousemoveHandler = bind(_this._mousemoveHandler, _this); var mouseupHandler = bind(_this._mouseupHandler, _this); var mousewheelHandler = bind(_this._mousewheelHandler, _this); var pinchHandler = bind(_this._pinchHandler, _this); /** * Notice: only enable needed types. For example, if 'zoom' * is not needed, 'zoom' should not be enabled, otherwise * default mousewheel behaviour (scroll page) will be disabled. */ _this.enable = function (controlType, opt) { // Disable previous first this.disable(); this._opt = defaults(clone(opt) || {}, { zoomOnMouseWheel: true, moveOnMouseMove: true, // By default, wheel do not trigger move. moveOnMouseWheel: false, preventDefaultMouseMove: true }); if (controlType == null) { controlType = true; } if (controlType === true || controlType === 'move' || controlType === 'pan') { zr.on('mousedown', mousedownHandler); zr.on('mousemove', mousemoveHandler); zr.on('mouseup', mouseupHandler); } if (controlType === true || controlType === 'scale' || controlType === 'zoom') { zr.on('mousewheel', mousewheelHandler); zr.on('pinch', pinchHandler); } }; _this.disable = function () { zr.off('mousedown', mousedownHandler); zr.off('mousemove', mousemoveHandler); zr.off('mouseup', mouseupHandler); zr.off('mousewheel', mousewheelHandler); zr.off('pinch', pinchHandler); }; return _this; } RoamController.prototype.isDragging = function () { return this._dragging; }; RoamController.prototype.isPinching = function () { return this._pinching; }; RoamController.prototype.setPointerChecker = function (pointerChecker) { this.pointerChecker = pointerChecker; }; RoamController.prototype.dispose = function () { this.disable(); }; RoamController.prototype._mousedownHandler = function (e) { if (isMiddleOrRightButtonOnMouseUpDown(e) || e.target && e.target.draggable) { return; } var x = e.offsetX; var y = e.offsetY; // Only check on mosedown, but not mousemove. // Mouse can be out of target when mouse moving. if (this.pointerChecker && this.pointerChecker(e, x, y)) { this._x = x; this._y = y; this._dragging = true; } }; RoamController.prototype._mousemoveHandler = function (e) { if (!this._dragging || !isAvailableBehavior('moveOnMouseMove', e, this._opt) || e.gestureEvent === 'pinch' || isTaken(this._zr, 'globalPan')) { return; } var x = e.offsetX; var y = e.offsetY; var oldX = this._x; var oldY = this._y; var dx = x - oldX; var dy = y - oldY; this._x = x; this._y = y; this._opt.preventDefaultMouseMove && stop(e.event); trigger(this, 'pan', 'moveOnMouseMove', e, { dx: dx, dy: dy, oldX: oldX, oldY: oldY, newX: x, newY: y, isAvailableBehavior: null }); }; RoamController.prototype._mouseupHandler = function (e) { if (!isMiddleOrRightButtonOnMouseUpDown(e)) { this._dragging = false; } }; RoamController.prototype._mousewheelHandler = function (e) { var shouldZoom = isAvailableBehavior('zoomOnMouseWheel', e, this._opt); var shouldMove = isAvailableBehavior('moveOnMouseWheel', e, this._opt); var wheelDelta = e.wheelDelta; var absWheelDeltaDelta = Math.abs(wheelDelta); var originX = e.offsetX; var originY = e.offsetY; // wheelDelta maybe -0 in chrome mac. if (wheelDelta === 0 || !shouldZoom && !shouldMove) { return; } // If both `shouldZoom` and `shouldMove` is true, trigger // their event both, and the final behavior is determined // by event listener themselves. if (shouldZoom) { // Convenience: // Mac and VM Windows on Mac: scroll up: zoom out. // Windows: scroll up: zoom in. // FIXME: Should do more test in different environment. // wheelDelta is too complicated in difference nvironment // (https://developer.mozilla.org/en-US/docs/Web/Events/mousewheel), // although it has been normallized by zrender. // wheelDelta of mouse wheel is bigger than touch pad. var factor = absWheelDeltaDelta > 3 ? 1.4 : absWheelDeltaDelta > 1 ? 1.2 : 1.1; var scale = wheelDelta > 0 ? factor : 1 / factor; checkPointerAndTrigger(this, 'zoom', 'zoomOnMouseWheel', e, { scale: scale, originX: originX, originY: originY, isAvailableBehavior: null }); } if (shouldMove) { // FIXME: Should do more test in different environment. var absDelta = Math.abs(wheelDelta); // wheelDelta of mouse wheel is bigger than touch pad. var scrollDelta = (wheelDelta > 0 ? 1 : -1) * (absDelta > 3 ? 0.4 : absDelta > 1 ? 0.15 : 0.05); checkPointerAndTrigger(this, 'scrollMove', 'moveOnMouseWheel', e, { scrollDelta: scrollDelta, originX: originX, originY: originY, isAvailableBehavior: null }); } }; RoamController.prototype._pinchHandler = function (e) { if (isTaken(this._zr, 'globalPan')) { return; } var scale = e.pinchScale > 1 ? 1.1 : 1 / 1.1; checkPointerAndTrigger(this, 'zoom', null, e, { scale: scale, originX: e.pinchX, originY: e.pinchY, isAvailableBehavior: null }); }; return RoamController; }(Eventful); function checkPointerAndTrigger(controller, eventName, behaviorToCheck, e, contollerEvent) { if (controller.pointerChecker && controller.pointerChecker(e, contollerEvent.originX, contollerEvent.originY)) { // When mouse is out of roamController rect, // default befavoius should not be be disabled, otherwise // page sliding is disabled, contrary to expectation. stop(e.event); trigger(controller, eventName, behaviorToCheck, e, contollerEvent); } } function trigger(controller, eventName, behaviorToCheck, e, contollerEvent) { // Also provide behavior checker for event listener, for some case that // multiple components share one listener. contollerEvent.isAvailableBehavior = bind(isAvailableBehavior, null, behaviorToCheck, e); controller.trigger(eventName, contollerEvent); } // settings: { // zoomOnMouseWheel // moveOnMouseMove // moveOnMouseWheel // } // The value can be: true / false / 'shift' / 'ctrl' / 'alt'. function isAvailableBehavior(behaviorToCheck, e, settings) { var setting = settings[behaviorToCheck]; return !behaviorToCheck || setting && (!isString(setting) || e.event[setting + 'Key']); } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * For geo and graph. */ function updateViewOnPan(controllerHost, dx, dy) { var target = controllerHost.target; target.x += dx; target.y += dy; target.dirty(); } /** * For geo and graph. */ function updateViewOnZoom(controllerHost, zoomDelta, zoomX, zoomY) { var target = controllerHost.target; var zoomLimit = controllerHost.zoomLimit; var newZoom = controllerHost.zoom = controllerHost.zoom || 1; newZoom *= zoomDelta; if (zoomLimit) { var zoomMin = zoomLimit.min || 0; var zoomMax = zoomLimit.max || Infinity; newZoom = Math.max(Math.min(zoomMax, newZoom), zoomMin); } var zoomScale = newZoom / controllerHost.zoom; controllerHost.zoom = newZoom; // Keep the mouse center when scaling target.x -= (zoomX - target.x) * (zoomScale - 1); target.y -= (zoomY - target.y) * (zoomScale - 1); target.scaleX *= zoomScale; target.scaleY *= zoomScale; target.dirty(); } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ var IRRELEVANT_EXCLUDES = { 'axisPointer': 1, 'tooltip': 1, 'brush': 1 }; /** * Avoid that: mouse click on a elements that is over geo or graph, * but roam is triggered. */ function onIrrelevantElement(e, api, targetCoordSysModel) { var model = api.getComponentByElement(e.topTarget); // If model is axisModel, it works only if it is injected with coordinateSystem. var coordSys = model && model.coordinateSystem; return model && model !== targetCoordSysModel && !IRRELEVANT_EXCLUDES.hasOwnProperty(model.mainType) && coordSys && coordSys.model !== targetCoordSysModel; } /** * Only these tags enable use `itemStyle` if they are named in SVG. * Other tags like might not suitable for `itemStyle`. * They will not be considered to be styled until some requirements come. */ var OPTION_STYLE_ENABLED_TAGS = ['rect', 'circle', 'line', 'ellipse', 'polygon', 'polyline', 'path']; var OPTION_STYLE_ENABLED_TAG_MAP = createHashMap(OPTION_STYLE_ENABLED_TAGS); var STATE_TRIGGER_TAG_MAP = createHashMap(OPTION_STYLE_ENABLED_TAGS.concat(['g'])); var LABEL_HOST_MAP = createHashMap(OPTION_STYLE_ENABLED_TAGS.concat(['g'])); var mapLabelRaw = makeInner(); function getFixedItemStyle(model) { var itemStyle = model.getItemStyle(); var areaColor = model.get('areaColor'); // If user want the color not to be changed when hover, // they should both set areaColor and color to be null. if (areaColor != null) { itemStyle.fill = areaColor; } return itemStyle; } var MapDraw = /** @class */ function () { function MapDraw(api) { var group = new Group(); this.uid = getUID('ec_map_draw'); this._controller = new RoamController(api.getZr()); this._controllerHost = { target: group }; this.group = group; group.add(this._regionsGroup = new Group()); group.add(this._svgGroup = new Group()); } MapDraw.prototype.draw = function (mapOrGeoModel, ecModel, api, fromView, payload) { var isGeo = mapOrGeoModel.mainType === 'geo'; // Map series has data. GEO model that controlled by map series // will be assigned with map data. Other GEO model has no data. var data = mapOrGeoModel.getData && mapOrGeoModel.getData(); isGeo && ecModel.eachComponent({ mainType: 'series', subType: 'map' }, function (mapSeries) { if (!data && mapSeries.getHostGeoModel() === mapOrGeoModel) { data = mapSeries.getData(); } }); var geo = mapOrGeoModel.coordinateSystem; var regionsGroup = this._regionsGroup; var group = this.group; var transformInfo = geo.getTransformInfo(); var transformInfoRaw = transformInfo.raw; var transformInfoRoam = transformInfo.roam; // No animation when first draw or in action var isFirstDraw = !regionsGroup.childAt(0) || payload; if (isFirstDraw) { group.x = transformInfoRoam.x; group.y = transformInfoRoam.y; group.scaleX = transformInfoRoam.scaleX; group.scaleY = transformInfoRoam.scaleY; group.dirty(); } else { updateProps(group, transformInfoRoam, mapOrGeoModel); } var isVisualEncodedByVisualMap = data && data.getVisual('visualMeta') && data.getVisual('visualMeta').length > 0; var viewBuildCtx = { api: api, geo: geo, mapOrGeoModel: mapOrGeoModel, data: data, isVisualEncodedByVisualMap: isVisualEncodedByVisualMap, isGeo: isGeo, transformInfoRaw: transformInfoRaw }; if (geo.resourceType === 'geoJSON') { this._buildGeoJSON(viewBuildCtx); } else if (geo.resourceType === 'geoSVG') { this._buildSVG(viewBuildCtx); } this._updateController(mapOrGeoModel, ecModel, api); this._updateMapSelectHandler(mapOrGeoModel, regionsGroup, api, fromView); }; MapDraw.prototype._buildGeoJSON = function (viewBuildCtx) { var nameMap = this._regionsGroupByName = createHashMap(); var regionsGroup = this._regionsGroup; var transformInfoRaw = viewBuildCtx.transformInfoRaw; var mapOrGeoModel = viewBuildCtx.mapOrGeoModel; var data = viewBuildCtx.data; var transformPoint = function (point) { return [point[0] * transformInfoRaw.scaleX + transformInfoRaw.x, point[1] * transformInfoRaw.scaleY + transformInfoRaw.y]; }; regionsGroup.removeAll(); // Only when the resource is GeoJSON, there is `geo.regions`. each(viewBuildCtx.geo.regions, function (region) { var regionName = region.name; var regionModel = mapOrGeoModel.getRegionModel(regionName); var dataIdx = data ? data.indexOfName(regionName) : null; // Consider in GeoJson properties.name may be duplicated, for example, // there is multiple region named "United Kindom" or "France" (so many // colonies). And it is not appropriate to merge them in geo, which // will make them share the same label and bring trouble in label // location calculation. var regionGroup = nameMap.get(regionName); var hasRegionGroup = !!regionGroup; if (!hasRegionGroup) { regionGroup = nameMap.set(regionName, new Group()); regionsGroup.add(regionGroup); } var compoundPath = new CompoundPath({ segmentIgnoreThreshold: 1, shape: { paths: [] } }); regionGroup.add(compoundPath); if (!hasRegionGroup) { // ensure children have been added to group before calling resetEventTriggerForRegion resetEventTriggerForRegion(viewBuildCtx, regionGroup, regionName, regionModel, mapOrGeoModel, dataIdx); resetTooltipForRegion(viewBuildCtx, regionGroup, regionName, regionModel, mapOrGeoModel); resetStateTriggerForRegion(viewBuildCtx, regionGroup, regionName, regionModel, mapOrGeoModel); } each(region.geometries, function (geometry) { if (geometry.type !== 'polygon') { return; } var points = []; for (var i = 0; i < geometry.exterior.length; ++i) { points.push(transformPoint(geometry.exterior[i])); } compoundPath.shape.paths.push(new Polygon({ segmentIgnoreThreshold: 1, shape: { points: points } })); for (var i = 0; i < (geometry.interiors ? geometry.interiors.length : 0); ++i) { var interior = geometry.interiors[i]; var points_1 = []; for (var j = 0; j < interior.length; ++j) { points_1.push(transformPoint(interior[j])); } compoundPath.shape.paths.push(new Polygon({ segmentIgnoreThreshold: 1, shape: { points: points_1 } })); } }); applyOptionStyleForRegion(viewBuildCtx, compoundPath, dataIdx, regionModel); if (compoundPath instanceof Displayable) { compoundPath.culling = true; } var centerPt = transformPoint(region.getCenter()); resetLabelForRegion(viewBuildCtx, compoundPath, regionName, regionModel, mapOrGeoModel, dataIdx, centerPt); }, this); }; MapDraw.prototype._buildSVG = function (viewBuildCtx) { var mapName = viewBuildCtx.geo.map; var transformInfoRaw = viewBuildCtx.transformInfoRaw; this._svgGroup.x = transformInfoRaw.x; this._svgGroup.y = transformInfoRaw.y; this._svgGroup.scaleX = transformInfoRaw.scaleX; this._svgGroup.scaleY = transformInfoRaw.scaleY; if (this._svgResourceChanged(mapName)) { this._freeSVG(); this._useSVG(mapName); } var svgDispatcherMap = this._svgDispatcherMap = createHashMap(); var focusSelf = false; each(this._svgGraphicRecord.named, function (namedItem) { // Note that we also allow different elements have the same name. // For example, a glyph of a city and the label of the city have // the same name and their tooltip info can be defined in a single // region option. var regionName = namedItem.name; var mapOrGeoModel = viewBuildCtx.mapOrGeoModel; var data = viewBuildCtx.data; var svgNodeTagLower = namedItem.svgNodeTagLower; var el = namedItem.el; var dataIdx = data ? data.indexOfName(regionName) : null; var regionModel = mapOrGeoModel.getRegionModel(regionName); if (OPTION_STYLE_ENABLED_TAG_MAP.get(svgNodeTagLower) != null && el instanceof Displayable) { applyOptionStyleForRegion(viewBuildCtx, el, dataIdx, regionModel); } if (el instanceof Displayable) { el.culling = true; } // We do not know how the SVG like so we'd better not to change z2. // Otherwise it might bring some unexpected result. For example, // an area hovered that make some inner city can not be clicked. el.z2EmphasisLift = 0; // If self named, that is, if tag is inside a named (where `namedFrom` does not exists): if (!namedItem.namedFrom) { // label should batter to be displayed based on the center of // if it is named rather than displayed on each child. if (LABEL_HOST_MAP.get(svgNodeTagLower) != null) { resetLabelForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel, dataIdx, null); } resetEventTriggerForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel, dataIdx); resetTooltipForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel); if (STATE_TRIGGER_TAG_MAP.get(svgNodeTagLower) != null) { var focus_1 = resetStateTriggerForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel); if (focus_1 === 'self') { focusSelf = true; } var els = svgDispatcherMap.get(regionName) || svgDispatcherMap.set(regionName, []); els.push(el); } } }, this); this._enableBlurEntireSVG(focusSelf, viewBuildCtx); }; MapDraw.prototype._enableBlurEntireSVG = function (focusSelf, viewBuildCtx) { // It's a little complicated to support blurring the entire geoSVG in series-map. // So do not suport it until some requirements come. // At present, in series-map, only regions can be blurred. if (focusSelf && viewBuildCtx.isGeo) { var blurStyle = viewBuildCtx.mapOrGeoModel.getModel(['blur', 'itemStyle']).getItemStyle(); // Only suport `opacity` here. Because not sure that other props are suitable for // all of the elements generated by SVG (especially for Text/TSpan/Image/... ). var opacity_1 = blurStyle.opacity; this._svgGraphicRecord.root.traverse(function (el) { if (!el.isGroup) { // PENDING: clear those settings to SVG elements when `_freeSVG`. // (Currently it happen not to be needed.) setDefaultStateProxy(el); var style = el.ensureState('blur').style || {}; // Do not overwrite the region style that already set from region option. if (style.opacity == null && opacity_1 != null) { style.opacity = opacity_1; } // If `ensureState('blur').style = {}`, there will be default opacity. // Enable `stateTransition` (animation). el.ensureState('emphasis'); } }); } }; MapDraw.prototype.remove = function () { this._regionsGroup.removeAll(); this._regionsGroupByName = null; this._svgGroup.removeAll(); this._freeSVG(); this._controller.dispose(); this._controllerHost = null; }; MapDraw.prototype.findHighDownDispatchers = function (name, geoModel) { if (name == null) { return []; } var geo = geoModel.coordinateSystem; if (geo.resourceType === 'geoJSON') { var regionsGroupByName = this._regionsGroupByName; if (regionsGroupByName) { var regionGroup = regionsGroupByName.get(name); return regionGroup ? [regionGroup] : []; } } else if (geo.resourceType === 'geoSVG') { return this._svgDispatcherMap && this._svgDispatcherMap.get(name) || []; } }; MapDraw.prototype._svgResourceChanged = function (mapName) { return this._svgMapName !== mapName; }; MapDraw.prototype._useSVG = function (mapName) { var resource = geoSourceManager.getGeoResource(mapName); if (resource && resource.type === 'geoSVG') { var svgGraphic = resource.useGraphic(this.uid); this._svgGroup.add(svgGraphic.root); this._svgGraphicRecord = svgGraphic; this._svgMapName = mapName; } }; MapDraw.prototype._freeSVG = function () { var mapName = this._svgMapName; if (mapName == null) { return; } var resource = geoSourceManager.getGeoResource(mapName); if (resource && resource.type === 'geoSVG') { resource.freeGraphic(this.uid); } this._svgGraphicRecord = null; this._svgDispatcherMap = null; this._svgGroup.removeAll(); this._svgMapName = null; }; MapDraw.prototype._updateController = function (mapOrGeoModel, ecModel, api) { var geo = mapOrGeoModel.coordinateSystem; var controller = this._controller; var controllerHost = this._controllerHost; // @ts-ignore FIXME:TS controllerHost.zoomLimit = mapOrGeoModel.get('scaleLimit'); controllerHost.zoom = geo.getZoom(); // roamType is will be set default true if it is null // @ts-ignore FIXME:TS controller.enable(mapOrGeoModel.get('roam') || false); var mainType = mapOrGeoModel.mainType; function makeActionBase() { var action = { type: 'geoRoam', componentType: mainType }; action[mainType + 'Id'] = mapOrGeoModel.id; return action; } controller.off('pan').on('pan', function (e) { this._mouseDownFlag = false; updateViewOnPan(controllerHost, e.dx, e.dy); api.dispatchAction(extend(makeActionBase(), { dx: e.dx, dy: e.dy })); }, this); controller.off('zoom').on('zoom', function (e) { this._mouseDownFlag = false; updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY); api.dispatchAction(extend(makeActionBase(), { zoom: e.scale, originX: e.originX, originY: e.originY })); }, this); controller.setPointerChecker(function (e, x, y) { return geo.containPoint([x, y]) && !onIrrelevantElement(e, api, mapOrGeoModel); }); }; /** * FIXME: this is a temporarily workaround. * When `geoRoam` the elements need to be reset in `MapView['render']`, because the props like * `ignore` might have been modified by `LabelManager`, and `LabelManager#addLabelsOfSeries` * will subsequently cache `defaultAttr` like `ignore`. If do not do this reset, the modified * props will have no chance to be restored. * Note: this reset should be after `clearStates` in `renderSeries` becuase `useStates` in * `renderSeries` will cache the modified `ignore` to `el._normalState`. * TODO: * Use clone/immutable in `LabelManager`? */ MapDraw.prototype.resetForLabelLayout = function () { this.group.traverse(function (el) { var label = el.getTextContent(); if (label) { label.ignore = mapLabelRaw(label).ignore; } }); }; MapDraw.prototype._updateMapSelectHandler = function (mapOrGeoModel, regionsGroup, api, fromView) { var mapDraw = this; regionsGroup.off('mousedown'); regionsGroup.off('click'); // @ts-ignore FIXME:TS resolve type conflict if (mapOrGeoModel.get('selectedMode')) { regionsGroup.on('mousedown', function () { mapDraw._mouseDownFlag = true; }); regionsGroup.on('click', function (e) { if (!mapDraw._mouseDownFlag) { return; } mapDraw._mouseDownFlag = false; }); } }; return MapDraw; }(); function applyOptionStyleForRegion(viewBuildCtx, el, dataIndex, regionModel) { // All of the path are using `itemStyle`, becuase // (1) Some SVG also use fill on polyline (The different between // polyline and polygon is "open" or "close" but not fill or not). // (2) For the common props like opacity, if some use itemStyle // and some use `lineStyle`, it might confuse users. // (3) Most SVG use , where can not detect wether draw a "line" // or a filled shape, so use `itemStyle` for . var normalStyleModel = regionModel.getModel('itemStyle'); var emphasisStyleModel = regionModel.getModel(['emphasis', 'itemStyle']); var blurStyleModel = regionModel.getModel(['blur', 'itemStyle']); var selectStyleModel = regionModel.getModel(['select', 'itemStyle']); // NOTE: DONT use 'style' in visual when drawing map. // This component is used for drawing underlying map for both geo component and map series. var normalStyle = getFixedItemStyle(normalStyleModel); var emphasisStyle = getFixedItemStyle(emphasisStyleModel); var selectStyle = getFixedItemStyle(selectStyleModel); var blurStyle = getFixedItemStyle(blurStyleModel); // Update the itemStyle if has data visual var data = viewBuildCtx.data; if (data) { // Only visual color of each item will be used. It can be encoded by visualMap // But visual color of series is used in symbol drawing // Visual color for each series is for the symbol draw var style = data.getItemVisual(dataIndex, 'style'); var decal = data.getItemVisual(dataIndex, 'decal'); if (viewBuildCtx.isVisualEncodedByVisualMap && style.fill) { normalStyle.fill = style.fill; } if (decal) { normalStyle.decal = createOrUpdatePatternFromDecal(decal, viewBuildCtx.api); } } // SVG text, tspan and image can be named but not supporeted // to be styled by region option yet. el.setStyle(normalStyle); el.style.strokeNoScale = true; el.ensureState('emphasis').style = emphasisStyle; el.ensureState('select').style = selectStyle; el.ensureState('blur').style = blurStyle; // Enable blur setDefaultStateProxy(el); } function resetLabelForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel, // Exist only if `viewBuildCtx.data` exists. dataIdx, // If labelXY not provided, use `textConfig.position: 'inside'` labelXY) { var data = viewBuildCtx.data; var isGeo = viewBuildCtx.isGeo; var isDataNaN = data && isNaN(data.get(data.mapDimension('value'), dataIdx)); var itemLayout = data && data.getItemLayout(dataIdx); // In the following cases label will be drawn // 1. In map series and data value is NaN // 2. In geo component // 3. Region has no series legendSymbol, which will be add a showLabel flag in mapSymbolLayout if (isGeo || isDataNaN || itemLayout && itemLayout.showLabel) { var query = !isGeo ? dataIdx : regionName; var labelFetcher = void 0; // Consider dataIdx not found. if (!data || dataIdx >= 0) { labelFetcher = mapOrGeoModel; } var specifiedTextOpt = labelXY ? { normal: { align: 'center', verticalAlign: 'middle' } } : null; // Caveat: must be called after `setDefaultStateProxy(el);` called. // because textContent will be assign with `el.stateProxy` inside. setLabelStyle(el, getLabelStatesModels(regionModel), { labelFetcher: labelFetcher, labelDataIndex: query, defaultText: regionName }, specifiedTextOpt); var textEl = el.getTextContent(); if (textEl) { mapLabelRaw(textEl).ignore = textEl.ignore; if (el.textConfig) { if (labelXY) { // Compute a relative offset based on the el bounding rect. var rect = el.getBoundingRect().clone(); el.textConfig.position = [(labelXY[0] - rect.x) / rect.width * 100 + '%', (labelXY[1] - rect.y) / rect.height * 100 + '%']; } } } enableLayoutLayoutFeatures(el, dataIdx, null); el.disableLabelAnimation = true; } else { el.removeTextContent(); el.removeTextConfig(); el.disableLabelAnimation = null; } } function resetEventTriggerForRegion(viewBuildCtx, eventTrigger, regionName, regionModel, mapOrGeoModel, // Exist only if `viewBuildCtx.data` exists. dataIdx) { // setItemGraphicEl, setHoverStyle after all polygons and labels // are added to the rigionGroup if (viewBuildCtx.data) { // FIXME: when series-map use a SVG map, and there are duplicated name specified // on different SVG elements, after `data.setItemGraphicEl(...)`: // (1) all of them will be mounted with `dataIndex`, `seriesIndex`, so that tooltip // can be triggered only mouse hover. That's correct. // (2) only the last element will be kept in `data`, so that if trigger tooltip // by `dispatchAction`, only the last one can be found and triggered. That might be // not correct. We will fix it in future if anyone demanding that. viewBuildCtx.data.setItemGraphicEl(dataIdx, eventTrigger); } // series-map will not trigger "geoselectchange" no matter it is // based on a declared geo component. Becuause series-map will // trigger "selectchange". If it trigger both the two events, // If users call `chart.dispatchAction({type: 'toggleSelect'})`, // it not easy to also fire event "geoselectchanged". else { // Package custom mouse event for geo component getECData(eventTrigger).eventData = { componentType: 'geo', componentIndex: mapOrGeoModel.componentIndex, geoIndex: mapOrGeoModel.componentIndex, name: regionName, region: regionModel && regionModel.option || {} }; } } function resetTooltipForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel) { if (!viewBuildCtx.data) { setTooltipConfig({ el: el, componentModel: mapOrGeoModel, itemName: regionName, // @ts-ignore FIXME:TS fix the "compatible with each other"? itemTooltipOption: regionModel.get('tooltip') }); } } function resetStateTriggerForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel) { // @ts-ignore FIXME:TS fix the "compatible with each other"? el.highDownSilentOnTouch = !!mapOrGeoModel.get('selectedMode'); // @ts-ignore FIXME:TS fix the "compatible with each other"? var emphasisModel = regionModel.getModel('emphasis'); var focus = emphasisModel.get('focus'); enableHoverEmphasis(el, focus, emphasisModel.get('blurScope')); if (viewBuildCtx.isGeo) { enableComponentHighDownFeatures(el, mapOrGeoModel, regionName); } return focus; } // @ts-ignore FIXME:TS fix the "compatible with each other"? var MapView = /** @class */ function (_super) { __extends(MapView, _super); function MapView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = MapView.type; return _this; } MapView.prototype.render = function (mapModel, ecModel, api, payload) { // Not render if it is an toggleSelect action from self if (payload && payload.type === 'mapToggleSelect' && payload.from === this.uid) { return; } var group = this.group; group.removeAll(); if (mapModel.getHostGeoModel()) { return; } if (this._mapDraw && payload && payload.type === 'geoRoam') { this._mapDraw.resetForLabelLayout(); } // Not update map if it is an roam action from self if (!(payload && payload.type === 'geoRoam' && payload.componentType === 'series' && payload.seriesId === mapModel.id)) { if (mapModel.needsDrawMap) { var mapDraw = this._mapDraw || new MapDraw(api); group.add(mapDraw.group); mapDraw.draw(mapModel, ecModel, api, this, payload); this._mapDraw = mapDraw; } else { // Remove drawed map this._mapDraw && this._mapDraw.remove(); this._mapDraw = null; } } else { var mapDraw = this._mapDraw; mapDraw && group.add(mapDraw.group); } mapModel.get('showLegendSymbol') && ecModel.getComponent('legend') && this._renderSymbols(mapModel, ecModel, api); }; MapView.prototype.remove = function () { this._mapDraw && this._mapDraw.remove(); this._mapDraw = null; this.group.removeAll(); }; MapView.prototype.dispose = function () { this._mapDraw && this._mapDraw.remove(); this._mapDraw = null; }; MapView.prototype._renderSymbols = function (mapModel, ecModel, api) { var originalData = mapModel.originalData; var group = this.group; originalData.each(originalData.mapDimension('value'), function (value, originalDataIndex) { if (isNaN(value)) { return; } var layout = originalData.getItemLayout(originalDataIndex); if (!layout || !layout.point) { // Not exists in map return; } var point = layout.point; var offset = layout.offset; var circle = new Circle({ style: { // Because the special of map draw. // Which needs statistic of multiple series and draw on one map. // And each series also need a symbol with legend color // // Layout and visual are put one the different data // TODO fill: mapModel.getData().getVisual('style').fill }, shape: { cx: point[0] + offset * 9, cy: point[1], r: 3 }, silent: true, // Do not overlap the first series, on which labels are displayed. z2: 8 + (!offset ? Z2_EMPHASIS_LIFT + 1 : 0) }); // Only the series that has the first value on the same region is in charge of rendering the label. // But consider the case: // series: [ // {id: 'X', type: 'map', map: 'm', {data: [{name: 'A', value: 11}, {name: 'B', {value: 22}]}, // {id: 'Y', type: 'map', map: 'm', {data: [{name: 'A', value: 21}, {name: 'C', {value: 33}]} // ] // The offset `0` of item `A` is at series `X`, but of item `C` is at series `Y`. // For backward compatibility, we follow the rule that render label `A` by the // settings on series `X` but render label `C` by the settings on series `Y`. if (!offset) { var fullData = mapModel.mainSeries.getData(); var name_1 = originalData.getName(originalDataIndex); var fullIndex_1 = fullData.indexOfName(name_1); var itemModel = originalData.getItemModel(originalDataIndex); var labelModel = itemModel.getModel('label'); var regionGroup = fullData.getItemGraphicEl(fullIndex_1); // `getFormattedLabel` needs to use `getData` inside. Here // `mapModel.getData()` is shallow cloned from `mainSeries.getData()`. // FIXME // If this is not the `mainSeries`, the item model (like label formatter) // set on original data item will never get. But it has been working // like that from the begining, and this scenario is rarely encountered. // So it won't be fixed until have to. setLabelStyle(circle, getLabelStatesModels(itemModel), { labelFetcher: { getFormattedLabel: function (idx, state) { return mapModel.getFormattedLabel(fullIndex_1, state); } } }); circle.disableLabelAnimation = true; if (!labelModel.get('position')) { circle.setTextConfig({ position: 'bottom' }); } regionGroup.onHoverStateChange = function (toState) { setStatesFlag(circle, toState); }; } group.add(circle); }); }; MapView.type = 'map'; return MapView; }(ChartView); var MapSeries = /** @class */ function (_super) { __extends(MapSeries, _super); function MapSeries() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = MapSeries.type; // Only first map series of same mapType will drawMap. _this.needsDrawMap = false; // Group of all map series with same mapType _this.seriesGroup = []; _this.getTooltipPosition = function (dataIndex) { if (dataIndex != null) { var name_1 = this.getData().getName(dataIndex); var geo = this.coordinateSystem; var region = geo.getRegion(name_1); return region && geo.dataToPoint(region.getCenter()); } }; return _this; } MapSeries.prototype.getInitialData = function (option) { var data = createListSimply(this, { coordDimensions: ['value'], encodeDefaulter: curry(makeSeriesEncodeForNameBased, this) }); var dataNameMap = createHashMap(); var toAppendNames = []; for (var i = 0, len = data.count(); i < len; i++) { var name_2 = data.getName(i); dataNameMap.set(name_2, true); } var geoSource = geoSourceManager.load(this.getMapType(), this.option.nameMap, this.option.nameProperty); each(geoSource.regions, function (region) { var name = region.name; if (!dataNameMap.get(name)) { toAppendNames.push(name); } }); // Complete data with missing regions. The consequent processes (like visual // map and render) can not be performed without a "full data". For example, // find `dataIndex` by name. data.appendValues([], toAppendNames); return data; }; /** * If no host geo model, return null, which means using a * inner exclusive geo model. */ MapSeries.prototype.getHostGeoModel = function () { var geoIndex = this.option.geoIndex; return geoIndex != null ? this.ecModel.getComponent('geo', geoIndex) : null; }; MapSeries.prototype.getMapType = function () { return (this.getHostGeoModel() || this).option.map; }; // _fillOption(option, mapName) { // Shallow clone // option = zrUtil.extend({}, option); // option.data = geoCreator.getFilledRegions(option.data, mapName, option.nameMap); // return option; // } MapSeries.prototype.getRawValue = function (dataIndex) { // Use value stored in data instead because it is calculated from multiple series // FIXME Provide all value of multiple series ? var data = this.getData(); return data.get(data.mapDimension('value'), dataIndex); }; /** * Get model of region */ MapSeries.prototype.getRegionModel = function (regionName) { var data = this.getData(); return data.getItemModel(data.indexOfName(regionName)); }; /** * Map tooltip formatter */ MapSeries.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { // FIXME orignalData and data is a bit confusing var data = this.getData(); var value = this.getRawValue(dataIndex); var name = data.getName(dataIndex); var seriesGroup = this.seriesGroup; var seriesNames = []; for (var i = 0; i < seriesGroup.length; i++) { var otherIndex = seriesGroup[i].originalData.indexOfName(name); var valueDim = data.mapDimension('value'); if (!isNaN(seriesGroup[i].originalData.get(valueDim, otherIndex))) { seriesNames.push(seriesGroup[i].name); } } return createTooltipMarkup('section', { header: seriesNames.join(', '), noHeader: !seriesNames.length, blocks: [createTooltipMarkup('nameValue', { name: name, value: value })] }); }; MapSeries.prototype.setZoom = function (zoom) { this.option.zoom = zoom; }; MapSeries.prototype.setCenter = function (center) { this.option.center = center; }; MapSeries.prototype.getLegendIcon = function (opt) { var symbolType = opt.symbolType || 'roundRect'; var symbol = createSymbol(symbolType, 0, 0, opt.itemWidth, opt.itemHeight, opt.itemStyle.fill, opt.symbolKeepAspect); symbol.setStyle(opt.itemStyle); // Map do not use itemStyle.borderWidth as border width symbol.style.stroke = 'none'; if (symbolType.indexOf('empty') > -1) { symbol.style.stroke = symbol.style.fill; symbol.style.fill = '#fff'; symbol.style.lineWidth = 2; } return symbol; }; MapSeries.type = 'series.map'; MapSeries.dependencies = ['geo']; MapSeries.layoutMode = 'box'; MapSeries.defaultOption = { // 一级层叠 zlevel: 0, // 二级层叠 z: 2, coordinateSystem: 'geo', // map should be explicitly specified since ec3. map: '', // If `geoIndex` is not specified, a exclusive geo will be // created. Otherwise use the specified geo component, and // `map` and `mapType` are ignored. // geoIndex: 0, // 'center' | 'left' | 'right' | 'x%' | {number} left: 'center', // 'center' | 'top' | 'bottom' | 'x%' | {number} top: 'center', // right // bottom // width: // height // Aspect is width / height. Inited to be geoJson bbox aspect // This parameter is used for scale this aspect // Default value: // for geoSVG source: 1, // for geoJSON source: 0.75. aspectScale: null, ///// Layout with center and size // If you wan't to put map in a fixed size box with right aspect ratio // This two properties may more conveninet // layoutCenter: [50%, 50%] // layoutSize: 100 showLegendSymbol: true, // Define left-top, right-bottom coords to control view // For example, [ [180, 90], [-180, -90] ], // higher priority than center and zoom boundingCoords: null, // Default on center of map center: null, zoom: 1, scaleLimit: null, selectedMode: true, label: { show: false, color: '#000' }, // scaleLimit: null, itemStyle: { borderWidth: 0.5, borderColor: '#444', areaColor: '#eee' }, emphasis: { label: { show: true, color: 'rgb(100,0,0)' }, itemStyle: { areaColor: 'rgba(255,215,0,0.8)' } }, select: { label: { show: true, color: 'rgb(100,0,0)' }, itemStyle: { color: 'rgba(255,215,0,0.8)' } }, nameProperty: 'name' }; return MapSeries; }(SeriesModel); function dataStatistics(datas, statisticType) { var dataNameMap = {}; each(datas, function (data) { data.each(data.mapDimension('value'), function (value, idx) { // Add prefix to avoid conflict with Object.prototype. var mapKey = 'ec-' + data.getName(idx); dataNameMap[mapKey] = dataNameMap[mapKey] || []; if (!isNaN(value)) { dataNameMap[mapKey].push(value); } }); }); return datas[0].map(datas[0].mapDimension('value'), function (value, idx) { var mapKey = 'ec-' + datas[0].getName(idx); var sum = 0; var min = Infinity; var max = -Infinity; var len = dataNameMap[mapKey].length; for (var i = 0; i < len; i++) { min = Math.min(min, dataNameMap[mapKey][i]); max = Math.max(max, dataNameMap[mapKey][i]); sum += dataNameMap[mapKey][i]; } var result; if (statisticType === 'min') { result = min; } else if (statisticType === 'max') { result = max; } else if (statisticType === 'average') { result = sum / len; } else { result = sum; } return len === 0 ? NaN : result; }); } function mapDataStatistic(ecModel) { var seriesGroups = {}; ecModel.eachSeriesByType('map', function (seriesModel) { var hostGeoModel = seriesModel.getHostGeoModel(); var key = hostGeoModel ? 'o' + hostGeoModel.id : 'i' + seriesModel.getMapType(); (seriesGroups[key] = seriesGroups[key] || []).push(seriesModel); }); each(seriesGroups, function (seriesList, key) { var data = dataStatistics(map(seriesList, function (seriesModel) { return seriesModel.getData(); }), seriesList[0].get('mapValueCalculation')); for (var i = 0; i < seriesList.length; i++) { seriesList[i].originalData = seriesList[i].getData(); } // FIXME Put where? for (var i = 0; i < seriesList.length; i++) { seriesList[i].seriesGroup = seriesList; seriesList[i].needsDrawMap = i === 0 && !seriesList[i].getHostGeoModel(); seriesList[i].setData(data.cloneShallow()); seriesList[i].mainSeries = seriesList[0]; } }); } function mapSymbolLayout(ecModel) { var processedMapType = {}; ecModel.eachSeriesByType('map', function (mapSeries) { var mapType = mapSeries.getMapType(); if (mapSeries.getHostGeoModel() || processedMapType[mapType]) { return; } var mapSymbolOffsets = {}; each(mapSeries.seriesGroup, function (subMapSeries) { var geo = subMapSeries.coordinateSystem; var data = subMapSeries.originalData; if (subMapSeries.get('showLegendSymbol') && ecModel.getComponent('legend')) { data.each(data.mapDimension('value'), function (value, idx) { var name = data.getName(idx); var region = geo.getRegion(name); // If input series.data is [11, 22, '-'/null/undefined, 44], // it will be filled with NaN: [11, 22, NaN, 44] and NaN will // not be drawn. So here must validate if value is NaN. if (!region || isNaN(value)) { return; } var offset = mapSymbolOffsets[name] || 0; var point = geo.dataToPoint(region.getCenter()); mapSymbolOffsets[name] = offset + 1; data.setItemLayout(idx, { point: point, offset: offset }); }); } }); // Show label of those region not has legendSymbol(which is offset 0) var data = mapSeries.getData(); data.each(function (idx) { var name = data.getName(idx); var layout = data.getItemLayout(idx) || {}; layout.showLabel = !mapSymbolOffsets[name]; data.setItemLayout(idx, layout); }); processedMapType[mapType] = true; }); } var v2ApplyTransform = applyTransform; var View = /** @class */ function (_super) { __extends(View, _super); function View(name) { var _this = _super.call(this) || this; _this.type = 'view'; _this.dimensions = ['x', 'y']; /** * Represents the transform brought by roam/zoom. * If `View['_viewRect']` applies roam transform, * we can get the final displayed rect. */ _this._roamTransformable = new Transformable(); /** * Represents the transform from `View['_rect']` to `View['_viewRect']`. */ _this._rawTransformable = new Transformable(); _this.name = name; return _this; } View.prototype.setBoundingRect = function (x, y, width, height) { this._rect = new BoundingRect(x, y, width, height); return this._rect; }; /** * @return {module:zrender/core/BoundingRect} */ View.prototype.getBoundingRect = function () { return this._rect; }; View.prototype.setViewRect = function (x, y, width, height) { this._transformTo(x, y, width, height); this._viewRect = new BoundingRect(x, y, width, height); }; /** * Transformed to particular position and size */ View.prototype._transformTo = function (x, y, width, height) { var rect = this.getBoundingRect(); var rawTransform = this._rawTransformable; rawTransform.transform = rect.calculateTransform(new BoundingRect(x, y, width, height)); var rawParent = rawTransform.parent; rawTransform.parent = null; rawTransform.decomposeTransform(); rawTransform.parent = rawParent; this._updateTransform(); }; /** * Set center of view */ View.prototype.setCenter = function (centerCoord) { if (!centerCoord) { return; } this._center = centerCoord; this._updateCenterAndZoom(); }; View.prototype.setZoom = function (zoom) { zoom = zoom || 1; var zoomLimit = this.zoomLimit; if (zoomLimit) { if (zoomLimit.max != null) { zoom = Math.min(zoomLimit.max, zoom); } if (zoomLimit.min != null) { zoom = Math.max(zoomLimit.min, zoom); } } this._zoom = zoom; this._updateCenterAndZoom(); }; /** * Get default center without roam */ View.prototype.getDefaultCenter = function () { // Rect before any transform var rawRect = this.getBoundingRect(); var cx = rawRect.x + rawRect.width / 2; var cy = rawRect.y + rawRect.height / 2; return [cx, cy]; }; View.prototype.getCenter = function () { return this._center || this.getDefaultCenter(); }; View.prototype.getZoom = function () { return this._zoom || 1; }; View.prototype.getRoamTransform = function () { return this._roamTransformable.getLocalTransform(); }; /** * Remove roam */ View.prototype._updateCenterAndZoom = function () { // Must update after view transform updated var rawTransformMatrix = this._rawTransformable.getLocalTransform(); var roamTransform = this._roamTransformable; var defaultCenter = this.getDefaultCenter(); var center = this.getCenter(); var zoom = this.getZoom(); center = applyTransform([], center, rawTransformMatrix); defaultCenter = applyTransform([], defaultCenter, rawTransformMatrix); roamTransform.originX = center[0]; roamTransform.originY = center[1]; roamTransform.x = defaultCenter[0] - center[0]; roamTransform.y = defaultCenter[1] - center[1]; roamTransform.scaleX = roamTransform.scaleY = zoom; this._updateTransform(); }; /** * Update transform props on `this` based on the current * `this._roamTransformable` and `this._rawTransformable`. */ View.prototype._updateTransform = function () { var roamTransformable = this._roamTransformable; var rawTransformable = this._rawTransformable; rawTransformable.parent = roamTransformable; roamTransformable.updateTransform(); rawTransformable.updateTransform(); copy$1(this.transform || (this.transform = []), rawTransformable.transform || create$1()); this._rawTransform = rawTransformable.getLocalTransform(); this.invTransform = this.invTransform || []; invert(this.invTransform, this.transform); this.decomposeTransform(); }; View.prototype.getTransformInfo = function () { var rawTransformable = this._rawTransformable; var roamTransformable = this._roamTransformable; // Becuase roamTransformabel has `originX/originY` modified, // but the caller of `getTransformInfo` can not handle `originX/originY`, // so need to recalcualte them. var dummyTransformable = new Transformable(); dummyTransformable.transform = roamTransformable.transform; dummyTransformable.decomposeTransform(); return { roam: { x: dummyTransformable.x, y: dummyTransformable.y, scaleX: dummyTransformable.scaleX, scaleY: dummyTransformable.scaleY }, raw: { x: rawTransformable.x, y: rawTransformable.y, scaleX: rawTransformable.scaleX, scaleY: rawTransformable.scaleY } }; }; View.prototype.getViewRect = function () { return this._viewRect; }; /** * Get view rect after roam transform */ View.prototype.getViewRectAfterRoam = function () { var rect = this.getBoundingRect().clone(); rect.applyTransform(this.transform); return rect; }; /** * Convert a single (lon, lat) data item to (x, y) point. */ View.prototype.dataToPoint = function (data, noRoam, out) { var transform = noRoam ? this._rawTransform : this.transform; out = out || []; return transform ? v2ApplyTransform(out, data, transform) : copy(out, data); }; /** * Convert a (x, y) point to (lon, lat) data */ View.prototype.pointToData = function (point) { var invTransform = this.invTransform; return invTransform ? v2ApplyTransform([], point, invTransform) : [point[0], point[1]]; }; View.prototype.convertToPixel = function (ecModel, finder, value) { var coordSys = getCoordSys(finder); return coordSys === this ? coordSys.dataToPoint(value) : null; }; View.prototype.convertFromPixel = function (ecModel, finder, pixel) { var coordSys = getCoordSys(finder); return coordSys === this ? coordSys.pointToData(pixel) : null; }; /** * @implements */ View.prototype.containPoint = function (point) { return this.getViewRectAfterRoam().contain(point[0], point[1]); }; View.dimensions = ['x', 'y']; return View; }(Transformable); function getCoordSys(finder) { var seriesModel = finder.seriesModel; return seriesModel ? seriesModel.coordinateSystem : null; // e.g., graph. } var GEO_DEFAULT_PARAMS = { 'geoJSON': { aspectScale: 0.75, invertLongitute: true }, 'geoSVG': { aspectScale: 1, invertLongitute: false } }; var Geo = /** @class */ function (_super) { __extends(Geo, _super); function Geo(name, map, opt) { var _this = _super.call(this, name) || this; _this.dimensions = ['lng', 'lat']; _this.type = 'geo'; // Only store specified name coord via `addGeoCoord`. _this._nameCoordMap = createHashMap(); _this.map = map; var source = geoSourceManager.load(map, opt.nameMap, opt.nameProperty); var resource = geoSourceManager.getGeoResource(map); _this.resourceType = resource ? resource.type : null; var defaultParmas = GEO_DEFAULT_PARAMS[resource.type]; _this._regionsMap = source.regionsMap; _this._invertLongitute = defaultParmas.invertLongitute; _this.regions = source.regions; _this.aspectScale = retrieve2(opt.aspectScale, defaultParmas.aspectScale); var boundingRect = source.boundingRect; _this.setBoundingRect(boundingRect.x, boundingRect.y, boundingRect.width, boundingRect.height); return _this; } /** * Whether contain the given [lng, lat] coord. */ // Never used yet. // containCoord(coord: number[]) { // const regions = this.regions; // for (let i = 0; i < regions.length; i++) { // const region = regions[i]; // if (region.type === 'geoJSON' && (region as GeoJSONRegion).contain(coord)) { // return true; // } // } // return false; // } Geo.prototype._transformTo = function (x, y, width, height) { var rect = this.getBoundingRect(); var invertLongitute = this._invertLongitute; rect = rect.clone(); if (invertLongitute) { // Longitute is inverted rect.y = -rect.y - rect.height; } var rawTransformable = this._rawTransformable; rawTransformable.transform = rect.calculateTransform(new BoundingRect(x, y, width, height)); var rawParent = rawTransformable.parent; rawTransformable.parent = null; rawTransformable.decomposeTransform(); rawTransformable.parent = rawParent; if (invertLongitute) { rawTransformable.scaleY = -rawTransformable.scaleY; } this._updateTransform(); }; Geo.prototype.getRegion = function (name) { return this._regionsMap.get(name); }; Geo.prototype.getRegionByCoord = function (coord) { var regions = this.regions; for (var i = 0; i < regions.length; i++) { var region = regions[i]; if (region.type === 'geoJSON' && region.contain(coord)) { return regions[i]; } } }; /** * Add geoCoord for indexing by name */ Geo.prototype.addGeoCoord = function (name, geoCoord) { this._nameCoordMap.set(name, geoCoord); }; /** * Get geoCoord by name */ Geo.prototype.getGeoCoord = function (name) { var region = this._regionsMap.get(name); // calcualte center only on demand. return this._nameCoordMap.get(name) || region && region.getCenter(); }; Geo.prototype.dataToPoint = function (data, noRoam, out) { if (typeof data === 'string') { // Map area name to geoCoord data = this.getGeoCoord(data); } if (data) { return View.prototype.dataToPoint.call(this, data, noRoam, out); } }; Geo.prototype.convertToPixel = function (ecModel, finder, value) { var coordSys = getCoordSys$1(finder); return coordSys === this ? coordSys.dataToPoint(value) : null; }; Geo.prototype.convertFromPixel = function (ecModel, finder, pixel) { var coordSys = getCoordSys$1(finder); return coordSys === this ? coordSys.pointToData(pixel) : null; }; return Geo; }(View); mixin(Geo, View); function getCoordSys$1(finder) { var geoModel = finder.geoModel; var seriesModel = finder.seriesModel; return geoModel ? geoModel.coordinateSystem : seriesModel ? seriesModel.coordinateSystem // For map series. || (seriesModel.getReferringComponents('geo', SINGLE_REFERRING).models[0] || {}).coordinateSystem : null; } /** * Resize method bound to the geo */ function resizeGeo(geoModel, api) { var boundingCoords = geoModel.get('boundingCoords'); if (boundingCoords != null) { var leftTop = boundingCoords[0]; var rightBottom = boundingCoords[1]; if (isNaN(leftTop[0]) || isNaN(leftTop[1]) || isNaN(rightBottom[0]) || isNaN(rightBottom[1])) { if ("development" !== 'production') { console.error('Invalid boundingCoords'); } } else { this.setBoundingRect(leftTop[0], leftTop[1], rightBottom[0] - leftTop[0], rightBottom[1] - leftTop[1]); } } var rect = this.getBoundingRect(); var centerOption = geoModel.get('layoutCenter'); var sizeOption = geoModel.get('layoutSize'); var viewWidth = api.getWidth(); var viewHeight = api.getHeight(); var aspect = rect.width / rect.height * this.aspectScale; var useCenterAndSize = false; var center; var size; if (centerOption && sizeOption) { center = [parsePercent$1(centerOption[0], viewWidth), parsePercent$1(centerOption[1], viewHeight)]; size = parsePercent$1(sizeOption, Math.min(viewWidth, viewHeight)); if (!isNaN(center[0]) && !isNaN(center[1]) && !isNaN(size)) { useCenterAndSize = true; } else { if ("development" !== 'production') { console.warn('Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead.'); } } } var viewRect; if (useCenterAndSize) { viewRect = {}; if (aspect > 1) { // Width is same with size viewRect.width = size; viewRect.height = size / aspect; } else { viewRect.height = size; viewRect.width = size * aspect; } viewRect.y = center[1] - viewRect.height / 2; viewRect.x = center[0] - viewRect.width / 2; } else { // Use left/top/width/height var boxLayoutOption = geoModel.getBoxLayoutParams(); boxLayoutOption.aspect = aspect; viewRect = getLayoutRect(boxLayoutOption, { width: viewWidth, height: viewHeight }); } this.setViewRect(viewRect.x, viewRect.y, viewRect.width, viewRect.height); this.setCenter(geoModel.get('center')); this.setZoom(geoModel.get('zoom')); } // Back compat for ECharts2, where the coord map is set on map series: // {type: 'map', geoCoord: {'cityA': [116.46,39.92], 'cityA': [119.12,24.61]}}, function setGeoCoords(geo, model) { each(model.get('geoCoord'), function (geoCoord, name) { geo.addGeoCoord(name, geoCoord); }); } var GeoCreator = /** @class */ function () { function GeoCreator() { // For deciding which dimensions to use when creating list data this.dimensions = Geo.prototype.dimensions; } GeoCreator.prototype.create = function (ecModel, api) { var geoList = []; // FIXME Create each time may be slow ecModel.eachComponent('geo', function (geoModel, idx) { var name = geoModel.get('map'); var geo = new Geo(name + idx, name, { nameMap: geoModel.get('nameMap'), nameProperty: geoModel.get('nameProperty'), aspectScale: geoModel.get('aspectScale') }); geo.zoomLimit = geoModel.get('scaleLimit'); geoList.push(geo); // setGeoCoords(geo, geoModel); geoModel.coordinateSystem = geo; geo.model = geoModel; // Inject resize method geo.resize = resizeGeo; geo.resize(geoModel, api); }); ecModel.eachSeries(function (seriesModel) { var coordSys = seriesModel.get('coordinateSystem'); if (coordSys === 'geo') { var geoIndex = seriesModel.get('geoIndex') || 0; seriesModel.coordinateSystem = geoList[geoIndex]; } }); // If has map series var mapModelGroupBySeries = {}; ecModel.eachSeriesByType('map', function (seriesModel) { if (!seriesModel.getHostGeoModel()) { var mapType = seriesModel.getMapType(); mapModelGroupBySeries[mapType] = mapModelGroupBySeries[mapType] || []; mapModelGroupBySeries[mapType].push(seriesModel); } }); each(mapModelGroupBySeries, function (mapSeries, mapType) { var nameMapList = map(mapSeries, function (singleMapSeries) { return singleMapSeries.get('nameMap'); }); var geo = new Geo(mapType, mapType, { nameMap: mergeAll(nameMapList), nameProperty: mapSeries[0].get('nameProperty'), aspectScale: mapSeries[0].get('aspectScale') }); geo.zoomLimit = retrieve.apply(null, map(mapSeries, function (singleMapSeries) { return singleMapSeries.get('scaleLimit'); })); geoList.push(geo); // Inject resize method geo.resize = resizeGeo; geo.resize(mapSeries[0], api); each(mapSeries, function (singleMapSeries) { singleMapSeries.coordinateSystem = geo; setGeoCoords(geo, singleMapSeries); }); }); return geoList; }; /** * Fill given regions array */ GeoCreator.prototype.getFilledRegions = function (originRegionArr, mapName, nameMap, nameProperty) { // Not use the original var regionsArr = (originRegionArr || []).slice(); var dataNameMap = createHashMap(); for (var i = 0; i < regionsArr.length; i++) { dataNameMap.set(regionsArr[i].name, regionsArr[i]); } var source = geoSourceManager.load(mapName, nameMap, nameProperty); each(source.regions, function (region) { var name = region.name; !dataNameMap.get(name) && regionsArr.push({ name: name }); }); return regionsArr; }; return GeoCreator; }(); var geoCreator = new GeoCreator(); var GeoModel = /** @class */ function (_super) { __extends(GeoModel, _super); function GeoModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = GeoModel.type; return _this; } GeoModel.prototype.init = function (option, parentModel, ecModel) { var source = geoSourceManager.getGeoResource(option.map); if (source && source.type === 'geoJSON') { var itemStyle = option.itemStyle = option.itemStyle || {}; if (!('color' in itemStyle)) { itemStyle.color = '#eee'; } } this.mergeDefaultAndTheme(option, ecModel); // Default label emphasis `show` defaultEmphasis(option, 'label', ['show']); }; GeoModel.prototype.optionUpdated = function () { var _this = this; var option = this.option; option.regions = geoCreator.getFilledRegions(option.regions, option.map, option.nameMap, option.nameProperty); var selectedMap = {}; this._optionModelMap = reduce(option.regions || [], function (optionModelMap, regionOpt) { var regionName = regionOpt.name; if (regionName) { optionModelMap.set(regionName, new Model(regionOpt, _this, _this.ecModel)); if (regionOpt.selected) { selectedMap[regionName] = true; } } return optionModelMap; }, createHashMap()); if (!option.selectedMap) { option.selectedMap = selectedMap; } }; /** * Get model of region. */ GeoModel.prototype.getRegionModel = function (name) { return this._optionModelMap.get(name) || new Model(null, this, this.ecModel); }; /** * Format label * @param name Region name */ GeoModel.prototype.getFormattedLabel = function (name, status) { var regionModel = this.getRegionModel(name); var formatter = status === 'normal' ? regionModel.get(['label', 'formatter']) : regionModel.get(['emphasis', 'label', 'formatter']); var params = { name: name }; if (typeof formatter === 'function') { params.status = status; return formatter(params); } else if (typeof formatter === 'string') { return formatter.replace('{a}', name != null ? name : ''); } }; GeoModel.prototype.setZoom = function (zoom) { this.option.zoom = zoom; }; GeoModel.prototype.setCenter = function (center) { this.option.center = center; }; // PENGING If selectedMode is null ? GeoModel.prototype.select = function (name) { var option = this.option; var selectedMode = option.selectedMode; if (!selectedMode) { return; } if (selectedMode !== 'multiple') { option.selectedMap = null; } var selectedMap = option.selectedMap || (option.selectedMap = {}); selectedMap[name] = true; }; GeoModel.prototype.unSelect = function (name) { var selectedMap = this.option.selectedMap; if (selectedMap) { selectedMap[name] = false; } }; GeoModel.prototype.toggleSelected = function (name) { this[this.isSelected(name) ? 'unSelect' : 'select'](name); }; GeoModel.prototype.isSelected = function (name) { var selectedMap = this.option.selectedMap; return !!(selectedMap && selectedMap[name]); }; GeoModel.type = 'geo'; GeoModel.layoutMode = 'box'; GeoModel.defaultOption = { zlevel: 0, z: 0, show: true, left: 'center', top: 'center', // Default value: // for geoSVG source: 1, // for geoJSON source: 0.75. aspectScale: null, ///// Layout with center and size // If you wan't to put map in a fixed size box with right aspect ratio // This two properties may more conveninet // layoutCenter: [50%, 50%] // layoutSize: 100 silent: false, // Map type map: '', // Define left-top, right-bottom coords to control view // For example, [ [180, 90], [-180, -90] ] boundingCoords: null, // Default on center of map center: null, zoom: 1, scaleLimit: null, // selectedMode: false label: { show: false, color: '#000' }, itemStyle: { borderWidth: 0.5, borderColor: '#444' // Default color: // + geoJSON: #eee // + geoSVG: null (use SVG original `fill`) // color: '#eee' }, emphasis: { label: { show: true, color: 'rgb(100,0,0)' }, itemStyle: { color: 'rgba(255,215,0,0.8)' } }, select: { label: { show: true, color: 'rgb(100,0,0)' }, itemStyle: { color: 'rgba(255,215,0,0.8)' } }, regions: [] // tooltip: { // show: false // } }; return GeoModel; }(ComponentModel); /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ function updateCenterAndZoom(view, payload, zoomLimit) { var previousZoom = view.getZoom(); var center = view.getCenter(); var zoom = payload.zoom; var point = view.dataToPoint(center); if (payload.dx != null && payload.dy != null) { point[0] -= payload.dx; point[1] -= payload.dy; view.setCenter(view.pointToData(point)); } if (zoom != null) { if (zoomLimit) { var zoomMin = zoomLimit.min || 0; var zoomMax = zoomLimit.max || Infinity; zoom = Math.max(Math.min(previousZoom * zoom, zoomMax), zoomMin) / previousZoom; } // Zoom on given point(originX, originY) view.scaleX *= zoom; view.scaleY *= zoom; var fixX = (payload.originX - view.x) * (zoom - 1); var fixY = (payload.originY - view.y) * (zoom - 1); view.x -= fixX; view.y -= fixY; view.updateTransform(); // Get the new center view.setCenter(view.pointToData(point)); view.setZoom(zoom * previousZoom); } return { center: view.getCenter(), zoom: view.getZoom() }; } var GeoView = /** @class */ function (_super) { __extends(GeoView, _super); function GeoView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = GeoView.type; _this.focusBlurEnabled = true; return _this; } GeoView.prototype.init = function (ecModel, api) { var mapDraw = new MapDraw(api); this._mapDraw = mapDraw; this.group.add(mapDraw.group); this._api = api; }; GeoView.prototype.render = function (geoModel, ecModel, api, payload) { var mapDraw = this._mapDraw; if (geoModel.get('show')) { mapDraw.draw(geoModel, ecModel, api, this, payload); } else { this._mapDraw.group.removeAll(); } mapDraw.group.on('click', this._handleRegionClick, this); mapDraw.group.silent = geoModel.get('silent'); this._model = geoModel; this.updateSelectStatus(geoModel, ecModel, api); }; GeoView.prototype._handleRegionClick = function (e) { var eventData; findEventDispatcher(e.target, function (current) { return (eventData = getECData(current).eventData) != null; }, true); if (eventData) { this._api.dispatchAction({ type: 'geoToggleSelect', geoId: this._model.id, name: eventData.name }); } }; GeoView.prototype.updateSelectStatus = function (model, ecModel, api) { var _this = this; this._mapDraw.group.traverse(function (node) { var eventData = getECData(node).eventData; if (eventData) { _this._model.isSelected(eventData.name) ? api.enterSelect(node) : api.leaveSelect(node); // No need to traverse children. return true; } }); }; GeoView.prototype.findHighDownDispatchers = function (name) { return this._mapDraw && this._mapDraw.findHighDownDispatchers(name, this._model); }; GeoView.prototype.dispose = function () { this._mapDraw && this._mapDraw.remove(); }; GeoView.type = 'geo'; return GeoView; }(ComponentView); function install$9(registers) { registers.registerCoordinateSystem('geo', geoCreator); registers.registerComponentModel(GeoModel); registers.registerComponentView(GeoView); function makeAction(method, actionInfo) { actionInfo.update = 'geo:updateSelectStatus'; registers.registerAction(actionInfo, function (payload, ecModel) { var selected = {}; var allSelected = []; ecModel.eachComponent({ mainType: 'geo', query: payload }, function (geoModel) { geoModel[method](payload.name); var geo = geoModel.coordinateSystem; each(geo.regions, function (region) { selected[region.name] = geoModel.isSelected(region.name) || false; }); // Notice: there might be duplicated name in different regions. var names = []; each(selected, function (v, name) { selected[name] && names.push(name); }); allSelected.push({ geoIndex: geoModel.componentIndex, // Use singular, the same naming convention as the event `selectchanged`. name: names }); }); return { selected: selected, allSelected: allSelected, name: payload.name }; }); } makeAction('toggleSelected', { type: 'geoToggleSelect', event: 'geoselectchanged' }); makeAction('select', { type: 'geoSelect', event: 'geoselected' }); makeAction('unSelect', { type: 'geoUnSelect', event: 'geounselected' }); /** * @payload * @property {string} [componentType=series] * @property {number} [dx] * @property {number} [dy] * @property {number} [zoom] * @property {number} [originX] * @property {number} [originY] */ registers.registerAction({ type: 'geoRoam', event: 'geoRoam', update: 'updateTransform' }, function (payload, ecModel) { var componentType = payload.componentType || 'series'; ecModel.eachComponent({ mainType: componentType, query: payload }, function (componentModel) { var geo = componentModel.coordinateSystem; if (geo.type !== 'geo') { return; } var res = updateCenterAndZoom(geo, payload, componentModel.get('scaleLimit')); componentModel.setCenter && componentModel.setCenter(res.center); componentModel.setZoom && componentModel.setZoom(res.zoom); // All map series with same `map` use the same geo coordinate system // So the center and zoom must be in sync. Include the series not selected by legend if (componentType === 'series') { each(componentModel.seriesGroup, function (seriesModel) { seriesModel.setCenter(res.center); seriesModel.setZoom(res.zoom); }); } }); }); } function install$a(registers) { use(install$9); registers.registerChartView(MapView); registers.registerSeriesModel(MapSeries); registers.registerLayout(mapSymbolLayout); registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, mapDataStatistic); createLegacyDataSelectAction('map', registers.registerAction); } /** * Initialize all computational message for following algorithm. */ function init$2(inRoot) { var root = inRoot; root.hierNode = { defaultAncestor: null, ancestor: root, prelim: 0, modifier: 0, change: 0, shift: 0, i: 0, thread: null }; var nodes = [root]; var node; var children; while (node = nodes.pop()) { // jshint ignore:line children = node.children; if (node.isExpand && children.length) { var n = children.length; for (var i = n - 1; i >= 0; i--) { var child = children[i]; child.hierNode = { defaultAncestor: null, ancestor: child, prelim: 0, modifier: 0, change: 0, shift: 0, i: i, thread: null }; nodes.push(child); } } } } /** * The implementation of this function was originally copied from "d3.js" * * with some modifications made for this program. * See the license statement at the head of this file. * * Computes a preliminary x coordinate for node. Before that, this function is * applied recursively to the children of node, as well as the function * apportion(). After spacing out the children by calling executeShifts(), the * node is placed to the midpoint of its outermost children. */ function firstWalk(node, separation) { var children = node.isExpand ? node.children : []; var siblings = node.parentNode.children; var subtreeW = node.hierNode.i ? siblings[node.hierNode.i - 1] : null; if (children.length) { executeShifts(node); var midPoint = (children[0].hierNode.prelim + children[children.length - 1].hierNode.prelim) / 2; if (subtreeW) { node.hierNode.prelim = subtreeW.hierNode.prelim + separation(node, subtreeW); node.hierNode.modifier = node.hierNode.prelim - midPoint; } else { node.hierNode.prelim = midPoint; } } else if (subtreeW) { node.hierNode.prelim = subtreeW.hierNode.prelim + separation(node, subtreeW); } node.parentNode.hierNode.defaultAncestor = apportion(node, subtreeW, node.parentNode.hierNode.defaultAncestor || siblings[0], separation); } /** * The implementation of this function was originally copied from "d3.js" * * with some modifications made for this program. * See the license statement at the head of this file. * * Computes all real x-coordinates by summing up the modifiers recursively. */ function secondWalk(node) { var nodeX = node.hierNode.prelim + node.parentNode.hierNode.modifier; node.setLayout({ x: nodeX }, true); node.hierNode.modifier += node.parentNode.hierNode.modifier; } function separation(cb) { return arguments.length ? cb : defaultSeparation; } /** * Transform the common coordinate to radial coordinate. */ function radialCoordinate(rad, r) { rad -= Math.PI / 2; return { x: r * Math.cos(rad), y: r * Math.sin(rad) }; } /** * Get the layout position of the whole view. */ function getViewRect$1(seriesModel, api) { return getLayoutRect(seriesModel.getBoxLayoutParams(), { width: api.getWidth(), height: api.getHeight() }); } /** * All other shifts, applied to the smaller subtrees between w- and w+, are * performed by this function. * * The implementation of this function was originally copied from "d3.js" * * with some modifications made for this program. * See the license statement at the head of this file. */ function executeShifts(node) { var children = node.children; var n = children.length; var shift = 0; var change = 0; while (--n >= 0) { var child = children[n]; child.hierNode.prelim += shift; child.hierNode.modifier += shift; change += child.hierNode.change; shift += child.hierNode.shift + change; } } /** * The implementation of this function was originally copied from "d3.js" * * with some modifications made for this program. * See the license statement at the head of this file. * * The core of the algorithm. Here, a new subtree is combined with the * previous subtrees. Threads are used to traverse the inside and outside * contours of the left and right subtree up to the highest common level. * Whenever two nodes of the inside contours conflict, we compute the left * one of the greatest uncommon ancestors using the function nextAncestor() * and call moveSubtree() to shift the subtree and prepare the shifts of * smaller subtrees. Finally, we add a new thread (if necessary). */ function apportion(subtreeV, subtreeW, ancestor, separation) { if (subtreeW) { var nodeOutRight = subtreeV; var nodeInRight = subtreeV; var nodeOutLeft = nodeInRight.parentNode.children[0]; var nodeInLeft = subtreeW; var sumOutRight = nodeOutRight.hierNode.modifier; var sumInRight = nodeInRight.hierNode.modifier; var sumOutLeft = nodeOutLeft.hierNode.modifier; var sumInLeft = nodeInLeft.hierNode.modifier; while (nodeInLeft = nextRight(nodeInLeft), nodeInRight = nextLeft(nodeInRight), nodeInLeft && nodeInRight) { nodeOutRight = nextRight(nodeOutRight); nodeOutLeft = nextLeft(nodeOutLeft); nodeOutRight.hierNode.ancestor = subtreeV; var shift = nodeInLeft.hierNode.prelim + sumInLeft - nodeInRight.hierNode.prelim - sumInRight + separation(nodeInLeft, nodeInRight); if (shift > 0) { moveSubtree(nextAncestor(nodeInLeft, subtreeV, ancestor), subtreeV, shift); sumInRight += shift; sumOutRight += shift; } sumInLeft += nodeInLeft.hierNode.modifier; sumInRight += nodeInRight.hierNode.modifier; sumOutRight += nodeOutRight.hierNode.modifier; sumOutLeft += nodeOutLeft.hierNode.modifier; } if (nodeInLeft && !nextRight(nodeOutRight)) { nodeOutRight.hierNode.thread = nodeInLeft; nodeOutRight.hierNode.modifier += sumInLeft - sumOutRight; } if (nodeInRight && !nextLeft(nodeOutLeft)) { nodeOutLeft.hierNode.thread = nodeInRight; nodeOutLeft.hierNode.modifier += sumInRight - sumOutLeft; ancestor = subtreeV; } } return ancestor; } /** * This function is used to traverse the right contour of a subtree. * It returns the rightmost child of node or the thread of node. The function * returns null if and only if node is on the highest depth of its subtree. */ function nextRight(node) { var children = node.children; return children.length && node.isExpand ? children[children.length - 1] : node.hierNode.thread; } /** * This function is used to traverse the left contour of a subtree (or a subforest). * It returns the leftmost child of node or the thread of node. The function * returns null if and only if node is on the highest depth of its subtree. */ function nextLeft(node) { var children = node.children; return children.length && node.isExpand ? children[0] : node.hierNode.thread; } /** * If nodeInLeft’s ancestor is a sibling of node, returns nodeInLeft’s ancestor. * Otherwise, returns the specified ancestor. */ function nextAncestor(nodeInLeft, node, ancestor) { return nodeInLeft.hierNode.ancestor.parentNode === node.parentNode ? nodeInLeft.hierNode.ancestor : ancestor; } /** * The implementation of this function was originally copied from "d3.js" * * with some modifications made for this program. * See the license statement at the head of this file. * * Shifts the current subtree rooted at wr. * This is done by increasing prelim(w+) and modifier(w+) by shift. */ function moveSubtree(wl, wr, shift) { var change = shift / (wr.hierNode.i - wl.hierNode.i); wr.hierNode.change -= change; wr.hierNode.shift += shift; wr.hierNode.modifier += shift; wr.hierNode.prelim += shift; wl.hierNode.change += change; } /** * The implementation of this function was originally copied from "d3.js" * * with some modifications made for this program. * See the license statement at the head of this file. */ function defaultSeparation(node1, node2) { return node1.parentNode === node2.parentNode ? 1 : 2; } var TreeEdgeShape = /** @class */ function () { function TreeEdgeShape() { this.parentPoint = []; this.childPoints = []; } return TreeEdgeShape; }(); var TreePath = /** @class */ function (_super) { __extends(TreePath, _super); function TreePath(opts) { return _super.call(this, opts) || this; } TreePath.prototype.getDefaultStyle = function () { return { stroke: '#000', fill: null }; }; TreePath.prototype.getDefaultShape = function () { return new TreeEdgeShape(); }; TreePath.prototype.buildPath = function (ctx, shape) { var childPoints = shape.childPoints; var childLen = childPoints.length; var parentPoint = shape.parentPoint; var firstChildPos = childPoints[0]; var lastChildPos = childPoints[childLen - 1]; if (childLen === 1) { ctx.moveTo(parentPoint[0], parentPoint[1]); ctx.lineTo(firstChildPos[0], firstChildPos[1]); return; } var orient = shape.orient; var forkDim = orient === 'TB' || orient === 'BT' ? 0 : 1; var otherDim = 1 - forkDim; var forkPosition = parsePercent$1(shape.forkPosition, 1); var tmpPoint = []; tmpPoint[forkDim] = parentPoint[forkDim]; tmpPoint[otherDim] = parentPoint[otherDim] + (lastChildPos[otherDim] - parentPoint[otherDim]) * forkPosition; ctx.moveTo(parentPoint[0], parentPoint[1]); ctx.lineTo(tmpPoint[0], tmpPoint[1]); ctx.moveTo(firstChildPos[0], firstChildPos[1]); tmpPoint[forkDim] = firstChildPos[forkDim]; ctx.lineTo(tmpPoint[0], tmpPoint[1]); tmpPoint[forkDim] = lastChildPos[forkDim]; ctx.lineTo(tmpPoint[0], tmpPoint[1]); ctx.lineTo(lastChildPos[0], lastChildPos[1]); for (var i = 1; i < childLen - 1; i++) { var point = childPoints[i]; ctx.moveTo(point[0], point[1]); tmpPoint[forkDim] = point[forkDim]; ctx.lineTo(tmpPoint[0], tmpPoint[1]); } }; return TreePath; }(Path); var TreeView = /** @class */ function (_super) { __extends(TreeView, _super); function TreeView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = TreeView.type; _this._mainGroup = new Group(); return _this; } TreeView.prototype.init = function (ecModel, api) { this._controller = new RoamController(api.getZr()); this._controllerHost = { target: this.group }; this.group.add(this._mainGroup); }; TreeView.prototype.render = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var layoutInfo = seriesModel.layoutInfo; var group = this._mainGroup; var layout = seriesModel.get('layout'); if (layout === 'radial') { group.x = layoutInfo.x + layoutInfo.width / 2; group.y = layoutInfo.y + layoutInfo.height / 2; } else { group.x = layoutInfo.x; group.y = layoutInfo.y; } this._updateViewCoordSys(seriesModel); this._updateController(seriesModel, ecModel, api); var oldData = this._data; data.diff(oldData).add(function (newIdx) { if (symbolNeedsDraw$1(data, newIdx)) { // Create node and edge updateNode(data, newIdx, null, group, seriesModel); } }).update(function (newIdx, oldIdx) { var symbolEl = oldData.getItemGraphicEl(oldIdx); if (!symbolNeedsDraw$1(data, newIdx)) { symbolEl && removeNode(oldData, oldIdx, symbolEl, group, seriesModel); return; } // Update node and edge updateNode(data, newIdx, symbolEl, group, seriesModel); }).remove(function (oldIdx) { var symbolEl = oldData.getItemGraphicEl(oldIdx); // When remove a collapsed node of subtree, since the collapsed // node haven't been initialized with a symbol element, // you can't found it's symbol element through index. // so if we want to remove the symbol element we should insure // that the symbol element is not null. if (symbolEl) { removeNode(oldData, oldIdx, symbolEl, group, seriesModel); } }).execute(); this._nodeScaleRatio = seriesModel.get('nodeScaleRatio'); this._updateNodeAndLinkScale(seriesModel); if (seriesModel.get('expandAndCollapse') === true) { data.eachItemGraphicEl(function (el, dataIndex) { el.off('click').on('click', function () { api.dispatchAction({ type: 'treeExpandAndCollapse', seriesId: seriesModel.id, dataIndex: dataIndex }); }); }); } this._data = data; }; TreeView.prototype._updateViewCoordSys = function (seriesModel) { var data = seriesModel.getData(); var points = []; data.each(function (idx) { var layout = data.getItemLayout(idx); if (layout && !isNaN(layout.x) && !isNaN(layout.y)) { points.push([+layout.x, +layout.y]); } }); var min = []; var max = []; fromPoints(points, min, max); // If don't Store min max when collapse the root node after roam, // the root node will disappear. var oldMin = this._min; var oldMax = this._max; // If width or height is 0 if (max[0] - min[0] === 0) { min[0] = oldMin ? oldMin[0] : min[0] - 1; max[0] = oldMax ? oldMax[0] : max[0] + 1; } if (max[1] - min[1] === 0) { min[1] = oldMin ? oldMin[1] : min[1] - 1; max[1] = oldMax ? oldMax[1] : max[1] + 1; } var viewCoordSys = seriesModel.coordinateSystem = new View(); viewCoordSys.zoomLimit = seriesModel.get('scaleLimit'); viewCoordSys.setBoundingRect(min[0], min[1], max[0] - min[0], max[1] - min[1]); viewCoordSys.setCenter(seriesModel.get('center')); viewCoordSys.setZoom(seriesModel.get('zoom')); // Here we use viewCoordSys just for computing the 'position' and 'scale' of the group this.group.attr({ x: viewCoordSys.x, y: viewCoordSys.y, scaleX: viewCoordSys.scaleX, scaleY: viewCoordSys.scaleY }); this._min = min; this._max = max; }; TreeView.prototype._updateController = function (seriesModel, ecModel, api) { var _this = this; var controller = this._controller; var controllerHost = this._controllerHost; var group = this.group; controller.setPointerChecker(function (e, x, y) { var rect = group.getBoundingRect(); rect.applyTransform(group.transform); return rect.contain(x, y) && !onIrrelevantElement(e, api, seriesModel); }); controller.enable(seriesModel.get('roam')); controllerHost.zoomLimit = seriesModel.get('scaleLimit'); controllerHost.zoom = seriesModel.coordinateSystem.getZoom(); controller.off('pan').off('zoom').on('pan', function (e) { updateViewOnPan(controllerHost, e.dx, e.dy); api.dispatchAction({ seriesId: seriesModel.id, type: 'treeRoam', dx: e.dx, dy: e.dy }); }).on('zoom', function (e) { updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY); api.dispatchAction({ seriesId: seriesModel.id, type: 'treeRoam', zoom: e.scale, originX: e.originX, originY: e.originY }); _this._updateNodeAndLinkScale(seriesModel); // Only update label layout on zoom api.updateLabelLayout(); }); }; TreeView.prototype._updateNodeAndLinkScale = function (seriesModel) { var data = seriesModel.getData(); var nodeScale = this._getNodeGlobalScale(seriesModel); data.eachItemGraphicEl(function (el, idx) { el.setSymbolScale(nodeScale); }); }; TreeView.prototype._getNodeGlobalScale = function (seriesModel) { var coordSys = seriesModel.coordinateSystem; if (coordSys.type !== 'view') { return 1; } var nodeScaleRatio = this._nodeScaleRatio; var groupZoom = coordSys.scaleX || 1; // Scale node when zoom changes var roamZoom = coordSys.getZoom(); var nodeScale = (roamZoom - 1) * nodeScaleRatio + 1; return nodeScale / groupZoom; }; TreeView.prototype.dispose = function () { this._controller && this._controller.dispose(); this._controllerHost = null; }; TreeView.prototype.remove = function () { this._mainGroup.removeAll(); this._data = null; }; TreeView.type = 'tree'; return TreeView; }(ChartView); function symbolNeedsDraw$1(data, dataIndex) { var layout = data.getItemLayout(dataIndex); return layout && !isNaN(layout.x) && !isNaN(layout.y); } function updateNode(data, dataIndex, symbolEl, group, seriesModel) { var isInit = !symbolEl; var node = data.tree.getNodeByDataIndex(dataIndex); var itemModel = node.getModel(); var visualColor = node.getVisual('style').fill; var symbolInnerColor = node.isExpand === false && node.children.length !== 0 ? visualColor : '#fff'; var virtualRoot = data.tree.root; var source = node.parentNode === virtualRoot ? node : node.parentNode || node; var sourceSymbolEl = data.getItemGraphicEl(source.dataIndex); var sourceLayout = source.getLayout(); var sourceOldLayout = sourceSymbolEl ? { x: sourceSymbolEl.__oldX, y: sourceSymbolEl.__oldY, rawX: sourceSymbolEl.__radialOldRawX, rawY: sourceSymbolEl.__radialOldRawY } : sourceLayout; var targetLayout = node.getLayout(); if (isInit) { symbolEl = new Symbol(data, dataIndex, null, { symbolInnerColor: symbolInnerColor, useNameLabel: true }); symbolEl.x = sourceOldLayout.x; symbolEl.y = sourceOldLayout.y; } else { symbolEl.updateData(data, dataIndex, null, { symbolInnerColor: symbolInnerColor, useNameLabel: true }); } symbolEl.__radialOldRawX = symbolEl.__radialRawX; symbolEl.__radialOldRawY = symbolEl.__radialRawY; symbolEl.__radialRawX = targetLayout.rawX; symbolEl.__radialRawY = targetLayout.rawY; group.add(symbolEl); data.setItemGraphicEl(dataIndex, symbolEl); symbolEl.__oldX = symbolEl.x; symbolEl.__oldY = symbolEl.y; updateProps(symbolEl, { x: targetLayout.x, y: targetLayout.y }, seriesModel); var symbolPath = symbolEl.getSymbolPath(); if (seriesModel.get('layout') === 'radial') { var realRoot = virtualRoot.children[0]; var rootLayout = realRoot.getLayout(); var length_1 = realRoot.children.length; var rad = void 0; var isLeft = void 0; if (targetLayout.x === rootLayout.x && node.isExpand === true) { var center = { x: (realRoot.children[0].getLayout().x + realRoot.children[length_1 - 1].getLayout().x) / 2, y: (realRoot.children[0].getLayout().y + realRoot.children[length_1 - 1].getLayout().y) / 2 }; rad = Math.atan2(center.y - rootLayout.y, center.x - rootLayout.x); if (rad < 0) { rad = Math.PI * 2 + rad; } isLeft = center.x < rootLayout.x; if (isLeft) { rad = rad - Math.PI; } } else { rad = Math.atan2(targetLayout.y - rootLayout.y, targetLayout.x - rootLayout.x); if (rad < 0) { rad = Math.PI * 2 + rad; } if (node.children.length === 0 || node.children.length !== 0 && node.isExpand === false) { isLeft = targetLayout.x < rootLayout.x; if (isLeft) { rad = rad - Math.PI; } } else { isLeft = targetLayout.x > rootLayout.x; if (!isLeft) { rad = rad - Math.PI; } } } var textPosition = isLeft ? 'left' : 'right'; var normalLabelModel = itemModel.getModel('label'); var rotate = normalLabelModel.get('rotate'); var labelRotateRadian = rotate * (Math.PI / 180); var textContent = symbolPath.getTextContent(); if (textContent) { symbolPath.setTextConfig({ position: normalLabelModel.get('position') || textPosition, rotation: rotate == null ? -rad : labelRotateRadian, origin: 'center' }); textContent.setStyle('verticalAlign', 'middle'); } } // Handle status var focus = itemModel.get(['emphasis', 'focus']); var focusDataIndices = focus === 'ancestor' ? node.getAncestorsIndices() : focus === 'descendant' ? node.getDescendantIndices() : null; if (focusDataIndices) { // Modify the focus to data indices. getECData(symbolEl).focus = focusDataIndices; } drawEdge(seriesModel, node, virtualRoot, symbolEl, sourceOldLayout, sourceLayout, targetLayout, group); if (symbolEl.__edge) { symbolEl.onHoverStateChange = function (toState) { if (toState !== 'blur') { // NOTE: Ensure the parent elements will been blurred firstly. // According to the return of getAncestorsIndices and getDescendantIndices // TODO: A bit tricky. var parentEl = node.parentNode && data.getItemGraphicEl(node.parentNode.dataIndex); if (!(parentEl && parentEl.hoverState === HOVER_STATE_BLUR)) { setStatesFlag(symbolEl.__edge, toState); } } }; } } function drawEdge(seriesModel, node, virtualRoot, symbolEl, sourceOldLayout, sourceLayout, targetLayout, group) { var itemModel = node.getModel(); var edgeShape = seriesModel.get('edgeShape'); var layout = seriesModel.get('layout'); var orient = seriesModel.getOrient(); var curvature = seriesModel.get(['lineStyle', 'curveness']); var edgeForkPosition = seriesModel.get('edgeForkPosition'); var lineStyle = itemModel.getModel('lineStyle').getLineStyle(); var edge = symbolEl.__edge; if (edgeShape === 'curve') { if (node.parentNode && node.parentNode !== virtualRoot) { if (!edge) { edge = symbolEl.__edge = new BezierCurve({ shape: getEdgeShape(layout, orient, curvature, sourceOldLayout, sourceOldLayout) }); } updateProps(edge, { shape: getEdgeShape(layout, orient, curvature, sourceLayout, targetLayout) }, seriesModel); } } else if (edgeShape === 'polyline') { if (layout === 'orthogonal') { if (node !== virtualRoot && node.children && node.children.length !== 0 && node.isExpand === true) { var children = node.children; var childPoints = []; for (var i = 0; i < children.length; i++) { var childLayout = children[i].getLayout(); childPoints.push([childLayout.x, childLayout.y]); } if (!edge) { edge = symbolEl.__edge = new TreePath({ shape: { parentPoint: [targetLayout.x, targetLayout.y], childPoints: [[targetLayout.x, targetLayout.y]], orient: orient, forkPosition: edgeForkPosition } }); } updateProps(edge, { shape: { parentPoint: [targetLayout.x, targetLayout.y], childPoints: childPoints } }, seriesModel); } } else { if ("development" !== 'production') { throw new Error('The polyline edgeShape can only be used in orthogonal layout'); } } } if (edge) { edge.useStyle(defaults({ strokeNoScale: true, fill: null }, lineStyle)); setStatesStylesFromModel(edge, itemModel, 'lineStyle'); setDefaultStateProxy(edge); group.add(edge); } } function removeNode(data, dataIndex, symbolEl, group, seriesModel) { var node = data.tree.getNodeByDataIndex(dataIndex); var virtualRoot = data.tree.root; var source = node.parentNode === virtualRoot ? node : node.parentNode || node; // let edgeShape = seriesScope.edgeShape; var sourceLayout; while (sourceLayout = source.getLayout(), sourceLayout == null) { source = source.parentNode === virtualRoot ? source : source.parentNode || source; } // Use same duration and easing with update to have more consistent animation. var removeAnimationOpt = { duration: seriesModel.get('animationDurationUpdate'), easing: seriesModel.get('animationEasingUpdate') }; removeElement(symbolEl, { x: sourceLayout.x + 1, y: sourceLayout.y + 1 }, seriesModel, { cb: function () { group.remove(symbolEl); data.setItemGraphicEl(dataIndex, null); }, removeOpt: removeAnimationOpt }); symbolEl.fadeOut(null, { fadeLabel: true, animation: removeAnimationOpt }); var sourceSymbolEl = data.getItemGraphicEl(source.dataIndex); var sourceEdge = sourceSymbolEl.__edge; // 1. when expand the sub tree, delete the children node should delete the edge of // the source at the same time. because the polyline edge shape is only owned by the source. // 2.when the node is the only children of the source, delete the node should delete the edge of // the source at the same time. the same reason as above. var edge = symbolEl.__edge || (source.isExpand === false || source.children.length === 1 ? sourceEdge : undefined); var edgeShape = seriesModel.get('edgeShape'); var layoutOpt = seriesModel.get('layout'); var orient = seriesModel.get('orient'); var curvature = seriesModel.get(['lineStyle', 'curveness']); if (edge) { if (edgeShape === 'curve') { removeElement(edge, { shape: getEdgeShape(layoutOpt, orient, curvature, sourceLayout, sourceLayout), style: { opacity: 0 } }, seriesModel, { cb: function () { group.remove(edge); }, removeOpt: removeAnimationOpt }); } else if (edgeShape === 'polyline' && seriesModel.get('layout') === 'orthogonal') { removeElement(edge, { shape: { parentPoint: [sourceLayout.x, sourceLayout.y], childPoints: [[sourceLayout.x, sourceLayout.y]] }, style: { opacity: 0 } }, seriesModel, { cb: function () { group.remove(edge); }, removeOpt: removeAnimationOpt }); } } } function getEdgeShape(layoutOpt, orient, curvature, sourceLayout, targetLayout) { var cpx1; var cpy1; var cpx2; var cpy2; var x1; var x2; var y1; var y2; if (layoutOpt === 'radial') { x1 = sourceLayout.rawX; y1 = sourceLayout.rawY; x2 = targetLayout.rawX; y2 = targetLayout.rawY; var radialCoor1 = radialCoordinate(x1, y1); var radialCoor2 = radialCoordinate(x1, y1 + (y2 - y1) * curvature); var radialCoor3 = radialCoordinate(x2, y2 + (y1 - y2) * curvature); var radialCoor4 = radialCoordinate(x2, y2); return { x1: radialCoor1.x || 0, y1: radialCoor1.y || 0, x2: radialCoor4.x || 0, y2: radialCoor4.y || 0, cpx1: radialCoor2.x || 0, cpy1: radialCoor2.y || 0, cpx2: radialCoor3.x || 0, cpy2: radialCoor3.y || 0 }; } else { x1 = sourceLayout.x; y1 = sourceLayout.y; x2 = targetLayout.x; y2 = targetLayout.y; if (orient === 'LR' || orient === 'RL') { cpx1 = x1 + (x2 - x1) * curvature; cpy1 = y1; cpx2 = x2 + (x1 - x2) * curvature; cpy2 = y2; } if (orient === 'TB' || orient === 'BT') { cpx1 = x1; cpy1 = y1 + (y2 - y1) * curvature; cpx2 = x2; cpy2 = y2 + (y1 - y2) * curvature; } } return { x1: x1, y1: y1, x2: x2, y2: y2, cpx1: cpx1, cpy1: cpy1, cpx2: cpx2, cpy2: cpy2 }; } var inner$6 = makeInner(); function linkList(opt) { var mainData = opt.mainData; var datas = opt.datas; if (!datas) { datas = { main: mainData }; opt.datasAttr = { main: 'data' }; } opt.datas = opt.mainData = null; linkAll(mainData, datas, opt); // Porxy data original methods. each(datas, function (data) { each(mainData.TRANSFERABLE_METHODS, function (methodName) { data.wrapMethod(methodName, curry(transferInjection, opt)); }); }); // Beyond transfer, additional features should be added to `cloneShallow`. mainData.wrapMethod('cloneShallow', curry(cloneShallowInjection, opt)); // Only mainData trigger change, because struct.update may trigger // another changable methods, which may bring about dead lock. each(mainData.CHANGABLE_METHODS, function (methodName) { mainData.wrapMethod(methodName, curry(changeInjection, opt)); }); // Make sure datas contains mainData. assert(datas[mainData.dataType] === mainData); } function transferInjection(opt, res) { if (isMainData(this)) { // Transfer datas to new main data. var datas = extend({}, inner$6(this).datas); datas[this.dataType] = res; linkAll(res, datas, opt); } else { // Modify the reference in main data to point newData. linkSingle(res, this.dataType, inner$6(this).mainData, opt); } return res; } function changeInjection(opt, res) { opt.struct && opt.struct.update(); return res; } function cloneShallowInjection(opt, res) { // cloneShallow, which brings about some fragilities, may be inappropriate // to be exposed as an API. So for implementation simplicity we can make // the restriction that cloneShallow of not-mainData should not be invoked // outside, but only be invoked here. each(inner$6(res).datas, function (data, dataType) { data !== res && linkSingle(data.cloneShallow(), dataType, res, opt); }); return res; } /** * Supplement method to List. * * @public * @param [dataType] If not specified, return mainData. */ function getLinkedData(dataType) { var mainData = inner$6(this).mainData; return dataType == null || mainData == null ? mainData : inner$6(mainData).datas[dataType]; } /** * Get list of all linked data */ function getLinkedDataAll() { var mainData = inner$6(this).mainData; return mainData == null ? [{ data: mainData }] : map(keys(inner$6(mainData).datas), function (type) { return { type: type, data: inner$6(mainData).datas[type] }; }); } function isMainData(data) { return inner$6(data).mainData === data; } function linkAll(mainData, datas, opt) { inner$6(mainData).datas = {}; each(datas, function (data, dataType) { linkSingle(data, dataType, mainData, opt); }); } function linkSingle(data, dataType, mainData, opt) { inner$6(mainData).datas[dataType] = data; inner$6(data).mainData = mainData; data.dataType = dataType; if (opt.struct) { data[opt.structAttr] = opt.struct; opt.struct[opt.datasAttr[dataType]] = data; } // Supplement method. data.getLinkedData = getLinkedData; data.getLinkedDataAll = getLinkedDataAll; } var TreeNode = /** @class */ function () { function TreeNode(name, hostTree) { this.depth = 0; this.height = 0; /** * Reference to list item. * Do not persistent dataIndex outside, * besause it may be changed by list. * If dataIndex -1, * this node is logical deleted (filtered) in list. */ this.dataIndex = -1; this.children = []; this.viewChildren = []; this.isExpand = false; this.name = name || ''; this.hostTree = hostTree; } /** * The node is removed. */ TreeNode.prototype.isRemoved = function () { return this.dataIndex < 0; }; TreeNode.prototype.eachNode = function (options, cb, context) { if (typeof options === 'function') { context = cb; cb = options; options = null; } options = options || {}; if (isString(options)) { options = { order: options }; } var order = options.order || 'preorder'; var children = this[options.attr || 'children']; var suppressVisitSub; order === 'preorder' && (suppressVisitSub = cb.call(context, this)); for (var i = 0; !suppressVisitSub && i < children.length; i++) { children[i].eachNode(options, cb, context); } order === 'postorder' && cb.call(context, this); }; /** * Update depth and height of this subtree. */ TreeNode.prototype.updateDepthAndHeight = function (depth) { var height = 0; this.depth = depth; for (var i = 0; i < this.children.length; i++) { var child = this.children[i]; child.updateDepthAndHeight(depth + 1); if (child.height > height) { height = child.height; } } this.height = height + 1; }; TreeNode.prototype.getNodeById = function (id) { if (this.getId() === id) { return this; } for (var i = 0, children = this.children, len = children.length; i < len; i++) { var res = children[i].getNodeById(id); if (res) { return res; } } }; TreeNode.prototype.contains = function (node) { if (node === this) { return true; } for (var i = 0, children = this.children, len = children.length; i < len; i++) { var res = children[i].contains(node); if (res) { return res; } } }; /** * @param includeSelf Default false. * @return order: [root, child, grandchild, ...] */ TreeNode.prototype.getAncestors = function (includeSelf) { var ancestors = []; var node = includeSelf ? this : this.parentNode; while (node) { ancestors.push(node); node = node.parentNode; } ancestors.reverse(); return ancestors; }; TreeNode.prototype.getAncestorsIndices = function () { var indices = []; var currNode = this; while (currNode) { indices.push(currNode.dataIndex); currNode = currNode.parentNode; } indices.reverse(); return indices; }; TreeNode.prototype.getDescendantIndices = function () { var indices = []; this.eachNode(function (childNode) { indices.push(childNode.dataIndex); }); return indices; }; TreeNode.prototype.getValue = function (dimension) { var data = this.hostTree.data; return data.get(data.getDimension(dimension || 'value'), this.dataIndex); }; TreeNode.prototype.setLayout = function (layout, merge) { this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, layout, merge); }; /** * @return {Object} layout */ TreeNode.prototype.getLayout = function () { return this.hostTree.data.getItemLayout(this.dataIndex); }; // @depcrecated // getModel(path: S): Model TreeNode.prototype.getModel = function (path) { if (this.dataIndex < 0) { return; } var hostTree = this.hostTree; var itemModel = hostTree.data.getItemModel(this.dataIndex); return itemModel.getModel(path); }; // TODO: TYPE More specific model TreeNode.prototype.getLevelModel = function () { return (this.hostTree.levelModels || [])[this.depth]; }; TreeNode.prototype.setVisual = function (key, value) { this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, key, value); }; /** * Get item visual * FIXME: make return type better */ TreeNode.prototype.getVisual = function (key) { return this.hostTree.data.getItemVisual(this.dataIndex, key); }; TreeNode.prototype.getRawIndex = function () { return this.hostTree.data.getRawIndex(this.dataIndex); }; TreeNode.prototype.getId = function () { return this.hostTree.data.getId(this.dataIndex); }; /** * if this is an ancestor of another node * * @param node another node * @return if is ancestor */ TreeNode.prototype.isAncestorOf = function (node) { var parent = node.parentNode; while (parent) { if (parent === this) { return true; } parent = parent.parentNode; } return false; }; /** * if this is an descendant of another node * * @param node another node * @return if is descendant */ TreeNode.prototype.isDescendantOf = function (node) { return node !== this && node.isAncestorOf(this); }; return TreeNode; }(); var Tree = /** @class */ function () { function Tree(hostModel) { this.type = 'tree'; this._nodes = []; this.hostModel = hostModel; } Tree.prototype.eachNode = function (options, cb, context) { this.root.eachNode(options, cb, context); }; Tree.prototype.getNodeByDataIndex = function (dataIndex) { var rawIndex = this.data.getRawIndex(dataIndex); return this._nodes[rawIndex]; }; Tree.prototype.getNodeById = function (name) { return this.root.getNodeById(name); }; /** * Update item available by list, * when list has been performed options like 'filterSelf' or 'map'. */ Tree.prototype.update = function () { var data = this.data; var nodes = this._nodes; for (var i = 0, len = nodes.length; i < len; i++) { nodes[i].dataIndex = -1; } for (var i = 0, len = data.count(); i < len; i++) { nodes[data.getRawIndex(i)].dataIndex = i; } }; /** * Clear all layouts */ Tree.prototype.clearLayouts = function () { this.data.clearItemLayouts(); }; /** * data node format: * { * name: ... * value: ... * children: [ * { * name: ... * value: ... * children: ... * }, * ... * ] * } */ Tree.createTree = function (dataRoot, hostModel, beforeLink) { var tree = new Tree(hostModel); var listData = []; var dimMax = 1; buildHierarchy(dataRoot); function buildHierarchy(dataNode, parentNode) { var value = dataNode.value; dimMax = Math.max(dimMax, isArray(value) ? value.length : 1); listData.push(dataNode); var node = new TreeNode(convertOptionIdName(dataNode.name, ''), tree); parentNode ? addChild(node, parentNode) : tree.root = node; tree._nodes.push(node); var children = dataNode.children; if (children) { for (var i = 0; i < children.length; i++) { buildHierarchy(children[i], node); } } } tree.root.updateDepthAndHeight(0); var dimensionsInfo = createDimensions(listData, { coordDimensions: ['value'], dimensionsCount: dimMax }); var list = new List(dimensionsInfo, hostModel); list.initData(listData); beforeLink && beforeLink(list); linkList({ mainData: list, struct: tree, structAttr: 'tree' }); tree.update(); return tree; }; return Tree; }(); /** * It is needed to consider the mess of 'list', 'hostModel' when creating a TreeNote, * so this function is not ready and not necessary to be public. */ function addChild(child, node) { var children = node.children; if (child.parentNode === node) { return; } children.push(child); child.parentNode = node; } var TreeSeriesModel = /** @class */ function (_super) { __extends(TreeSeriesModel, _super); function TreeSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.hasSymbolVisual = true; // Do it self. _this.ignoreStyleOnData = true; return _this; } /** * Init a tree data structure from data in option series * @param option the object used to config echarts view * @return storage initial data */ TreeSeriesModel.prototype.getInitialData = function (option) { //create an virtual root var root = { name: option.name, children: option.data }; var leaves = option.leaves || {}; var leavesModel = new Model(leaves, this, this.ecModel); var tree = Tree.createTree(root, this, beforeLink); function beforeLink(nodeData) { nodeData.wrapMethod('getItemModel', function (model, idx) { var node = tree.getNodeByDataIndex(idx); if (!node.children.length || !node.isExpand) { model.parentModel = leavesModel; } return model; }); } var treeDepth = 0; tree.eachNode('preorder', function (node) { if (node.depth > treeDepth) { treeDepth = node.depth; } }); var expandAndCollapse = option.expandAndCollapse; var expandTreeDepth = expandAndCollapse && option.initialTreeDepth >= 0 ? option.initialTreeDepth : treeDepth; tree.root.eachNode('preorder', function (node) { var item = node.hostTree.data.getRawDataItem(node.dataIndex); // Add item.collapsed != null, because users can collapse node original in the series.data. node.isExpand = item && item.collapsed != null ? !item.collapsed : node.depth <= expandTreeDepth; }); return tree.data; }; /** * Make the configuration 'orient' backward compatibly, with 'horizontal = LR', 'vertical = TB'. * @returns {string} orient */ TreeSeriesModel.prototype.getOrient = function () { var orient = this.get('orient'); if (orient === 'horizontal') { orient = 'LR'; } else if (orient === 'vertical') { orient = 'TB'; } return orient; }; TreeSeriesModel.prototype.setZoom = function (zoom) { this.option.zoom = zoom; }; TreeSeriesModel.prototype.setCenter = function (center) { this.option.center = center; }; TreeSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { var tree = this.getData().tree; var realRoot = tree.root.children[0]; var node = tree.getNodeByDataIndex(dataIndex); var value = node.getValue(); var name = node.name; while (node && node !== realRoot) { name = node.parentNode.name + '.' + name; node = node.parentNode; } return createTooltipMarkup('nameValue', { name: name, value: value, noValue: isNaN(value) || value == null }); }; TreeSeriesModel.type = 'series.tree'; // can support the position parameters 'left', 'top','right','bottom', 'width', // 'height' in the setOption() with 'merge' mode normal. TreeSeriesModel.layoutMode = 'box'; TreeSeriesModel.defaultOption = { zlevel: 0, z: 2, coordinateSystem: 'view', // the position of the whole view left: '12%', top: '12%', right: '12%', bottom: '12%', // the layout of the tree, two value can be selected, 'orthogonal' or 'radial' layout: 'orthogonal', // value can be 'polyline' edgeShape: 'curve', edgeForkPosition: '50%', // true | false | 'move' | 'scale', see module:component/helper/RoamController. roam: false, // Symbol size scale ratio in roam nodeScaleRatio: 0.4, // Default on center of graph center: null, zoom: 1, orient: 'LR', symbol: 'emptyCircle', symbolSize: 7, expandAndCollapse: true, initialTreeDepth: 2, lineStyle: { color: '#ccc', width: 1.5, curveness: 0.5 }, itemStyle: { color: 'lightsteelblue', // borderColor: '#c23531', borderWidth: 1.5 }, label: { show: true }, animationEasing: 'linear', animationDuration: 700, animationDurationUpdate: 500 }; return TreeSeriesModel; }(SeriesModel); /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * Traverse the tree from bottom to top and do something */ function eachAfter(root, callback, separation) { var nodes = [root]; var next = []; var node; while (node = nodes.pop()) { // jshint ignore:line next.push(node); if (node.isExpand) { var children = node.children; if (children.length) { for (var i = 0; i < children.length; i++) { nodes.push(children[i]); } } } } while (node = next.pop()) { // jshint ignore:line callback(node, separation); } } /** * Traverse the tree from top to bottom and do something */ function eachBefore(root, callback) { var nodes = [root]; var node; while (node = nodes.pop()) { // jshint ignore:line callback(node); if (node.isExpand) { var children = node.children; if (children.length) { for (var i = children.length - 1; i >= 0; i--) { nodes.push(children[i]); } } } } } function treeLayout(ecModel, api) { ecModel.eachSeriesByType('tree', function (seriesModel) { commonLayout(seriesModel, api); }); } function commonLayout(seriesModel, api) { var layoutInfo = getViewRect$1(seriesModel, api); seriesModel.layoutInfo = layoutInfo; var layout = seriesModel.get('layout'); var width = 0; var height = 0; var separation$1 = null; if (layout === 'radial') { width = 2 * Math.PI; height = Math.min(layoutInfo.height, layoutInfo.width) / 2; separation$1 = separation(function (node1, node2) { return (node1.parentNode === node2.parentNode ? 1 : 2) / node1.depth; }); } else { width = layoutInfo.width; height = layoutInfo.height; separation$1 = separation(); } var virtualRoot = seriesModel.getData().tree.root; var realRoot = virtualRoot.children[0]; if (realRoot) { init$2(virtualRoot); eachAfter(realRoot, firstWalk, separation$1); virtualRoot.hierNode.modifier = -realRoot.hierNode.prelim; eachBefore(realRoot, secondWalk); var left_1 = realRoot; var right_1 = realRoot; var bottom_1 = realRoot; eachBefore(realRoot, function (node) { var x = node.getLayout().x; if (x < left_1.getLayout().x) { left_1 = node; } if (x > right_1.getLayout().x) { right_1 = node; } if (node.depth > bottom_1.depth) { bottom_1 = node; } }); var delta = left_1 === right_1 ? 1 : separation$1(left_1, right_1) / 2; var tx_1 = delta - left_1.getLayout().x; var kx_1 = 0; var ky_1 = 0; var coorX_1 = 0; var coorY_1 = 0; if (layout === 'radial') { kx_1 = width / (right_1.getLayout().x + delta + tx_1); // here we use (node.depth - 1), bucause the real root's depth is 1 ky_1 = height / (bottom_1.depth - 1 || 1); eachBefore(realRoot, function (node) { coorX_1 = (node.getLayout().x + tx_1) * kx_1; coorY_1 = (node.depth - 1) * ky_1; var finalCoor = radialCoordinate(coorX_1, coorY_1); node.setLayout({ x: finalCoor.x, y: finalCoor.y, rawX: coorX_1, rawY: coorY_1 }, true); }); } else { var orient_1 = seriesModel.getOrient(); if (orient_1 === 'RL' || orient_1 === 'LR') { ky_1 = height / (right_1.getLayout().x + delta + tx_1); kx_1 = width / (bottom_1.depth - 1 || 1); eachBefore(realRoot, function (node) { coorY_1 = (node.getLayout().x + tx_1) * ky_1; coorX_1 = orient_1 === 'LR' ? (node.depth - 1) * kx_1 : width - (node.depth - 1) * kx_1; node.setLayout({ x: coorX_1, y: coorY_1 }, true); }); } else if (orient_1 === 'TB' || orient_1 === 'BT') { kx_1 = width / (right_1.getLayout().x + delta + tx_1); ky_1 = height / (bottom_1.depth - 1 || 1); eachBefore(realRoot, function (node) { coorX_1 = (node.getLayout().x + tx_1) * kx_1; coorY_1 = orient_1 === 'TB' ? (node.depth - 1) * ky_1 : height - (node.depth - 1) * ky_1; node.setLayout({ x: coorX_1, y: coorY_1 }, true); }); } } } } function treeVisual(ecModel) { ecModel.eachSeriesByType('tree', function (seriesModel) { var data = seriesModel.getData(); var tree = data.tree; tree.eachNode(function (node) { var model = node.getModel(); // TODO Optimize var style = model.getModel('itemStyle').getItemStyle(); var existsStyle = data.ensureUniqueItemVisual(node.dataIndex, 'style'); extend(existsStyle, style); }); }); } function installTreeAction(registers) { registers.registerAction({ type: 'treeExpandAndCollapse', event: 'treeExpandAndCollapse', update: 'update' }, function (payload, ecModel) { ecModel.eachComponent({ mainType: 'series', subType: 'tree', query: payload }, function (seriesModel) { var dataIndex = payload.dataIndex; var tree = seriesModel.getData().tree; var node = tree.getNodeByDataIndex(dataIndex); node.isExpand = !node.isExpand; }); }); registers.registerAction({ type: 'treeRoam', event: 'treeRoam', // Here we set 'none' instead of 'update', because roam action // just need to update the transform matrix without having to recalculate // the layout. So don't need to go through the whole update process, such // as 'dataPrcocess', 'coordSystemUpdate', 'layout' and so on. update: 'none' }, function (payload, ecModel) { ecModel.eachComponent({ mainType: 'series', subType: 'tree', query: payload }, function (seriesModel) { var coordSys = seriesModel.coordinateSystem; var res = updateCenterAndZoom(coordSys, payload); seriesModel.setCenter && seriesModel.setCenter(res.center); seriesModel.setZoom && seriesModel.setZoom(res.zoom); }); }); } function install$b(registers) { registers.registerChartView(TreeView); registers.registerSeriesModel(TreeSeriesModel); registers.registerLayout(treeLayout); registers.registerVisual(treeVisual); installTreeAction(registers); } function retrieveTargetInfo(payload, validPayloadTypes, seriesModel) { if (payload && indexOf(validPayloadTypes, payload.type) >= 0) { var root = seriesModel.getData().tree.root; var targetNode = payload.targetNode; if (typeof targetNode === 'string') { targetNode = root.getNodeById(targetNode); } if (targetNode && root.contains(targetNode)) { return { node: targetNode }; } var targetNodeId = payload.targetNodeId; if (targetNodeId != null && (targetNode = root.getNodeById(targetNodeId))) { return { node: targetNode }; } } } // Not includes the given node at the last item. function getPathToRoot(node) { var path = []; while (node) { node = node.parentNode; node && path.push(node); } return path.reverse(); } function aboveViewRoot(viewRoot, node) { var viewPath = getPathToRoot(viewRoot); return indexOf(viewPath, node) >= 0; } // From root to the input node (the input node will be included). function wrapTreePathInfo(node, seriesModel) { var treePathInfo = []; while (node) { var nodeDataIndex = node.dataIndex; treePathInfo.push({ name: node.name, dataIndex: nodeDataIndex, value: seriesModel.getRawValue(nodeDataIndex) }); node = node.parentNode; } treePathInfo.reverse(); return treePathInfo; } var noop$1 = function () {}; var actionTypes = ['treemapZoomToNode', 'treemapRender', 'treemapMove']; function installTreemapAction(registers) { for (var i = 0; i < actionTypes.length; i++) { registers.registerAction({ type: actionTypes[i], update: 'updateView' }, noop$1); } registers.registerAction({ type: 'treemapRootToNode', update: 'updateView' }, function (payload, ecModel) { ecModel.eachComponent({ mainType: 'series', subType: 'treemap', query: payload }, handleRootToNode); function handleRootToNode(model, index) { var types = ['treemapZoomToNode', 'treemapRootToNode']; var targetInfo = retrieveTargetInfo(payload, types, model); if (targetInfo) { var originViewRoot = model.getViewRoot(); if (originViewRoot) { payload.direction = aboveViewRoot(originViewRoot, targetInfo.node) ? 'rollUp' : 'drillDown'; } model.resetViewRoot(targetInfo.node); } } }); } function enableAriaDecalForTree(seriesModel) { var data = seriesModel.getData(); var tree = data.tree; var decalPaletteScope = {}; tree.eachNode(function (node) { // Use decal of level 1 node var current = node; while (current && current.depth > 1) { current = current.parentNode; } var decal = getDecalFromPalette(seriesModel.ecModel, current.name || current.dataIndex + '', decalPaletteScope); node.setVisual('decal', decal); }); } var TreemapSeriesModel = /** @class */ function (_super) { __extends(TreemapSeriesModel, _super); function TreemapSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = TreemapSeriesModel.type; _this.preventUsingHoverLayer = true; return _this; } /** * @override */ TreemapSeriesModel.prototype.getInitialData = function (option, ecModel) { // Create a virtual root. var root = { name: option.name, children: option.data }; completeTreeValue(root); var levels = option.levels || []; // Used in "visual priority" in `treemapVisual.js`. // This way is a little tricky, must satisfy the precondition: // 1. There is no `treeNode.getModel('itemStyle.xxx')` used. // 2. The `Model.prototype.getModel()` will not use any clone-like way. var designatedVisualItemStyle = this.designatedVisualItemStyle = {}; var designatedVisualModel = new Model({ itemStyle: designatedVisualItemStyle }, this, ecModel); levels = option.levels = setDefault(levels, ecModel); var levelModels = map(levels || [], function (levelDefine) { return new Model(levelDefine, designatedVisualModel, ecModel); }, this); // Make sure always a new tree is created when setOption, // in TreemapView, we check whether oldTree === newTree // to choose mappings approach among old shapes and new shapes. var tree = Tree.createTree(root, this, beforeLink); function beforeLink(nodeData) { nodeData.wrapMethod('getItemModel', function (model, idx) { var node = tree.getNodeByDataIndex(idx); var levelModel = levelModels[node.depth]; // If no levelModel, we also need `designatedVisualModel`. model.parentModel = levelModel || designatedVisualModel; return model; }); } return tree.data; }; TreemapSeriesModel.prototype.optionUpdated = function () { this.resetViewRoot(); }; /** * @override * @param {number} dataIndex * @param {boolean} [mutipleSeries=false] */ TreemapSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { var data = this.getData(); var value = this.getRawValue(dataIndex); var name = data.getName(dataIndex); return createTooltipMarkup('nameValue', { name: name, value: value }); }; /** * Add tree path to tooltip param * * @override * @param {number} dataIndex * @return {Object} */ TreemapSeriesModel.prototype.getDataParams = function (dataIndex) { var params = _super.prototype.getDataParams.apply(this, arguments); var node = this.getData().tree.getNodeByDataIndex(dataIndex); params.treePathInfo = wrapTreePathInfo(node, this); return params; }; /** * @public * @param {Object} layoutInfo { * x: containerGroup x * y: containerGroup y * width: containerGroup width * height: containerGroup height * } */ TreemapSeriesModel.prototype.setLayoutInfo = function (layoutInfo) { /** * @readOnly * @type {Object} */ this.layoutInfo = this.layoutInfo || {}; extend(this.layoutInfo, layoutInfo); }; /** * @param {string} id * @return {number} index */ TreemapSeriesModel.prototype.mapIdToIndex = function (id) { // A feature is implemented: // index is monotone increasing with the sequence of // input id at the first time. // This feature can make sure that each data item and its // mapped color have the same index between data list and // color list at the beginning, which is useful for user // to adjust data-color mapping. /** * @private * @type {Object} */ var idIndexMap = this._idIndexMap; if (!idIndexMap) { idIndexMap = this._idIndexMap = createHashMap(); /** * @private * @type {number} */ this._idIndexMapCount = 0; } var index = idIndexMap.get(id); if (index == null) { idIndexMap.set(id, index = this._idIndexMapCount++); } return index; }; TreemapSeriesModel.prototype.getViewRoot = function () { return this._viewRoot; }; TreemapSeriesModel.prototype.resetViewRoot = function (viewRoot) { viewRoot ? this._viewRoot = viewRoot : viewRoot = this._viewRoot; var root = this.getRawData().tree.root; if (!viewRoot || viewRoot !== root && !root.contains(viewRoot)) { this._viewRoot = root; } }; TreemapSeriesModel.prototype.enableAriaDecal = function () { enableAriaDecalForTree(this); }; TreemapSeriesModel.type = 'series.treemap'; TreemapSeriesModel.layoutMode = 'box'; TreemapSeriesModel.defaultOption = { // Disable progressive rendering progressive: 0, // size: ['80%', '80%'], // deprecated, compatible with ec2. left: 'center', top: 'middle', width: '80%', height: '80%', sort: true, clipWindow: 'origin', squareRatio: 0.5 * (1 + Math.sqrt(5)), leafDepth: null, drillDownIcon: '▶', // to align specialized icon. ▷▶❒❐▼✚ zoomToNodeRatio: 0.32 * 0.32, roam: true, nodeClick: 'zoomToNode', animation: true, animationDurationUpdate: 900, animationEasing: 'quinticInOut', breadcrumb: { show: true, height: 22, left: 'center', top: 'bottom', // right // bottom emptyItemWidth: 25, itemStyle: { color: 'rgba(0,0,0,0.7)', textStyle: { color: '#fff' } } }, label: { show: true, // Do not use textDistance, for ellipsis rect just the same as treemap node rect. distance: 0, padding: 5, position: 'inside', // formatter: null, color: '#fff', overflow: 'truncate' // align // verticalAlign }, upperLabel: { show: false, position: [0, '50%'], height: 20, // formatter: null, // color: '#fff', overflow: 'truncate', // align: null, verticalAlign: 'middle' }, itemStyle: { color: null, colorAlpha: null, colorSaturation: null, borderWidth: 0, gapWidth: 0, borderColor: '#fff', borderColorSaturation: null // If specified, borderColor will be ineffective, and the // border color is evaluated by color of current node and // borderColorSaturation. }, emphasis: { upperLabel: { show: true, position: [0, '50%'], ellipsis: true, verticalAlign: 'middle' } }, visualDimension: 0, visualMin: null, visualMax: null, color: [], // level[n].color (if necessary). // + Specify color list of each level. level[0].color would be global // color list if not specified. (see method `setDefault`). // + But set as a empty array to forbid fetch color from global palette // when using nodeModel.get('color'), otherwise nodes on deep level // will always has color palette set and are not able to inherit color // from parent node. // + TreemapSeries.color can not be set as 'none', otherwise effect // legend color fetching (see seriesColor.js). colorAlpha: null, colorSaturation: null, colorMappingBy: 'index', visibleMin: 10, // be rendered. Only works when sort is 'asc' or 'desc'. childrenVisibleMin: null, // grandchildren will not show. // Why grandchildren? If not grandchildren but children, // some siblings show children and some not, // the appearance may be mess and not consistent, levels: [] // Each item: { // visibleMin, itemStyle, visualDimension, label // } // data: { // value: [], // children: [], // link: 'http://xxx.xxx.xxx', // target: 'blank' or 'self' // } }; return TreemapSeriesModel; }(SeriesModel); /** * @param {Object} dataNode */ function completeTreeValue(dataNode) { // Postorder travel tree. // If value of none-leaf node is not set, // calculate it by suming up the value of all children. var sum = 0; each(dataNode.children, function (child) { completeTreeValue(child); var childValue = child.value; isArray(childValue) && (childValue = childValue[0]); sum += childValue; }); var thisValue = dataNode.value; if (isArray(thisValue)) { thisValue = thisValue[0]; } if (thisValue == null || isNaN(thisValue)) { thisValue = sum; } // Value should not less than 0. if (thisValue < 0) { thisValue = 0; } isArray(dataNode.value) ? dataNode.value[0] = thisValue : dataNode.value = thisValue; } /** * set default to level configuration */ function setDefault(levels, ecModel) { var globalColorList = normalizeToArray(ecModel.get('color')); var globalDecalList = normalizeToArray(ecModel.get(['aria', 'decal', 'decals'])); if (!globalColorList) { return; } levels = levels || []; var hasColorDefine; var hasDecalDefine; each(levels, function (levelDefine) { var model = new Model(levelDefine); var modelColor = model.get('color'); var modelDecal = model.get('decal'); if (model.get(['itemStyle', 'color']) || modelColor && modelColor !== 'none') { hasColorDefine = true; } if (model.get(['itemStyle', 'decal']) || modelDecal && modelDecal !== 'none') { hasDecalDefine = true; } }); var level0 = levels[0] || (levels[0] = {}); if (!hasColorDefine) { level0.color = globalColorList.slice(); } if (!hasDecalDefine && globalDecalList) { level0.decal = globalDecalList.slice(); } return levels; } var TEXT_PADDING = 8; var ITEM_GAP = 8; var ARRAY_LENGTH = 5; var Breadcrumb = /** @class */ function () { function Breadcrumb(containerGroup) { this.group = new Group(); containerGroup.add(this.group); } Breadcrumb.prototype.render = function (seriesModel, api, targetNode, onSelect) { var model = seriesModel.getModel('breadcrumb'); var thisGroup = this.group; thisGroup.removeAll(); if (!model.get('show') || !targetNode) { return; } var normalStyleModel = model.getModel('itemStyle'); // let emphasisStyleModel = model.getModel('emphasis.itemStyle'); var textStyleModel = normalStyleModel.getModel('textStyle'); var layoutParam = { pos: { left: model.get('left'), right: model.get('right'), top: model.get('top'), bottom: model.get('bottom') }, box: { width: api.getWidth(), height: api.getHeight() }, emptyItemWidth: model.get('emptyItemWidth'), totalWidth: 0, renderList: [] }; this._prepare(targetNode, layoutParam, textStyleModel); this._renderContent(seriesModel, layoutParam, normalStyleModel, textStyleModel, onSelect); positionElement(thisGroup, layoutParam.pos, layoutParam.box); }; /** * Prepare render list and total width * @private */ Breadcrumb.prototype._prepare = function (targetNode, layoutParam, textStyleModel) { for (var node = targetNode; node; node = node.parentNode) { var text = convertOptionIdName(node.getModel().get('name'), ''); var textRect = textStyleModel.getTextRect(text); var itemWidth = Math.max(textRect.width + TEXT_PADDING * 2, layoutParam.emptyItemWidth); layoutParam.totalWidth += itemWidth + ITEM_GAP; layoutParam.renderList.push({ node: node, text: text, width: itemWidth }); } }; /** * @private */ Breadcrumb.prototype._renderContent = function (seriesModel, layoutParam, normalStyleModel, textStyleModel, onSelect) { // Start rendering. var lastX = 0; var emptyItemWidth = layoutParam.emptyItemWidth; var height = seriesModel.get(['breadcrumb', 'height']); var availableSize = getAvailableSize(layoutParam.pos, layoutParam.box); var totalWidth = layoutParam.totalWidth; var renderList = layoutParam.renderList; for (var i = renderList.length - 1; i >= 0; i--) { var item = renderList[i]; var itemNode = item.node; var itemWidth = item.width; var text = item.text; // Hdie text and shorten width if necessary. if (totalWidth > availableSize.width) { totalWidth -= itemWidth - emptyItemWidth; itemWidth = emptyItemWidth; text = null; } var el = new Polygon({ shape: { points: makeItemPoints(lastX, 0, itemWidth, height, i === renderList.length - 1, i === 0) }, style: defaults(normalStyleModel.getItemStyle(), { lineJoin: 'bevel' }), textContent: new ZRText({ style: { text: text, fill: textStyleModel.getTextColor(), font: textStyleModel.getFont() } }), textConfig: { position: 'inside' }, z2: Z2_EMPHASIS_LIFT * 1e4, onclick: curry(onSelect, itemNode) }); el.disableLabelAnimation = true; this.group.add(el); packEventData(el, seriesModel, itemNode); lastX += itemWidth + ITEM_GAP; } }; Breadcrumb.prototype.remove = function () { this.group.removeAll(); }; return Breadcrumb; }(); function makeItemPoints(x, y, itemWidth, itemHeight, head, tail) { var points = [[head ? x : x - ARRAY_LENGTH, y], [x + itemWidth, y], [x + itemWidth, y + itemHeight], [head ? x : x - ARRAY_LENGTH, y + itemHeight]]; !tail && points.splice(2, 0, [x + itemWidth + ARRAY_LENGTH, y + itemHeight / 2]); !head && points.push([x, y + itemHeight / 2]); return points; } // Package custom mouse event. function packEventData(el, seriesModel, itemNode) { getECData(el).eventData = { componentType: 'series', componentSubType: 'treemap', componentIndex: seriesModel.componentIndex, seriesIndex: seriesModel.componentIndex, seriesName: seriesModel.name, seriesType: 'treemap', selfType: 'breadcrumb', nodeData: { dataIndex: itemNode && itemNode.dataIndex, name: itemNode && itemNode.name }, treePathInfo: itemNode && wrapTreePathInfo(itemNode, seriesModel) }; } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * Animate multiple elements with a single done-callback. * * @example * animation * .createWrap() * .add(el1, {x: 10, y: 10}) * .add(el2, {shape: {width: 500}, style: {fill: 'red'}}, 400) * .done(function () { // done }) * .start('cubicOut'); */ var AnimationWrap = /** @class */ function () { function AnimationWrap() { this._storage = []; this._elExistsMap = {}; } /** * Caution: a el can only be added once, otherwise 'done' * might not be called. This method checks this (by el.id), * suppresses adding and returns false when existing el found. * * @return Whether adding succeeded. */ AnimationWrap.prototype.add = function (el, target, duration, delay, easing) { if (this._elExistsMap[el.id]) { return false; } this._elExistsMap[el.id] = true; this._storage.push({ el: el, target: target, duration: duration, delay: delay, easing: easing }); return true; }; /** * Only execute when animation done/aborted. */ AnimationWrap.prototype.finished = function (callback) { this._finishedCallback = callback; return this; }; /** * Will stop exist animation firstly. */ AnimationWrap.prototype.start = function () { var _this = this; var count = this._storage.length; var checkTerminate = function () { count--; if (count <= 0) { // Guard. _this._storage.length = 0; _this._elExistsMap = {}; _this._finishedCallback && _this._finishedCallback(); } }; for (var i = 0, len = this._storage.length; i < len; i++) { var item = this._storage[i]; item.el.animateTo(item.target, { duration: item.duration, delay: item.delay, easing: item.easing, setToFinal: true, done: checkTerminate, aborted: checkTerminate }); } return this; }; return AnimationWrap; }(); function createWrap() { return new AnimationWrap(); } var Group$1 = Group; var Rect$1 = Rect; var DRAG_THRESHOLD = 3; var PATH_LABEL_NOAMAL = 'label'; var PATH_UPPERLABEL_NORMAL = 'upperLabel'; // Should larger than emphasis states lift z var Z2_BASE = Z2_EMPHASIS_LIFT * 10; // Should bigger than every z2. var Z2_BG = Z2_EMPHASIS_LIFT * 2; var Z2_CONTENT = Z2_EMPHASIS_LIFT * 3; var getStateItemStyle = makeStyleMapper([['fill', 'color'], // `borderColor` and `borderWidth` has been occupied, // so use `stroke` to indicate the stroke of the rect. ['stroke', 'strokeColor'], ['lineWidth', 'strokeWidth'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['shadowColor'] // Option decal is in `DecalObject` but style.decal is in `PatternObject`. // So do not transfer decal directly. ]); var getItemStyleNormal = function (model) { // Normal style props should include emphasis style props. var itemStyle = getStateItemStyle(model); // Clear styles set by emphasis. itemStyle.stroke = itemStyle.fill = itemStyle.lineWidth = null; return itemStyle; }; var inner$7 = makeInner(); var TreemapView = /** @class */ function (_super) { __extends(TreemapView, _super); function TreemapView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = TreemapView.type; _this._state = 'ready'; _this._storage = createStorage(); return _this; } /** * @override */ TreemapView.prototype.render = function (seriesModel, ecModel, api, payload) { var models = ecModel.findComponents({ mainType: 'series', subType: 'treemap', query: payload }); if (indexOf(models, seriesModel) < 0) { return; } this.seriesModel = seriesModel; this.api = api; this.ecModel = ecModel; var types = ['treemapZoomToNode', 'treemapRootToNode']; var targetInfo = retrieveTargetInfo(payload, types, seriesModel); var payloadType = payload && payload.type; var layoutInfo = seriesModel.layoutInfo; var isInit = !this._oldTree; var thisStorage = this._storage; // Mark new root when action is treemapRootToNode. var reRoot = payloadType === 'treemapRootToNode' && targetInfo && thisStorage ? { rootNodeGroup: thisStorage.nodeGroup[targetInfo.node.getRawIndex()], direction: payload.direction } : null; var containerGroup = this._giveContainerGroup(layoutInfo); var renderResult = this._doRender(containerGroup, seriesModel, reRoot); !isInit && (!payloadType || payloadType === 'treemapZoomToNode' || payloadType === 'treemapRootToNode') ? this._doAnimation(containerGroup, renderResult, seriesModel, reRoot) : renderResult.renderFinally(); this._resetController(api); this._renderBreadcrumb(seriesModel, api, targetInfo); }; TreemapView.prototype._giveContainerGroup = function (layoutInfo) { var containerGroup = this._containerGroup; if (!containerGroup) { // FIXME // 加一层containerGroup是为了clip,但是现在clip功能并没有实现。 containerGroup = this._containerGroup = new Group$1(); this._initEvents(containerGroup); this.group.add(containerGroup); } containerGroup.x = layoutInfo.x; containerGroup.y = layoutInfo.y; return containerGroup; }; TreemapView.prototype._doRender = function (containerGroup, seriesModel, reRoot) { var thisTree = seriesModel.getData().tree; var oldTree = this._oldTree; // Clear last shape records. var lastsForAnimation = createStorage(); var thisStorage = createStorage(); var oldStorage = this._storage; var willInvisibleEls = []; function doRenderNode(thisNode, oldNode, parentGroup, depth) { return renderNode(seriesModel, thisStorage, oldStorage, reRoot, lastsForAnimation, willInvisibleEls, thisNode, oldNode, parentGroup, depth); } // Notice: when thisTree and oldTree are the same tree (see list.cloneShallow), // the oldTree is actually losted, so we can not find all of the old graphic // elements from tree. So we use this stragegy: make element storage, move // from old storage to new storage, clear old storage. dualTravel(thisTree.root ? [thisTree.root] : [], oldTree && oldTree.root ? [oldTree.root] : [], containerGroup, thisTree === oldTree || !oldTree, 0); // Process all removing. var willDeleteEls = clearStorage(oldStorage); this._oldTree = thisTree; this._storage = thisStorage; return { lastsForAnimation: lastsForAnimation, willDeleteEls: willDeleteEls, renderFinally: renderFinally }; function dualTravel(thisViewChildren, oldViewChildren, parentGroup, sameTree, depth) { // When 'render' is triggered by action, // 'this' and 'old' may be the same tree, // we use rawIndex in that case. if (sameTree) { oldViewChildren = thisViewChildren; each(thisViewChildren, function (child, index) { !child.isRemoved() && processNode(index, index); }); } // Diff hierarchically (diff only in each subtree, but not whole). // because, consistency of view is important. else { new DataDiffer(oldViewChildren, thisViewChildren, getKey, getKey).add(processNode).update(processNode).remove(curry(processNode, null)).execute(); } function getKey(node) { // Identify by name or raw index. return node.getId(); } function processNode(newIndex, oldIndex) { var thisNode = newIndex != null ? thisViewChildren[newIndex] : null; var oldNode = oldIndex != null ? oldViewChildren[oldIndex] : null; var group = doRenderNode(thisNode, oldNode, parentGroup, depth); group && dualTravel(thisNode && thisNode.viewChildren || [], oldNode && oldNode.viewChildren || [], group, sameTree, depth + 1); } } function clearStorage(storage) { var willDeleteEls = createStorage(); storage && each(storage, function (store, storageName) { var delEls = willDeleteEls[storageName]; each(store, function (el) { el && (delEls.push(el), inner$7(el).willDelete = true); }); }); return willDeleteEls; } function renderFinally() { each(willDeleteEls, function (els) { each(els, function (el) { el.parent && el.parent.remove(el); }); }); each(willInvisibleEls, function (el) { el.invisible = true; // Setting invisible is for optimizing, so no need to set dirty, // just mark as invisible. el.dirty(); }); } }; TreemapView.prototype._doAnimation = function (containerGroup, renderResult, seriesModel, reRoot) { if (!seriesModel.get('animation')) { return; } var durationOption = seriesModel.get('animationDurationUpdate'); var easingOption = seriesModel.get('animationEasing'); // TODO: do not support function until necessary. var duration = (isFunction(durationOption) ? 0 : durationOption) || 0; var easing = (isFunction(easingOption) ? null : easingOption) || 'cubicOut'; var animationWrap = createWrap(); // Make delete animations. each(renderResult.willDeleteEls, function (store, storageName) { each(store, function (el, rawIndex) { if (el.invisible) { return; } var parent = el.parent; // Always has parent, and parent is nodeGroup. var target; var innerStore = inner$7(parent); if (reRoot && reRoot.direction === 'drillDown') { target = parent === reRoot.rootNodeGroup // This is the content element of view root. // Only `content` will enter this branch, because // `background` and `nodeGroup` will not be deleted. ? { shape: { x: 0, y: 0, width: innerStore.nodeWidth, height: innerStore.nodeHeight }, style: { opacity: 0 } } // Others. : { style: { opacity: 0 } }; } else { var targetX = 0; var targetY = 0; if (!innerStore.willDelete) { // Let node animate to right-bottom corner, cooperating with fadeout, // which is appropriate for user understanding. // Divided by 2 for reRoot rolling up effect. targetX = innerStore.nodeWidth / 2; targetY = innerStore.nodeHeight / 2; } target = storageName === 'nodeGroup' ? { x: targetX, y: targetY, style: { opacity: 0 } } : { shape: { x: targetX, y: targetY, width: 0, height: 0 }, style: { opacity: 0 } }; } // TODO: do not support delay until necessary. target && animationWrap.add(el, target, duration, 0, easing); }); }); // Make other animations each(this._storage, function (store, storageName) { each(store, function (el, rawIndex) { var last = renderResult.lastsForAnimation[storageName][rawIndex]; var target = {}; if (!last) { return; } if (el instanceof Group) { if (last.oldX != null) { target.x = el.x; target.y = el.y; el.x = last.oldX; el.y = last.oldY; } } else { if (last.oldShape) { target.shape = extend({}, el.shape); el.setShape(last.oldShape); } if (last.fadein) { el.setStyle('opacity', 0); target.style = { opacity: 1 }; } // When animation is stopped for succedent animation starting, // el.style.opacity might not be 1 else if (el.style.opacity !== 1) { target.style = { opacity: 1 }; } } animationWrap.add(el, target, duration, 0, easing); }); }, this); this._state = 'animating'; animationWrap.finished(bind(function () { this._state = 'ready'; renderResult.renderFinally(); }, this)).start(); }; TreemapView.prototype._resetController = function (api) { var controller = this._controller; // Init controller. if (!controller) { controller = this._controller = new RoamController(api.getZr()); controller.enable(this.seriesModel.get('roam')); controller.on('pan', bind(this._onPan, this)); controller.on('zoom', bind(this._onZoom, this)); } var rect = new BoundingRect(0, 0, api.getWidth(), api.getHeight()); controller.setPointerChecker(function (e, x, y) { return rect.contain(x, y); }); }; TreemapView.prototype._clearController = function () { var controller = this._controller; if (controller) { controller.dispose(); controller = null; } }; TreemapView.prototype._onPan = function (e) { if (this._state !== 'animating' && (Math.abs(e.dx) > DRAG_THRESHOLD || Math.abs(e.dy) > DRAG_THRESHOLD)) { // These param must not be cached. var root = this.seriesModel.getData().tree.root; if (!root) { return; } var rootLayout = root.getLayout(); if (!rootLayout) { return; } this.api.dispatchAction({ type: 'treemapMove', from: this.uid, seriesId: this.seriesModel.id, rootRect: { x: rootLayout.x + e.dx, y: rootLayout.y + e.dy, width: rootLayout.width, height: rootLayout.height } }); } }; TreemapView.prototype._onZoom = function (e) { var mouseX = e.originX; var mouseY = e.originY; if (this._state !== 'animating') { // These param must not be cached. var root = this.seriesModel.getData().tree.root; if (!root) { return; } var rootLayout = root.getLayout(); if (!rootLayout) { return; } var rect = new BoundingRect(rootLayout.x, rootLayout.y, rootLayout.width, rootLayout.height); var layoutInfo = this.seriesModel.layoutInfo; // Transform mouse coord from global to containerGroup. mouseX -= layoutInfo.x; mouseY -= layoutInfo.y; // Scale root bounding rect. var m = create$1(); translate(m, m, [-mouseX, -mouseY]); scale$1(m, m, [e.scale, e.scale]); translate(m, m, [mouseX, mouseY]); rect.applyTransform(m); this.api.dispatchAction({ type: 'treemapRender', from: this.uid, seriesId: this.seriesModel.id, rootRect: { x: rect.x, y: rect.y, width: rect.width, height: rect.height } }); } }; TreemapView.prototype._initEvents = function (containerGroup) { var _this = this; containerGroup.on('click', function (e) { if (_this._state !== 'ready') { return; } var nodeClick = _this.seriesModel.get('nodeClick', true); if (!nodeClick) { return; } var targetInfo = _this.findTarget(e.offsetX, e.offsetY); if (!targetInfo) { return; } var node = targetInfo.node; if (node.getLayout().isLeafRoot) { _this._rootToNode(targetInfo); } else { if (nodeClick === 'zoomToNode') { _this._zoomToNode(targetInfo); } else if (nodeClick === 'link') { var itemModel = node.hostTree.data.getItemModel(node.dataIndex); var link = itemModel.get('link', true); var linkTarget = itemModel.get('target', true) || 'blank'; link && windowOpen(link, linkTarget); } } }, this); }; TreemapView.prototype._renderBreadcrumb = function (seriesModel, api, targetInfo) { var _this = this; if (!targetInfo) { targetInfo = seriesModel.get('leafDepth', true) != null ? { node: seriesModel.getViewRoot() } // FIXME // better way? // Find breadcrumb tail on center of containerGroup. : this.findTarget(api.getWidth() / 2, api.getHeight() / 2); if (!targetInfo) { targetInfo = { node: seriesModel.getData().tree.root }; } } (this._breadcrumb || (this._breadcrumb = new Breadcrumb(this.group))).render(seriesModel, api, targetInfo.node, function (node) { if (_this._state !== 'animating') { aboveViewRoot(seriesModel.getViewRoot(), node) ? _this._rootToNode({ node: node }) : _this._zoomToNode({ node: node }); } }); }; /** * @override */ TreemapView.prototype.remove = function () { this._clearController(); this._containerGroup && this._containerGroup.removeAll(); this._storage = createStorage(); this._state = 'ready'; this._breadcrumb && this._breadcrumb.remove(); }; TreemapView.prototype.dispose = function () { this._clearController(); }; TreemapView.prototype._zoomToNode = function (targetInfo) { this.api.dispatchAction({ type: 'treemapZoomToNode', from: this.uid, seriesId: this.seriesModel.id, targetNode: targetInfo.node }); }; TreemapView.prototype._rootToNode = function (targetInfo) { this.api.dispatchAction({ type: 'treemapRootToNode', from: this.uid, seriesId: this.seriesModel.id, targetNode: targetInfo.node }); }; /** * @public * @param {number} x Global coord x. * @param {number} y Global coord y. * @return {Object} info If not found, return undefined; * @return {number} info.node Target node. * @return {number} info.offsetX x refer to target node. * @return {number} info.offsetY y refer to target node. */ TreemapView.prototype.findTarget = function (x, y) { var targetInfo; var viewRoot = this.seriesModel.getViewRoot(); viewRoot.eachNode({ attr: 'viewChildren', order: 'preorder' }, function (node) { var bgEl = this._storage.background[node.getRawIndex()]; // If invisible, there might be no element. if (bgEl) { var point = bgEl.transformCoordToLocal(x, y); var shape = bgEl.shape; // For performance consideration, dont use 'getBoundingRect'. if (shape.x <= point[0] && point[0] <= shape.x + shape.width && shape.y <= point[1] && point[1] <= shape.y + shape.height) { targetInfo = { node: node, offsetX: point[0], offsetY: point[1] }; } else { return false; // Suppress visit subtree. } } }, this); return targetInfo; }; TreemapView.type = 'treemap'; return TreemapView; }(ChartView); /** * @inner */ function createStorage() { return { nodeGroup: [], background: [], content: [] }; } /** * @inner * @return Return undefined means do not travel further. */ function renderNode(seriesModel, thisStorage, oldStorage, reRoot, lastsForAnimation, willInvisibleEls, thisNode, oldNode, parentGroup, depth) { // Whether under viewRoot. if (!thisNode) { // Deleting nodes will be performed finally. This method just find // element from old storage, or create new element, set them to new // storage, and set styles. return; } // ------------------------------------------------------------------- // Start of closure variables available in "Procedures in renderNode". var thisLayout = thisNode.getLayout(); var data = seriesModel.getData(); var nodeModel = thisNode.getModel(); // Only for enabling highlight/downplay. Clear firstly. // Because some node will not be rendered. data.setItemGraphicEl(thisNode.dataIndex, null); if (!thisLayout || !thisLayout.isInView) { return; } var thisWidth = thisLayout.width; var thisHeight = thisLayout.height; var borderWidth = thisLayout.borderWidth; var thisInvisible = thisLayout.invisible; var thisRawIndex = thisNode.getRawIndex(); var oldRawIndex = oldNode && oldNode.getRawIndex(); var thisViewChildren = thisNode.viewChildren; var upperHeight = thisLayout.upperHeight; var isParent = thisViewChildren && thisViewChildren.length; var itemStyleNormalModel = nodeModel.getModel('itemStyle'); var itemStyleEmphasisModel = nodeModel.getModel(['emphasis', 'itemStyle']); var itemStyleBlurModel = nodeModel.getModel(['blur', 'itemStyle']); var itemStyleSelectModel = nodeModel.getModel(['select', 'itemStyle']); var borderRadius = itemStyleNormalModel.get('borderRadius') || 0; // End of closure ariables available in "Procedures in renderNode". // ----------------------------------------------------------------- // Node group var group = giveGraphic('nodeGroup', Group$1); if (!group) { return; } parentGroup.add(group); // x,y are not set when el is above view root. group.x = thisLayout.x || 0; group.y = thisLayout.y || 0; group.markRedraw(); inner$7(group).nodeWidth = thisWidth; inner$7(group).nodeHeight = thisHeight; if (thisLayout.isAboveViewRoot) { return group; } // Background var bg = giveGraphic('background', Rect$1, depth, Z2_BG); bg && renderBackground(group, bg, isParent && thisLayout.upperLabelHeight); var focus = nodeModel.get(['emphasis', 'focus']); var blurScope = nodeModel.get(['emphasis', 'blurScope']); var focusOrIndices = focus === 'ancestor' ? thisNode.getAncestorsIndices() : focus === 'descendant' ? thisNode.getDescendantIndices() : focus; // No children, render content. if (isParent) { // Because of the implementation about "traverse" in graphic hover style, we // can not set hover listener on the "group" of non-leaf node. Otherwise the // hover event from the descendents will be listenered. if (isHighDownDispatcher(group)) { setAsHighDownDispatcher(group, false); } if (bg) { setAsHighDownDispatcher(bg, true); // Only for enabling highlight/downplay. data.setItemGraphicEl(thisNode.dataIndex, bg); enableHoverFocus(bg, focusOrIndices, blurScope); } } else { var content = giveGraphic('content', Rect$1, depth, Z2_CONTENT); content && renderContent(group, content); if (bg && isHighDownDispatcher(bg)) { setAsHighDownDispatcher(bg, false); } setAsHighDownDispatcher(group, true); // Only for enabling highlight/downplay. data.setItemGraphicEl(thisNode.dataIndex, group); enableHoverFocus(group, focusOrIndices, blurScope); } return group; // ---------------------------- // | Procedures in renderNode | // ---------------------------- function renderBackground(group, bg, useUpperLabel) { var ecData = getECData(bg); // For tooltip. ecData.dataIndex = thisNode.dataIndex; ecData.seriesIndex = seriesModel.seriesIndex; bg.setShape({ x: 0, y: 0, width: thisWidth, height: thisHeight, r: borderRadius }); if (thisInvisible) { // If invisible, do not set visual, otherwise the element will // change immediately before animation. We think it is OK to // remain its origin color when moving out of the view window. processInvisible(bg); } else { bg.invisible = false; var style = thisNode.getVisual('style'); var visualBorderColor = style.stroke; var normalStyle = getItemStyleNormal(itemStyleNormalModel); normalStyle.fill = visualBorderColor; var emphasisStyle = getStateItemStyle(itemStyleEmphasisModel); emphasisStyle.fill = itemStyleEmphasisModel.get('borderColor'); var blurStyle = getStateItemStyle(itemStyleBlurModel); blurStyle.fill = itemStyleBlurModel.get('borderColor'); var selectStyle = getStateItemStyle(itemStyleSelectModel); selectStyle.fill = itemStyleSelectModel.get('borderColor'); if (useUpperLabel) { var upperLabelWidth = thisWidth - 2 * borderWidth; prepareText( // PENDING: convert ZRColor to ColorString for text. bg, visualBorderColor, style.opacity, { x: borderWidth, y: 0, width: upperLabelWidth, height: upperHeight }); } // For old bg. else { bg.removeTextContent(); } bg.setStyle(normalStyle); bg.ensureState('emphasis').style = emphasisStyle; bg.ensureState('blur').style = blurStyle; bg.ensureState('select').style = selectStyle; setDefaultStateProxy(bg); } group.add(bg); } function renderContent(group, content) { var ecData = getECData(content); // For tooltip. ecData.dataIndex = thisNode.dataIndex; ecData.seriesIndex = seriesModel.seriesIndex; var contentWidth = Math.max(thisWidth - 2 * borderWidth, 0); var contentHeight = Math.max(thisHeight - 2 * borderWidth, 0); content.culling = true; content.setShape({ x: borderWidth, y: borderWidth, width: contentWidth, height: contentHeight, r: borderRadius }); if (thisInvisible) { // If invisible, do not set visual, otherwise the element will // change immediately before animation. We think it is OK to // remain its origin color when moving out of the view window. processInvisible(content); } else { content.invisible = false; var nodeStyle = thisNode.getVisual('style'); var visualColor = nodeStyle.fill; var normalStyle = getItemStyleNormal(itemStyleNormalModel); normalStyle.fill = visualColor; normalStyle.decal = nodeStyle.decal; var emphasisStyle = getStateItemStyle(itemStyleEmphasisModel); var blurStyle = getStateItemStyle(itemStyleBlurModel); var selectStyle = getStateItemStyle(itemStyleSelectModel); // PENDING: convert ZRColor to ColorString for text. prepareText(content, visualColor, nodeStyle.opacity, null); content.setStyle(normalStyle); content.ensureState('emphasis').style = emphasisStyle; content.ensureState('blur').style = blurStyle; content.ensureState('select').style = selectStyle; setDefaultStateProxy(content); } group.add(content); } function processInvisible(element) { // Delay invisible setting utill animation finished, // avoid element vanish suddenly before animation. !element.invisible && willInvisibleEls.push(element); } function prepareText(rectEl, visualColor, visualOpacity, // Can be null/undefined upperLabelRect) { var normalLabelModel = nodeModel.getModel(upperLabelRect ? PATH_UPPERLABEL_NORMAL : PATH_LABEL_NOAMAL); var defaultText = convertOptionIdName(nodeModel.get('name'), null); var isShow = normalLabelModel.getShallow('show'); setLabelStyle(rectEl, getLabelStatesModels(nodeModel, upperLabelRect ? PATH_UPPERLABEL_NORMAL : PATH_LABEL_NOAMAL), { defaultText: isShow ? defaultText : null, inheritColor: visualColor, defaultOpacity: visualOpacity, labelFetcher: seriesModel, labelDataIndex: thisNode.dataIndex }); var textEl = rectEl.getTextContent(); var textStyle = textEl.style; var textPadding = normalizeCssArray(textStyle.padding || 0); if (upperLabelRect) { rectEl.setTextConfig({ layoutRect: upperLabelRect }); textEl.disableLabelLayout = true; } textEl.beforeUpdate = function () { var width = Math.max((upperLabelRect ? upperLabelRect.width : rectEl.shape.width) - textPadding[1] - textPadding[3], 0); var height = Math.max((upperLabelRect ? upperLabelRect.height : rectEl.shape.height) - textPadding[0] - textPadding[2], 0); if (textStyle.width !== width || textStyle.height !== height) { textEl.setStyle({ width: width, height: height }); } }; textStyle.truncateMinChar = 2; textStyle.lineOverflow = 'truncate'; addDrillDownIcon(textStyle, upperLabelRect, thisLayout); var textEmphasisState = textEl.getState('emphasis'); addDrillDownIcon(textEmphasisState ? textEmphasisState.style : null, upperLabelRect, thisLayout); } function addDrillDownIcon(style, upperLabelRect, thisLayout) { var text = style ? style.text : null; if (!upperLabelRect && thisLayout.isLeafRoot && text != null) { var iconChar = seriesModel.get('drillDownIcon', true); style.text = iconChar ? iconChar + ' ' + text : text; } } function giveGraphic(storageName, Ctor, depth, z) { var element = oldRawIndex != null && oldStorage[storageName][oldRawIndex]; var lasts = lastsForAnimation[storageName]; if (element) { // Remove from oldStorage oldStorage[storageName][oldRawIndex] = null; prepareAnimationWhenHasOld(lasts, element); } // If invisible and no old element, do not create new element (for optimizing). else if (!thisInvisible) { element = new Ctor(); if (element instanceof Displayable) { element.z2 = calculateZ2(depth, z); } prepareAnimationWhenNoOld(lasts, element); } // Set to thisStorage return thisStorage[storageName][thisRawIndex] = element; } function prepareAnimationWhenHasOld(lasts, element) { var lastCfg = lasts[thisRawIndex] = {}; if (element instanceof Group$1) { lastCfg.oldX = element.x; lastCfg.oldY = element.y; } else { lastCfg.oldShape = extend({}, element.shape); } } // If a element is new, we need to find the animation start point carefully, // otherwise it will looks strange when 'zoomToNode'. function prepareAnimationWhenNoOld(lasts, element) { var lastCfg = lasts[thisRawIndex] = {}; var parentNode = thisNode.parentNode; var isGroup = element instanceof Group; if (parentNode && (!reRoot || reRoot.direction === 'drillDown')) { var parentOldX = 0; var parentOldY = 0; // New nodes appear from right-bottom corner in 'zoomToNode' animation. // For convenience, get old bounding rect from background. var parentOldBg = lastsForAnimation.background[parentNode.getRawIndex()]; if (!reRoot && parentOldBg && parentOldBg.oldShape) { parentOldX = parentOldBg.oldShape.width; parentOldY = parentOldBg.oldShape.height; } // When no parent old shape found, its parent is new too, // so we can just use {x:0, y:0}. if (isGroup) { lastCfg.oldX = 0; lastCfg.oldY = parentOldY; } else { lastCfg.oldShape = { x: parentOldX, y: parentOldY, width: 0, height: 0 }; } } // Fade in, user can be aware that these nodes are new. lastCfg.fadein = !isGroup; } } // We can not set all backgroud with the same z, Because the behaviour of // drill down and roll up differ background creation sequence from tree // hierarchy sequence, which cause that lowser background element overlap // upper ones. So we calculate z based on depth. // Moreover, we try to shrink down z interval to [0, 1] to avoid that // treemap with large z overlaps other components. function calculateZ2(depth, z2InLevel) { return depth * Z2_BASE + z2InLevel; } var each$4 = each; var isObject$4 = isObject; var CATEGORY_DEFAULT_VISUAL_INDEX = -1; var VisualMapping = /** @class */ function () { function VisualMapping(option) { var mappingMethod = option.mappingMethod; var visualType = option.type; var thisOption = this.option = clone(option); this.type = visualType; this.mappingMethod = mappingMethod; this._normalizeData = normalizers[mappingMethod]; var visualHandler = VisualMapping.visualHandlers[visualType]; this.applyVisual = visualHandler.applyVisual; this.getColorMapper = visualHandler.getColorMapper; this._normalizedToVisual = visualHandler._normalizedToVisual[mappingMethod]; if (mappingMethod === 'piecewise') { normalizeVisualRange(thisOption); preprocessForPiecewise(thisOption); } else if (mappingMethod === 'category') { thisOption.categories ? preprocessForSpecifiedCategory(thisOption) // categories is ordinal when thisOption.categories not specified, // which need no more preprocess except normalize visual. : normalizeVisualRange(thisOption, true); } else { // mappingMethod === 'linear' or 'fixed' assert(mappingMethod !== 'linear' || thisOption.dataExtent); normalizeVisualRange(thisOption); } } VisualMapping.prototype.mapValueToVisual = function (value) { var normalized = this._normalizeData(value); return this._normalizedToVisual(normalized, value); }; VisualMapping.prototype.getNormalizer = function () { return bind(this._normalizeData, this); }; /** * List available visual types. * * @public * @return {Array.} */ VisualMapping.listVisualTypes = function () { return keys(VisualMapping.visualHandlers); }; // /** // * @public // */ // static addVisualHandler(name, handler) { // visualHandlers[name] = handler; // } /** * @public */ VisualMapping.isValidType = function (visualType) { return VisualMapping.visualHandlers.hasOwnProperty(visualType); }; /** * Convinent method. * Visual can be Object or Array or primary type. */ VisualMapping.eachVisual = function (visual, callback, context) { if (isObject(visual)) { each(visual, callback, context); } else { callback.call(context, visual); } }; VisualMapping.mapVisual = function (visual, callback, context) { var isPrimary; var newVisual = isArray(visual) ? [] : isObject(visual) ? {} : (isPrimary = true, null); VisualMapping.eachVisual(visual, function (v, key) { var newVal = callback.call(context, v, key); isPrimary ? newVisual = newVal : newVisual[key] = newVal; }); return newVisual; }; /** * Retrieve visual properties from given object. */ VisualMapping.retrieveVisuals = function (obj) { var ret = {}; var hasVisual; obj && each$4(VisualMapping.visualHandlers, function (h, visualType) { if (obj.hasOwnProperty(visualType)) { ret[visualType] = obj[visualType]; hasVisual = true; } }); return hasVisual ? ret : null; }; /** * Give order to visual types, considering colorSaturation, colorAlpha depends on color. * * @public * @param {(Object|Array)} visualTypes If Object, like: {color: ..., colorSaturation: ...} * IF Array, like: ['color', 'symbol', 'colorSaturation'] * @return {Array.} Sorted visual types. */ VisualMapping.prepareVisualTypes = function (visualTypes) { if (isArray(visualTypes)) { visualTypes = visualTypes.slice(); } else if (isObject$4(visualTypes)) { var types_1 = []; each$4(visualTypes, function (item, type) { types_1.push(type); }); visualTypes = types_1; } else { return []; } visualTypes.sort(function (type1, type2) { // color should be front of colorSaturation, colorAlpha, ... // symbol and symbolSize do not matter. return type2 === 'color' && type1 !== 'color' && type1.indexOf('color') === 0 ? 1 : -1; }); return visualTypes; }; /** * 'color', 'colorSaturation', 'colorAlpha', ... are depends on 'color'. * Other visuals are only depends on themself. */ VisualMapping.dependsOn = function (visualType1, visualType2) { return visualType2 === 'color' ? !!(visualType1 && visualType1.indexOf(visualType2) === 0) : visualType1 === visualType2; }; /** * @param value * @param pieceList [{value: ..., interval: [min, max]}, ...] * Always from small to big. * @param findClosestWhenOutside Default to be false * @return index */ VisualMapping.findPieceIndex = function (value, pieceList, findClosestWhenOutside) { var possibleI; var abs = Infinity; // value has the higher priority. for (var i = 0, len = pieceList.length; i < len; i++) { var pieceValue = pieceList[i].value; if (pieceValue != null) { if (pieceValue === value // FIXME // It is supposed to compare value according to value type of dimension, // but currently value type can exactly be string or number. // Compromise for numeric-like string (like '12'), especially // in the case that visualMap.categories is ['22', '33']. || typeof pieceValue === 'string' && pieceValue === value + '') { return i; } findClosestWhenOutside && updatePossible(pieceValue, i); } } for (var i = 0, len = pieceList.length; i < len; i++) { var piece = pieceList[i]; var interval = piece.interval; var close_1 = piece.close; if (interval) { if (interval[0] === -Infinity) { if (littleThan(close_1[1], value, interval[1])) { return i; } } else if (interval[1] === Infinity) { if (littleThan(close_1[0], interval[0], value)) { return i; } } else if (littleThan(close_1[0], interval[0], value) && littleThan(close_1[1], value, interval[1])) { return i; } findClosestWhenOutside && updatePossible(interval[0], i); findClosestWhenOutside && updatePossible(interval[1], i); } } if (findClosestWhenOutside) { return value === Infinity ? pieceList.length - 1 : value === -Infinity ? 0 : possibleI; } function updatePossible(val, index) { var newAbs = Math.abs(val - value); if (newAbs < abs) { abs = newAbs; possibleI = index; } } }; VisualMapping.visualHandlers = { color: { applyVisual: makeApplyVisual('color'), getColorMapper: function () { var thisOption = this.option; return bind(thisOption.mappingMethod === 'category' ? function (value, isNormalized) { !isNormalized && (value = this._normalizeData(value)); return doMapCategory.call(this, value); } : function (value, isNormalized, out) { // If output rgb array // which will be much faster and useful in pixel manipulation var returnRGBArray = !!out; !isNormalized && (value = this._normalizeData(value)); out = fastLerp(value, thisOption.parsedVisual, out); return returnRGBArray ? out : stringify(out, 'rgba'); }, this); }, _normalizedToVisual: { linear: function (normalized) { return stringify(fastLerp(normalized, this.option.parsedVisual), 'rgba'); }, category: doMapCategory, piecewise: function (normalized, value) { var result = getSpecifiedVisual.call(this, value); if (result == null) { result = stringify(fastLerp(normalized, this.option.parsedVisual), 'rgba'); } return result; }, fixed: doMapFixed } }, colorHue: makePartialColorVisualHandler(function (color$1, value) { return modifyHSL(color$1, value); }), colorSaturation: makePartialColorVisualHandler(function (color$1, value) { return modifyHSL(color$1, null, value); }), colorLightness: makePartialColorVisualHandler(function (color$1, value) { return modifyHSL(color$1, null, null, value); }), colorAlpha: makePartialColorVisualHandler(function (color$1, value) { return modifyAlpha(color$1, value); }), decal: { applyVisual: makeApplyVisual('decal'), _normalizedToVisual: { linear: null, category: doMapCategory, piecewise: null, fixed: null } }, opacity: { applyVisual: makeApplyVisual('opacity'), _normalizedToVisual: createNormalizedToNumericVisual([0, 1]) }, liftZ: { applyVisual: makeApplyVisual('liftZ'), _normalizedToVisual: { linear: doMapFixed, category: doMapFixed, piecewise: doMapFixed, fixed: doMapFixed } }, symbol: { applyVisual: function (value, getter, setter) { var symbolCfg = this.mapValueToVisual(value); setter('symbol', symbolCfg); }, _normalizedToVisual: { linear: doMapToArray, category: doMapCategory, piecewise: function (normalized, value) { var result = getSpecifiedVisual.call(this, value); if (result == null) { result = doMapToArray.call(this, normalized); } return result; }, fixed: doMapFixed } }, symbolSize: { applyVisual: makeApplyVisual('symbolSize'), _normalizedToVisual: createNormalizedToNumericVisual([0, 1]) } }; return VisualMapping; }(); function preprocessForPiecewise(thisOption) { var pieceList = thisOption.pieceList; thisOption.hasSpecialVisual = false; each(pieceList, function (piece, index) { piece.originIndex = index; // piece.visual is "result visual value" but not // a visual range, so it does not need to be normalized. if (piece.visual != null) { thisOption.hasSpecialVisual = true; } }); } function preprocessForSpecifiedCategory(thisOption) { // Hash categories. var categories = thisOption.categories; var categoryMap = thisOption.categoryMap = {}; var visual = thisOption.visual; each$4(categories, function (cate, index) { categoryMap[cate] = index; }); // Process visual map input. if (!isArray(visual)) { var visualArr_1 = []; if (isObject(visual)) { each$4(visual, function (v, cate) { var index = categoryMap[cate]; visualArr_1[index != null ? index : CATEGORY_DEFAULT_VISUAL_INDEX] = v; }); } else { // Is primary type, represents default visual. visualArr_1[CATEGORY_DEFAULT_VISUAL_INDEX] = visual; } visual = setVisualToOption(thisOption, visualArr_1); } // Remove categories that has no visual, // then we can mapping them to CATEGORY_DEFAULT_VISUAL_INDEX. for (var i = categories.length - 1; i >= 0; i--) { if (visual[i] == null) { delete categoryMap[categories[i]]; categories.pop(); } } } function normalizeVisualRange(thisOption, isCategory) { var visual = thisOption.visual; var visualArr = []; if (isObject(visual)) { each$4(visual, function (v) { visualArr.push(v); }); } else if (visual != null) { visualArr.push(visual); } var doNotNeedPair = { color: 1, symbol: 1 }; if (!isCategory && visualArr.length === 1 && !doNotNeedPair.hasOwnProperty(thisOption.type)) { // Do not care visualArr.length === 0, which is illegal. visualArr[1] = visualArr[0]; } setVisualToOption(thisOption, visualArr); } function makePartialColorVisualHandler(applyValue) { return { applyVisual: function (value, getter, setter) { // Only used in HSL var colorChannel = this.mapValueToVisual(value); // Must not be array value setter('color', applyValue(getter('color'), colorChannel)); }, _normalizedToVisual: createNormalizedToNumericVisual([0, 1]) }; } function doMapToArray(normalized) { var visual = this.option.visual; return visual[Math.round(linearMap(normalized, [0, 1], [0, visual.length - 1], true))] || {}; // TODO {}? } function makeApplyVisual(visualType) { return function (value, getter, setter) { setter(visualType, this.mapValueToVisual(value)); }; } function doMapCategory(normalized) { var visual = this.option.visual; return visual[this.option.loop && normalized !== CATEGORY_DEFAULT_VISUAL_INDEX ? normalized % visual.length : normalized]; } function doMapFixed() { // visual will be convert to array. return this.option.visual[0]; } /** * Create mapped to numeric visual */ function createNormalizedToNumericVisual(sourceExtent) { return { linear: function (normalized) { return linearMap(normalized, sourceExtent, this.option.visual, true); }, category: doMapCategory, piecewise: function (normalized, value) { var result = getSpecifiedVisual.call(this, value); if (result == null) { result = linearMap(normalized, sourceExtent, this.option.visual, true); } return result; }, fixed: doMapFixed }; } function getSpecifiedVisual(value) { var thisOption = this.option; var pieceList = thisOption.pieceList; if (thisOption.hasSpecialVisual) { var pieceIndex = VisualMapping.findPieceIndex(value, pieceList); var piece = pieceList[pieceIndex]; if (piece && piece.visual) { return piece.visual[this.type]; } } } function setVisualToOption(thisOption, visualArr) { thisOption.visual = visualArr; if (thisOption.type === 'color') { thisOption.parsedVisual = map(visualArr, function (item) { return parse(item); }); } return visualArr; } /** * Normalizers by mapping methods. */ var normalizers = { linear: function (value) { return linearMap(value, this.option.dataExtent, [0, 1], true); }, piecewise: function (value) { var pieceList = this.option.pieceList; var pieceIndex = VisualMapping.findPieceIndex(value, pieceList, true); if (pieceIndex != null) { return linearMap(pieceIndex, [0, pieceList.length - 1], [0, 1], true); } }, category: function (value) { var index = this.option.categories ? this.option.categoryMap[value] : value; // ordinal value return index == null ? CATEGORY_DEFAULT_VISUAL_INDEX : index; }, fixed: noop }; function littleThan(close, a, b) { return close ? a <= b : a < b; } var ITEM_STYLE_NORMAL = 'itemStyle'; var inner$8 = makeInner(); var treemapVisual = { seriesType: 'treemap', reset: function (seriesModel) { var tree = seriesModel.getData().tree; var root = tree.root; if (root.isRemoved()) { return; } travelTree(root, // Visual should calculate from tree root but not view root. {}, seriesModel.getViewRoot().getAncestors(), seriesModel); } }; function travelTree(node, designatedVisual, viewRootAncestors, seriesModel) { var nodeModel = node.getModel(); var nodeLayout = node.getLayout(); var data = node.hostTree.data; // Optimize if (!nodeLayout || nodeLayout.invisible || !nodeLayout.isInView) { return; } var nodeItemStyleModel = nodeModel.getModel(ITEM_STYLE_NORMAL); var visuals = buildVisuals(nodeItemStyleModel, designatedVisual, seriesModel); var existsStyle = data.ensureUniqueItemVisual(node.dataIndex, 'style'); // calculate border color var borderColor = nodeItemStyleModel.get('borderColor'); var borderColorSaturation = nodeItemStyleModel.get('borderColorSaturation'); var thisNodeColor; if (borderColorSaturation != null) { // For performance, do not always execute 'calculateColor'. thisNodeColor = calculateColor(visuals); borderColor = calculateBorderColor(borderColorSaturation, thisNodeColor); } existsStyle.stroke = borderColor; var viewChildren = node.viewChildren; if (!viewChildren || !viewChildren.length) { thisNodeColor = calculateColor(visuals); // Apply visual to this node. existsStyle.fill = thisNodeColor; } else { var mapping_1 = buildVisualMapping(node, nodeModel, nodeLayout, nodeItemStyleModel, visuals, viewChildren); // Designate visual to children. each(viewChildren, function (child, index) { // If higher than viewRoot, only ancestors of viewRoot is needed to visit. if (child.depth >= viewRootAncestors.length || child === viewRootAncestors[child.depth]) { var childVisual = mapVisual(nodeModel, visuals, child, index, mapping_1, seriesModel); travelTree(child, childVisual, viewRootAncestors, seriesModel); } }); } } function buildVisuals(nodeItemStyleModel, designatedVisual, seriesModel) { var visuals = extend({}, designatedVisual); var designatedVisualItemStyle = seriesModel.designatedVisualItemStyle; each(['color', 'colorAlpha', 'colorSaturation'], function (visualName) { // Priority: thisNode > thisLevel > parentNodeDesignated > seriesModel designatedVisualItemStyle[visualName] = designatedVisual[visualName]; var val = nodeItemStyleModel.get(visualName); designatedVisualItemStyle[visualName] = null; val != null && (visuals[visualName] = val); }); return visuals; } function calculateColor(visuals) { var color = getValueVisualDefine(visuals, 'color'); if (color) { var colorAlpha = getValueVisualDefine(visuals, 'colorAlpha'); var colorSaturation = getValueVisualDefine(visuals, 'colorSaturation'); if (colorSaturation) { color = modifyHSL(color, null, null, colorSaturation); } if (colorAlpha) { color = modifyAlpha(color, colorAlpha); } return color; } } function calculateBorderColor(borderColorSaturation, thisNodeColor) { return thisNodeColor != null // Can only be string ? modifyHSL(thisNodeColor, null, null, borderColorSaturation) : null; } function getValueVisualDefine(visuals, name) { var value = visuals[name]; if (value != null && value !== 'none') { return value; } } function buildVisualMapping(node, nodeModel, nodeLayout, nodeItemStyleModel, visuals, viewChildren) { if (!viewChildren || !viewChildren.length) { return; } var rangeVisual = getRangeVisual(nodeModel, 'color') || visuals.color != null && visuals.color !== 'none' && (getRangeVisual(nodeModel, 'colorAlpha') || getRangeVisual(nodeModel, 'colorSaturation')); if (!rangeVisual) { return; } var visualMin = nodeModel.get('visualMin'); var visualMax = nodeModel.get('visualMax'); var dataExtent = nodeLayout.dataExtent.slice(); visualMin != null && visualMin < dataExtent[0] && (dataExtent[0] = visualMin); visualMax != null && visualMax > dataExtent[1] && (dataExtent[1] = visualMax); var colorMappingBy = nodeModel.get('colorMappingBy'); var opt = { type: rangeVisual.name, dataExtent: dataExtent, visual: rangeVisual.range }; if (opt.type === 'color' && (colorMappingBy === 'index' || colorMappingBy === 'id')) { opt.mappingMethod = 'category'; opt.loop = true; // categories is ordinal, so do not set opt.categories. } else { opt.mappingMethod = 'linear'; } var mapping = new VisualMapping(opt); inner$8(mapping).drColorMappingBy = colorMappingBy; return mapping; } // Notice: If we dont have the attribute 'colorRange', but only use // attribute 'color' to represent both concepts of 'colorRange' and 'color', // (It means 'colorRange' when 'color' is Array, means 'color' when not array), // this problem will be encountered: // If a level-1 node dont have children, and its siblings has children, // and colorRange is set on level-1, then the node can not be colored. // So we separate 'colorRange' and 'color' to different attributes. function getRangeVisual(nodeModel, name) { // 'colorRange', 'colorARange', 'colorSRange'. // If not exsits on this node, fetch from levels and series. var range = nodeModel.get(name); return isArray(range) && range.length ? { name: name, range: range } : null; } function mapVisual(nodeModel, visuals, child, index, mapping, seriesModel) { var childVisuals = extend({}, visuals); if (mapping) { // Only support color, colorAlpha, colorSaturation. var mappingType = mapping.type; var colorMappingBy = mappingType === 'color' && inner$8(mapping).drColorMappingBy; var value = colorMappingBy === 'index' ? index : colorMappingBy === 'id' ? seriesModel.mapIdToIndex(child.getId()) : child.getValue(nodeModel.get('visualDimension')); childVisuals[mappingType] = mapping.mapValueToVisual(value); } return childVisuals; } var mathMax$7 = Math.max; var mathMin$7 = Math.min; var retrieveValue = retrieve; var each$5 = each; var PATH_BORDER_WIDTH = ['itemStyle', 'borderWidth']; var PATH_GAP_WIDTH = ['itemStyle', 'gapWidth']; var PATH_UPPER_LABEL_SHOW = ['upperLabel', 'show']; var PATH_UPPER_LABEL_HEIGHT = ['upperLabel', 'height']; /** * @public */ var treemapLayout = { seriesType: 'treemap', reset: function (seriesModel, ecModel, api, payload) { // Layout result in each node: // {x, y, width, height, area, borderWidth} var ecWidth = api.getWidth(); var ecHeight = api.getHeight(); var seriesOption = seriesModel.option; var layoutInfo = getLayoutRect(seriesModel.getBoxLayoutParams(), { width: api.getWidth(), height: api.getHeight() }); var size = seriesOption.size || []; // Compatible with ec2. var containerWidth = parsePercent$1(retrieveValue(layoutInfo.width, size[0]), ecWidth); var containerHeight = parsePercent$1(retrieveValue(layoutInfo.height, size[1]), ecHeight); // Fetch payload info. var payloadType = payload && payload.type; var types = ['treemapZoomToNode', 'treemapRootToNode']; var targetInfo = retrieveTargetInfo(payload, types, seriesModel); var rootRect = payloadType === 'treemapRender' || payloadType === 'treemapMove' ? payload.rootRect : null; var viewRoot = seriesModel.getViewRoot(); var viewAbovePath = getPathToRoot(viewRoot); if (payloadType !== 'treemapMove') { var rootSize = payloadType === 'treemapZoomToNode' ? estimateRootSize(seriesModel, targetInfo, viewRoot, containerWidth, containerHeight) : rootRect ? [rootRect.width, rootRect.height] : [containerWidth, containerHeight]; var sort_1 = seriesOption.sort; if (sort_1 && sort_1 !== 'asc' && sort_1 !== 'desc') { // Default to be desc order. sort_1 = 'desc'; } var options = { squareRatio: seriesOption.squareRatio, sort: sort_1, leafDepth: seriesOption.leafDepth }; // layout should be cleared because using updateView but not update. viewRoot.hostTree.clearLayouts(); // TODO // optimize: if out of view clip, do not layout. // But take care that if do not render node out of view clip, // how to calculate start po var viewRootLayout_1 = { x: 0, y: 0, width: rootSize[0], height: rootSize[1], area: rootSize[0] * rootSize[1] }; viewRoot.setLayout(viewRootLayout_1); squarify(viewRoot, options, false, 0); // Supplement layout. viewRootLayout_1 = viewRoot.getLayout(); each$5(viewAbovePath, function (node, index) { var childValue = (viewAbovePath[index + 1] || viewRoot).getValue(); node.setLayout(extend({ dataExtent: [childValue, childValue], borderWidth: 0, upperHeight: 0 }, viewRootLayout_1)); }); } var treeRoot = seriesModel.getData().tree.root; treeRoot.setLayout(calculateRootPosition(layoutInfo, rootRect, targetInfo), true); seriesModel.setLayoutInfo(layoutInfo); // FIXME // 现在没有clip功能,暂时取ec高宽。 prunning(treeRoot, // Transform to base element coordinate system. new BoundingRect(-layoutInfo.x, -layoutInfo.y, ecWidth, ecHeight), viewAbovePath, viewRoot, 0); } }; /** * Layout treemap with squarify algorithm. * The original presentation of this algorithm * was made by Mark Bruls, Kees Huizing, and Jarke J. van Wijk * . * The implementation of this algorithm was originally copied from "d3.js" * * with some modifications made for this program. * See the license statement at the head of this file. * * @protected * @param {module:echarts/data/Tree~TreeNode} node * @param {Object} options * @param {string} options.sort 'asc' or 'desc' * @param {number} options.squareRatio * @param {boolean} hideChildren * @param {number} depth */ function squarify(node, options, hideChildren, depth) { var width; var height; if (node.isRemoved()) { return; } var thisLayout = node.getLayout(); width = thisLayout.width; height = thisLayout.height; // Considering border and gap var nodeModel = node.getModel(); var borderWidth = nodeModel.get(PATH_BORDER_WIDTH); var halfGapWidth = nodeModel.get(PATH_GAP_WIDTH) / 2; var upperLabelHeight = getUpperLabelHeight(nodeModel); var upperHeight = Math.max(borderWidth, upperLabelHeight); var layoutOffset = borderWidth - halfGapWidth; var layoutOffsetUpper = upperHeight - halfGapWidth; node.setLayout({ borderWidth: borderWidth, upperHeight: upperHeight, upperLabelHeight: upperLabelHeight }, true); width = mathMax$7(width - 2 * layoutOffset, 0); height = mathMax$7(height - layoutOffset - layoutOffsetUpper, 0); var totalArea = width * height; var viewChildren = initChildren(node, nodeModel, totalArea, options, hideChildren, depth); if (!viewChildren.length) { return; } var rect = { x: layoutOffset, y: layoutOffsetUpper, width: width, height: height }; var rowFixedLength = mathMin$7(width, height); var best = Infinity; // the best row score so far var row = []; row.area = 0; for (var i = 0, len = viewChildren.length; i < len;) { var child = viewChildren[i]; row.push(child); row.area += child.getLayout().area; var score = worst(row, rowFixedLength, options.squareRatio); // continue with this orientation if (score <= best) { i++; best = score; } // abort, and try a different orientation else { row.area -= row.pop().getLayout().area; position(row, rowFixedLength, rect, halfGapWidth, false); rowFixedLength = mathMin$7(rect.width, rect.height); row.length = row.area = 0; best = Infinity; } } if (row.length) { position(row, rowFixedLength, rect, halfGapWidth, true); } if (!hideChildren) { var childrenVisibleMin = nodeModel.get('childrenVisibleMin'); if (childrenVisibleMin != null && totalArea < childrenVisibleMin) { hideChildren = true; } } for (var i = 0, len = viewChildren.length; i < len; i++) { squarify(viewChildren[i], options, hideChildren, depth + 1); } } /** * Set area to each child, and calculate data extent for visual coding. */ function initChildren(node, nodeModel, totalArea, options, hideChildren, depth) { var viewChildren = node.children || []; var orderBy = options.sort; orderBy !== 'asc' && orderBy !== 'desc' && (orderBy = null); var overLeafDepth = options.leafDepth != null && options.leafDepth <= depth; // leafDepth has higher priority. if (hideChildren && !overLeafDepth) { return node.viewChildren = []; } // Sort children, order by desc. viewChildren = filter(viewChildren, function (child) { return !child.isRemoved(); }); sort$1(viewChildren, orderBy); var info = statistic(nodeModel, viewChildren, orderBy); if (info.sum === 0) { return node.viewChildren = []; } info.sum = filterByThreshold(nodeModel, totalArea, info.sum, orderBy, viewChildren); if (info.sum === 0) { return node.viewChildren = []; } // Set area to each child. for (var i = 0, len = viewChildren.length; i < len; i++) { var area = viewChildren[i].getValue() / info.sum * totalArea; // Do not use setLayout({...}, true), because it is needed to clear last layout. viewChildren[i].setLayout({ area: area }); } if (overLeafDepth) { viewChildren.length && node.setLayout({ isLeafRoot: true }, true); viewChildren.length = 0; } node.viewChildren = viewChildren; node.setLayout({ dataExtent: info.dataExtent }, true); return viewChildren; } /** * Consider 'visibleMin'. Modify viewChildren and get new sum. */ function filterByThreshold(nodeModel, totalArea, sum, orderBy, orderedChildren) { // visibleMin is not supported yet when no option.sort. if (!orderBy) { return sum; } var visibleMin = nodeModel.get('visibleMin'); var len = orderedChildren.length; var deletePoint = len; // Always travel from little value to big value. for (var i = len - 1; i >= 0; i--) { var value = orderedChildren[orderBy === 'asc' ? len - i - 1 : i].getValue(); if (value / sum * totalArea < visibleMin) { deletePoint = i; sum -= value; } } orderBy === 'asc' ? orderedChildren.splice(0, len - deletePoint) : orderedChildren.splice(deletePoint, len - deletePoint); return sum; } /** * Sort */ function sort$1(viewChildren, orderBy) { if (orderBy) { viewChildren.sort(function (a, b) { var diff = orderBy === 'asc' ? a.getValue() - b.getValue() : b.getValue() - a.getValue(); return diff === 0 ? orderBy === 'asc' ? a.dataIndex - b.dataIndex : b.dataIndex - a.dataIndex : diff; }); } return viewChildren; } /** * Statistic */ function statistic(nodeModel, children, orderBy) { // Calculate sum. var sum = 0; for (var i = 0, len = children.length; i < len; i++) { sum += children[i].getValue(); } // Statistic data extent for latter visual coding. // Notice: data extent should be calculate based on raw children // but not filtered view children, otherwise visual mapping will not // be stable when zoom (where children is filtered by visibleMin). var dimension = nodeModel.get('visualDimension'); var dataExtent; // The same as area dimension. if (!children || !children.length) { dataExtent = [NaN, NaN]; } else if (dimension === 'value' && orderBy) { dataExtent = [children[children.length - 1].getValue(), children[0].getValue()]; orderBy === 'asc' && dataExtent.reverse(); } // Other dimension. else { dataExtent = [Infinity, -Infinity]; each$5(children, function (child) { var value = child.getValue(dimension); value < dataExtent[0] && (dataExtent[0] = value); value > dataExtent[1] && (dataExtent[1] = value); }); } return { sum: sum, dataExtent: dataExtent }; } /** * Computes the score for the specified row, * as the worst aspect ratio. */ function worst(row, rowFixedLength, ratio) { var areaMax = 0; var areaMin = Infinity; for (var i = 0, area = void 0, len = row.length; i < len; i++) { area = row[i].getLayout().area; if (area) { area < areaMin && (areaMin = area); area > areaMax && (areaMax = area); } } var squareArea = row.area * row.area; var f = rowFixedLength * rowFixedLength * ratio; return squareArea ? mathMax$7(f * areaMax / squareArea, squareArea / (f * areaMin)) : Infinity; } /** * Positions the specified row of nodes. Modifies `rect`. */ function position(row, rowFixedLength, rect, halfGapWidth, flush) { // When rowFixedLength === rect.width, // it is horizontal subdivision, // rowFixedLength is the width of the subdivision, // rowOtherLength is the height of the subdivision, // and nodes will be positioned from left to right. // wh[idx0WhenH] means: when horizontal, // wh[idx0WhenH] => wh[0] => 'width'. // xy[idx1WhenH] => xy[1] => 'y'. var idx0WhenH = rowFixedLength === rect.width ? 0 : 1; var idx1WhenH = 1 - idx0WhenH; var xy = ['x', 'y']; var wh = ['width', 'height']; var last = rect[xy[idx0WhenH]]; var rowOtherLength = rowFixedLength ? row.area / rowFixedLength : 0; if (flush || rowOtherLength > rect[wh[idx1WhenH]]) { rowOtherLength = rect[wh[idx1WhenH]]; // over+underflow } for (var i = 0, rowLen = row.length; i < rowLen; i++) { var node = row[i]; var nodeLayout = {}; var step = rowOtherLength ? node.getLayout().area / rowOtherLength : 0; var wh1 = nodeLayout[wh[idx1WhenH]] = mathMax$7(rowOtherLength - 2 * halfGapWidth, 0); // We use Math.max/min to avoid negative width/height when considering gap width. var remain = rect[xy[idx0WhenH]] + rect[wh[idx0WhenH]] - last; var modWH = i === rowLen - 1 || remain < step ? remain : step; var wh0 = nodeLayout[wh[idx0WhenH]] = mathMax$7(modWH - 2 * halfGapWidth, 0); nodeLayout[xy[idx1WhenH]] = rect[xy[idx1WhenH]] + mathMin$7(halfGapWidth, wh1 / 2); nodeLayout[xy[idx0WhenH]] = last + mathMin$7(halfGapWidth, wh0 / 2); last += modWH; node.setLayout(nodeLayout, true); } rect[xy[idx1WhenH]] += rowOtherLength; rect[wh[idx1WhenH]] -= rowOtherLength; } // Return [containerWidth, containerHeight] as default. function estimateRootSize(seriesModel, targetInfo, viewRoot, containerWidth, containerHeight) { // If targetInfo.node exists, we zoom to the node, // so estimate whold width and heigth by target node. var currNode = (targetInfo || {}).node; var defaultSize = [containerWidth, containerHeight]; if (!currNode || currNode === viewRoot) { return defaultSize; } var parent; var viewArea = containerWidth * containerHeight; var area = viewArea * seriesModel.option.zoomToNodeRatio; while (parent = currNode.parentNode) { // jshint ignore:line var sum = 0; var siblings = parent.children; for (var i = 0, len = siblings.length; i < len; i++) { sum += siblings[i].getValue(); } var currNodeValue = currNode.getValue(); if (currNodeValue === 0) { return defaultSize; } area *= sum / currNodeValue; // Considering border, suppose aspect ratio is 1. var parentModel = parent.getModel(); var borderWidth = parentModel.get(PATH_BORDER_WIDTH); var upperHeight = Math.max(borderWidth, getUpperLabelHeight(parentModel)); area += 4 * borderWidth * borderWidth + (3 * borderWidth + upperHeight) * Math.pow(area, 0.5); area > MAX_SAFE_INTEGER && (area = MAX_SAFE_INTEGER); currNode = parent; } area < viewArea && (area = viewArea); var scale = Math.pow(area / viewArea, 0.5); return [containerWidth * scale, containerHeight * scale]; } // Root postion base on coord of containerGroup function calculateRootPosition(layoutInfo, rootRect, targetInfo) { if (rootRect) { return { x: rootRect.x, y: rootRect.y }; } var defaultPosition = { x: 0, y: 0 }; if (!targetInfo) { return defaultPosition; } // If targetInfo is fetched by 'retrieveTargetInfo', // old tree and new tree are the same tree, // so the node still exists and we can visit it. var targetNode = targetInfo.node; var layout = targetNode.getLayout(); if (!layout) { return defaultPosition; } // Transform coord from local to container. var targetCenter = [layout.width / 2, layout.height / 2]; var node = targetNode; while (node) { var nodeLayout = node.getLayout(); targetCenter[0] += nodeLayout.x; targetCenter[1] += nodeLayout.y; node = node.parentNode; } return { x: layoutInfo.width / 2 - targetCenter[0], y: layoutInfo.height / 2 - targetCenter[1] }; } // Mark nodes visible for prunning when visual coding and rendering. // Prunning depends on layout and root position, so we have to do it after layout. function prunning(node, clipRect, viewAbovePath, viewRoot, depth) { var nodeLayout = node.getLayout(); var nodeInViewAbovePath = viewAbovePath[depth]; var isAboveViewRoot = nodeInViewAbovePath && nodeInViewAbovePath === node; if (nodeInViewAbovePath && !isAboveViewRoot || depth === viewAbovePath.length && node !== viewRoot) { return; } node.setLayout({ // isInView means: viewRoot sub tree + viewAbovePath isInView: true, // invisible only means: outside view clip so that the node can not // see but still layout for animation preparation but not render. invisible: !isAboveViewRoot && !clipRect.intersect(nodeLayout), isAboveViewRoot: isAboveViewRoot }, true); // Transform to child coordinate. var childClipRect = new BoundingRect(clipRect.x - nodeLayout.x, clipRect.y - nodeLayout.y, clipRect.width, clipRect.height); each$5(node.viewChildren || [], function (child) { prunning(child, childClipRect, viewAbovePath, viewRoot, depth + 1); }); } function getUpperLabelHeight(model) { return model.get(PATH_UPPER_LABEL_SHOW) ? model.get(PATH_UPPER_LABEL_HEIGHT) : 0; } function install$c(registers) { registers.registerSeriesModel(TreemapSeriesModel); registers.registerChartView(TreemapView); registers.registerVisual(treemapVisual); registers.registerLayout(treemapLayout); installTreemapAction(registers); } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ function categoryFilter(ecModel) { var legendModels = ecModel.findComponents({ mainType: 'legend' }); if (!legendModels || !legendModels.length) { return; } ecModel.eachSeriesByType('graph', function (graphSeries) { var categoriesData = graphSeries.getCategoriesData(); var graph = graphSeries.getGraph(); var data = graph.data; var categoryNames = categoriesData.mapArray(categoriesData.getName); data.filterSelf(function (idx) { var model = data.getItemModel(idx); var category = model.getShallow('category'); if (category != null) { if (typeof category === 'number') { category = categoryNames[category]; } // If in any legend component the status is not selected. for (var i = 0; i < legendModels.length; i++) { if (!legendModels[i].isSelected(category)) { return false; } } } return true; }); }); } function categoryVisual(ecModel) { var paletteScope = {}; ecModel.eachSeriesByType('graph', function (seriesModel) { var categoriesData = seriesModel.getCategoriesData(); var data = seriesModel.getData(); var categoryNameIdxMap = {}; categoriesData.each(function (idx) { var name = categoriesData.getName(idx); // Add prefix to avoid conflict with Object.prototype. categoryNameIdxMap['ec-' + name] = idx; var itemModel = categoriesData.getItemModel(idx); var style = itemModel.getModel('itemStyle').getItemStyle(); if (!style.fill) { // Get color from palette. style.fill = seriesModel.getColorFromPalette(name, paletteScope); } categoriesData.setItemVisual(idx, 'style', style); var symbolVisualList = ['symbol', 'symbolSize', 'symbolKeepAspect']; for (var i = 0; i < symbolVisualList.length; i++) { var symbolVisual = itemModel.getShallow(symbolVisualList[i], true); if (symbolVisual != null) { categoriesData.setItemVisual(idx, symbolVisualList[i], symbolVisual); } } }); // Assign category color to visual if (categoriesData.count()) { data.each(function (idx) { var model = data.getItemModel(idx); var categoryIdx = model.getShallow('category'); if (categoryIdx != null) { if (typeof categoryIdx === 'string') { categoryIdx = categoryNameIdxMap['ec-' + categoryIdx]; } var categoryStyle = categoriesData.getItemVisual(categoryIdx, 'style'); var style = data.ensureUniqueItemVisual(idx, 'style'); extend(style, categoryStyle); var visualList = ['symbol', 'symbolSize', 'symbolKeepAspect']; for (var i = 0; i < visualList.length; i++) { data.setItemVisual(idx, visualList[i], categoriesData.getItemVisual(categoryIdx, visualList[i])); } } }); } }); } function normalize$2(a) { if (!(a instanceof Array)) { a = [a, a]; } return a; } function graphEdgeVisual(ecModel) { ecModel.eachSeriesByType('graph', function (seriesModel) { var graph = seriesModel.getGraph(); var edgeData = seriesModel.getEdgeData(); var symbolType = normalize$2(seriesModel.get('edgeSymbol')); var symbolSize = normalize$2(seriesModel.get('edgeSymbolSize')); // const colorQuery = ['lineStyle', 'color'] as const; // const opacityQuery = ['lineStyle', 'opacity'] as const; edgeData.setVisual('fromSymbol', symbolType && symbolType[0]); edgeData.setVisual('toSymbol', symbolType && symbolType[1]); edgeData.setVisual('fromSymbolSize', symbolSize && symbolSize[0]); edgeData.setVisual('toSymbolSize', symbolSize && symbolSize[1]); edgeData.setVisual('style', seriesModel.getModel('lineStyle').getLineStyle()); edgeData.each(function (idx) { var itemModel = edgeData.getItemModel(idx); var edge = graph.getEdgeByIndex(idx); var symbolType = normalize$2(itemModel.getShallow('symbol', true)); var symbolSize = normalize$2(itemModel.getShallow('symbolSize', true)); // Edge visual must after node visual var style = itemModel.getModel('lineStyle').getLineStyle(); var existsStyle = edgeData.ensureUniqueItemVisual(idx, 'style'); extend(existsStyle, style); switch (existsStyle.stroke) { case 'source': { var nodeStyle = edge.node1.getVisual('style'); existsStyle.stroke = nodeStyle && nodeStyle.fill; break; } case 'target': { var nodeStyle = edge.node2.getVisual('style'); existsStyle.stroke = nodeStyle && nodeStyle.fill; break; } } symbolType[0] && edge.setVisual('fromSymbol', symbolType[0]); symbolType[1] && edge.setVisual('toSymbol', symbolType[1]); symbolSize[0] && edge.setVisual('fromSymbolSize', symbolSize[0]); symbolSize[1] && edge.setVisual('toSymbolSize', symbolSize[1]); }); }); } var KEY_DELIMITER = '-->'; /** * params handler * @param {module:echarts/model/SeriesModel} seriesModel * @returns {*} */ var getAutoCurvenessParams = function (seriesModel) { return seriesModel.get('autoCurveness') || null; }; /** * Generate a list of edge curvatures, 20 is the default * @param {module:echarts/model/SeriesModel} seriesModel * @param {number} appendLength * @return 20 => [0, -0.2, 0.2, -0.4, 0.4, -0.6, 0.6, -0.8, 0.8, -1, 1, -1.2, 1.2, -1.4, 1.4, -1.6, 1.6, -1.8, 1.8, -2] */ var createCurveness = function (seriesModel, appendLength) { var autoCurvenessParmas = getAutoCurvenessParams(seriesModel); var length = 20; var curvenessList = []; // handler the function set if (typeof autoCurvenessParmas === 'number') { length = autoCurvenessParmas; } else if (isArray(autoCurvenessParmas)) { seriesModel.__curvenessList = autoCurvenessParmas; return; } // append length if (appendLength > length) { length = appendLength; } // make sure the length is even var len = length % 2 ? length + 2 : length + 3; curvenessList = []; for (var i = 0; i < len; i++) { curvenessList.push((i % 2 ? i + 1 : i) / 10 * (i % 2 ? -1 : 1)); } seriesModel.__curvenessList = curvenessList; }; /** * Create different cache key data in the positive and negative directions, in order to set the curvature later * @param {number|string|module:echarts/data/Graph.Node} n1 * @param {number|string|module:echarts/data/Graph.Node} n2 * @param {module:echarts/model/SeriesModel} seriesModel * @returns {string} key */ var getKeyOfEdges = function (n1, n2, seriesModel) { var source = [n1.id, n1.dataIndex].join('.'); var target = [n2.id, n2.dataIndex].join('.'); return [seriesModel.uid, source, target].join(KEY_DELIMITER); }; /** * get opposite key * @param {string} key * @returns {string} */ var getOppositeKey = function (key) { var keys = key.split(KEY_DELIMITER); return [keys[0], keys[2], keys[1]].join(KEY_DELIMITER); }; /** * get edgeMap with key * @param edge * @param {module:echarts/model/SeriesModel} seriesModel */ var getEdgeFromMap = function (edge, seriesModel) { var key = getKeyOfEdges(edge.node1, edge.node2, seriesModel); return seriesModel.__edgeMap[key]; }; /** * calculate all cases total length * @param edge * @param seriesModel * @returns {number} */ var getTotalLengthBetweenNodes = function (edge, seriesModel) { var len = getEdgeMapLengthWithKey(getKeyOfEdges(edge.node1, edge.node2, seriesModel), seriesModel); var lenV = getEdgeMapLengthWithKey(getKeyOfEdges(edge.node2, edge.node1, seriesModel), seriesModel); return len + lenV; }; /** * * @param key */ var getEdgeMapLengthWithKey = function (key, seriesModel) { var edgeMap = seriesModel.__edgeMap; return edgeMap[key] ? edgeMap[key].length : 0; }; /** * Count the number of edges between the same two points, used to obtain the curvature table and the parity of the edge * @see /graph/GraphSeries.js@getInitialData * @param {module:echarts/model/SeriesModel} seriesModel */ function initCurvenessList(seriesModel) { if (!getAutoCurvenessParams(seriesModel)) { return; } seriesModel.__curvenessList = []; seriesModel.__edgeMap = {}; // calc the array of curveness List createCurveness(seriesModel); } /** * set edgeMap with key * @param {number|string|module:echarts/data/Graph.Node} n1 * @param {number|string|module:echarts/data/Graph.Node} n2 * @param {module:echarts/model/SeriesModel} seriesModel * @param {number} index */ function createEdgeMapForCurveness(n1, n2, seriesModel, index) { if (!getAutoCurvenessParams(seriesModel)) { return; } var key = getKeyOfEdges(n1, n2, seriesModel); var edgeMap = seriesModel.__edgeMap; var oppositeEdges = edgeMap[getOppositeKey(key)]; // set direction if (edgeMap[key] && !oppositeEdges) { edgeMap[key].isForward = true; } else if (oppositeEdges && edgeMap[key]) { oppositeEdges.isForward = true; edgeMap[key].isForward = false; } edgeMap[key] = edgeMap[key] || []; edgeMap[key].push(index); } /** * get curvature for edge * @param edge * @param {module:echarts/model/SeriesModel} seriesModel * @param index */ function getCurvenessForEdge(edge, seriesModel, index, needReverse) { var autoCurvenessParams = getAutoCurvenessParams(seriesModel); var isArrayParam = isArray(autoCurvenessParams); if (!autoCurvenessParams) { return null; } var edgeArray = getEdgeFromMap(edge, seriesModel); if (!edgeArray) { return null; } var edgeIndex = -1; for (var i = 0; i < edgeArray.length; i++) { if (edgeArray[i] === index) { edgeIndex = i; break; } } // if totalLen is Longer createCurveness var totalLen = getTotalLengthBetweenNodes(edge, seriesModel); createCurveness(seriesModel, totalLen); edge.lineStyle = edge.lineStyle || {}; // if is opposite edge, must set curvenss to opposite number var curKey = getKeyOfEdges(edge.node1, edge.node2, seriesModel); var curvenessList = seriesModel.__curvenessList; // if pass array no need parity var parityCorrection = isArrayParam ? 0 : totalLen % 2 ? 0 : 1; if (!edgeArray.isForward) { // the opposite edge show outside var oppositeKey = getOppositeKey(curKey); var len = getEdgeMapLengthWithKey(oppositeKey, seriesModel); var resValue = curvenessList[edgeIndex + len + parityCorrection]; // isNeedReverse, simple, force type need reverse the curveness in the junction of the forword and the opposite if (needReverse) { // set as array may make the parity handle with the len of opposite if (isArrayParam) { if (autoCurvenessParams && autoCurvenessParams[0] === 0) { return (len + parityCorrection) % 2 ? resValue : -resValue; } else { return ((len % 2 ? 0 : 1) + parityCorrection) % 2 ? resValue : -resValue; } } else { return (len + parityCorrection) % 2 ? resValue : -resValue; } } else { return curvenessList[edgeIndex + len + parityCorrection]; } } else { return curvenessList[parityCorrection + edgeIndex]; } } function simpleLayout(seriesModel) { var coordSys = seriesModel.coordinateSystem; if (coordSys && coordSys.type !== 'view') { return; } var graph = seriesModel.getGraph(); graph.eachNode(function (node) { var model = node.getModel(); node.setLayout([+model.get('x'), +model.get('y')]); }); simpleLayoutEdge(graph, seriesModel); } function simpleLayoutEdge(graph, seriesModel) { graph.eachEdge(function (edge, index) { var curveness = retrieve3(edge.getModel().get(['lineStyle', 'curveness']), -getCurvenessForEdge(edge, seriesModel, index, true), 0); var p1 = clone$1(edge.node1.getLayout()); var p2 = clone$1(edge.node2.getLayout()); var points = [p1, p2]; if (+curveness) { points.push([(p1[0] + p2[0]) / 2 - (p1[1] - p2[1]) * curveness, (p1[1] + p2[1]) / 2 - (p2[0] - p1[0]) * curveness]); } edge.setLayout(points); }); } function graphSimpleLayout(ecModel, api) { ecModel.eachSeriesByType('graph', function (seriesModel) { var layout = seriesModel.get('layout'); var coordSys = seriesModel.coordinateSystem; if (coordSys && coordSys.type !== 'view') { var data_1 = seriesModel.getData(); var dimensions_1 = []; each(coordSys.dimensions, function (coordDim) { dimensions_1 = dimensions_1.concat(data_1.mapDimensionsAll(coordDim)); }); for (var dataIndex = 0; dataIndex < data_1.count(); dataIndex++) { var value = []; var hasValue = false; for (var i = 0; i < dimensions_1.length; i++) { var val = data_1.get(dimensions_1[i], dataIndex); if (!isNaN(val)) { hasValue = true; } value.push(val); } if (hasValue) { data_1.setItemLayout(dataIndex, coordSys.dataToPoint(value)); } else { // Also {Array.}, not undefined to avoid if...else... statement data_1.setItemLayout(dataIndex, [NaN, NaN]); } } simpleLayoutEdge(data_1.graph, seriesModel); } else if (!layout || layout === 'none') { simpleLayout(seriesModel); } }); } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ function getNodeGlobalScale(seriesModel) { var coordSys = seriesModel.coordinateSystem; if (coordSys.type !== 'view') { return 1; } var nodeScaleRatio = seriesModel.option.nodeScaleRatio; var groupZoom = coordSys.scaleX; // Scale node when zoom changes var roamZoom = coordSys.getZoom(); var nodeScale = (roamZoom - 1) * nodeScaleRatio + 1; return nodeScale / groupZoom; } function getSymbolSize(node) { var symbolSize = node.getVisual('symbolSize'); if (symbolSize instanceof Array) { symbolSize = (symbolSize[0] + symbolSize[1]) / 2; } return +symbolSize; } var PI$6 = Math.PI; var _symbolRadiansHalf = []; /** * `basedOn` can be: * 'value': * This layout is not accurate and have same bad case. For example, * if the min value is very smaller than the max value, the nodes * with the min value probably overlap even though there is enough * space to layout them. So we only use this approach in the as the * init layout of the force layout. * FIXME * Probably we do not need this method any more but use * `basedOn: 'symbolSize'` in force layout if * delay its init operations to GraphView. * 'symbolSize': * This approach work only if all of the symbol size calculated. * That is, the progressive rendering is not applied to graph. * FIXME * If progressive rendering is applied to graph some day, * probably we have to use `basedOn: 'value'`. */ function circularLayout(seriesModel, basedOn) { var coordSys = seriesModel.coordinateSystem; if (coordSys && coordSys.type !== 'view') { return; } var rect = coordSys.getBoundingRect(); var nodeData = seriesModel.getData(); var graph = nodeData.graph; var cx = rect.width / 2 + rect.x; var cy = rect.height / 2 + rect.y; var r = Math.min(rect.width, rect.height) / 2; var count = nodeData.count(); nodeData.setLayout({ cx: cx, cy: cy }); if (!count) { return; } _layoutNodesBasedOn[basedOn](seriesModel, graph, nodeData, r, cx, cy, count); graph.eachEdge(function (edge, index) { var curveness = retrieve3(edge.getModel().get(['lineStyle', 'curveness']), getCurvenessForEdge(edge, seriesModel, index), 0); var p1 = clone$1(edge.node1.getLayout()); var p2 = clone$1(edge.node2.getLayout()); var cp1; var x12 = (p1[0] + p2[0]) / 2; var y12 = (p1[1] + p2[1]) / 2; if (+curveness) { curveness *= 3; cp1 = [cx * curveness + x12 * (1 - curveness), cy * curveness + y12 * (1 - curveness)]; } edge.setLayout([p1, p2, cp1]); }); } var _layoutNodesBasedOn = { value: function (seriesModel, graph, nodeData, r, cx, cy, count) { var angle = 0; var sum = nodeData.getSum('value'); var unitAngle = Math.PI * 2 / (sum || count); graph.eachNode(function (node) { var value = node.getValue('value'); var radianHalf = unitAngle * (sum ? value : 1) / 2; angle += radianHalf; node.setLayout([r * Math.cos(angle) + cx, r * Math.sin(angle) + cy]); angle += radianHalf; }); }, symbolSize: function (seriesModel, graph, nodeData, r, cx, cy, count) { var sumRadian = 0; _symbolRadiansHalf.length = count; var nodeScale = getNodeGlobalScale(seriesModel); graph.eachNode(function (node) { var symbolSize = getSymbolSize(node); // Normally this case will not happen, but we still add // some the defensive code (2px is an arbitrary value). isNaN(symbolSize) && (symbolSize = 2); symbolSize < 0 && (symbolSize = 0); symbolSize *= nodeScale; var symbolRadianHalf = Math.asin(symbolSize / 2 / r); // when `symbolSize / 2` is bigger than `r`. isNaN(symbolRadianHalf) && (symbolRadianHalf = PI$6 / 2); _symbolRadiansHalf[node.dataIndex] = symbolRadianHalf; sumRadian += symbolRadianHalf * 2; }); var halfRemainRadian = (2 * PI$6 - sumRadian) / count / 2; var angle = 0; graph.eachNode(function (node) { var radianHalf = halfRemainRadian + _symbolRadiansHalf[node.dataIndex]; angle += radianHalf; node.setLayout([r * Math.cos(angle) + cx, r * Math.sin(angle) + cy]); angle += radianHalf; }); } }; function graphCircularLayout(ecModel) { ecModel.eachSeriesByType('graph', function (seriesModel) { if (seriesModel.get('layout') === 'circular') { circularLayout(seriesModel, 'symbolSize'); } }); } var scaleAndAdd$1 = scaleAndAdd; // function adjacentNode(n, e) { // return e.n1 === n ? e.n2 : e.n1; // } function forceLayout(inNodes, inEdges, opts) { var nodes = inNodes; var edges = inEdges; var rect = opts.rect; var width = rect.width; var height = rect.height; var center = [rect.x + width / 2, rect.y + height / 2]; // let scale = opts.scale || 1; var gravity = opts.gravity == null ? 0.1 : opts.gravity; // for (let i = 0; i < edges.length; i++) { // let e = edges[i]; // let n1 = e.n1; // let n2 = e.n2; // n1.edges = n1.edges || []; // n2.edges = n2.edges || []; // n1.edges.push(e); // n2.edges.push(e); // } // Init position for (var i = 0; i < nodes.length; i++) { var n = nodes[i]; if (!n.p) { n.p = create(width * (Math.random() - 0.5) + center[0], height * (Math.random() - 0.5) + center[1]); } n.pp = clone$1(n.p); n.edges = null; } // Formula in 'Graph Drawing by Force-directed Placement' // let k = scale * Math.sqrt(width * height / nodes.length); // let k2 = k * k; var initialFriction = opts.friction == null ? 0.6 : opts.friction; var friction = initialFriction; var beforeStepCallback; var afterStepCallback; return { warmUp: function () { friction = initialFriction * 0.8; }, setFixed: function (idx) { nodes[idx].fixed = true; }, setUnfixed: function (idx) { nodes[idx].fixed = false; }, /** * Before step hook */ beforeStep: function (cb) { beforeStepCallback = cb; }, /** * After step hook */ afterStep: function (cb) { afterStepCallback = cb; }, /** * Some formulas were originally copied from "d3.js" * https://github.com/d3/d3/blob/b516d77fb8566b576088e73410437494717ada26/src/layout/force.js * with some modifications made for this project. * See the license statement at the head of this file. */ step: function (cb) { beforeStepCallback && beforeStepCallback(nodes, edges); var v12 = []; var nLen = nodes.length; for (var i = 0; i < edges.length; i++) { var e = edges[i]; if (e.ignoreForceLayout) { continue; } var n1 = e.n1; var n2 = e.n2; sub(v12, n2.p, n1.p); var d = len(v12) - e.d; var w = n2.w / (n1.w + n2.w); if (isNaN(w)) { w = 0; } normalize(v12, v12); !n1.fixed && scaleAndAdd$1(n1.p, n1.p, v12, w * d * friction); !n2.fixed && scaleAndAdd$1(n2.p, n2.p, v12, -(1 - w) * d * friction); } // Gravity for (var i = 0; i < nLen; i++) { var n = nodes[i]; if (!n.fixed) { sub(v12, center, n.p); // let d = vec2.len(v12); // vec2.scale(v12, v12, 1 / d); // let gravityFactor = gravity; scaleAndAdd$1(n.p, n.p, v12, gravity * friction); } } // Repulsive // PENDING for (var i = 0; i < nLen; i++) { var n1 = nodes[i]; for (var j = i + 1; j < nLen; j++) { var n2 = nodes[j]; sub(v12, n2.p, n1.p); var d = len(v12); if (d === 0) { // Random repulse set(v12, Math.random() - 0.5, Math.random() - 0.5); d = 1; } var repFact = (n1.rep + n2.rep) / d / d; !n1.fixed && scaleAndAdd$1(n1.pp, n1.pp, v12, repFact); !n2.fixed && scaleAndAdd$1(n2.pp, n2.pp, v12, -repFact); } } var v = []; for (var i = 0; i < nLen; i++) { var n = nodes[i]; if (!n.fixed) { sub(v, n.p, n.pp); scaleAndAdd$1(n.p, n.p, v, friction); copy(n.pp, n.p); } } friction = friction * 0.992; var finished = friction < 0.01; afterStepCallback && afterStepCallback(nodes, edges, finished); cb && cb(finished); } }; } function graphForceLayout(ecModel) { ecModel.eachSeriesByType('graph', function (graphSeries) { var coordSys = graphSeries.coordinateSystem; if (coordSys && coordSys.type !== 'view') { return; } if (graphSeries.get('layout') === 'force') { var preservedPoints_1 = graphSeries.preservedPoints || {}; var graph_1 = graphSeries.getGraph(); var nodeData_1 = graph_1.data; var edgeData = graph_1.edgeData; var forceModel = graphSeries.getModel('force'); var initLayout = forceModel.get('initLayout'); if (graphSeries.preservedPoints) { nodeData_1.each(function (idx) { var id = nodeData_1.getId(idx); nodeData_1.setItemLayout(idx, preservedPoints_1[id] || [NaN, NaN]); }); } else if (!initLayout || initLayout === 'none') { simpleLayout(graphSeries); } else if (initLayout === 'circular') { circularLayout(graphSeries, 'value'); } var nodeDataExtent_1 = nodeData_1.getDataExtent('value'); var edgeDataExtent_1 = edgeData.getDataExtent('value'); // let edgeDataExtent = edgeData.getDataExtent('value'); var repulsion = forceModel.get('repulsion'); var edgeLength = forceModel.get('edgeLength'); var repulsionArr_1 = isArray(repulsion) ? repulsion : [repulsion, repulsion]; var edgeLengthArr_1 = isArray(edgeLength) ? edgeLength : [edgeLength, edgeLength]; // Larger value has smaller length edgeLengthArr_1 = [edgeLengthArr_1[1], edgeLengthArr_1[0]]; var nodes_1 = nodeData_1.mapArray('value', function (value, idx) { var point = nodeData_1.getItemLayout(idx); var rep = linearMap(value, nodeDataExtent_1, repulsionArr_1); if (isNaN(rep)) { rep = (repulsionArr_1[0] + repulsionArr_1[1]) / 2; } return { w: rep, rep: rep, fixed: nodeData_1.getItemModel(idx).get('fixed'), p: !point || isNaN(point[0]) || isNaN(point[1]) ? null : point }; }); var edges = edgeData.mapArray('value', function (value, idx) { var edge = graph_1.getEdgeByIndex(idx); var d = linearMap(value, edgeDataExtent_1, edgeLengthArr_1); if (isNaN(d)) { d = (edgeLengthArr_1[0] + edgeLengthArr_1[1]) / 2; } var edgeModel = edge.getModel(); var curveness = retrieve3(edge.getModel().get(['lineStyle', 'curveness']), -getCurvenessForEdge(edge, graphSeries, idx, true), 0); return { n1: nodes_1[edge.node1.dataIndex], n2: nodes_1[edge.node2.dataIndex], d: d, curveness: curveness, ignoreForceLayout: edgeModel.get('ignoreForceLayout') }; }); // let coordSys = graphSeries.coordinateSystem; var rect = coordSys.getBoundingRect(); var forceInstance = forceLayout(nodes_1, edges, { rect: rect, gravity: forceModel.get('gravity'), friction: forceModel.get('friction') }); forceInstance.beforeStep(function (nodes, edges) { for (var i = 0, l = nodes.length; i < l; i++) { if (nodes[i].fixed) { // Write back to layout instance copy(nodes[i].p, graph_1.getNodeByIndex(i).getLayout()); } } }); forceInstance.afterStep(function (nodes, edges, stopped) { for (var i = 0, l = nodes.length; i < l; i++) { if (!nodes[i].fixed) { graph_1.getNodeByIndex(i).setLayout(nodes[i].p); } preservedPoints_1[nodeData_1.getId(i)] = nodes[i].p; } for (var i = 0, l = edges.length; i < l; i++) { var e = edges[i]; var edge = graph_1.getEdgeByIndex(i); var p1 = e.n1.p; var p2 = e.n2.p; var points = edge.getLayout(); points = points ? points.slice() : []; points[0] = points[0] || []; points[1] = points[1] || []; copy(points[0], p1); copy(points[1], p2); if (+e.curveness) { points[2] = [(p1[0] + p2[0]) / 2 - (p1[1] - p2[1]) * e.curveness, (p1[1] + p2[1]) / 2 - (p2[0] - p1[0]) * e.curveness]; } edge.setLayout(points); } }); graphSeries.forceLayout = forceInstance; graphSeries.preservedPoints = preservedPoints_1; // Step to get the layout forceInstance.step(); } else { // Remove prev injected forceLayout instance graphSeries.forceLayout = null; } }); } function getViewRect$2(seriesModel, api, aspect) { var option = extend(seriesModel.getBoxLayoutParams(), { aspect: aspect }); return getLayoutRect(option, { width: api.getWidth(), height: api.getHeight() }); } function createViewCoordSys(ecModel, api) { var viewList = []; ecModel.eachSeriesByType('graph', function (seriesModel) { var coordSysType = seriesModel.get('coordinateSystem'); if (!coordSysType || coordSysType === 'view') { var data_1 = seriesModel.getData(); var positions = data_1.mapArray(function (idx) { var itemModel = data_1.getItemModel(idx); return [+itemModel.get('x'), +itemModel.get('y')]; }); var min = []; var max = []; fromPoints(positions, min, max); // If width or height is 0 if (max[0] - min[0] === 0) { max[0] += 1; min[0] -= 1; } if (max[1] - min[1] === 0) { max[1] += 1; min[1] -= 1; } var aspect = (max[0] - min[0]) / (max[1] - min[1]); // FIXME If get view rect after data processed? var viewRect = getViewRect$2(seriesModel, api, aspect); // Position may be NaN, use view rect instead if (isNaN(aspect)) { min = [viewRect.x, viewRect.y]; max = [viewRect.x + viewRect.width, viewRect.y + viewRect.height]; } var bbWidth = max[0] - min[0]; var bbHeight = max[1] - min[1]; var viewWidth = viewRect.width; var viewHeight = viewRect.height; var viewCoordSys = seriesModel.coordinateSystem = new View(); viewCoordSys.zoomLimit = seriesModel.get('scaleLimit'); viewCoordSys.setBoundingRect(min[0], min[1], bbWidth, bbHeight); viewCoordSys.setViewRect(viewRect.x, viewRect.y, viewWidth, viewHeight); // Update roam info viewCoordSys.setCenter(seriesModel.get('center')); viewCoordSys.setZoom(seriesModel.get('zoom')); viewList.push(viewCoordSys); } }); return viewList; } var straightLineProto = Line.prototype; var bezierCurveProto = BezierCurve.prototype; var StraightLineShape = /** @class */ function () { function StraightLineShape() { // Start point this.x1 = 0; this.y1 = 0; // End point this.x2 = 0; this.y2 = 0; this.percent = 1; } return StraightLineShape; }(); var CurveShape = /** @class */ function (_super) { __extends(CurveShape, _super); function CurveShape() { return _super !== null && _super.apply(this, arguments) || this; } return CurveShape; }(StraightLineShape); function isStraightLine(shape) { return isNaN(+shape.cpx1) || isNaN(+shape.cpy1); } var ECLinePath = /** @class */ function (_super) { __extends(ECLinePath, _super); function ECLinePath(opts) { var _this = _super.call(this, opts) || this; _this.type = 'ec-line'; return _this; } ECLinePath.prototype.getDefaultStyle = function () { return { stroke: '#000', fill: null }; }; ECLinePath.prototype.getDefaultShape = function () { return new StraightLineShape(); }; ECLinePath.prototype.buildPath = function (ctx, shape) { if (isStraightLine(shape)) { straightLineProto.buildPath.call(this, ctx, shape); } else { bezierCurveProto.buildPath.call(this, ctx, shape); } }; ECLinePath.prototype.pointAt = function (t) { if (isStraightLine(this.shape)) { return straightLineProto.pointAt.call(this, t); } else { return bezierCurveProto.pointAt.call(this, t); } }; ECLinePath.prototype.tangentAt = function (t) { var shape = this.shape; var p = isStraightLine(shape) ? [shape.x2 - shape.x1, shape.y2 - shape.y1] : bezierCurveProto.tangentAt.call(this, t); return normalize(p, p); }; return ECLinePath; }(Path); var SYMBOL_CATEGORIES = ['fromSymbol', 'toSymbol']; function makeSymbolTypeKey(symbolCategory) { return '_' + symbolCategory + 'Type'; } /** * @inner */ function createSymbol$1(name, lineData, idx) { var symbolType = lineData.getItemVisual(idx, name); if (!symbolType || symbolType === 'none') { return; } var symbolSize = lineData.getItemVisual(idx, name + 'Size'); var symbolRotate = lineData.getItemVisual(idx, name + 'Rotate'); var symbolOffset = lineData.getItemVisual(idx, name + 'Offset') || 0; var symbolKeepAspect = lineData.getItemVisual(idx, name + 'KeepAspect'); var symbolSizeArr = isArray(symbolSize) ? symbolSize : [symbolSize, symbolSize]; var symbolOffsetArr = isArray(symbolOffset) ? symbolOffset : [symbolOffset, symbolOffset]; symbolOffsetArr[0] = parsePercent$1(symbolOffsetArr[0], symbolSizeArr[0]); symbolOffsetArr[1] = parsePercent$1(retrieve2(symbolOffsetArr[1], symbolOffsetArr[0]), symbolSizeArr[1]); var symbolPath = createSymbol(symbolType, -symbolSizeArr[0] / 2 + symbolOffsetArr[0], -symbolSizeArr[1] / 2 + symbolOffsetArr[1], symbolSizeArr[0], symbolSizeArr[1], null, symbolKeepAspect); symbolPath.__specifiedRotation = symbolRotate == null || isNaN(symbolRotate) ? void 0 : +symbolRotate * Math.PI / 180 || 0; symbolPath.name = name; return symbolPath; } function createLine(points) { var line = new ECLinePath({ name: 'line', subPixelOptimize: true }); setLinePoints(line.shape, points); return line; } function setLinePoints(targetShape, points) { targetShape.x1 = points[0][0]; targetShape.y1 = points[0][1]; targetShape.x2 = points[1][0]; targetShape.y2 = points[1][1]; targetShape.percent = 1; var cp1 = points[2]; if (cp1) { targetShape.cpx1 = cp1[0]; targetShape.cpy1 = cp1[1]; } else { targetShape.cpx1 = NaN; targetShape.cpy1 = NaN; } } var Line$1 = /** @class */ function (_super) { __extends(Line, _super); function Line(lineData, idx, seriesScope) { var _this = _super.call(this) || this; _this._createLine(lineData, idx, seriesScope); return _this; } Line.prototype._createLine = function (lineData, idx, seriesScope) { var seriesModel = lineData.hostModel; var linePoints = lineData.getItemLayout(idx); var line = createLine(linePoints); line.shape.percent = 0; initProps(line, { shape: { percent: 1 } }, seriesModel, idx); this.add(line); each(SYMBOL_CATEGORIES, function (symbolCategory) { var symbol = createSymbol$1(symbolCategory, lineData, idx); // symbols must added after line to make sure // it will be updated after line#update. // Or symbol position and rotation update in line#beforeUpdate will be one frame slow this.add(symbol); this[makeSymbolTypeKey(symbolCategory)] = lineData.getItemVisual(idx, symbolCategory); }, this); this._updateCommonStl(lineData, idx, seriesScope); }; // TODO More strict on the List type in parameters? Line.prototype.updateData = function (lineData, idx, seriesScope) { var seriesModel = lineData.hostModel; var line = this.childOfName('line'); var linePoints = lineData.getItemLayout(idx); var target = { shape: {} }; setLinePoints(target.shape, linePoints); updateProps(line, target, seriesModel, idx); each(SYMBOL_CATEGORIES, function (symbolCategory) { var symbolType = lineData.getItemVisual(idx, symbolCategory); var key = makeSymbolTypeKey(symbolCategory); // Symbol changed if (this[key] !== symbolType) { this.remove(this.childOfName(symbolCategory)); var symbol = createSymbol$1(symbolCategory, lineData, idx); this.add(symbol); } this[key] = symbolType; }, this); this._updateCommonStl(lineData, idx, seriesScope); }; Line.prototype.getLinePath = function () { return this.childAt(0); }; Line.prototype._updateCommonStl = function (lineData, idx, seriesScope) { var seriesModel = lineData.hostModel; var line = this.childOfName('line'); var emphasisLineStyle = seriesScope && seriesScope.emphasisLineStyle; var blurLineStyle = seriesScope && seriesScope.blurLineStyle; var selectLineStyle = seriesScope && seriesScope.selectLineStyle; var labelStatesModels = seriesScope && seriesScope.labelStatesModels; // Optimization for large dataset if (!seriesScope || lineData.hasItemOption) { var itemModel = lineData.getItemModel(idx); emphasisLineStyle = itemModel.getModel(['emphasis', 'lineStyle']).getLineStyle(); blurLineStyle = itemModel.getModel(['blur', 'lineStyle']).getLineStyle(); selectLineStyle = itemModel.getModel(['select', 'lineStyle']).getLineStyle(); labelStatesModels = getLabelStatesModels(itemModel); } var lineStyle = lineData.getItemVisual(idx, 'style'); var visualColor = lineStyle.stroke; line.useStyle(lineStyle); line.style.fill = null; line.style.strokeNoScale = true; line.ensureState('emphasis').style = emphasisLineStyle; line.ensureState('blur').style = blurLineStyle; line.ensureState('select').style = selectLineStyle; // Update symbol each(SYMBOL_CATEGORIES, function (symbolCategory) { var symbol = this.childOfName(symbolCategory); if (symbol) { // Share opacity and color with line. symbol.setColor(visualColor); symbol.style.opacity = lineStyle.opacity; for (var i = 0; i < SPECIAL_STATES.length; i++) { var stateName = SPECIAL_STATES[i]; var lineState = line.getState(stateName); if (lineState) { var lineStateStyle = lineState.style || {}; var state = symbol.ensureState(stateName); var stateStyle = state.style || (state.style = {}); if (lineStateStyle.stroke != null) { stateStyle[symbol.__isEmptyBrush ? 'stroke' : 'fill'] = lineStateStyle.stroke; } if (lineStateStyle.opacity != null) { stateStyle.opacity = lineStateStyle.opacity; } } } symbol.markRedraw(); } }, this); var rawVal = seriesModel.getRawValue(idx); setLabelStyle(this, labelStatesModels, { labelDataIndex: idx, labelFetcher: { getFormattedLabel: function (dataIndex, stateName) { return seriesModel.getFormattedLabel(dataIndex, stateName, lineData.dataType); } }, inheritColor: visualColor || '#000', defaultOpacity: lineStyle.opacity, defaultText: (rawVal == null ? lineData.getName(idx) : isFinite(rawVal) ? round(rawVal) : rawVal) + '' }); var label = this.getTextContent(); // Always set `textStyle` even if `normalStyle.text` is null, because default // values have to be set on `normalStyle`. if (label) { var labelNormalModel = labelStatesModels.normal; label.__align = label.style.align; label.__verticalAlign = label.style.verticalAlign; // 'start', 'middle', 'end' label.__position = labelNormalModel.get('position') || 'middle'; var distance = labelNormalModel.get('distance'); if (!isArray(distance)) { distance = [distance, distance]; } label.__labelDistance = distance; } this.setTextConfig({ position: null, local: true, inside: false // Can't be inside for stroke element. }); enableHoverEmphasis(this); }; Line.prototype.highlight = function () { enterEmphasis(this); }; Line.prototype.downplay = function () { leaveEmphasis(this); }; Line.prototype.updateLayout = function (lineData, idx) { this.setLinePoints(lineData.getItemLayout(idx)); }; Line.prototype.setLinePoints = function (points) { var linePath = this.childOfName('line'); setLinePoints(linePath.shape, points); linePath.dirty(); }; Line.prototype.beforeUpdate = function () { var lineGroup = this; var symbolFrom = lineGroup.childOfName('fromSymbol'); var symbolTo = lineGroup.childOfName('toSymbol'); var label = lineGroup.getTextContent(); // Quick reject if (!symbolFrom && !symbolTo && (!label || label.ignore)) { return; } var invScale = 1; var parentNode = this.parent; while (parentNode) { if (parentNode.scaleX) { invScale /= parentNode.scaleX; } parentNode = parentNode.parent; } var line = lineGroup.childOfName('line'); // If line not changed // FIXME Parent scale changed if (!this.__dirty && !line.__dirty) { return; } var percent = line.shape.percent; var fromPos = line.pointAt(0); var toPos = line.pointAt(percent); var d = sub([], toPos, fromPos); normalize(d, d); function setSymbolRotation(symbol, percent) { // Fix #12388 // when symbol is set to be 'arrow' in markLine, // symbolRotate value will be ignored, and compulsively use tangent angle. // rotate by default if symbol rotation is not specified var specifiedRotation = symbol.__specifiedRotation; if (specifiedRotation == null) { var tangent = line.tangentAt(percent); symbol.attr('rotation', (percent === 1 ? -1 : 1) * Math.PI / 2 - Math.atan2(tangent[1], tangent[0])); } else { symbol.attr('rotation', specifiedRotation); } } if (symbolFrom) { symbolFrom.setPosition(fromPos); setSymbolRotation(symbolFrom, 0); symbolFrom.scaleX = symbolFrom.scaleY = invScale * percent; symbolFrom.markRedraw(); } if (symbolTo) { symbolTo.setPosition(toPos); setSymbolRotation(symbolTo, 1); symbolTo.scaleX = symbolTo.scaleY = invScale * percent; symbolTo.markRedraw(); } if (label && !label.ignore) { label.x = label.y = 0; label.originX = label.originY = 0; var textAlign = void 0; var textVerticalAlign = void 0; var distance = label.__labelDistance; var distanceX = distance[0] * invScale; var distanceY = distance[1] * invScale; var halfPercent = percent / 2; var tangent = line.tangentAt(halfPercent); var n = [tangent[1], -tangent[0]]; var cp = line.pointAt(halfPercent); if (n[1] > 0) { n[0] = -n[0]; n[1] = -n[1]; } var dir = tangent[0] < 0 ? -1 : 1; if (label.__position !== 'start' && label.__position !== 'end') { var rotation = -Math.atan2(tangent[1], tangent[0]); if (toPos[0] < fromPos[0]) { rotation = Math.PI + rotation; } label.rotation = rotation; } var dy = void 0; switch (label.__position) { case 'insideStartTop': case 'insideMiddleTop': case 'insideEndTop': case 'middle': dy = -distanceY; textVerticalAlign = 'bottom'; break; case 'insideStartBottom': case 'insideMiddleBottom': case 'insideEndBottom': dy = distanceY; textVerticalAlign = 'top'; break; default: dy = 0; textVerticalAlign = 'middle'; } switch (label.__position) { case 'end': label.x = d[0] * distanceX + toPos[0]; label.y = d[1] * distanceY + toPos[1]; textAlign = d[0] > 0.8 ? 'left' : d[0] < -0.8 ? 'right' : 'center'; textVerticalAlign = d[1] > 0.8 ? 'top' : d[1] < -0.8 ? 'bottom' : 'middle'; break; case 'start': label.x = -d[0] * distanceX + fromPos[0]; label.y = -d[1] * distanceY + fromPos[1]; textAlign = d[0] > 0.8 ? 'right' : d[0] < -0.8 ? 'left' : 'center'; textVerticalAlign = d[1] > 0.8 ? 'bottom' : d[1] < -0.8 ? 'top' : 'middle'; break; case 'insideStartTop': case 'insideStart': case 'insideStartBottom': label.x = distanceX * dir + fromPos[0]; label.y = fromPos[1] + dy; textAlign = tangent[0] < 0 ? 'right' : 'left'; label.originX = -distanceX * dir; label.originY = -dy; break; case 'insideMiddleTop': case 'insideMiddle': case 'insideMiddleBottom': case 'middle': label.x = cp[0]; label.y = cp[1] + dy; textAlign = 'center'; label.originY = -dy; break; case 'insideEndTop': case 'insideEnd': case 'insideEndBottom': label.x = -distanceX * dir + toPos[0]; label.y = toPos[1] + dy; textAlign = tangent[0] >= 0 ? 'right' : 'left'; label.originX = distanceX * dir; label.originY = -dy; break; } label.scaleX = label.scaleY = invScale; label.setStyle({ // Use the user specified text align and baseline first verticalAlign: label.__verticalAlign || textVerticalAlign, align: label.__align || textAlign }); } }; return Line; }(Group); var LineDraw = /** @class */ function () { function LineDraw(LineCtor) { this.group = new Group(); this._LineCtor = LineCtor || Line$1; } LineDraw.prototype.isPersistent = function () { return true; }; LineDraw.prototype.updateData = function (lineData) { var _this = this; var lineDraw = this; var group = lineDraw.group; var oldLineData = lineDraw._lineData; lineDraw._lineData = lineData; // There is no oldLineData only when first rendering or switching from // stream mode to normal mode, where previous elements should be removed. if (!oldLineData) { group.removeAll(); } var seriesScope = makeSeriesScope$1(lineData); lineData.diff(oldLineData).add(function (idx) { _this._doAdd(lineData, idx, seriesScope); }).update(function (newIdx, oldIdx) { _this._doUpdate(oldLineData, lineData, oldIdx, newIdx, seriesScope); }).remove(function (idx) { group.remove(oldLineData.getItemGraphicEl(idx)); }).execute(); }; LineDraw.prototype.updateLayout = function () { var lineData = this._lineData; // Do not support update layout in incremental mode. if (!lineData) { return; } lineData.eachItemGraphicEl(function (el, idx) { el.updateLayout(lineData, idx); }, this); }; LineDraw.prototype.incrementalPrepareUpdate = function (lineData) { this._seriesScope = makeSeriesScope$1(lineData); this._lineData = null; this.group.removeAll(); }; LineDraw.prototype.incrementalUpdate = function (taskParams, lineData) { function updateIncrementalAndHover(el) { if (!el.isGroup && !isEffectObject(el)) { el.incremental = true; el.ensureState('emphasis').hoverLayer = true; } } for (var idx = taskParams.start; idx < taskParams.end; idx++) { var itemLayout = lineData.getItemLayout(idx); if (lineNeedsDraw(itemLayout)) { var el = new this._LineCtor(lineData, idx, this._seriesScope); el.traverse(updateIncrementalAndHover); this.group.add(el); lineData.setItemGraphicEl(idx, el); } } }; LineDraw.prototype.remove = function () { this.group.removeAll(); }; LineDraw.prototype._doAdd = function (lineData, idx, seriesScope) { var itemLayout = lineData.getItemLayout(idx); if (!lineNeedsDraw(itemLayout)) { return; } var el = new this._LineCtor(lineData, idx, seriesScope); lineData.setItemGraphicEl(idx, el); this.group.add(el); }; LineDraw.prototype._doUpdate = function (oldLineData, newLineData, oldIdx, newIdx, seriesScope) { var itemEl = oldLineData.getItemGraphicEl(oldIdx); if (!lineNeedsDraw(newLineData.getItemLayout(newIdx))) { this.group.remove(itemEl); return; } if (!itemEl) { itemEl = new this._LineCtor(newLineData, newIdx, seriesScope); } else { itemEl.updateData(newLineData, newIdx, seriesScope); } newLineData.setItemGraphicEl(newIdx, itemEl); this.group.add(itemEl); }; return LineDraw; }(); function isEffectObject(el) { return el.animators && el.animators.length > 0; } function makeSeriesScope$1(lineData) { var hostModel = lineData.hostModel; return { lineStyle: hostModel.getModel('lineStyle').getLineStyle(), emphasisLineStyle: hostModel.getModel(['emphasis', 'lineStyle']).getLineStyle(), blurLineStyle: hostModel.getModel(['blur', 'lineStyle']).getLineStyle(), selectLineStyle: hostModel.getModel(['select', 'lineStyle']).getLineStyle(), labelStatesModels: getLabelStatesModels(hostModel) }; } function isPointNaN(pt) { return isNaN(pt[0]) || isNaN(pt[1]); } function lineNeedsDraw(pts) { return !isPointNaN(pts[0]) && !isPointNaN(pts[1]); } var v1 = []; var v2 = []; var v3 = []; var quadraticAt$1 = quadraticAt; var v2DistSquare = distSquare; var mathAbs$2 = Math.abs; function intersectCurveCircle(curvePoints, center, radius) { var p0 = curvePoints[0]; var p1 = curvePoints[1]; var p2 = curvePoints[2]; var d = Infinity; var t; var radiusSquare = radius * radius; var interval = 0.1; for (var _t = 0.1; _t <= 0.9; _t += 0.1) { v1[0] = quadraticAt$1(p0[0], p1[0], p2[0], _t); v1[1] = quadraticAt$1(p0[1], p1[1], p2[1], _t); var diff = mathAbs$2(v2DistSquare(v1, center) - radiusSquare); if (diff < d) { d = diff; t = _t; } } // Assume the segment is monotone,Find root through Bisection method // At most 32 iteration for (var i = 0; i < 32; i++) { // let prev = t - interval; var next = t + interval; // v1[0] = quadraticAt(p0[0], p1[0], p2[0], prev); // v1[1] = quadraticAt(p0[1], p1[1], p2[1], prev); v2[0] = quadraticAt$1(p0[0], p1[0], p2[0], t); v2[1] = quadraticAt$1(p0[1], p1[1], p2[1], t); v3[0] = quadraticAt$1(p0[0], p1[0], p2[0], next); v3[1] = quadraticAt$1(p0[1], p1[1], p2[1], next); var diff = v2DistSquare(v2, center) - radiusSquare; if (mathAbs$2(diff) < 1e-2) { break; } // let prevDiff = v2DistSquare(v1, center) - radiusSquare; var nextDiff = v2DistSquare(v3, center) - radiusSquare; interval /= 2; if (diff < 0) { if (nextDiff >= 0) { t = t + interval; } else { t = t - interval; } } else { if (nextDiff >= 0) { t = t - interval; } else { t = t + interval; } } } return t; } // Adjust edge to avoid function adjustEdge(graph, scale) { var tmp0 = []; var quadraticSubdivide$1 = quadraticSubdivide; var pts = [[], [], []]; var pts2 = [[], []]; var v = []; scale /= 2; graph.eachEdge(function (edge, idx) { var linePoints = edge.getLayout(); var fromSymbol = edge.getVisual('fromSymbol'); var toSymbol = edge.getVisual('toSymbol'); if (!linePoints.__original) { linePoints.__original = [clone$1(linePoints[0]), clone$1(linePoints[1])]; if (linePoints[2]) { linePoints.__original.push(clone$1(linePoints[2])); } } var originalPoints = linePoints.__original; // Quadratic curve if (linePoints[2] != null) { copy(pts[0], originalPoints[0]); copy(pts[1], originalPoints[2]); copy(pts[2], originalPoints[1]); if (fromSymbol && fromSymbol !== 'none') { var symbolSize = getSymbolSize(edge.node1); var t = intersectCurveCircle(pts, originalPoints[0], symbolSize * scale); // Subdivide and get the second quadraticSubdivide$1(pts[0][0], pts[1][0], pts[2][0], t, tmp0); pts[0][0] = tmp0[3]; pts[1][0] = tmp0[4]; quadraticSubdivide$1(pts[0][1], pts[1][1], pts[2][1], t, tmp0); pts[0][1] = tmp0[3]; pts[1][1] = tmp0[4]; } if (toSymbol && toSymbol !== 'none') { var symbolSize = getSymbolSize(edge.node2); var t = intersectCurveCircle(pts, originalPoints[1], symbolSize * scale); // Subdivide and get the first quadraticSubdivide$1(pts[0][0], pts[1][0], pts[2][0], t, tmp0); pts[1][0] = tmp0[1]; pts[2][0] = tmp0[2]; quadraticSubdivide$1(pts[0][1], pts[1][1], pts[2][1], t, tmp0); pts[1][1] = tmp0[1]; pts[2][1] = tmp0[2]; } // Copy back to layout copy(linePoints[0], pts[0]); copy(linePoints[1], pts[2]); copy(linePoints[2], pts[1]); } // Line else { copy(pts2[0], originalPoints[0]); copy(pts2[1], originalPoints[1]); sub(v, pts2[1], pts2[0]); normalize(v, v); if (fromSymbol && fromSymbol !== 'none') { var symbolSize = getSymbolSize(edge.node1); scaleAndAdd(pts2[0], pts2[0], v, symbolSize * scale); } if (toSymbol && toSymbol !== 'none') { var symbolSize = getSymbolSize(edge.node2); scaleAndAdd(pts2[1], pts2[1], v, -symbolSize * scale); } copy(linePoints[0], pts2[0]); copy(linePoints[1], pts2[1]); } }); } function isViewCoordSys(coordSys) { return coordSys.type === 'view'; } var GraphView = /** @class */ function (_super) { __extends(GraphView, _super); function GraphView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = GraphView.type; return _this; } GraphView.prototype.init = function (ecModel, api) { var symbolDraw = new SymbolDraw(); var lineDraw = new LineDraw(); var group = this.group; this._controller = new RoamController(api.getZr()); this._controllerHost = { target: group }; group.add(symbolDraw.group); group.add(lineDraw.group); this._symbolDraw = symbolDraw; this._lineDraw = lineDraw; this._firstRender = true; }; GraphView.prototype.render = function (seriesModel, ecModel, api) { var _this = this; var coordSys = seriesModel.coordinateSystem; this._model = seriesModel; var symbolDraw = this._symbolDraw; var lineDraw = this._lineDraw; var group = this.group; if (isViewCoordSys(coordSys)) { var groupNewProp = { x: coordSys.x, y: coordSys.y, scaleX: coordSys.scaleX, scaleY: coordSys.scaleY }; if (this._firstRender) { group.attr(groupNewProp); } else { updateProps(group, groupNewProp, seriesModel); } } // Fix edge contact point with node adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel)); var data = seriesModel.getData(); symbolDraw.updateData(data); var edgeData = seriesModel.getEdgeData(); // TODO: TYPE lineDraw.updateData(edgeData); this._updateNodeAndLinkScale(); this._updateController(seriesModel, ecModel, api); clearTimeout(this._layoutTimeout); var forceLayout = seriesModel.forceLayout; var layoutAnimation = seriesModel.get(['force', 'layoutAnimation']); if (forceLayout) { this._startForceLayoutIteration(forceLayout, layoutAnimation); } data.graph.eachNode(function (node) { var idx = node.dataIndex; var el = node.getGraphicEl(); var itemModel = node.getModel(); // Update draggable el.off('drag').off('dragend'); var draggable = itemModel.get('draggable'); if (draggable) { el.on('drag', function () { if (forceLayout) { forceLayout.warmUp(); !_this._layouting && _this._startForceLayoutIteration(forceLayout, layoutAnimation); forceLayout.setFixed(idx); // Write position back to layout data.setItemLayout(idx, [el.x, el.y]); } }).on('dragend', function () { if (forceLayout) { forceLayout.setUnfixed(idx); } }); } el.setDraggable(draggable && !!forceLayout); var focus = itemModel.get(['emphasis', 'focus']); if (focus === 'adjacency') { getECData(el).focus = node.getAdjacentDataIndices(); } }); data.graph.eachEdge(function (edge) { var el = edge.getGraphicEl(); var focus = edge.getModel().get(['emphasis', 'focus']); if (focus === 'adjacency') { getECData(el).focus = { edge: [edge.dataIndex], node: [edge.node1.dataIndex, edge.node2.dataIndex] }; } }); var circularRotateLabel = seriesModel.get('layout') === 'circular' && seriesModel.get(['circular', 'rotateLabel']); var cx = data.getLayout('cx'); var cy = data.getLayout('cy'); data.eachItemGraphicEl(function (el, idx) { var itemModel = data.getItemModel(idx); var labelRotate = itemModel.get(['label', 'rotate']) || 0; var symbolPath = el.getSymbolPath(); if (circularRotateLabel) { var pos = data.getItemLayout(idx); var rad = Math.atan2(pos[1] - cy, pos[0] - cx); if (rad < 0) { rad = Math.PI * 2 + rad; } var isLeft = pos[0] < cx; if (isLeft) { rad = rad - Math.PI; } var textPosition = isLeft ? 'left' : 'right'; symbolPath.setTextConfig({ rotation: -rad, position: textPosition, origin: 'center' }); var emphasisState = symbolPath.ensureState('emphasis'); extend(emphasisState.textConfig || (emphasisState.textConfig = {}), { position: textPosition }); } else { symbolPath.setTextConfig({ rotation: labelRotate *= Math.PI / 180 }); } }); this._firstRender = false; }; GraphView.prototype.dispose = function () { this._controller && this._controller.dispose(); this._controllerHost = null; }; GraphView.prototype._startForceLayoutIteration = function (forceLayout, layoutAnimation) { var self = this; (function step() { forceLayout.step(function (stopped) { self.updateLayout(self._model); (self._layouting = !stopped) && (layoutAnimation ? self._layoutTimeout = setTimeout(step, 16) : step()); }); })(); }; GraphView.prototype._updateController = function (seriesModel, ecModel, api) { var _this = this; var controller = this._controller; var controllerHost = this._controllerHost; var group = this.group; controller.setPointerChecker(function (e, x, y) { var rect = group.getBoundingRect(); rect.applyTransform(group.transform); return rect.contain(x, y) && !onIrrelevantElement(e, api, seriesModel); }); if (!isViewCoordSys(seriesModel.coordinateSystem)) { controller.disable(); return; } controller.enable(seriesModel.get('roam')); controllerHost.zoomLimit = seriesModel.get('scaleLimit'); controllerHost.zoom = seriesModel.coordinateSystem.getZoom(); controller.off('pan').off('zoom').on('pan', function (e) { updateViewOnPan(controllerHost, e.dx, e.dy); api.dispatchAction({ seriesId: seriesModel.id, type: 'graphRoam', dx: e.dx, dy: e.dy }); }).on('zoom', function (e) { updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY); api.dispatchAction({ seriesId: seriesModel.id, type: 'graphRoam', zoom: e.scale, originX: e.originX, originY: e.originY }); _this._updateNodeAndLinkScale(); adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel)); _this._lineDraw.updateLayout(); // Only update label layout on zoom api.updateLabelLayout(); }); }; GraphView.prototype._updateNodeAndLinkScale = function () { var seriesModel = this._model; var data = seriesModel.getData(); var nodeScale = getNodeGlobalScale(seriesModel); data.eachItemGraphicEl(function (el, idx) { el.setSymbolScale(nodeScale); }); }; GraphView.prototype.updateLayout = function (seriesModel) { adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel)); this._symbolDraw.updateLayout(); this._lineDraw.updateLayout(); }; GraphView.prototype.remove = function (ecModel, api) { this._symbolDraw && this._symbolDraw.remove(); this._lineDraw && this._lineDraw.remove(); }; GraphView.type = 'graph'; return GraphView; }(ChartView); function generateNodeKey(id) { return '_EC_' + id; } var Graph = /** @class */ function () { function Graph(directed) { this.type = 'graph'; this.nodes = []; this.edges = []; this._nodesMap = {}; /** * @type {Object.} * @private */ this._edgesMap = {}; this._directed = directed || false; } /** * If is directed graph */ Graph.prototype.isDirected = function () { return this._directed; }; /** * Add a new node */ Graph.prototype.addNode = function (id, dataIndex) { id = id == null ? '' + dataIndex : '' + id; var nodesMap = this._nodesMap; if (nodesMap[generateNodeKey(id)]) { if ("development" !== 'production') { console.error('Graph nodes have duplicate name or id'); } return; } var node = new GraphNode(id, dataIndex); node.hostGraph = this; this.nodes.push(node); nodesMap[generateNodeKey(id)] = node; return node; }; /** * Get node by data index */ Graph.prototype.getNodeByIndex = function (dataIndex) { var rawIdx = this.data.getRawIndex(dataIndex); return this.nodes[rawIdx]; }; /** * Get node by id */ Graph.prototype.getNodeById = function (id) { return this._nodesMap[generateNodeKey(id)]; }; /** * Add a new edge */ Graph.prototype.addEdge = function (n1, n2, dataIndex) { var nodesMap = this._nodesMap; var edgesMap = this._edgesMap; // PNEDING if (typeof n1 === 'number') { n1 = this.nodes[n1]; } if (typeof n2 === 'number') { n2 = this.nodes[n2]; } if (!(n1 instanceof GraphNode)) { n1 = nodesMap[generateNodeKey(n1)]; } if (!(n2 instanceof GraphNode)) { n2 = nodesMap[generateNodeKey(n2)]; } if (!n1 || !n2) { return; } var key = n1.id + '-' + n2.id; var edge = new GraphEdge(n1, n2, dataIndex); edge.hostGraph = this; if (this._directed) { n1.outEdges.push(edge); n2.inEdges.push(edge); } n1.edges.push(edge); if (n1 !== n2) { n2.edges.push(edge); } this.edges.push(edge); edgesMap[key] = edge; return edge; }; /** * Get edge by data index */ Graph.prototype.getEdgeByIndex = function (dataIndex) { var rawIdx = this.edgeData.getRawIndex(dataIndex); return this.edges[rawIdx]; }; /** * Get edge by two linked nodes */ Graph.prototype.getEdge = function (n1, n2) { if (n1 instanceof GraphNode) { n1 = n1.id; } if (n2 instanceof GraphNode) { n2 = n2.id; } var edgesMap = this._edgesMap; if (this._directed) { return edgesMap[n1 + '-' + n2]; } else { return edgesMap[n1 + '-' + n2] || edgesMap[n2 + '-' + n1]; } }; /** * Iterate all nodes */ Graph.prototype.eachNode = function (cb, context) { var nodes = this.nodes; var len = nodes.length; for (var i = 0; i < len; i++) { if (nodes[i].dataIndex >= 0) { cb.call(context, nodes[i], i); } } }; /** * Iterate all edges */ Graph.prototype.eachEdge = function (cb, context) { var edges = this.edges; var len = edges.length; for (var i = 0; i < len; i++) { if (edges[i].dataIndex >= 0 && edges[i].node1.dataIndex >= 0 && edges[i].node2.dataIndex >= 0) { cb.call(context, edges[i], i); } } }; /** * Breadth first traverse * Return true to stop traversing */ Graph.prototype.breadthFirstTraverse = function (cb, startNode, direction, context) { if (!(startNode instanceof GraphNode)) { startNode = this._nodesMap[generateNodeKey(startNode)]; } if (!startNode) { return; } var edgeType = direction === 'out' ? 'outEdges' : direction === 'in' ? 'inEdges' : 'edges'; for (var i = 0; i < this.nodes.length; i++) { this.nodes[i].__visited = false; } if (cb.call(context, startNode, null)) { return; } var queue = [startNode]; while (queue.length) { var currentNode = queue.shift(); var edges = currentNode[edgeType]; for (var i = 0; i < edges.length; i++) { var e = edges[i]; var otherNode = e.node1 === currentNode ? e.node2 : e.node1; if (!otherNode.__visited) { if (cb.call(context, otherNode, currentNode)) { // Stop traversing return; } queue.push(otherNode); otherNode.__visited = true; } } } }; // depthFirstTraverse( // cb, startNode, direction, context // ) { // }; // Filter update Graph.prototype.update = function () { var data = this.data; var edgeData = this.edgeData; var nodes = this.nodes; var edges = this.edges; for (var i = 0, len = nodes.length; i < len; i++) { nodes[i].dataIndex = -1; } for (var i = 0, len = data.count(); i < len; i++) { nodes[data.getRawIndex(i)].dataIndex = i; } edgeData.filterSelf(function (idx) { var edge = edges[edgeData.getRawIndex(idx)]; return edge.node1.dataIndex >= 0 && edge.node2.dataIndex >= 0; }); // Update edge for (var i = 0, len = edges.length; i < len; i++) { edges[i].dataIndex = -1; } for (var i = 0, len = edgeData.count(); i < len; i++) { edges[edgeData.getRawIndex(i)].dataIndex = i; } }; /** * @return {module:echarts/data/Graph} */ Graph.prototype.clone = function () { var graph = new Graph(this._directed); var nodes = this.nodes; var edges = this.edges; for (var i = 0; i < nodes.length; i++) { graph.addNode(nodes[i].id, nodes[i].dataIndex); } for (var i = 0; i < edges.length; i++) { var e = edges[i]; graph.addEdge(e.node1.id, e.node2.id, e.dataIndex); } return graph; }; return Graph; }(); var GraphNode = /** @class */ function () { function GraphNode(id, dataIndex) { this.inEdges = []; this.outEdges = []; this.edges = []; this.dataIndex = -1; this.id = id == null ? '' : id; this.dataIndex = dataIndex == null ? -1 : dataIndex; } /** * @return {number} */ GraphNode.prototype.degree = function () { return this.edges.length; }; /** * @return {number} */ GraphNode.prototype.inDegree = function () { return this.inEdges.length; }; /** * @return {number} */ GraphNode.prototype.outDegree = function () { return this.outEdges.length; }; GraphNode.prototype.getModel = function (path) { if (this.dataIndex < 0) { return; } var graph = this.hostGraph; var itemModel = graph.data.getItemModel(this.dataIndex); return itemModel.getModel(path); }; GraphNode.prototype.getAdjacentDataIndices = function () { var dataIndices = { edge: [], node: [] }; for (var i = 0; i < this.edges.length; i++) { var adjacentEdge = this.edges[i]; if (adjacentEdge.dataIndex < 0) { continue; } dataIndices.edge.push(adjacentEdge.dataIndex); dataIndices.node.push(adjacentEdge.node1.dataIndex, adjacentEdge.node2.dataIndex); } return dataIndices; }; return GraphNode; }(); var GraphEdge = /** @class */ function () { function GraphEdge(n1, n2, dataIndex) { this.dataIndex = -1; this.node1 = n1; this.node2 = n2; this.dataIndex = dataIndex == null ? -1 : dataIndex; } GraphEdge.prototype.getModel = function (path) { if (this.dataIndex < 0) { return; } var graph = this.hostGraph; var itemModel = graph.edgeData.getItemModel(this.dataIndex); return itemModel.getModel(path); }; GraphEdge.prototype.getAdjacentDataIndices = function () { return { edge: [this.dataIndex], node: [this.node1.dataIndex, this.node2.dataIndex] }; }; return GraphEdge; }(); function createGraphDataProxyMixin(hostName, dataName) { return { /** * @param Default 'value'. can be 'a', 'b', 'c', 'd', 'e'. */ getValue: function (dimension) { var data = this[hostName][dataName]; return data.get(data.getDimension(dimension || 'value'), this.dataIndex); }, // TODO: TYPE stricter type. setVisual: function (key, value) { this.dataIndex >= 0 && this[hostName][dataName].setItemVisual(this.dataIndex, key, value); }, getVisual: function (key) { return this[hostName][dataName].getItemVisual(this.dataIndex, key); }, setLayout: function (layout, merge) { this.dataIndex >= 0 && this[hostName][dataName].setItemLayout(this.dataIndex, layout, merge); }, getLayout: function () { return this[hostName][dataName].getItemLayout(this.dataIndex); }, getGraphicEl: function () { return this[hostName][dataName].getItemGraphicEl(this.dataIndex); }, getRawIndex: function () { return this[hostName][dataName].getRawIndex(this.dataIndex); } }; } mixin(GraphNode, createGraphDataProxyMixin('hostGraph', 'data')); mixin(GraphEdge, createGraphDataProxyMixin('hostGraph', 'edgeData')); function createGraphFromNodeEdge(nodes, edges, seriesModel, directed, beforeLink) { // ??? TODO // support dataset? var graph = new Graph(directed); for (var i = 0; i < nodes.length; i++) { graph.addNode(retrieve( // Id, name, dataIndex nodes[i].id, nodes[i].name, i), i); } var linkNameList = []; var validEdges = []; var linkCount = 0; for (var i = 0; i < edges.length; i++) { var link = edges[i]; var source = link.source; var target = link.target; // addEdge may fail when source or target not exists if (graph.addEdge(source, target, linkCount)) { validEdges.push(link); linkNameList.push(retrieve(convertOptionIdName(link.id, null), source + ' > ' + target)); linkCount++; } } var coordSys = seriesModel.get('coordinateSystem'); var nodeData; if (coordSys === 'cartesian2d' || coordSys === 'polar') { nodeData = createListFromArray(nodes, seriesModel); } else { var coordSysCtor = CoordinateSystemManager.get(coordSys); var coordDimensions = coordSysCtor ? coordSysCtor.dimensions || [] : []; // FIXME: Some geo do not need `value` dimenson, whereas `calendar` needs // `value` dimension, but graph need `value` dimension. It's better to // uniform this behavior. if (indexOf(coordDimensions, 'value') < 0) { coordDimensions.concat(['value']); } var dimensionNames = createDimensions(nodes, { coordDimensions: coordDimensions }); nodeData = new List(dimensionNames, seriesModel); nodeData.initData(nodes); } var edgeData = new List(['value'], seriesModel); edgeData.initData(validEdges, linkNameList); beforeLink && beforeLink(nodeData, edgeData); linkList({ mainData: nodeData, struct: graph, structAttr: 'graph', datas: { node: nodeData, edge: edgeData }, datasAttr: { node: 'data', edge: 'edgeData' } }); // Update dataIndex of nodes and edges because invalid edge may be removed graph.update(); return graph; } var GraphSeriesModel = /** @class */ function (_super) { __extends(GraphSeriesModel, _super); function GraphSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = GraphSeriesModel.type; _this.hasSymbolVisual = true; return _this; } GraphSeriesModel.prototype.init = function (option) { _super.prototype.init.apply(this, arguments); var self = this; function getCategoriesData() { return self._categoriesData; } // Provide data for legend select this.legendVisualProvider = new LegendVisualProvider(getCategoriesData, getCategoriesData); this.fillDataTextStyle(option.edges || option.links); this._updateCategoriesData(); }; GraphSeriesModel.prototype.mergeOption = function (option) { _super.prototype.mergeOption.apply(this, arguments); this.fillDataTextStyle(option.edges || option.links); this._updateCategoriesData(); }; GraphSeriesModel.prototype.mergeDefaultAndTheme = function (option) { _super.prototype.mergeDefaultAndTheme.apply(this, arguments); defaultEmphasis(option, 'edgeLabel', ['show']); }; GraphSeriesModel.prototype.getInitialData = function (option, ecModel) { var edges = option.edges || option.links || []; var nodes = option.data || option.nodes || []; var self = this; if (nodes && edges) { // auto curveness initCurvenessList(this); var graph = createGraphFromNodeEdge(nodes, edges, this, true, beforeLink); each(graph.edges, function (edge) { createEdgeMapForCurveness(edge.node1, edge.node2, this, edge.dataIndex); }, this); return graph.data; } function beforeLink(nodeData, edgeData) { // Overwrite nodeData.getItemModel to nodeData.wrapMethod('getItemModel', function (model) { var categoriesModels = self._categoriesModels; var categoryIdx = model.getShallow('category'); var categoryModel = categoriesModels[categoryIdx]; if (categoryModel) { categoryModel.parentModel = model.parentModel; model.parentModel = categoryModel; } return model; }); // TODO Inherit resolveParentPath by default in Model#getModel? var oldGetModel = Model.prototype.getModel; function newGetModel(path, parentModel) { var model = oldGetModel.call(this, path, parentModel); model.resolveParentPath = resolveParentPath; return model; } edgeData.wrapMethod('getItemModel', function (model) { model.resolveParentPath = resolveParentPath; model.getModel = newGetModel; return model; }); function resolveParentPath(pathArr) { if (pathArr && (pathArr[0] === 'label' || pathArr[1] === 'label')) { var newPathArr = pathArr.slice(); if (pathArr[0] === 'label') { newPathArr[0] = 'edgeLabel'; } else if (pathArr[1] === 'label') { newPathArr[1] = 'edgeLabel'; } return newPathArr; } return pathArr; } } }; GraphSeriesModel.prototype.getGraph = function () { return this.getData().graph; }; GraphSeriesModel.prototype.getEdgeData = function () { return this.getGraph().edgeData; }; GraphSeriesModel.prototype.getCategoriesData = function () { return this._categoriesData; }; GraphSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { if (dataType === 'edge') { var nodeData = this.getData(); var params = this.getDataParams(dataIndex, dataType); var edge = nodeData.graph.getEdgeByIndex(dataIndex); var sourceName = nodeData.getName(edge.node1.dataIndex); var targetName = nodeData.getName(edge.node2.dataIndex); var nameArr = []; sourceName != null && nameArr.push(sourceName); targetName != null && nameArr.push(targetName); return createTooltipMarkup('nameValue', { name: nameArr.join(' > '), value: params.value, noValue: params.value == null }); } // dataType === 'node' or empty var nodeMarkup = defaultSeriesFormatTooltip({ series: this, dataIndex: dataIndex, multipleSeries: multipleSeries }); return nodeMarkup; }; GraphSeriesModel.prototype._updateCategoriesData = function () { var categories = map(this.option.categories || [], function (category) { // Data must has value return category.value != null ? category : extend({ value: 0 }, category); }); var categoriesData = new List(['value'], this); categoriesData.initData(categories); this._categoriesData = categoriesData; this._categoriesModels = categoriesData.mapArray(function (idx) { return categoriesData.getItemModel(idx); }); }; GraphSeriesModel.prototype.setZoom = function (zoom) { this.option.zoom = zoom; }; GraphSeriesModel.prototype.setCenter = function (center) { this.option.center = center; }; GraphSeriesModel.prototype.isAnimationEnabled = function () { return _super.prototype.isAnimationEnabled.call(this) // Not enable animation when do force layout && !(this.get('layout') === 'force' && this.get(['force', 'layoutAnimation'])); }; GraphSeriesModel.type = 'series.graph'; GraphSeriesModel.dependencies = ['grid', 'polar', 'geo', 'singleAxis', 'calendar']; GraphSeriesModel.defaultOption = { zlevel: 0, z: 2, coordinateSystem: 'view', // Default option for all coordinate systems // xAxisIndex: 0, // yAxisIndex: 0, // polarIndex: 0, // geoIndex: 0, legendHoverLink: true, layout: null, // Configuration of circular layout circular: { rotateLabel: false }, // Configuration of force directed layout force: { initLayout: null, // Node repulsion. Can be an array to represent range. repulsion: [0, 50], gravity: 0.1, // Initial friction friction: 0.6, // Edge length. Can be an array to represent range. edgeLength: 30, layoutAnimation: true }, left: 'center', top: 'center', // right: null, // bottom: null, // width: '80%', // height: '80%', symbol: 'circle', symbolSize: 10, edgeSymbol: ['none', 'none'], edgeSymbolSize: 10, edgeLabel: { position: 'middle', distance: 5 }, draggable: false, roam: false, // Default on center of graph center: null, zoom: 1, // Symbol size scale ratio in roam nodeScaleRatio: 0.6, // cursor: null, // categories: [], // data: [] // Or // nodes: [] // // links: [] // Or // edges: [] label: { show: false, formatter: '{b}' }, itemStyle: {}, lineStyle: { color: '#aaa', width: 1, opacity: 0.5 }, emphasis: { scale: true, label: { show: true } }, select: { itemStyle: { borderColor: '#212121' } } }; return GraphSeriesModel; }(SeriesModel); var actionInfo = { type: 'graphRoam', event: 'graphRoam', update: 'none' }; function install$d(registers) { registers.registerChartView(GraphView); registers.registerSeriesModel(GraphSeriesModel); registers.registerProcessor(categoryFilter); registers.registerVisual(categoryVisual); registers.registerVisual(graphEdgeVisual); registers.registerLayout(graphSimpleLayout); registers.registerLayout(registers.PRIORITY.VISUAL.POST_CHART_LAYOUT, graphCircularLayout); registers.registerLayout(graphForceLayout); registers.registerCoordinateSystem('graphView', { dimensions: View.dimensions, create: createViewCoordSys }); // Register legacy focus actions registers.registerAction({ type: 'focusNodeAdjacency', event: 'focusNodeAdjacency', update: 'series:focusNodeAdjacency' }, function () {}); registers.registerAction({ type: 'unfocusNodeAdjacency', event: 'unfocusNodeAdjacency', update: 'series:unfocusNodeAdjacency' }, function () {}); // Register roam action. registers.registerAction(actionInfo, function (payload, ecModel) { ecModel.eachComponent({ mainType: 'series', query: payload }, function (seriesModel) { var coordSys = seriesModel.coordinateSystem; var res = updateCenterAndZoom(coordSys, payload); seriesModel.setCenter && seriesModel.setCenter(res.center); seriesModel.setZoom && seriesModel.setZoom(res.zoom); }); }); } var PointerShape = /** @class */ function () { function PointerShape() { this.angle = 0; this.width = 10; this.r = 10; this.x = 0; this.y = 0; } return PointerShape; }(); var PointerPath = /** @class */ function (_super) { __extends(PointerPath, _super); function PointerPath(opts) { var _this = _super.call(this, opts) || this; _this.type = 'pointer'; return _this; } PointerPath.prototype.getDefaultShape = function () { return new PointerShape(); }; PointerPath.prototype.buildPath = function (ctx, shape) { var mathCos = Math.cos; var mathSin = Math.sin; var r = shape.r; var width = shape.width; var angle = shape.angle; var x = shape.x - mathCos(angle) * width * (width >= r / 3 ? 1 : 2); var y = shape.y - mathSin(angle) * width * (width >= r / 3 ? 1 : 2); angle = shape.angle - Math.PI / 2; ctx.moveTo(x, y); ctx.lineTo(shape.x + mathCos(angle) * width, shape.y + mathSin(angle) * width); ctx.lineTo(shape.x + mathCos(shape.angle) * r, shape.y + mathSin(shape.angle) * r); ctx.lineTo(shape.x - mathCos(angle) * width, shape.y - mathSin(angle) * width); ctx.lineTo(x, y); }; return PointerPath; }(Path); function parsePosition(seriesModel, api) { var center = seriesModel.get('center'); var width = api.getWidth(); var height = api.getHeight(); var size = Math.min(width, height); var cx = parsePercent$1(center[0], api.getWidth()); var cy = parsePercent$1(center[1], api.getHeight()); var r = parsePercent$1(seriesModel.get('radius'), size / 2); return { cx: cx, cy: cy, r: r }; } function formatLabel(value, labelFormatter) { var label = value == null ? '' : value + ''; if (labelFormatter) { if (typeof labelFormatter === 'string') { label = labelFormatter.replace('{value}', label); } else if (typeof labelFormatter === 'function') { label = labelFormatter(value); } } return label; } var PI2$9 = Math.PI * 2; var GaugeView = /** @class */ function (_super) { __extends(GaugeView, _super); function GaugeView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = GaugeView.type; return _this; } GaugeView.prototype.render = function (seriesModel, ecModel, api) { this.group.removeAll(); var colorList = seriesModel.get(['axisLine', 'lineStyle', 'color']); var posInfo = parsePosition(seriesModel, api); this._renderMain(seriesModel, ecModel, api, colorList, posInfo); this._data = seriesModel.getData(); }; GaugeView.prototype.dispose = function () {}; GaugeView.prototype._renderMain = function (seriesModel, ecModel, api, colorList, posInfo) { var group = this.group; var clockwise = seriesModel.get('clockwise'); var startAngle = -seriesModel.get('startAngle') / 180 * Math.PI; var endAngle = -seriesModel.get('endAngle') / 180 * Math.PI; var axisLineModel = seriesModel.getModel('axisLine'); var roundCap = axisLineModel.get('roundCap'); var MainPath = roundCap ? SausagePath : Sector; var showAxis = axisLineModel.get('show'); var lineStyleModel = axisLineModel.getModel('lineStyle'); var axisLineWidth = lineStyleModel.get('width'); var angleRangeSpan = !((endAngle - startAngle) % PI2$9) && endAngle !== startAngle ? PI2$9 : (endAngle - startAngle) % PI2$9; var prevEndAngle = startAngle; for (var i = 0; showAxis && i < colorList.length; i++) { // Clamp var percent = Math.min(Math.max(colorList[i][0], 0), 1); endAngle = startAngle + angleRangeSpan * percent; var sector = new MainPath({ shape: { startAngle: prevEndAngle, endAngle: endAngle, cx: posInfo.cx, cy: posInfo.cy, clockwise: clockwise, r0: posInfo.r - axisLineWidth, r: posInfo.r }, silent: true }); sector.setStyle({ fill: colorList[i][1] }); sector.setStyle(lineStyleModel.getLineStyle( // Because we use sector to simulate arc // so the properties for stroking are useless ['color', 'width'])); group.add(sector); prevEndAngle = endAngle; } var getColor = function (percent) { // Less than 0 if (percent <= 0) { return colorList[0][1]; } var i; for (i = 0; i < colorList.length; i++) { if (colorList[i][0] >= percent && (i === 0 ? 0 : colorList[i - 1][0]) < percent) { return colorList[i][1]; } } // More than 1 return colorList[i - 1][1]; }; if (!clockwise) { var tmp = startAngle; startAngle = endAngle; endAngle = tmp; } this._renderTicks(seriesModel, ecModel, api, getColor, posInfo, startAngle, endAngle, clockwise, axisLineWidth); this._renderTitleAndDetail(seriesModel, ecModel, api, getColor, posInfo); this._renderAnchor(seriesModel, posInfo); this._renderPointer(seriesModel, ecModel, api, getColor, posInfo, startAngle, endAngle, clockwise, axisLineWidth); }; GaugeView.prototype._renderTicks = function (seriesModel, ecModel, api, getColor, posInfo, startAngle, endAngle, clockwise, axisLineWidth) { var group = this.group; var cx = posInfo.cx; var cy = posInfo.cy; var r = posInfo.r; var minVal = +seriesModel.get('min'); var maxVal = +seriesModel.get('max'); var splitLineModel = seriesModel.getModel('splitLine'); var tickModel = seriesModel.getModel('axisTick'); var labelModel = seriesModel.getModel('axisLabel'); var splitNumber = seriesModel.get('splitNumber'); var subSplitNumber = tickModel.get('splitNumber'); var splitLineLen = parsePercent$1(splitLineModel.get('length'), r); var tickLen = parsePercent$1(tickModel.get('length'), r); var angle = startAngle; var step = (endAngle - startAngle) / splitNumber; var subStep = step / subSplitNumber; var splitLineStyle = splitLineModel.getModel('lineStyle').getLineStyle(); var tickLineStyle = tickModel.getModel('lineStyle').getLineStyle(); var splitLineDistance = splitLineModel.get('distance'); var unitX; var unitY; for (var i = 0; i <= splitNumber; i++) { unitX = Math.cos(angle); unitY = Math.sin(angle); // Split line if (splitLineModel.get('show')) { var distance = splitLineDistance ? splitLineDistance + axisLineWidth : axisLineWidth; var splitLine = new Line({ shape: { x1: unitX * (r - distance) + cx, y1: unitY * (r - distance) + cy, x2: unitX * (r - splitLineLen - distance) + cx, y2: unitY * (r - splitLineLen - distance) + cy }, style: splitLineStyle, silent: true }); if (splitLineStyle.stroke === 'auto') { splitLine.setStyle({ stroke: getColor(i / splitNumber) }); } group.add(splitLine); } // Label if (labelModel.get('show')) { var distance = labelModel.get('distance') + splitLineDistance; var label = formatLabel(round(i / splitNumber * (maxVal - minVal) + minVal), labelModel.get('formatter')); var autoColor = getColor(i / splitNumber); group.add(new ZRText({ style: createTextStyle(labelModel, { text: label, x: unitX * (r - splitLineLen - distance) + cx, y: unitY * (r - splitLineLen - distance) + cy, verticalAlign: unitY < -0.8 ? 'top' : unitY > 0.8 ? 'bottom' : 'middle', align: unitX < -0.4 ? 'left' : unitX > 0.4 ? 'right' : 'center' }, { inheritColor: autoColor }), silent: true })); } // Axis tick if (tickModel.get('show') && i !== splitNumber) { var distance = tickModel.get('distance'); distance = distance ? distance + axisLineWidth : axisLineWidth; for (var j = 0; j <= subSplitNumber; j++) { unitX = Math.cos(angle); unitY = Math.sin(angle); var tickLine = new Line({ shape: { x1: unitX * (r - distance) + cx, y1: unitY * (r - distance) + cy, x2: unitX * (r - tickLen - distance) + cx, y2: unitY * (r - tickLen - distance) + cy }, silent: true, style: tickLineStyle }); if (tickLineStyle.stroke === 'auto') { tickLine.setStyle({ stroke: getColor((i + j / subSplitNumber) / splitNumber) }); } group.add(tickLine); angle += subStep; } angle -= subStep; } else { angle += step; } } }; GaugeView.prototype._renderPointer = function (seriesModel, ecModel, api, getColor, posInfo, startAngle, endAngle, clockwise, axisLineWidth) { var group = this.group; var oldData = this._data; var oldProgressData = this._progressEls; var progressList = []; var showPointer = seriesModel.get(['pointer', 'show']); var progressModel = seriesModel.getModel('progress'); var showProgress = progressModel.get('show'); var data = seriesModel.getData(); var valueDim = data.mapDimension('value'); var minVal = +seriesModel.get('min'); var maxVal = +seriesModel.get('max'); var valueExtent = [minVal, maxVal]; var angleExtent = [startAngle, endAngle]; function createPointer(idx, angle) { var itemModel = data.getItemModel(idx); var pointerModel = itemModel.getModel('pointer'); var pointerWidth = parsePercent$1(pointerModel.get('width'), posInfo.r); var pointerLength = parsePercent$1(pointerModel.get('length'), posInfo.r); var pointerStr = seriesModel.get(['pointer', 'icon']); var pointerOffset = pointerModel.get('offsetCenter'); var pointerOffsetX = parsePercent$1(pointerOffset[0], posInfo.r); var pointerOffsetY = parsePercent$1(pointerOffset[1], posInfo.r); var pointerKeepAspect = pointerModel.get('keepAspect'); var pointer; // not exist icon type will be set 'rect' if (pointerStr) { pointer = createSymbol(pointerStr, pointerOffsetX - pointerWidth / 2, pointerOffsetY - pointerLength, pointerWidth, pointerLength, null, pointerKeepAspect); } else { pointer = new PointerPath({ shape: { angle: -Math.PI / 2, width: pointerWidth, r: pointerLength, x: pointerOffsetX, y: pointerOffsetY } }); } pointer.rotation = -(angle + Math.PI / 2); pointer.x = posInfo.cx; pointer.y = posInfo.cy; return pointer; } function createProgress(idx, endAngle) { var roundCap = progressModel.get('roundCap'); var ProgressPath = roundCap ? SausagePath : Sector; var isOverlap = progressModel.get('overlap'); var progressWidth = isOverlap ? progressModel.get('width') : axisLineWidth / data.count(); var r0 = isOverlap ? posInfo.r - progressWidth : posInfo.r - (idx + 1) * progressWidth; var r = isOverlap ? posInfo.r : posInfo.r - idx * progressWidth; var progress = new ProgressPath({ shape: { startAngle: startAngle, endAngle: endAngle, cx: posInfo.cx, cy: posInfo.cy, clockwise: clockwise, r0: r0, r: r } }); isOverlap && (progress.z2 = maxVal - data.get(valueDim, idx) % maxVal); return progress; } if (showProgress || showPointer) { data.diff(oldData).add(function (idx) { if (showPointer) { var pointer = createPointer(idx, startAngle); initProps(pointer, { rotation: -(linearMap(data.get(valueDim, idx), valueExtent, angleExtent, true) + Math.PI / 2) }, seriesModel); group.add(pointer); data.setItemGraphicEl(idx, pointer); } if (showProgress) { var progress = createProgress(idx, startAngle); var isClip = progressModel.get('clip'); initProps(progress, { shape: { endAngle: linearMap(data.get(valueDim, idx), valueExtent, angleExtent, isClip) } }, seriesModel); group.add(progress); progressList[idx] = progress; } }).update(function (newIdx, oldIdx) { if (showPointer) { var previousPointer = oldData.getItemGraphicEl(oldIdx); var previousRotate = previousPointer ? previousPointer.rotation : startAngle; var pointer = createPointer(newIdx, previousRotate); pointer.rotation = previousRotate; updateProps(pointer, { rotation: -(linearMap(data.get(valueDim, newIdx), valueExtent, angleExtent, true) + Math.PI / 2) }, seriesModel); group.add(pointer); data.setItemGraphicEl(newIdx, pointer); } if (showProgress) { var previousProgress = oldProgressData[oldIdx]; var previousEndAngle = previousProgress ? previousProgress.shape.endAngle : startAngle; var progress = createProgress(newIdx, previousEndAngle); var isClip = progressModel.get('clip'); updateProps(progress, { shape: { endAngle: linearMap(data.get(valueDim, newIdx), valueExtent, angleExtent, isClip) } }, seriesModel); group.add(progress); progressList[newIdx] = progress; } }).execute(); data.each(function (idx) { var itemModel = data.getItemModel(idx); var emphasisModel = itemModel.getModel('emphasis'); if (showPointer) { var pointer = data.getItemGraphicEl(idx); var symbolStyle = data.getItemVisual(idx, 'style'); var visualColor = symbolStyle.fill; if (pointer instanceof ZRImage) { var pathStyle = pointer.style; pointer.useStyle(extend({ image: pathStyle.image, x: pathStyle.x, y: pathStyle.y, width: pathStyle.width, height: pathStyle.height }, symbolStyle)); } else { pointer.useStyle(symbolStyle); pointer.type !== 'pointer' && pointer.setColor(visualColor); } pointer.setStyle(itemModel.getModel(['pointer', 'itemStyle']).getItemStyle()); if (pointer.style.fill === 'auto') { pointer.setStyle('fill', getColor(linearMap(data.get(valueDim, idx), valueExtent, [0, 1], true))); } pointer.z2EmphasisLift = 0; setStatesStylesFromModel(pointer, itemModel); enableHoverEmphasis(pointer, emphasisModel.get('focus'), emphasisModel.get('blurScope')); } if (showProgress) { var progress = progressList[idx]; progress.useStyle(data.getItemVisual(idx, 'style')); progress.setStyle(itemModel.getModel(['progress', 'itemStyle']).getItemStyle()); progress.z2EmphasisLift = 0; setStatesStylesFromModel(progress, itemModel); enableHoverEmphasis(progress, emphasisModel.get('focus'), emphasisModel.get('blurScope')); } }); this._progressEls = progressList; } }; GaugeView.prototype._renderAnchor = function (seriesModel, posInfo) { var anchorModel = seriesModel.getModel('anchor'); var showAnchor = anchorModel.get('show'); if (showAnchor) { var anchorSize = anchorModel.get('size'); var anchorType = anchorModel.get('icon'); var offsetCenter = anchorModel.get('offsetCenter'); var anchorKeepAspect = anchorModel.get('keepAspect'); var anchor = createSymbol(anchorType, posInfo.cx - anchorSize / 2 + parsePercent$1(offsetCenter[0], posInfo.r), posInfo.cy - anchorSize / 2 + parsePercent$1(offsetCenter[1], posInfo.r), anchorSize, anchorSize, null, anchorKeepAspect); anchor.z2 = anchorModel.get('showAbove') ? 1 : 0; anchor.setStyle(anchorModel.getModel('itemStyle').getItemStyle()); this.group.add(anchor); } }; GaugeView.prototype._renderTitleAndDetail = function (seriesModel, ecModel, api, getColor, posInfo) { var _this = this; var data = seriesModel.getData(); var valueDim = data.mapDimension('value'); var minVal = +seriesModel.get('min'); var maxVal = +seriesModel.get('max'); var contentGroup = new Group(); var newTitleEls = []; var newDetailEls = []; var hasAnimation = seriesModel.isAnimationEnabled(); data.diff(this._data).add(function (idx) { newTitleEls[idx] = new ZRText({ silent: true }); newDetailEls[idx] = new ZRText({ silent: true }); }).update(function (idx, oldIdx) { newTitleEls[idx] = _this._titleEls[oldIdx]; newDetailEls[idx] = _this._detailEls[oldIdx]; }).execute(); data.each(function (idx) { var itemModel = data.getItemModel(idx); var value = data.get(valueDim, idx); var itemGroup = new Group(); var autoColor = getColor(linearMap(value, [minVal, maxVal], [0, 1], true)); var itemTitleModel = itemModel.getModel('title'); if (itemTitleModel.get('show')) { var titleOffsetCenter = itemTitleModel.get('offsetCenter'); var titleX = posInfo.cx + parsePercent$1(titleOffsetCenter[0], posInfo.r); var titleY = posInfo.cy + parsePercent$1(titleOffsetCenter[1], posInfo.r); var labelEl = newTitleEls[idx]; labelEl.attr({ style: createTextStyle(itemTitleModel, { x: titleX, y: titleY, text: data.getName(idx), align: 'center', verticalAlign: 'middle' }, { inheritColor: autoColor }) }); itemGroup.add(labelEl); } var itemDetailModel = itemModel.getModel('detail'); if (itemDetailModel.get('show')) { var detailOffsetCenter = itemDetailModel.get('offsetCenter'); var detailX = posInfo.cx + parsePercent$1(detailOffsetCenter[0], posInfo.r); var detailY = posInfo.cy + parsePercent$1(detailOffsetCenter[1], posInfo.r); var width = parsePercent$1(itemDetailModel.get('width'), posInfo.r); var height = parsePercent$1(itemDetailModel.get('height'), posInfo.r); var detailColor = seriesModel.get(['progress', 'show']) ? data.getItemVisual(idx, 'style').fill : autoColor; var labelEl = newDetailEls[idx]; var formatter_1 = itemDetailModel.get('formatter'); labelEl.attr({ style: createTextStyle(itemDetailModel, { x: detailX, y: detailY, text: formatLabel(value, formatter_1), width: isNaN(width) ? null : width, height: isNaN(height) ? null : height, align: 'center', verticalAlign: 'middle' }, { inheritColor: detailColor }) }); setLabelValueAnimation(labelEl, { normal: itemDetailModel }, value, function (value) { return formatLabel(value, formatter_1); }); hasAnimation && animateLabelValue(labelEl, idx, data, seriesModel, { getFormattedLabel: function (labelDataIndex, status, dataType, labelDimIndex, fmt, extendParams) { return formatLabel(extendParams ? extendParams.interpolatedValue : value, formatter_1); } }); itemGroup.add(labelEl); } contentGroup.add(itemGroup); }); this.group.add(contentGroup); this._titleEls = newTitleEls; this._detailEls = newDetailEls; }; GaugeView.type = 'gauge'; return GaugeView; }(ChartView); var GaugeSeriesModel = /** @class */ function (_super) { __extends(GaugeSeriesModel, _super); function GaugeSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = GaugeSeriesModel.type; _this.visualStyleAccessPath = 'itemStyle'; _this.useColorPaletteOnData = true; return _this; } GaugeSeriesModel.prototype.getInitialData = function (option, ecModel) { return createListSimply(this, ['value']); }; GaugeSeriesModel.type = 'series.gauge'; GaugeSeriesModel.defaultOption = { zlevel: 0, z: 2, // 默认全局居中 center: ['50%', '50%'], legendHoverLink: true, radius: '75%', startAngle: 225, endAngle: -45, clockwise: true, // 最小值 min: 0, // 最大值 max: 100, // 分割段数,默认为10 splitNumber: 10, // 坐标轴线 axisLine: { // 默认显示,属性show控制显示与否 show: true, roundCap: false, lineStyle: { color: [[1, '#E6EBF8']], width: 10 } }, // 坐标轴线 progress: { // 默认显示,属性show控制显示与否 show: false, overlap: true, width: 10, roundCap: false, clip: true }, // 分隔线 splitLine: { // 默认显示,属性show控制显示与否 show: true, // 属性length控制线长 length: 10, distance: 10, // 属性lineStyle(详见lineStyle)控制线条样式 lineStyle: { color: '#63677A', width: 3, type: 'solid' } }, // 坐标轴小标记 axisTick: { // 属性show控制显示与否,默认不显示 show: true, // 每份split细分多少段 splitNumber: 5, // 属性length控制线长 length: 6, distance: 10, // 属性lineStyle控制线条样式 lineStyle: { color: '#63677A', width: 1, type: 'solid' } }, axisLabel: { show: true, distance: 15, // formatter: null, color: '#464646', fontSize: 12 }, pointer: { icon: null, offsetCenter: [0, 0], show: true, length: '60%', width: 6, keepAspect: false }, anchor: { show: false, showAbove: false, size: 6, icon: 'circle', offsetCenter: [0, 0], keepAspect: false, itemStyle: { color: '#fff', borderWidth: 0, borderColor: '#5470c6' } }, title: { show: true, // x, y,单位px offsetCenter: [0, '20%'], // 其余属性默认使用全局文本样式,详见TEXTSTYLE color: '#464646', fontSize: 16, valueAnimation: false }, detail: { show: true, backgroundColor: 'rgba(0,0,0,0)', borderWidth: 0, borderColor: '#ccc', width: 100, height: null, padding: [5, 10], // x, y,单位px offsetCenter: [0, '40%'], // formatter: null, // 其余属性默认使用全局文本样式,详见TEXTSTYLE color: '#464646', fontSize: 30, fontWeight: 'bold', lineHeight: 30, valueAnimation: false } }; return GaugeSeriesModel; }(SeriesModel); function install$e(registers) { registers.registerChartView(GaugeView); registers.registerSeriesModel(GaugeSeriesModel); } var opacityAccessPath = ['itemStyle', 'opacity']; /** * Piece of pie including Sector, Label, LabelLine */ var FunnelPiece = /** @class */ function (_super) { __extends(FunnelPiece, _super); function FunnelPiece(data, idx) { var _this = _super.call(this) || this; var polygon = _this; var labelLine = new Polyline(); var text = new ZRText(); polygon.setTextContent(text); _this.setTextGuideLine(labelLine); _this.updateData(data, idx, true); return _this; } FunnelPiece.prototype.updateData = function (data, idx, firstCreate) { var polygon = this; var seriesModel = data.hostModel; var itemModel = data.getItemModel(idx); var layout = data.getItemLayout(idx); var emphasisModel = itemModel.getModel('emphasis'); var opacity = itemModel.get(opacityAccessPath); opacity = opacity == null ? 1 : opacity; // Update common style polygon.useStyle(data.getItemVisual(idx, 'style')); polygon.style.lineJoin = 'round'; if (firstCreate) { polygon.setShape({ points: layout.points }); polygon.style.opacity = 0; initProps(polygon, { style: { opacity: opacity } }, seriesModel, idx); } else { updateProps(polygon, { style: { opacity: opacity }, shape: { points: layout.points } }, seriesModel, idx); } setStatesStylesFromModel(polygon, itemModel); this._updateLabel(data, idx); enableHoverEmphasis(this, emphasisModel.get('focus'), emphasisModel.get('blurScope')); }; FunnelPiece.prototype._updateLabel = function (data, idx) { var polygon = this; var labelLine = this.getTextGuideLine(); var labelText = polygon.getTextContent(); var seriesModel = data.hostModel; var itemModel = data.getItemModel(idx); var layout = data.getItemLayout(idx); var labelLayout = layout.label; var style = data.getItemVisual(idx, 'style'); var visualColor = style.fill; setLabelStyle( // position will not be used in setLabelStyle labelText, getLabelStatesModels(itemModel), { labelFetcher: data.hostModel, labelDataIndex: idx, defaultOpacity: style.opacity, defaultText: data.getName(idx) }, { normal: { align: labelLayout.textAlign, verticalAlign: labelLayout.verticalAlign } }); polygon.setTextConfig({ local: true, inside: !!labelLayout.inside, insideStroke: visualColor, // insideFill: 'auto', outsideFill: visualColor }); var linePoints = labelLayout.linePoints; labelLine.setShape({ points: linePoints }); polygon.textGuideLineConfig = { anchor: linePoints ? new Point(linePoints[0][0], linePoints[0][1]) : null }; // Make sure update style on labelText after setLabelStyle. // Because setLabelStyle will replace a new style on it. updateProps(labelText, { style: { x: labelLayout.x, y: labelLayout.y } }, seriesModel, idx); labelText.attr({ rotation: labelLayout.rotation, originX: labelLayout.x, originY: labelLayout.y, z2: 10 }); setLabelLineStyle(polygon, getLabelLineStatesModels(itemModel), { // Default use item visual color stroke: visualColor }); }; return FunnelPiece; }(Polygon); var FunnelView = /** @class */ function (_super) { __extends(FunnelView, _super); function FunnelView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = FunnelView.type; _this.ignoreLabelLineUpdate = true; return _this; } FunnelView.prototype.render = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var oldData = this._data; var group = this.group; data.diff(oldData).add(function (idx) { var funnelPiece = new FunnelPiece(data, idx); data.setItemGraphicEl(idx, funnelPiece); group.add(funnelPiece); }).update(function (newIdx, oldIdx) { var piece = oldData.getItemGraphicEl(oldIdx); piece.updateData(data, newIdx); group.add(piece); data.setItemGraphicEl(newIdx, piece); }).remove(function (idx) { var piece = oldData.getItemGraphicEl(idx); removeElementWithFadeOut(piece, seriesModel, idx); }).execute(); this._data = data; }; FunnelView.prototype.remove = function () { this.group.removeAll(); this._data = null; }; FunnelView.prototype.dispose = function () {}; FunnelView.type = 'funnel'; return FunnelView; }(ChartView); var FunnelSeriesModel = /** @class */ function (_super) { __extends(FunnelSeriesModel, _super); function FunnelSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = FunnelSeriesModel.type; _this.useColorPaletteOnData = true; return _this; } FunnelSeriesModel.prototype.init = function (option) { _super.prototype.init.apply(this, arguments); // Enable legend selection for each data item // Use a function instead of direct access because data reference may changed this.legendVisualProvider = new LegendVisualProvider(bind(this.getData, this), bind(this.getRawData, this)); // Extend labelLine emphasis this._defaultLabelLine(option); }; FunnelSeriesModel.prototype.getInitialData = function (option, ecModel) { return createListSimply(this, { coordDimensions: ['value'], encodeDefaulter: curry(makeSeriesEncodeForNameBased, this) }); }; FunnelSeriesModel.prototype._defaultLabelLine = function (option) { // Extend labelLine emphasis defaultEmphasis(option, 'labelLine', ['show']); var labelLineNormalOpt = option.labelLine; var labelLineEmphasisOpt = option.emphasis.labelLine; // Not show label line if `label.normal.show = false` labelLineNormalOpt.show = labelLineNormalOpt.show && option.label.show; labelLineEmphasisOpt.show = labelLineEmphasisOpt.show && option.emphasis.label.show; }; // Overwrite FunnelSeriesModel.prototype.getDataParams = function (dataIndex) { var data = this.getData(); var params = _super.prototype.getDataParams.call(this, dataIndex); var valueDim = data.mapDimension('value'); var sum = data.getSum(valueDim); // Percent is 0 if sum is 0 params.percent = !sum ? 0 : +(data.get(valueDim, dataIndex) / sum * 100).toFixed(2); params.$vars.push('percent'); return params; }; FunnelSeriesModel.type = 'series.funnel'; FunnelSeriesModel.defaultOption = { zlevel: 0, z: 2, legendHoverLink: true, left: 80, top: 60, right: 80, bottom: 60, // width: {totalWidth} - left - right, // height: {totalHeight} - top - bottom, // 默认取数据最小最大值 // min: 0, // max: 100, minSize: '0%', maxSize: '100%', sort: 'descending', orient: 'vertical', gap: 0, funnelAlign: 'center', label: { show: true, position: 'outer' // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调 }, labelLine: { show: true, length: 20, lineStyle: { // color: 各异, width: 1 } }, itemStyle: { // color: 各异, borderColor: '#fff', borderWidth: 1 }, emphasis: { label: { show: true } }, select: { itemStyle: { borderColor: '#212121' } } }; return FunnelSeriesModel; }(SeriesModel); function getViewRect$3(seriesModel, api) { return getLayoutRect(seriesModel.getBoxLayoutParams(), { width: api.getWidth(), height: api.getHeight() }); } function getSortedIndices(data, sort) { var valueDim = data.mapDimension('value'); var valueArr = data.mapArray(valueDim, function (val) { return val; }); var indices = []; var isAscending = sort === 'ascending'; for (var i = 0, len = data.count(); i < len; i++) { indices[i] = i; } // Add custom sortable function & none sortable opetion by "options.sort" if (typeof sort === 'function') { indices.sort(sort); } else if (sort !== 'none') { indices.sort(function (a, b) { return isAscending ? valueArr[a] - valueArr[b] : valueArr[b] - valueArr[a]; }); } return indices; } function labelLayout(data) { var seriesModel = data.hostModel; var orient = seriesModel.get('orient'); data.each(function (idx) { var itemModel = data.getItemModel(idx); var labelModel = itemModel.getModel('label'); var labelPosition = labelModel.get('position'); var labelLineModel = itemModel.getModel('labelLine'); var layout = data.getItemLayout(idx); var points = layout.points; var isLabelInside = labelPosition === 'inner' || labelPosition === 'inside' || labelPosition === 'center' || labelPosition === 'insideLeft' || labelPosition === 'insideRight'; var textAlign; var textX; var textY; var linePoints; if (isLabelInside) { if (labelPosition === 'insideLeft') { textX = (points[0][0] + points[3][0]) / 2 + 5; textY = (points[0][1] + points[3][1]) / 2; textAlign = 'left'; } else if (labelPosition === 'insideRight') { textX = (points[1][0] + points[2][0]) / 2 - 5; textY = (points[1][1] + points[2][1]) / 2; textAlign = 'right'; } else { textX = (points[0][0] + points[1][0] + points[2][0] + points[3][0]) / 4; textY = (points[0][1] + points[1][1] + points[2][1] + points[3][1]) / 4; textAlign = 'center'; } linePoints = [[textX, textY], [textX, textY]]; } else { var x1 = void 0; var y1 = void 0; var x2 = void 0; var y2 = void 0; var labelLineLen = labelLineModel.get('length'); if ("development" !== 'production') { if (orient === 'vertical' && ['top', 'bottom'].indexOf(labelPosition) > -1) { labelPosition = 'left'; console.warn('Position error: Funnel chart on vertical orient dose not support top and bottom.'); } if (orient === 'horizontal' && ['left', 'right'].indexOf(labelPosition) > -1) { labelPosition = 'bottom'; console.warn('Position error: Funnel chart on horizontal orient dose not support left and right.'); } } if (labelPosition === 'left') { // Left side x1 = (points[3][0] + points[0][0]) / 2; y1 = (points[3][1] + points[0][1]) / 2; x2 = x1 - labelLineLen; textX = x2 - 5; textAlign = 'right'; } else if (labelPosition === 'right') { // Right side x1 = (points[1][0] + points[2][0]) / 2; y1 = (points[1][1] + points[2][1]) / 2; x2 = x1 + labelLineLen; textX = x2 + 5; textAlign = 'left'; } else if (labelPosition === 'top') { // Top side x1 = (points[3][0] + points[0][0]) / 2; y1 = (points[3][1] + points[0][1]) / 2; y2 = y1 - labelLineLen; textY = y2 - 5; textAlign = 'center'; } else if (labelPosition === 'bottom') { // Bottom side x1 = (points[1][0] + points[2][0]) / 2; y1 = (points[1][1] + points[2][1]) / 2; y2 = y1 + labelLineLen; textY = y2 + 5; textAlign = 'center'; } else if (labelPosition === 'rightTop') { // RightTop side x1 = orient === 'horizontal' ? points[3][0] : points[1][0]; y1 = orient === 'horizontal' ? points[3][1] : points[1][1]; if (orient === 'horizontal') { y2 = y1 - labelLineLen; textY = y2 - 5; textAlign = 'center'; } else { x2 = x1 + labelLineLen; textX = x2 + 5; textAlign = 'top'; } } else if (labelPosition === 'rightBottom') { // RightBottom side x1 = points[2][0]; y1 = points[2][1]; if (orient === 'horizontal') { y2 = y1 + labelLineLen; textY = y2 + 5; textAlign = 'center'; } else { x2 = x1 + labelLineLen; textX = x2 + 5; textAlign = 'bottom'; } } else if (labelPosition === 'leftTop') { // LeftTop side x1 = points[0][0]; y1 = orient === 'horizontal' ? points[0][1] : points[1][1]; if (orient === 'horizontal') { y2 = y1 - labelLineLen; textY = y2 - 5; textAlign = 'center'; } else { x2 = x1 - labelLineLen; textX = x2 - 5; textAlign = 'right'; } } else if (labelPosition === 'leftBottom') { // LeftBottom side x1 = orient === 'horizontal' ? points[1][0] : points[3][0]; y1 = orient === 'horizontal' ? points[1][1] : points[2][1]; if (orient === 'horizontal') { y2 = y1 + labelLineLen; textY = y2 + 5; textAlign = 'center'; } else { x2 = x1 - labelLineLen; textX = x2 - 5; textAlign = 'right'; } } else { // Right side or Bottom side x1 = (points[1][0] + points[2][0]) / 2; y1 = (points[1][1] + points[2][1]) / 2; if (orient === 'horizontal') { y2 = y1 + labelLineLen; textY = y2 + 5; textAlign = 'center'; } else { x2 = x1 + labelLineLen; textX = x2 + 5; textAlign = 'left'; } } if (orient === 'horizontal') { x2 = x1; textX = x2; } else { y2 = y1; textY = y2; } linePoints = [[x1, y1], [x2, y2]]; } layout.label = { linePoints: linePoints, x: textX, y: textY, verticalAlign: 'middle', textAlign: textAlign, inside: isLabelInside }; }); } function funnelLayout(ecModel, api) { ecModel.eachSeriesByType('funnel', function (seriesModel) { var data = seriesModel.getData(); var valueDim = data.mapDimension('value'); var sort = seriesModel.get('sort'); var viewRect = getViewRect$3(seriesModel, api); var orient = seriesModel.get('orient'); var viewWidth = viewRect.width; var viewHeight = viewRect.height; var indices = getSortedIndices(data, sort); var x = viewRect.x; var y = viewRect.y; var sizeExtent = orient === 'horizontal' ? [parsePercent$1(seriesModel.get('minSize'), viewHeight), parsePercent$1(seriesModel.get('maxSize'), viewHeight)] : [parsePercent$1(seriesModel.get('minSize'), viewWidth), parsePercent$1(seriesModel.get('maxSize'), viewWidth)]; var dataExtent = data.getDataExtent(valueDim); var min = seriesModel.get('min'); var max = seriesModel.get('max'); if (min == null) { min = Math.min(dataExtent[0], 0); } if (max == null) { max = dataExtent[1]; } var funnelAlign = seriesModel.get('funnelAlign'); var gap = seriesModel.get('gap'); var viewSize = orient === 'horizontal' ? viewWidth : viewHeight; var itemSize = (viewSize - gap * (data.count() - 1)) / data.count(); var getLinePoints = function (idx, offset) { // End point index is data.count() and we assign it 0 if (orient === 'horizontal') { var val_1 = data.get(valueDim, idx) || 0; var itemHeight = linearMap(val_1, [min, max], sizeExtent, true); var y0 = void 0; switch (funnelAlign) { case 'top': y0 = y; break; case 'center': y0 = y + (viewHeight - itemHeight) / 2; break; case 'bottom': y0 = y + (viewHeight - itemHeight); break; } return [[offset, y0], [offset, y0 + itemHeight]]; } var val = data.get(valueDim, idx) || 0; var itemWidth = linearMap(val, [min, max], sizeExtent, true); var x0; switch (funnelAlign) { case 'left': x0 = x; break; case 'center': x0 = x + (viewWidth - itemWidth) / 2; break; case 'right': x0 = x + viewWidth - itemWidth; break; } return [[x0, offset], [x0 + itemWidth, offset]]; }; if (sort === 'ascending') { // From bottom to top itemSize = -itemSize; gap = -gap; if (orient === 'horizontal') { x += viewWidth; } else { y += viewHeight; } indices = indices.reverse(); } for (var i = 0; i < indices.length; i++) { var idx = indices[i]; var nextIdx = indices[i + 1]; var itemModel = data.getItemModel(idx); if (orient === 'horizontal') { var width = itemModel.get(['itemStyle', 'width']); if (width == null) { width = itemSize; } else { width = parsePercent$1(width, viewWidth); if (sort === 'ascending') { width = -width; } } var start = getLinePoints(idx, x); var end = getLinePoints(nextIdx, x + width); x += width + gap; data.setItemLayout(idx, { points: start.concat(end.slice().reverse()) }); } else { var height = itemModel.get(['itemStyle', 'height']); if (height == null) { height = itemSize; } else { height = parsePercent$1(height, viewHeight); if (sort === 'ascending') { height = -height; } } var start = getLinePoints(idx, y); var end = getLinePoints(nextIdx, y + height); y += height + gap; data.setItemLayout(idx, { points: start.concat(end.slice().reverse()) }); } } labelLayout(data); }); } function install$f(registers) { registers.registerChartView(FunnelView); registers.registerSeriesModel(FunnelSeriesModel); registers.registerLayout(funnelLayout); registers.registerProcessor(dataFilter('funnel')); } var DEFAULT_SMOOTH = 0.3; var ParallelView = /** @class */ function (_super) { __extends(ParallelView, _super); function ParallelView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ParallelView.type; _this._dataGroup = new Group(); _this._initialized = false; return _this; } ParallelView.prototype.init = function () { this.group.add(this._dataGroup); }; /** * @override */ ParallelView.prototype.render = function (seriesModel, ecModel, api, payload) { var dataGroup = this._dataGroup; var data = seriesModel.getData(); var oldData = this._data; var coordSys = seriesModel.coordinateSystem; var dimensions = coordSys.dimensions; var seriesScope = makeSeriesScope$2(seriesModel); data.diff(oldData).add(add).update(update).remove(remove).execute(); function add(newDataIndex) { var line = addEl(data, dataGroup, newDataIndex, dimensions, coordSys); updateElCommon(line, data, newDataIndex, seriesScope); } function update(newDataIndex, oldDataIndex) { var line = oldData.getItemGraphicEl(oldDataIndex); var points = createLinePoints(data, newDataIndex, dimensions, coordSys); data.setItemGraphicEl(newDataIndex, line); updateProps(line, { shape: { points: points } }, seriesModel, newDataIndex); updateElCommon(line, data, newDataIndex, seriesScope); } function remove(oldDataIndex) { var line = oldData.getItemGraphicEl(oldDataIndex); dataGroup.remove(line); } // First create if (!this._initialized) { this._initialized = true; var clipPath = createGridClipShape(coordSys, seriesModel, function () { // Callback will be invoked immediately if there is no animation setTimeout(function () { dataGroup.removeClipPath(); }); }); dataGroup.setClipPath(clipPath); } this._data = data; }; ParallelView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) { this._initialized = true; this._data = null; this._dataGroup.removeAll(); }; ParallelView.prototype.incrementalRender = function (taskParams, seriesModel, ecModel) { var data = seriesModel.getData(); var coordSys = seriesModel.coordinateSystem; var dimensions = coordSys.dimensions; var seriesScope = makeSeriesScope$2(seriesModel); for (var dataIndex = taskParams.start; dataIndex < taskParams.end; dataIndex++) { var line = addEl(data, this._dataGroup, dataIndex, dimensions, coordSys); line.incremental = true; updateElCommon(line, data, dataIndex, seriesScope); } }; ParallelView.prototype.remove = function () { this._dataGroup && this._dataGroup.removeAll(); this._data = null; }; ParallelView.type = 'parallel'; return ParallelView; }(ChartView); function createGridClipShape(coordSys, seriesModel, cb) { var parallelModel = coordSys.model; var rect = coordSys.getRect(); var rectEl = new Rect({ shape: { x: rect.x, y: rect.y, width: rect.width, height: rect.height } }); var dim = parallelModel.get('layout') === 'horizontal' ? 'width' : 'height'; rectEl.setShape(dim, 0); initProps(rectEl, { shape: { width: rect.width, height: rect.height } }, seriesModel, cb); return rectEl; } function createLinePoints(data, dataIndex, dimensions, coordSys) { var points = []; for (var i = 0; i < dimensions.length; i++) { var dimName = dimensions[i]; var value = data.get(data.mapDimension(dimName), dataIndex); if (!isEmptyValue(value, coordSys.getAxis(dimName).type)) { points.push(coordSys.dataToPoint(value, dimName)); } } return points; } function addEl(data, dataGroup, dataIndex, dimensions, coordSys) { var points = createLinePoints(data, dataIndex, dimensions, coordSys); var line = new Polyline({ shape: { points: points }, // silent: true, z2: 10 }); dataGroup.add(line); data.setItemGraphicEl(dataIndex, line); return line; } function makeSeriesScope$2(seriesModel) { var smooth = seriesModel.get('smooth', true); smooth === true && (smooth = DEFAULT_SMOOTH); smooth = numericToNumber(smooth); eqNaN(smooth) && (smooth = 0); return { smooth: smooth }; } function updateElCommon(el, data, dataIndex, seriesScope) { el.useStyle(data.getItemVisual(dataIndex, 'style')); el.style.fill = null; el.setShape('smooth', seriesScope.smooth); var itemModel = data.getItemModel(dataIndex); var emphasisModel = itemModel.getModel('emphasis'); setStatesStylesFromModel(el, itemModel, 'lineStyle'); enableHoverEmphasis(el, emphasisModel.get('focus'), emphasisModel.get('blurScope')); } // function simpleDiff(oldData, newData, dimensions) { // let oldLen; // if (!oldData // || !oldData.__plProgressive // || (oldLen = oldData.count()) !== newData.count() // ) { // return true; // } // let dimLen = dimensions.length; // for (let i = 0; i < oldLen; i++) { // for (let j = 0; j < dimLen; j++) { // if (oldData.get(dimensions[j], i) !== newData.get(dimensions[j], i)) { // return true; // } // } // } // return false; // } // FIXME put in common util? function isEmptyValue(val, axisType) { return axisType === 'category' ? val == null : val == null || isNaN(val); // axisType === 'value' } var ParallelSeriesModel = /** @class */ function (_super) { __extends(ParallelSeriesModel, _super); function ParallelSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ParallelSeriesModel.type; _this.visualStyleAccessPath = 'lineStyle'; _this.visualDrawType = 'stroke'; return _this; } ParallelSeriesModel.prototype.getInitialData = function (option, ecModel) { return createListFromArray(this.getSource(), this, { useEncodeDefaulter: bind(makeDefaultEncode, null, this) }); }; /** * User can get data raw indices on 'axisAreaSelected' event received. * * @return Raw indices */ ParallelSeriesModel.prototype.getRawIndicesByActiveState = function (activeState) { var coordSys = this.coordinateSystem; var data = this.getData(); var indices = []; coordSys.eachActiveState(data, function (theActiveState, dataIndex) { if (activeState === theActiveState) { indices.push(data.getRawIndex(dataIndex)); } }); return indices; }; ParallelSeriesModel.type = 'series.parallel'; ParallelSeriesModel.dependencies = ['parallel']; ParallelSeriesModel.defaultOption = { zlevel: 0, z: 2, coordinateSystem: 'parallel', parallelIndex: 0, label: { show: false }, inactiveOpacity: 0.05, activeOpacity: 1, lineStyle: { width: 1, opacity: 0.45, type: 'solid' }, emphasis: { label: { show: false } }, progressive: 500, smooth: false, animationEasing: 'linear' }; return ParallelSeriesModel; }(SeriesModel); function makeDefaultEncode(seriesModel) { // The mapping of parallelAxis dimension to data dimension can // be specified in parallelAxis.option.dim. For example, if // parallelAxis.option.dim is 'dim3', it mapping to the third // dimension of data. But `data.encode` has higher priority. // Moreover, parallelModel.dimension should not be regarded as data // dimensions. Consider dimensions = ['dim4', 'dim2', 'dim6']; var parallelModel = seriesModel.ecModel.getComponent('parallel', seriesModel.get('parallelIndex')); if (!parallelModel) { return; } var encodeDefine = {}; each(parallelModel.dimensions, function (axisDim) { var dataDimIndex = convertDimNameToNumber(axisDim); encodeDefine[axisDim] = dataDimIndex; }); return encodeDefine; } function convertDimNameToNumber(dimName) { return +dimName.replace('dim', ''); } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ var opacityAccessPath$1 = ['lineStyle', 'opacity']; var parallelVisual = { seriesType: 'parallel', reset: function (seriesModel, ecModel) { var coordSys = seriesModel.coordinateSystem; var opacityMap = { normal: seriesModel.get(['lineStyle', 'opacity']), active: seriesModel.get('activeOpacity'), inactive: seriesModel.get('inactiveOpacity') }; return { progress: function (params, data) { coordSys.eachActiveState(data, function (activeState, dataIndex) { var opacity = opacityMap[activeState]; if (activeState === 'normal' && data.hasItemOption) { var itemOpacity = data.getItemModel(dataIndex).get(opacityAccessPath$1, true); itemOpacity != null && (opacity = itemOpacity); } var existsStyle = data.ensureUniqueItemVisual(dataIndex, 'style'); existsStyle.opacity = opacity; }, params.start, params.end); } }; } }; function parallelPreprocessor(option) { createParallelIfNeeded(option); mergeAxisOptionFromParallel(option); } /** * Create a parallel coordinate if not exists. * @inner */ function createParallelIfNeeded(option) { if (option.parallel) { return; } var hasParallelSeries = false; each(option.series, function (seriesOpt) { if (seriesOpt && seriesOpt.type === 'parallel') { hasParallelSeries = true; } }); if (hasParallelSeries) { option.parallel = [{}]; } } /** * Merge aixs definition from parallel option (if exists) to axis option. * @inner */ function mergeAxisOptionFromParallel(option) { var axes = normalizeToArray(option.parallelAxis); each(axes, function (axisOption) { if (!isObject(axisOption)) { return; } var parallelIndex = axisOption.parallelIndex || 0; var parallelOption = normalizeToArray(option.parallel)[parallelIndex]; if (parallelOption && parallelOption.parallelAxisDefault) { merge(axisOption, parallelOption.parallelAxisDefault, false); } }); } var CLICK_THRESHOLD = 5; // > 4 var ParallelView$1 = /** @class */ function (_super) { __extends(ParallelView, _super); function ParallelView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ParallelView.type; return _this; } ParallelView.prototype.render = function (parallelModel, ecModel, api) { this._model = parallelModel; this._api = api; if (!this._handlers) { this._handlers = {}; each(handlers, function (handler, eventName) { api.getZr().on(eventName, this._handlers[eventName] = bind(handler, this)); }, this); } createOrUpdate(this, '_throttledDispatchExpand', parallelModel.get('axisExpandRate'), 'fixRate'); }; ParallelView.prototype.dispose = function (ecModel, api) { each(this._handlers, function (handler, eventName) { api.getZr().off(eventName, handler); }); this._handlers = null; }; /** * @internal * @param {Object} [opt] If null, cancle the last action triggering for debounce. */ ParallelView.prototype._throttledDispatchExpand = function (opt) { this._dispatchExpand(opt); }; /** * @internal */ ParallelView.prototype._dispatchExpand = function (opt) { opt && this._api.dispatchAction(extend({ type: 'parallelAxisExpand' }, opt)); }; ParallelView.type = 'parallel'; return ParallelView; }(ComponentView); var handlers = { mousedown: function (e) { if (checkTrigger(this, 'click')) { this._mouseDownPoint = [e.offsetX, e.offsetY]; } }, mouseup: function (e) { var mouseDownPoint = this._mouseDownPoint; if (checkTrigger(this, 'click') && mouseDownPoint) { var point = [e.offsetX, e.offsetY]; var dist = Math.pow(mouseDownPoint[0] - point[0], 2) + Math.pow(mouseDownPoint[1] - point[1], 2); if (dist > CLICK_THRESHOLD) { return; } var result = this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX, e.offsetY]); result.behavior !== 'none' && this._dispatchExpand({ axisExpandWindow: result.axisExpandWindow }); } this._mouseDownPoint = null; }, mousemove: function (e) { // Should do nothing when brushing. if (this._mouseDownPoint || !checkTrigger(this, 'mousemove')) { return; } var model = this._model; var result = model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX, e.offsetY]); var behavior = result.behavior; behavior === 'jump' && this._throttledDispatchExpand.debounceNextCall(model.get('axisExpandDebounce')); this._throttledDispatchExpand(behavior === 'none' ? null // Cancle the last trigger, in case that mouse slide out of the area quickly. : { axisExpandWindow: result.axisExpandWindow, // Jumping uses animation, and sliding suppresses animation. animation: behavior === 'jump' ? null : { duration: 0 // Disable animation. } }); } }; function checkTrigger(view, triggerOn) { var model = view._model; return model.get('axisExpandable') && model.get('axisExpandTriggerOn') === triggerOn; } var ParallelModel = /** @class */ function (_super) { __extends(ParallelModel, _super); function ParallelModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ParallelModel.type; return _this; } ParallelModel.prototype.init = function () { _super.prototype.init.apply(this, arguments); this.mergeOption({}); }; ParallelModel.prototype.mergeOption = function (newOption) { var thisOption = this.option; newOption && merge(thisOption, newOption, true); this._initDimensions(); }; /** * Whether series or axis is in this coordinate system. */ ParallelModel.prototype.contains = function (model, ecModel) { var parallelIndex = model.get('parallelIndex'); return parallelIndex != null && ecModel.getComponent('parallel', parallelIndex) === this; }; ParallelModel.prototype.setAxisExpand = function (opt) { each(['axisExpandable', 'axisExpandCenter', 'axisExpandCount', 'axisExpandWidth', 'axisExpandWindow'], function (name) { if (opt.hasOwnProperty(name)) { // @ts-ignore FIXME: why "never" inferred in this.option[name]? this.option[name] = opt[name]; } }, this); }; ParallelModel.prototype._initDimensions = function () { var dimensions = this.dimensions = []; var parallelAxisIndex = this.parallelAxisIndex = []; var axisModels = filter(this.ecModel.queryComponents({ mainType: 'parallelAxis' }), function (axisModel) { // Can not use this.contains here, because // initialization has not been completed yet. return (axisModel.get('parallelIndex') || 0) === this.componentIndex; }, this); each(axisModels, function (axisModel) { dimensions.push('dim' + axisModel.get('dim')); parallelAxisIndex.push(axisModel.componentIndex); }); }; ParallelModel.type = 'parallel'; ParallelModel.dependencies = ['parallelAxis']; ParallelModel.layoutMode = 'box'; ParallelModel.defaultOption = { zlevel: 0, z: 0, left: 80, top: 60, right: 80, bottom: 60, // width: {totalWidth} - left - right, // height: {totalHeight} - top - bottom, layout: 'horizontal', // FIXME // naming? axisExpandable: false, axisExpandCenter: null, axisExpandCount: 0, axisExpandWidth: 50, axisExpandRate: 17, axisExpandDebounce: 50, // [out, in, jumpTarget]. In percentage. If use [null, 0.05], null means full. // Do not doc to user until necessary. axisExpandSlideTriggerArea: [-0.15, 0.05, 0.4], axisExpandTriggerOn: 'click', parallelAxisDefault: null }; return ParallelModel; }(ComponentModel); var ParallelAxis = /** @class */ function (_super) { __extends(ParallelAxis, _super); function ParallelAxis(dim, scale, coordExtent, axisType, axisIndex) { var _this = _super.call(this, dim, scale, coordExtent) || this; _this.type = axisType || 'value'; _this.axisIndex = axisIndex; return _this; } ParallelAxis.prototype.isHorizontal = function () { return this.coordinateSystem.getModel().get('layout') !== 'horizontal'; }; return ParallelAxis; }(Axis); /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * Calculate slider move result. * Usage: * (1) If both handle0 and handle1 are needed to be moved, set minSpan the same as * maxSpan and the same as `Math.abs(handleEnd[1] - handleEnds[0])`. * (2) If handle0 is forbidden to cross handle1, set minSpan as `0`. * * @param delta Move length. * @param handleEnds handleEnds[0] can be bigger then handleEnds[1]. * handleEnds will be modified in this method. * @param extent handleEnds is restricted by extent. * extent[0] should less or equals than extent[1]. * @param handleIndex Can be 'all', means that both move the two handleEnds. * @param minSpan The range of dataZoom can not be smaller than that. * If not set, handle0 and cross handle1. If set as a non-negative * number (including `0`), handles will push each other when reaching * the minSpan. * @param maxSpan The range of dataZoom can not be larger than that. * @return The input handleEnds. */ function sliderMove(delta, handleEnds, extent, handleIndex, minSpan, maxSpan) { delta = delta || 0; var extentSpan = extent[1] - extent[0]; // Notice maxSpan and minSpan can be null/undefined. if (minSpan != null) { minSpan = restrict(minSpan, [0, extentSpan]); } if (maxSpan != null) { maxSpan = Math.max(maxSpan, minSpan != null ? minSpan : 0); } if (handleIndex === 'all') { var handleSpan = Math.abs(handleEnds[1] - handleEnds[0]); handleSpan = restrict(handleSpan, [0, extentSpan]); minSpan = maxSpan = restrict(handleSpan, [minSpan, maxSpan]); handleIndex = 0; } handleEnds[0] = restrict(handleEnds[0], extent); handleEnds[1] = restrict(handleEnds[1], extent); var originalDistSign = getSpanSign(handleEnds, handleIndex); handleEnds[handleIndex] += delta; // Restrict in extent. var extentMinSpan = minSpan || 0; var realExtent = extent.slice(); originalDistSign.sign < 0 ? realExtent[0] += extentMinSpan : realExtent[1] -= extentMinSpan; handleEnds[handleIndex] = restrict(handleEnds[handleIndex], realExtent); // Expand span. var currDistSign; currDistSign = getSpanSign(handleEnds, handleIndex); if (minSpan != null && (currDistSign.sign !== originalDistSign.sign || currDistSign.span < minSpan)) { // If minSpan exists, 'cross' is forbidden. handleEnds[1 - handleIndex] = handleEnds[handleIndex] + originalDistSign.sign * minSpan; } // Shrink span. currDistSign = getSpanSign(handleEnds, handleIndex); if (maxSpan != null && currDistSign.span > maxSpan) { handleEnds[1 - handleIndex] = handleEnds[handleIndex] + currDistSign.sign * maxSpan; } return handleEnds; } function getSpanSign(handleEnds, handleIndex) { var dist = handleEnds[handleIndex] - handleEnds[1 - handleIndex]; // If `handleEnds[0] === handleEnds[1]`, always believe that handleEnd[0] // is at left of handleEnds[1] for non-cross case. return { span: Math.abs(dist), sign: dist > 0 ? -1 : dist < 0 ? 1 : handleIndex ? -1 : 1 }; } function restrict(value, extend) { return Math.min(extend[1] != null ? extend[1] : Infinity, Math.max(extend[0] != null ? extend[0] : -Infinity, value)); } var each$6 = each; var mathMin$8 = Math.min; var mathMax$8 = Math.max; var mathFloor$2 = Math.floor; var mathCeil$1 = Math.ceil; var round$2 = round; var PI$7 = Math.PI; var Parallel = /** @class */ function () { function Parallel(parallelModel, ecModel, api) { this.type = 'parallel'; /** * key: dimension */ this._axesMap = createHashMap(); /** * key: dimension * value: {position: [], rotation, } */ this._axesLayout = {}; this.dimensions = parallelModel.dimensions; this._model = parallelModel; this._init(parallelModel, ecModel, api); } Parallel.prototype._init = function (parallelModel, ecModel, api) { var dimensions = parallelModel.dimensions; var parallelAxisIndex = parallelModel.parallelAxisIndex; each$6(dimensions, function (dim, idx) { var axisIndex = parallelAxisIndex[idx]; var axisModel = ecModel.getComponent('parallelAxis', axisIndex); var axis = this._axesMap.set(dim, new ParallelAxis(dim, createScaleByModel(axisModel), [0, 0], axisModel.get('type'), axisIndex)); var isCategory = axis.type === 'category'; axis.onBand = isCategory && axisModel.get('boundaryGap'); axis.inverse = axisModel.get('inverse'); // Injection axisModel.axis = axis; axis.model = axisModel; axis.coordinateSystem = axisModel.coordinateSystem = this; }, this); }; /** * Update axis scale after data processed */ Parallel.prototype.update = function (ecModel, api) { this._updateAxesFromSeries(this._model, ecModel); }; Parallel.prototype.containPoint = function (point) { var layoutInfo = this._makeLayoutInfo(); var axisBase = layoutInfo.axisBase; var layoutBase = layoutInfo.layoutBase; var pixelDimIndex = layoutInfo.pixelDimIndex; var pAxis = point[1 - pixelDimIndex]; var pLayout = point[pixelDimIndex]; return pAxis >= axisBase && pAxis <= axisBase + layoutInfo.axisLength && pLayout >= layoutBase && pLayout <= layoutBase + layoutInfo.layoutLength; }; Parallel.prototype.getModel = function () { return this._model; }; /** * Update properties from series */ Parallel.prototype._updateAxesFromSeries = function (parallelModel, ecModel) { ecModel.eachSeries(function (seriesModel) { if (!parallelModel.contains(seriesModel, ecModel)) { return; } var data = seriesModel.getData(); each$6(this.dimensions, function (dim) { var axis = this._axesMap.get(dim); axis.scale.unionExtentFromData(data, data.mapDimension(dim)); niceScaleExtent(axis.scale, axis.model); }, this); }, this); }; /** * Resize the parallel coordinate system. */ Parallel.prototype.resize = function (parallelModel, api) { this._rect = getLayoutRect(parallelModel.getBoxLayoutParams(), { width: api.getWidth(), height: api.getHeight() }); this._layoutAxes(); }; Parallel.prototype.getRect = function () { return this._rect; }; Parallel.prototype._makeLayoutInfo = function () { var parallelModel = this._model; var rect = this._rect; var xy = ['x', 'y']; var wh = ['width', 'height']; var layout = parallelModel.get('layout'); var pixelDimIndex = layout === 'horizontal' ? 0 : 1; var layoutLength = rect[wh[pixelDimIndex]]; var layoutExtent = [0, layoutLength]; var axisCount = this.dimensions.length; var axisExpandWidth = restrict$1(parallelModel.get('axisExpandWidth'), layoutExtent); var axisExpandCount = restrict$1(parallelModel.get('axisExpandCount') || 0, [0, axisCount]); var axisExpandable = parallelModel.get('axisExpandable') && axisCount > 3 && axisCount > axisExpandCount && axisExpandCount > 1 && axisExpandWidth > 0 && layoutLength > 0; // `axisExpandWindow` is According to the coordinates of [0, axisExpandLength], // for sake of consider the case that axisCollapseWidth is 0 (when screen is narrow), // where collapsed axes should be overlapped. var axisExpandWindow = parallelModel.get('axisExpandWindow'); var winSize; if (!axisExpandWindow) { winSize = restrict$1(axisExpandWidth * (axisExpandCount - 1), layoutExtent); var axisExpandCenter = parallelModel.get('axisExpandCenter') || mathFloor$2(axisCount / 2); axisExpandWindow = [axisExpandWidth * axisExpandCenter - winSize / 2]; axisExpandWindow[1] = axisExpandWindow[0] + winSize; } else { winSize = restrict$1(axisExpandWindow[1] - axisExpandWindow[0], layoutExtent); axisExpandWindow[1] = axisExpandWindow[0] + winSize; } var axisCollapseWidth = (layoutLength - winSize) / (axisCount - axisExpandCount); // Avoid axisCollapseWidth is too small. axisCollapseWidth < 3 && (axisCollapseWidth = 0); // Find the first and last indices > ewin[0] and < ewin[1]. var winInnerIndices = [mathFloor$2(round$2(axisExpandWindow[0] / axisExpandWidth, 1)) + 1, mathCeil$1(round$2(axisExpandWindow[1] / axisExpandWidth, 1)) - 1]; // Pos in ec coordinates. var axisExpandWindow0Pos = axisCollapseWidth / axisExpandWidth * axisExpandWindow[0]; return { layout: layout, pixelDimIndex: pixelDimIndex, layoutBase: rect[xy[pixelDimIndex]], layoutLength: layoutLength, axisBase: rect[xy[1 - pixelDimIndex]], axisLength: rect[wh[1 - pixelDimIndex]], axisExpandable: axisExpandable, axisExpandWidth: axisExpandWidth, axisCollapseWidth: axisCollapseWidth, axisExpandWindow: axisExpandWindow, axisCount: axisCount, winInnerIndices: winInnerIndices, axisExpandWindow0Pos: axisExpandWindow0Pos }; }; Parallel.prototype._layoutAxes = function () { var rect = this._rect; var axes = this._axesMap; var dimensions = this.dimensions; var layoutInfo = this._makeLayoutInfo(); var layout = layoutInfo.layout; axes.each(function (axis) { var axisExtent = [0, layoutInfo.axisLength]; var idx = axis.inverse ? 1 : 0; axis.setExtent(axisExtent[idx], axisExtent[1 - idx]); }); each$6(dimensions, function (dim, idx) { var posInfo = (layoutInfo.axisExpandable ? layoutAxisWithExpand : layoutAxisWithoutExpand)(idx, layoutInfo); var positionTable = { horizontal: { x: posInfo.position, y: layoutInfo.axisLength }, vertical: { x: 0, y: posInfo.position } }; var rotationTable = { horizontal: PI$7 / 2, vertical: 0 }; var position = [positionTable[layout].x + rect.x, positionTable[layout].y + rect.y]; var rotation = rotationTable[layout]; var transform = create$1(); rotate(transform, transform, rotation); translate(transform, transform, position); // TODO // tick layout info // TODO // update dimensions info based on axis order. this._axesLayout[dim] = { position: position, rotation: rotation, transform: transform, axisNameAvailableWidth: posInfo.axisNameAvailableWidth, axisLabelShow: posInfo.axisLabelShow, nameTruncateMaxWidth: posInfo.nameTruncateMaxWidth, tickDirection: 1, labelDirection: 1 }; }, this); }; /** * Get axis by dim. */ Parallel.prototype.getAxis = function (dim) { return this._axesMap.get(dim); }; /** * Convert a dim value of a single item of series data to Point. */ Parallel.prototype.dataToPoint = function (value, dim) { return this.axisCoordToPoint(this._axesMap.get(dim).dataToCoord(value), dim); }; /** * Travel data for one time, get activeState of each data item. * @param start the start dataIndex that travel from. * @param end the next dataIndex of the last dataIndex will be travel. */ Parallel.prototype.eachActiveState = function (data, callback, start, end) { start == null && (start = 0); end == null && (end = data.count()); var axesMap = this._axesMap; var dimensions = this.dimensions; var dataDimensions = []; var axisModels = []; each(dimensions, function (axisDim) { dataDimensions.push(data.mapDimension(axisDim)); axisModels.push(axesMap.get(axisDim).model); }); var hasActiveSet = this.hasAxisBrushed(); for (var dataIndex = start; dataIndex < end; dataIndex++) { var activeState = void 0; if (!hasActiveSet) { activeState = 'normal'; } else { activeState = 'active'; var values = data.getValues(dataDimensions, dataIndex); for (var j = 0, lenj = dimensions.length; j < lenj; j++) { var state = axisModels[j].getActiveState(values[j]); if (state === 'inactive') { activeState = 'inactive'; break; } } } callback(activeState, dataIndex); } }; /** * Whether has any activeSet. */ Parallel.prototype.hasAxisBrushed = function () { var dimensions = this.dimensions; var axesMap = this._axesMap; var hasActiveSet = false; for (var j = 0, lenj = dimensions.length; j < lenj; j++) { if (axesMap.get(dimensions[j]).model.getActiveState() !== 'normal') { hasActiveSet = true; } } return hasActiveSet; }; /** * Convert coords of each axis to Point. * Return point. For example: [10, 20] */ Parallel.prototype.axisCoordToPoint = function (coord, dim) { var axisLayout = this._axesLayout[dim]; return applyTransform$1([coord, 0], axisLayout.transform); }; /** * Get axis layout. */ Parallel.prototype.getAxisLayout = function (dim) { return clone(this._axesLayout[dim]); }; /** * @return {Object} {axisExpandWindow, delta, behavior: 'jump' | 'slide' | 'none'}. */ Parallel.prototype.getSlidedAxisExpandWindow = function (point) { var layoutInfo = this._makeLayoutInfo(); var pixelDimIndex = layoutInfo.pixelDimIndex; var axisExpandWindow = layoutInfo.axisExpandWindow.slice(); var winSize = axisExpandWindow[1] - axisExpandWindow[0]; var extent = [0, layoutInfo.axisExpandWidth * (layoutInfo.axisCount - 1)]; // Out of the area of coordinate system. if (!this.containPoint(point)) { return { behavior: 'none', axisExpandWindow: axisExpandWindow }; } // Conver the point from global to expand coordinates. var pointCoord = point[pixelDimIndex] - layoutInfo.layoutBase - layoutInfo.axisExpandWindow0Pos; // For dragging operation convenience, the window should not be // slided when mouse is the center area of the window. var delta; var behavior = 'slide'; var axisCollapseWidth = layoutInfo.axisCollapseWidth; var triggerArea = this._model.get('axisExpandSlideTriggerArea'); // But consider touch device, jump is necessary. var useJump = triggerArea[0] != null; if (axisCollapseWidth) { if (useJump && axisCollapseWidth && pointCoord < winSize * triggerArea[0]) { behavior = 'jump'; delta = pointCoord - winSize * triggerArea[2]; } else if (useJump && axisCollapseWidth && pointCoord > winSize * (1 - triggerArea[0])) { behavior = 'jump'; delta = pointCoord - winSize * (1 - triggerArea[2]); } else { (delta = pointCoord - winSize * triggerArea[1]) >= 0 && (delta = pointCoord - winSize * (1 - triggerArea[1])) <= 0 && (delta = 0); } delta *= layoutInfo.axisExpandWidth / axisCollapseWidth; delta ? sliderMove(delta, axisExpandWindow, extent, 'all') // Avoid nonsense triger on mousemove. : behavior = 'none'; } // When screen is too narrow, make it visible and slidable, although it is hard to interact. else { var winSize2 = axisExpandWindow[1] - axisExpandWindow[0]; var pos = extent[1] * pointCoord / winSize2; axisExpandWindow = [mathMax$8(0, pos - winSize2 / 2)]; axisExpandWindow[1] = mathMin$8(extent[1], axisExpandWindow[0] + winSize2); axisExpandWindow[0] = axisExpandWindow[1] - winSize2; } return { axisExpandWindow: axisExpandWindow, behavior: behavior }; }; return Parallel; }(); function restrict$1(len, extent) { return mathMin$8(mathMax$8(len, extent[0]), extent[1]); } function layoutAxisWithoutExpand(axisIndex, layoutInfo) { var step = layoutInfo.layoutLength / (layoutInfo.axisCount - 1); return { position: step * axisIndex, axisNameAvailableWidth: step, axisLabelShow: true }; } function layoutAxisWithExpand(axisIndex, layoutInfo) { var layoutLength = layoutInfo.layoutLength; var axisExpandWidth = layoutInfo.axisExpandWidth; var axisCount = layoutInfo.axisCount; var axisCollapseWidth = layoutInfo.axisCollapseWidth; var winInnerIndices = layoutInfo.winInnerIndices; var position; var axisNameAvailableWidth = axisCollapseWidth; var axisLabelShow = false; var nameTruncateMaxWidth; if (axisIndex < winInnerIndices[0]) { position = axisIndex * axisCollapseWidth; nameTruncateMaxWidth = axisCollapseWidth; } else if (axisIndex <= winInnerIndices[1]) { position = layoutInfo.axisExpandWindow0Pos + axisIndex * axisExpandWidth - layoutInfo.axisExpandWindow[0]; axisNameAvailableWidth = axisExpandWidth; axisLabelShow = true; } else { position = layoutLength - (axisCount - 1 - axisIndex) * axisCollapseWidth; nameTruncateMaxWidth = axisCollapseWidth; } return { position: position, axisNameAvailableWidth: axisNameAvailableWidth, axisLabelShow: axisLabelShow, nameTruncateMaxWidth: nameTruncateMaxWidth }; } function createParallelCoordSys(ecModel, api) { var coordSysList = []; ecModel.eachComponent('parallel', function (parallelModel, idx) { var coordSys = new Parallel(parallelModel, ecModel, api); coordSys.name = 'parallel_' + idx; coordSys.resize(parallelModel, api); parallelModel.coordinateSystem = coordSys; coordSys.model = parallelModel; coordSysList.push(coordSys); }); // Inject the coordinateSystems into seriesModel ecModel.eachSeries(function (seriesModel) { if (seriesModel.get('coordinateSystem') === 'parallel') { var parallelModel = seriesModel.getReferringComponents('parallel', SINGLE_REFERRING).models[0]; seriesModel.coordinateSystem = parallelModel.coordinateSystem; } }); return coordSysList; } var parallelCoordSysCreator = { create: createParallelCoordSys }; var ParallelAxisModel = /** @class */ function (_super) { __extends(ParallelAxisModel, _super); function ParallelAxisModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ParallelAxisModel.type; /** * @readOnly */ _this.activeIntervals = []; return _this; } ParallelAxisModel.prototype.getAreaSelectStyle = function () { return makeStyleMapper([['fill', 'color'], ['lineWidth', 'borderWidth'], ['stroke', 'borderColor'], ['width', 'width'], ['opacity', 'opacity'] // Option decal is in `DecalObject` but style.decal is in `PatternObject`. // So do not transfer decal directly. ])(this.getModel('areaSelectStyle')); }; /** * The code of this feature is put on AxisModel but not ParallelAxis, * because axisModel can be alive after echarts updating but instance of * ParallelAxis having been disposed. this._activeInterval should be kept * when action dispatched (i.e. legend click). * * @param intervals `interval.length === 0` means set all active. */ ParallelAxisModel.prototype.setActiveIntervals = function (intervals) { var activeIntervals = this.activeIntervals = clone(intervals); // Normalize if (activeIntervals) { for (var i = activeIntervals.length - 1; i >= 0; i--) { asc(activeIntervals[i]); } } }; /** * @param value When only attempting detect whether 'no activeIntervals set', * `value` is not needed to be input. */ ParallelAxisModel.prototype.getActiveState = function (value) { var activeIntervals = this.activeIntervals; if (!activeIntervals.length) { return 'normal'; } if (value == null || isNaN(+value)) { return 'inactive'; } // Simple optimization if (activeIntervals.length === 1) { var interval = activeIntervals[0]; if (interval[0] <= value && value <= interval[1]) { return 'active'; } } else { for (var i = 0, len = activeIntervals.length; i < len; i++) { if (activeIntervals[i][0] <= value && value <= activeIntervals[i][1]) { return 'active'; } } } return 'inactive'; }; return ParallelAxisModel; }(ComponentModel); mixin(ParallelAxisModel, AxisModelCommonMixin); var BRUSH_PANEL_GLOBAL = true; var mathMin$9 = Math.min; var mathMax$9 = Math.max; var mathPow$2 = Math.pow; var COVER_Z = 10000; var UNSELECT_THRESHOLD = 6; var MIN_RESIZE_LINE_WIDTH = 6; var MUTEX_RESOURCE_KEY = 'globalPan'; var DIRECTION_MAP = { w: [0, 0], e: [0, 1], n: [1, 0], s: [1, 1] }; var CURSOR_MAP = { w: 'ew', e: 'ew', n: 'ns', s: 'ns', ne: 'nesw', sw: 'nesw', nw: 'nwse', se: 'nwse' }; var DEFAULT_BRUSH_OPT = { brushStyle: { lineWidth: 2, stroke: 'rgba(210,219,238,0.3)', fill: '#D2DBEE' }, transformable: true, brushMode: 'single', removeOnClick: false }; var baseUID = 0; /** * params: * areas: Array., coord relates to container group, * If no container specified, to global. * opt { * isEnd: boolean, * removeOnClick: boolean * } */ var BrushController = /** @class */ function (_super) { __extends(BrushController, _super); function BrushController(zr) { var _this = _super.call(this) || this; /** * @internal */ _this._track = []; /** * @internal */ _this._covers = []; _this._handlers = {}; if ("development" !== 'production') { assert(zr); } _this._zr = zr; _this.group = new Group(); _this._uid = 'brushController_' + baseUID++; each(pointerHandlers, function (handler, eventName) { this._handlers[eventName] = bind(handler, this); }, _this); return _this; } /** * If set to `false`, select disabled. */ BrushController.prototype.enableBrush = function (brushOption) { if ("development" !== 'production') { assert(this._mounted); } this._brushType && this._doDisableBrush(); brushOption.brushType && this._doEnableBrush(brushOption); return this; }; BrushController.prototype._doEnableBrush = function (brushOption) { var zr = this._zr; // Consider roam, which takes globalPan too. if (!this._enableGlobalPan) { take(zr, MUTEX_RESOURCE_KEY, this._uid); } each(this._handlers, function (handler, eventName) { zr.on(eventName, handler); }); this._brushType = brushOption.brushType; this._brushOption = merge(clone(DEFAULT_BRUSH_OPT), brushOption, true); }; BrushController.prototype._doDisableBrush = function () { var zr = this._zr; release(zr, MUTEX_RESOURCE_KEY, this._uid); each(this._handlers, function (handler, eventName) { zr.off(eventName, handler); }); this._brushType = this._brushOption = null; }; /** * @param panelOpts If not pass, it is global brush. */ BrushController.prototype.setPanels = function (panelOpts) { if (panelOpts && panelOpts.length) { var panels_1 = this._panels = {}; each(panelOpts, function (panelOpts) { panels_1[panelOpts.panelId] = clone(panelOpts); }); } else { this._panels = null; } return this; }; BrushController.prototype.mount = function (opt) { opt = opt || {}; if ("development" !== 'production') { this._mounted = true; // should be at first. } this._enableGlobalPan = opt.enableGlobalPan; var thisGroup = this.group; this._zr.add(thisGroup); thisGroup.attr({ x: opt.x || 0, y: opt.y || 0, rotation: opt.rotation || 0, scaleX: opt.scaleX || 1, scaleY: opt.scaleY || 1 }); this._transform = thisGroup.getLocalTransform(); return this; }; // eachCover(cb, context): void { // each(this._covers, cb, context); // } /** * Update covers. * @param coverConfigList * If coverConfigList is null/undefined, all covers removed. */ BrushController.prototype.updateCovers = function (coverConfigList) { if ("development" !== 'production') { assert(this._mounted); } coverConfigList = map(coverConfigList, function (coverConfig) { return merge(clone(DEFAULT_BRUSH_OPT), coverConfig, true); }); var tmpIdPrefix = '\0-brush-index-'; var oldCovers = this._covers; var newCovers = this._covers = []; var controller = this; var creatingCover = this._creatingCover; new DataDiffer(oldCovers, coverConfigList, oldGetKey, getKey).add(addOrUpdate).update(addOrUpdate).remove(remove).execute(); return this; function getKey(brushOption, index) { return (brushOption.id != null ? brushOption.id : tmpIdPrefix + index) + '-' + brushOption.brushType; } function oldGetKey(cover, index) { return getKey(cover.__brushOption, index); } function addOrUpdate(newIndex, oldIndex) { var newBrushInternal = coverConfigList[newIndex]; // Consider setOption in event listener of brushSelect, // where updating cover when creating should be forbiden. if (oldIndex != null && oldCovers[oldIndex] === creatingCover) { newCovers[newIndex] = oldCovers[oldIndex]; } else { var cover = newCovers[newIndex] = oldIndex != null ? (oldCovers[oldIndex].__brushOption = newBrushInternal, oldCovers[oldIndex]) : endCreating(controller, createCover(controller, newBrushInternal)); updateCoverAfterCreation(controller, cover); } } function remove(oldIndex) { if (oldCovers[oldIndex] !== creatingCover) { controller.group.remove(oldCovers[oldIndex]); } } }; BrushController.prototype.unmount = function () { if ("development" !== 'production') { if (!this._mounted) { return; } } this.enableBrush(false); // container may 'removeAll' outside. clearCovers(this); this._zr.remove(this.group); if ("development" !== 'production') { this._mounted = false; // should be at last. } return this; }; BrushController.prototype.dispose = function () { this.unmount(); this.off(); }; return BrushController; }(Eventful); function createCover(controller, brushOption) { var cover = coverRenderers[brushOption.brushType].createCover(controller, brushOption); cover.__brushOption = brushOption; updateZ(cover, brushOption); controller.group.add(cover); return cover; } function endCreating(controller, creatingCover) { var coverRenderer = getCoverRenderer(creatingCover); if (coverRenderer.endCreating) { coverRenderer.endCreating(controller, creatingCover); updateZ(creatingCover, creatingCover.__brushOption); } return creatingCover; } function updateCoverShape(controller, cover) { var brushOption = cover.__brushOption; getCoverRenderer(cover).updateCoverShape(controller, cover, brushOption.range, brushOption); } function updateZ(cover, brushOption) { var z = brushOption.z; z == null && (z = COVER_Z); cover.traverse(function (el) { el.z = z; el.z2 = z; // Consider in given container. }); } function updateCoverAfterCreation(controller, cover) { getCoverRenderer(cover).updateCommon(controller, cover); updateCoverShape(controller, cover); } function getCoverRenderer(cover) { return coverRenderers[cover.__brushOption.brushType]; } // return target panel or `true` (means global panel) function getPanelByPoint(controller, e, localCursorPoint) { var panels = controller._panels; if (!panels) { return BRUSH_PANEL_GLOBAL; // Global panel } var panel; var transform = controller._transform; each(panels, function (pn) { pn.isTargetByCursor(e, localCursorPoint, transform) && (panel = pn); }); return panel; } // Return a panel or true function getPanelByCover(controller, cover) { var panels = controller._panels; if (!panels) { return BRUSH_PANEL_GLOBAL; // Global panel } var panelId = cover.__brushOption.panelId; // User may give cover without coord sys info, // which is then treated as global panel. return panelId != null ? panels[panelId] : BRUSH_PANEL_GLOBAL; } function clearCovers(controller) { var covers = controller._covers; var originalLength = covers.length; each(covers, function (cover) { controller.group.remove(cover); }, controller); covers.length = 0; return !!originalLength; } function trigger$1(controller, opt) { var areas = map(controller._covers, function (cover) { var brushOption = cover.__brushOption; var range = clone(brushOption.range); return { brushType: brushOption.brushType, panelId: brushOption.panelId, range: range }; }); controller.trigger('brush', { areas: areas, isEnd: !!opt.isEnd, removeOnClick: !!opt.removeOnClick }); } function shouldShowCover(controller) { var track = controller._track; if (!track.length) { return false; } var p2 = track[track.length - 1]; var p1 = track[0]; var dx = p2[0] - p1[0]; var dy = p2[1] - p1[1]; var dist = mathPow$2(dx * dx + dy * dy, 0.5); return dist > UNSELECT_THRESHOLD; } function getTrackEnds(track) { var tail = track.length - 1; tail < 0 && (tail = 0); return [track[0], track[tail]]; } function createBaseRectCover(rectRangeConverter, controller, brushOption, edgeNameSequences) { var cover = new Group(); cover.add(new Rect({ name: 'main', style: makeStyle(brushOption), silent: true, draggable: true, cursor: 'move', drift: curry(driftRect, rectRangeConverter, controller, cover, ['n', 's', 'w', 'e']), ondragend: curry(trigger$1, controller, { isEnd: true }) })); each(edgeNameSequences, function (nameSequence) { cover.add(new Rect({ name: nameSequence.join(''), style: { opacity: 0 }, draggable: true, silent: true, invisible: true, drift: curry(driftRect, rectRangeConverter, controller, cover, nameSequence), ondragend: curry(trigger$1, controller, { isEnd: true }) })); }); return cover; } function updateBaseRect(controller, cover, localRange, brushOption) { var lineWidth = brushOption.brushStyle.lineWidth || 0; var handleSize = mathMax$9(lineWidth, MIN_RESIZE_LINE_WIDTH); var x = localRange[0][0]; var y = localRange[1][0]; var xa = x - lineWidth / 2; var ya = y - lineWidth / 2; var x2 = localRange[0][1]; var y2 = localRange[1][1]; var x2a = x2 - handleSize + lineWidth / 2; var y2a = y2 - handleSize + lineWidth / 2; var width = x2 - x; var height = y2 - y; var widtha = width + lineWidth; var heighta = height + lineWidth; updateRectShape(controller, cover, 'main', x, y, width, height); if (brushOption.transformable) { updateRectShape(controller, cover, 'w', xa, ya, handleSize, heighta); updateRectShape(controller, cover, 'e', x2a, ya, handleSize, heighta); updateRectShape(controller, cover, 'n', xa, ya, widtha, handleSize); updateRectShape(controller, cover, 's', xa, y2a, widtha, handleSize); updateRectShape(controller, cover, 'nw', xa, ya, handleSize, handleSize); updateRectShape(controller, cover, 'ne', x2a, ya, handleSize, handleSize); updateRectShape(controller, cover, 'sw', xa, y2a, handleSize, handleSize); updateRectShape(controller, cover, 'se', x2a, y2a, handleSize, handleSize); } } function updateCommon(controller, cover) { var brushOption = cover.__brushOption; var transformable = brushOption.transformable; var mainEl = cover.childAt(0); mainEl.useStyle(makeStyle(brushOption)); mainEl.attr({ silent: !transformable, cursor: transformable ? 'move' : 'default' }); each([['w'], ['e'], ['n'], ['s'], ['s', 'e'], ['s', 'w'], ['n', 'e'], ['n', 'w']], function (nameSequence) { var el = cover.childOfName(nameSequence.join('')); var globalDir = nameSequence.length === 1 ? getGlobalDirection1(controller, nameSequence[0]) : getGlobalDirection2(controller, nameSequence); el && el.attr({ silent: !transformable, invisible: !transformable, cursor: transformable ? CURSOR_MAP[globalDir] + '-resize' : null }); }); } function updateRectShape(controller, cover, name, x, y, w, h) { var el = cover.childOfName(name); el && el.setShape(pointsToRect(clipByPanel(controller, cover, [[x, y], [x + w, y + h]]))); } function makeStyle(brushOption) { return defaults({ strokeNoScale: true }, brushOption.brushStyle); } function formatRectRange(x, y, x2, y2) { var min = [mathMin$9(x, x2), mathMin$9(y, y2)]; var max = [mathMax$9(x, x2), mathMax$9(y, y2)]; return [[min[0], max[0]], [min[1], max[1]] // y range ]; } function getTransform$1(controller) { return getTransform(controller.group); } function getGlobalDirection1(controller, localDirName) { var map = { w: 'left', e: 'right', n: 'top', s: 'bottom' }; var inverseMap = { left: 'w', right: 'e', top: 'n', bottom: 's' }; var dir = transformDirection(map[localDirName], getTransform$1(controller)); return inverseMap[dir]; } function getGlobalDirection2(controller, localDirNameSeq) { var globalDir = [getGlobalDirection1(controller, localDirNameSeq[0]), getGlobalDirection1(controller, localDirNameSeq[1])]; (globalDir[0] === 'e' || globalDir[0] === 'w') && globalDir.reverse(); return globalDir.join(''); } function driftRect(rectRangeConverter, controller, cover, dirNameSequence, dx, dy) { var brushOption = cover.__brushOption; var rectRange = rectRangeConverter.toRectRange(brushOption.range); var localDelta = toLocalDelta(controller, dx, dy); each(dirNameSequence, function (dirName) { var ind = DIRECTION_MAP[dirName]; rectRange[ind[0]][ind[1]] += localDelta[ind[0]]; }); brushOption.range = rectRangeConverter.fromRectRange(formatRectRange(rectRange[0][0], rectRange[1][0], rectRange[0][1], rectRange[1][1])); updateCoverAfterCreation(controller, cover); trigger$1(controller, { isEnd: false }); } function driftPolygon(controller, cover, dx, dy) { var range = cover.__brushOption.range; var localDelta = toLocalDelta(controller, dx, dy); each(range, function (point) { point[0] += localDelta[0]; point[1] += localDelta[1]; }); updateCoverAfterCreation(controller, cover); trigger$1(controller, { isEnd: false }); } function toLocalDelta(controller, dx, dy) { var thisGroup = controller.group; var localD = thisGroup.transformCoordToLocal(dx, dy); var localZero = thisGroup.transformCoordToLocal(0, 0); return [localD[0] - localZero[0], localD[1] - localZero[1]]; } function clipByPanel(controller, cover, data) { var panel = getPanelByCover(controller, cover); return panel && panel !== BRUSH_PANEL_GLOBAL ? panel.clipPath(data, controller._transform) : clone(data); } function pointsToRect(points) { var xmin = mathMin$9(points[0][0], points[1][0]); var ymin = mathMin$9(points[0][1], points[1][1]); var xmax = mathMax$9(points[0][0], points[1][0]); var ymax = mathMax$9(points[0][1], points[1][1]); return { x: xmin, y: ymin, width: xmax - xmin, height: ymax - ymin }; } function resetCursor(controller, e, localCursorPoint) { if ( // Check active !controller._brushType // resetCursor should be always called when mouse is in zr area, // but not called when mouse is out of zr area to avoid bad influence // if `mousemove`, `mouseup` are triggered from `document` event. || isOutsideZrArea(controller, e.offsetX, e.offsetY)) { return; } var zr = controller._zr; var covers = controller._covers; var currPanel = getPanelByPoint(controller, e, localCursorPoint); // Check whether in covers. if (!controller._dragging) { for (var i = 0; i < covers.length; i++) { var brushOption = covers[i].__brushOption; if (currPanel && (currPanel === BRUSH_PANEL_GLOBAL || brushOption.panelId === currPanel.panelId) && coverRenderers[brushOption.brushType].contain(covers[i], localCursorPoint[0], localCursorPoint[1])) { // Use cursor style set on cover. return; } } } currPanel && zr.setCursorStyle('crosshair'); } function preventDefault(e) { var rawE = e.event; rawE.preventDefault && rawE.preventDefault(); } function mainShapeContain(cover, x, y) { return cover.childOfName('main').contain(x, y); } function updateCoverByMouse(controller, e, localCursorPoint, isEnd) { var creatingCover = controller._creatingCover; var panel = controller._creatingPanel; var thisBrushOption = controller._brushOption; var eventParams; controller._track.push(localCursorPoint.slice()); if (shouldShowCover(controller) || creatingCover) { if (panel && !creatingCover) { thisBrushOption.brushMode === 'single' && clearCovers(controller); var brushOption = clone(thisBrushOption); brushOption.brushType = determineBrushType(brushOption.brushType, panel); brushOption.panelId = panel === BRUSH_PANEL_GLOBAL ? null : panel.panelId; creatingCover = controller._creatingCover = createCover(controller, brushOption); controller._covers.push(creatingCover); } if (creatingCover) { var coverRenderer = coverRenderers[determineBrushType(controller._brushType, panel)]; var coverBrushOption = creatingCover.__brushOption; coverBrushOption.range = coverRenderer.getCreatingRange(clipByPanel(controller, creatingCover, controller._track)); if (isEnd) { endCreating(controller, creatingCover); coverRenderer.updateCommon(controller, creatingCover); } updateCoverShape(controller, creatingCover); eventParams = { isEnd: isEnd }; } } else if (isEnd && thisBrushOption.brushMode === 'single' && thisBrushOption.removeOnClick) { // Help user to remove covers easily, only by a tiny drag, in 'single' mode. // But a single click do not clear covers, because user may have casual // clicks (for example, click on other component and do not expect covers // disappear). // Only some cover removed, trigger action, but not every click trigger action. if (getPanelByPoint(controller, e, localCursorPoint) && clearCovers(controller)) { eventParams = { isEnd: isEnd, removeOnClick: true }; } } return eventParams; } function determineBrushType(brushType, panel) { if (brushType === 'auto') { if ("development" !== 'production') { assert(panel && panel.defaultBrushType, 'MUST have defaultBrushType when brushType is "atuo"'); } return panel.defaultBrushType; } return brushType; } var pointerHandlers = { mousedown: function (e) { if (this._dragging) { // In case some browser do not support globalOut, // and release mouse out side the browser. handleDragEnd(this, e); } else if (!e.target || !e.target.draggable) { preventDefault(e); var localCursorPoint = this.group.transformCoordToLocal(e.offsetX, e.offsetY); this._creatingCover = null; var panel = this._creatingPanel = getPanelByPoint(this, e, localCursorPoint); if (panel) { this._dragging = true; this._track = [localCursorPoint.slice()]; } } }, mousemove: function (e) { var x = e.offsetX; var y = e.offsetY; var localCursorPoint = this.group.transformCoordToLocal(x, y); resetCursor(this, e, localCursorPoint); if (this._dragging) { preventDefault(e); var eventParams = updateCoverByMouse(this, e, localCursorPoint, false); eventParams && trigger$1(this, eventParams); } }, mouseup: function (e) { handleDragEnd(this, e); } }; function handleDragEnd(controller, e) { if (controller._dragging) { preventDefault(e); var x = e.offsetX; var y = e.offsetY; var localCursorPoint = controller.group.transformCoordToLocal(x, y); var eventParams = updateCoverByMouse(controller, e, localCursorPoint, true); controller._dragging = false; controller._track = []; controller._creatingCover = null; // trigger event shoule be at final, after procedure will be nested. eventParams && trigger$1(controller, eventParams); } } function isOutsideZrArea(controller, x, y) { var zr = controller._zr; return x < 0 || x > zr.getWidth() || y < 0 || y > zr.getHeight(); } /** * key: brushType */ var coverRenderers = { lineX: getLineRenderer(0), lineY: getLineRenderer(1), rect: { createCover: function (controller, brushOption) { function returnInput(range) { return range; } return createBaseRectCover({ toRectRange: returnInput, fromRectRange: returnInput }, controller, brushOption, [['w'], ['e'], ['n'], ['s'], ['s', 'e'], ['s', 'w'], ['n', 'e'], ['n', 'w']]); }, getCreatingRange: function (localTrack) { var ends = getTrackEnds(localTrack); return formatRectRange(ends[1][0], ends[1][1], ends[0][0], ends[0][1]); }, updateCoverShape: function (controller, cover, localRange, brushOption) { updateBaseRect(controller, cover, localRange, brushOption); }, updateCommon: updateCommon, contain: mainShapeContain }, polygon: { createCover: function (controller, brushOption) { var cover = new Group(); // Do not use graphic.Polygon because graphic.Polyline do not close the // border of the shape when drawing, which is a better experience for user. cover.add(new Polyline({ name: 'main', style: makeStyle(brushOption), silent: true })); return cover; }, getCreatingRange: function (localTrack) { return localTrack; }, endCreating: function (controller, cover) { cover.remove(cover.childAt(0)); // Use graphic.Polygon close the shape. cover.add(new Polygon({ name: 'main', draggable: true, drift: curry(driftPolygon, controller, cover), ondragend: curry(trigger$1, controller, { isEnd: true }) })); }, updateCoverShape: function (controller, cover, localRange, brushOption) { cover.childAt(0).setShape({ points: clipByPanel(controller, cover, localRange) }); }, updateCommon: updateCommon, contain: mainShapeContain } }; function getLineRenderer(xyIndex) { return { createCover: function (controller, brushOption) { return createBaseRectCover({ toRectRange: function (range) { var rectRange = [range, [0, 100]]; xyIndex && rectRange.reverse(); return rectRange; }, fromRectRange: function (rectRange) { return rectRange[xyIndex]; } }, controller, brushOption, [[['w'], ['e']], [['n'], ['s']]][xyIndex]); }, getCreatingRange: function (localTrack) { var ends = getTrackEnds(localTrack); var min = mathMin$9(ends[0][xyIndex], ends[1][xyIndex]); var max = mathMax$9(ends[0][xyIndex], ends[1][xyIndex]); return [min, max]; }, updateCoverShape: function (controller, cover, localRange, brushOption) { var otherExtent; // If brushWidth not specified, fit the panel. var panel = getPanelByCover(controller, cover); if (panel !== BRUSH_PANEL_GLOBAL && panel.getLinearBrushOtherExtent) { otherExtent = panel.getLinearBrushOtherExtent(xyIndex); } else { var zr = controller._zr; otherExtent = [0, [zr.getWidth(), zr.getHeight()][1 - xyIndex]]; } var rectRange = [localRange, otherExtent]; xyIndex && rectRange.reverse(); updateBaseRect(controller, cover, rectRange, brushOption); }, updateCommon: updateCommon, contain: mainShapeContain }; } function makeRectPanelClipPath(rect) { rect = normalizeRect(rect); return function (localPoints) { return clipPointsByRect(localPoints, rect); }; } function makeLinearBrushOtherExtent(rect, specifiedXYIndex) { rect = normalizeRect(rect); return function (xyIndex) { var idx = specifiedXYIndex != null ? specifiedXYIndex : xyIndex; var brushWidth = idx ? rect.width : rect.height; var base = idx ? rect.x : rect.y; return [base, base + (brushWidth || 0)]; }; } function makeRectIsTargetByCursor(rect, api, targetModel) { var boundingRect = normalizeRect(rect); return function (e, localCursorPoint) { return boundingRect.contain(localCursorPoint[0], localCursorPoint[1]) && !onIrrelevantElement(e, api, targetModel); }; } // Consider width/height is negative. function normalizeRect(rect) { return BoundingRect.create(rect); } var elementList = ['axisLine', 'axisTickLabel', 'axisName']; var ParallelAxisView = /** @class */ function (_super) { __extends(ParallelAxisView, _super); function ParallelAxisView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ParallelAxisView.type; return _this; } ParallelAxisView.prototype.init = function (ecModel, api) { _super.prototype.init.apply(this, arguments); (this._brushController = new BrushController(api.getZr())).on('brush', bind(this._onBrush, this)); }; ParallelAxisView.prototype.render = function (axisModel, ecModel, api, payload) { if (fromAxisAreaSelect(axisModel, ecModel, payload)) { return; } this.axisModel = axisModel; this.api = api; this.group.removeAll(); var oldAxisGroup = this._axisGroup; this._axisGroup = new Group(); this.group.add(this._axisGroup); if (!axisModel.get('show')) { return; } var coordSysModel = getCoordSysModel(axisModel, ecModel); var coordSys = coordSysModel.coordinateSystem; var areaSelectStyle = axisModel.getAreaSelectStyle(); var areaWidth = areaSelectStyle.width; var dim = axisModel.axis.dim; var axisLayout = coordSys.getAxisLayout(dim); var builderOpt = extend({ strokeContainThreshold: areaWidth }, axisLayout); var axisBuilder = new AxisBuilder(axisModel, builderOpt); each(elementList, axisBuilder.add, axisBuilder); this._axisGroup.add(axisBuilder.getGroup()); this._refreshBrushController(builderOpt, areaSelectStyle, axisModel, coordSysModel, areaWidth, api); groupTransition(oldAxisGroup, this._axisGroup, axisModel); }; // /** // * @override // */ // updateVisual(axisModel, ecModel, api, payload) { // this._brushController && this._brushController // .updateCovers(getCoverInfoList(axisModel)); // } ParallelAxisView.prototype._refreshBrushController = function (builderOpt, areaSelectStyle, axisModel, coordSysModel, areaWidth, api) { // After filtering, axis may change, select area needs to be update. var extent = axisModel.axis.getExtent(); var extentLen = extent[1] - extent[0]; var extra = Math.min(30, Math.abs(extentLen) * 0.1); // Arbitrary value. // width/height might be negative, which will be // normalized in BoundingRect. var rect = BoundingRect.create({ x: extent[0], y: -areaWidth / 2, width: extentLen, height: areaWidth }); rect.x -= extra; rect.width += 2 * extra; this._brushController.mount({ enableGlobalPan: true, rotation: builderOpt.rotation, x: builderOpt.position[0], y: builderOpt.position[1] }).setPanels([{ panelId: 'pl', clipPath: makeRectPanelClipPath(rect), isTargetByCursor: makeRectIsTargetByCursor(rect, api, coordSysModel), getLinearBrushOtherExtent: makeLinearBrushOtherExtent(rect, 0) }]).enableBrush({ brushType: 'lineX', brushStyle: areaSelectStyle, removeOnClick: true }).updateCovers(getCoverInfoList(axisModel)); }; ParallelAxisView.prototype._onBrush = function (eventParam) { var coverInfoList = eventParam.areas; // Do not cache these object, because the mey be changed. var axisModel = this.axisModel; var axis = axisModel.axis; var intervals = map(coverInfoList, function (coverInfo) { return [axis.coordToData(coverInfo.range[0], true), axis.coordToData(coverInfo.range[1], true)]; }); // If realtime is true, action is not dispatched on drag end, because // the drag end emits the same params with the last drag move event, // and may have some delay when using touch pad. if (!axisModel.option.realtime === eventParam.isEnd || eventParam.removeOnClick) { // jshint ignore:line this.api.dispatchAction({ type: 'axisAreaSelect', parallelAxisId: axisModel.id, intervals: intervals }); } }; ParallelAxisView.prototype.dispose = function () { this._brushController.dispose(); }; ParallelAxisView.type = 'parallelAxis'; return ParallelAxisView; }(ComponentView); function fromAxisAreaSelect(axisModel, ecModel, payload) { return payload && payload.type === 'axisAreaSelect' && ecModel.findComponents({ mainType: 'parallelAxis', query: payload })[0] === axisModel; } function getCoverInfoList(axisModel) { var axis = axisModel.axis; return map(axisModel.activeIntervals, function (interval) { return { brushType: 'lineX', panelId: 'pl', range: [axis.dataToCoord(interval[0], true), axis.dataToCoord(interval[1], true)] }; }); } function getCoordSysModel(axisModel, ecModel) { return ecModel.getComponent('parallel', axisModel.get('parallelIndex')); } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ var actionInfo$1 = { type: 'axisAreaSelect', event: 'axisAreaSelected' // update: 'updateVisual' }; function installParallelActions(registers) { registers.registerAction(actionInfo$1, function (payload, ecModel) { ecModel.eachComponent({ mainType: 'parallelAxis', query: payload }, function (parallelAxisModel) { parallelAxisModel.axis.model.setActiveIntervals(payload.intervals); }); }); /** * @payload */ registers.registerAction('parallelAxisExpand', function (payload, ecModel) { ecModel.eachComponent({ mainType: 'parallel', query: payload }, function (parallelModel) { parallelModel.setAxisExpand(payload); }); }); } var defaultAxisOption = { type: 'value', areaSelectStyle: { width: 20, borderWidth: 1, borderColor: 'rgba(160,197,232)', color: 'rgba(160,197,232)', opacity: 0.3 }, realtime: true, z: 10 }; function install$g(registers) { registers.registerComponentView(ParallelView$1); registers.registerComponentModel(ParallelModel); registers.registerCoordinateSystem('parallel', parallelCoordSysCreator); registers.registerPreprocessor(parallelPreprocessor); registers.registerComponentModel(ParallelAxisModel); registers.registerComponentView(ParallelAxisView); axisModelCreator(registers, 'parallel', ParallelAxisModel, defaultAxisOption); installParallelActions(registers); } function install$h(registers) { use(install$g); registers.registerChartView(ParallelView); registers.registerSeriesModel(ParallelSeriesModel); registers.registerVisual(registers.PRIORITY.VISUAL.BRUSH, parallelVisual); } var SankeyPathShape = /** @class */ function () { function SankeyPathShape() { this.x1 = 0; this.y1 = 0; this.x2 = 0; this.y2 = 0; this.cpx1 = 0; this.cpy1 = 0; this.cpx2 = 0; this.cpy2 = 0; this.extent = 0; } return SankeyPathShape; }(); var SankeyPath = /** @class */ function (_super) { __extends(SankeyPath, _super); function SankeyPath(opts) { return _super.call(this, opts) || this; } SankeyPath.prototype.getDefaultShape = function () { return new SankeyPathShape(); }; SankeyPath.prototype.buildPath = function (ctx, shape) { var extent = shape.extent; ctx.moveTo(shape.x1, shape.y1); ctx.bezierCurveTo(shape.cpx1, shape.cpy1, shape.cpx2, shape.cpy2, shape.x2, shape.y2); if (shape.orient === 'vertical') { ctx.lineTo(shape.x2 + extent, shape.y2); ctx.bezierCurveTo(shape.cpx2 + extent, shape.cpy2, shape.cpx1 + extent, shape.cpy1, shape.x1 + extent, shape.y1); } else { ctx.lineTo(shape.x2, shape.y2 + extent); ctx.bezierCurveTo(shape.cpx2, shape.cpy2 + extent, shape.cpx1, shape.cpy1 + extent, shape.x1, shape.y1 + extent); } ctx.closePath(); }; SankeyPath.prototype.highlight = function () { enterEmphasis(this); }; SankeyPath.prototype.downplay = function () { leaveEmphasis(this); }; return SankeyPath; }(Path); var SankeyView = /** @class */ function (_super) { __extends(SankeyView, _super); function SankeyView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SankeyView.type; _this._focusAdjacencyDisabled = false; return _this; } SankeyView.prototype.render = function (seriesModel, ecModel, api) { var sankeyView = this; var graph = seriesModel.getGraph(); var group = this.group; var layoutInfo = seriesModel.layoutInfo; // view width var width = layoutInfo.width; // view height var height = layoutInfo.height; var nodeData = seriesModel.getData(); var edgeData = seriesModel.getData('edge'); var orient = seriesModel.get('orient'); this._model = seriesModel; group.removeAll(); group.x = layoutInfo.x; group.y = layoutInfo.y; // generate a bezire Curve for each edge graph.eachEdge(function (edge) { var curve = new SankeyPath(); var ecData = getECData(curve); ecData.dataIndex = edge.dataIndex; ecData.seriesIndex = seriesModel.seriesIndex; ecData.dataType = 'edge'; var edgeModel = edge.getModel(); var lineStyleModel = edgeModel.getModel('lineStyle'); var curvature = lineStyleModel.get('curveness'); var n1Layout = edge.node1.getLayout(); var node1Model = edge.node1.getModel(); var dragX1 = node1Model.get('localX'); var dragY1 = node1Model.get('localY'); var n2Layout = edge.node2.getLayout(); var node2Model = edge.node2.getModel(); var dragX2 = node2Model.get('localX'); var dragY2 = node2Model.get('localY'); var edgeLayout = edge.getLayout(); var x1; var y1; var x2; var y2; var cpx1; var cpy1; var cpx2; var cpy2; curve.shape.extent = Math.max(1, edgeLayout.dy); curve.shape.orient = orient; if (orient === 'vertical') { x1 = (dragX1 != null ? dragX1 * width : n1Layout.x) + edgeLayout.sy; y1 = (dragY1 != null ? dragY1 * height : n1Layout.y) + n1Layout.dy; x2 = (dragX2 != null ? dragX2 * width : n2Layout.x) + edgeLayout.ty; y2 = dragY2 != null ? dragY2 * height : n2Layout.y; cpx1 = x1; cpy1 = y1 * (1 - curvature) + y2 * curvature; cpx2 = x2; cpy2 = y1 * curvature + y2 * (1 - curvature); } else { x1 = (dragX1 != null ? dragX1 * width : n1Layout.x) + n1Layout.dx; y1 = (dragY1 != null ? dragY1 * height : n1Layout.y) + edgeLayout.sy; x2 = dragX2 != null ? dragX2 * width : n2Layout.x; y2 = (dragY2 != null ? dragY2 * height : n2Layout.y) + edgeLayout.ty; cpx1 = x1 * (1 - curvature) + x2 * curvature; cpy1 = y1; cpx2 = x1 * curvature + x2 * (1 - curvature); cpy2 = y2; } curve.setShape({ x1: x1, y1: y1, x2: x2, y2: y2, cpx1: cpx1, cpy1: cpy1, cpx2: cpx2, cpy2: cpy2 }); curve.useStyle(lineStyleModel.getItemStyle()); // Special color, use source node color or target node color switch (curve.style.fill) { case 'source': curve.style.fill = edge.node1.getVisual('color'); curve.style.decal = edge.node1.getVisual('style').decal; break; case 'target': curve.style.fill = edge.node2.getVisual('color'); curve.style.decal = edge.node2.getVisual('style').decal; break; case 'gradient': var sourceColor = edge.node1.getVisual('color'); var targetColor = edge.node2.getVisual('color'); if (typeof sourceColor === 'string' && typeof targetColor === 'string') { curve.style.fill = new LinearGradient(0, 0, 1, 0, [{ color: sourceColor, offset: 0 }, { color: targetColor, offset: 1 }]); } } var emphasisModel = edgeModel.getModel('emphasis'); setStatesStylesFromModel(curve, edgeModel, 'lineStyle', function (model) { return model.getItemStyle(); }); group.add(curve); edgeData.setItemGraphicEl(edge.dataIndex, curve); var focus = emphasisModel.get('focus'); enableHoverEmphasis(curve, focus === 'adjacency' ? edge.getAdjacentDataIndices() : focus, emphasisModel.get('blurScope')); getECData(curve).dataType = 'edge'; }); // Generate a rect for each node graph.eachNode(function (node) { var layout = node.getLayout(); var itemModel = node.getModel(); var dragX = itemModel.get('localX'); var dragY = itemModel.get('localY'); var emphasisModel = itemModel.getModel('emphasis'); var rect = new Rect({ shape: { x: dragX != null ? dragX * width : layout.x, y: dragY != null ? dragY * height : layout.y, width: layout.dx, height: layout.dy }, style: itemModel.getModel('itemStyle').getItemStyle(), z2: 10 }); setLabelStyle(rect, getLabelStatesModels(itemModel), { labelFetcher: seriesModel, labelDataIndex: node.dataIndex, defaultText: node.id }); rect.disableLabelAnimation = true; rect.setStyle('fill', node.getVisual('color')); rect.setStyle('decal', node.getVisual('style').decal); setStatesStylesFromModel(rect, itemModel); group.add(rect); nodeData.setItemGraphicEl(node.dataIndex, rect); getECData(rect).dataType = 'node'; var focus = emphasisModel.get('focus'); enableHoverEmphasis(rect, focus === 'adjacency' ? node.getAdjacentDataIndices() : focus, emphasisModel.get('blurScope')); }); nodeData.eachItemGraphicEl(function (el, dataIndex) { var itemModel = nodeData.getItemModel(dataIndex); if (itemModel.get('draggable')) { el.drift = function (dx, dy) { sankeyView._focusAdjacencyDisabled = true; this.shape.x += dx; this.shape.y += dy; this.dirty(); api.dispatchAction({ type: 'dragNode', seriesId: seriesModel.id, dataIndex: nodeData.getRawIndex(dataIndex), localX: this.shape.x / width, localY: this.shape.y / height }); }; el.ondragend = function () { sankeyView._focusAdjacencyDisabled = false; }; el.draggable = true; el.cursor = 'move'; } }); if (!this._data && seriesModel.isAnimationEnabled()) { group.setClipPath(createGridClipShape$1(group.getBoundingRect(), seriesModel, function () { group.removeClipPath(); })); } this._data = seriesModel.getData(); }; SankeyView.prototype.dispose = function () {}; SankeyView.type = 'sankey'; return SankeyView; }(ChartView); // Add animation to the view function createGridClipShape$1(rect, seriesModel, cb) { var rectEl = new Rect({ shape: { x: rect.x - 10, y: rect.y - 10, width: 0, height: rect.height + 20 } }); initProps(rectEl, { shape: { width: rect.width + 20 } }, seriesModel, cb); return rectEl; } var SankeySeriesModel = /** @class */ function (_super) { __extends(SankeySeriesModel, _super); function SankeySeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SankeySeriesModel.type; return _this; } /** * Init a graph data structure from data in option series * * @param {Object} option the object used to config echarts view * @return {module:echarts/data/List} storage initial data */ SankeySeriesModel.prototype.getInitialData = function (option, ecModel) { var links = option.edges || option.links; var nodes = option.data || option.nodes; var levels = option.levels; this.levelModels = []; var levelModels = this.levelModels; for (var i = 0; i < levels.length; i++) { if (levels[i].depth != null && levels[i].depth >= 0) { levelModels[levels[i].depth] = new Model(levels[i], this, ecModel); } else { if ("development" !== 'production') { throw new Error('levels[i].depth is mandatory and should be natural number'); } } } if (nodes && links) { var graph = createGraphFromNodeEdge(nodes, links, this, true, beforeLink); return graph.data; } function beforeLink(nodeData, edgeData) { nodeData.wrapMethod('getItemModel', function (model, idx) { var seriesModel = model.parentModel; var layout = seriesModel.getData().getItemLayout(idx); if (layout) { var nodeDepth = layout.depth; var levelModel = seriesModel.levelModels[nodeDepth]; if (levelModel) { model.parentModel = levelModel; } } return model; }); edgeData.wrapMethod('getItemModel', function (model, idx) { var seriesModel = model.parentModel; var edge = seriesModel.getGraph().getEdgeByIndex(idx); var layout = edge.node1.getLayout(); if (layout) { var depth = layout.depth; var levelModel = seriesModel.levelModels[depth]; if (levelModel) { model.parentModel = levelModel; } } return model; }); } }; SankeySeriesModel.prototype.setNodePosition = function (dataIndex, localPosition) { var dataItem = this.option.data[dataIndex]; dataItem.localX = localPosition[0]; dataItem.localY = localPosition[1]; }; /** * Return the graphic data structure * * @return graphic data structure */ SankeySeriesModel.prototype.getGraph = function () { return this.getData().graph; }; /** * Get edge data of graphic data structure * * @return data structure of list */ SankeySeriesModel.prototype.getEdgeData = function () { return this.getGraph().edgeData; }; SankeySeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { function noValue(val) { return isNaN(val) || val == null; } // dataType === 'node' or empty do not show tooltip by default if (dataType === 'edge') { var params = this.getDataParams(dataIndex, dataType); var rawDataOpt = params.data; var edgeValue = params.value; var edgeName = rawDataOpt.source + ' -- ' + rawDataOpt.target; return createTooltipMarkup('nameValue', { name: edgeName, value: edgeValue, noValue: noValue(edgeValue) }); } // dataType === 'node' else { var node = this.getGraph().getNodeByIndex(dataIndex); var value = node.getLayout().value; var name_1 = this.getDataParams(dataIndex, dataType).data.name; return createTooltipMarkup('nameValue', { name: name_1 != null ? name_1 + '' : null, value: value, noValue: noValue(value) }); } }; SankeySeriesModel.prototype.optionUpdated = function () { var option = this.option; }; // Override Series.getDataParams() SankeySeriesModel.prototype.getDataParams = function (dataIndex, dataType) { var params = _super.prototype.getDataParams.call(this, dataIndex, dataType); if (params.value == null && dataType === 'node') { var node = this.getGraph().getNodeByIndex(dataIndex); var nodeValue = node.getLayout().value; params.value = nodeValue; } return params; }; SankeySeriesModel.type = 'series.sankey'; SankeySeriesModel.defaultOption = { zlevel: 0, z: 2, coordinateSystem: 'view', left: '5%', top: '5%', right: '20%', bottom: '5%', orient: 'horizontal', nodeWidth: 20, nodeGap: 8, draggable: true, layoutIterations: 32, label: { show: true, position: 'right', fontSize: 12 }, levels: [], nodeAlign: 'justify', lineStyle: { color: '#314656', opacity: 0.2, curveness: 0.5 }, emphasis: { label: { show: true }, lineStyle: { opacity: 0.5 } }, select: { itemStyle: { borderColor: '#212121' } }, animationEasing: 'linear', animationDuration: 1000 }; return SankeySeriesModel; }(SeriesModel); function sankeyLayout(ecModel, api) { ecModel.eachSeriesByType('sankey', function (seriesModel) { var nodeWidth = seriesModel.get('nodeWidth'); var nodeGap = seriesModel.get('nodeGap'); var layoutInfo = getViewRect$4(seriesModel, api); seriesModel.layoutInfo = layoutInfo; var width = layoutInfo.width; var height = layoutInfo.height; var graph = seriesModel.getGraph(); var nodes = graph.nodes; var edges = graph.edges; computeNodeValues(nodes); var filteredNodes = filter(nodes, function (node) { return node.getLayout().value === 0; }); var iterations = filteredNodes.length !== 0 ? 0 : seriesModel.get('layoutIterations'); var orient = seriesModel.get('orient'); var nodeAlign = seriesModel.get('nodeAlign'); layoutSankey(nodes, edges, nodeWidth, nodeGap, width, height, iterations, orient, nodeAlign); }); } /** * Get the layout position of the whole view */ function getViewRect$4(seriesModel, api) { return getLayoutRect(seriesModel.getBoxLayoutParams(), { width: api.getWidth(), height: api.getHeight() }); } function layoutSankey(nodes, edges, nodeWidth, nodeGap, width, height, iterations, orient, nodeAlign) { computeNodeBreadths(nodes, edges, nodeWidth, width, height, orient, nodeAlign); computeNodeDepths(nodes, edges, height, width, nodeGap, iterations, orient); computeEdgeDepths(nodes, orient); } /** * Compute the value of each node by summing the associated edge's value */ function computeNodeValues(nodes) { each(nodes, function (node) { var value1 = sum(node.outEdges, getEdgeValue); var value2 = sum(node.inEdges, getEdgeValue); var nodeRawValue = node.getValue() || 0; var value = Math.max(value1, value2, nodeRawValue); node.setLayout({ value: value }, true); }); } /** * Compute the x-position for each node. * * Here we use Kahn algorithm to detect cycle when we traverse * the node to computer the initial x position. */ function computeNodeBreadths(nodes, edges, nodeWidth, width, height, orient, nodeAlign) { // Used to mark whether the edge is deleted. if it is deleted, // the value is 0, otherwise it is 1. var remainEdges = []; // Storage each node's indegree. var indegreeArr = []; //Used to storage the node with indegree is equal to 0. var zeroIndegrees = []; var nextTargetNode = []; var x = 0; // let kx = 0; for (var i = 0; i < edges.length; i++) { remainEdges[i] = 1; } for (var i = 0; i < nodes.length; i++) { indegreeArr[i] = nodes[i].inEdges.length; if (indegreeArr[i] === 0) { zeroIndegrees.push(nodes[i]); } } var maxNodeDepth = -1; // Traversing nodes using topological sorting to calculate the // horizontal(if orient === 'horizontal') or vertical(if orient === 'vertical') // position of the nodes. while (zeroIndegrees.length) { for (var idx = 0; idx < zeroIndegrees.length; idx++) { var node = zeroIndegrees[idx]; var item = node.hostGraph.data.getRawDataItem(node.dataIndex); var isItemDepth = item.depth != null && item.depth >= 0; if (isItemDepth && item.depth > maxNodeDepth) { maxNodeDepth = item.depth; } node.setLayout({ depth: isItemDepth ? item.depth : x }, true); orient === 'vertical' ? node.setLayout({ dy: nodeWidth }, true) : node.setLayout({ dx: nodeWidth }, true); for (var edgeIdx = 0; edgeIdx < node.outEdges.length; edgeIdx++) { var edge = node.outEdges[edgeIdx]; var indexEdge = edges.indexOf(edge); remainEdges[indexEdge] = 0; var targetNode = edge.node2; var nodeIndex = nodes.indexOf(targetNode); if (--indegreeArr[nodeIndex] === 0 && nextTargetNode.indexOf(targetNode) < 0) { nextTargetNode.push(targetNode); } } } ++x; zeroIndegrees = nextTargetNode; nextTargetNode = []; } for (var i = 0; i < remainEdges.length; i++) { if (remainEdges[i] === 1) { throw new Error('Sankey is a DAG, the original data has cycle!'); } } var maxDepth = maxNodeDepth > x - 1 ? maxNodeDepth : x - 1; if (nodeAlign && nodeAlign !== 'left') { adjustNodeWithNodeAlign(nodes, nodeAlign, orient, maxDepth); } var kx = orient === 'vertical' ? (height - nodeWidth) / maxDepth : (width - nodeWidth) / maxDepth; scaleNodeBreadths(nodes, kx, orient); } function isNodeDepth(node) { var item = node.hostGraph.data.getRawDataItem(node.dataIndex); return item.depth != null && item.depth >= 0; } function adjustNodeWithNodeAlign(nodes, nodeAlign, orient, maxDepth) { if (nodeAlign === 'right') { var nextSourceNode = []; var remainNodes = nodes; var nodeHeight = 0; while (remainNodes.length) { for (var i = 0; i < remainNodes.length; i++) { var node = remainNodes[i]; node.setLayout({ skNodeHeight: nodeHeight }, true); for (var j = 0; j < node.inEdges.length; j++) { var edge = node.inEdges[j]; if (nextSourceNode.indexOf(edge.node1) < 0) { nextSourceNode.push(edge.node1); } } } remainNodes = nextSourceNode; nextSourceNode = []; ++nodeHeight; } each(nodes, function (node) { if (!isNodeDepth(node)) { node.setLayout({ depth: Math.max(0, maxDepth - node.getLayout().skNodeHeight) }, true); } }); } else if (nodeAlign === 'justify') { moveSinksRight(nodes, maxDepth); } } /** * All the node without outEgdes are assigned maximum x-position and * be aligned in the last column. * * @param nodes. node of sankey view. * @param maxDepth. use to assign to node without outEdges as x-position. */ function moveSinksRight(nodes, maxDepth) { each(nodes, function (node) { if (!isNodeDepth(node) && !node.outEdges.length) { node.setLayout({ depth: maxDepth }, true); } }); } /** * Scale node x-position to the width * * @param nodes node of sankey view * @param kx multiple used to scale nodes */ function scaleNodeBreadths(nodes, kx, orient) { each(nodes, function (node) { var nodeDepth = node.getLayout().depth * kx; orient === 'vertical' ? node.setLayout({ y: nodeDepth }, true) : node.setLayout({ x: nodeDepth }, true); }); } /** * Using Gauss-Seidel iterations method to compute the node depth(y-position) * * @param nodes node of sankey view * @param edges edge of sankey view * @param height the whole height of the area to draw the view * @param nodeGap the vertical distance between two nodes * in the same column. * @param iterations the number of iterations for the algorithm */ function computeNodeDepths(nodes, edges, height, width, nodeGap, iterations, orient) { var nodesByBreadth = prepareNodesByBreadth(nodes, orient); initializeNodeDepth(nodesByBreadth, edges, height, width, nodeGap, orient); resolveCollisions(nodesByBreadth, nodeGap, height, width, orient); for (var alpha = 1; iterations > 0; iterations--) { // 0.99 is a experience parameter, ensure that each iterations of // changes as small as possible. alpha *= 0.99; relaxRightToLeft(nodesByBreadth, alpha, orient); resolveCollisions(nodesByBreadth, nodeGap, height, width, orient); relaxLeftToRight(nodesByBreadth, alpha, orient); resolveCollisions(nodesByBreadth, nodeGap, height, width, orient); } } function prepareNodesByBreadth(nodes, orient) { var nodesByBreadth = []; var keyAttr = orient === 'vertical' ? 'y' : 'x'; var groupResult = groupData(nodes, function (node) { return node.getLayout()[keyAttr]; }); groupResult.keys.sort(function (a, b) { return a - b; }); each(groupResult.keys, function (key) { nodesByBreadth.push(groupResult.buckets.get(key)); }); return nodesByBreadth; } /** * Compute the original y-position for each node */ function initializeNodeDepth(nodesByBreadth, edges, height, width, nodeGap, orient) { var minKy = Infinity; each(nodesByBreadth, function (nodes) { var n = nodes.length; var sum = 0; each(nodes, function (node) { sum += node.getLayout().value; }); var ky = orient === 'vertical' ? (width - (n - 1) * nodeGap) / sum : (height - (n - 1) * nodeGap) / sum; if (ky < minKy) { minKy = ky; } }); each(nodesByBreadth, function (nodes) { each(nodes, function (node, i) { var nodeDy = node.getLayout().value * minKy; if (orient === 'vertical') { node.setLayout({ x: i }, true); node.setLayout({ dx: nodeDy }, true); } else { node.setLayout({ y: i }, true); node.setLayout({ dy: nodeDy }, true); } }); }); each(edges, function (edge) { var edgeDy = +edge.getValue() * minKy; edge.setLayout({ dy: edgeDy }, true); }); } /** * Resolve the collision of initialized depth (y-position) */ function resolveCollisions(nodesByBreadth, nodeGap, height, width, orient) { var keyAttr = orient === 'vertical' ? 'x' : 'y'; each(nodesByBreadth, function (nodes) { nodes.sort(function (a, b) { return a.getLayout()[keyAttr] - b.getLayout()[keyAttr]; }); var nodeX; var node; var dy; var y0 = 0; var n = nodes.length; var nodeDyAttr = orient === 'vertical' ? 'dx' : 'dy'; for (var i = 0; i < n; i++) { node = nodes[i]; dy = y0 - node.getLayout()[keyAttr]; if (dy > 0) { nodeX = node.getLayout()[keyAttr] + dy; orient === 'vertical' ? node.setLayout({ x: nodeX }, true) : node.setLayout({ y: nodeX }, true); } y0 = node.getLayout()[keyAttr] + node.getLayout()[nodeDyAttr] + nodeGap; } var viewWidth = orient === 'vertical' ? width : height; // If the bottommost node goes outside the bounds, push it back up dy = y0 - nodeGap - viewWidth; if (dy > 0) { nodeX = node.getLayout()[keyAttr] - dy; orient === 'vertical' ? node.setLayout({ x: nodeX }, true) : node.setLayout({ y: nodeX }, true); y0 = nodeX; for (var i = n - 2; i >= 0; --i) { node = nodes[i]; dy = node.getLayout()[keyAttr] + node.getLayout()[nodeDyAttr] + nodeGap - y0; if (dy > 0) { nodeX = node.getLayout()[keyAttr] - dy; orient === 'vertical' ? node.setLayout({ x: nodeX }, true) : node.setLayout({ y: nodeX }, true); } y0 = node.getLayout()[keyAttr]; } } }); } /** * Change the y-position of the nodes, except most the right side nodes * @param nodesByBreadth * @param alpha parameter used to adjust the nodes y-position */ function relaxRightToLeft(nodesByBreadth, alpha, orient) { each(nodesByBreadth.slice().reverse(), function (nodes) { each(nodes, function (node) { if (node.outEdges.length) { var y = sum(node.outEdges, weightedTarget, orient) / sum(node.outEdges, getEdgeValue); if (isNaN(y)) { var len = node.outEdges.length; y = len ? sum(node.outEdges, centerTarget, orient) / len : 0; } if (orient === 'vertical') { var nodeX = node.getLayout().x + (y - center$1(node, orient)) * alpha; node.setLayout({ x: nodeX }, true); } else { var nodeY = node.getLayout().y + (y - center$1(node, orient)) * alpha; node.setLayout({ y: nodeY }, true); } } }); }); } function weightedTarget(edge, orient) { return center$1(edge.node2, orient) * edge.getValue(); } function centerTarget(edge, orient) { return center$1(edge.node2, orient); } function weightedSource(edge, orient) { return center$1(edge.node1, orient) * edge.getValue(); } function centerSource(edge, orient) { return center$1(edge.node1, orient); } function center$1(node, orient) { return orient === 'vertical' ? node.getLayout().x + node.getLayout().dx / 2 : node.getLayout().y + node.getLayout().dy / 2; } function getEdgeValue(edge) { return edge.getValue(); } function sum(array, cb, orient) { var sum = 0; var len = array.length; var i = -1; while (++i < len) { var value = +cb(array[i], orient); if (!isNaN(value)) { sum += value; } } return sum; } /** * Change the y-position of the nodes, except most the left side nodes */ function relaxLeftToRight(nodesByBreadth, alpha, orient) { each(nodesByBreadth, function (nodes) { each(nodes, function (node) { if (node.inEdges.length) { var y = sum(node.inEdges, weightedSource, orient) / sum(node.inEdges, getEdgeValue); if (isNaN(y)) { var len = node.inEdges.length; y = len ? sum(node.inEdges, centerSource, orient) / len : 0; } if (orient === 'vertical') { var nodeX = node.getLayout().x + (y - center$1(node, orient)) * alpha; node.setLayout({ x: nodeX }, true); } else { var nodeY = node.getLayout().y + (y - center$1(node, orient)) * alpha; node.setLayout({ y: nodeY }, true); } } }); }); } /** * Compute the depth(y-position) of each edge */ function computeEdgeDepths(nodes, orient) { var keyAttr = orient === 'vertical' ? 'x' : 'y'; each(nodes, function (node) { node.outEdges.sort(function (a, b) { return a.node2.getLayout()[keyAttr] - b.node2.getLayout()[keyAttr]; }); node.inEdges.sort(function (a, b) { return a.node1.getLayout()[keyAttr] - b.node1.getLayout()[keyAttr]; }); }); each(nodes, function (node) { var sy = 0; var ty = 0; each(node.outEdges, function (edge) { edge.setLayout({ sy: sy }, true); sy += edge.getLayout().dy; }); each(node.inEdges, function (edge) { edge.setLayout({ ty: ty }, true); ty += edge.getLayout().dy; }); }); } function sankeyVisual(ecModel) { ecModel.eachSeriesByType('sankey', function (seriesModel) { var graph = seriesModel.getGraph(); var nodes = graph.nodes; if (nodes.length) { var minValue_1 = Infinity; var maxValue_1 = -Infinity; each(nodes, function (node) { var nodeValue = node.getLayout().value; if (nodeValue < minValue_1) { minValue_1 = nodeValue; } if (nodeValue > maxValue_1) { maxValue_1 = nodeValue; } }); each(nodes, function (node) { var mapping = new VisualMapping({ type: 'color', mappingMethod: 'linear', dataExtent: [minValue_1, maxValue_1], visual: seriesModel.get('color') }); var mapValueToColor = mapping.mapValueToVisual(node.getLayout().value); var customColor = node.getModel().get(['itemStyle', 'color']); if (customColor != null) { node.setVisual('color', customColor); node.setVisual('style', { fill: customColor }); } else { node.setVisual('color', mapValueToColor); node.setVisual('style', { fill: mapValueToColor }); } }); } }); } function install$i(registers) { registers.registerChartView(SankeyView); registers.registerSeriesModel(SankeySeriesModel); registers.registerLayout(sankeyLayout); registers.registerVisual(sankeyVisual); registers.registerAction({ type: 'dragNode', event: 'dragnode', // here can only use 'update' now, other value is not support in echarts. update: 'update' }, function (payload, ecModel) { ecModel.eachComponent({ mainType: 'series', subType: 'sankey', query: payload }, function (seriesModel) { seriesModel.setNodePosition(payload.dataIndex, [payload.localX, payload.localY]); }); }); } var WhiskerBoxCommonMixin = /** @class */ function () { function WhiskerBoxCommonMixin() {} /** * @override */ WhiskerBoxCommonMixin.prototype.getInitialData = function (option, ecModel) { // When both types of xAxis and yAxis are 'value', layout is // needed to be specified by user. Otherwise, layout can be // judged by which axis is category. var ordinalMeta; var xAxisModel = ecModel.getComponent('xAxis', this.get('xAxisIndex')); var yAxisModel = ecModel.getComponent('yAxis', this.get('yAxisIndex')); var xAxisType = xAxisModel.get('type'); var yAxisType = yAxisModel.get('type'); var addOrdinal; // FIXME // Consider time axis. if (xAxisType === 'category') { option.layout = 'horizontal'; ordinalMeta = xAxisModel.getOrdinalMeta(); addOrdinal = true; } else if (yAxisType === 'category') { option.layout = 'vertical'; ordinalMeta = yAxisModel.getOrdinalMeta(); addOrdinal = true; } else { option.layout = option.layout || 'horizontal'; } var coordDims = ['x', 'y']; var baseAxisDimIndex = option.layout === 'horizontal' ? 0 : 1; var baseAxisDim = this._baseAxisDim = coordDims[baseAxisDimIndex]; var otherAxisDim = coordDims[1 - baseAxisDimIndex]; var axisModels = [xAxisModel, yAxisModel]; var baseAxisType = axisModels[baseAxisDimIndex].get('type'); var otherAxisType = axisModels[1 - baseAxisDimIndex].get('type'); var data = option.data; // ??? FIXME make a stage to perform data transfrom. // MUST create a new data, consider setOption({}) again. if (data && addOrdinal) { var newOptionData_1 = []; each(data, function (item, index) { var newItem; if (isArray(item)) { newItem = item.slice(); item.unshift(index); } else if (isArray(item.value)) { newItem = item.value.slice(); item.value.unshift(index); } else { newItem = item; } newOptionData_1.push(newItem); }); option.data = newOptionData_1; } var defaultValueDimensions = this.defaultValueDimensions; var coordDimensions = [{ name: baseAxisDim, type: getDimensionTypeByAxis(baseAxisType), ordinalMeta: ordinalMeta, otherDims: { tooltip: false, itemName: 0 }, dimsDef: ['base'] }, { name: otherAxisDim, type: getDimensionTypeByAxis(otherAxisType), dimsDef: defaultValueDimensions.slice() }]; return createListSimply(this, { coordDimensions: coordDimensions, dimensionsCount: defaultValueDimensions.length + 1, encodeDefaulter: curry(makeSeriesEncodeForAxisCoordSys, coordDimensions, this) }); }; /** * If horizontal, base axis is x, otherwise y. * @override */ WhiskerBoxCommonMixin.prototype.getBaseAxis = function () { var dim = this._baseAxisDim; return this.ecModel.getComponent(dim + 'Axis', this.get(dim + 'AxisIndex')).axis; }; return WhiskerBoxCommonMixin; }(); var BoxplotSeriesModel = /** @class */ function (_super) { __extends(BoxplotSeriesModel, _super); function BoxplotSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = BoxplotSeriesModel.type; // TODO // box width represents group size, so dimension should have 'size'. /** * @see * The meanings of 'min' and 'max' depend on user, * and echarts do not need to know it. * @readOnly */ _this.defaultValueDimensions = [{ name: 'min', defaultTooltip: true }, { name: 'Q1', defaultTooltip: true }, { name: 'median', defaultTooltip: true }, { name: 'Q3', defaultTooltip: true }, { name: 'max', defaultTooltip: true }]; _this.visualDrawType = 'stroke'; return _this; } BoxplotSeriesModel.type = 'series.boxplot'; BoxplotSeriesModel.dependencies = ['xAxis', 'yAxis', 'grid']; BoxplotSeriesModel.defaultOption = { zlevel: 0, z: 2, coordinateSystem: 'cartesian2d', legendHoverLink: true, layout: null, boxWidth: [7, 50], itemStyle: { color: '#fff', borderWidth: 1 }, emphasis: { scale: true, itemStyle: { borderWidth: 2, shadowBlur: 5, shadowOffsetX: 1, shadowOffsetY: 1, shadowColor: 'rgba(0,0,0,0.2)' } }, animationDuration: 800 }; return BoxplotSeriesModel; }(SeriesModel); mixin(BoxplotSeriesModel, WhiskerBoxCommonMixin, true); var BoxplotView = /** @class */ function (_super) { __extends(BoxplotView, _super); function BoxplotView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = BoxplotView.type; return _this; } BoxplotView.prototype.render = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var group = this.group; var oldData = this._data; // There is no old data only when first rendering or switching from // stream mode to normal mode, where previous elements should be removed. if (!this._data) { group.removeAll(); } var constDim = seriesModel.get('layout') === 'horizontal' ? 1 : 0; data.diff(oldData).add(function (newIdx) { if (data.hasValue(newIdx)) { var itemLayout = data.getItemLayout(newIdx); var symbolEl = createNormalBox(itemLayout, data, newIdx, constDim, true); data.setItemGraphicEl(newIdx, symbolEl); group.add(symbolEl); } }).update(function (newIdx, oldIdx) { var symbolEl = oldData.getItemGraphicEl(oldIdx); // Empty data if (!data.hasValue(newIdx)) { group.remove(symbolEl); return; } var itemLayout = data.getItemLayout(newIdx); if (!symbolEl) { symbolEl = createNormalBox(itemLayout, data, newIdx, constDim); } else { updateNormalBoxData(itemLayout, symbolEl, data, newIdx); } group.add(symbolEl); data.setItemGraphicEl(newIdx, symbolEl); }).remove(function (oldIdx) { var el = oldData.getItemGraphicEl(oldIdx); el && group.remove(el); }).execute(); this._data = data; }; BoxplotView.prototype.remove = function (ecModel) { var group = this.group; var data = this._data; this._data = null; data && data.eachItemGraphicEl(function (el) { el && group.remove(el); }); }; BoxplotView.type = 'boxplot'; return BoxplotView; }(ChartView); var BoxPathShape = /** @class */ function () { function BoxPathShape() {} return BoxPathShape; }(); var BoxPath = /** @class */ function (_super) { __extends(BoxPath, _super); function BoxPath(opts) { var _this = _super.call(this, opts) || this; _this.type = 'boxplotBoxPath'; return _this; } BoxPath.prototype.getDefaultShape = function () { return new BoxPathShape(); }; BoxPath.prototype.buildPath = function (ctx, shape) { var ends = shape.points; var i = 0; ctx.moveTo(ends[i][0], ends[i][1]); i++; for (; i < 4; i++) { ctx.lineTo(ends[i][0], ends[i][1]); } ctx.closePath(); for (; i < ends.length; i++) { ctx.moveTo(ends[i][0], ends[i][1]); i++; ctx.lineTo(ends[i][0], ends[i][1]); } }; return BoxPath; }(Path); function createNormalBox(itemLayout, data, dataIndex, constDim, isInit) { var ends = itemLayout.ends; var el = new BoxPath({ shape: { points: isInit ? transInit(ends, constDim, itemLayout) : ends } }); updateNormalBoxData(itemLayout, el, data, dataIndex, isInit); return el; } function updateNormalBoxData(itemLayout, el, data, dataIndex, isInit) { var seriesModel = data.hostModel; var updateMethod = graphic[isInit ? 'initProps' : 'updateProps']; updateMethod(el, { shape: { points: itemLayout.ends } }, seriesModel, dataIndex); el.useStyle(data.getItemVisual(dataIndex, 'style')); el.style.strokeNoScale = true; el.z2 = 100; var itemModel = data.getItemModel(dataIndex); setStatesStylesFromModel(el, itemModel); enableHoverEmphasis(el, itemModel.get(['emphasis', 'focus']), itemModel.get(['emphasis', 'blurScope'])); } function transInit(points, dim, itemLayout) { return map(points, function (point) { point = point.slice(); point[dim] = itemLayout.initBaseline; return point; }); } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ function boxplotVisual(ecModel, api) {} var each$7 = each; function boxplotLayout(ecModel) { var groupResult = groupSeriesByAxis(ecModel); each$7(groupResult, function (groupItem) { var seriesModels = groupItem.seriesModels; if (!seriesModels.length) { return; } calculateBase(groupItem); each$7(seriesModels, function (seriesModel, idx) { layoutSingleSeries(seriesModel, groupItem.boxOffsetList[idx], groupItem.boxWidthList[idx]); }); }); } /** * Group series by axis. */ function groupSeriesByAxis(ecModel) { var result = []; var axisList = []; ecModel.eachSeriesByType('boxplot', function (seriesModel) { var baseAxis = seriesModel.getBaseAxis(); var idx = indexOf(axisList, baseAxis); if (idx < 0) { idx = axisList.length; axisList[idx] = baseAxis; result[idx] = { axis: baseAxis, seriesModels: [] }; } result[idx].seriesModels.push(seriesModel); }); return result; } /** * Calculate offset and box width for each series. */ function calculateBase(groupItem) { var extent; var baseAxis = groupItem.axis; var seriesModels = groupItem.seriesModels; var seriesCount = seriesModels.length; var boxWidthList = groupItem.boxWidthList = []; var boxOffsetList = groupItem.boxOffsetList = []; var boundList = []; var bandWidth; if (baseAxis.type === 'category') { bandWidth = baseAxis.getBandWidth(); } else { var maxDataCount_1 = 0; each$7(seriesModels, function (seriesModel) { maxDataCount_1 = Math.max(maxDataCount_1, seriesModel.getData().count()); }); extent = baseAxis.getExtent(), Math.abs(extent[1] - extent[0]) / maxDataCount_1; } each$7(seriesModels, function (seriesModel) { var boxWidthBound = seriesModel.get('boxWidth'); if (!isArray(boxWidthBound)) { boxWidthBound = [boxWidthBound, boxWidthBound]; } boundList.push([parsePercent$1(boxWidthBound[0], bandWidth) || 0, parsePercent$1(boxWidthBound[1], bandWidth) || 0]); }); var availableWidth = bandWidth * 0.8 - 2; var boxGap = availableWidth / seriesCount * 0.3; var boxWidth = (availableWidth - boxGap * (seriesCount - 1)) / seriesCount; var base = boxWidth / 2 - availableWidth / 2; each$7(seriesModels, function (seriesModel, idx) { boxOffsetList.push(base); base += boxGap + boxWidth; boxWidthList.push(Math.min(Math.max(boxWidth, boundList[idx][0]), boundList[idx][1])); }); } /** * Calculate points location for each series. */ function layoutSingleSeries(seriesModel, offset, boxWidth) { var coordSys = seriesModel.coordinateSystem; var data = seriesModel.getData(); var halfWidth = boxWidth / 2; var cDimIdx = seriesModel.get('layout') === 'horizontal' ? 0 : 1; var vDimIdx = 1 - cDimIdx; var coordDims = ['x', 'y']; var cDim = data.mapDimension(coordDims[cDimIdx]); var vDims = data.mapDimensionsAll(coordDims[vDimIdx]); if (cDim == null || vDims.length < 5) { return; } for (var dataIndex = 0; dataIndex < data.count(); dataIndex++) { var axisDimVal = data.get(cDim, dataIndex); var median = getPoint(axisDimVal, vDims[2], dataIndex); var end1 = getPoint(axisDimVal, vDims[0], dataIndex); var end2 = getPoint(axisDimVal, vDims[1], dataIndex); var end4 = getPoint(axisDimVal, vDims[3], dataIndex); var end5 = getPoint(axisDimVal, vDims[4], dataIndex); var ends = []; addBodyEnd(ends, end2, false); addBodyEnd(ends, end4, true); ends.push(end1, end2, end5, end4); layEndLine(ends, end1); layEndLine(ends, end5); layEndLine(ends, median); data.setItemLayout(dataIndex, { initBaseline: median[vDimIdx], ends: ends }); } function getPoint(axisDimVal, dim, dataIndex) { var val = data.get(dim, dataIndex); var p = []; p[cDimIdx] = axisDimVal; p[vDimIdx] = val; var point; if (isNaN(axisDimVal) || isNaN(val)) { point = [NaN, NaN]; } else { point = coordSys.dataToPoint(p); point[cDimIdx] += offset; } return point; } function addBodyEnd(ends, point, start) { var point1 = point.slice(); var point2 = point.slice(); point1[cDimIdx] += halfWidth; point2[cDimIdx] -= halfWidth; start ? ends.push(point1, point2) : ends.push(point2, point1); } function layEndLine(ends, endCenter) { var from = endCenter.slice(); var to = endCenter.slice(); from[cDimIdx] -= halfWidth; to[cDimIdx] += halfWidth; ends.push(from, to); } } /** * See: * * * * Helper method for preparing data. * * @param rawData like * [ * [12,232,443], (raw data set for the first box) * [3843,5545,1232], (raw data set for the second box) * ... * ] * @param opt.boundIQR=1.5 Data less than min bound is outlier. * default 1.5, means Q1 - 1.5 * (Q3 - Q1). * If 'none'/0 passed, min bound will not be used. */ function prepareBoxplotData(rawData, opt) { opt = opt || {}; var boxData = []; var outliers = []; var boundIQR = opt.boundIQR; var useExtreme = boundIQR === 'none' || boundIQR === 0; for (var i = 0; i < rawData.length; i++) { var ascList = asc(rawData[i].slice()); var Q1 = quantile(ascList, 0.25); var Q2 = quantile(ascList, 0.5); var Q3 = quantile(ascList, 0.75); var min = ascList[0]; var max = ascList[ascList.length - 1]; var bound = (boundIQR == null ? 1.5 : boundIQR) * (Q3 - Q1); var low = useExtreme ? min : Math.max(min, Q1 - bound); var high = useExtreme ? max : Math.min(max, Q3 + bound); var itemNameFormatter = opt.itemNameFormatter; var itemName = isFunction(itemNameFormatter) ? itemNameFormatter({ value: i }) : isString(itemNameFormatter) ? itemNameFormatter.replace('{value}', i + '') : i + ''; boxData.push([itemName, low, Q1, Q2, Q3, high]); for (var j = 0; j < ascList.length; j++) { var dataItem = ascList[j]; if (dataItem < low || dataItem > high) { var outlier = [itemName, dataItem]; outliers.push(outlier); } } } return { boxData: boxData, outliers: outliers }; } var boxplotTransform = { type: 'echarts:boxplot', transform: function transform(params) { var upstream = params.upstream; if (upstream.sourceFormat !== SOURCE_FORMAT_ARRAY_ROWS) { var errMsg = ''; if ("development" !== 'production') { errMsg = makePrintable('source data is not applicable for this boxplot transform. Expect number[][].'); } throwError(errMsg); } var result = prepareBoxplotData(upstream.getRawData(), params.config); return [{ dimensions: ['ItemName', 'Low', 'Q1', 'Q2', 'Q3', 'High'], data: result.boxData }, { data: result.outliers }]; } }; function install$j(registers) { registers.registerSeriesModel(BoxplotSeriesModel); registers.registerChartView(BoxplotView); registers.registerVisual(boxplotVisual); registers.registerLayout(boxplotLayout); registers.registerTransform(boxplotTransform); } var SKIP_PROPS = ['color', 'borderColor']; var CandlestickView = /** @class */ function (_super) { __extends(CandlestickView, _super); function CandlestickView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = CandlestickView.type; return _this; } CandlestickView.prototype.render = function (seriesModel, ecModel, api) { // If there is clipPath created in large mode. Remove it. this.group.removeClipPath(); this._updateDrawMode(seriesModel); this._isLargeDraw ? this._renderLarge(seriesModel) : this._renderNormal(seriesModel); }; CandlestickView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) { this._clear(); this._updateDrawMode(seriesModel); }; CandlestickView.prototype.incrementalRender = function (params, seriesModel, ecModel, api) { this._isLargeDraw ? this._incrementalRenderLarge(params, seriesModel) : this._incrementalRenderNormal(params, seriesModel); }; CandlestickView.prototype._updateDrawMode = function (seriesModel) { var isLargeDraw = seriesModel.pipelineContext.large; if (this._isLargeDraw == null || isLargeDraw !== this._isLargeDraw) { this._isLargeDraw = isLargeDraw; this._clear(); } }; CandlestickView.prototype._renderNormal = function (seriesModel) { var data = seriesModel.getData(); var oldData = this._data; var group = this.group; var isSimpleBox = data.getLayout('isSimpleBox'); var needsClip = seriesModel.get('clip', true); var coord = seriesModel.coordinateSystem; var clipArea = coord.getArea && coord.getArea(); // There is no old data only when first rendering or switching from // stream mode to normal mode, where previous elements should be removed. if (!this._data) { group.removeAll(); } data.diff(oldData).add(function (newIdx) { if (data.hasValue(newIdx)) { var itemLayout = data.getItemLayout(newIdx); if (needsClip && isNormalBoxClipped(clipArea, itemLayout)) { return; } var el = createNormalBox$1(itemLayout, newIdx, true); initProps(el, { shape: { points: itemLayout.ends } }, seriesModel, newIdx); setBoxCommon(el, data, newIdx, isSimpleBox); group.add(el); data.setItemGraphicEl(newIdx, el); } }).update(function (newIdx, oldIdx) { var el = oldData.getItemGraphicEl(oldIdx); // Empty data if (!data.hasValue(newIdx)) { group.remove(el); return; } var itemLayout = data.getItemLayout(newIdx); if (needsClip && isNormalBoxClipped(clipArea, itemLayout)) { group.remove(el); return; } if (!el) { el = createNormalBox$1(itemLayout); } else { updateProps(el, { shape: { points: itemLayout.ends } }, seriesModel, newIdx); } setBoxCommon(el, data, newIdx, isSimpleBox); group.add(el); data.setItemGraphicEl(newIdx, el); }).remove(function (oldIdx) { var el = oldData.getItemGraphicEl(oldIdx); el && group.remove(el); }).execute(); this._data = data; }; CandlestickView.prototype._renderLarge = function (seriesModel) { this._clear(); createLarge$1(seriesModel, this.group); var clipPath = seriesModel.get('clip', true) ? createClipPath(seriesModel.coordinateSystem, false, seriesModel) : null; if (clipPath) { this.group.setClipPath(clipPath); } else { this.group.removeClipPath(); } }; CandlestickView.prototype._incrementalRenderNormal = function (params, seriesModel) { var data = seriesModel.getData(); var isSimpleBox = data.getLayout('isSimpleBox'); var dataIndex; while ((dataIndex = params.next()) != null) { var itemLayout = data.getItemLayout(dataIndex); var el = createNormalBox$1(itemLayout); setBoxCommon(el, data, dataIndex, isSimpleBox); el.incremental = true; this.group.add(el); } }; CandlestickView.prototype._incrementalRenderLarge = function (params, seriesModel) { createLarge$1(seriesModel, this.group, true); }; CandlestickView.prototype.remove = function (ecModel) { this._clear(); }; CandlestickView.prototype._clear = function () { this.group.removeAll(); this._data = null; }; CandlestickView.type = 'candlestick'; return CandlestickView; }(ChartView); var NormalBoxPathShape = /** @class */ function () { function NormalBoxPathShape() {} return NormalBoxPathShape; }(); var NormalBoxPath = /** @class */ function (_super) { __extends(NormalBoxPath, _super); function NormalBoxPath(opts) { var _this = _super.call(this, opts) || this; _this.type = 'normalCandlestickBox'; return _this; } NormalBoxPath.prototype.getDefaultShape = function () { return new NormalBoxPathShape(); }; NormalBoxPath.prototype.buildPath = function (ctx, shape) { var ends = shape.points; if (this.__simpleBox) { ctx.moveTo(ends[4][0], ends[4][1]); ctx.lineTo(ends[6][0], ends[6][1]); } else { ctx.moveTo(ends[0][0], ends[0][1]); ctx.lineTo(ends[1][0], ends[1][1]); ctx.lineTo(ends[2][0], ends[2][1]); ctx.lineTo(ends[3][0], ends[3][1]); ctx.closePath(); ctx.moveTo(ends[4][0], ends[4][1]); ctx.lineTo(ends[5][0], ends[5][1]); ctx.moveTo(ends[6][0], ends[6][1]); ctx.lineTo(ends[7][0], ends[7][1]); } }; return NormalBoxPath; }(Path); function createNormalBox$1(itemLayout, dataIndex, isInit) { var ends = itemLayout.ends; return new NormalBoxPath({ shape: { points: isInit ? transInit$1(ends, itemLayout) : ends }, z2: 100 }); } function isNormalBoxClipped(clipArea, itemLayout) { var clipped = true; for (var i = 0; i < itemLayout.ends.length; i++) { // If any point are in the region. if (clipArea.contain(itemLayout.ends[i][0], itemLayout.ends[i][1])) { clipped = false; break; } } return clipped; } function setBoxCommon(el, data, dataIndex, isSimpleBox) { var itemModel = data.getItemModel(dataIndex); el.useStyle(data.getItemVisual(dataIndex, 'style')); el.style.strokeNoScale = true; el.__simpleBox = isSimpleBox; setStatesStylesFromModel(el, itemModel); } function transInit$1(points, itemLayout) { return map(points, function (point) { point = point.slice(); point[1] = itemLayout.initBaseline; return point; }); } var LargeBoxPathShape = /** @class */ function () { function LargeBoxPathShape() {} return LargeBoxPathShape; }(); var LargeBoxPath = /** @class */ function (_super) { __extends(LargeBoxPath, _super); function LargeBoxPath(opts) { var _this = _super.call(this, opts) || this; _this.type = 'largeCandlestickBox'; return _this; } LargeBoxPath.prototype.getDefaultShape = function () { return new LargeBoxPathShape(); }; LargeBoxPath.prototype.buildPath = function (ctx, shape) { // Drawing lines is more efficient than drawing // a whole line or drawing rects. var points = shape.points; for (var i = 0; i < points.length;) { if (this.__sign === points[i++]) { var x = points[i++]; ctx.moveTo(x, points[i++]); ctx.lineTo(x, points[i++]); } else { i += 3; } } }; return LargeBoxPath; }(Path); function createLarge$1(seriesModel, group, incremental) { var data = seriesModel.getData(); var largePoints = data.getLayout('largePoints'); var elP = new LargeBoxPath({ shape: { points: largePoints }, __sign: 1 }); group.add(elP); var elN = new LargeBoxPath({ shape: { points: largePoints }, __sign: -1 }); group.add(elN); setLargeStyle$1(1, elP, seriesModel); setLargeStyle$1(-1, elN, seriesModel); if (incremental) { elP.incremental = true; elN.incremental = true; } } function setLargeStyle$1(sign, el, seriesModel, data) { // TODO put in visual? var borderColor = seriesModel.get(['itemStyle', sign > 0 ? 'borderColor' : 'borderColor0']) || seriesModel.get(['itemStyle', sign > 0 ? 'color' : 'color0']); // Color must be excluded. // Because symbol provide setColor individually to set fill and stroke var itemStyle = seriesModel.getModel('itemStyle').getItemStyle(SKIP_PROPS); el.useStyle(itemStyle); el.style.fill = null; el.style.stroke = borderColor; } var CandlestickSeriesModel = /** @class */ function (_super) { __extends(CandlestickSeriesModel, _super); function CandlestickSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = CandlestickSeriesModel.type; _this.defaultValueDimensions = [{ name: 'open', defaultTooltip: true }, { name: 'close', defaultTooltip: true }, { name: 'lowest', defaultTooltip: true }, { name: 'highest', defaultTooltip: true }]; return _this; } /** * Get dimension for shadow in dataZoom * @return dimension name */ CandlestickSeriesModel.prototype.getShadowDim = function () { return 'open'; }; CandlestickSeriesModel.prototype.brushSelector = function (dataIndex, data, selectors) { var itemLayout = data.getItemLayout(dataIndex); return itemLayout && selectors.rect(itemLayout.brushRect); }; CandlestickSeriesModel.type = 'series.candlestick'; CandlestickSeriesModel.dependencies = ['xAxis', 'yAxis', 'grid']; CandlestickSeriesModel.defaultOption = { zlevel: 0, z: 2, coordinateSystem: 'cartesian2d', legendHoverLink: true, // xAxisIndex: 0, // yAxisIndex: 0, layout: null, clip: true, itemStyle: { color: '#eb5454', color0: '#47b262', borderColor: '#eb5454', borderColor0: '#47b262', // borderColor: '#d24040', // borderColor0: '#398f4f', borderWidth: 1 }, emphasis: { scale: true, itemStyle: { borderWidth: 2 } }, barMaxWidth: null, barMinWidth: null, barWidth: null, large: true, largeThreshold: 600, progressive: 3e3, progressiveThreshold: 1e4, progressiveChunkMode: 'mod', animationEasing: 'linear', animationDuration: 300 }; return CandlestickSeriesModel; }(SeriesModel); mixin(CandlestickSeriesModel, WhiskerBoxCommonMixin, true); function candlestickPreprocessor(option) { if (!option || !isArray(option.series)) { return; } // Translate 'k' to 'candlestick'. each(option.series, function (seriesItem) { if (isObject(seriesItem) && seriesItem.type === 'k') { seriesItem.type = 'candlestick'; } }); } var positiveBorderColorQuery = ['itemStyle', 'borderColor']; var negativeBorderColorQuery = ['itemStyle', 'borderColor0']; var positiveColorQuery = ['itemStyle', 'color']; var negativeColorQuery = ['itemStyle', 'color0']; var candlestickVisual = { seriesType: 'candlestick', plan: createRenderPlanner(), // For legend. performRawSeries: true, reset: function (seriesModel, ecModel) { function getColor(sign, model) { return model.get(sign > 0 ? positiveColorQuery : negativeColorQuery); } function getBorderColor(sign, model) { return model.get(sign > 0 ? positiveBorderColorQuery : negativeBorderColorQuery); } var data = seriesModel.getData(); // Only visible series has each data be visual encoded if (ecModel.isSeriesFiltered(seriesModel)) { return; } var isLargeRender = seriesModel.pipelineContext.large; return !isLargeRender && { progress: function (params, data) { var dataIndex; while ((dataIndex = params.next()) != null) { var itemModel = data.getItemModel(dataIndex); var sign = data.getItemLayout(dataIndex).sign; var style = itemModel.getItemStyle(); style.fill = getColor(sign, itemModel); style.stroke = getBorderColor(sign, itemModel) || style.fill; var existsStyle = data.ensureUniqueItemVisual(dataIndex, 'style'); extend(existsStyle, style); } } }; } }; var LargeArr$1 = typeof Float32Array !== 'undefined' ? Float32Array : Array; var candlestickLayout = { seriesType: 'candlestick', plan: createRenderPlanner(), reset: function (seriesModel) { var coordSys = seriesModel.coordinateSystem; var data = seriesModel.getData(); var candleWidth = calculateCandleWidth(seriesModel, data); var cDimIdx = 0; var vDimIdx = 1; var coordDims = ['x', 'y']; var cDim = data.mapDimension(coordDims[cDimIdx]); var vDims = data.mapDimensionsAll(coordDims[vDimIdx]); var openDim = vDims[0]; var closeDim = vDims[1]; var lowestDim = vDims[2]; var highestDim = vDims[3]; data.setLayout({ candleWidth: candleWidth, // The value is experimented visually. isSimpleBox: candleWidth <= 1.3 }); if (cDim == null || vDims.length < 4) { return; } return { progress: seriesModel.pipelineContext.large ? largeProgress : normalProgress }; function normalProgress(params, data) { var dataIndex; while ((dataIndex = params.next()) != null) { var axisDimVal = data.get(cDim, dataIndex); var openVal = data.get(openDim, dataIndex); var closeVal = data.get(closeDim, dataIndex); var lowestVal = data.get(lowestDim, dataIndex); var highestVal = data.get(highestDim, dataIndex); var ocLow = Math.min(openVal, closeVal); var ocHigh = Math.max(openVal, closeVal); var ocLowPoint = getPoint(ocLow, axisDimVal); var ocHighPoint = getPoint(ocHigh, axisDimVal); var lowestPoint = getPoint(lowestVal, axisDimVal); var highestPoint = getPoint(highestVal, axisDimVal); var ends = []; addBodyEnd(ends, ocHighPoint, 0); addBodyEnd(ends, ocLowPoint, 1); ends.push(subPixelOptimizePoint(highestPoint), subPixelOptimizePoint(ocHighPoint), subPixelOptimizePoint(lowestPoint), subPixelOptimizePoint(ocLowPoint)); data.setItemLayout(dataIndex, { sign: getSign(data, dataIndex, openVal, closeVal, closeDim), initBaseline: openVal > closeVal ? ocHighPoint[vDimIdx] : ocLowPoint[vDimIdx], ends: ends, brushRect: makeBrushRect(lowestVal, highestVal, axisDimVal) }); } function getPoint(val, axisDimVal) { var p = []; p[cDimIdx] = axisDimVal; p[vDimIdx] = val; return isNaN(axisDimVal) || isNaN(val) ? [NaN, NaN] : coordSys.dataToPoint(p); } function addBodyEnd(ends, point, start) { var point1 = point.slice(); var point2 = point.slice(); point1[cDimIdx] = subPixelOptimize$1(point1[cDimIdx] + candleWidth / 2, 1, false); point2[cDimIdx] = subPixelOptimize$1(point2[cDimIdx] - candleWidth / 2, 1, true); start ? ends.push(point1, point2) : ends.push(point2, point1); } function makeBrushRect(lowestVal, highestVal, axisDimVal) { var pmin = getPoint(lowestVal, axisDimVal); var pmax = getPoint(highestVal, axisDimVal); pmin[cDimIdx] -= candleWidth / 2; pmax[cDimIdx] -= candleWidth / 2; return { x: pmin[0], y: pmin[1], width: candleWidth , height: pmax[1] - pmin[1] }; } function subPixelOptimizePoint(point) { point[cDimIdx] = subPixelOptimize$1(point[cDimIdx], 1); return point; } } function largeProgress(params, data) { // Structure: [sign, x, yhigh, ylow, sign, x, yhigh, ylow, ...] var points = new LargeArr$1(params.count * 4); var offset = 0; var point; var tmpIn = []; var tmpOut = []; var dataIndex; while ((dataIndex = params.next()) != null) { var axisDimVal = data.get(cDim, dataIndex); var openVal = data.get(openDim, dataIndex); var closeVal = data.get(closeDim, dataIndex); var lowestVal = data.get(lowestDim, dataIndex); var highestVal = data.get(highestDim, dataIndex); if (isNaN(axisDimVal) || isNaN(lowestVal) || isNaN(highestVal)) { points[offset++] = NaN; offset += 3; continue; } points[offset++] = getSign(data, dataIndex, openVal, closeVal, closeDim); tmpIn[cDimIdx] = axisDimVal; tmpIn[vDimIdx] = lowestVal; point = coordSys.dataToPoint(tmpIn, null, tmpOut); points[offset++] = point ? point[0] : NaN; points[offset++] = point ? point[1] : NaN; tmpIn[vDimIdx] = highestVal; point = coordSys.dataToPoint(tmpIn, null, tmpOut); points[offset++] = point ? point[1] : NaN; } data.setLayout('largePoints', points); } } }; function getSign(data, dataIndex, openVal, closeVal, closeDim) { var sign; if (openVal > closeVal) { sign = -1; } else if (openVal < closeVal) { sign = 1; } else { sign = dataIndex > 0 // If close === open, compare with close of last record ? data.get(closeDim, dataIndex - 1) <= closeVal ? 1 : -1 : // No record of previous, set to be positive 1; } return sign; } function calculateCandleWidth(seriesModel, data) { var baseAxis = seriesModel.getBaseAxis(); var extent; var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : (extent = baseAxis.getExtent(), Math.abs(extent[1] - extent[0]) / data.count()); var barMaxWidth = parsePercent$1(retrieve2(seriesModel.get('barMaxWidth'), bandWidth), bandWidth); var barMinWidth = parsePercent$1(retrieve2(seriesModel.get('barMinWidth'), 1), bandWidth); var barWidth = seriesModel.get('barWidth'); return barWidth != null ? parsePercent$1(barWidth, bandWidth) // Put max outer to ensure bar visible in spite of overlap. : Math.max(Math.min(bandWidth / 2, barMaxWidth), barMinWidth); } function install$k(registers) { registers.registerChartView(CandlestickView); registers.registerSeriesModel(CandlestickSeriesModel); registers.registerPreprocessor(candlestickPreprocessor); registers.registerVisual(candlestickVisual); registers.registerLayout(candlestickLayout); } var EFFECT_RIPPLE_NUMBER = 3; function normalizeSymbolSize$1(symbolSize) { if (!isArray(symbolSize)) { symbolSize = [+symbolSize, +symbolSize]; } return symbolSize; } function updateRipplePath(rippleGroup, effectCfg) { var color = effectCfg.rippleEffectColor || effectCfg.color; rippleGroup.eachChild(function (ripplePath) { ripplePath.attr({ z: effectCfg.z, zlevel: effectCfg.zlevel, style: { stroke: effectCfg.brushType === 'stroke' ? color : null, fill: effectCfg.brushType === 'fill' ? color : null } }); }); } var EffectSymbol = /** @class */ function (_super) { __extends(EffectSymbol, _super); function EffectSymbol(data, idx) { var _this = _super.call(this) || this; var symbol = new Symbol(data, idx); var rippleGroup = new Group(); _this.add(symbol); _this.add(rippleGroup); _this.updateData(data, idx); return _this; } EffectSymbol.prototype.stopEffectAnimation = function () { this.childAt(1).removeAll(); }; EffectSymbol.prototype.startEffectAnimation = function (effectCfg) { var symbolType = effectCfg.symbolType; var color = effectCfg.color; var rippleGroup = this.childAt(1); for (var i = 0; i < EFFECT_RIPPLE_NUMBER; i++) { // If width/height are set too small (e.g., set to 1) on ios10 // and macOS Sierra, a circle stroke become a rect, no matter what // the scale is set. So we set width/height as 2. See #4136. var ripplePath = createSymbol(symbolType, -1, -1, 2, 2, color); ripplePath.attr({ style: { strokeNoScale: true }, z2: 99, silent: true, scaleX: 0.5, scaleY: 0.5 }); var delay = -i / EFFECT_RIPPLE_NUMBER * effectCfg.period + effectCfg.effectOffset; // TODO Configurable effectCfg.period ripplePath.animate('', true).when(effectCfg.period, { scaleX: effectCfg.rippleScale / 2, scaleY: effectCfg.rippleScale / 2 }).delay(delay).start(); ripplePath.animateStyle(true).when(effectCfg.period, { opacity: 0 }).delay(delay).start(); rippleGroup.add(ripplePath); } updateRipplePath(rippleGroup, effectCfg); }; /** * Update effect symbol */ EffectSymbol.prototype.updateEffectAnimation = function (effectCfg) { var oldEffectCfg = this._effectCfg; var rippleGroup = this.childAt(1); // Must reinitialize effect if following configuration changed var DIFFICULT_PROPS = ['symbolType', 'period', 'rippleScale']; for (var i = 0; i < DIFFICULT_PROPS.length; i++) { var propName = DIFFICULT_PROPS[i]; if (oldEffectCfg[propName] !== effectCfg[propName]) { this.stopEffectAnimation(); this.startEffectAnimation(effectCfg); return; } } updateRipplePath(rippleGroup, effectCfg); }; /** * Highlight symbol */ EffectSymbol.prototype.highlight = function () { enterEmphasis(this); }; /** * Downplay symbol */ EffectSymbol.prototype.downplay = function () { leaveEmphasis(this); }; /** * Update symbol properties */ EffectSymbol.prototype.updateData = function (data, idx) { var _this = this; var seriesModel = data.hostModel; this.childAt(0).updateData(data, idx); var rippleGroup = this.childAt(1); var itemModel = data.getItemModel(idx); var symbolType = data.getItemVisual(idx, 'symbol'); var symbolSize = normalizeSymbolSize$1(data.getItemVisual(idx, 'symbolSize')); var symbolStyle = data.getItemVisual(idx, 'style'); var color = symbolStyle && symbolStyle.fill; rippleGroup.setScale(symbolSize); rippleGroup.traverse(function (ripplePath) { ripplePath.setStyle('fill', color); }); var symbolOffset = data.getItemVisual(idx, 'symbolOffset'); if (symbolOffset) { if (!isArray(symbolOffset)) { symbolOffset = [symbolOffset, symbolOffset]; } rippleGroup.x = parsePercent$1(symbolOffset[0], symbolSize[0]); rippleGroup.y = parsePercent$1(retrieve2(symbolOffset[1], symbolOffset[0]) || 0, symbolSize[1]); } var symbolRotate = data.getItemVisual(idx, 'symbolRotate'); rippleGroup.rotation = (symbolRotate || 0) * Math.PI / 180 || 0; var effectCfg = {}; effectCfg.showEffectOn = seriesModel.get('showEffectOn'); effectCfg.rippleScale = itemModel.get(['rippleEffect', 'scale']); effectCfg.brushType = itemModel.get(['rippleEffect', 'brushType']); effectCfg.period = itemModel.get(['rippleEffect', 'period']) * 1000; effectCfg.effectOffset = idx / data.count(); effectCfg.z = seriesModel.getShallow('z') || 0; effectCfg.zlevel = seriesModel.getShallow('zlevel') || 0; effectCfg.symbolType = symbolType; effectCfg.color = color; effectCfg.rippleEffectColor = itemModel.get(['rippleEffect', 'color']); this.off('mouseover').off('mouseout').off('emphasis').off('normal'); if (effectCfg.showEffectOn === 'render') { this._effectCfg ? this.updateEffectAnimation(effectCfg) : this.startEffectAnimation(effectCfg); this._effectCfg = effectCfg; } else { // Not keep old effect config this._effectCfg = null; this.stopEffectAnimation(); this.onHoverStateChange = function (toState) { if (toState === 'emphasis') { if (effectCfg.showEffectOn !== 'render') { _this.startEffectAnimation(effectCfg); } } else if (toState === 'normal') { if (effectCfg.showEffectOn !== 'render') { _this.stopEffectAnimation(); } } }; } this._effectCfg = effectCfg; enableHoverEmphasis(this); }; EffectSymbol.prototype.fadeOut = function (cb) { this.off('mouseover').off('mouseout'); cb && cb(); }; return EffectSymbol; }(Group); var EffectScatterView = /** @class */ function (_super) { __extends(EffectScatterView, _super); function EffectScatterView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = EffectScatterView.type; return _this; } EffectScatterView.prototype.init = function () { this._symbolDraw = new SymbolDraw(EffectSymbol); }; EffectScatterView.prototype.render = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var effectSymbolDraw = this._symbolDraw; effectSymbolDraw.updateData(data, { clipShape: this._getClipShape(seriesModel) }); this.group.add(effectSymbolDraw.group); }; EffectScatterView.prototype._getClipShape = function (seriesModel) { var coordSys = seriesModel.coordinateSystem; var clipArea = coordSys && coordSys.getArea && coordSys.getArea(); return seriesModel.get('clip', true) ? clipArea : null; }; EffectScatterView.prototype.updateTransform = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); this.group.dirty(); var res = pointsLayout('').reset(seriesModel, ecModel, api); if (res.progress) { res.progress({ start: 0, end: data.count(), count: data.count() }, data); } this._symbolDraw.updateLayout(); }; EffectScatterView.prototype._updateGroupTransform = function (seriesModel) { var coordSys = seriesModel.coordinateSystem; if (coordSys && coordSys.getRoamTransform) { this.group.transform = clone$2(coordSys.getRoamTransform()); this.group.decomposeTransform(); } }; EffectScatterView.prototype.remove = function (ecModel, api) { this._symbolDraw && this._symbolDraw.remove(true); }; EffectScatterView.type = 'effectScatter'; return EffectScatterView; }(ChartView); var EffectScatterSeriesModel = /** @class */ function (_super) { __extends(EffectScatterSeriesModel, _super); function EffectScatterSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = EffectScatterSeriesModel.type; _this.hasSymbolVisual = true; return _this; } EffectScatterSeriesModel.prototype.getInitialData = function (option, ecModel) { return createListFromArray(this.getSource(), this, { useEncodeDefaulter: true }); }; EffectScatterSeriesModel.prototype.brushSelector = function (dataIndex, data, selectors) { return selectors.point(data.getItemLayout(dataIndex)); }; EffectScatterSeriesModel.type = 'series.effectScatter'; EffectScatterSeriesModel.dependencies = ['grid', 'polar']; EffectScatterSeriesModel.defaultOption = { coordinateSystem: 'cartesian2d', zlevel: 0, z: 2, legendHoverLink: true, effectType: 'ripple', progressive: 0, // When to show the effect, option: 'render'|'emphasis' showEffectOn: 'render', clip: true, // Ripple effect config rippleEffect: { period: 4, // Scale of ripple scale: 2.5, // Brush type can be fill or stroke brushType: 'fill' }, // Cartesian coordinate system // xAxisIndex: 0, // yAxisIndex: 0, // Polar coordinate system // polarIndex: 0, // Geo coordinate system // geoIndex: 0, // symbol: null, // 图形类型 symbolSize: 10 // 图形大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2 // symbolRotate: null, // 图形旋转控制 // itemStyle: { // opacity: 1 // } }; return EffectScatterSeriesModel; }(SeriesModel); function install$l(registers) { registers.registerChartView(EffectScatterView); registers.registerSeriesModel(EffectScatterSeriesModel); registers.registerLayout(pointsLayout('effectScatter')); } var EffectLine = /** @class */ function (_super) { __extends(EffectLine, _super); function EffectLine(lineData, idx, seriesScope) { var _this = _super.call(this) || this; _this.add(_this.createLine(lineData, idx, seriesScope)); _this._updateEffectSymbol(lineData, idx); return _this; } EffectLine.prototype.createLine = function (lineData, idx, seriesScope) { return new Line$1(lineData, idx, seriesScope); }; EffectLine.prototype._updateEffectSymbol = function (lineData, idx) { var itemModel = lineData.getItemModel(idx); var effectModel = itemModel.getModel('effect'); var size = effectModel.get('symbolSize'); var symbolType = effectModel.get('symbol'); if (!isArray(size)) { size = [size, size]; } var lineStyle = lineData.getItemVisual(idx, 'style'); var color = effectModel.get('color') || lineStyle && lineStyle.stroke; var symbol = this.childAt(1); if (this._symbolType !== symbolType) { // Remove previous this.remove(symbol); symbol = createSymbol(symbolType, -0.5, -0.5, 1, 1, color); symbol.z2 = 100; symbol.culling = true; this.add(symbol); } // Symbol may be removed if loop is false if (!symbol) { return; } // Shadow color is same with color in default symbol.setStyle('shadowColor', color); symbol.setStyle(effectModel.getItemStyle(['color'])); symbol.scaleX = size[0]; symbol.scaleY = size[1]; symbol.setColor(color); this._symbolType = symbolType; this._symbolScale = size; this._updateEffectAnimation(lineData, effectModel, idx); }; EffectLine.prototype._updateEffectAnimation = function (lineData, effectModel, idx) { var symbol = this.childAt(1); if (!symbol) { return; } var self = this; var points = lineData.getItemLayout(idx); var period = effectModel.get('period') * 1000; var loop = effectModel.get('loop'); var constantSpeed = effectModel.get('constantSpeed'); var delayExpr = retrieve(effectModel.get('delay'), function (idx) { return idx / lineData.count() * period / 3; }); // Ignore when updating symbol.ignore = true; this._updateAnimationPoints(symbol, points); if (constantSpeed > 0) { period = this._getLineLength(symbol) / constantSpeed * 1000; } if (period !== this._period || loop !== this._loop) { symbol.stopAnimation(); if (period > 0) { var delayNum = void 0; if (typeof delayExpr === 'function') { delayNum = delayExpr(idx); } else { delayNum = delayExpr; } if (symbol.__t > 0) { delayNum = -period * symbol.__t; } symbol.__t = 0; var animator = symbol.animate('', loop).when(period, { __t: 1 }).delay(delayNum).during(function () { self._updateSymbolPosition(symbol); }); if (!loop) { animator.done(function () { self.remove(symbol); }); } animator.start(); } } this._period = period; this._loop = loop; }; EffectLine.prototype._getLineLength = function (symbol) { // Not so accurate return dist(symbol.__p1, symbol.__cp1) + dist(symbol.__cp1, symbol.__p2); }; EffectLine.prototype._updateAnimationPoints = function (symbol, points) { symbol.__p1 = points[0]; symbol.__p2 = points[1]; symbol.__cp1 = points[2] || [(points[0][0] + points[1][0]) / 2, (points[0][1] + points[1][1]) / 2]; }; EffectLine.prototype.updateData = function (lineData, idx, seriesScope) { this.childAt(0).updateData(lineData, idx, seriesScope); this._updateEffectSymbol(lineData, idx); }; EffectLine.prototype._updateSymbolPosition = function (symbol) { var p1 = symbol.__p1; var p2 = symbol.__p2; var cp1 = symbol.__cp1; var t = symbol.__t; var pos = [symbol.x, symbol.y]; var lastPos = pos.slice(); var quadraticAt$1 = quadraticAt; var quadraticDerivativeAt$1 = quadraticDerivativeAt; pos[0] = quadraticAt$1(p1[0], cp1[0], p2[0], t); pos[1] = quadraticAt$1(p1[1], cp1[1], p2[1], t); // Tangent var tx = quadraticDerivativeAt$1(p1[0], cp1[0], p2[0], t); var ty = quadraticDerivativeAt$1(p1[1], cp1[1], p2[1], t); symbol.rotation = -Math.atan2(ty, tx) - Math.PI / 2; // enable continuity trail for 'line', 'rect', 'roundRect' symbolType if (this._symbolType === 'line' || this._symbolType === 'rect' || this._symbolType === 'roundRect') { if (symbol.__lastT !== undefined && symbol.__lastT < symbol.__t) { symbol.scaleY = dist(lastPos, pos) * 1.05; // make sure the last segment render within endPoint if (t === 1) { pos[0] = lastPos[0] + (pos[0] - lastPos[0]) / 2; pos[1] = lastPos[1] + (pos[1] - lastPos[1]) / 2; } } else if (symbol.__lastT === 1) { // After first loop, symbol.__t does NOT start with 0, so connect p1 to pos directly. symbol.scaleY = 2 * dist(p1, pos); } else { symbol.scaleY = this._symbolScale[1]; } } symbol.__lastT = symbol.__t; symbol.ignore = false; symbol.x = pos[0]; symbol.y = pos[1]; }; EffectLine.prototype.updateLayout = function (lineData, idx) { this.childAt(0).updateLayout(lineData, idx); var effectModel = lineData.getItemModel(idx).getModel('effect'); this._updateEffectAnimation(lineData, effectModel, idx); }; return EffectLine; }(Group); var Polyline$1 = /** @class */ function (_super) { __extends(Polyline$1, _super); function Polyline$1(lineData, idx, seriesScope) { var _this = _super.call(this) || this; _this._createPolyline(lineData, idx, seriesScope); return _this; } Polyline$1.prototype._createPolyline = function (lineData, idx, seriesScope) { // let seriesModel = lineData.hostModel; var points = lineData.getItemLayout(idx); var line = new Polyline({ shape: { points: points } }); this.add(line); this._updateCommonStl(lineData, idx, seriesScope); }; Polyline$1.prototype.updateData = function (lineData, idx, seriesScope) { var seriesModel = lineData.hostModel; var line = this.childAt(0); var target = { shape: { points: lineData.getItemLayout(idx) } }; updateProps(line, target, seriesModel, idx); this._updateCommonStl(lineData, idx, seriesScope); }; Polyline$1.prototype._updateCommonStl = function (lineData, idx, seriesScope) { var line = this.childAt(0); var itemModel = lineData.getItemModel(idx); var hoverLineStyle = seriesScope && seriesScope.emphasisLineStyle; if (!seriesScope || lineData.hasItemOption) { hoverLineStyle = itemModel.getModel(['emphasis', 'lineStyle']).getLineStyle(); } line.useStyle(lineData.getItemVisual(idx, 'style')); line.style.fill = null; line.style.strokeNoScale = true; var lineEmphasisState = line.ensureState('emphasis'); lineEmphasisState.style = hoverLineStyle; enableHoverEmphasis(this); }; Polyline$1.prototype.updateLayout = function (lineData, idx) { var polyline = this.childAt(0); polyline.setShape('points', lineData.getItemLayout(idx)); }; return Polyline$1; }(Group); var EffectPolyline = /** @class */ function (_super) { __extends(EffectPolyline, _super); function EffectPolyline() { var _this = _super !== null && _super.apply(this, arguments) || this; _this._lastFrame = 0; _this._lastFramePercent = 0; return _this; } // Override EffectPolyline.prototype.createLine = function (lineData, idx, seriesScope) { return new Polyline$1(lineData, idx, seriesScope); }; EffectPolyline.prototype._updateAnimationPoints = function (symbol, points) { this._points = points; var accLenArr = [0]; var len = 0; for (var i = 1; i < points.length; i++) { var p1 = points[i - 1]; var p2 = points[i]; len += dist(p1, p2); accLenArr.push(len); } if (len === 0) { this._length = 0; return; } for (var i = 0; i < accLenArr.length; i++) { accLenArr[i] /= len; } this._offsets = accLenArr; this._length = len; }; EffectPolyline.prototype._getLineLength = function () { return this._length; }; EffectPolyline.prototype._updateSymbolPosition = function (symbol) { var t = symbol.__t; var points = this._points; var offsets = this._offsets; var len = points.length; if (!offsets) { // Has length 0 return; } var lastFrame = this._lastFrame; var frame; if (t < this._lastFramePercent) { // Start from the next frame // PENDING start from lastFrame ? var start = Math.min(lastFrame + 1, len - 1); for (frame = start; frame >= 0; frame--) { if (offsets[frame] <= t) { break; } } // PENDING really need to do this ? frame = Math.min(frame, len - 2); } else { for (frame = lastFrame; frame < len; frame++) { if (offsets[frame] > t) { break; } } frame = Math.min(frame - 1, len - 2); } var p = (t - offsets[frame]) / (offsets[frame + 1] - offsets[frame]); var p0 = points[frame]; var p1 = points[frame + 1]; symbol.x = p0[0] * (1 - p) + p * p1[0]; symbol.y = p0[1] * (1 - p) + p * p1[1]; var tx = p1[0] - p0[0]; var ty = p1[1] - p0[1]; symbol.rotation = -Math.atan2(ty, tx) - Math.PI / 2; this._lastFrame = frame; this._lastFramePercent = t; symbol.ignore = false; }; return EffectPolyline; }(EffectLine); var LargeLinesPathShape = /** @class */ function () { function LargeLinesPathShape() { this.polyline = false; this.curveness = 0; this.segs = []; } return LargeLinesPathShape; }(); var LargeLinesPath = /** @class */ function (_super) { __extends(LargeLinesPath, _super); function LargeLinesPath(opts) { return _super.call(this, opts) || this; } LargeLinesPath.prototype.getDefaultStyle = function () { return { stroke: '#000', fill: null }; }; LargeLinesPath.prototype.getDefaultShape = function () { return new LargeLinesPathShape(); }; LargeLinesPath.prototype.buildPath = function (ctx, shape) { var segs = shape.segs; var curveness = shape.curveness; if (shape.polyline) { for (var i = 0; i < segs.length;) { var count = segs[i++]; if (count > 0) { ctx.moveTo(segs[i++], segs[i++]); for (var k = 1; k < count; k++) { ctx.lineTo(segs[i++], segs[i++]); } } } } else { for (var i = 0; i < segs.length;) { var x0 = segs[i++]; var y0 = segs[i++]; var x1 = segs[i++]; var y1 = segs[i++]; ctx.moveTo(x0, y0); if (curveness > 0) { var x2 = (x0 + x1) / 2 - (y0 - y1) * curveness; var y2 = (y0 + y1) / 2 - (x1 - x0) * curveness; ctx.quadraticCurveTo(x2, y2, x1, y1); } else { ctx.lineTo(x1, y1); } } } }; LargeLinesPath.prototype.findDataIndex = function (x, y) { var shape = this.shape; var segs = shape.segs; var curveness = shape.curveness; var lineWidth = this.style.lineWidth; if (shape.polyline) { var dataIndex = 0; for (var i = 0; i < segs.length;) { var count = segs[i++]; if (count > 0) { var x0 = segs[i++]; var y0 = segs[i++]; for (var k = 1; k < count; k++) { var x1 = segs[i++]; var y1 = segs[i++]; if (containStroke(x0, y0, x1, y1, lineWidth, x, y)) { return dataIndex; } } } dataIndex++; } } else { var dataIndex = 0; for (var i = 0; i < segs.length;) { var x0 = segs[i++]; var y0 = segs[i++]; var x1 = segs[i++]; var y1 = segs[i++]; if (curveness > 0) { var x2 = (x0 + x1) / 2 - (y0 - y1) * curveness; var y2 = (y0 + y1) / 2 - (x1 - x0) * curveness; if (containStroke$2(x0, y0, x2, y2, x1, y1, lineWidth, x, y)) { return dataIndex; } } else { if (containStroke(x0, y0, x1, y1, lineWidth, x, y)) { return dataIndex; } } dataIndex++; } } return -1; }; return LargeLinesPath; }(Path); var LargeLineDraw = /** @class */ function () { function LargeLineDraw() { this.group = new Group(); } LargeLineDraw.prototype.isPersistent = function () { return !this._incremental; }; /** * Update symbols draw by new data */ LargeLineDraw.prototype.updateData = function (data) { this.group.removeAll(); var lineEl = new LargeLinesPath({ rectHover: true, cursor: 'default' }); lineEl.setShape({ segs: data.getLayout('linesPoints') }); this._setCommon(lineEl, data); // Add back this.group.add(lineEl); this._incremental = null; }; /** * @override */ LargeLineDraw.prototype.incrementalPrepareUpdate = function (data) { this.group.removeAll(); this._clearIncremental(); if (data.count() > 5e5) { if (!this._incremental) { this._incremental = new IncrementalDisplayable({ silent: true }); } this.group.add(this._incremental); } else { this._incremental = null; } }; /** * @override */ LargeLineDraw.prototype.incrementalUpdate = function (taskParams, data) { var lineEl = new LargeLinesPath(); lineEl.setShape({ segs: data.getLayout('linesPoints') }); this._setCommon(lineEl, data, !!this._incremental); if (!this._incremental) { lineEl.rectHover = true; lineEl.cursor = 'default'; lineEl.__startIndex = taskParams.start; this.group.add(lineEl); } else { this._incremental.addDisplayable(lineEl, true); } }; /** * @override */ LargeLineDraw.prototype.remove = function () { this._clearIncremental(); this._incremental = null; this.group.removeAll(); }; LargeLineDraw.prototype._setCommon = function (lineEl, data, isIncremental) { var hostModel = data.hostModel; lineEl.setShape({ polyline: hostModel.get('polyline'), curveness: hostModel.get(['lineStyle', 'curveness']) }); lineEl.useStyle(hostModel.getModel('lineStyle').getLineStyle()); lineEl.style.strokeNoScale = true; var style = data.getVisual('style'); if (style && style.stroke) { lineEl.setStyle('stroke', style.stroke); } lineEl.setStyle('fill', null); if (!isIncremental) { var ecData_1 = getECData(lineEl); // Enable tooltip // PENDING May have performance issue when path is extremely large ecData_1.seriesIndex = hostModel.seriesIndex; lineEl.on('mousemove', function (e) { ecData_1.dataIndex = null; var dataIndex = lineEl.findDataIndex(e.offsetX, e.offsetY); if (dataIndex > 0) { // Provide dataIndex for tooltip ecData_1.dataIndex = dataIndex + lineEl.__startIndex; } }); } }; LargeLineDraw.prototype._clearIncremental = function () { var incremental = this._incremental; if (incremental) { incremental.clearDisplaybles(); } }; return LargeLineDraw; }(); var linesLayout = { seriesType: 'lines', plan: createRenderPlanner(), reset: function (seriesModel) { var coordSys = seriesModel.coordinateSystem; var isPolyline = seriesModel.get('polyline'); var isLarge = seriesModel.pipelineContext.large; return { progress: function (params, lineData) { var lineCoords = []; if (isLarge) { var points = void 0; var segCount = params.end - params.start; if (isPolyline) { var totalCoordsCount = 0; for (var i = params.start; i < params.end; i++) { totalCoordsCount += seriesModel.getLineCoordsCount(i); } points = new Float32Array(segCount + totalCoordsCount * 2); } else { points = new Float32Array(segCount * 4); } var offset = 0; var pt = []; for (var i = params.start; i < params.end; i++) { var len = seriesModel.getLineCoords(i, lineCoords); if (isPolyline) { points[offset++] = len; } for (var k = 0; k < len; k++) { pt = coordSys.dataToPoint(lineCoords[k], false, pt); points[offset++] = pt[0]; points[offset++] = pt[1]; } } lineData.setLayout('linesPoints', points); } else { for (var i = params.start; i < params.end; i++) { var itemModel = lineData.getItemModel(i); var len = seriesModel.getLineCoords(i, lineCoords); var pts = []; if (isPolyline) { for (var j = 0; j < len; j++) { pts.push(coordSys.dataToPoint(lineCoords[j])); } } else { pts[0] = coordSys.dataToPoint(lineCoords[0]); pts[1] = coordSys.dataToPoint(lineCoords[1]); var curveness = itemModel.get(['lineStyle', 'curveness']); if (+curveness) { pts[2] = [(pts[0][0] + pts[1][0]) / 2 - (pts[0][1] - pts[1][1]) * curveness, (pts[0][1] + pts[1][1]) / 2 - (pts[1][0] - pts[0][0]) * curveness]; } } lineData.setItemLayout(i, pts); } } } }; } }; var LinesView = /** @class */ function (_super) { __extends(LinesView, _super); function LinesView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = LinesView.type; return _this; } LinesView.prototype.render = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var lineDraw = this._updateLineDraw(data, seriesModel); var zlevel = seriesModel.get('zlevel'); var trailLength = seriesModel.get(['effect', 'trailLength']); var zr = api.getZr(); // Avoid the drag cause ghost shadow // FIXME Better way ? // SVG doesn't support var isSvg = zr.painter.getType() === 'svg'; if (!isSvg) { zr.painter.getLayer(zlevel).clear(true); } // Config layer with motion blur if (this._lastZlevel != null && !isSvg) { zr.configLayer(this._lastZlevel, { motionBlur: false }); } if (this._showEffect(seriesModel) && trailLength) { if ("development" !== 'production') { var notInIndividual_1 = false; ecModel.eachSeries(function (otherSeriesModel) { if (otherSeriesModel !== seriesModel && otherSeriesModel.get('zlevel') === zlevel) { notInIndividual_1 = true; } }); notInIndividual_1 && console.warn('Lines with trail effect should have an individual zlevel'); } if (!isSvg) { zr.configLayer(zlevel, { motionBlur: true, lastFrameAlpha: Math.max(Math.min(trailLength / 10 + 0.9, 1), 0) }); } } lineDraw.updateData(data); var clipPath = seriesModel.get('clip', true) && createClipPath(seriesModel.coordinateSystem, false, seriesModel); if (clipPath) { this.group.setClipPath(clipPath); } else { this.group.removeClipPath(); } this._lastZlevel = zlevel; this._finished = true; }; LinesView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var lineDraw = this._updateLineDraw(data, seriesModel); lineDraw.incrementalPrepareUpdate(data); this._clearLayer(api); this._finished = false; }; LinesView.prototype.incrementalRender = function (taskParams, seriesModel, ecModel) { this._lineDraw.incrementalUpdate(taskParams, seriesModel.getData()); this._finished = taskParams.end === seriesModel.getData().count(); }; LinesView.prototype.updateTransform = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var pipelineContext = seriesModel.pipelineContext; if (!this._finished || pipelineContext.large || pipelineContext.progressiveRender) { // TODO Don't have to do update in large mode. Only do it when there are millions of data. return { update: true }; } else { // TODO Use same logic with ScatterView. // Manually update layout var res = linesLayout.reset(seriesModel, ecModel, api); if (res.progress) { res.progress({ start: 0, end: data.count(), count: data.count() }, data); } // Not in large mode this._lineDraw.updateLayout(); this._clearLayer(api); } }; LinesView.prototype._updateLineDraw = function (data, seriesModel) { var lineDraw = this._lineDraw; var hasEffect = this._showEffect(seriesModel); var isPolyline = !!seriesModel.get('polyline'); var pipelineContext = seriesModel.pipelineContext; var isLargeDraw = pipelineContext.large; if ("development" !== 'production') { if (hasEffect && isLargeDraw) { console.warn('Large lines not support effect'); } } if (!lineDraw || hasEffect !== this._hasEffet || isPolyline !== this._isPolyline || isLargeDraw !== this._isLargeDraw) { if (lineDraw) { lineDraw.remove(); } lineDraw = this._lineDraw = isLargeDraw ? new LargeLineDraw() : new LineDraw(isPolyline ? hasEffect ? EffectPolyline : Polyline$1 : hasEffect ? EffectLine : Line$1); this._hasEffet = hasEffect; this._isPolyline = isPolyline; this._isLargeDraw = isLargeDraw; this.group.removeAll(); } this.group.add(lineDraw.group); return lineDraw; }; LinesView.prototype._showEffect = function (seriesModel) { return !!seriesModel.get(['effect', 'show']); }; LinesView.prototype._clearLayer = function (api) { // Not use motion when dragging or zooming var zr = api.getZr(); var isSvg = zr.painter.getType() === 'svg'; if (!isSvg && this._lastZlevel != null) { zr.painter.getLayer(this._lastZlevel).clear(true); } }; LinesView.prototype.remove = function (ecModel, api) { this._lineDraw && this._lineDraw.remove(); this._lineDraw = null; // Clear motion when lineDraw is removed this._clearLayer(api); }; LinesView.type = 'lines'; return LinesView; }(ChartView); var Uint32Arr = typeof Uint32Array === 'undefined' ? Array : Uint32Array; var Float64Arr = typeof Float64Array === 'undefined' ? Array : Float64Array; function compatEc2(seriesOpt) { var data = seriesOpt.data; if (data && data[0] && data[0][0] && data[0][0].coord) { if ("development" !== 'production') { console.warn('Lines data configuration has been changed to' + ' { coords:[[1,2],[2,3]] }'); } seriesOpt.data = map(data, function (itemOpt) { var coords = [itemOpt[0].coord, itemOpt[1].coord]; var target = { coords: coords }; if (itemOpt[0].name) { target.fromName = itemOpt[0].name; } if (itemOpt[1].name) { target.toName = itemOpt[1].name; } return mergeAll([target, itemOpt[0], itemOpt[1]]); }); } } var LinesSeriesModel = /** @class */ function (_super) { __extends(LinesSeriesModel, _super); function LinesSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = LinesSeriesModel.type; _this.visualStyleAccessPath = 'lineStyle'; _this.visualDrawType = 'stroke'; return _this; } LinesSeriesModel.prototype.init = function (option) { // The input data may be null/undefined. option.data = option.data || []; // Not using preprocessor because mergeOption may not have series.type compatEc2(option); var result = this._processFlatCoordsArray(option.data); this._flatCoords = result.flatCoords; this._flatCoordsOffset = result.flatCoordsOffset; if (result.flatCoords) { option.data = new Float32Array(result.count); } _super.prototype.init.apply(this, arguments); }; LinesSeriesModel.prototype.mergeOption = function (option) { compatEc2(option); if (option.data) { // Only update when have option data to merge. var result = this._processFlatCoordsArray(option.data); this._flatCoords = result.flatCoords; this._flatCoordsOffset = result.flatCoordsOffset; if (result.flatCoords) { option.data = new Float32Array(result.count); } } _super.prototype.mergeOption.apply(this, arguments); }; LinesSeriesModel.prototype.appendData = function (params) { var result = this._processFlatCoordsArray(params.data); if (result.flatCoords) { if (!this._flatCoords) { this._flatCoords = result.flatCoords; this._flatCoordsOffset = result.flatCoordsOffset; } else { this._flatCoords = concatArray(this._flatCoords, result.flatCoords); this._flatCoordsOffset = concatArray(this._flatCoordsOffset, result.flatCoordsOffset); } params.data = new Float32Array(result.count); } this.getRawData().appendData(params.data); }; LinesSeriesModel.prototype._getCoordsFromItemModel = function (idx) { var itemModel = this.getData().getItemModel(idx); var coords = itemModel.option instanceof Array ? itemModel.option : itemModel.getShallow('coords'); if ("development" !== 'production') { if (!(coords instanceof Array && coords.length > 0 && coords[0] instanceof Array)) { throw new Error('Invalid coords ' + JSON.stringify(coords) + '. Lines must have 2d coords array in data item.'); } } return coords; }; LinesSeriesModel.prototype.getLineCoordsCount = function (idx) { if (this._flatCoordsOffset) { return this._flatCoordsOffset[idx * 2 + 1]; } else { return this._getCoordsFromItemModel(idx).length; } }; LinesSeriesModel.prototype.getLineCoords = function (idx, out) { if (this._flatCoordsOffset) { var offset = this._flatCoordsOffset[idx * 2]; var len = this._flatCoordsOffset[idx * 2 + 1]; for (var i = 0; i < len; i++) { out[i] = out[i] || []; out[i][0] = this._flatCoords[offset + i * 2]; out[i][1] = this._flatCoords[offset + i * 2 + 1]; } return len; } else { var coords = this._getCoordsFromItemModel(idx); for (var i = 0; i < coords.length; i++) { out[i] = out[i] || []; out[i][0] = coords[i][0]; out[i][1] = coords[i][1]; } return coords.length; } }; LinesSeriesModel.prototype._processFlatCoordsArray = function (data) { var startOffset = 0; if (this._flatCoords) { startOffset = this._flatCoords.length; } // Stored as a typed array. In format // Points Count(2) | x | y | x | y | Points Count(3) | x | y | x | y | x | y | if (typeof data[0] === 'number') { var len = data.length; // Store offset and len of each segment var coordsOffsetAndLenStorage = new Uint32Arr(len); var coordsStorage = new Float64Arr(len); var coordsCursor = 0; var offsetCursor = 0; var dataCount = 0; for (var i = 0; i < len;) { dataCount++; var count = data[i++]; // Offset coordsOffsetAndLenStorage[offsetCursor++] = coordsCursor + startOffset; // Len coordsOffsetAndLenStorage[offsetCursor++] = count; for (var k = 0; k < count; k++) { var x = data[i++]; var y = data[i++]; coordsStorage[coordsCursor++] = x; coordsStorage[coordsCursor++] = y; if (i > len) { if ("development" !== 'production') { throw new Error('Invalid data format.'); } } } } return { flatCoordsOffset: new Uint32Array(coordsOffsetAndLenStorage.buffer, 0, offsetCursor), flatCoords: coordsStorage, count: dataCount }; } return { flatCoordsOffset: null, flatCoords: null, count: data.length }; }; LinesSeriesModel.prototype.getInitialData = function (option, ecModel) { if ("development" !== 'production') { var CoordSys = CoordinateSystemManager.get(option.coordinateSystem); if (!CoordSys) { throw new Error('Unkown coordinate system ' + option.coordinateSystem); } } var lineData = new List(['value'], this); lineData.hasItemOption = false; lineData.initData(option.data, [], function (dataItem, dimName, dataIndex, dimIndex) { // dataItem is simply coords if (dataItem instanceof Array) { return NaN; } else { lineData.hasItemOption = true; var value = dataItem.value; if (value != null) { return value instanceof Array ? value[dimIndex] : value; } } }); return lineData; }; LinesSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { var data = this.getData(); var itemModel = data.getItemModel(dataIndex); var name = itemModel.get('name'); if (name) { return name; } var fromName = itemModel.get('fromName'); var toName = itemModel.get('toName'); var nameArr = []; fromName != null && nameArr.push(fromName); toName != null && nameArr.push(toName); return createTooltipMarkup('nameValue', { name: nameArr.join(' > ') }); }; LinesSeriesModel.prototype.preventIncremental = function () { return !!this.get(['effect', 'show']); }; LinesSeriesModel.prototype.getProgressive = function () { var progressive = this.option.progressive; if (progressive == null) { return this.option.large ? 1e4 : this.get('progressive'); } return progressive; }; LinesSeriesModel.prototype.getProgressiveThreshold = function () { var progressiveThreshold = this.option.progressiveThreshold; if (progressiveThreshold == null) { return this.option.large ? 2e4 : this.get('progressiveThreshold'); } return progressiveThreshold; }; LinesSeriesModel.type = 'series.lines'; LinesSeriesModel.dependencies = ['grid', 'polar', 'geo', 'calendar']; LinesSeriesModel.defaultOption = { coordinateSystem: 'geo', zlevel: 0, z: 2, legendHoverLink: true, // Cartesian coordinate system xAxisIndex: 0, yAxisIndex: 0, symbol: ['none', 'none'], symbolSize: [10, 10], // Geo coordinate system geoIndex: 0, effect: { show: false, period: 4, constantSpeed: 0, symbol: 'circle', symbolSize: 3, loop: true, trailLength: 0.2 }, large: false, // Available when large is true largeThreshold: 2000, polyline: false, clip: true, label: { show: false, position: 'end' // distance: 5, // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调 }, lineStyle: { opacity: 0.5 } }; return LinesSeriesModel; }(SeriesModel); /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ function normalize$3(a) { if (!(a instanceof Array)) { a = [a, a]; } return a; } var linesVisual = { seriesType: 'lines', reset: function (seriesModel) { var symbolType = normalize$3(seriesModel.get('symbol')); var symbolSize = normalize$3(seriesModel.get('symbolSize')); var data = seriesModel.getData(); data.setVisual('fromSymbol', symbolType && symbolType[0]); data.setVisual('toSymbol', symbolType && symbolType[1]); data.setVisual('fromSymbolSize', symbolSize && symbolSize[0]); data.setVisual('toSymbolSize', symbolSize && symbolSize[1]); function dataEach(data, idx) { var itemModel = data.getItemModel(idx); var symbolType = normalize$3(itemModel.getShallow('symbol', true)); var symbolSize = normalize$3(itemModel.getShallow('symbolSize', true)); symbolType[0] && data.setItemVisual(idx, 'fromSymbol', symbolType[0]); symbolType[1] && data.setItemVisual(idx, 'toSymbol', symbolType[1]); symbolSize[0] && data.setItemVisual(idx, 'fromSymbolSize', symbolSize[0]); symbolSize[1] && data.setItemVisual(idx, 'toSymbolSize', symbolSize[1]); } return { dataEach: data.hasItemOption ? dataEach : null }; } }; function install$m(registers) { registers.registerChartView(LinesView); registers.registerSeriesModel(LinesSeriesModel); registers.registerLayout(linesLayout); registers.registerVisual(linesVisual); } var GRADIENT_LEVELS = 256; var HeatmapLayer = /** @class */ function () { function HeatmapLayer() { this.blurSize = 30; this.pointSize = 20; this.maxOpacity = 1; this.minOpacity = 0; this._gradientPixels = { inRange: null, outOfRange: null }; var canvas = createCanvas(); this.canvas = canvas; } /** * Renders Heatmap and returns the rendered canvas * @param data array of data, each has x, y, value * @param width canvas width * @param height canvas height */ HeatmapLayer.prototype.update = function (data, width, height, normalize, colorFunc, isInRange) { var brush = this._getBrush(); var gradientInRange = this._getGradient(colorFunc, 'inRange'); var gradientOutOfRange = this._getGradient(colorFunc, 'outOfRange'); var r = this.pointSize + this.blurSize; var canvas = this.canvas; var ctx = canvas.getContext('2d'); var len = data.length; canvas.width = width; canvas.height = height; for (var i = 0; i < len; ++i) { var p = data[i]; var x = p[0]; var y = p[1]; var value = p[2]; // calculate alpha using value var alpha = normalize(value); // draw with the circle brush with alpha ctx.globalAlpha = alpha; ctx.drawImage(brush, x - r, y - r); } if (!canvas.width || !canvas.height) { // Avoid "Uncaught DOMException: Failed to execute 'getImageData' on // 'CanvasRenderingContext2D': The source height is 0." return canvas; } // colorize the canvas using alpha value and set with gradient var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height); var pixels = imageData.data; var offset = 0; var pixelLen = pixels.length; var minOpacity = this.minOpacity; var maxOpacity = this.maxOpacity; var diffOpacity = maxOpacity - minOpacity; while (offset < pixelLen) { var alpha = pixels[offset + 3] / 256; var gradientOffset = Math.floor(alpha * (GRADIENT_LEVELS - 1)) * 4; // Simple optimize to ignore the empty data if (alpha > 0) { var gradient = isInRange(alpha) ? gradientInRange : gradientOutOfRange; // Any alpha > 0 will be mapped to [minOpacity, maxOpacity] alpha > 0 && (alpha = alpha * diffOpacity + minOpacity); pixels[offset++] = gradient[gradientOffset]; pixels[offset++] = gradient[gradientOffset + 1]; pixels[offset++] = gradient[gradientOffset + 2]; pixels[offset++] = gradient[gradientOffset + 3] * alpha * 256; } else { offset += 4; } } ctx.putImageData(imageData, 0, 0); return canvas; }; /** * get canvas of a black circle brush used for canvas to draw later */ HeatmapLayer.prototype._getBrush = function () { var brushCanvas = this._brushCanvas || (this._brushCanvas = createCanvas()); // set brush size var r = this.pointSize + this.blurSize; var d = r * 2; brushCanvas.width = d; brushCanvas.height = d; var ctx = brushCanvas.getContext('2d'); ctx.clearRect(0, 0, d, d); // in order to render shadow without the distinct circle, // draw the distinct circle in an invisible place, // and use shadowOffset to draw shadow in the center of the canvas ctx.shadowOffsetX = d; ctx.shadowBlur = this.blurSize; // draw the shadow in black, and use alpha and shadow blur to generate // color in color map ctx.shadowColor = '#000'; // draw circle in the left to the canvas ctx.beginPath(); ctx.arc(-r, r, this.pointSize, 0, Math.PI * 2, true); ctx.closePath(); ctx.fill(); return brushCanvas; }; /** * get gradient color map * @private */ HeatmapLayer.prototype._getGradient = function (colorFunc, state) { var gradientPixels = this._gradientPixels; var pixelsSingleState = gradientPixels[state] || (gradientPixels[state] = new Uint8ClampedArray(256 * 4)); var color = [0, 0, 0, 0]; var off = 0; for (var i = 0; i < 256; i++) { colorFunc[state](i / 255, true, color); pixelsSingleState[off++] = color[0]; pixelsSingleState[off++] = color[1]; pixelsSingleState[off++] = color[2]; pixelsSingleState[off++] = color[3]; } return pixelsSingleState; }; return HeatmapLayer; }(); function getIsInPiecewiseRange(dataExtent, pieceList, selected) { var dataSpan = dataExtent[1] - dataExtent[0]; pieceList = map(pieceList, function (piece) { return { interval: [(piece.interval[0] - dataExtent[0]) / dataSpan, (piece.interval[1] - dataExtent[0]) / dataSpan] }; }); var len = pieceList.length; var lastIndex = 0; return function (val) { var i; // Try to find in the location of the last found for (i = lastIndex; i < len; i++) { var interval = pieceList[i].interval; if (interval[0] <= val && val <= interval[1]) { lastIndex = i; break; } } if (i === len) { // Not found, back interation for (i = lastIndex - 1; i >= 0; i--) { var interval = pieceList[i].interval; if (interval[0] <= val && val <= interval[1]) { lastIndex = i; break; } } } return i >= 0 && i < len && selected[i]; }; } function getIsInContinuousRange(dataExtent, range) { var dataSpan = dataExtent[1] - dataExtent[0]; range = [(range[0] - dataExtent[0]) / dataSpan, (range[1] - dataExtent[0]) / dataSpan]; return function (val) { return val >= range[0] && val <= range[1]; }; } function isGeoCoordSys(coordSys) { var dimensions = coordSys.dimensions; // Not use coorSys.type === 'geo' because coordSys maybe extended return dimensions[0] === 'lng' && dimensions[1] === 'lat'; } var HeatmapView = /** @class */ function (_super) { __extends(HeatmapView, _super); function HeatmapView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = HeatmapView.type; return _this; } HeatmapView.prototype.render = function (seriesModel, ecModel, api) { var visualMapOfThisSeries; ecModel.eachComponent('visualMap', function (visualMap) { visualMap.eachTargetSeries(function (targetSeries) { if (targetSeries === seriesModel) { visualMapOfThisSeries = visualMap; } }); }); if ("development" !== 'production') { if (!visualMapOfThisSeries) { throw new Error('Heatmap must use with visualMap'); } } this.group.removeAll(); this._incrementalDisplayable = null; var coordSys = seriesModel.coordinateSystem; if (coordSys.type === 'cartesian2d' || coordSys.type === 'calendar') { this._renderOnCartesianAndCalendar(seriesModel, api, 0, seriesModel.getData().count()); } else if (isGeoCoordSys(coordSys)) { this._renderOnGeo(coordSys, seriesModel, visualMapOfThisSeries, api); } }; HeatmapView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) { this.group.removeAll(); }; HeatmapView.prototype.incrementalRender = function (params, seriesModel, ecModel, api) { var coordSys = seriesModel.coordinateSystem; if (coordSys) { // geo does not support incremental rendering? if (isGeoCoordSys(coordSys)) { this.render(seriesModel, ecModel, api); } else { this._renderOnCartesianAndCalendar(seriesModel, api, params.start, params.end, true); } } }; HeatmapView.prototype._renderOnCartesianAndCalendar = function (seriesModel, api, start, end, incremental) { var coordSys = seriesModel.coordinateSystem; var width; var height; var xAxisExtent; var yAxisExtent; if (isCoordinateSystemType(coordSys, 'cartesian2d')) { var xAxis = coordSys.getAxis('x'); var yAxis = coordSys.getAxis('y'); if ("development" !== 'production') { if (!(xAxis.type === 'category' && yAxis.type === 'category')) { throw new Error('Heatmap on cartesian must have two category axes'); } if (!(xAxis.onBand && yAxis.onBand)) { throw new Error('Heatmap on cartesian must have two axes with boundaryGap true'); } } width = xAxis.getBandWidth(); height = yAxis.getBandWidth(); xAxisExtent = xAxis.scale.getExtent(); yAxisExtent = yAxis.scale.getExtent(); } var group = this.group; var data = seriesModel.getData(); var emphasisStyle = seriesModel.getModel(['emphasis', 'itemStyle']).getItemStyle(); var blurStyle = seriesModel.getModel(['blur', 'itemStyle']).getItemStyle(); var selectStyle = seriesModel.getModel(['select', 'itemStyle']).getItemStyle(); var labelStatesModels = getLabelStatesModels(seriesModel); var focus = seriesModel.get(['emphasis', 'focus']); var blurScope = seriesModel.get(['emphasis', 'blurScope']); var dataDims = isCoordinateSystemType(coordSys, 'cartesian2d') ? [data.mapDimension('x'), data.mapDimension('y'), data.mapDimension('value')] : [data.mapDimension('time'), data.mapDimension('value')]; for (var idx = start; idx < end; idx++) { var rect = void 0; var style = data.getItemVisual(idx, 'style'); if (isCoordinateSystemType(coordSys, 'cartesian2d')) { var dataDimX = data.get(dataDims[0], idx); var dataDimY = data.get(dataDims[1], idx); // Ignore empty data and out of extent data if (isNaN(data.get(dataDims[2], idx)) || dataDimX < xAxisExtent[0] || dataDimX > xAxisExtent[1] || dataDimY < yAxisExtent[0] || dataDimY > yAxisExtent[1]) { continue; } var point = coordSys.dataToPoint([dataDimX, dataDimY]); rect = new Rect({ shape: { x: Math.floor(Math.round(point[0]) - width / 2), y: Math.floor(Math.round(point[1]) - height / 2), width: Math.ceil(width), height: Math.ceil(height) }, style: style }); } else { // Ignore empty data if (isNaN(data.get(dataDims[1], idx))) { continue; } rect = new Rect({ z2: 1, shape: coordSys.dataToRect([data.get(dataDims[0], idx)]).contentShape, style: style }); } var itemModel = data.getItemModel(idx); // Optimization for large datset if (data.hasItemOption) { var emphasisModel = itemModel.getModel('emphasis'); emphasisStyle = emphasisModel.getModel('itemStyle').getItemStyle(); blurStyle = itemModel.getModel(['blur', 'itemStyle']).getItemStyle(); selectStyle = itemModel.getModel(['select', 'itemStyle']).getItemStyle(); focus = emphasisModel.get('focus'); blurScope = emphasisModel.get('blurScope'); labelStatesModels = getLabelStatesModels(itemModel); } var rawValue = seriesModel.getRawValue(idx); var defaultText = '-'; if (rawValue && rawValue[2] != null) { defaultText = rawValue[2] + ''; } setLabelStyle(rect, labelStatesModels, { labelFetcher: seriesModel, labelDataIndex: idx, defaultOpacity: style.opacity, defaultText: defaultText }); rect.ensureState('emphasis').style = emphasisStyle; rect.ensureState('blur').style = blurStyle; rect.ensureState('select').style = selectStyle; enableHoverEmphasis(rect, focus, blurScope); rect.incremental = incremental; // PENDING if (incremental) { // Rect must use hover layer if it's incremental. rect.states.emphasis.hoverLayer = true; } group.add(rect); data.setItemGraphicEl(idx, rect); } }; HeatmapView.prototype._renderOnGeo = function (geo, seriesModel, visualMapModel, api) { var inRangeVisuals = visualMapModel.targetVisuals.inRange; var outOfRangeVisuals = visualMapModel.targetVisuals.outOfRange; // if (!visualMapping) { // throw new Error('Data range must have color visuals'); // } var data = seriesModel.getData(); var hmLayer = this._hmLayer || this._hmLayer || new HeatmapLayer(); hmLayer.blurSize = seriesModel.get('blurSize'); hmLayer.pointSize = seriesModel.get('pointSize'); hmLayer.minOpacity = seriesModel.get('minOpacity'); hmLayer.maxOpacity = seriesModel.get('maxOpacity'); var rect = geo.getViewRect().clone(); var roamTransform = geo.getRoamTransform(); rect.applyTransform(roamTransform); // Clamp on viewport var x = Math.max(rect.x, 0); var y = Math.max(rect.y, 0); var x2 = Math.min(rect.width + rect.x, api.getWidth()); var y2 = Math.min(rect.height + rect.y, api.getHeight()); var width = x2 - x; var height = y2 - y; var dims = [data.mapDimension('lng'), data.mapDimension('lat'), data.mapDimension('value')]; var points = data.mapArray(dims, function (lng, lat, value) { var pt = geo.dataToPoint([lng, lat]); pt[0] -= x; pt[1] -= y; pt.push(value); return pt; }); var dataExtent = visualMapModel.getExtent(); var isInRange = visualMapModel.type === 'visualMap.continuous' ? getIsInContinuousRange(dataExtent, visualMapModel.option.range) : getIsInPiecewiseRange(dataExtent, visualMapModel.getPieceList(), visualMapModel.option.selected); hmLayer.update(points, width, height, inRangeVisuals.color.getNormalizer(), { inRange: inRangeVisuals.color.getColorMapper(), outOfRange: outOfRangeVisuals.color.getColorMapper() }, isInRange); var img = new ZRImage({ style: { width: width, height: height, x: x, y: y, image: hmLayer.canvas }, silent: true }); this.group.add(img); }; HeatmapView.type = 'heatmap'; return HeatmapView; }(ChartView); var HeatmapSeriesModel = /** @class */ function (_super) { __extends(HeatmapSeriesModel, _super); function HeatmapSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = HeatmapSeriesModel.type; return _this; } HeatmapSeriesModel.prototype.getInitialData = function (option, ecModel) { return createListFromArray(this.getSource(), this, { generateCoord: 'value' }); }; HeatmapSeriesModel.prototype.preventIncremental = function () { var coordSysCreator = CoordinateSystemManager.get(this.get('coordinateSystem')); if (coordSysCreator && coordSysCreator.dimensions) { return coordSysCreator.dimensions[0] === 'lng' && coordSysCreator.dimensions[1] === 'lat'; } }; HeatmapSeriesModel.type = 'series.heatmap'; HeatmapSeriesModel.dependencies = ['grid', 'geo', 'calendar']; HeatmapSeriesModel.defaultOption = { coordinateSystem: 'cartesian2d', zlevel: 0, z: 2, // Cartesian coordinate system // xAxisIndex: 0, // yAxisIndex: 0, // Geo coordinate system geoIndex: 0, blurSize: 30, pointSize: 20, maxOpacity: 1, minOpacity: 0, select: { itemStyle: { borderColor: '#212121' } } }; return HeatmapSeriesModel; }(SeriesModel); function install$n(registers) { registers.registerChartView(HeatmapView); registers.registerSeriesModel(HeatmapSeriesModel); } var BAR_BORDER_WIDTH_QUERY = ['itemStyle', 'borderWidth']; // index: +isHorizontal var LAYOUT_ATTRS = [{ xy: 'x', wh: 'width', index: 0, posDesc: ['left', 'right'] }, { xy: 'y', wh: 'height', index: 1, posDesc: ['top', 'bottom'] }]; var pathForLineWidth = new Circle(); var PictorialBarView = /** @class */ function (_super) { __extends(PictorialBarView, _super); function PictorialBarView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = PictorialBarView.type; return _this; } PictorialBarView.prototype.render = function (seriesModel, ecModel, api) { var group = this.group; var data = seriesModel.getData(); var oldData = this._data; var cartesian = seriesModel.coordinateSystem; var baseAxis = cartesian.getBaseAxis(); var isHorizontal = baseAxis.isHorizontal(); var coordSysRect = cartesian.master.getRect(); var opt = { ecSize: { width: api.getWidth(), height: api.getHeight() }, seriesModel: seriesModel, coordSys: cartesian, coordSysExtent: [[coordSysRect.x, coordSysRect.x + coordSysRect.width], [coordSysRect.y, coordSysRect.y + coordSysRect.height]], isHorizontal: isHorizontal, valueDim: LAYOUT_ATTRS[+isHorizontal], categoryDim: LAYOUT_ATTRS[1 - +isHorizontal] }; data.diff(oldData).add(function (dataIndex) { if (!data.hasValue(dataIndex)) { return; } var itemModel = getItemModel(data, dataIndex); var symbolMeta = getSymbolMeta(data, dataIndex, itemModel, opt); var bar = createBar(data, opt, symbolMeta); data.setItemGraphicEl(dataIndex, bar); group.add(bar); updateCommon$1(bar, opt, symbolMeta); }).update(function (newIndex, oldIndex) { var bar = oldData.getItemGraphicEl(oldIndex); if (!data.hasValue(newIndex)) { group.remove(bar); return; } var itemModel = getItemModel(data, newIndex); var symbolMeta = getSymbolMeta(data, newIndex, itemModel, opt); var pictorialShapeStr = getShapeStr(data, symbolMeta); if (bar && pictorialShapeStr !== bar.__pictorialShapeStr) { group.remove(bar); data.setItemGraphicEl(newIndex, null); bar = null; } if (bar) { updateBar(bar, opt, symbolMeta); } else { bar = createBar(data, opt, symbolMeta, true); } data.setItemGraphicEl(newIndex, bar); bar.__pictorialSymbolMeta = symbolMeta; // Add back group.add(bar); updateCommon$1(bar, opt, symbolMeta); }).remove(function (dataIndex) { var bar = oldData.getItemGraphicEl(dataIndex); bar && removeBar(oldData, dataIndex, bar.__pictorialSymbolMeta.animationModel, bar); }).execute(); this._data = data; return this.group; }; PictorialBarView.prototype.remove = function (ecModel, api) { var group = this.group; var data = this._data; if (ecModel.get('animation')) { if (data) { data.eachItemGraphicEl(function (bar) { removeBar(data, getECData(bar).dataIndex, ecModel, bar); }); } } else { group.removeAll(); } }; PictorialBarView.type = 'pictorialBar'; return PictorialBarView; }(ChartView); // Set or calculate default value about symbol, and calculate layout info. function getSymbolMeta(data, dataIndex, itemModel, opt) { var layout = data.getItemLayout(dataIndex); var symbolRepeat = itemModel.get('symbolRepeat'); var symbolClip = itemModel.get('symbolClip'); var symbolPosition = itemModel.get('symbolPosition') || 'start'; var symbolRotate = itemModel.get('symbolRotate'); var rotation = (symbolRotate || 0) * Math.PI / 180 || 0; var symbolPatternSize = itemModel.get('symbolPatternSize') || 2; var isAnimationEnabled = itemModel.isAnimationEnabled(); var symbolMeta = { dataIndex: dataIndex, layout: layout, itemModel: itemModel, symbolType: data.getItemVisual(dataIndex, 'symbol') || 'circle', style: data.getItemVisual(dataIndex, 'style'), symbolClip: symbolClip, symbolRepeat: symbolRepeat, symbolRepeatDirection: itemModel.get('symbolRepeatDirection'), symbolPatternSize: symbolPatternSize, rotation: rotation, animationModel: isAnimationEnabled ? itemModel : null, hoverScale: isAnimationEnabled && itemModel.get(['emphasis', 'scale']), z2: itemModel.getShallow('z', true) || 0 }; prepareBarLength(itemModel, symbolRepeat, layout, opt, symbolMeta); prepareSymbolSize(data, dataIndex, layout, symbolRepeat, symbolClip, symbolMeta.boundingLength, symbolMeta.pxSign, symbolPatternSize, opt, symbolMeta); prepareLineWidth(itemModel, symbolMeta.symbolScale, rotation, opt, symbolMeta); var symbolSize = symbolMeta.symbolSize; var symbolOffset = itemModel.get('symbolOffset'); if (isArray(symbolOffset)) { symbolOffset = [parsePercent$1(symbolOffset[0], symbolSize[0]), parsePercent$1(symbolOffset[1], symbolSize[1])]; } prepareLayoutInfo(itemModel, symbolSize, layout, symbolRepeat, symbolClip, symbolOffset, symbolPosition, symbolMeta.valueLineWidth, symbolMeta.boundingLength, symbolMeta.repeatCutLength, opt, symbolMeta); return symbolMeta; } // bar length can be negative. function prepareBarLength(itemModel, symbolRepeat, layout, opt, outputSymbolMeta) { var valueDim = opt.valueDim; var symbolBoundingData = itemModel.get('symbolBoundingData'); var valueAxis = opt.coordSys.getOtherAxis(opt.coordSys.getBaseAxis()); var zeroPx = valueAxis.toGlobalCoord(valueAxis.dataToCoord(0)); var pxSignIdx = 1 - +(layout[valueDim.wh] <= 0); var boundingLength; if (isArray(symbolBoundingData)) { var symbolBoundingExtent = [convertToCoordOnAxis(valueAxis, symbolBoundingData[0]) - zeroPx, convertToCoordOnAxis(valueAxis, symbolBoundingData[1]) - zeroPx]; symbolBoundingExtent[1] < symbolBoundingExtent[0] && symbolBoundingExtent.reverse(); boundingLength = symbolBoundingExtent[pxSignIdx]; } else if (symbolBoundingData != null) { boundingLength = convertToCoordOnAxis(valueAxis, symbolBoundingData) - zeroPx; } else if (symbolRepeat) { boundingLength = opt.coordSysExtent[valueDim.index][pxSignIdx] - zeroPx; } else { boundingLength = layout[valueDim.wh]; } outputSymbolMeta.boundingLength = boundingLength; if (symbolRepeat) { outputSymbolMeta.repeatCutLength = layout[valueDim.wh]; } outputSymbolMeta.pxSign = boundingLength > 0 ? 1 : boundingLength < 0 ? -1 : 0; } function convertToCoordOnAxis(axis, value) { return axis.toGlobalCoord(axis.dataToCoord(axis.scale.parse(value))); } // Support ['100%', '100%'] function prepareSymbolSize(data, dataIndex, layout, symbolRepeat, symbolClip, boundingLength, pxSign, symbolPatternSize, opt, outputSymbolMeta) { var valueDim = opt.valueDim; var categoryDim = opt.categoryDim; var categorySize = Math.abs(layout[categoryDim.wh]); var symbolSize = data.getItemVisual(dataIndex, 'symbolSize'); var parsedSymbolSize; if (isArray(symbolSize)) { parsedSymbolSize = symbolSize.slice(); } else { if (symbolSize == null) { // will parse to number below parsedSymbolSize = ['100%', '100%']; } else { parsedSymbolSize = [symbolSize, symbolSize]; } } // Note: percentage symbolSize (like '100%') do not consider lineWidth, because it is // to complicated to calculate real percent value if considering scaled lineWidth. // So the actual size will bigger than layout size if lineWidth is bigger than zero, // which can be tolerated in pictorial chart. parsedSymbolSize[categoryDim.index] = parsePercent$1(parsedSymbolSize[categoryDim.index], categorySize); parsedSymbolSize[valueDim.index] = parsePercent$1(parsedSymbolSize[valueDim.index], symbolRepeat ? categorySize : Math.abs(boundingLength)); outputSymbolMeta.symbolSize = parsedSymbolSize; // If x or y is less than zero, show reversed shape. var symbolScale = outputSymbolMeta.symbolScale = [parsedSymbolSize[0] / symbolPatternSize, parsedSymbolSize[1] / symbolPatternSize]; // Follow convention, 'right' and 'top' is the normal scale. symbolScale[valueDim.index] *= (opt.isHorizontal ? -1 : 1) * pxSign; } function prepareLineWidth(itemModel, symbolScale, rotation, opt, outputSymbolMeta) { // In symbols are drawn with scale, so do not need to care about the case that width // or height are too small. But symbol use strokeNoScale, where acture lineWidth should // be calculated. var valueLineWidth = itemModel.get(BAR_BORDER_WIDTH_QUERY) || 0; if (valueLineWidth) { pathForLineWidth.attr({ scaleX: symbolScale[0], scaleY: symbolScale[1], rotation: rotation }); pathForLineWidth.updateTransform(); valueLineWidth /= pathForLineWidth.getLineScale(); valueLineWidth *= symbolScale[opt.valueDim.index]; } outputSymbolMeta.valueLineWidth = valueLineWidth; } function prepareLayoutInfo(itemModel, symbolSize, layout, symbolRepeat, symbolClip, symbolOffset, symbolPosition, valueLineWidth, boundingLength, repeatCutLength, opt, outputSymbolMeta) { var categoryDim = opt.categoryDim; var valueDim = opt.valueDim; var pxSign = outputSymbolMeta.pxSign; var unitLength = Math.max(symbolSize[valueDim.index] + valueLineWidth, 0); var pathLen = unitLength; // Note: rotation will not effect the layout of symbols, because user may // want symbols to rotate on its center, which should not be translated // when rotating. if (symbolRepeat) { var absBoundingLength = Math.abs(boundingLength); var symbolMargin = retrieve(itemModel.get('symbolMargin'), '15%') + ''; var hasEndGap = false; if (symbolMargin.lastIndexOf('!') === symbolMargin.length - 1) { hasEndGap = true; symbolMargin = symbolMargin.slice(0, symbolMargin.length - 1); } var symbolMarginNumeric = parsePercent$1(symbolMargin, symbolSize[valueDim.index]); var uLenWithMargin = Math.max(unitLength + symbolMarginNumeric * 2, 0); // When symbol margin is less than 0, margin at both ends will be subtracted // to ensure that all of the symbols will not be overflow the given area. var endFix = hasEndGap ? 0 : symbolMarginNumeric * 2; // Both final repeatTimes and final symbolMarginNumeric area calculated based on // boundingLength. var repeatSpecified = isNumeric(symbolRepeat); var repeatTimes = repeatSpecified ? symbolRepeat : toIntTimes((absBoundingLength + endFix) / uLenWithMargin); // Adjust calculate margin, to ensure each symbol is displayed // entirely in the given layout area. var mDiff = absBoundingLength - repeatTimes * unitLength; symbolMarginNumeric = mDiff / 2 / (hasEndGap ? repeatTimes : repeatTimes - 1); uLenWithMargin = unitLength + symbolMarginNumeric * 2; endFix = hasEndGap ? 0 : symbolMarginNumeric * 2; // Update repeatTimes when not all symbol will be shown. if (!repeatSpecified && symbolRepeat !== 'fixed') { repeatTimes = repeatCutLength ? toIntTimes((Math.abs(repeatCutLength) + endFix) / uLenWithMargin) : 0; } pathLen = repeatTimes * uLenWithMargin - endFix; outputSymbolMeta.repeatTimes = repeatTimes; outputSymbolMeta.symbolMargin = symbolMarginNumeric; } var sizeFix = pxSign * (pathLen / 2); var pathPosition = outputSymbolMeta.pathPosition = []; pathPosition[categoryDim.index] = layout[categoryDim.wh] / 2; pathPosition[valueDim.index] = symbolPosition === 'start' ? sizeFix : symbolPosition === 'end' ? boundingLength - sizeFix : boundingLength / 2; // 'center' if (symbolOffset) { pathPosition[0] += symbolOffset[0]; pathPosition[1] += symbolOffset[1]; } var bundlePosition = outputSymbolMeta.bundlePosition = []; bundlePosition[categoryDim.index] = layout[categoryDim.xy]; bundlePosition[valueDim.index] = layout[valueDim.xy]; var barRectShape = outputSymbolMeta.barRectShape = extend({}, layout); barRectShape[valueDim.wh] = pxSign * Math.max(Math.abs(layout[valueDim.wh]), Math.abs(pathPosition[valueDim.index] + sizeFix)); barRectShape[categoryDim.wh] = layout[categoryDim.wh]; var clipShape = outputSymbolMeta.clipShape = {}; // Consider that symbol may be overflow layout rect. clipShape[categoryDim.xy] = -layout[categoryDim.xy]; clipShape[categoryDim.wh] = opt.ecSize[categoryDim.wh]; clipShape[valueDim.xy] = 0; clipShape[valueDim.wh] = layout[valueDim.wh]; } function createPath(symbolMeta) { var symbolPatternSize = symbolMeta.symbolPatternSize; var path = createSymbol( // Consider texture img, make a big size. symbolMeta.symbolType, -symbolPatternSize / 2, -symbolPatternSize / 2, symbolPatternSize, symbolPatternSize); path.attr({ culling: true }); path.type !== 'image' && path.setStyle({ strokeNoScale: true }); return path; } function createOrUpdateRepeatSymbols(bar, opt, symbolMeta, isUpdate) { var bundle = bar.__pictorialBundle; var symbolSize = symbolMeta.symbolSize; var valueLineWidth = symbolMeta.valueLineWidth; var pathPosition = symbolMeta.pathPosition; var valueDim = opt.valueDim; var repeatTimes = symbolMeta.repeatTimes || 0; var index = 0; var unit = symbolSize[opt.valueDim.index] + valueLineWidth + symbolMeta.symbolMargin * 2; eachPath(bar, function (path) { path.__pictorialAnimationIndex = index; path.__pictorialRepeatTimes = repeatTimes; if (index < repeatTimes) { updateAttr(path, null, makeTarget(index), symbolMeta, isUpdate); } else { updateAttr(path, null, { scaleX: 0, scaleY: 0 }, symbolMeta, isUpdate, function () { bundle.remove(path); }); } // updateHoverAnimation(path, symbolMeta); index++; }); for (; index < repeatTimes; index++) { var path = createPath(symbolMeta); path.__pictorialAnimationIndex = index; path.__pictorialRepeatTimes = repeatTimes; bundle.add(path); var target = makeTarget(index); updateAttr(path, { x: target.x, y: target.y, scaleX: 0, scaleY: 0 }, { scaleX: target.scaleX, scaleY: target.scaleY, rotation: target.rotation }, symbolMeta, isUpdate); } function makeTarget(index) { var position = pathPosition.slice(); // (start && pxSign > 0) || (end && pxSign < 0): i = repeatTimes - index // Otherwise: i = index; var pxSign = symbolMeta.pxSign; var i = index; if (symbolMeta.symbolRepeatDirection === 'start' ? pxSign > 0 : pxSign < 0) { i = repeatTimes - 1 - index; } position[valueDim.index] = unit * (i - repeatTimes / 2 + 0.5) + pathPosition[valueDim.index]; return { x: position[0], y: position[1], scaleX: symbolMeta.symbolScale[0], scaleY: symbolMeta.symbolScale[1], rotation: symbolMeta.rotation }; } } function createOrUpdateSingleSymbol(bar, opt, symbolMeta, isUpdate) { var bundle = bar.__pictorialBundle; var mainPath = bar.__pictorialMainPath; if (!mainPath) { mainPath = bar.__pictorialMainPath = createPath(symbolMeta); bundle.add(mainPath); updateAttr(mainPath, { x: symbolMeta.pathPosition[0], y: symbolMeta.pathPosition[1], scaleX: 0, scaleY: 0, rotation: symbolMeta.rotation }, { scaleX: symbolMeta.symbolScale[0], scaleY: symbolMeta.symbolScale[1] }, symbolMeta, isUpdate); } else { updateAttr(mainPath, null, { x: symbolMeta.pathPosition[0], y: symbolMeta.pathPosition[1], scaleX: symbolMeta.symbolScale[0], scaleY: symbolMeta.symbolScale[1], rotation: symbolMeta.rotation }, symbolMeta, isUpdate); } } // bar rect is used for label. function createOrUpdateBarRect(bar, symbolMeta, isUpdate) { var rectShape = extend({}, symbolMeta.barRectShape); var barRect = bar.__pictorialBarRect; if (!barRect) { barRect = bar.__pictorialBarRect = new Rect({ z2: 2, shape: rectShape, silent: true, style: { stroke: 'transparent', fill: 'transparent', lineWidth: 0 } }); bar.add(barRect); } else { updateAttr(barRect, null, { shape: rectShape }, symbolMeta, isUpdate); } } function createOrUpdateClip(bar, opt, symbolMeta, isUpdate) { // If not clip, symbol will be remove and rebuilt. if (symbolMeta.symbolClip) { var clipPath = bar.__pictorialClipPath; var clipShape = extend({}, symbolMeta.clipShape); var valueDim = opt.valueDim; var animationModel = symbolMeta.animationModel; var dataIndex = symbolMeta.dataIndex; if (clipPath) { updateProps(clipPath, { shape: clipShape }, animationModel, dataIndex); } else { clipShape[valueDim.wh] = 0; clipPath = new Rect({ shape: clipShape }); bar.__pictorialBundle.setClipPath(clipPath); bar.__pictorialClipPath = clipPath; var target = {}; target[valueDim.wh] = symbolMeta.clipShape[valueDim.wh]; graphic[isUpdate ? 'updateProps' : 'initProps'](clipPath, { shape: target }, animationModel, dataIndex); } } } function getItemModel(data, dataIndex) { var itemModel = data.getItemModel(dataIndex); itemModel.getAnimationDelayParams = getAnimationDelayParams; itemModel.isAnimationEnabled = isAnimationEnabled; return itemModel; } function getAnimationDelayParams(path) { // The order is the same as the z-order, see `symbolRepeatDiretion`. return { index: path.__pictorialAnimationIndex, count: path.__pictorialRepeatTimes }; } function isAnimationEnabled() { // `animation` prop can be set on itemModel in pictorial bar chart. return this.parentModel.isAnimationEnabled() && !!this.getShallow('animation'); } function createBar(data, opt, symbolMeta, isUpdate) { // bar is the main element for each data. var bar = new Group(); // bundle is used for location and clip. var bundle = new Group(); bar.add(bundle); bar.__pictorialBundle = bundle; bundle.x = symbolMeta.bundlePosition[0]; bundle.y = symbolMeta.bundlePosition[1]; if (symbolMeta.symbolRepeat) { createOrUpdateRepeatSymbols(bar, opt, symbolMeta); } else { createOrUpdateSingleSymbol(bar, opt, symbolMeta); } createOrUpdateBarRect(bar, symbolMeta, isUpdate); createOrUpdateClip(bar, opt, symbolMeta, isUpdate); bar.__pictorialShapeStr = getShapeStr(data, symbolMeta); bar.__pictorialSymbolMeta = symbolMeta; return bar; } function updateBar(bar, opt, symbolMeta) { var animationModel = symbolMeta.animationModel; var dataIndex = symbolMeta.dataIndex; var bundle = bar.__pictorialBundle; updateProps(bundle, { x: symbolMeta.bundlePosition[0], y: symbolMeta.bundlePosition[1] }, animationModel, dataIndex); if (symbolMeta.symbolRepeat) { createOrUpdateRepeatSymbols(bar, opt, symbolMeta, true); } else { createOrUpdateSingleSymbol(bar, opt, symbolMeta, true); } createOrUpdateBarRect(bar, symbolMeta, true); createOrUpdateClip(bar, opt, symbolMeta, true); } function removeBar(data, dataIndex, animationModel, bar) { // Not show text when animating var labelRect = bar.__pictorialBarRect; labelRect && labelRect.removeTextContent(); var pathes = []; eachPath(bar, function (path) { pathes.push(path); }); bar.__pictorialMainPath && pathes.push(bar.__pictorialMainPath); // I do not find proper remove animation for clip yet. bar.__pictorialClipPath && (animationModel = null); each(pathes, function (path) { removeElement(path, { scaleX: 0, scaleY: 0 }, animationModel, dataIndex, function () { bar.parent && bar.parent.remove(bar); }); }); data.setItemGraphicEl(dataIndex, null); } function getShapeStr(data, symbolMeta) { return [data.getItemVisual(symbolMeta.dataIndex, 'symbol') || 'none', !!symbolMeta.symbolRepeat, !!symbolMeta.symbolClip].join(':'); } function eachPath(bar, cb, context) { // Do not use Group#eachChild, because it do not support remove. each(bar.__pictorialBundle.children(), function (el) { el !== bar.__pictorialBarRect && cb.call(context, el); }); } function updateAttr(el, immediateAttrs, animationAttrs, symbolMeta, isUpdate, cb) { immediateAttrs && el.attr(immediateAttrs); // when symbolCip used, only clip path has init animation, otherwise it would be weird effect. if (symbolMeta.symbolClip && !isUpdate) { animationAttrs && el.attr(animationAttrs); } else { animationAttrs && graphic[isUpdate ? 'updateProps' : 'initProps'](el, animationAttrs, symbolMeta.animationModel, symbolMeta.dataIndex, cb); } } function updateCommon$1(bar, opt, symbolMeta) { var dataIndex = symbolMeta.dataIndex; var itemModel = symbolMeta.itemModel; // Color must be excluded. // Because symbol provide setColor individually to set fill and stroke var emphasisModel = itemModel.getModel('emphasis'); var emphasisStyle = emphasisModel.getModel('itemStyle').getItemStyle(); var blurStyle = itemModel.getModel(['blur', 'itemStyle']).getItemStyle(); var selectStyle = itemModel.getModel(['select', 'itemStyle']).getItemStyle(); var cursorStyle = itemModel.getShallow('cursor'); var focus = emphasisModel.get('focus'); var blurScope = emphasisModel.get('blurScope'); var hoverScale = emphasisModel.get('scale'); eachPath(bar, function (path) { if (path instanceof ZRImage) { var pathStyle = path.style; path.useStyle(extend({ // TODO other properties like dx, dy ? image: pathStyle.image, x: pathStyle.x, y: pathStyle.y, width: pathStyle.width, height: pathStyle.height }, symbolMeta.style)); } else { path.useStyle(symbolMeta.style); } var emphasisState = path.ensureState('emphasis'); emphasisState.style = emphasisStyle; if (hoverScale) { // NOTE: Must after scale is set after updateAttr emphasisState.scaleX = path.scaleX * 1.1; emphasisState.scaleY = path.scaleY * 1.1; } path.ensureState('blur').style = blurStyle; path.ensureState('select').style = selectStyle; cursorStyle && (path.cursor = cursorStyle); path.z2 = symbolMeta.z2; }); var barPositionOutside = opt.valueDim.posDesc[+(symbolMeta.boundingLength > 0)]; var barRect = bar.__pictorialBarRect; setLabelStyle(barRect, getLabelStatesModels(itemModel), { labelFetcher: opt.seriesModel, labelDataIndex: dataIndex, defaultText: getDefaultLabel(opt.seriesModel.getData(), dataIndex), inheritColor: symbolMeta.style.fill, defaultOpacity: symbolMeta.style.opacity, defaultOutsidePosition: barPositionOutside }); enableHoverEmphasis(bar, focus, blurScope); } function toIntTimes(times) { var roundedTimes = Math.round(times); // Escapse accurate error return Math.abs(times - roundedTimes) < 1e-4 ? roundedTimes : Math.ceil(times); } var PictorialBarSeriesModel = /** @class */ function (_super) { __extends(PictorialBarSeriesModel, _super); function PictorialBarSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = PictorialBarSeriesModel.type; _this.hasSymbolVisual = true; _this.defaultSymbol = 'roundRect'; return _this; } PictorialBarSeriesModel.prototype.getInitialData = function (option) { // Disable stack. option.stack = null; return _super.prototype.getInitialData.apply(this, arguments); }; PictorialBarSeriesModel.type = 'series.pictorialBar'; PictorialBarSeriesModel.dependencies = ['grid']; PictorialBarSeriesModel.defaultOption = inheritDefaultOption(BaseBarSeriesModel.defaultOption, { symbol: 'circle', symbolSize: null, symbolRotate: null, symbolPosition: null, symbolOffset: null, symbolMargin: null, symbolRepeat: false, symbolRepeatDirection: 'end', symbolClip: false, symbolBoundingData: null, symbolPatternSize: 400, barGap: '-100%', // z can be set in data item, which is z2 actually. // Disable progressive progressive: 0, emphasis: { // By default pictorialBar do not hover scale. Hover scale is not suitable // for the case that both has foreground and background. scale: false }, select: { itemStyle: { borderColor: '#212121' } } }); return PictorialBarSeriesModel; }(BaseBarSeriesModel); function install$o(registers) { registers.registerChartView(PictorialBarView); registers.registerSeriesModel(PictorialBarSeriesModel); registers.registerLayout(curry(layout, 'pictorialBar')); } var ThemeRiverView = /** @class */ function (_super) { __extends(ThemeRiverView, _super); function ThemeRiverView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ThemeRiverView.type; _this._layers = []; return _this; } ThemeRiverView.prototype.render = function (seriesModel, ecModel, api) { var data = seriesModel.getData(); var self = this; var group = this.group; var layersSeries = seriesModel.getLayerSeries(); var layoutInfo = data.getLayout('layoutInfo'); var rect = layoutInfo.rect; var boundaryGap = layoutInfo.boundaryGap; group.x = 0; group.y = rect.y + boundaryGap[0]; function keyGetter(item) { return item.name; } var dataDiffer = new DataDiffer(this._layersSeries || [], layersSeries, keyGetter, keyGetter); var newLayersGroups = []; dataDiffer.add(bind(process, this, 'add')).update(bind(process, this, 'update')).remove(bind(process, this, 'remove')).execute(); function process(status, idx, oldIdx) { var oldLayersGroups = self._layers; if (status === 'remove') { group.remove(oldLayersGroups[idx]); return; } var points0 = []; var points1 = []; var style; var indices = layersSeries[idx].indices; var j = 0; for (; j < indices.length; j++) { var layout = data.getItemLayout(indices[j]); var x = layout.x; var y0 = layout.y0; var y = layout.y; points0.push(x, y0); points1.push(x, y0 + y); style = data.getItemVisual(indices[j], 'style'); } var polygon; var textLayout = data.getItemLayout(indices[0]); var labelModel = seriesModel.getModel('label'); var margin = labelModel.get('margin'); var emphasisModel = seriesModel.getModel('emphasis'); if (status === 'add') { var layerGroup = newLayersGroups[idx] = new Group(); polygon = new ECPolygon({ shape: { points: points0, stackedOnPoints: points1, smooth: 0.4, stackedOnSmooth: 0.4, smoothConstraint: false }, z2: 0 }); layerGroup.add(polygon); group.add(layerGroup); if (seriesModel.isAnimationEnabled()) { polygon.setClipPath(createGridClipShape$2(polygon.getBoundingRect(), seriesModel, function () { polygon.removeClipPath(); })); } } else { var layerGroup = oldLayersGroups[oldIdx]; polygon = layerGroup.childAt(0); group.add(layerGroup); newLayersGroups[idx] = layerGroup; updateProps(polygon, { shape: { points: points0, stackedOnPoints: points1 } }, seriesModel); } setLabelStyle(polygon, getLabelStatesModels(seriesModel), { labelDataIndex: indices[j - 1], defaultText: data.getName(indices[j - 1]), inheritColor: style.fill }, { normal: { verticalAlign: 'middle' // align: 'right' } }); polygon.setTextConfig({ position: null, local: true }); var labelEl = polygon.getTextContent(); // TODO More label position options. if (labelEl) { labelEl.x = textLayout.x - margin; labelEl.y = textLayout.y0 + textLayout.y / 2; } polygon.useStyle(style); data.setItemGraphicEl(idx, polygon); setStatesStylesFromModel(polygon, seriesModel); enableHoverEmphasis(polygon, emphasisModel.get('focus'), emphasisModel.get('blurScope')); } this._layersSeries = layersSeries; this._layers = newLayersGroups; }; ThemeRiverView.type = 'themeRiver'; return ThemeRiverView; }(ChartView); function createGridClipShape$2(rect, seriesModel, cb) { var rectEl = new Rect({ shape: { x: rect.x - 10, y: rect.y - 10, width: 0, height: rect.height + 20 } }); initProps(rectEl, { shape: { x: rect.x - 50, width: rect.width + 100, height: rect.height + 20 } }, seriesModel, cb); return rectEl; } var DATA_NAME_INDEX = 2; var ThemeRiverSeriesModel = /** @class */ function (_super) { __extends(ThemeRiverSeriesModel, _super); function ThemeRiverSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ThemeRiverSeriesModel.type; _this.useColorPaletteOnData = true; return _this; } /** * @override */ ThemeRiverSeriesModel.prototype.init = function (option) { // eslint-disable-next-line _super.prototype.init.apply(this, arguments); // Put this function here is for the sake of consistency of code style. // Enable legend selection for each data item // Use a function instead of direct access because data reference may changed this.legendVisualProvider = new LegendVisualProvider(bind(this.getData, this), bind(this.getRawData, this)); }; /** * If there is no value of a certain point in the time for some event,set it value to 0. * * @param {Array} data initial data in the option * @return {Array} */ ThemeRiverSeriesModel.prototype.fixData = function (data) { var rawDataLength = data.length; /** * Make sure every layer data get the same keys. * The value index tells which layer has visited. * { * 2014/01/01: -1 * } */ var timeValueKeys = {}; // grouped data by name var groupResult = groupData(data, function (item) { if (!timeValueKeys.hasOwnProperty(item[0] + '')) { timeValueKeys[item[0] + ''] = -1; } return item[2]; }); var layerData = []; groupResult.buckets.each(function (items, key) { layerData.push({ name: key, dataList: items }); }); var layerNum = layerData.length; for (var k = 0; k < layerNum; ++k) { var name_1 = layerData[k].name; for (var j = 0; j < layerData[k].dataList.length; ++j) { var timeValue = layerData[k].dataList[j][0] + ''; timeValueKeys[timeValue] = k; } for (var timeValue in timeValueKeys) { if (timeValueKeys.hasOwnProperty(timeValue) && timeValueKeys[timeValue] !== k) { timeValueKeys[timeValue] = k; data[rawDataLength] = [timeValue, 0, name_1]; rawDataLength++; } } } return data; }; /** * @override * @param option the initial option that user gived * @param ecModel the model object for themeRiver option */ ThemeRiverSeriesModel.prototype.getInitialData = function (option, ecModel) { var singleAxisModel = this.getReferringComponents('singleAxis', SINGLE_REFERRING).models[0]; var axisType = singleAxisModel.get('type'); // filter the data item with the value of label is undefined var filterData = filter(option.data, function (dataItem) { return dataItem[2] !== undefined; }); // ??? TODO design a stage to transfer data for themeRiver and lines? var data = this.fixData(filterData || []); var nameList = []; var nameMap = this.nameMap = createHashMap(); var count = 0; for (var i = 0; i < data.length; ++i) { nameList.push(data[i][DATA_NAME_INDEX]); if (!nameMap.get(data[i][DATA_NAME_INDEX])) { nameMap.set(data[i][DATA_NAME_INDEX], count); count++; } } var dimensionsInfo = createDimensions(data, { coordDimensions: ['single'], dimensionsDefine: [{ name: 'time', type: getDimensionTypeByAxis(axisType) }, { name: 'value', type: 'float' }, { name: 'name', type: 'ordinal' }], encodeDefine: { single: 0, value: 1, itemName: 2 } }); var list = new List(dimensionsInfo, this); list.initData(data); return list; }; /** * The raw data is divided into multiple layers and each layer * has same name. */ ThemeRiverSeriesModel.prototype.getLayerSeries = function () { var data = this.getData(); var lenCount = data.count(); var indexArr = []; for (var i = 0; i < lenCount; ++i) { indexArr[i] = i; } var timeDim = data.mapDimension('single'); // data group by name var groupResult = groupData(indexArr, function (index) { return data.get('name', index); }); var layerSeries = []; groupResult.buckets.each(function (items, key) { items.sort(function (index1, index2) { return data.get(timeDim, index1) - data.get(timeDim, index2); }); layerSeries.push({ name: key, indices: items }); }); return layerSeries; }; /** * Get data indices for show tooltip content */ ThemeRiverSeriesModel.prototype.getAxisTooltipData = function (dim, value, baseAxis) { if (!isArray(dim)) { dim = dim ? [dim] : []; } var data = this.getData(); var layerSeries = this.getLayerSeries(); var indices = []; var layerNum = layerSeries.length; var nestestValue; for (var i = 0; i < layerNum; ++i) { var minDist = Number.MAX_VALUE; var nearestIdx = -1; var pointNum = layerSeries[i].indices.length; for (var j = 0; j < pointNum; ++j) { var theValue = data.get(dim[0], layerSeries[i].indices[j]); var dist = Math.abs(theValue - value); if (dist <= minDist) { nestestValue = theValue; minDist = dist; nearestIdx = layerSeries[i].indices[j]; } } indices.push(nearestIdx); } return { dataIndices: indices, nestestValue: nestestValue }; }; ThemeRiverSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { var data = this.getData(); var name = data.getName(dataIndex); var value = data.get(data.mapDimension('value'), dataIndex); return createTooltipMarkup('nameValue', { name: name, value: value }); }; ThemeRiverSeriesModel.type = 'series.themeRiver'; ThemeRiverSeriesModel.dependencies = ['singleAxis']; ThemeRiverSeriesModel.defaultOption = { zlevel: 0, z: 2, coordinateSystem: 'singleAxis', // gap in axis's orthogonal orientation boundaryGap: ['10%', '10%'], // legendHoverLink: true, singleAxisIndex: 0, animationEasing: 'linear', label: { margin: 4, show: true, position: 'left', fontSize: 11 }, emphasis: { label: { show: true } } }; return ThemeRiverSeriesModel; }(SeriesModel); function themeRiverLayout(ecModel, api) { ecModel.eachSeriesByType('themeRiver', function (seriesModel) { var data = seriesModel.getData(); var single = seriesModel.coordinateSystem; var layoutInfo = {}; // use the axis boundingRect for view var rect = single.getRect(); layoutInfo.rect = rect; var boundaryGap = seriesModel.get('boundaryGap'); var axis = single.getAxis(); layoutInfo.boundaryGap = boundaryGap; if (axis.orient === 'horizontal') { boundaryGap[0] = parsePercent$1(boundaryGap[0], rect.height); boundaryGap[1] = parsePercent$1(boundaryGap[1], rect.height); var height = rect.height - boundaryGap[0] - boundaryGap[1]; doThemeRiverLayout(data, seriesModel, height); } else { boundaryGap[0] = parsePercent$1(boundaryGap[0], rect.width); boundaryGap[1] = parsePercent$1(boundaryGap[1], rect.width); var width = rect.width - boundaryGap[0] - boundaryGap[1]; doThemeRiverLayout(data, seriesModel, width); } data.setLayout('layoutInfo', layoutInfo); }); } /** * The layout information about themeriver * * @param data data in the series * @param seriesModel the model object of themeRiver series * @param height value used to compute every series height */ function doThemeRiverLayout(data, seriesModel, height) { if (!data.count()) { return; } var coordSys = seriesModel.coordinateSystem; // the data in each layer are organized into a series. var layerSeries = seriesModel.getLayerSeries(); // the points in each layer. var timeDim = data.mapDimension('single'); var valueDim = data.mapDimension('value'); var layerPoints = map(layerSeries, function (singleLayer) { return map(singleLayer.indices, function (idx) { var pt = coordSys.dataToPoint(data.get(timeDim, idx)); pt[1] = data.get(valueDim, idx); return pt; }); }); var base = computeBaseline(layerPoints); var baseLine = base.y0; var ky = height / base.max; // set layout information for each item. var n = layerSeries.length; var m = layerSeries[0].indices.length; var baseY0; for (var j = 0; j < m; ++j) { baseY0 = baseLine[j] * ky; data.setItemLayout(layerSeries[0].indices[j], { layerIndex: 0, x: layerPoints[0][j][0], y0: baseY0, y: layerPoints[0][j][1] * ky }); for (var i = 1; i < n; ++i) { baseY0 += layerPoints[i - 1][j][1] * ky; data.setItemLayout(layerSeries[i].indices[j], { layerIndex: i, x: layerPoints[i][j][0], y0: baseY0, y: layerPoints[i][j][1] * ky }); } } } /** * Compute the baseLine of the rawdata * Inspired by Lee Byron's paper Stacked Graphs - Geometry & Aesthetics * * @param data the points in each layer */ function computeBaseline(data) { var layerNum = data.length; var pointNum = data[0].length; var sums = []; var y0 = []; var max = 0; for (var i = 0; i < pointNum; ++i) { var temp = 0; for (var j = 0; j < layerNum; ++j) { temp += data[j][i][1]; } if (temp > max) { max = temp; } sums.push(temp); } for (var k = 0; k < pointNum; ++k) { y0[k] = (max - sums[k]) / 2; } max = 0; for (var l = 0; l < pointNum; ++l) { var sum = sums[l] + y0[l]; if (sum > max) { max = sum; } } return { y0: y0, max: max }; } function install$p(registers) { registers.registerChartView(ThemeRiverView); registers.registerSeriesModel(ThemeRiverSeriesModel); registers.registerLayout(themeRiverLayout); registers.registerProcessor(dataFilter('themeRiver')); } var DEFAULT_SECTOR_Z = 2; var DEFAULT_TEXT_Z = 4; /** * Sunburstce of Sunburst including Sector, Label, LabelLine */ var SunburstPiece = /** @class */ function (_super) { __extends(SunburstPiece, _super); function SunburstPiece(node, seriesModel, ecModel, api) { var _this = _super.call(this) || this; _this.z2 = DEFAULT_SECTOR_Z; _this.textConfig = { inside: true }; getECData(_this).seriesIndex = seriesModel.seriesIndex; var text = new ZRText({ z2: DEFAULT_TEXT_Z, silent: node.getModel().get(['label', 'silent']) }); _this.setTextContent(text); _this.updateData(true, node, seriesModel, ecModel, api); return _this; } SunburstPiece.prototype.updateData = function (firstCreate, node, // state: 'emphasis' | 'normal' | 'highlight' | 'downplay', seriesModel, ecModel, api) { this.node = node; node.piece = this; seriesModel = seriesModel || this._seriesModel; ecModel = ecModel || this._ecModel; var sector = this; getECData(sector).dataIndex = node.dataIndex; var itemModel = node.getModel(); var emphasisModel = itemModel.getModel('emphasis'); var layout = node.getLayout(); var sectorShape = extend({}, layout); sectorShape.label = null; var normalStyle = node.getVisual('style'); normalStyle.lineJoin = 'bevel'; var decal = node.getVisual('decal'); if (decal) { normalStyle.decal = createOrUpdatePatternFromDecal(decal, api); } var cornerRadius = getSectorCornerRadius(itemModel.getModel('itemStyle'), sectorShape); extend(sectorShape, cornerRadius); each(SPECIAL_STATES, function (stateName) { var state = sector.ensureState(stateName); var itemStyleModel = itemModel.getModel([stateName, 'itemStyle']); state.style = itemStyleModel.getItemStyle(); // border radius var cornerRadius = getSectorCornerRadius(itemStyleModel, sectorShape); if (cornerRadius) { state.shape = cornerRadius; } }); if (firstCreate) { sector.setShape(sectorShape); sector.shape.r = layout.r0; updateProps(sector, { shape: { r: layout.r } }, seriesModel, node.dataIndex); } else { // Disable animation for gradient since no interpolation method // is supported for gradient updateProps(sector, { shape: sectorShape }, seriesModel); } sector.useStyle(normalStyle); this._updateLabel(seriesModel); var cursorStyle = itemModel.getShallow('cursor'); cursorStyle && sector.attr('cursor', cursorStyle); this._seriesModel = seriesModel || this._seriesModel; this._ecModel = ecModel || this._ecModel; var focus = emphasisModel.get('focus'); var focusOrIndices = focus === 'ancestor' ? node.getAncestorsIndices() : focus === 'descendant' ? node.getDescendantIndices() : focus; enableHoverEmphasis(this, focusOrIndices, emphasisModel.get('blurScope')); }; SunburstPiece.prototype._updateLabel = function (seriesModel) { var _this = this; var itemModel = this.node.getModel(); var normalLabelModel = itemModel.getModel('label'); var layout = this.node.getLayout(); var angle = layout.endAngle - layout.startAngle; var midAngle = (layout.startAngle + layout.endAngle) / 2; var dx = Math.cos(midAngle); var dy = Math.sin(midAngle); var sector = this; var label = sector.getTextContent(); var dataIndex = this.node.dataIndex; var labelMinAngle = normalLabelModel.get('minAngle') / 180 * Math.PI; var isNormalShown = normalLabelModel.get('show') && !(labelMinAngle != null && Math.abs(angle) < labelMinAngle); label.ignore = !isNormalShown; // TODO use setLabelStyle each(DISPLAY_STATES, function (stateName) { var labelStateModel = stateName === 'normal' ? itemModel.getModel('label') : itemModel.getModel([stateName, 'label']); var isNormal = stateName === 'normal'; var state = isNormal ? label : label.ensureState(stateName); var text = seriesModel.getFormattedLabel(dataIndex, stateName); if (isNormal) { text = text || _this.node.name; } state.style = createTextStyle(labelStateModel, {}, null, stateName !== 'normal', true); if (text) { state.style.text = text; } // Not displaying text when angle is too small var isShown = labelStateModel.get('show'); if (isShown != null && !isNormal) { state.ignore = !isShown; } var labelPosition = getLabelAttr(labelStateModel, 'position'); var sectorState = isNormal ? sector : sector.states[stateName]; var labelColor = sectorState.style.fill; sectorState.textConfig = { outsideFill: labelStateModel.get('color') === 'inherit' ? labelColor : null, inside: labelPosition !== 'outside' }; var r; var labelPadding = getLabelAttr(labelStateModel, 'distance') || 0; var textAlign = getLabelAttr(labelStateModel, 'align'); if (labelPosition === 'outside') { r = layout.r + labelPadding; textAlign = midAngle > Math.PI / 2 ? 'right' : 'left'; } else { if (!textAlign || textAlign === 'center') { r = (layout.r + layout.r0) / 2; textAlign = 'center'; } else if (textAlign === 'left') { r = layout.r0 + labelPadding; if (midAngle > Math.PI / 2) { textAlign = 'right'; } } else if (textAlign === 'right') { r = layout.r - labelPadding; if (midAngle > Math.PI / 2) { textAlign = 'left'; } } } state.style.align = textAlign; state.style.verticalAlign = getLabelAttr(labelStateModel, 'verticalAlign') || 'middle'; state.x = r * dx + layout.cx; state.y = r * dy + layout.cy; var rotateType = getLabelAttr(labelStateModel, 'rotate'); var rotate = 0; if (rotateType === 'radial') { rotate = -midAngle; if (rotate < -Math.PI / 2) { rotate += Math.PI; } } else if (rotateType === 'tangential') { rotate = Math.PI / 2 - midAngle; if (rotate > Math.PI / 2) { rotate -= Math.PI; } else if (rotate < -Math.PI / 2) { rotate += Math.PI; } } else if (typeof rotateType === 'number') { rotate = rotateType * Math.PI / 180; } state.rotation = rotate; }); function getLabelAttr(model, name) { var stateAttr = model.get(name); if (stateAttr == null) { return normalLabelModel.get(name); } return stateAttr; } label.dirtyStyle(); }; return SunburstPiece; }(Sector); var ROOT_TO_NODE_ACTION = 'sunburstRootToNode'; var HIGHLIGHT_ACTION = 'sunburstHighlight'; var UNHIGHLIGHT_ACTION = 'sunburstUnhighlight'; function installSunburstAction(registers) { registers.registerAction({ type: ROOT_TO_NODE_ACTION, update: 'updateView' }, function (payload, ecModel) { ecModel.eachComponent({ mainType: 'series', subType: 'sunburst', query: payload }, handleRootToNode); function handleRootToNode(model, index) { var targetInfo = retrieveTargetInfo(payload, [ROOT_TO_NODE_ACTION], model); if (targetInfo) { var originViewRoot = model.getViewRoot(); if (originViewRoot) { payload.direction = aboveViewRoot(originViewRoot, targetInfo.node) ? 'rollUp' : 'drillDown'; } model.resetViewRoot(targetInfo.node); } } }); registers.registerAction({ type: HIGHLIGHT_ACTION, update: 'none' }, function (payload, ecModel, api) { // Clone payload = extend({}, payload); ecModel.eachComponent({ mainType: 'series', subType: 'sunburst', query: payload }, handleHighlight); function handleHighlight(model) { var targetInfo = retrieveTargetInfo(payload, [HIGHLIGHT_ACTION], model); if (targetInfo) { payload.dataIndex = targetInfo.node.dataIndex; } } if ("development" !== 'production') { deprecateReplaceLog('highlight', 'sunburstHighlight'); } // Fast forward action api.dispatchAction(extend(payload, { type: 'highlight' })); }); registers.registerAction({ type: UNHIGHLIGHT_ACTION, update: 'updateView' }, function (payload, ecModel, api) { payload = extend({}, payload); if ("development" !== 'production') { deprecateReplaceLog('downplay', 'sunburstUnhighlight'); } api.dispatchAction(extend(payload, { type: 'downplay' })); }); } var SunburstView = /** @class */ function (_super) { __extends(SunburstView, _super); function SunburstView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SunburstView.type; return _this; } SunburstView.prototype.render = function (seriesModel, ecModel, api, // @ts-ignore payload) { var self = this; this.seriesModel = seriesModel; this.api = api; this.ecModel = ecModel; var data = seriesModel.getData(); var virtualRoot = data.tree.root; var newRoot = seriesModel.getViewRoot(); var group = this.group; var renderLabelForZeroData = seriesModel.get('renderLabelForZeroData'); var newChildren = []; newRoot.eachNode(function (node) { newChildren.push(node); }); var oldChildren = this._oldChildren || []; dualTravel(newChildren, oldChildren); renderRollUp(virtualRoot, newRoot); this._initEvents(); this._oldChildren = newChildren; function dualTravel(newChildren, oldChildren) { if (newChildren.length === 0 && oldChildren.length === 0) { return; } new DataDiffer(oldChildren, newChildren, getKey, getKey).add(processNode).update(processNode).remove(curry(processNode, null)).execute(); function getKey(node) { return node.getId(); } function processNode(newIdx, oldIdx) { var newNode = newIdx == null ? null : newChildren[newIdx]; var oldNode = oldIdx == null ? null : oldChildren[oldIdx]; doRenderNode(newNode, oldNode); } } function doRenderNode(newNode, oldNode) { if (!renderLabelForZeroData && newNode && !newNode.getValue()) { // Not render data with value 0 newNode = null; } if (newNode !== virtualRoot && oldNode !== virtualRoot) { if (oldNode && oldNode.piece) { if (newNode) { // Update oldNode.piece.updateData(false, newNode, seriesModel, ecModel, api); // For tooltip data.setItemGraphicEl(newNode.dataIndex, oldNode.piece); } else { // Remove removeNode(oldNode); } } else if (newNode) { // Add var piece = new SunburstPiece(newNode, seriesModel, ecModel, api); group.add(piece); // For tooltip data.setItemGraphicEl(newNode.dataIndex, piece); } } } function removeNode(node) { if (!node) { return; } if (node.piece) { group.remove(node.piece); node.piece = null; } } function renderRollUp(virtualRoot, viewRoot) { if (viewRoot.depth > 0) { // Render if (self.virtualPiece) { // Update self.virtualPiece.updateData(false, virtualRoot, seriesModel, ecModel, api); } else { // Add self.virtualPiece = new SunburstPiece(virtualRoot, seriesModel, ecModel, api); group.add(self.virtualPiece); } // TODO event scope viewRoot.piece.off('click'); self.virtualPiece.on('click', function (e) { self._rootToNode(viewRoot.parentNode); }); } else if (self.virtualPiece) { // Remove group.remove(self.virtualPiece); self.virtualPiece = null; } } }; /** * @private */ SunburstView.prototype._initEvents = function () { var _this = this; this.group.off('click'); this.group.on('click', function (e) { var targetFound = false; var viewRoot = _this.seriesModel.getViewRoot(); viewRoot.eachNode(function (node) { if (!targetFound && node.piece && node.piece === e.target) { var nodeClick = node.getModel().get('nodeClick'); if (nodeClick === 'rootToNode') { _this._rootToNode(node); } else if (nodeClick === 'link') { var itemModel = node.getModel(); var link = itemModel.get('link'); if (link) { var linkTarget = itemModel.get('target', true) || '_blank'; windowOpen(link, linkTarget); } } targetFound = true; } }); }); }; /** * @private */ SunburstView.prototype._rootToNode = function (node) { if (node !== this.seriesModel.getViewRoot()) { this.api.dispatchAction({ type: ROOT_TO_NODE_ACTION, from: this.uid, seriesId: this.seriesModel.id, targetNode: node }); } }; /** * @implement */ SunburstView.prototype.containPoint = function (point, seriesModel) { var treeRoot = seriesModel.getData(); var itemLayout = treeRoot.getItemLayout(0); if (itemLayout) { var dx = point[0] - itemLayout.cx; var dy = point[1] - itemLayout.cy; var radius = Math.sqrt(dx * dx + dy * dy); return radius <= itemLayout.r && radius >= itemLayout.r0; } }; SunburstView.type = 'sunburst'; return SunburstView; }(ChartView); var SunburstSeriesModel = /** @class */ function (_super) { __extends(SunburstSeriesModel, _super); function SunburstSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SunburstSeriesModel.type; _this.ignoreStyleOnData = true; return _this; } SunburstSeriesModel.prototype.getInitialData = function (option, ecModel) { // Create a virtual root. var root = { name: option.name, children: option.data }; completeTreeValue$1(root); var levelModels = map(option.levels || [], function (levelDefine) { return new Model(levelDefine, this, ecModel); }, this); // Make sure always a new tree is created when setOption, // in TreemapView, we check whether oldTree === newTree // to choose mappings approach among old shapes and new shapes. var tree = Tree.createTree(root, this, beforeLink); function beforeLink(nodeData) { nodeData.wrapMethod('getItemModel', function (model, idx) { var node = tree.getNodeByDataIndex(idx); var levelModel = levelModels[node.depth]; levelModel && (model.parentModel = levelModel); return model; }); } return tree.data; }; SunburstSeriesModel.prototype.optionUpdated = function () { this.resetViewRoot(); }; /* * @override */ SunburstSeriesModel.prototype.getDataParams = function (dataIndex) { var params = _super.prototype.getDataParams.apply(this, arguments); var node = this.getData().tree.getNodeByDataIndex(dataIndex); params.treePathInfo = wrapTreePathInfo(node, this); return params; }; SunburstSeriesModel.prototype.getViewRoot = function () { return this._viewRoot; }; SunburstSeriesModel.prototype.resetViewRoot = function (viewRoot) { viewRoot ? this._viewRoot = viewRoot : viewRoot = this._viewRoot; var root = this.getRawData().tree.root; if (!viewRoot || viewRoot !== root && !root.contains(viewRoot)) { this._viewRoot = root; } }; SunburstSeriesModel.prototype.enableAriaDecal = function () { enableAriaDecalForTree(this); }; SunburstSeriesModel.type = 'series.sunburst'; SunburstSeriesModel.defaultOption = { zlevel: 0, z: 2, // 默认全局居中 center: ['50%', '50%'], radius: [0, '75%'], // 默认顺时针 clockwise: true, startAngle: 90, // 最小角度改为0 minAngle: 0, // If still show when all data zero. stillShowZeroSum: true, // 'rootToNode', 'link', or false nodeClick: 'rootToNode', renderLabelForZeroData: false, label: { // could be: 'radial', 'tangential', or 'none' rotate: 'radial', show: true, opacity: 1, // 'left' is for inner side of inside, and 'right' is for outter // side for inside align: 'center', position: 'inside', distance: 5, silent: true }, itemStyle: { borderWidth: 1, borderColor: 'white', borderType: 'solid', shadowBlur: 0, shadowColor: 'rgba(0, 0, 0, 0.2)', shadowOffsetX: 0, shadowOffsetY: 0, opacity: 1 }, emphasis: { focus: 'descendant' }, blur: { itemStyle: { opacity: 0.2 }, label: { opacity: 0.1 } }, // Animation type canbe expansion, scale animationType: 'expansion', animationDuration: 1000, animationDurationUpdate: 500, data: [], levels: [], /** * Sort order. * * Valid values: 'desc', 'asc', null, or callback function. * 'desc' and 'asc' for descend and ascendant order; * null for not sorting; * example of callback function: * function(nodeA, nodeB) { * return nodeA.getValue() - nodeB.getValue(); * } */ sort: 'desc' }; return SunburstSeriesModel; }(SeriesModel); function completeTreeValue$1(dataNode) { // Postorder travel tree. // If value of none-leaf node is not set, // calculate it by suming up the value of all children. var sum = 0; each(dataNode.children, function (child) { completeTreeValue$1(child); var childValue = child.value; // TODO First value of array must be a number isArray(childValue) && (childValue = childValue[0]); sum += childValue; }); var thisValue = dataNode.value; if (isArray(thisValue)) { thisValue = thisValue[0]; } if (thisValue == null || isNaN(thisValue)) { thisValue = sum; } // Value should not less than 0. if (thisValue < 0) { thisValue = 0; } isArray(dataNode.value) ? dataNode.value[0] = thisValue : dataNode.value = thisValue; } var RADIAN$2 = Math.PI / 180; function sunburstLayout(seriesType, ecModel, api) { ecModel.eachSeriesByType(seriesType, function (seriesModel) { var center = seriesModel.get('center'); var radius = seriesModel.get('radius'); if (!isArray(radius)) { radius = [0, radius]; } if (!isArray(center)) { center = [center, center]; } var width = api.getWidth(); var height = api.getHeight(); var size = Math.min(width, height); var cx = parsePercent$1(center[0], width); var cy = parsePercent$1(center[1], height); var r0 = parsePercent$1(radius[0], size / 2); var r = parsePercent$1(radius[1], size / 2); var startAngle = -seriesModel.get('startAngle') * RADIAN$2; var minAngle = seriesModel.get('minAngle') * RADIAN$2; var virtualRoot = seriesModel.getData().tree.root; var treeRoot = seriesModel.getViewRoot(); var rootDepth = treeRoot.depth; var sort = seriesModel.get('sort'); if (sort != null) { initChildren$1(treeRoot, sort); } var validDataCount = 0; each(treeRoot.children, function (child) { !isNaN(child.getValue()) && validDataCount++; }); var sum = treeRoot.getValue(); // Sum may be 0 var unitRadian = Math.PI / (sum || validDataCount) * 2; var renderRollupNode = treeRoot.depth > 0; var levels = treeRoot.height - (renderRollupNode ? -1 : 1); var rPerLevel = (r - r0) / (levels || 1); var clockwise = seriesModel.get('clockwise'); var stillShowZeroSum = seriesModel.get('stillShowZeroSum'); // In the case some sector angle is smaller than minAngle // let restAngle = PI2; // let valueSumLargerThanMinAngle = 0; var dir = clockwise ? 1 : -1; /** * Render a tree * @return increased angle */ var renderNode = function (node, startAngle) { if (!node) { return; } var endAngle = startAngle; // Render self if (node !== virtualRoot) { // Tree node is virtual, so it doesn't need to be drawn var value = node.getValue(); var angle = sum === 0 && stillShowZeroSum ? unitRadian : value * unitRadian; if (angle < minAngle) { angle = minAngle; // restAngle -= minAngle; } // else { // valueSumLargerThanMinAngle += value; // } endAngle = startAngle + dir * angle; var depth = node.depth - rootDepth - (renderRollupNode ? -1 : 1); var rStart = r0 + rPerLevel * depth; var rEnd = r0 + rPerLevel * (depth + 1); var itemModel = node.getModel(); // @ts-ignore. TODO this is not provided to developer yet. Rename it. if (itemModel.get('r0') != null) { // @ts-ignore rStart = parsePercent$1(itemModel.get('r0'), size / 2); } // @ts-ignore if (itemModel.get('r') != null) { // @ts-ignore rEnd = parsePercent$1(itemModel.get('r'), size / 2); } node.setLayout({ angle: angle, startAngle: startAngle, endAngle: endAngle, clockwise: clockwise, cx: cx, cy: cy, r0: rStart, r: rEnd }); } // Render children if (node.children && node.children.length) { // currentAngle = startAngle; var siblingAngle_1 = 0; each(node.children, function (node) { siblingAngle_1 += renderNode(node, startAngle + siblingAngle_1); }); } return endAngle - startAngle; }; // Virtual root node for roll up if (renderRollupNode) { var rStart = r0; var rEnd = r0 + rPerLevel; var angle = Math.PI * 2; virtualRoot.setLayout({ angle: angle, startAngle: startAngle, endAngle: startAngle + angle, clockwise: clockwise, cx: cx, cy: cy, r0: rStart, r: rEnd }); } renderNode(treeRoot, startAngle); }); } /** * Init node children by order and update visual */ function initChildren$1(node, sortOrder) { var children = node.children || []; node.children = sort$2(children, sortOrder); // Init children recursively if (children.length) { each(node.children, function (child) { initChildren$1(child, sortOrder); }); } } /** * Sort children nodes * * @param {TreeNode[]} children children of node to be sorted * @param {string | function | null} sort sort method * See SunburstSeries.js for details. */ function sort$2(children, sortOrder) { if (typeof sortOrder === 'function') { var sortTargets = map(children, function (child, idx) { var value = child.getValue(); return { params: { depth: child.depth, height: child.height, dataIndex: child.dataIndex, getValue: function () { return value; } }, index: idx }; }); sortTargets.sort(function (a, b) { return sortOrder(a.params, b.params); }); return map(sortTargets, function (target) { return children[target.index]; }); } else { var isAsc_1 = sortOrder === 'asc'; return children.sort(function (a, b) { var diff = (a.getValue() - b.getValue()) * (isAsc_1 ? 1 : -1); return diff === 0 ? (a.dataIndex - b.dataIndex) * (isAsc_1 ? -1 : 1) : diff; }); } } function sunburstVisual(ecModel) { var paletteScope = {}; // Default color strategy function pickColor(node, seriesModel, treeHeight) { // Choose color from palette based on the first level. var current = node; while (current && current.depth > 1) { current = current.parentNode; } var color = seriesModel.getColorFromPalette(current.name || current.dataIndex + '', paletteScope); if (node.depth > 1 && typeof color === 'string') { // Lighter on the deeper level. color = lift(color, (node.depth - 1) / (treeHeight - 1) * 0.5); } return color; } ecModel.eachSeriesByType('sunburst', function (seriesModel) { var data = seriesModel.getData(); var tree = data.tree; tree.eachNode(function (node) { var model = node.getModel(); var style = model.getModel('itemStyle').getItemStyle(); if (!style.fill) { style.fill = pickColor(node, seriesModel, tree.root.height); } var existsStyle = data.ensureUniqueItemVisual(node.dataIndex, 'style'); extend(existsStyle, style); }); }); } function install$q(registers) { registers.registerChartView(SunburstView); registers.registerSeriesModel(SunburstSeriesModel); registers.registerLayout(curry(sunburstLayout, 'sunburst')); registers.registerProcessor(curry(dataFilter, 'sunburst')); registers.registerVisual(sunburstVisual); installSunburstAction(registers); } function dataToCoordSize(dataSize, dataItem) { // dataItem is necessary in log axis. dataItem = dataItem || [0, 0]; return map(['x', 'y'], function (dim, dimIdx) { var axis = this.getAxis(dim); var val = dataItem[dimIdx]; var halfSize = dataSize[dimIdx] / 2; return axis.type === 'category' ? axis.getBandWidth() : Math.abs(axis.dataToCoord(val - halfSize) - axis.dataToCoord(val + halfSize)); }, this); } function cartesianPrepareCustom(coordSys) { var rect = coordSys.master.getRect(); return { coordSys: { // The name exposed to user is always 'cartesian2d' but not 'grid'. type: 'cartesian2d', x: rect.x, y: rect.y, width: rect.width, height: rect.height }, api: { coord: function (data) { // do not provide "out" param return coordSys.dataToPoint(data); }, size: bind(dataToCoordSize, coordSys) } }; } function dataToCoordSize$1(dataSize, dataItem) { dataItem = dataItem || [0, 0]; return map([0, 1], function (dimIdx) { var val = dataItem[dimIdx]; var halfSize = dataSize[dimIdx] / 2; var p1 = []; var p2 = []; p1[dimIdx] = val - halfSize; p2[dimIdx] = val + halfSize; p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx]; return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]); }, this); } function geoPrepareCustom(coordSys) { var rect = coordSys.getBoundingRect(); return { coordSys: { type: 'geo', x: rect.x, y: rect.y, width: rect.width, height: rect.height, zoom: coordSys.getZoom() }, api: { coord: function (data) { // do not provide "out" and noRoam param, // Compatible with this usage: // echarts.util.map(item.points, api.coord) return coordSys.dataToPoint(data); }, size: bind(dataToCoordSize$1, coordSys) } }; } function dataToCoordSize$2(dataSize, dataItem) { // dataItem is necessary in log axis. var axis = this.getAxis(); var val = dataItem instanceof Array ? dataItem[0] : dataItem; var halfSize = (dataSize instanceof Array ? dataSize[0] : dataSize) / 2; return axis.type === 'category' ? axis.getBandWidth() : Math.abs(axis.dataToCoord(val - halfSize) - axis.dataToCoord(val + halfSize)); } function singlePrepareCustom(coordSys) { var rect = coordSys.getRect(); return { coordSys: { type: 'singleAxis', x: rect.x, y: rect.y, width: rect.width, height: rect.height }, api: { coord: function (val) { // do not provide "out" param return coordSys.dataToPoint(val); }, size: bind(dataToCoordSize$2, coordSys) } }; } function dataToCoordSize$3(dataSize, dataItem) { // dataItem is necessary in log axis. dataItem = dataItem || [0, 0]; return map(['Radius', 'Angle'], function (dim, dimIdx) { var getterName = 'get' + dim + 'Axis'; // TODO: TYPE Check Angle Axis var axis = this[getterName](); var val = dataItem[dimIdx]; var halfSize = dataSize[dimIdx] / 2; var result = axis.type === 'category' ? axis.getBandWidth() : Math.abs(axis.dataToCoord(val - halfSize) - axis.dataToCoord(val + halfSize)); if (dim === 'Angle') { result = result * Math.PI / 180; } return result; }, this); } function polarPrepareCustom(coordSys) { var radiusAxis = coordSys.getRadiusAxis(); var angleAxis = coordSys.getAngleAxis(); var radius = radiusAxis.getExtent(); radius[0] > radius[1] && radius.reverse(); return { coordSys: { type: 'polar', cx: coordSys.cx, cy: coordSys.cy, r: radius[1], r0: radius[0] }, api: { coord: function (data) { var radius = radiusAxis.dataToRadius(data[0]); var angle = angleAxis.dataToAngle(data[1]); var coord = coordSys.coordToPoint([radius, angle]); coord.push(radius, angle * Math.PI / 180); return coord; }, size: bind(dataToCoordSize$3, coordSys) } }; } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ function calendarPrepareCustom(coordSys) { var rect = coordSys.getRect(); var rangeInfo = coordSys.getRangeInfo(); return { coordSys: { type: 'calendar', x: rect.x, y: rect.y, width: rect.width, height: rect.height, cellWidth: coordSys.getCellWidth(), cellHeight: coordSys.getCellHeight(), rangeInfo: { start: rangeInfo.start, end: rangeInfo.end, weeks: rangeInfo.weeks, dayCount: rangeInfo.allDay } }, api: { coord: function (data, clamp) { return coordSys.dataToPoint(data, clamp); } } }; } var deprecatedLogs = {}; /** * Whether need to call `convertEC4CompatibleStyle`. */ function isEC4CompatibleStyle(style, elType, hasOwnTextContentOption, hasOwnTextConfig) { // Since echarts5, `RectText` is separated from its host element and style.text // does not exist any more. The compat work brings some extra burden on performance. // So we provide: // `legacy: true` force make compat. // `legacy: false`, force do not compat. // `legacy` not set: auto detect wheter legacy. // But in this case we do not compat (difficult to detect and rare case): // Becuse custom series and graphic component support "merge", users may firstly // only set `textStrokeWidth` style or secondly only set `text`. return style && (style.legacy || style.legacy !== false && !hasOwnTextContentOption && !hasOwnTextConfig && elType !== 'tspan' // Difficult to detect whether legacy for a "text" el. && (elType === 'text' || hasOwn(style, 'text'))); } /** * `EC4CompatibleStyle` is style that might be in echarts4 format or echarts5 format. * @param hostStyle The properties might be modified. * @return If be text el, `textContentStyle` and `textConfig` will not be retured. * Otherwise a `textContentStyle` and `textConfig` will be created, whose props area * retried from the `hostStyle`. */ function convertFromEC4CompatibleStyle(hostStyle, elType, isNormal) { var srcStyle = hostStyle; var textConfig; var textContent; var textContentStyle; if (elType === 'text') { textContentStyle = srcStyle; } else { textContentStyle = {}; hasOwn(srcStyle, 'text') && (textContentStyle.text = srcStyle.text); hasOwn(srcStyle, 'rich') && (textContentStyle.rich = srcStyle.rich); hasOwn(srcStyle, 'textFill') && (textContentStyle.fill = srcStyle.textFill); hasOwn(srcStyle, 'textStroke') && (textContentStyle.stroke = srcStyle.textStroke); textContent = { type: 'text', style: textContentStyle, // ec4 do not support rectText trigger. // And when text postion is different in normal and emphasis // => hover text trigger emphasis; // => text position changed, leave mouse pointer immediately; // That might cause state incorrect. silent: true }; textConfig = {}; var hasOwnPos = hasOwn(srcStyle, 'textPosition'); if (isNormal) { textConfig.position = hasOwnPos ? srcStyle.textPosition : 'inside'; } else { hasOwnPos && (textConfig.position = srcStyle.textPosition); } hasOwn(srcStyle, 'textPosition') && (textConfig.position = srcStyle.textPosition); hasOwn(srcStyle, 'textOffset') && (textConfig.offset = srcStyle.textOffset); hasOwn(srcStyle, 'textRotation') && (textConfig.rotation = srcStyle.textRotation); hasOwn(srcStyle, 'textDistance') && (textConfig.distance = srcStyle.textDistance); } convertEC4CompatibleRichItem(textContentStyle, hostStyle); each(textContentStyle.rich, function (richItem) { convertEC4CompatibleRichItem(richItem, richItem); }); return { textConfig: textConfig, textContent: textContent }; } /** * The result will be set to `out`. */ function convertEC4CompatibleRichItem(out, richItem) { if (!richItem) { return; } // (1) For simplicity, make textXXX properties (deprecated since ec5) has // higher priority. For example, consider in ec4 `borderColor: 5, textBorderColor: 10` // on a rect means `borderColor: 4` on the rect and `borderColor: 10` on an attached // richText in ec5. // (2) `out === richItem` if and only if `out` is text el or rich item. // So we can overwite existing props in `out` since textXXX has higher priority. richItem.font = richItem.textFont || richItem.font; hasOwn(richItem, 'textStrokeWidth') && (out.lineWidth = richItem.textStrokeWidth); hasOwn(richItem, 'textAlign') && (out.align = richItem.textAlign); hasOwn(richItem, 'textVerticalAlign') && (out.verticalAlign = richItem.textVerticalAlign); hasOwn(richItem, 'textLineHeight') && (out.lineHeight = richItem.textLineHeight); hasOwn(richItem, 'textWidth') && (out.width = richItem.textWidth); hasOwn(richItem, 'textHeight') && (out.height = richItem.textHeight); hasOwn(richItem, 'textBackgroundColor') && (out.backgroundColor = richItem.textBackgroundColor); hasOwn(richItem, 'textPadding') && (out.padding = richItem.textPadding); hasOwn(richItem, 'textBorderColor') && (out.borderColor = richItem.textBorderColor); hasOwn(richItem, 'textBorderWidth') && (out.borderWidth = richItem.textBorderWidth); hasOwn(richItem, 'textBorderRadius') && (out.borderRadius = richItem.textBorderRadius); hasOwn(richItem, 'textBoxShadowColor') && (out.shadowColor = richItem.textBoxShadowColor); hasOwn(richItem, 'textBoxShadowBlur') && (out.shadowBlur = richItem.textBoxShadowBlur); hasOwn(richItem, 'textBoxShadowOffsetX') && (out.shadowOffsetX = richItem.textBoxShadowOffsetX); hasOwn(richItem, 'textBoxShadowOffsetY') && (out.shadowOffsetY = richItem.textBoxShadowOffsetY); } /** * Convert to pure echarts4 format style. * `itemStyle` will be modified, added with ec4 style properties from * `textStyle` and `textConfig`. * * [Caveat]: For simplicity, `insideRollback` in ec4 does not compat, where * `styleEmphasis: {textFill: 'red'}` will remove the normal auto added stroke. */ function convertToEC4StyleForCustomSerise(itemStl, txStl, txCfg) { var out = itemStl; // See `custom.ts`, a trick to set extra `textPosition` firstly. out.textPosition = out.textPosition || txCfg.position || 'inside'; txCfg.offset != null && (out.textOffset = txCfg.offset); txCfg.rotation != null && (out.textRotation = txCfg.rotation); txCfg.distance != null && (out.textDistance = txCfg.distance); var isInside = out.textPosition.indexOf('inside') >= 0; var hostFill = itemStl.fill || '#000'; convertToEC4RichItem(out, txStl); var textFillNotSet = out.textFill == null; if (isInside) { if (textFillNotSet) { out.textFill = txCfg.insideFill || '#fff'; !out.textStroke && txCfg.insideStroke && (out.textStroke = txCfg.insideStroke); !out.textStroke && (out.textStroke = hostFill); out.textStrokeWidth == null && (out.textStrokeWidth = 2); } } else { if (textFillNotSet) { out.textFill = itemStl.fill || txCfg.outsideFill || '#000'; } !out.textStroke && txCfg.outsideStroke && (out.textStroke = txCfg.outsideStroke); } out.text = txStl.text; out.rich = txStl.rich; each(txStl.rich, function (richItem) { convertToEC4RichItem(richItem, richItem); }); return out; } function convertToEC4RichItem(out, richItem) { if (!richItem) { return; } hasOwn(richItem, 'fill') && (out.textFill = richItem.fill); hasOwn(richItem, 'stroke') && (out.textStroke = richItem.fill); hasOwn(richItem, 'lineWidth') && (out.textStrokeWidth = richItem.lineWidth); hasOwn(richItem, 'font') && (out.font = richItem.font); hasOwn(richItem, 'fontStyle') && (out.fontStyle = richItem.fontStyle); hasOwn(richItem, 'fontWeight') && (out.fontWeight = richItem.fontWeight); hasOwn(richItem, 'fontSize') && (out.fontSize = richItem.fontSize); hasOwn(richItem, 'fontFamily') && (out.fontFamily = richItem.fontFamily); hasOwn(richItem, 'align') && (out.textAlign = richItem.align); hasOwn(richItem, 'verticalAlign') && (out.textVerticalAlign = richItem.verticalAlign); hasOwn(richItem, 'lineHeight') && (out.textLineHeight = richItem.lineHeight); hasOwn(richItem, 'width') && (out.textWidth = richItem.width); hasOwn(richItem, 'height') && (out.textHeight = richItem.height); hasOwn(richItem, 'backgroundColor') && (out.textBackgroundColor = richItem.backgroundColor); hasOwn(richItem, 'padding') && (out.textPadding = richItem.padding); hasOwn(richItem, 'borderColor') && (out.textBorderColor = richItem.borderColor); hasOwn(richItem, 'borderWidth') && (out.textBorderWidth = richItem.borderWidth); hasOwn(richItem, 'borderRadius') && (out.textBorderRadius = richItem.borderRadius); hasOwn(richItem, 'shadowColor') && (out.textBoxShadowColor = richItem.shadowColor); hasOwn(richItem, 'shadowBlur') && (out.textBoxShadowBlur = richItem.shadowBlur); hasOwn(richItem, 'shadowOffsetX') && (out.textBoxShadowOffsetX = richItem.shadowOffsetX); hasOwn(richItem, 'shadowOffsetY') && (out.textBoxShadowOffsetY = richItem.shadowOffsetY); hasOwn(richItem, 'textShadowColor') && (out.textShadowColor = richItem.textShadowColor); hasOwn(richItem, 'textShadowBlur') && (out.textShadowBlur = richItem.textShadowBlur); hasOwn(richItem, 'textShadowOffsetX') && (out.textShadowOffsetX = richItem.textShadowOffsetX); hasOwn(richItem, 'textShadowOffsetY') && (out.textShadowOffsetY = richItem.textShadowOffsetY); } function warnDeprecated(deprecated, insteadApproach) { if ("development" !== 'production') { var key = deprecated + '^_^' + insteadApproach; if (!deprecatedLogs[key]) { console.warn("[ECharts] DEPRECATED: \"" + deprecated + "\" has been deprecated. " + insteadApproach); deprecatedLogs[key] = true; } } } var CMD$4 = PathProxy.CMD; var PI2$a = Math.PI * 2; var PROP_XY = ['x', 'y']; var PROP_WH = ['width', 'height']; var tmpArr$1 = []; function aroundEqual(a, b) { return Math.abs(a - b) < 1e-5; } function pathToBezierCurves(path) { var data = path.data; var len = path.len(); var bezierArray = []; var currentSubpath; var xi = 0; var yi = 0; var x0 = 0; var y0 = 0; function createNewSubpath(x, y) { if (currentSubpath && currentSubpath.length > 2) { bezierArray.push(currentSubpath); } currentSubpath = [x, y]; } function addLine(x0, y0, x1, y1) { if (!(aroundEqual(x0, x1) && aroundEqual(y0, y1))) { currentSubpath.push(x0, y0, x1, y1, x1, y1); } } function addArc(startAngle, endAngle, cx, cy, rx, ry) { var delta = Math.abs(endAngle - startAngle); var len = Math.tan(delta / 4) * 4 / 3; var dir = endAngle < startAngle ? -1 : 1; var c1 = Math.cos(startAngle); var s1 = Math.sin(startAngle); var c2 = Math.cos(endAngle); var s2 = Math.sin(endAngle); var x1 = c1 * rx + cx; var y1 = s1 * ry + cy; var x4 = c2 * rx + cx; var y4 = s2 * ry + cy; var hx = rx * len * dir; var hy = ry * len * dir; currentSubpath.push(x1 - hx * s1, y1 + hy * c1, x4 + hx * s2, y4 - hy * c2, x4, y4); } var x1; var y1; var x2; var y2; for (var i = 0; i < len;) { var cmd = data[i++]; var isFirst = i === 1; if (isFirst) { xi = data[i]; yi = data[i + 1]; x0 = xi; y0 = yi; if (cmd === CMD$4.L || cmd === CMD$4.C || cmd === CMD$4.Q) { currentSubpath = [x0, y0]; } } switch (cmd) { case CMD$4.M: xi = x0 = data[i++]; yi = y0 = data[i++]; createNewSubpath(x0, y0); break; case CMD$4.L: x1 = data[i++]; y1 = data[i++]; addLine(xi, yi, x1, y1); xi = x1; yi = y1; break; case CMD$4.C: currentSubpath.push(data[i++], data[i++], data[i++], data[i++], xi = data[i++], yi = data[i++]); break; case CMD$4.Q: x1 = data[i++]; y1 = data[i++]; x2 = data[i++]; y2 = data[i++]; currentSubpath.push(xi + 2 / 3 * (x1 - xi), yi + 2 / 3 * (y1 - yi), x2 + 2 / 3 * (x1 - x2), y2 + 2 / 3 * (y1 - y2), x2, y2); xi = x2; yi = y2; break; case CMD$4.A: var cx = data[i++]; var cy = data[i++]; var rx = data[i++]; var ry = data[i++]; var startAngle = data[i++]; var endAngle = data[i++] + startAngle; i += 1; var anticlockwise = !data[i++]; x1 = Math.cos(startAngle) * rx + cx; y1 = Math.sin(startAngle) * ry + cy; if (isFirst) { x0 = x1; y0 = y1; createNewSubpath(x0, y0); } else { addLine(xi, yi, x1, y1); } xi = Math.cos(endAngle) * rx + cx; yi = Math.sin(endAngle) * ry + cy; var step = (anticlockwise ? -1 : 1) * Math.PI / 2; for (var angle = startAngle; anticlockwise ? angle > endAngle : angle < endAngle; angle += step) { var nextAngle = anticlockwise ? Math.max(angle + step, endAngle) : Math.min(angle + step, endAngle); addArc(angle, nextAngle, cx, cy, rx, ry); } break; case CMD$4.R: x0 = xi = data[i++]; y0 = yi = data[i++]; x1 = x0 + data[i++]; y1 = y0 + data[i++]; createNewSubpath(x1, y0); addLine(x1, y0, x1, y1); addLine(x1, y1, x0, y1); addLine(x0, y1, x0, y0); addLine(x0, y0, x1, y0); break; case CMD$4.Z: currentSubpath && addLine(xi, yi, x0, y0); xi = x0; yi = y0; break; } } if (currentSubpath && currentSubpath.length > 2) { bezierArray.push(currentSubpath); } return bezierArray; } function alignSubpath(subpath1, subpath2) { var len1 = subpath1.length; var len2 = subpath2.length; if (len1 === len2) { return [subpath1, subpath2]; } var shorterPath = len1 < len2 ? subpath1 : subpath2; var shorterLen = Math.min(len1, len2); var diff = Math.abs(len2 - len1) / 6; var shorterBezierCount = (shorterLen - 2) / 6; var eachCurveSubDivCount = Math.ceil(diff / shorterBezierCount) + 1; var newSubpath = [shorterPath[0], shorterPath[1]]; var remained = diff; var tmpSegX = []; var tmpSegY = []; for (var i = 2; i < shorterLen;) { var x0 = shorterPath[i - 2]; var y0 = shorterPath[i - 1]; var x1 = shorterPath[i++]; var y1 = shorterPath[i++]; var x2 = shorterPath[i++]; var y2 = shorterPath[i++]; var x3 = shorterPath[i++]; var y3 = shorterPath[i++]; if (remained <= 0) { newSubpath.push(x1, y1, x2, y2, x3, y3); continue; } var actualSubDivCount = Math.min(remained, eachCurveSubDivCount - 1) + 1; for (var k = 1; k <= actualSubDivCount; k++) { var p = k / actualSubDivCount; cubicSubdivide(x0, x1, x2, x3, p, tmpSegX); cubicSubdivide(y0, y1, y2, y3, p, tmpSegY); x0 = tmpSegX[3]; y0 = tmpSegY[3]; newSubpath.push(tmpSegX[1], tmpSegY[1], tmpSegX[2], tmpSegY[2], x0, y0); x1 = tmpSegX[5]; y1 = tmpSegY[5]; x2 = tmpSegX[6]; y2 = tmpSegY[6]; } remained -= actualSubDivCount - 1; } return shorterPath === subpath1 ? [newSubpath, subpath2] : [subpath1, newSubpath]; } function createSubpath(lastSubpathSubpath, otherSubpath) { var len = lastSubpathSubpath.length; var lastX = lastSubpathSubpath[len - 2]; var lastY = lastSubpathSubpath[len - 1]; var newSubpath = []; for (var i = 0; i < otherSubpath.length;) { newSubpath[i++] = lastX; newSubpath[i++] = lastY; } return newSubpath; } function alignBezierCurves(array1, array2) { var _a; var lastSubpath1; var lastSubpath2; var newArray1 = []; var newArray2 = []; for (var i = 0; i < Math.max(array1.length, array2.length); i++) { var subpath1 = array1[i]; var subpath2 = array2[i]; var newSubpath1 = void 0; var newSubpath2 = void 0; if (!subpath1) { newSubpath1 = createSubpath(lastSubpath1 || subpath2, subpath2); newSubpath2 = subpath2; } else if (!subpath2) { newSubpath2 = createSubpath(lastSubpath2 || subpath1, subpath1); newSubpath1 = subpath1; } else { _a = alignSubpath(subpath1, subpath2), newSubpath1 = _a[0], newSubpath2 = _a[1]; lastSubpath1 = newSubpath1; lastSubpath2 = newSubpath2; } newArray1.push(newSubpath1); newArray2.push(newSubpath2); } return [newArray1, newArray2]; } function centroid(array) { var signedArea = 0; var cx = 0; var cy = 0; var len = array.length; for (var i = 0, j = len - 2; i < len; j = i, i += 2) { var x0 = array[j]; var y0 = array[j + 1]; var x1 = array[i]; var y1 = array[i + 1]; var a = x0 * y1 - x1 * y0; signedArea += a; cx += (x0 + x1) * a; cy += (y0 + y1) * a; } if (signedArea === 0) { return [array[0] || 0, array[1] || 0]; } return [cx / signedArea / 3, cy / signedArea / 3, signedArea]; } function findBestRingOffset(fromSubBeziers, toSubBeziers, fromCp, toCp) { var bezierCount = (fromSubBeziers.length - 2) / 6; var bestScore = Infinity; var bestOffset = 0; var len = fromSubBeziers.length; var len2 = len - 2; for (var offset = 0; offset < bezierCount; offset++) { var cursorOffset = offset * 6; var score = 0; for (var k = 0; k < len; k += 2) { var idx = k === 0 ? cursorOffset : ((cursorOffset + k - 2) % len2 + 2); var x0 = fromSubBeziers[idx] - fromCp[0]; var y0 = fromSubBeziers[idx + 1] - fromCp[1]; var x1 = toSubBeziers[k] - toCp[0]; var y1 = toSubBeziers[k + 1] - toCp[1]; var dx = x1 - x0; var dy = y1 - y0; score += dx * dx + dy * dy; } if (score < bestScore) { bestScore = score; bestOffset = offset; } } return bestOffset; } function reverse(array) { var newArr = []; var len = array.length; for (var i = 0; i < len; i += 2) { newArr[i] = array[len - i - 2]; newArr[i + 1] = array[len - i - 1]; } return newArr; } function findBestMorphingRotation(fromArr, toArr, searchAngleIteration, searchAngleRange) { var result = []; var fromNeedsReverse; for (var i = 0; i < fromArr.length; i++) { var fromSubpathBezier = fromArr[i]; var toSubpathBezier = toArr[i]; var fromCp = centroid(fromSubpathBezier); var toCp = centroid(toSubpathBezier); if (fromNeedsReverse == null) { fromNeedsReverse = fromCp[2] < 0 !== toCp[2] < 0; } var newFromSubpathBezier = []; var newToSubpathBezier = []; var bestAngle = 0; var bestScore = Infinity; var tmpArr_1 = []; var len = fromSubpathBezier.length; if (fromNeedsReverse) { fromSubpathBezier = reverse(fromSubpathBezier); } var offset = findBestRingOffset(fromSubpathBezier, toSubpathBezier, fromCp, toCp) * 6; var len2 = len - 2; for (var k = 0; k < len2; k += 2) { var idx = (offset + k) % len2 + 2; newFromSubpathBezier[k + 2] = fromSubpathBezier[idx] - fromCp[0]; newFromSubpathBezier[k + 3] = fromSubpathBezier[idx + 1] - fromCp[1]; } newFromSubpathBezier[0] = fromSubpathBezier[offset] - fromCp[0]; newFromSubpathBezier[1] = fromSubpathBezier[offset + 1] - fromCp[1]; if (searchAngleIteration > 0) { var step = searchAngleRange / searchAngleIteration; for (var angle = -searchAngleRange / 2; angle <= searchAngleRange / 2; angle += step) { var sa = Math.sin(angle); var ca = Math.cos(angle); var score = 0; for (var k = 0; k < fromSubpathBezier.length; k += 2) { var x0 = newFromSubpathBezier[k]; var y0 = newFromSubpathBezier[k + 1]; var x1 = toSubpathBezier[k] - toCp[0]; var y1 = toSubpathBezier[k + 1] - toCp[1]; var newX1 = x1 * ca - y1 * sa; var newY1 = x1 * sa + y1 * ca; tmpArr_1[k] = newX1; tmpArr_1[k + 1] = newY1; var dx = newX1 - x0; var dy = newY1 - y0; score += dx * dx + dy * dy; } if (score < bestScore) { bestScore = score; bestAngle = angle; for (var m = 0; m < tmpArr_1.length; m++) { newToSubpathBezier[m] = tmpArr_1[m]; } } } } else { for (var i_1 = 0; i_1 < len; i_1 += 2) { newToSubpathBezier[i_1] = toSubpathBezier[i_1] - toCp[0]; newToSubpathBezier[i_1 + 1] = toSubpathBezier[i_1 + 1] - toCp[1]; } } result.push({ from: newFromSubpathBezier, to: newToSubpathBezier, fromCp: fromCp, toCp: toCp, rotation: -bestAngle }); } return result; } function morphPath(fromPath, toPath, animationOpts) { var fromPathProxy; var toPathProxy; if (!fromPath || !toPath) { return toPath; } !fromPath.path && fromPath.createPathProxy(); fromPathProxy = fromPath.path; fromPathProxy.beginPath(); fromPath.buildPath(fromPathProxy, fromPath.shape); !toPath.path && toPath.createPathProxy(); toPathProxy = toPath.path; toPathProxy === fromPathProxy && (toPathProxy = new PathProxy(false)); toPathProxy.beginPath(); if (isIndividualMorphingPath(toPath)) { toPath.__oldBuildPath(toPathProxy, toPath.shape); } else { toPath.buildPath(toPathProxy, toPath.shape); } var _a = alignBezierCurves(pathToBezierCurves(fromPathProxy), pathToBezierCurves(toPathProxy)), fromBezierCurves = _a[0], toBezierCurves = _a[1]; var morphingData = findBestMorphingRotation(fromBezierCurves, toBezierCurves, 10, Math.PI); becomeIndividualMorphingPath(toPath, morphingData, 0); var oldDone = animationOpts && animationOpts.done; var oldAborted = animationOpts && animationOpts.aborted; var oldDuring = animationOpts && animationOpts.during; toPath.animateTo({ __morphT: 1 }, defaults({ during: function (p) { toPath.dirtyShape(); oldDuring && oldDuring(p); }, done: function () { restoreIndividualMorphingPath(toPath); toPath.createPathProxy(); toPath.dirtyShape(); oldDone && oldDone(); }, aborted: function () { oldAborted && oldAborted(); } }, animationOpts)); return toPath; } function morphingPathBuildPath(path) { var morphingData = this.__morphingData; var t = this.__morphT; var onet = 1 - t; var newCp = []; for (var i = 0; i < morphingData.length; i++) { var item = morphingData[i]; var from = item.from; var to = item.to; var angle = item.rotation * t; var fromCp = item.fromCp; var toCp = item.toCp; var sa = Math.sin(angle); var ca = Math.cos(angle); lerp(newCp, fromCp, toCp, t); for (var m = 0; m < from.length; m += 2) { var x0 = from[m]; var y0 = from[m + 1]; var x1 = to[m]; var y1 = to[m + 1]; var x = x0 * onet + x1 * t; var y = y0 * onet + y1 * t; tmpArr$1[m] = (x * ca - y * sa) + newCp[0]; tmpArr$1[m + 1] = (x * sa + y * ca) + newCp[1]; } for (var m = 0; m < from.length;) { if (m === 0) { path.moveTo(tmpArr$1[m++], tmpArr$1[m++]); } path.bezierCurveTo(tmpArr$1[m++], tmpArr$1[m++], tmpArr$1[m++], tmpArr$1[m++], tmpArr$1[m++], tmpArr$1[m++]); } } } function becomeIndividualMorphingPath(path, morphingData, morphT) { if (isIndividualMorphingPath(path)) { updateIndividualMorphingPath(path, morphingData, morphT); return; } var morphingPath = path; morphingPath.__oldBuildPath = morphingPath.buildPath; morphingPath.buildPath = morphingPathBuildPath; updateIndividualMorphingPath(morphingPath, morphingData, morphT); } function updateIndividualMorphingPath(morphingPath, morphingData, morphT) { morphingPath.__morphingData = morphingData; morphingPath.__morphT = morphT; } function restoreIndividualMorphingPath(path) { if (isIndividualMorphingPath(path)) { path.buildPath = path.__oldBuildPath; path.__oldBuildPath = path.__morphingData = null; } } function isIndividualMorphingPath(path) { return path.__oldBuildPath != null; } function isCombiningPath(path) { return !!path.__combiningSubList; } function isInAnyMorphing(path) { return isIndividualMorphingPath(path) || isCombiningPath(path); } function combine(fromPathList, toPath, animationOpts, copyPropsIfDivided) { var fromIndividuals = []; var separateCount = 0; for (var i = 0; i < fromPathList.length; i++) { var fromPath = fromPathList[i]; if (isCombiningPath(fromPath)) { var fromCombiningSubList = fromPath.__combiningSubList; for (var j = 0; j < fromCombiningSubList.length; j++) { fromIndividuals.push(fromCombiningSubList[j]); } separateCount += fromCombiningSubList.length; } else { fromIndividuals.push(fromPath); separateCount++; } } if (!separateCount) { return; } var dividingMethod = animationOpts ? animationOpts.dividingMethod : null; var toPathSplittedList = divideShape(toPath, separateCount, dividingMethod); assert(toPathSplittedList.length === separateCount); var oldDone = animationOpts && animationOpts.done; var oldAborted = animationOpts && animationOpts.aborted; var oldDuring = animationOpts && animationOpts.during; var doneCount = 0; var abortedCalled = false; var morphAnimationOpts = defaults({ during: function (p) { oldDuring && oldDuring(p); }, done: function () { doneCount++; if (doneCount === toPathSplittedList.length) { restoreCombiningPath(toPath); oldDone && oldDone(); } }, aborted: function () { if (!abortedCalled) { abortedCalled = true; oldAborted && oldAborted(); } } }, animationOpts); for (var i = 0; i < separateCount; i++) { var from = fromIndividuals[i]; var to = toPathSplittedList[i]; copyPropsIfDivided && copyPropsIfDivided(toPath, to, true); morphPath(from, to, morphAnimationOpts); } becomeCombiningPath(toPath, toPathSplittedList); return { fromIndividuals: fromIndividuals, toIndividuals: toPathSplittedList, count: separateCount }; } function becomeCombiningPath(path, combiningSubList) { if (isCombiningPath(path)) { updateCombiningPathSubList(path, combiningSubList); return; } var combiningPath = path; updateCombiningPathSubList(combiningPath, combiningSubList); combiningPath.__oldAddSelfToZr = path.addSelfToZr; combiningPath.__oldRemoveSelfFromZr = path.removeSelfFromZr; combiningPath.addSelfToZr = combiningAddSelfToZr; combiningPath.removeSelfFromZr = combiningRemoveSelfFromZr; combiningPath.__oldBuildPath = combiningPath.buildPath; combiningPath.buildPath = noop; combiningPath.childrenRef = combiningChildrenRef; } function restoreCombiningPath(path) { if (!isCombiningPath(path)) { return; } var combiningPath = path; updateCombiningPathSubList(combiningPath, null); combiningPath.addSelfToZr = combiningPath.__oldAddSelfToZr; combiningPath.removeSelfFromZr = combiningPath.__oldRemoveSelfFromZr; combiningPath.buildPath = combiningPath.__oldBuildPath; combiningPath.childrenRef = combiningPath.__combiningSubList = combiningPath.__oldAddSelfToZr = combiningPath.__oldRemoveSelfFromZr = combiningPath.__oldBuildPath = null; } function updateCombiningPathSubList(combiningPath, combiningSubList) { if (combiningPath.__combiningSubList !== combiningSubList) { combiningPathSubListAddRemoveWithZr(combiningPath, 'removeSelfFromZr'); combiningPath.__combiningSubList = combiningSubList; if (combiningSubList) { for (var i = 0; i < combiningSubList.length; i++) { combiningSubList[i].parent = combiningPath; } } combiningPathSubListAddRemoveWithZr(combiningPath, 'addSelfToZr'); } } function combiningAddSelfToZr(zr) { this.__oldAddSelfToZr(zr); combiningPathSubListAddRemoveWithZr(this, 'addSelfToZr'); } function combiningPathSubListAddRemoveWithZr(path, method) { var combiningSubList = path.__combiningSubList; var zr = path.__zr; if (combiningSubList && zr) { for (var i = 0; i < combiningSubList.length; i++) { var child = combiningSubList[i]; child[method](zr); } } } function combiningRemoveSelfFromZr(zr) { this.__oldRemoveSelfFromZr(zr); var combiningSubList = this.__combiningSubList; for (var i = 0; i < combiningSubList.length; i++) { var child = combiningSubList[i]; child.removeSelfFromZr(zr); } } function combiningChildrenRef() { return this.__combiningSubList; } function separate(fromPath, toPathList, animationOpts, copyPropsIfDivided) { var toPathListLen = toPathList.length; var fromPathList; var dividingMethod = animationOpts ? animationOpts.dividingMethod : null; var copyProps = false; if (isCombiningPath(fromPath)) { var fromCombiningSubList = fromPath.__combiningSubList; if (fromCombiningSubList.length === toPathListLen) { fromPathList = fromCombiningSubList; } else { fromPathList = divideShape(fromPath, toPathListLen, dividingMethod); copyProps = true; } } else { fromPathList = divideShape(fromPath, toPathListLen, dividingMethod); copyProps = true; } assert(fromPathList.length === toPathListLen); for (var i = 0; i < toPathListLen; i++) { if (copyProps && copyPropsIfDivided) { copyPropsIfDivided(fromPath, fromPathList[i], false); } morphPath(fromPathList[i], toPathList[i], animationOpts); } return { fromIndividuals: fromPathList, toIndividuals: toPathList, count: toPathListLen }; } function divideShape(path, separateCount, dividingMethod) { return dividingMethod === 'duplicate' ? duplicateShape(path, separateCount) : splitShape(path, separateCount); } function splitShape(path, separateCount) { var resultPaths = []; if (separateCount <= 0) { return resultPaths; } if (separateCount === 1) { return duplicateShape(path, separateCount); } if (path instanceof Rect) { var toPathShape = path.shape; var splitPropIdx = toPathShape.height > toPathShape.width ? 1 : 0; var propWH = PROP_WH[splitPropIdx]; var propXY = PROP_XY[splitPropIdx]; var subWH = toPathShape[propWH] / separateCount; var xyCurr = toPathShape[propXY]; for (var i = 0; i < separateCount; i++, xyCurr += subWH) { var subShape = { x: toPathShape.x, y: toPathShape.y, width: toPathShape.width, height: toPathShape.height }; subShape[propXY] = xyCurr; subShape[propWH] = i < separateCount - 1 ? subWH : toPathShape[propXY] + toPathShape[propWH] - xyCurr; var splitted = new Rect({ shape: subShape }); resultPaths.push(splitted); } } else if (path instanceof Sector) { var toPathShape = path.shape; var clockwise = toPathShape.clockwise; var startAngle = toPathShape.startAngle; var endAngle = toPathShape.endAngle; var endAngleNormalized = normalizeRadian$1(startAngle, toPathShape.endAngle, clockwise); var step = (endAngleNormalized - startAngle) / separateCount; var angleCurr = startAngle; for (var i = 0; i < separateCount; i++, angleCurr += step) { var splitted = new Sector({ shape: { cx: toPathShape.cx, cy: toPathShape.cy, r: toPathShape.r, r0: toPathShape.r0, clockwise: clockwise, startAngle: angleCurr, endAngle: i === separateCount - 1 ? endAngle : angleCurr + step } }); resultPaths.push(splitted); } } else { return duplicateShape(path, separateCount); } return resultPaths; } function duplicateShape(path, separateCount) { var resultPaths = []; if (separateCount <= 0) { return resultPaths; } var ctor = path.constructor; for (var i = 0; i < separateCount; i++) { var sub = new ctor({ shape: clone(path.shape) }); resultPaths.push(sub); } return resultPaths; } function normalizeRadian$1(start, end, clockwise) { return end + PI2$a * (Math[clockwise ? 'ceil' : 'floor']((start - end) / PI2$a)); } var inner$9 = makeInner(); var TRANSFORM_PROPS = { x: 1, y: 1, scaleX: 1, scaleY: 1, originX: 1, originY: 1, rotation: 1 }; var transformPropNamesStr = keys(TRANSFORM_PROPS).join(', '); // `visual('color') visual('borderColor')` is supported. var STYLE_VISUAL_TYPE = { color: 'fill', borderColor: 'stroke' }; var NON_STYLE_VISUAL_PROPS = { symbol: 1, symbolSize: 1, symbolKeepAspect: 1, legendSymbol: 1, visualMeta: 1, liftZ: 1, decal: 1 }; var EMPHASIS = 'emphasis'; var NORMAL = 'normal'; var BLUR = 'blur'; var SELECT = 'select'; var STATES = [NORMAL, EMPHASIS, BLUR, SELECT]; var PATH_ITEM_STYLE = { normal: ['itemStyle'], emphasis: [EMPHASIS, 'itemStyle'], blur: [BLUR, 'itemStyle'], select: [SELECT, 'itemStyle'] }; var PATH_LABEL = { normal: ['label'], emphasis: [EMPHASIS, 'label'], blur: [BLUR, 'label'], select: [SELECT, 'label'] }; // Use prefix to avoid index to be the same as el.name, // which will cause weird update animation. var GROUP_DIFF_PREFIX = 'e\0\0'; var attachedTxInfoTmp = { normal: {}, emphasis: {}, blur: {}, select: {} }; var LEGACY_TRANSFORM_PROPS = { position: ['x', 'y'], scale: ['scaleX', 'scaleY'], origin: ['originX', 'originY'] }; var tmpTransformable = new Transformable(); /** * To reduce total package size of each coordinate systems, the modules `prepareCustom` * of each coordinate systems are not required by each coordinate systems directly, but * required by the module `custom`. * * prepareInfoForCustomSeries {Function}: optional * @return {Object} {coordSys: {...}, api: { * coord: function (data, clamp) {}, // return point in global. * size: function (dataSize, dataItem) {} // return size of each axis in coordSys. * }} */ var prepareCustoms = { cartesian2d: cartesianPrepareCustom, geo: geoPrepareCustom, singleAxis: singlePrepareCustom, polar: polarPrepareCustom, calendar: calendarPrepareCustom }; var CustomSeriesModel = /** @class */ function (_super) { __extends(CustomSeriesModel, _super); function CustomSeriesModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = CustomSeriesModel.type; return _this; } CustomSeriesModel.prototype.optionUpdated = function () { this.currentZLevel = this.get('zlevel', true); this.currentZ = this.get('z', true); }; CustomSeriesModel.prototype.getInitialData = function (option, ecModel) { return createListFromArray(this.getSource(), this); }; CustomSeriesModel.prototype.getDataParams = function (dataIndex, dataType, el) { var params = _super.prototype.getDataParams.call(this, dataIndex, dataType); el && (params.info = inner$9(el).info); return params; }; CustomSeriesModel.type = 'series.custom'; CustomSeriesModel.dependencies = ['grid', 'polar', 'geo', 'singleAxis', 'calendar']; CustomSeriesModel.defaultOption = { coordinateSystem: 'cartesian2d', zlevel: 0, z: 2, legendHoverLink: true, // Custom series will not clip by default. // Some case will use custom series to draw label // For example https://echarts.apache.org/examples/en/editor.html?c=custom-gantt-flight clip: false // Cartesian coordinate system // xAxisIndex: 0, // yAxisIndex: 0, // Polar coordinate system // polarIndex: 0, // Geo coordinate system // geoIndex: 0, }; return CustomSeriesModel; }(SeriesModel); var CustomSeriesView = /** @class */ function (_super) { __extends(CustomSeriesView, _super); function CustomSeriesView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = CustomSeriesView.type; return _this; } CustomSeriesView.prototype.render = function (customSeries, ecModel, api, payload) { var oldData = this._data; var data = customSeries.getData(); var group = this.group; var renderItem = makeRenderItem(customSeries, data, ecModel, api); // By default, merge mode is applied. In most cases, custom series is // used in the scenario that data amount is not large but graphic elements // is complicated, where merge mode is probably necessary for optimization. // For example, reuse graphic elements and only update the transform when // roam or data zoom according to `actionType`. var transOpt = customSeries.__transientTransitionOpt; // Enable user to disable transition animation by both set // `from` and `to` dimension as `null`/`undefined`. if (transOpt && (transOpt.from == null || transOpt.to == null)) { oldData && oldData.each(function (oldIdx) { doRemoveEl(oldData.getItemGraphicEl(oldIdx), customSeries, group); }); data.each(function (newIdx) { createOrUpdateItem(api, null, newIdx, renderItem(newIdx, payload), customSeries, group, data, null); }); } else { var morphPreparation_1 = new MorphPreparation(customSeries, transOpt); var diffMode = transOpt ? 'multiple' : 'oneToOne'; new DataDiffer(oldData ? oldData.getIndices() : [], data.getIndices(), createGetKey(oldData, diffMode, transOpt && transOpt.from), createGetKey(data, diffMode, transOpt && transOpt.to), null, diffMode).add(function (newIdx) { createOrUpdateItem(api, null, newIdx, renderItem(newIdx, payload), customSeries, group, data, null); }).remove(function (oldIdx) { doRemoveEl(oldData.getItemGraphicEl(oldIdx), customSeries, group); }).update(function (newIdx, oldIdx) { morphPreparation_1.reset('oneToOne'); var oldEl = oldData.getItemGraphicEl(oldIdx); morphPreparation_1.findAndAddFrom(oldEl); // PENDING: // if may morph, currently we alway recreate the whole el. // because if reuse some of the el in the group tree, the old el has to // be removed from the group, and consequently we can not calculate // the "global transition" of the old element. // But is there performance issue? if (morphPreparation_1.hasFrom()) { removeElementDirectly(oldEl, group); oldEl = null; } createOrUpdateItem(api, oldEl, newIdx, renderItem(newIdx, payload), customSeries, group, data, morphPreparation_1); morphPreparation_1.applyMorphing(); }).updateManyToOne(function (newIdx, oldIndices) { morphPreparation_1.reset('manyToOne'); for (var i = 0; i < oldIndices.length; i++) { var oldEl = oldData.getItemGraphicEl(oldIndices[i]); morphPreparation_1.findAndAddFrom(oldEl); removeElementDirectly(oldEl, group); } createOrUpdateItem(api, null, newIdx, renderItem(newIdx, payload), customSeries, group, data, morphPreparation_1); morphPreparation_1.applyMorphing(); }).updateOneToMany(function (newIndices, oldIdx) { morphPreparation_1.reset('oneToMany'); var newLen = newIndices.length; var oldEl = oldData.getItemGraphicEl(oldIdx); morphPreparation_1.findAndAddFrom(oldEl); removeElementDirectly(oldEl, group); for (var i = 0; i < newLen; i++) { createOrUpdateItem(api, null, newIndices[i], renderItem(newIndices[i], payload), customSeries, group, data, morphPreparation_1); } morphPreparation_1.applyMorphing(); }).execute(); } // Do clipping var clipPath = customSeries.get('clip', true) ? createClipPath(customSeries.coordinateSystem, false, customSeries) : null; if (clipPath) { group.setClipPath(clipPath); } else { group.removeClipPath(); } this._data = data; }; CustomSeriesView.prototype.incrementalPrepareRender = function (customSeries, ecModel, api) { this.group.removeAll(); this._data = null; }; CustomSeriesView.prototype.incrementalRender = function (params, customSeries, ecModel, api, payload) { var data = customSeries.getData(); var renderItem = makeRenderItem(customSeries, data, ecModel, api); function setIncrementalAndHoverLayer(el) { if (!el.isGroup) { el.incremental = true; el.ensureState('emphasis').hoverLayer = true; } } for (var idx = params.start; idx < params.end; idx++) { var el = createOrUpdateItem(null, null, idx, renderItem(idx, payload), customSeries, this.group, data, null); el.traverse(setIncrementalAndHoverLayer); } }; CustomSeriesView.prototype.filterForExposedEvent = function (eventType, query, targetEl, packedEvent) { var elementName = query.element; if (elementName == null || targetEl.name === elementName) { return true; } // Enable to give a name on a group made by `renderItem`, and listen // events that triggerd by its descendents. while ((targetEl = targetEl.__hostTarget || targetEl.parent) && targetEl !== this.group) { if (targetEl.name === elementName) { return true; } } return false; }; CustomSeriesView.type = 'custom'; return CustomSeriesView; }(ChartView); function createGetKey(data, diffMode, dimension) { if (!data) { return; } if (diffMode === 'oneToOne') { return function (rawIdx, dataIndex) { return data.getId(dataIndex); }; } var diffByDimName = data.getDimension(dimension); var dimInfo = data.getDimensionInfo(diffByDimName); if (!dimInfo) { var errMsg = ''; if ("development" !== 'production') { errMsg = dimension + " is not a valid dimension."; } throwError(errMsg); } var ordinalMeta = dimInfo.ordinalMeta; return function (rawIdx, dataIndex) { var key = data.get(diffByDimName, dataIndex); if (ordinalMeta) { key = ordinalMeta.categories[key]; } return key == null || eqNaN(key) ? rawIdx + '' : '_ec_' + key; }; } function createEl(elOption) { var graphicType = elOption.type; var el; // Those graphic elements are not shapes. They should not be // overwritten by users, so do them first. if (graphicType === 'path') { var shape = elOption.shape; // Using pathRect brings convenience to users sacle svg path. var pathRect = shape.width != null && shape.height != null ? { x: shape.x || 0, y: shape.y || 0, width: shape.width, height: shape.height } : null; var pathData = getPathData(shape); // Path is also used for icon, so layout 'center' by default. el = makePath(pathData, null, pathRect, shape.layout || 'center'); inner$9(el).customPathData = pathData; } else if (graphicType === 'image') { el = new ZRImage({}); inner$9(el).customImagePath = elOption.style.image; } else if (graphicType === 'text') { el = new ZRText({}); // inner(el).customText = (elOption.style as TextStyleProps).text; } else if (graphicType === 'group') { el = new Group(); } else if (graphicType === 'compoundPath') { throw new Error('"compoundPath" is not supported yet.'); } else { var Clz = getShapeClass(graphicType); if (!Clz) { var errMsg = ''; if ("development" !== 'production') { errMsg = 'graphic type "' + graphicType + '" can not be found.'; } throwError(errMsg); } el = new Clz(); } inner$9(el).customGraphicType = graphicType; el.name = elOption.name; // Compat ec4: the default z2 lift is 1. If changing the number, // some cases probably be broken: hierarchy layout along z, like circle packing, // where emphasis only intending to modify color/border rather than lift z2. el.z2EmphasisLift = 1; el.z2SelectLift = 1; return el; } /** * ---------------------------------------------------------- * [STRATEGY_MERGE] Merge properties or erase all properties: * * Based on the fact that the existing zr element probably be reused, we now consider whether * merge or erase all properties to the exsiting elements. * That is, if a certain props is not specified in the lastest return of `renderItem`: * + "Merge" means that do not modify the value on the existing element. * + "Erase all" means that use a default value to the existing element. * * "Merge" might bring some unexpected state retaining for users and "erase all" seams to be * more safe. "erase all" force users to specify all of the props each time, which is recommanded * in most cases. * But "erase all" theoretically disables the chance of performance optimization (e.g., just * generete shape and style at the first time rather than always do that). * So we still use "merge" rather than "erase all". If users need "erase all", they can * simple always set all of the props each time. * Some "object-like" config like `textConfig`, `textContent`, `style` which are not needed for * every elment, so we replace them only when user specify them. And the that is a total replace. * * TODO: there is no hint of 'isFirst' to users. So the performance enhancement can not be * performed yet. Consider the case: * (1) setOption to "mergeChildren" with a smaller children count * (2) Use dataZoom to make an item disappear. * (3) User dataZoom to make the item display again. At that time, renderItem need to return the * full option rather than partial option to recreate the element. * * ---------------------------------------------- * [STRATEGY_NULL] `hasOwnProperty` or `== null`: * * Ditinguishing "own property" probably bring little trouble to user when make el options. * So we trade a {xx: null} or {xx: undefined} as "not specified" if possible rather than * "set them to null/undefined". In most cases, props can not be cleared. Some typicall * clearable props like `style`/`textConfig`/`textContent` we enable `false` to means * "clear". In some othere special cases that the prop is able to set as null/undefined, * but not suitable to use `false`, `hasOwnProperty` is checked. * * --------------------------------------------- * [STRATEGY_TRANSITION] The rule of transition: * + For props on the root level of a element: * If there is no `transition` specified, tansform props will be transitioned by default, * which is the same as the previous setting in echarts4 and suitable for the scenario * of dataZoom change. * If `transition` specified, only the specified props will be transitioned. * + For props in `shape` and `style`: * Only props specified in `transition` will be transitioned. * + Break: * Since ec5, do not make transition to shape by default, because it might result in * performance issue (especially `points` of polygon) and do not necessary in most cases. * * @return if `isMorphTo`, return `allPropsFinal`. */ function updateElNormal( // Can be null/undefined api, el, // Whether be a morph target. isMorphTo, dataIndex, elOption, styleOpt, attachedTxInfo, seriesModel, isInit, isTextContent) { var transFromProps = {}; var allPropsFinal = {}; var elDisplayable = el.isGroup ? null : el; // If be "morph to", delay the `updateElNormal` when all of the els in // this data item processed. Because at that time we can get all of the // "morph from" and make correct separate/combine. !isMorphTo && prepareShapeOrExtraTransitionFrom('shape', el, null, elOption, transFromProps, isInit); prepareShapeOrExtraAllPropsFinal('shape', elOption, allPropsFinal); !isMorphTo && prepareShapeOrExtraTransitionFrom('extra', el, null, elOption, transFromProps, isInit); prepareShapeOrExtraAllPropsFinal('extra', elOption, allPropsFinal); !isMorphTo && prepareTransformTransitionFrom(el, null, elOption, transFromProps, isInit); prepareTransformAllPropsFinal(elOption, allPropsFinal); var txCfgOpt = attachedTxInfo && attachedTxInfo.normal.cfg; if (txCfgOpt) { // PENDING: whether use user object directly rather than clone? // TODO:5.0 textConfig transition animation? el.setTextConfig(txCfgOpt); } if (el.type === 'text' && styleOpt) { var textOptionStyle = styleOpt; // Compatible with ec4: if `textFill` or `textStroke` exists use them. hasOwn(textOptionStyle, 'textFill') && (textOptionStyle.fill = textOptionStyle.textFill); hasOwn(textOptionStyle, 'textStroke') && (textOptionStyle.stroke = textOptionStyle.textStroke); } if (styleOpt) { var decalPattern = void 0; var decalObj = isPath$1(el) ? styleOpt.decal : null; if (api && decalObj) { decalObj.dirty = true; decalPattern = createOrUpdatePatternFromDecal(decalObj, api); } // Always overwrite in case user specify this prop. styleOpt.__decalPattern = decalPattern; } !isMorphTo && prepareStyleTransitionFrom(el, null, elOption, styleOpt, transFromProps, isInit); if (elDisplayable) { hasOwn(elOption, 'invisible') && (elDisplayable.invisible = elOption.invisible); } // If `isMorphTo`, we should not update these props to el directly, otherwise, // when applying morph finally, the original prop are missing for making "animation from". if (!isMorphTo) { applyPropsFinal(el, allPropsFinal, styleOpt); applyTransitionFrom(el, dataIndex, elOption, seriesModel, transFromProps, isInit); } // Merge by default. hasOwn(elOption, 'silent') && (el.silent = elOption.silent); hasOwn(elOption, 'ignore') && (el.ignore = elOption.ignore); if (!isTextContent) { // `elOption.info` enables user to mount some info on // elements and use them in event handlers. // Update them only when user specified, otherwise, remain. hasOwn(elOption, 'info') && (inner$9(el).info = elOption.info); } styleOpt ? el.dirty() : el.markRedraw(); return isMorphTo ? allPropsFinal : null; } function applyPropsFinal(el, // Can be null/undefined allPropsFinal, styleOpt) { var elDisplayable = el.isGroup ? null : el; if (elDisplayable && styleOpt) { var decalPattern = styleOpt.__decalPattern; var originalDecalObj = void 0; if (decalPattern) { originalDecalObj = styleOpt.decal; styleOpt.decal = decalPattern; } // PENDING: here the input style object is used directly. // Good for performance but bad for compatibility control. elDisplayable.useStyle(styleOpt); if (decalPattern) { styleOpt.decal = originalDecalObj; } // When style object changed, how to trade the existing animation? // It is probably conplicated and not needed to cover all the cases. // But still need consider the case: // (1) When using init animation on `style.opacity`, and before the animation // ended users triggers an update by mousewhell. At that time the init // animation should better be continued rather than terminated. // So after `useStyle` called, we should change the animation target manually // to continue the effect of the init animation. // (2) PENDING: If the previous animation targeted at a `val1`, and currently we need // to update the value to `val2` and no animation declared, should be terminate // the previous animation or just modify the target of the animation? // Therotically That will happen not only on `style` but also on `shape` and // `transfrom` props. But we haven't handle this case at present yet. // (3) PENDING: Is it proper to visit `animators` and `targetName`? var animators = elDisplayable.animators; for (var i = 0; i < animators.length; i++) { var animator = animators[i]; // targetName is the "topKey". if (animator.targetName === 'style') { animator.changeTarget(elDisplayable.style); } } } // Set el to the final state firstly. allPropsFinal && el.attr(allPropsFinal); } function applyTransitionFrom(el, dataIndex, elOption, seriesModel, // Can be null/undefined transFromProps, isInit) { if (transFromProps) { // Do not use `el.updateDuringAnimation` here becuase `el.updateDuringAnimation` will // be called mutiple time in each animation frame. For example, if both "transform" props // and shape props and style props changed, it will generate three animator and called // one-by-one in each animation frame. // We use the during in `animateTo/From` params. var userDuring = elOption.during; // For simplicity, if during not specified, the previous during will not work any more. inner$9(el).userDuring = userDuring; var cfgDuringCall = userDuring ? bind(duringCall, { el: el, userDuring: userDuring }) : null; var cfg = { dataIndex: dataIndex, isFrom: true, during: cfgDuringCall }; isInit ? initProps(el, transFromProps, seriesModel, cfg) : updateProps(el, transFromProps, seriesModel, cfg); } } // See [STRATEGY_TRANSITION] function prepareShapeOrExtraTransitionFrom(mainAttr, el, morphFromEl, elOption, transFromProps, isInit) { var attrOpt = elOption[mainAttr]; if (!attrOpt) { return; } var elPropsInAttr = el[mainAttr]; var transFromPropsInAttr; var enterFrom = attrOpt.enterFrom; if (isInit && enterFrom) { !transFromPropsInAttr && (transFromPropsInAttr = transFromProps[mainAttr] = {}); var enterFromKeys = keys(enterFrom); for (var i = 0; i < enterFromKeys.length; i++) { // `enterFrom` props are not necessarily also declared in `shape`/`style`/..., // for example, `opacity` can only declared in `enterFrom` but not in `style`. var key = enterFromKeys[i]; // Do not clone, animator will perform that clone. transFromPropsInAttr[key] = enterFrom[key]; } } if (!isInit && elPropsInAttr // Just ignore shape animation in morphing. && !(morphFromEl != null && mainAttr === 'shape')) { if (attrOpt.transition) { !transFromPropsInAttr && (transFromPropsInAttr = transFromProps[mainAttr] = {}); var transitionKeys = normalizeToArray(attrOpt.transition); for (var i = 0; i < transitionKeys.length; i++) { var key = transitionKeys[i]; var elVal = elPropsInAttr[key]; if ("development" !== 'production') { checkNonStyleTansitionRefer(key, attrOpt[key], elVal); } // Do not clone, see `checkNonStyleTansitionRefer`. transFromPropsInAttr[key] = elVal; } } else if (indexOf(elOption.transition, mainAttr) >= 0) { !transFromPropsInAttr && (transFromPropsInAttr = transFromProps[mainAttr] = {}); var elPropsInAttrKeys = keys(elPropsInAttr); for (var i = 0; i < elPropsInAttrKeys.length; i++) { var key = elPropsInAttrKeys[i]; var elVal = elPropsInAttr[key]; if (isNonStyleTransitionEnabled(attrOpt[key], elVal)) { transFromPropsInAttr[key] = elVal; } } } } var leaveTo = attrOpt.leaveTo; if (leaveTo) { var leaveToProps = getOrCreateLeaveToPropsFromEl(el); var leaveToPropsInAttr = leaveToProps[mainAttr] || (leaveToProps[mainAttr] = {}); var leaveToKeys = keys(leaveTo); for (var i = 0; i < leaveToKeys.length; i++) { var key = leaveToKeys[i]; leaveToPropsInAttr[key] = leaveTo[key]; } } } function prepareShapeOrExtraAllPropsFinal(mainAttr, elOption, allProps) { var attrOpt = elOption[mainAttr]; if (!attrOpt) { return; } var allPropsInAttr = allProps[mainAttr] = {}; var keysInAttr = keys(attrOpt); for (var i = 0; i < keysInAttr.length; i++) { var key = keysInAttr[i]; // To avoid share one object with different element, and // to avoid user modify the object inexpectedly, have to clone. allPropsInAttr[key] = cloneValue(attrOpt[key]); } } // See [STRATEGY_TRANSITION]. function prepareTransformTransitionFrom(el, morphFromEl, elOption, transFromProps, isInit) { var enterFrom = elOption.enterFrom; if (isInit && enterFrom) { var enterFromKeys = keys(enterFrom); for (var i = 0; i < enterFromKeys.length; i++) { var key = enterFromKeys[i]; if ("development" !== 'production') { checkTransformPropRefer(key, 'el.enterFrom'); } // Do not clone, animator will perform that clone. transFromProps[key] = enterFrom[key]; } } if (!isInit) { // If morphing, force transition all transform props. // otherwise might have incorrect morphing animation. if (morphFromEl) { var fromTransformable = calcOldElLocalTransformBasedOnNewElParent(morphFromEl, el); setTransformPropToTransitionFrom(transFromProps, 'x', fromTransformable); setTransformPropToTransitionFrom(transFromProps, 'y', fromTransformable); setTransformPropToTransitionFrom(transFromProps, 'scaleX', fromTransformable); setTransformPropToTransitionFrom(transFromProps, 'scaleY', fromTransformable); setTransformPropToTransitionFrom(transFromProps, 'originX', fromTransformable); setTransformPropToTransitionFrom(transFromProps, 'originY', fromTransformable); setTransformPropToTransitionFrom(transFromProps, 'rotation', fromTransformable); } else if (elOption.transition) { var transitionKeys = normalizeToArray(elOption.transition); for (var i = 0; i < transitionKeys.length; i++) { var key = transitionKeys[i]; if (key === 'style' || key === 'shape' || key === 'extra') { continue; } var elVal = el[key]; if ("development" !== 'production') { checkTransformPropRefer(key, 'el.transition'); checkNonStyleTansitionRefer(key, elOption[key], elVal); } // Do not clone, see `checkNonStyleTansitionRefer`. transFromProps[key] = elVal; } } // This default transition see [STRATEGY_TRANSITION] else { setTransformPropToTransitionFrom(transFromProps, 'x', el); setTransformPropToTransitionFrom(transFromProps, 'y', el); } } var leaveTo = elOption.leaveTo; if (leaveTo) { var leaveToProps = getOrCreateLeaveToPropsFromEl(el); var leaveToKeys = keys(leaveTo); for (var i = 0; i < leaveToKeys.length; i++) { var key = leaveToKeys[i]; if ("development" !== 'production') { checkTransformPropRefer(key, 'el.leaveTo'); } leaveToProps[key] = leaveTo[key]; } } } function prepareTransformAllPropsFinal(elOption, allProps) { setLagecyTransformProp(elOption, allProps, 'position'); setLagecyTransformProp(elOption, allProps, 'scale'); setLagecyTransformProp(elOption, allProps, 'origin'); setTransformProp(elOption, allProps, 'x'); setTransformProp(elOption, allProps, 'y'); setTransformProp(elOption, allProps, 'scaleX'); setTransformProp(elOption, allProps, 'scaleY'); setTransformProp(elOption, allProps, 'originX'); setTransformProp(elOption, allProps, 'originY'); setTransformProp(elOption, allProps, 'rotation'); } // See [STRATEGY_TRANSITION]. function prepareStyleTransitionFrom(el, morphFromEl, elOption, styleOpt, transFromProps, isInit) { if (!styleOpt) { return; } // At present in "many-to-one"/"one-to-many" case, to not support "many" have // different styles and make style transitions. That might be a rare case. var fromEl = morphFromEl || el; var fromElStyle = fromEl.style; var transFromStyleProps; var enterFrom = styleOpt.enterFrom; if (isInit && enterFrom) { var enterFromKeys = keys(enterFrom); !transFromStyleProps && (transFromStyleProps = transFromProps.style = {}); for (var i = 0; i < enterFromKeys.length; i++) { var key = enterFromKeys[i]; // Do not clone, animator will perform that clone. transFromStyleProps[key] = enterFrom[key]; } } if (!isInit && fromElStyle) { if (styleOpt.transition) { var transitionKeys = normalizeToArray(styleOpt.transition); !transFromStyleProps && (transFromStyleProps = transFromProps.style = {}); for (var i = 0; i < transitionKeys.length; i++) { var key = transitionKeys[i]; var elVal = fromElStyle[key]; // Do not clone, see `checkNonStyleTansitionRefer`. transFromStyleProps[key] = elVal; } } else if (el.getAnimationStyleProps && indexOf(elOption.transition, 'style') >= 0) { var animationProps = el.getAnimationStyleProps(); var animationStyleProps = animationProps ? animationProps.style : null; if (animationStyleProps) { !transFromStyleProps && (transFromStyleProps = transFromProps.style = {}); var styleKeys = keys(styleOpt); for (var i = 0; i < styleKeys.length; i++) { var key = styleKeys[i]; if (animationStyleProps[key]) { var elVal = fromElStyle[key]; transFromStyleProps[key] = elVal; } } } } } var leaveTo = styleOpt.leaveTo; if (leaveTo) { var leaveToKeys = keys(leaveTo); var leaveToProps = getOrCreateLeaveToPropsFromEl(el); var leaveToStyleProps = leaveToProps.style || (leaveToProps.style = {}); for (var i = 0; i < leaveToKeys.length; i++) { var key = leaveToKeys[i]; leaveToStyleProps[key] = leaveTo[key]; } } } /** * If make "transform"(x/y/scaleX/scaleY/orient/originX/originY) transition between * two path elements that have different hierarchy, before we retrieve the "from" props, * we have to calculate the local transition of the "oldPath" based on the parent of * the "newPath". * At present, the case only happend in "morphing". Without morphing, the transform * transition are all between elements in the same hierarchy, where this kind of process * is not needed. * * [CAVEAT]: * This method makes sense only if: (very tricky) * (1) "newEl" has been added to its final parent. * (2) Local transform props of "newPath.parent" are not at their final value but already * have been at the "from value". * This is currently ensured by: * (2.1) "graphicUtil.animationFrom", which will set the element to the "from value" * immediately. * (2.2) "morph" option is not allowed to be set on Group, so all of the groups have * been finished their "updateElNormal" when calling this method in morphing process. */ function calcOldElLocalTransformBasedOnNewElParent(oldEl, newEl) { if (!oldEl || oldEl === newEl || oldEl.parent === newEl.parent) { return oldEl; } // Not sure oldEl is rendered (may have "lazyUpdate"), // so always call `getComputedTransform`. var tmpM = tmpTransformable.transform || (tmpTransformable.transform = identity([])); var oldGlobalTransform = oldEl.getComputedTransform(); oldGlobalTransform ? copy$1(tmpM, oldGlobalTransform) : identity(tmpM); var newParent = newEl.parent; if (newParent) { newParent.getComputedTransform(); } tmpTransformable.originX = oldEl.originX; tmpTransformable.originY = oldEl.originY; tmpTransformable.parent = newParent; tmpTransformable.decomposeTransform(); return tmpTransformable; } var checkNonStyleTansitionRefer; if ("development" !== 'production') { checkNonStyleTansitionRefer = function (propName, optVal, elVal) { if (!isArrayLike(optVal)) { assert(optVal != null && isFinite(optVal), 'Prop `' + propName + '` must refer to a finite number or ArrayLike for transition.'); } else { // Try not to copy array for performance, but if user use the same object in different // call of `renderItem`, it will casue animation transition fail. assert(optVal !== elVal, 'Prop `' + propName + '` must use different Array object each time for transition.'); } }; } function isNonStyleTransitionEnabled(optVal, elVal) { // The same as `checkNonStyleTansitionRefer`. return !isArrayLike(optVal) ? optVal != null && isFinite(optVal) : optVal !== elVal; } var checkTransformPropRefer; if ("development" !== 'production') { checkTransformPropRefer = function (key, usedIn) { assert(hasOwn(TRANSFORM_PROPS, key), 'Prop `' + key + '` is not a permitted in `' + usedIn + '`. ' + 'Only `' + keys(TRANSFORM_PROPS).join('`, `') + '` are permitted.'); }; } function getOrCreateLeaveToPropsFromEl(el) { var innerEl = inner$9(el); return innerEl.leaveToProps || (innerEl.leaveToProps = {}); } // Use it to avoid it be exposed to user. var tmpDuringScope = {}; var customDuringAPI = { // Usually other props do not need to be changed in animation during. setTransform: function (key, val) { if ("development" !== 'production') { assert(hasOwn(TRANSFORM_PROPS, key), 'Only ' + transformPropNamesStr + ' available in `setTransform`.'); } tmpDuringScope.el[key] = val; return this; }, getTransform: function (key) { if ("development" !== 'production') { assert(hasOwn(TRANSFORM_PROPS, key), 'Only ' + transformPropNamesStr + ' available in `getTransform`.'); } return tmpDuringScope.el[key]; }, setShape: function (key, val) { if ("development" !== 'production') { assertNotReserved(key); } var shape = tmpDuringScope.el.shape || (tmpDuringScope.el.shape = {}); shape[key] = val; tmpDuringScope.isShapeDirty = true; return this; }, getShape: function (key) { if ("development" !== 'production') { assertNotReserved(key); } var shape = tmpDuringScope.el.shape; if (shape) { return shape[key]; } }, setStyle: function (key, val) { if ("development" !== 'production') { assertNotReserved(key); } var style = tmpDuringScope.el.style; if (style) { if ("development" !== 'production') { if (eqNaN(val)) { warn('style.' + key + ' must not be assigned with NaN.'); } } style[key] = val; tmpDuringScope.isStyleDirty = true; } return this; }, getStyle: function (key) { if ("development" !== 'production') { assertNotReserved(key); } var style = tmpDuringScope.el.style; if (style) { return style[key]; } }, setExtra: function (key, val) { if ("development" !== 'production') { assertNotReserved(key); } var extra = tmpDuringScope.el.extra || (tmpDuringScope.el.extra = {}); extra[key] = val; return this; }, getExtra: function (key) { if ("development" !== 'production') { assertNotReserved(key); } var extra = tmpDuringScope.el.extra; if (extra) { return extra[key]; } } }; function assertNotReserved(key) { if ("development" !== 'production') { if (key === 'transition' || key === 'enterFrom' || key === 'leaveTo') { throw new Error('key must not be "' + key + '"'); } } } function duringCall() { // Do not provide "percent" until some requirements come. // Because consider thies case: // enterFrom: {x: 100, y: 30}, transition: 'x'. // And enter duration is different from update duration. // Thus it might be confused about the meaning of "percent" in during callback. var scope = this; var el = scope.el; if (!el) { return; } // If el is remove from zr by reason like legend, during still need to called, // becuase el will be added back to zr and the prop value should not be incorrect. var newstUserDuring = inner$9(el).userDuring; var scopeUserDuring = scope.userDuring; // Ensured a during is only called once in each animation frame. // If a during is called multiple times in one frame, maybe some users' calulation logic // might be wrong (not sure whether this usage exists). // The case of a during might be called twice can be: by default there is a animator for // 'x', 'y' when init. Before the init animation finished, call `setOption` to start // another animators for 'style'/'shape'/'extra'. if (newstUserDuring !== scopeUserDuring) { // release scope.el = scope.userDuring = null; return; } tmpDuringScope.el = el; tmpDuringScope.isShapeDirty = false; tmpDuringScope.isStyleDirty = false; // Give no `this` to user in "during" calling. scopeUserDuring(customDuringAPI); if (tmpDuringScope.isShapeDirty && el.dirtyShape) { el.dirtyShape(); } if (tmpDuringScope.isStyleDirty && el.dirtyStyle) { el.dirtyStyle(); } // markRedraw() will be called by default in during. // FIXME `this.markRedraw();` directly ? // FIXME: if in future meet the case that some prop will be both modified in `during` and `state`, // consider the issue that the prop might be incorrect when return to "normal" state. } function updateElOnState(state, el, elStateOpt, styleOpt, attachedTxInfo, isRoot, isTextContent) { var elDisplayable = el.isGroup ? null : el; var txCfgOpt = attachedTxInfo && attachedTxInfo[state].cfg; // PENDING:5.0 support customize scale change and transition animation? if (elDisplayable) { // By default support auto lift color when hover whether `emphasis` specified. var stateObj = elDisplayable.ensureState(state); if (styleOpt === false) { var existingEmphasisState = elDisplayable.getState(state); if (existingEmphasisState) { existingEmphasisState.style = null; } } else { // style is needed to enable defaut emphasis. stateObj.style = styleOpt || null; } // If `elOption.styleEmphasis` or `elOption.emphasis.style` is `false`, // remove hover style. // If `elOption.textConfig` or `elOption.emphasis.textConfig` is null/undefined, it does not // make sense. So for simplicity, we do not ditinguish `hasOwnProperty` and null/undefined. if (txCfgOpt) { stateObj.textConfig = txCfgOpt; } setDefaultStateProxy(elDisplayable); } } function updateZ$1(el, elOption, seriesModel, attachedTxInfo) { // Group not support textContent and not support z yet. if (el.isGroup) { return; } var elDisplayable = el; var currentZ = seriesModel.currentZ; var currentZLevel = seriesModel.currentZLevel; // Always erase. elDisplayable.z = currentZ; elDisplayable.zlevel = currentZLevel; // z2 must not be null/undefined, otherwise sort error may occur. var optZ2 = elOption.z2; optZ2 != null && (elDisplayable.z2 = optZ2 || 0); for (var i = 0; i < STATES.length; i++) { updateZForEachState(elDisplayable, elOption, STATES[i]); } } function updateZForEachState(elDisplayable, elOption, state) { var isNormal = state === NORMAL; var elStateOpt = isNormal ? elOption : retrieveStateOption(elOption, state); var optZ2 = elStateOpt ? elStateOpt.z2 : null; var stateObj; if (optZ2 != null) { // Do not `ensureState` until required. stateObj = isNormal ? elDisplayable : elDisplayable.ensureState(state); stateObj.z2 = optZ2 || 0; } } function setLagecyTransformProp(elOption, targetProps, legacyName, fromTransformable // If provided, retrieve from the element. ) { var legacyArr = elOption[legacyName]; var xyName = LEGACY_TRANSFORM_PROPS[legacyName]; if (legacyArr) { if (fromTransformable) { targetProps[xyName[0]] = fromTransformable[xyName[0]]; targetProps[xyName[1]] = fromTransformable[xyName[1]]; } else { targetProps[xyName[0]] = legacyArr[0]; targetProps[xyName[1]] = legacyArr[1]; } } } function setTransformProp(elOption, allProps, name, fromTransformable // If provided, retrieve from the element. ) { if (elOption[name] != null) { allProps[name] = fromTransformable ? fromTransformable[name] : elOption[name]; } } function setTransformPropToTransitionFrom(transitionFrom, name, fromTransformable // If provided, retrieve from the element. ) { if (fromTransformable) { transitionFrom[name] = fromTransformable[name]; } } function makeRenderItem(customSeries, data, ecModel, api) { var renderItem = customSeries.get('renderItem'); var coordSys = customSeries.coordinateSystem; var prepareResult = {}; if (coordSys) { if ("development" !== 'production') { assert(renderItem, 'series.render is required.'); assert(coordSys.prepareCustoms || prepareCustoms[coordSys.type], 'This coordSys does not support custom series.'); } // `coordSys.prepareCustoms` is used for external coord sys like bmap. prepareResult = coordSys.prepareCustoms ? coordSys.prepareCustoms(coordSys) : prepareCustoms[coordSys.type](coordSys); } var userAPI = defaults({ getWidth: api.getWidth, getHeight: api.getHeight, getZr: api.getZr, getDevicePixelRatio: api.getDevicePixelRatio, value: value, style: style, ordinalRawValue: ordinalRawValue, styleEmphasis: styleEmphasis, visual: visual, barLayout: barLayout, currentSeriesIndices: currentSeriesIndices, font: font }, prepareResult.api || {}); var userParams = { // The life cycle of context: current round of rendering. // The global life cycle is probably not necessary, because // user can store global status by themselves. context: {}, seriesId: customSeries.id, seriesName: customSeries.name, seriesIndex: customSeries.seriesIndex, coordSys: prepareResult.coordSys, dataInsideLength: data.count(), encode: wrapEncodeDef(customSeries.getData()) }; // If someday intending to refactor them to a class, should consider do not // break change: currently these attribute member are encapsulated in a closure // so that do not need to force user to call these method with a scope. // Do not support call `api` asynchronously without dataIndexInside input. var currDataIndexInside; var currItemModel; var currItemStyleModels = {}; var currLabelModels = {}; var seriesItemStyleModels = {}; var seriesLabelModels = {}; for (var i = 0; i < STATES.length; i++) { var stateName = STATES[i]; seriesItemStyleModels[stateName] = customSeries.getModel(PATH_ITEM_STYLE[stateName]); seriesLabelModels[stateName] = customSeries.getModel(PATH_LABEL[stateName]); } function getItemModel(dataIndexInside) { return dataIndexInside === currDataIndexInside ? currItemModel || (currItemModel = data.getItemModel(dataIndexInside)) : data.getItemModel(dataIndexInside); } function getItemStyleModel(dataIndexInside, state) { return !data.hasItemOption ? seriesItemStyleModels[state] : dataIndexInside === currDataIndexInside ? currItemStyleModels[state] || (currItemStyleModels[state] = getItemModel(dataIndexInside).getModel(PATH_ITEM_STYLE[state])) : getItemModel(dataIndexInside).getModel(PATH_ITEM_STYLE[state]); } function getLabelModel(dataIndexInside, state) { return !data.hasItemOption ? seriesLabelModels[state] : dataIndexInside === currDataIndexInside ? currLabelModels[state] || (currLabelModels[state] = getItemModel(dataIndexInside).getModel(PATH_LABEL[state])) : getItemModel(dataIndexInside).getModel(PATH_LABEL[state]); } return function (dataIndexInside, payload) { currDataIndexInside = dataIndexInside; currItemModel = null; currItemStyleModels = {}; currLabelModels = {}; return renderItem && renderItem(defaults({ dataIndexInside: dataIndexInside, dataIndex: data.getRawIndex(dataIndexInside), // Can be used for optimization when zoom or roam. actionType: payload ? payload.type : null }, userParams), userAPI); }; /** * @public * @param dim by default 0. * @param dataIndexInside by default `currDataIndexInside`. */ function value(dim, dataIndexInside) { dataIndexInside == null && (dataIndexInside = currDataIndexInside); return data.get(data.getDimension(dim || 0), dataIndexInside); } /** * @public * @param dim by default 0. * @param dataIndexInside by default `currDataIndexInside`. */ function ordinalRawValue(dim, dataIndexInside) { dataIndexInside == null && (dataIndexInside = currDataIndexInside); var dimInfo = data.getDimensionInfo(dim || 0); if (!dimInfo) { return; } var val = data.get(dimInfo.name, dataIndexInside); var ordinalMeta = dimInfo && dimInfo.ordinalMeta; return ordinalMeta ? ordinalMeta.categories[val] : val; } /** * @deprecated The orgininal intention of `api.style` is enable to set itemStyle * like other series. But it not necessary and not easy to give a strict definition * of what it return. And since echarts5 it needs to be make compat work. So * deprecates it since echarts5. * * By default, `visual` is applied to style (to support visualMap). * `visual.color` is applied at `fill`. If user want apply visual.color on `stroke`, * it can be implemented as: * `api.style({stroke: api.visual('color'), fill: null})`; * * [Compat]: since ec5, RectText has been separated from its hosts el. * so `api.style()` will only return the style from `itemStyle` but not handle `label` * any more. But `series.label` config is never published in doc. * We still compat it in `api.style()`. But not encourage to use it and will still not * to pulish it to doc. * @public * @param dataIndexInside by default `currDataIndexInside`. */ function style(userProps, dataIndexInside) { if ("development" !== 'production') { warnDeprecated('api.style', 'Please write literal style directly instead.'); } dataIndexInside == null && (dataIndexInside = currDataIndexInside); var style = data.getItemVisual(dataIndexInside, 'style'); var visualColor = style && style.fill; var opacity = style && style.opacity; var itemStyle = getItemStyleModel(dataIndexInside, NORMAL).getItemStyle(); visualColor != null && (itemStyle.fill = visualColor); opacity != null && (itemStyle.opacity = opacity); var opt = { inheritColor: isString(visualColor) ? visualColor : '#000' }; var labelModel = getLabelModel(dataIndexInside, NORMAL); // Now that the feture of "auto adjust text fill/stroke" has been migrated to zrender // since ec5, we should set `isAttached` as `false` here and make compat in // `convertToEC4StyleForCustomSerise`. var textStyle = createTextStyle(labelModel, null, opt, false, true); textStyle.text = labelModel.getShallow('show') ? retrieve2(customSeries.getFormattedLabel(dataIndexInside, NORMAL), getDefaultLabel(data, dataIndexInside)) : null; var textConfig = createTextConfig(labelModel, opt, false); preFetchFromExtra(userProps, itemStyle); itemStyle = convertToEC4StyleForCustomSerise(itemStyle, textStyle, textConfig); userProps && applyUserPropsAfter(itemStyle, userProps); itemStyle.legacy = true; return itemStyle; } /** * @deprecated The reason see `api.style()` * @public * @param dataIndexInside by default `currDataIndexInside`. */ function styleEmphasis(userProps, dataIndexInside) { if ("development" !== 'production') { warnDeprecated('api.styleEmphasis', 'Please write literal style directly instead.'); } dataIndexInside == null && (dataIndexInside = currDataIndexInside); var itemStyle = getItemStyleModel(dataIndexInside, EMPHASIS).getItemStyle(); var labelModel = getLabelModel(dataIndexInside, EMPHASIS); var textStyle = createTextStyle(labelModel, null, null, true, true); textStyle.text = labelModel.getShallow('show') ? retrieve3(customSeries.getFormattedLabel(dataIndexInside, EMPHASIS), customSeries.getFormattedLabel(dataIndexInside, NORMAL), getDefaultLabel(data, dataIndexInside)) : null; var textConfig = createTextConfig(labelModel, null, true); preFetchFromExtra(userProps, itemStyle); itemStyle = convertToEC4StyleForCustomSerise(itemStyle, textStyle, textConfig); userProps && applyUserPropsAfter(itemStyle, userProps); itemStyle.legacy = true; return itemStyle; } function applyUserPropsAfter(itemStyle, extra) { for (var key in extra) { if (hasOwn(extra, key)) { itemStyle[key] = extra[key]; } } } function preFetchFromExtra(extra, itemStyle) { // A trick to retrieve those props firstly, which are used to // apply auto inside fill/stroke in `convertToEC4StyleForCustomSerise`. // (It's not reasonable but only for a degree of compat) if (extra) { extra.textFill && (itemStyle.textFill = extra.textFill); extra.textPosition && (itemStyle.textPosition = extra.textPosition); } } /** * @public * @param dataIndexInside by default `currDataIndexInside`. */ function visual(visualType, dataIndexInside) { dataIndexInside == null && (dataIndexInside = currDataIndexInside); if (hasOwn(STYLE_VISUAL_TYPE, visualType)) { var style_1 = data.getItemVisual(dataIndexInside, 'style'); return style_1 ? style_1[STYLE_VISUAL_TYPE[visualType]] : null; } // Only support these visuals. Other visual might be inner tricky // for performance (like `style`), do not expose to users. if (hasOwn(NON_STYLE_VISUAL_PROPS, visualType)) { return data.getItemVisual(dataIndexInside, visualType); } } /** * @public * @return If not support, return undefined. */ function barLayout(opt) { if (coordSys.type === 'cartesian2d') { var baseAxis = coordSys.getBaseAxis(); return getLayoutOnAxis(defaults({ axis: baseAxis }, opt)); } } /** * @public */ function currentSeriesIndices() { return ecModel.getCurrentSeriesIndices(); } /** * @public * @return font string */ function font(opt) { return getFont(opt, ecModel); } } function wrapEncodeDef(data) { var encodeDef = {}; each(data.dimensions, function (dimName, dataDimIndex) { var dimInfo = data.getDimensionInfo(dimName); if (!dimInfo.isExtraCoord) { var coordDim = dimInfo.coordDim; var dataDims = encodeDef[coordDim] = encodeDef[coordDim] || []; dataDims[dimInfo.coordDimIndex] = dataDimIndex; } }); return encodeDef; } function createOrUpdateItem(api, el, dataIndex, elOption, seriesModel, group, data, morphPreparation) { // [Rule] // If `renderItem` returns `null`/`undefined`/`false`, remove the previous el if existing. // (It seems that violate the "merge" principle, but most of users probably intuitively // regard "return;" as "show nothing element whatever", so make a exception to meet the // most cases.) // The rule or "merge" see [STRATEGY_MERGE]. // If `elOption` is `null`/`undefined`/`false` (when `renderItem` returns nothing). if (!elOption) { removeElementDirectly(el, group); return; } el = doCreateOrUpdateEl(api, el, dataIndex, elOption, seriesModel, group, true, morphPreparation); el && data.setItemGraphicEl(dataIndex, el); enableHoverEmphasis(el, elOption.focus, elOption.blurScope); return el; } function doCreateOrUpdateEl(api, el, dataIndex, elOption, seriesModel, group, isRoot, morphPreparation) { if ("development" !== 'production') { assert(elOption, 'should not have an null/undefined element setting'); } var toBeReplacedIdx = -1; if (el && doesElNeedRecreate(el, elOption) // || ( // // PENDING: even in one-to-one mapping case, if el is marked as morph, // // do not sure whether the el will be mapped to another el with different // // hierarchy in Group tree. So always recreate el rather than reuse the el. // morphPreparation && morphPreparation.isOneToOneFrom(el) // ) ) { // Should keep at the original index, otherwise "merge by index" will be incorrect. toBeReplacedIdx = group.childrenRef().indexOf(el); el = null; } var elIsNewCreated = !el; if (!el) { el = createEl(elOption); } else { // FIMXE:NEXT unified clearState? // If in some case the performance issue arised, consider // do not clearState but update cached normal state directly. el.clearStates(); } var canMorph = inner$9(el).canMorph = elOption.morph && isPath$1(el); var thisElIsMorphTo = canMorph && morphPreparation && morphPreparation.hasFrom(); // Use update animation when morph is enabled. var isInit = elIsNewCreated && !thisElIsMorphTo; attachedTxInfoTmp.normal.cfg = attachedTxInfoTmp.normal.conOpt = attachedTxInfoTmp.emphasis.cfg = attachedTxInfoTmp.emphasis.conOpt = attachedTxInfoTmp.blur.cfg = attachedTxInfoTmp.blur.conOpt = attachedTxInfoTmp.select.cfg = attachedTxInfoTmp.select.conOpt = null; attachedTxInfoTmp.isLegacy = false; doCreateOrUpdateAttachedTx(el, dataIndex, elOption, seriesModel, isInit, attachedTxInfoTmp); doCreateOrUpdateClipPath(el, dataIndex, elOption, seriesModel, isInit); var pendingAllPropsFinal = updateElNormal(api, el, thisElIsMorphTo, dataIndex, elOption, elOption.style, attachedTxInfoTmp, seriesModel, isInit, false); if (thisElIsMorphTo) { morphPreparation.addTo(el, elOption, dataIndex, pendingAllPropsFinal); } for (var i = 0; i < STATES.length; i++) { var stateName = STATES[i]; if (stateName !== NORMAL) { var otherStateOpt = retrieveStateOption(elOption, stateName); var otherStyleOpt = retrieveStyleOptionOnState(elOption, otherStateOpt, stateName); updateElOnState(stateName, el, otherStateOpt, otherStyleOpt, attachedTxInfoTmp); } } updateZ$1(el, elOption, seriesModel); if (elOption.type === 'group') { mergeChildren(api, el, dataIndex, elOption, seriesModel, morphPreparation); } if (toBeReplacedIdx >= 0) { group.replaceAt(el, toBeReplacedIdx); } else { group.add(el); } return el; } // `el` must not be null/undefined. function doesElNeedRecreate(el, elOption) { var elInner = inner$9(el); var elOptionType = elOption.type; var elOptionShape = elOption.shape; var elOptionStyle = elOption.style; return (// If `elOptionType` is `null`, follow the merge principle. elOptionType != null && elOptionType !== elInner.customGraphicType || elOptionType === 'path' && hasOwnPathData(elOptionShape) && getPathData(elOptionShape) !== elInner.customPathData || elOptionType === 'image' && hasOwn(elOptionStyle, 'image') && elOptionStyle.image !== elInner.customImagePath // // FIXME test and remove this restriction? // || (elOptionType === 'text' // && hasOwn(elOptionStyle, 'text') // && (elOptionStyle as TextStyleProps).text !== elInner.customText // ) ); } function doCreateOrUpdateClipPath(el, dataIndex, elOption, seriesModel, isInit) { // Based on the "merge" principle, if no clipPath provided, // do nothing. The exists clip will be totally removed only if // `el.clipPath` is `false`. Otherwise it will be merged/replaced. var clipPathOpt = elOption.clipPath; if (clipPathOpt === false) { if (el && el.getClipPath()) { el.removeClipPath(); } } else if (clipPathOpt) { var clipPath = el.getClipPath(); if (clipPath && doesElNeedRecreate(clipPath, clipPathOpt)) { clipPath = null; } if (!clipPath) { clipPath = createEl(clipPathOpt); if ("development" !== 'production') { assert(clipPath instanceof Path, 'Only any type of `path` can be used in `clipPath`, rather than ' + clipPath.type + '.'); } el.setClipPath(clipPath); } updateElNormal(null, clipPath, null, dataIndex, clipPathOpt, null, null, seriesModel, isInit, false); } // If not define `clipPath` in option, do nothing unnecessary. } function doCreateOrUpdateAttachedTx(el, dataIndex, elOption, seriesModel, isInit, attachedTxInfo) { // group do not support textContent temporarily untill necessary. if (el.isGroup) { return; } // Normal must be called before emphasis, for `isLegacy` detection. processTxInfo(elOption, null, attachedTxInfo); processTxInfo(elOption, EMPHASIS, attachedTxInfo); // If `elOption.textConfig` or `elOption.textContent` is null/undefined, it does not make sence. // So for simplicity, if "elOption hasOwnProperty of them but be null/undefined", we do not // trade them as set to null to el. // Especially: // `elOption.textContent: false` means remove textContent. // `elOption.textContent.emphasis.style: false` means remove the style from emphasis state. var txConOptNormal = attachedTxInfo.normal.conOpt; var txConOptEmphasis = attachedTxInfo.emphasis.conOpt; var txConOptBlur = attachedTxInfo.blur.conOpt; var txConOptSelect = attachedTxInfo.select.conOpt; if (txConOptNormal != null || txConOptEmphasis != null || txConOptSelect != null || txConOptBlur != null) { var textContent = el.getTextContent(); if (txConOptNormal === false) { textContent && el.removeTextContent(); } else { txConOptNormal = attachedTxInfo.normal.conOpt = txConOptNormal || { type: 'text' }; if (!textContent) { textContent = createEl(txConOptNormal); el.setTextContent(textContent); } else { // If in some case the performance issue arised, consider // do not clearState but update cached normal state directly. textContent.clearStates(); } var txConStlOptNormal = txConOptNormal && txConOptNormal.style; updateElNormal(null, textContent, null, dataIndex, txConOptNormal, txConStlOptNormal, null, seriesModel, isInit, true); for (var i = 0; i < STATES.length; i++) { var stateName = STATES[i]; if (stateName !== NORMAL) { var txConOptOtherState = attachedTxInfo[stateName].conOpt; updateElOnState(stateName, textContent, txConOptOtherState, retrieveStyleOptionOnState(txConOptNormal, txConOptOtherState, stateName), null); } } txConStlOptNormal ? textContent.dirty() : textContent.markRedraw(); } } } function processTxInfo(elOption, state, attachedTxInfo) { var stateOpt = !state ? elOption : retrieveStateOption(elOption, state); var styleOpt = !state ? elOption.style : retrieveStyleOptionOnState(elOption, stateOpt, EMPHASIS); var elType = elOption.type; var txCfg = stateOpt ? stateOpt.textConfig : null; var txConOptNormal = elOption.textContent; var txConOpt = !txConOptNormal ? null : !state ? txConOptNormal : retrieveStateOption(txConOptNormal, state); if (styleOpt && ( // Because emphasis style has little info to detect legacy, // if normal is legacy, emphasis is trade as legacy. attachedTxInfo.isLegacy || isEC4CompatibleStyle(styleOpt, elType, !!txCfg, !!txConOpt))) { attachedTxInfo.isLegacy = true; var convertResult = convertFromEC4CompatibleStyle(styleOpt, elType, !state); // Explicitly specified `textConfig` and `textContent` has higher priority than // the ones generated by legacy style. Otherwise if users use them and `api.style` // at the same time, they not both work and hardly to known why. if (!txCfg && convertResult.textConfig) { txCfg = convertResult.textConfig; } if (!txConOpt && convertResult.textContent) { txConOpt = convertResult.textContent; } } if (!state && txConOpt) { var txConOptNormal_1 = txConOpt; // `textContent: {type: 'text'}`, the "type" is easy to be missing. So we tolerate it. !txConOptNormal_1.type && (txConOptNormal_1.type = 'text'); if ("development" !== 'production') { // Do not tolerate incorret type for forward compat. txConOptNormal_1.type !== 'text' && assert(txConOptNormal_1.type === 'text', 'textContent.type must be "text"'); } } var info = !state ? attachedTxInfo.normal : attachedTxInfo[state]; info.cfg = txCfg; info.conOpt = txConOpt; } function retrieveStateOption(elOption, state) { return !state ? elOption : elOption ? elOption[state] : null; } function retrieveStyleOptionOnState(stateOptionNormal, stateOption, state) { var style = stateOption && stateOption.style; if (style == null && state === EMPHASIS && stateOptionNormal) { style = stateOptionNormal.styleEmphasis; } return style; } // Usage: // (1) By default, `elOption.$mergeChildren` is `'byIndex'`, which indicates that // the existing children will not be removed, and enables the feature that // update some of the props of some of the children simply by construct // the returned children of `renderItem` like: // `var children = group.children = []; children[3] = {opacity: 0.5};` // (2) If `elOption.$mergeChildren` is `'byName'`, add/update/remove children // by child.name. But that might be lower performance. // (3) If `elOption.$mergeChildren` is `false`, the existing children will be // replaced totally. // (4) If `!elOption.children`, following the "merge" principle, nothing will happen. // // For implementation simpleness, do not provide a direct way to remove sinlge // child (otherwise the total indicies of the children array have to be modified). // User can remove a single child by set its `ignore` as `true`. function mergeChildren(api, el, dataIndex, elOption, seriesModel, morphPreparation) { var newChildren = elOption.children; var newLen = newChildren ? newChildren.length : 0; var mergeChildren = elOption.$mergeChildren; // `diffChildrenByName` has been deprecated. var byName = mergeChildren === 'byName' || elOption.diffChildrenByName; var notMerge = mergeChildren === false; // For better performance on roam update, only enter if necessary. if (!newLen && !byName && !notMerge) { return; } if (byName) { diffGroupChildren({ api: api, oldChildren: el.children() || [], newChildren: newChildren || [], dataIndex: dataIndex, seriesModel: seriesModel, group: el, morphPreparation: morphPreparation }); return; } notMerge && el.removeAll(); // Mapping children of a group simply by index, which // might be better performance. var index = 0; for (; index < newLen; index++) { newChildren[index] && doCreateOrUpdateEl(api, el.childAt(index), dataIndex, newChildren[index], seriesModel, el, false, morphPreparation); } for (var i = el.childCount() - 1; i >= index; i--) { // Do not supprot leave elements that are not mentioned in the latest // `renderItem` return. Otherwise users may not have a clear and simple // concept that how to contorl all of the elements. doRemoveEl(el.childAt(i), seriesModel, el); } } function diffGroupChildren(context) { new DataDiffer(context.oldChildren, context.newChildren, getKey, getKey, context).add(processAddUpdate).update(processAddUpdate).remove(processRemove).execute(); } function getKey(item, idx) { var name = item && item.name; return name != null ? name : GROUP_DIFF_PREFIX + idx; } function processAddUpdate(newIndex, oldIndex) { var context = this.context; var childOption = newIndex != null ? context.newChildren[newIndex] : null; var child = oldIndex != null ? context.oldChildren[oldIndex] : null; doCreateOrUpdateEl(context.api, child, context.dataIndex, childOption, context.seriesModel, context.group, false, context.morphPreparation); } function processRemove(oldIndex) { var context = this.context; var child = context.oldChildren[oldIndex]; doRemoveEl(child, context.seriesModel, context.group); } function doRemoveEl(el, seriesModel, group) { if (el) { var leaveToProps = inner$9(el).leaveToProps; leaveToProps ? updateProps(el, leaveToProps, seriesModel, { cb: function () { group.remove(el); } }) : group.remove(el); } } /** * @return SVG Path data. */ function getPathData(shape) { // "d" follows the SVG convention. return shape && (shape.pathData || shape.d); } function hasOwnPathData(shape) { return shape && (hasOwn(shape, 'pathData') || hasOwn(shape, 'd')); } function isPath$1(el) { return el && el instanceof Path; } function removeElementDirectly(el, group) { el && group.remove(el); } /** * Any morph-potential el should added by `morphPreparation.addTo(el)`. * And they may apply morph or not when `morphPreparation.applyMorphing()`. * But at least, all of the "to" elements will apply all of the updates * as `doCreateOrUpdateItem` did. */ var MorphPreparation = /** @class */ function () { function MorphPreparation(seriesModel, transOpt) { this._fromList = []; this._toList = []; this._toElOptionList = []; this._allPropsFinalList = []; this._toDataIndices = []; // Key: `toDataIndex`, not `toIdx` this._morphConfigList = []; this._seriesModel = seriesModel; this._transOpt = transOpt; } MorphPreparation.prototype.hasFrom = function () { return !!this._fromList.length; }; // isOneToOneFrom(el: Element): boolean { // if (el && inner(el).canMorph) { // const fromList = this._fromList; // for (let i = 0; i < fromList.length; i++) { // if (fromList[i] === el) { // return true; // } // } // } // } MorphPreparation.prototype.findAndAddFrom = function (el) { if (!el) { return; } if (inner$9(el).canMorph) { this._fromList.push(el); } if (el.isGroup) { var children = el.childrenRef(); for (var i = 0; i < children.length; i++) { this.findAndAddFrom(children[i]); } } }; MorphPreparation.prototype.addTo = function (path, elOption, dataIndex, allPropsFinal) { if (path) { this._toList.push(path); this._toElOptionList.push(elOption); this._toDataIndices.push(dataIndex); this._allPropsFinalList.push(allPropsFinal); } }; MorphPreparation.prototype.applyMorphing = function () { // [MORPHING_LOGIC_HINT] // Pay attention to the order: // (A) Apply `allPropsFinal` and `styleOption` to "to". // (Then "to" becomes to the final state.) // (B) Apply `morphPath`/`combine`/`separate`. // (Based on the current state of "from" and the final state of "to".) // (Then we may get "from.subList" or "to.subList".) // (C) Copy the related props from "from" to "from.subList", from "to" to "to.subList". // (D) Collect `transitionFromProps` for "to" and "to.subList" // (Based on "from" or "from.subList".) // (E) Apply `transitionFromProps` to "to" and "to.subList" // (It might change the prop values to the first frame value.) // Case_I: // If (D) should be after (C), we use sequence: A - B - C - D - E // Case_II: // If (A) should be after (D), we use sequence: D - A - B - C - E // [MORPHING_LOGIC_HINT] // zrender `morphPath`/`combine`/`separate` only manages the shape animation. // Other props (like transfrom, style transition) will handled in echarts). // [MORPHING_LOGIC_HINT] // Make sure `applyPropsFinal` always be called for "to". var type = this._type; var fromList = this._fromList; var toList = this._toList; var toListLen = toList.length; var fromListLen = fromList.length; if (!fromListLen || !toListLen) { return; } if (type === 'oneToOne') { // In one-to-one case, we by default apply a simple rule: // map "from" and "to" one by one. // For this case: old_data_item_el and new_data_item_el // has the same hierarchy of group tree but only some path type changed. for (var toIdx = 0; toIdx < toListLen; toIdx++) { this._oneToOneForSingleTo(toIdx, toIdx); } } else if (type === 'manyToOne') { // A rough strategy: if there are more than one "to", we simply divide "fromList" equally. var fromSingleSegLen = Math.max(1, Math.floor(fromListLen / toListLen)); for (var toIdx = 0, fromIdxStart = 0; toIdx < toListLen; toIdx++, fromIdxStart += fromSingleSegLen) { var fromCount = toIdx + 1 >= toListLen ? fromListLen - fromIdxStart : fromSingleSegLen; this._manyToOneForSingleTo(toIdx, fromIdxStart >= fromListLen ? null : fromIdxStart, fromCount); } } else if (type === 'oneToMany') { // A rough strategy: if there are more than one "from", we simply divide "toList" equally. var toSingleSegLen = Math.max(1, Math.floor(toListLen / fromListLen)); for (var toIdxStart = 0, fromIdx = 0; toIdxStart < toListLen; toIdxStart += toSingleSegLen, fromIdx++) { var toCount = toIdxStart + toSingleSegLen >= toListLen ? toListLen - toIdxStart : toSingleSegLen; this._oneToManyForSingleFrom(toIdxStart, toCount, fromIdx >= fromListLen ? null : fromIdx); } } }; MorphPreparation.prototype._oneToOneForSingleTo = function ( // "to" must NOT be null/undefined. toIdx, // May `fromIdx >= this._fromList.length` fromIdx) { var to = this._toList[toIdx]; var toElOption = this._toElOptionList[toIdx]; var toDataIndex = this._toDataIndices[toIdx]; var allPropsFinal = this._allPropsFinalList[toIdx]; var from = this._fromList[fromIdx]; var elAnimationConfig = this._getOrCreateMorphConfig(toDataIndex); var morphDuration = elAnimationConfig.duration; if (from && isCombiningPath(from)) { applyPropsFinal(to, allPropsFinal, toElOption.style); if (morphDuration) { var combineResult = combine([from], to, elAnimationConfig, copyPropsWhenDivided); this._processResultIndividuals(combineResult, toIdx, null); } // The target el will not be displayed and transition from multiple path. // transition on the target el does not make sense. } else { var morphFrom = morphDuration // from === to usually happen in scenarios where internal update like // "dataZoom", "legendToggle" happen. If from is not in any morphing, // we do not need to call `morphPath`. && from && (from !== to || isInAnyMorphing(from)) ? from : null; // See [Case_II] above. // In this case, there is probably `from === to`. And the `transitionFromProps` collecting // does not depends on morphing. So we collect `transitionFromProps` first. var transFromProps = {}; prepareShapeOrExtraTransitionFrom('shape', to, morphFrom, toElOption, transFromProps, false); prepareShapeOrExtraTransitionFrom('extra', to, morphFrom, toElOption, transFromProps, false); prepareTransformTransitionFrom(to, morphFrom, toElOption, transFromProps, false); prepareStyleTransitionFrom(to, morphFrom, toElOption, toElOption.style, transFromProps, false); applyPropsFinal(to, allPropsFinal, toElOption.style); if (morphFrom) { morphPath(morphFrom, to, elAnimationConfig); } applyTransitionFrom(to, toDataIndex, toElOption, this._seriesModel, transFromProps, false); } }; MorphPreparation.prototype._manyToOneForSingleTo = function ( // "to" must NOT be null/undefined. toIdx, // May be null. fromIdxStart, fromCount) { var to = this._toList[toIdx]; var toElOption = this._toElOptionList[toIdx]; var allPropsFinal = this._allPropsFinalList[toIdx]; applyPropsFinal(to, allPropsFinal, toElOption.style); var elAnimationConfig = this._getOrCreateMorphConfig(this._toDataIndices[toIdx]); if (elAnimationConfig.duration && fromIdxStart != null) { var combineFromList = []; for (var fromIdx = fromIdxStart; fromIdx < fromCount; fromIdx++) { combineFromList.push(this._fromList[fromIdx]); } var combineResult = combine(combineFromList, to, elAnimationConfig, copyPropsWhenDivided); this._processResultIndividuals(combineResult, toIdx, null); } }; MorphPreparation.prototype._oneToManyForSingleFrom = function ( // "to" must NOT be null/undefined. toIdxStart, toCount, // May be null fromIdx) { var from = fromIdx == null ? null : this._fromList[fromIdx]; var toList = this._toList; var separateToList = []; for (var toIdx = toIdxStart; toIdx < toCount; toIdx++) { var to = toList[toIdx]; applyPropsFinal(to, this._allPropsFinalList[toIdx], this._toElOptionList[toIdx].style); separateToList.push(to); } var elAnimationConfig = this._getOrCreateMorphConfig(this._toDataIndices[toIdxStart]); if (elAnimationConfig.duration && from) { var separateResult = separate(from, separateToList, elAnimationConfig, copyPropsWhenDivided); this._processResultIndividuals(separateResult, toIdxStart, toCount); } }; MorphPreparation.prototype._processResultIndividuals = function (combineSeparateResult, toIdxStart, toCount) { var isSeparate = toCount != null; for (var i = 0; i < combineSeparateResult.count; i++) { var fromIndividual = combineSeparateResult.fromIndividuals[i]; var toIndividual = combineSeparateResult.toIndividuals[i]; // Here it's a trick: // For "combine" case, all of the `toIndividuals` map to the same `toIdx`. // For "separate" case, the `toIndividuals` map to some certain segment of `_toList` accurately. var toIdx = toIdxStart + (isSeparate ? i : 0); var toElOption = this._toElOptionList[toIdx]; var dataIndex = this._toDataIndices[toIdx]; var transFromProps = {}; prepareTransformTransitionFrom(toIndividual, fromIndividual, toElOption, transFromProps, false); prepareStyleTransitionFrom(toIndividual, fromIndividual, toElOption, toElOption.style, transFromProps, false); applyTransitionFrom(toIndividual, dataIndex, toElOption, this._seriesModel, transFromProps, false); } }; MorphPreparation.prototype._getOrCreateMorphConfig = function (dataIndex) { var morphConfigList = this._morphConfigList; var config = morphConfigList[dataIndex]; if (config) { return config; } var duration; var easing; var delay; var seriesModel = this._seriesModel; var transOpt = this._transOpt; if (seriesModel.isAnimationEnabled()) { // PENDING: refactor? this is the same logic as `src/util/graphic.ts#animateOrSetProps`. var animationPayload = void 0; if (seriesModel && seriesModel.ecModel) { var updatePayload = seriesModel.ecModel.getUpdatePayload(); animationPayload = updatePayload && updatePayload.animation; } if (animationPayload) { duration = animationPayload.duration || 0; easing = animationPayload.easing || 'cubicOut'; delay = animationPayload.delay || 0; } else { easing = seriesModel.get('animationEasingUpdate'); var delayOption = seriesModel.get('animationDelayUpdate'); delay = isFunction(delayOption) ? delayOption(dataIndex) : delayOption; var durationOption = seriesModel.get('animationDurationUpdate'); duration = isFunction(durationOption) ? durationOption(dataIndex) : durationOption; } } config = { duration: duration || 0, delay: delay, easing: easing, dividingMethod: transOpt ? transOpt.dividingMethod : null }; morphConfigList[dataIndex] = config; return config; }; MorphPreparation.prototype.reset = function (type) { // `this._morphConfigList` can be kept. It only related to `dataIndex`. this._type = type; this._fromList.length = this._toList.length = this._toElOptionList.length = this._allPropsFinalList.length = this._toDataIndices.length = 0; }; return MorphPreparation; }(); function copyPropsWhenDivided(srcPath, tarPath, willClone) { // Do not copy transform props. // Sub paths are transfrom based on their host path. // tarPath.x = srcPath.x; // tarPath.y = srcPath.y; // tarPath.scaleX = srcPath.scaleX; // tarPath.scaleY = srcPath.scaleY; // tarPath.originX = srcPath.originX; // tarPath.originY = srcPath.originY; // If just carry the style, will not be modifed, so do not copy. tarPath.style = willClone ? clone(srcPath.style) : srcPath.style; tarPath.zlevel = srcPath.zlevel; tarPath.z = srcPath.z; tarPath.z2 = srcPath.z2; } function install$r(registers) { registers.registerChartView(CustomSeriesView); registers.registerSeriesModel(CustomSeriesModel); } var inner$a = makeInner(); var clone$3 = clone; var bind$1 = bind; /** * Base axis pointer class in 2D. */ var BaseAxisPointer = /** @class */ function () { function BaseAxisPointer() { this._dragging = false; /** * In px, arbitrary value. Do not set too small, * no animation is ok for most cases. */ this.animationThreshold = 15; } /** * @implement */ BaseAxisPointer.prototype.render = function (axisModel, axisPointerModel, api, forceRender) { var value = axisPointerModel.get('value'); var status = axisPointerModel.get('status'); // Bind them to `this`, not in closure, otherwise they will not // be replaced when user calling setOption in not merge mode. this._axisModel = axisModel; this._axisPointerModel = axisPointerModel; this._api = api; // Optimize: `render` will be called repeatly during mouse move. // So it is power consuming if performing `render` each time, // especially on mobile device. if (!forceRender && this._lastValue === value && this._lastStatus === status) { return; } this._lastValue = value; this._lastStatus = status; var group = this._group; var handle = this._handle; if (!status || status === 'hide') { // Do not clear here, for animation better. group && group.hide(); handle && handle.hide(); return; } group && group.show(); handle && handle.show(); // Otherwise status is 'show' var elOption = {}; this.makeElOption(elOption, value, axisModel, axisPointerModel, api); // Enable change axis pointer type. var graphicKey = elOption.graphicKey; if (graphicKey !== this._lastGraphicKey) { this.clear(api); } this._lastGraphicKey = graphicKey; var moveAnimation = this._moveAnimation = this.determineAnimation(axisModel, axisPointerModel); if (!group) { group = this._group = new Group(); this.createPointerEl(group, elOption, axisModel, axisPointerModel); this.createLabelEl(group, elOption, axisModel, axisPointerModel); api.getZr().add(group); } else { var doUpdateProps = curry(updateProps$1, axisPointerModel, moveAnimation); this.updatePointerEl(group, elOption, doUpdateProps); this.updateLabelEl(group, elOption, doUpdateProps, axisPointerModel); } updateMandatoryProps(group, axisPointerModel, true); this._renderHandle(value); }; /** * @implement */ BaseAxisPointer.prototype.remove = function (api) { this.clear(api); }; /** * @implement */ BaseAxisPointer.prototype.dispose = function (api) { this.clear(api); }; /** * @protected */ BaseAxisPointer.prototype.determineAnimation = function (axisModel, axisPointerModel) { var animation = axisPointerModel.get('animation'); var axis = axisModel.axis; var isCategoryAxis = axis.type === 'category'; var useSnap = axisPointerModel.get('snap'); // Value axis without snap always do not snap. if (!useSnap && !isCategoryAxis) { return false; } if (animation === 'auto' || animation == null) { var animationThreshold = this.animationThreshold; if (isCategoryAxis && axis.getBandWidth() > animationThreshold) { return true; } // It is important to auto animation when snap used. Consider if there is // a dataZoom, animation will be disabled when too many points exist, while // it will be enabled for better visual effect when little points exist. if (useSnap) { var seriesDataCount = getAxisInfo(axisModel).seriesDataCount; var axisExtent = axis.getExtent(); // Approximate band width return Math.abs(axisExtent[0] - axisExtent[1]) / seriesDataCount > animationThreshold; } return false; } return animation === true; }; /** * add {pointer, label, graphicKey} to elOption * @protected */ BaseAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {// Shoule be implemenented by sub-class. }; /** * @protected */ BaseAxisPointer.prototype.createPointerEl = function (group, elOption, axisModel, axisPointerModel) { var pointerOption = elOption.pointer; if (pointerOption) { var pointerEl = inner$a(group).pointerEl = new graphic[pointerOption.type](clone$3(elOption.pointer)); group.add(pointerEl); } }; /** * @protected */ BaseAxisPointer.prototype.createLabelEl = function (group, elOption, axisModel, axisPointerModel) { if (elOption.label) { var labelEl = inner$a(group).labelEl = new ZRText(clone$3(elOption.label)); group.add(labelEl); updateLabelShowHide(labelEl, axisPointerModel); } }; /** * @protected */ BaseAxisPointer.prototype.updatePointerEl = function (group, elOption, updateProps) { var pointerEl = inner$a(group).pointerEl; if (pointerEl && elOption.pointer) { pointerEl.setStyle(elOption.pointer.style); updateProps(pointerEl, { shape: elOption.pointer.shape }); } }; /** * @protected */ BaseAxisPointer.prototype.updateLabelEl = function (group, elOption, updateProps, axisPointerModel) { var labelEl = inner$a(group).labelEl; if (labelEl) { labelEl.setStyle(elOption.label.style); updateProps(labelEl, { // Consider text length change in vertical axis, animation should // be used on shape, otherwise the effect will be weird. // TODOTODO // shape: elOption.label.shape, x: elOption.label.x, y: elOption.label.y }); updateLabelShowHide(labelEl, axisPointerModel); } }; /** * @private */ BaseAxisPointer.prototype._renderHandle = function (value) { if (this._dragging || !this.updateHandleTransform) { return; } var axisPointerModel = this._axisPointerModel; var zr = this._api.getZr(); var handle = this._handle; var handleModel = axisPointerModel.getModel('handle'); var status = axisPointerModel.get('status'); if (!handleModel.get('show') || !status || status === 'hide') { handle && zr.remove(handle); this._handle = null; return; } var isInit; if (!this._handle) { isInit = true; handle = this._handle = createIcon(handleModel.get('icon'), { cursor: 'move', draggable: true, onmousemove: function (e) { // Fot mobile devicem, prevent screen slider on the button. stop(e.event); }, onmousedown: bind$1(this._onHandleDragMove, this, 0, 0), drift: bind$1(this._onHandleDragMove, this), ondragend: bind$1(this._onHandleDragEnd, this) }); zr.add(handle); } updateMandatoryProps(handle, axisPointerModel, false); // update style handle.setStyle(handleModel.getItemStyle(null, ['color', 'borderColor', 'borderWidth', 'opacity', 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY'])); // update position var handleSize = handleModel.get('size'); if (!isArray(handleSize)) { handleSize = [handleSize, handleSize]; } handle.scaleX = handleSize[0] / 2; handle.scaleY = handleSize[1] / 2; createOrUpdate(this, '_doDispatchAxisPointer', handleModel.get('throttle') || 0, 'fixRate'); this._moveHandleToValue(value, isInit); }; BaseAxisPointer.prototype._moveHandleToValue = function (value, isInit) { updateProps$1(this._axisPointerModel, !isInit && this._moveAnimation, this._handle, getHandleTransProps(this.getHandleTransform(value, this._axisModel, this._axisPointerModel))); }; BaseAxisPointer.prototype._onHandleDragMove = function (dx, dy) { var handle = this._handle; if (!handle) { return; } this._dragging = true; // Persistent for throttle. var trans = this.updateHandleTransform(getHandleTransProps(handle), [dx, dy], this._axisModel, this._axisPointerModel); this._payloadInfo = trans; handle.stopAnimation(); handle.attr(getHandleTransProps(trans)); inner$a(handle).lastProp = null; this._doDispatchAxisPointer(); }; /** * Throttled method. */ BaseAxisPointer.prototype._doDispatchAxisPointer = function () { var handle = this._handle; if (!handle) { return; } var payloadInfo = this._payloadInfo; var axisModel = this._axisModel; this._api.dispatchAction({ type: 'updateAxisPointer', x: payloadInfo.cursorPoint[0], y: payloadInfo.cursorPoint[1], tooltipOption: payloadInfo.tooltipOption, axesInfo: [{ axisDim: axisModel.axis.dim, axisIndex: axisModel.componentIndex }] }); }; BaseAxisPointer.prototype._onHandleDragEnd = function () { this._dragging = false; var handle = this._handle; if (!handle) { return; } var value = this._axisPointerModel.get('value'); // Consider snap or categroy axis, handle may be not consistent with // axisPointer. So move handle to align the exact value position when // drag ended. this._moveHandleToValue(value); // For the effect: tooltip will be shown when finger holding on handle // button, and will be hidden after finger left handle button. this._api.dispatchAction({ type: 'hideTip' }); }; /** * @private */ BaseAxisPointer.prototype.clear = function (api) { this._lastValue = null; this._lastStatus = null; var zr = api.getZr(); var group = this._group; var handle = this._handle; if (zr && group) { this._lastGraphicKey = null; group && zr.remove(group); handle && zr.remove(handle); this._group = null; this._handle = null; this._payloadInfo = null; } }; /** * @protected */ BaseAxisPointer.prototype.doClear = function () {// Implemented by sub-class if necessary. }; BaseAxisPointer.prototype.buildLabel = function (xy, wh, xDimIndex) { xDimIndex = xDimIndex || 0; return { x: xy[xDimIndex], y: xy[1 - xDimIndex], width: wh[xDimIndex], height: wh[1 - xDimIndex] }; }; return BaseAxisPointer; }(); function updateProps$1(animationModel, moveAnimation, el, props) { // Animation optimize. if (!propsEqual(inner$a(el).lastProp, props)) { inner$a(el).lastProp = props; moveAnimation ? updateProps(el, props, animationModel) : (el.stopAnimation(), el.attr(props)); } } function propsEqual(lastProps, newProps) { if (isObject(lastProps) && isObject(newProps)) { var equals_1 = true; each(newProps, function (item, key) { equals_1 = equals_1 && propsEqual(lastProps[key], item); }); return !!equals_1; } else { return lastProps === newProps; } } function updateLabelShowHide(labelEl, axisPointerModel) { labelEl[axisPointerModel.get(['label', 'show']) ? 'show' : 'hide'](); } function getHandleTransProps(trans) { return { x: trans.x || 0, y: trans.y || 0, rotation: trans.rotation || 0 }; } function updateMandatoryProps(group, axisPointerModel, silent) { var z = axisPointerModel.get('z'); var zlevel = axisPointerModel.get('zlevel'); group && group.traverse(function (el) { if (el.type !== 'group') { z != null && (el.z = z); zlevel != null && (el.zlevel = zlevel); el.silent = silent; } }); } function buildElStyle(axisPointerModel) { var axisPointerType = axisPointerModel.get('type'); var styleModel = axisPointerModel.getModel(axisPointerType + 'Style'); var style; if (axisPointerType === 'line') { style = styleModel.getLineStyle(); style.fill = null; } else if (axisPointerType === 'shadow') { style = styleModel.getAreaStyle(); style.stroke = null; } return style; } /** * @param {Function} labelPos {align, verticalAlign, position} */ function buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos) { var value = axisPointerModel.get('value'); var text = getValueLabel(value, axisModel.axis, axisModel.ecModel, axisPointerModel.get('seriesDataIndices'), { precision: axisPointerModel.get(['label', 'precision']), formatter: axisPointerModel.get(['label', 'formatter']) }); var labelModel = axisPointerModel.getModel('label'); var paddings = normalizeCssArray$1(labelModel.get('padding') || 0); var font = labelModel.getFont(); var textRect = getBoundingRect(text, font); var position = labelPos.position; var width = textRect.width + paddings[1] + paddings[3]; var height = textRect.height + paddings[0] + paddings[2]; // Adjust by align. var align = labelPos.align; align === 'right' && (position[0] -= width); align === 'center' && (position[0] -= width / 2); var verticalAlign = labelPos.verticalAlign; verticalAlign === 'bottom' && (position[1] -= height); verticalAlign === 'middle' && (position[1] -= height / 2); // Not overflow ec container confineInContainer(position, width, height, api); var bgColor = labelModel.get('backgroundColor'); if (!bgColor || bgColor === 'auto') { bgColor = axisModel.get(['axisLine', 'lineStyle', 'color']); } elOption.label = { // shape: {x: 0, y: 0, width: width, height: height, r: labelModel.get('borderRadius')}, x: position[0], y: position[1], style: createTextStyle(labelModel, { text: text, font: font, fill: labelModel.getTextColor(), padding: paddings, backgroundColor: bgColor }), // Lable should be over axisPointer. z2: 10 }; } // Do not overflow ec container function confineInContainer(position, width, height, api) { var viewWidth = api.getWidth(); var viewHeight = api.getHeight(); position[0] = Math.min(position[0] + width, viewWidth) - width; position[1] = Math.min(position[1] + height, viewHeight) - height; position[0] = Math.max(position[0], 0); position[1] = Math.max(position[1], 0); } function getValueLabel(value, axis, ecModel, seriesDataIndices, opt) { value = axis.scale.parse(value); var text = axis.scale.getLabel({ value: value }, { // If `precision` is set, width can be fixed (like '12.00500'), which // helps to debounce when when moving label. precision: opt.precision }); var formatter = opt.formatter; if (formatter) { var params_1 = { value: getAxisRawValue(axis, { value: value }), axisDimension: axis.dim, axisIndex: axis.index, seriesData: [] }; each(seriesDataIndices, function (idxItem) { var series = ecModel.getSeriesByIndex(idxItem.seriesIndex); var dataIndex = idxItem.dataIndexInside; var dataParams = series && series.getDataParams(dataIndex); dataParams && params_1.seriesData.push(dataParams); }); if (isString(formatter)) { text = formatter.replace('{value}', text); } else if (isFunction(formatter)) { text = formatter(params_1); } } return text; } function getTransformedPosition(axis, value, layoutInfo) { var transform = create$1(); rotate(transform, transform, layoutInfo.rotation); translate(transform, transform, layoutInfo.position); return applyTransform$1([axis.dataToCoord(value), (layoutInfo.labelOffset || 0) + (layoutInfo.labelDirection || 1) * (layoutInfo.labelMargin || 0)], transform); } function buildCartesianSingleLabelElOption(value, elOption, layoutInfo, axisModel, axisPointerModel, api) { // @ts-ignore var textLayout = AxisBuilder.innerTextLayout(layoutInfo.rotation, 0, layoutInfo.labelDirection); layoutInfo.labelMargin = axisPointerModel.get(['label', 'margin']); buildLabelElOption(elOption, axisModel, axisPointerModel, api, { position: getTransformedPosition(axisModel.axis, value, layoutInfo), align: textLayout.textAlign, verticalAlign: textLayout.textVerticalAlign }); } function makeLineShape(p1, p2, xDimIndex) { xDimIndex = xDimIndex || 0; return { x1: p1[xDimIndex], y1: p1[1 - xDimIndex], x2: p2[xDimIndex], y2: p2[1 - xDimIndex] }; } function makeRectShape(xy, wh, xDimIndex) { xDimIndex = xDimIndex || 0; return { x: xy[xDimIndex], y: xy[1 - xDimIndex], width: wh[xDimIndex], height: wh[1 - xDimIndex] }; } function makeSectorShape(cx, cy, r0, r, startAngle, endAngle) { return { cx: cx, cy: cy, r0: r0, r: r, startAngle: startAngle, endAngle: endAngle, clockwise: true }; } var CartesianAxisPointer = /** @class */ function (_super) { __extends(CartesianAxisPointer, _super); function CartesianAxisPointer() { return _super !== null && _super.apply(this, arguments) || this; } /** * @override */ CartesianAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) { var axis = axisModel.axis; var grid = axis.grid; var axisPointerType = axisPointerModel.get('type'); var otherExtent = getCartesian(grid, axis).getOtherAxis(axis).getGlobalExtent(); var pixelValue = axis.toGlobalCoord(axis.dataToCoord(value, true)); if (axisPointerType && axisPointerType !== 'none') { var elStyle = buildElStyle(axisPointerModel); var pointerOption = pointerShapeBuilder[axisPointerType](axis, pixelValue, otherExtent); pointerOption.style = elStyle; elOption.graphicKey = pointerOption.type; elOption.pointer = pointerOption; } var layoutInfo = layout$1(grid.model, axisModel); buildCartesianSingleLabelElOption( // @ts-ignore value, elOption, layoutInfo, axisModel, axisPointerModel, api); }; /** * @override */ CartesianAxisPointer.prototype.getHandleTransform = function (value, axisModel, axisPointerModel) { var layoutInfo = layout$1(axisModel.axis.grid.model, axisModel, { labelInside: false }); // @ts-ignore layoutInfo.labelMargin = axisPointerModel.get(['handle', 'margin']); var pos = getTransformedPosition(axisModel.axis, value, layoutInfo); return { x: pos[0], y: pos[1], rotation: layoutInfo.rotation + (layoutInfo.labelDirection < 0 ? Math.PI : 0) }; }; /** * @override */ CartesianAxisPointer.prototype.updateHandleTransform = function (transform, delta, axisModel, axisPointerModel) { var axis = axisModel.axis; var grid = axis.grid; var axisExtent = axis.getGlobalExtent(true); var otherExtent = getCartesian(grid, axis).getOtherAxis(axis).getGlobalExtent(); var dimIndex = axis.dim === 'x' ? 0 : 1; var currPosition = [transform.x, transform.y]; currPosition[dimIndex] += delta[dimIndex]; currPosition[dimIndex] = Math.min(axisExtent[1], currPosition[dimIndex]); currPosition[dimIndex] = Math.max(axisExtent[0], currPosition[dimIndex]); var cursorOtherValue = (otherExtent[1] + otherExtent[0]) / 2; var cursorPoint = [cursorOtherValue, cursorOtherValue]; cursorPoint[dimIndex] = currPosition[dimIndex]; // Make tooltip do not overlap axisPointer and in the middle of the grid. var tooltipOptions = [{ verticalAlign: 'middle' }, { align: 'center' }]; return { x: currPosition[0], y: currPosition[1], rotation: transform.rotation, cursorPoint: cursorPoint, tooltipOption: tooltipOptions[dimIndex] }; }; return CartesianAxisPointer; }(BaseAxisPointer); function getCartesian(grid, axis) { var opt = {}; opt[axis.dim + 'AxisIndex'] = axis.index; return grid.getCartesian(opt); } var pointerShapeBuilder = { line: function (axis, pixelValue, otherExtent) { var targetShape = makeLineShape([pixelValue, otherExtent[0]], [pixelValue, otherExtent[1]], getAxisDimIndex(axis)); return { type: 'Line', subPixelOptimize: true, shape: targetShape }; }, shadow: function (axis, pixelValue, otherExtent) { var bandWidth = Math.max(1, axis.getBandWidth()); var span = otherExtent[1] - otherExtent[0]; return { type: 'Rect', shape: makeRectShape([pixelValue - bandWidth / 2, otherExtent[0]], [bandWidth, span], getAxisDimIndex(axis)) }; } }; function getAxisDimIndex(axis) { return axis.dim === 'x' ? 0 : 1; } var AxisPointerModel = /** @class */ function (_super) { __extends(AxisPointerModel, _super); function AxisPointerModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = AxisPointerModel.type; return _this; } AxisPointerModel.type = 'axisPointer'; AxisPointerModel.defaultOption = { // 'auto' means that show when triggered by tooltip or handle. show: 'auto', zlevel: 0, z: 50, type: 'line', // axispointer triggered by tootip determine snap automatically, // see `modelHelper`. snap: false, triggerTooltip: true, value: null, status: null, link: [], // Do not set 'auto' here, otherwise global animation: false // will not effect at this axispointer. animation: null, animationDurationUpdate: 200, lineStyle: { color: '#B9BEC9', width: 1, type: 'dashed' }, shadowStyle: { color: 'rgba(210,219,238,0.2)' }, label: { show: true, formatter: null, precision: 'auto', margin: 3, color: '#fff', padding: [5, 7, 5, 7], backgroundColor: 'auto', borderColor: null, borderWidth: 0, borderRadius: 3 }, handle: { show: false, // eslint-disable-next-line icon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z', size: 45, // handle margin is from symbol center to axis, which is stable when circular move. margin: 50, // color: '#1b8bbd' // color: '#2f4554' color: '#333', shadowBlur: 3, shadowColor: '#aaa', shadowOffsetX: 0, shadowOffsetY: 2, // For mobile performance throttle: 40 } }; return AxisPointerModel; }(ComponentModel); var inner$b = makeInner(); var each$8 = each; /** * @param {string} key * @param {module:echarts/ExtensionAPI} api * @param {Function} handler * param: {string} currTrigger * param: {Array.} point */ function register(key, api, handler) { if (env.node) { return; } var zr = api.getZr(); inner$b(zr).records || (inner$b(zr).records = {}); initGlobalListeners(zr, api); var record = inner$b(zr).records[key] || (inner$b(zr).records[key] = {}); record.handler = handler; } function initGlobalListeners(zr, api) { if (inner$b(zr).initialized) { return; } inner$b(zr).initialized = true; useHandler('click', curry(doEnter, 'click')); useHandler('mousemove', curry(doEnter, 'mousemove')); // useHandler('mouseout', onLeave); useHandler('globalout', onLeave); function useHandler(eventType, cb) { zr.on(eventType, function (e) { var dis = makeDispatchAction(api); each$8(inner$b(zr).records, function (record) { record && cb(record, e, dis.dispatchAction); }); dispatchTooltipFinally(dis.pendings, api); }); } } function dispatchTooltipFinally(pendings, api) { var showLen = pendings.showTip.length; var hideLen = pendings.hideTip.length; var actuallyPayload; if (showLen) { actuallyPayload = pendings.showTip[showLen - 1]; } else if (hideLen) { actuallyPayload = pendings.hideTip[hideLen - 1]; } if (actuallyPayload) { actuallyPayload.dispatchAction = null; api.dispatchAction(actuallyPayload); } } function onLeave(record, e, dispatchAction) { record.handler('leave', null, dispatchAction); } function doEnter(currTrigger, record, e, dispatchAction) { record.handler(currTrigger, e, dispatchAction); } function makeDispatchAction(api) { var pendings = { showTip: [], hideTip: [] }; // FIXME // better approach? // 'showTip' and 'hideTip' can be triggered by axisPointer and tooltip, // which may be conflict, (axisPointer call showTip but tooltip call hideTip); // So we have to add "final stage" to merge those dispatched actions. var dispatchAction = function (payload) { var pendingList = pendings[payload.type]; if (pendingList) { pendingList.push(payload); } else { payload.dispatchAction = dispatchAction; api.dispatchAction(payload); } }; return { dispatchAction: dispatchAction, pendings: pendings }; } function unregister(key, api) { if (env.node) { return; } var zr = api.getZr(); var record = (inner$b(zr).records || {})[key]; if (record) { inner$b(zr).records[key] = null; } } var AxisPointerView = /** @class */ function (_super) { __extends(AxisPointerView, _super); function AxisPointerView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = AxisPointerView.type; return _this; } AxisPointerView.prototype.render = function (globalAxisPointerModel, ecModel, api) { var globalTooltipModel = ecModel.getComponent('tooltip'); var triggerOn = globalAxisPointerModel.get('triggerOn') || globalTooltipModel && globalTooltipModel.get('triggerOn') || 'mousemove|click'; // Register global listener in AxisPointerView to enable // AxisPointerView to be independent to Tooltip. register('axisPointer', api, function (currTrigger, e, dispatchAction) { // If 'none', it is not controlled by mouse totally. if (triggerOn !== 'none' && (currTrigger === 'leave' || triggerOn.indexOf(currTrigger) >= 0)) { dispatchAction({ type: 'updateAxisPointer', currTrigger: currTrigger, x: e && e.offsetX, y: e && e.offsetY }); } }); }; AxisPointerView.prototype.remove = function (ecModel, api) { unregister('axisPointer', api); }; AxisPointerView.prototype.dispose = function (ecModel, api) { unregister('axisPointer', api); }; AxisPointerView.type = 'axisPointer'; return AxisPointerView; }(ComponentView); /** * @param finder contains {seriesIndex, dataIndex, dataIndexInside} * @param ecModel * @return {point: [x, y], el: ...} point Will not be null. */ function findPointFromSeries(finder, ecModel) { var point = []; var seriesIndex = finder.seriesIndex; var seriesModel; if (seriesIndex == null || !(seriesModel = ecModel.getSeriesByIndex(seriesIndex))) { return { point: [] }; } var data = seriesModel.getData(); var dataIndex = queryDataIndex(data, finder); if (dataIndex == null || dataIndex < 0 || isArray(dataIndex)) { return { point: [] }; } var el = data.getItemGraphicEl(dataIndex); var coordSys = seriesModel.coordinateSystem; if (seriesModel.getTooltipPosition) { point = seriesModel.getTooltipPosition(dataIndex) || []; } else if (coordSys && coordSys.dataToPoint) { if (finder.isStacked) { var baseAxis = coordSys.getBaseAxis(); var valueAxis = coordSys.getOtherAxis(baseAxis); var valueAxisDim = valueAxis.dim; var baseAxisDim = baseAxis.dim; var baseDataOffset = valueAxisDim === 'x' || valueAxisDim === 'radius' ? 1 : 0; var baseDim = data.mapDimension(baseAxisDim); var stackedData = []; stackedData[baseDataOffset] = data.get(baseDim, dataIndex); stackedData[1 - baseDataOffset] = data.get(data.getCalculationInfo('stackResultDimension'), dataIndex); point = coordSys.dataToPoint(stackedData) || []; } else { point = coordSys.dataToPoint(data.getValues(map(coordSys.dimensions, function (dim) { return data.mapDimension(dim); }), dataIndex)) || []; } } else if (el) { // Use graphic bounding rect var rect = el.getBoundingRect().clone(); rect.applyTransform(el.transform); point = [rect.x + rect.width / 2, rect.y + rect.height / 2]; } return { point: point, el: el }; } var inner$c = makeInner(); /** * Basic logic: check all axis, if they do not demand show/highlight, * then hide/downplay them. * * @return content of event obj for echarts.connect. */ function axisTrigger(payload, ecModel, api) { var currTrigger = payload.currTrigger; var point = [payload.x, payload.y]; var finder = payload; var dispatchAction = payload.dispatchAction || bind(api.dispatchAction, api); var coordSysAxesInfo = ecModel.getComponent('axisPointer').coordSysAxesInfo; // Pending // See #6121. But we are not able to reproduce it yet. if (!coordSysAxesInfo) { return; } if (illegalPoint(point)) { // Used in the default behavior of `connection`: use the sample seriesIndex // and dataIndex. And also used in the tooltipView trigger. point = findPointFromSeries({ seriesIndex: finder.seriesIndex, // Do not use dataIndexInside from other ec instance. // FIXME: auto detect it? dataIndex: finder.dataIndex }, ecModel).point; } var isIllegalPoint = illegalPoint(point); // Axis and value can be specified when calling dispatchAction({type: 'updateAxisPointer'}). // Notice: In this case, it is difficult to get the `point` (which is necessary to show // tooltip, so if point is not given, we just use the point found by sample seriesIndex // and dataIndex. var inputAxesInfo = finder.axesInfo; var axesInfo = coordSysAxesInfo.axesInfo; var shouldHide = currTrigger === 'leave' || illegalPoint(point); var outputPayload = {}; var showValueMap = {}; var dataByCoordSys = { list: [], map: {} }; var updaters = { showPointer: curry(showPointer, showValueMap), showTooltip: curry(showTooltip, dataByCoordSys) }; // Process for triggered axes. each(coordSysAxesInfo.coordSysMap, function (coordSys, coordSysKey) { // If a point given, it must be contained by the coordinate system. var coordSysContainsPoint = isIllegalPoint || coordSys.containPoint(point); each(coordSysAxesInfo.coordSysAxesInfo[coordSysKey], function (axisInfo, key) { var axis = axisInfo.axis; var inputAxisInfo = findInputAxisInfo(inputAxesInfo, axisInfo); // If no inputAxesInfo, no axis is restricted. if (!shouldHide && coordSysContainsPoint && (!inputAxesInfo || inputAxisInfo)) { var val = inputAxisInfo && inputAxisInfo.value; if (val == null && !isIllegalPoint) { val = axis.pointToData(point); } val != null && processOnAxis(axisInfo, val, updaters, false, outputPayload); } }); }); // Process for linked axes. var linkTriggers = {}; each(axesInfo, function (tarAxisInfo, tarKey) { var linkGroup = tarAxisInfo.linkGroup; // If axis has been triggered in the previous stage, it should not be triggered by link. if (linkGroup && !showValueMap[tarKey]) { each(linkGroup.axesInfo, function (srcAxisInfo, srcKey) { var srcValItem = showValueMap[srcKey]; // If srcValItem exist, source axis is triggered, so link to target axis. if (srcAxisInfo !== tarAxisInfo && srcValItem) { var val = srcValItem.value; linkGroup.mapper && (val = tarAxisInfo.axis.scale.parse(linkGroup.mapper(val, makeMapperParam(srcAxisInfo), makeMapperParam(tarAxisInfo)))); linkTriggers[tarAxisInfo.key] = val; } }); } }); each(linkTriggers, function (val, tarKey) { processOnAxis(axesInfo[tarKey], val, updaters, true, outputPayload); }); updateModelActually(showValueMap, axesInfo, outputPayload); dispatchTooltipActually(dataByCoordSys, point, payload, dispatchAction); dispatchHighDownActually(axesInfo, dispatchAction, api); return outputPayload; } function processOnAxis(axisInfo, newValue, updaters, noSnap, outputFinder) { var axis = axisInfo.axis; if (axis.scale.isBlank() || !axis.containData(newValue)) { return; } if (!axisInfo.involveSeries) { updaters.showPointer(axisInfo, newValue); return; } // Heavy calculation. So put it after axis.containData checking. var payloadInfo = buildPayloadsBySeries(newValue, axisInfo); var payloadBatch = payloadInfo.payloadBatch; var snapToValue = payloadInfo.snapToValue; // Fill content of event obj for echarts.connect. // By default use the first involved series data as a sample to connect. if (payloadBatch[0] && outputFinder.seriesIndex == null) { extend(outputFinder, payloadBatch[0]); } // If no linkSource input, this process is for collecting link // target, where snap should not be accepted. if (!noSnap && axisInfo.snap) { if (axis.containData(snapToValue) && snapToValue != null) { newValue = snapToValue; } } updaters.showPointer(axisInfo, newValue, payloadBatch); // Tooltip should always be snapToValue, otherwise there will be // incorrect "axis value ~ series value" mapping displayed in tooltip. updaters.showTooltip(axisInfo, payloadInfo, snapToValue); } function buildPayloadsBySeries(value, axisInfo) { var axis = axisInfo.axis; var dim = axis.dim; var snapToValue = value; var payloadBatch = []; var minDist = Number.MAX_VALUE; var minDiff = -1; each(axisInfo.seriesModels, function (series, idx) { var dataDim = series.getData().mapDimensionsAll(dim); var seriesNestestValue; var dataIndices; if (series.getAxisTooltipData) { var result = series.getAxisTooltipData(dataDim, value, axis); dataIndices = result.dataIndices; seriesNestestValue = result.nestestValue; } else { dataIndices = series.getData().indicesOfNearest(dataDim[0], value, // Add a threshold to avoid find the wrong dataIndex // when data length is not same. // false, axis.type === 'category' ? 0.5 : null); if (!dataIndices.length) { return; } seriesNestestValue = series.getData().get(dataDim[0], dataIndices[0]); } if (seriesNestestValue == null || !isFinite(seriesNestestValue)) { return; } var diff = value - seriesNestestValue; var dist = Math.abs(diff); // Consider category case if (dist <= minDist) { if (dist < minDist || diff >= 0 && minDiff < 0) { minDist = dist; minDiff = diff; snapToValue = seriesNestestValue; payloadBatch.length = 0; } each(dataIndices, function (dataIndex) { payloadBatch.push({ seriesIndex: series.seriesIndex, dataIndexInside: dataIndex, dataIndex: series.getData().getRawIndex(dataIndex) }); }); } }); return { payloadBatch: payloadBatch, snapToValue: snapToValue }; } function showPointer(showValueMap, axisInfo, value, payloadBatch) { showValueMap[axisInfo.key] = { value: value, payloadBatch: payloadBatch }; } function showTooltip(dataByCoordSys, axisInfo, payloadInfo, value) { var payloadBatch = payloadInfo.payloadBatch; var axis = axisInfo.axis; var axisModel = axis.model; var axisPointerModel = axisInfo.axisPointerModel; // If no data, do not create anything in dataByCoordSys, // whose length will be used to judge whether dispatch action. if (!axisInfo.triggerTooltip || !payloadBatch.length) { return; } var coordSysModel = axisInfo.coordSys.model; var coordSysKey = makeKey(coordSysModel); var coordSysItem = dataByCoordSys.map[coordSysKey]; if (!coordSysItem) { coordSysItem = dataByCoordSys.map[coordSysKey] = { coordSysId: coordSysModel.id, coordSysIndex: coordSysModel.componentIndex, coordSysType: coordSysModel.type, coordSysMainType: coordSysModel.mainType, dataByAxis: [] }; dataByCoordSys.list.push(coordSysItem); } coordSysItem.dataByAxis.push({ axisDim: axis.dim, axisIndex: axisModel.componentIndex, axisType: axisModel.type, axisId: axisModel.id, value: value, // Caustion: viewHelper.getValueLabel is actually on "view stage", which // depends that all models have been updated. So it should not be performed // here. Considering axisPointerModel used here is volatile, which is hard // to be retrieve in TooltipView, we prepare parameters here. valueLabelOpt: { precision: axisPointerModel.get(['label', 'precision']), formatter: axisPointerModel.get(['label', 'formatter']) }, seriesDataIndices: payloadBatch.slice() }); } function updateModelActually(showValueMap, axesInfo, outputPayload) { var outputAxesInfo = outputPayload.axesInfo = []; // Basic logic: If no 'show' required, 'hide' this axisPointer. each(axesInfo, function (axisInfo, key) { var option = axisInfo.axisPointerModel.option; var valItem = showValueMap[key]; if (valItem) { !axisInfo.useHandle && (option.status = 'show'); option.value = valItem.value; // For label formatter param and highlight. option.seriesDataIndices = (valItem.payloadBatch || []).slice(); } // When always show (e.g., handle used), remain // original value and status. else { // If hide, value still need to be set, consider // click legend to toggle axis blank. !axisInfo.useHandle && (option.status = 'hide'); } // If status is 'hide', should be no info in payload. option.status === 'show' && outputAxesInfo.push({ axisDim: axisInfo.axis.dim, axisIndex: axisInfo.axis.model.componentIndex, value: option.value }); }); } function dispatchTooltipActually(dataByCoordSys, point, payload, dispatchAction) { // Basic logic: If no showTip required, hideTip will be dispatched. if (illegalPoint(point) || !dataByCoordSys.list.length) { dispatchAction({ type: 'hideTip' }); return; } // In most case only one axis (or event one series is used). It is // convinient to fetch payload.seriesIndex and payload.dataIndex // dirtectly. So put the first seriesIndex and dataIndex of the first // axis on the payload. var sampleItem = ((dataByCoordSys.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {}; dispatchAction({ type: 'showTip', escapeConnect: true, x: point[0], y: point[1], tooltipOption: payload.tooltipOption, position: payload.position, dataIndexInside: sampleItem.dataIndexInside, dataIndex: sampleItem.dataIndex, seriesIndex: sampleItem.seriesIndex, dataByCoordSys: dataByCoordSys.list }); } function dispatchHighDownActually(axesInfo, dispatchAction, api) { // FIXME // highlight status modification shoule be a stage of main process? // (Consider confilct (e.g., legend and axisPointer) and setOption) var zr = api.getZr(); var highDownKey = 'axisPointerLastHighlights'; var lastHighlights = inner$c(zr)[highDownKey] || {}; var newHighlights = inner$c(zr)[highDownKey] = {}; // Update highlight/downplay status according to axisPointer model. // Build hash map and remove duplicate incidentally. each(axesInfo, function (axisInfo, key) { var option = axisInfo.axisPointerModel.option; option.status === 'show' && each(option.seriesDataIndices, function (batchItem) { var key = batchItem.seriesIndex + ' | ' + batchItem.dataIndex; newHighlights[key] = batchItem; }); }); // Diff. var toHighlight = []; var toDownplay = []; each(lastHighlights, function (batchItem, key) { !newHighlights[key] && toDownplay.push(batchItem); }); each(newHighlights, function (batchItem, key) { !lastHighlights[key] && toHighlight.push(batchItem); }); toDownplay.length && api.dispatchAction({ type: 'downplay', escapeConnect: true, // Not blur others when highlight in axisPointer. notBlur: true, batch: toDownplay }); toHighlight.length && api.dispatchAction({ type: 'highlight', escapeConnect: true, // Not blur others when highlight in axisPointer. notBlur: true, batch: toHighlight }); } function findInputAxisInfo(inputAxesInfo, axisInfo) { for (var i = 0; i < (inputAxesInfo || []).length; i++) { var inputAxisInfo = inputAxesInfo[i]; if (axisInfo.axis.dim === inputAxisInfo.axisDim && axisInfo.axis.model.componentIndex === inputAxisInfo.axisIndex) { return inputAxisInfo; } } } function makeMapperParam(axisInfo) { var axisModel = axisInfo.axis.model; var item = {}; var dim = item.axisDim = axisInfo.axis.dim; item.axisIndex = item[dim + 'AxisIndex'] = axisModel.componentIndex; item.axisName = item[dim + 'AxisName'] = axisModel.name; item.axisId = item[dim + 'AxisId'] = axisModel.id; return item; } function illegalPoint(point) { return !point || point[0] == null || isNaN(point[0]) || point[1] == null || isNaN(point[1]); } function install$s(registers) { // CartesianAxisPointer is not supposed to be required here. But consider // echarts.simple.js and online build tooltip, which only require gridSimple, // CartesianAxisPointer should be able to required somewhere. AxisView.registerAxisPointerClass('CartesianAxisPointer', CartesianAxisPointer); registers.registerComponentModel(AxisPointerModel); registers.registerComponentView(AxisPointerView); registers.registerPreprocessor(function (option) { // Always has a global axisPointerModel for default setting. if (option) { (!option.axisPointer || option.axisPointer.length === 0) && (option.axisPointer = {}); var link = option.axisPointer.link; // Normalize to array to avoid object mergin. But if link // is not set, remain null/undefined, otherwise it will // override existent link setting. if (link && !isArray(link)) { option.axisPointer.link = [link]; } } }); // This process should proformed after coordinate systems created // and series data processed. So put it on statistic processing stage. registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, function (ecModel, api) { // Build axisPointerModel, mergin tooltip.axisPointer model for each axis. // allAxesInfo should be updated when setOption performed. ecModel.getComponent('axisPointer').coordSysAxesInfo = collect(ecModel, api); }); // Broadcast to all views. registers.registerAction({ type: 'updateAxisPointer', event: 'updateAxisPointer', update: ':updateAxisPointer' }, axisTrigger); } function install$t(registers) { use(install$5); use(install$s); } var PolarAxisPointer = /** @class */ function (_super) { __extends(PolarAxisPointer, _super); function PolarAxisPointer() { return _super !== null && _super.apply(this, arguments) || this; } /** * @override */ PolarAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) { var axis = axisModel.axis; if (axis.dim === 'angle') { this.animationThreshold = Math.PI / 18; } var polar = axis.polar; var otherAxis = polar.getOtherAxis(axis); var otherExtent = otherAxis.getExtent(); var coordValue = axis.dataToCoord(value); var axisPointerType = axisPointerModel.get('type'); if (axisPointerType && axisPointerType !== 'none') { var elStyle = buildElStyle(axisPointerModel); var pointerOption = pointerShapeBuilder$1[axisPointerType](axis, polar, coordValue, otherExtent); pointerOption.style = elStyle; elOption.graphicKey = pointerOption.type; elOption.pointer = pointerOption; } var labelMargin = axisPointerModel.get(['label', 'margin']); var labelPos = getLabelPosition(value, axisModel, axisPointerModel, polar, labelMargin); buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos); }; return PolarAxisPointer; }(BaseAxisPointer); function getLabelPosition(value, axisModel, axisPointerModel, polar, labelMargin) { var axis = axisModel.axis; var coord = axis.dataToCoord(value); var axisAngle = polar.getAngleAxis().getExtent()[0]; axisAngle = axisAngle / 180 * Math.PI; var radiusExtent = polar.getRadiusAxis().getExtent(); var position; var align; var verticalAlign; if (axis.dim === 'radius') { var transform = create$1(); rotate(transform, transform, axisAngle); translate(transform, transform, [polar.cx, polar.cy]); position = applyTransform$1([coord, -labelMargin], transform); var labelRotation = axisModel.getModel('axisLabel').get('rotate') || 0; // @ts-ignore var labelLayout = AxisBuilder.innerTextLayout(axisAngle, labelRotation * Math.PI / 180, -1); align = labelLayout.textAlign; verticalAlign = labelLayout.textVerticalAlign; } else { // angle axis var r = radiusExtent[1]; position = polar.coordToPoint([r + labelMargin, coord]); var cx = polar.cx; var cy = polar.cy; align = Math.abs(position[0] - cx) / r < 0.3 ? 'center' : position[0] > cx ? 'left' : 'right'; verticalAlign = Math.abs(position[1] - cy) / r < 0.3 ? 'middle' : position[1] > cy ? 'top' : 'bottom'; } return { position: position, align: align, verticalAlign: verticalAlign }; } var pointerShapeBuilder$1 = { line: function (axis, polar, coordValue, otherExtent) { return axis.dim === 'angle' ? { type: 'Line', shape: makeLineShape(polar.coordToPoint([otherExtent[0], coordValue]), polar.coordToPoint([otherExtent[1], coordValue])) } : { type: 'Circle', shape: { cx: polar.cx, cy: polar.cy, r: coordValue } }; }, shadow: function (axis, polar, coordValue, otherExtent) { var bandWidth = Math.max(1, axis.getBandWidth()); var radian = Math.PI / 180; return axis.dim === 'angle' ? { type: 'Sector', shape: makeSectorShape(polar.cx, polar.cy, otherExtent[0], otherExtent[1], // In ECharts y is negative if angle is positive (-coordValue - bandWidth / 2) * radian, (-coordValue + bandWidth / 2) * radian) } : { type: 'Sector', shape: makeSectorShape(polar.cx, polar.cy, coordValue - bandWidth / 2, coordValue + bandWidth / 2, 0, Math.PI * 2) }; } }; var PolarModel = /** @class */ function (_super) { __extends(PolarModel, _super); function PolarModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = PolarModel.type; return _this; } PolarModel.prototype.findAxisModel = function (axisType) { var foundAxisModel; var ecModel = this.ecModel; ecModel.eachComponent(axisType, function (axisModel) { if (axisModel.getCoordSysModel() === this) { foundAxisModel = axisModel; } }, this); return foundAxisModel; }; PolarModel.type = 'polar'; PolarModel.dependencies = ['radiusAxis', 'angleAxis']; PolarModel.defaultOption = { zlevel: 0, z: 0, center: ['50%', '50%'], radius: '80%' }; return PolarModel; }(ComponentModel); var PolarAxisModel = /** @class */ function (_super) { __extends(PolarAxisModel, _super); function PolarAxisModel() { return _super !== null && _super.apply(this, arguments) || this; } PolarAxisModel.prototype.getCoordSysModel = function () { return this.getReferringComponents('polar', SINGLE_REFERRING).models[0]; }; PolarAxisModel.type = 'polarAxis'; return PolarAxisModel; }(ComponentModel); mixin(PolarAxisModel, AxisModelCommonMixin); var AngleAxisModel = /** @class */ function (_super) { __extends(AngleAxisModel, _super); function AngleAxisModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = AngleAxisModel.type; return _this; } AngleAxisModel.type = 'angleAxis'; return AngleAxisModel; }(PolarAxisModel); var RadiusAxisModel = /** @class */ function (_super) { __extends(RadiusAxisModel, _super); function RadiusAxisModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = RadiusAxisModel.type; return _this; } RadiusAxisModel.type = 'radiusAxis'; return RadiusAxisModel; }(PolarAxisModel); var RadiusAxis = /** @class */ function (_super) { __extends(RadiusAxis, _super); function RadiusAxis(scale, radiusExtent) { return _super.call(this, 'radius', scale, radiusExtent) || this; } RadiusAxis.prototype.pointToData = function (point, clamp) { return this.polar.pointToData(point, clamp)[this.dim === 'radius' ? 0 : 1]; }; return RadiusAxis; }(Axis); RadiusAxis.prototype.dataToRadius = Axis.prototype.dataToCoord; RadiusAxis.prototype.radiusToData = Axis.prototype.coordToData; var inner$d = makeInner(); var AngleAxis = /** @class */ function (_super) { __extends(AngleAxis, _super); function AngleAxis(scale, angleExtent) { return _super.call(this, 'angle', scale, angleExtent || [0, 360]) || this; } AngleAxis.prototype.pointToData = function (point, clamp) { return this.polar.pointToData(point, clamp)[this.dim === 'radius' ? 0 : 1]; }; /** * Only be called in category axis. * Angle axis uses text height to decide interval * * @override * @return {number} Auto interval for cateogry axis tick and label */ AngleAxis.prototype.calculateCategoryInterval = function () { var axis = this; var labelModel = axis.getLabelModel(); var ordinalScale = axis.scale; var ordinalExtent = ordinalScale.getExtent(); // Providing this method is for optimization: // avoid generating a long array by `getTicks` // in large category data case. var tickCount = ordinalScale.count(); if (ordinalExtent[1] - ordinalExtent[0] < 1) { return 0; } var tickValue = ordinalExtent[0]; var unitSpan = axis.dataToCoord(tickValue + 1) - axis.dataToCoord(tickValue); var unitH = Math.abs(unitSpan); // Not precise, just use height as text width // and each distance from axis line yet. var rect = getBoundingRect(tickValue == null ? '' : tickValue + '', labelModel.getFont(), 'center', 'top'); var maxH = Math.max(rect.height, 7); var dh = maxH / unitH; // 0/0 is NaN, 1/0 is Infinity. isNaN(dh) && (dh = Infinity); var interval = Math.max(0, Math.floor(dh)); var cache = inner$d(axis.model); var lastAutoInterval = cache.lastAutoInterval; var lastTickCount = cache.lastTickCount; // Use cache to keep interval stable while moving zoom window, // otherwise the calculated interval might jitter when the zoom // window size is close to the interval-changing size. if (lastAutoInterval != null && lastTickCount != null && Math.abs(lastAutoInterval - interval) <= 1 && Math.abs(lastTickCount - tickCount) <= 1 // Always choose the bigger one, otherwise the critical // point is not the same when zooming in or zooming out. && lastAutoInterval > interval) { interval = lastAutoInterval; } // Only update cache if cache not used, otherwise the // changing of interval is too insensitive. else { cache.lastTickCount = tickCount; cache.lastAutoInterval = interval; } return interval; }; return AngleAxis; }(Axis); AngleAxis.prototype.dataToAngle = Axis.prototype.dataToCoord; AngleAxis.prototype.angleToData = Axis.prototype.coordToData; var Polar = /** @class */ function () { function Polar(name) { this.dimensions = ['radius', 'angle']; this.type = 'polar'; /** * x of polar center */ this.cx = 0; /** * y of polar center */ this.cy = 0; this._radiusAxis = new RadiusAxis(); this._angleAxis = new AngleAxis(); this.axisPointerEnabled = true; this.name = name || ''; this._radiusAxis.polar = this._angleAxis.polar = this; } /** * If contain coord */ Polar.prototype.containPoint = function (point) { var coord = this.pointToCoord(point); return this._radiusAxis.contain(coord[0]) && this._angleAxis.contain(coord[1]); }; /** * If contain data */ Polar.prototype.containData = function (data) { return this._radiusAxis.containData(data[0]) && this._angleAxis.containData(data[1]); }; Polar.prototype.getAxis = function (dim) { var key = '_' + dim + 'Axis'; return this[key]; }; Polar.prototype.getAxes = function () { return [this._radiusAxis, this._angleAxis]; }; /** * Get axes by type of scale */ Polar.prototype.getAxesByScale = function (scaleType) { var axes = []; var angleAxis = this._angleAxis; var radiusAxis = this._radiusAxis; angleAxis.scale.type === scaleType && axes.push(angleAxis); radiusAxis.scale.type === scaleType && axes.push(radiusAxis); return axes; }; Polar.prototype.getAngleAxis = function () { return this._angleAxis; }; Polar.prototype.getRadiusAxis = function () { return this._radiusAxis; }; Polar.prototype.getOtherAxis = function (axis) { var angleAxis = this._angleAxis; return axis === angleAxis ? this._radiusAxis : angleAxis; }; /** * Base axis will be used on stacking. * */ Polar.prototype.getBaseAxis = function () { return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAngleAxis(); }; Polar.prototype.getTooltipAxes = function (dim) { var baseAxis = dim != null && dim !== 'auto' ? this.getAxis(dim) : this.getBaseAxis(); return { baseAxes: [baseAxis], otherAxes: [this.getOtherAxis(baseAxis)] }; }; /** * Convert a single data item to (x, y) point. * Parameter data is an array which the first element is radius and the second is angle */ Polar.prototype.dataToPoint = function (data, clamp) { return this.coordToPoint([this._radiusAxis.dataToRadius(data[0], clamp), this._angleAxis.dataToAngle(data[1], clamp)]); }; /** * Convert a (x, y) point to data */ Polar.prototype.pointToData = function (point, clamp) { var coord = this.pointToCoord(point); return [this._radiusAxis.radiusToData(coord[0], clamp), this._angleAxis.angleToData(coord[1], clamp)]; }; /** * Convert a (x, y) point to (radius, angle) coord */ Polar.prototype.pointToCoord = function (point) { var dx = point[0] - this.cx; var dy = point[1] - this.cy; var angleAxis = this.getAngleAxis(); var extent = angleAxis.getExtent(); var minAngle = Math.min(extent[0], extent[1]); var maxAngle = Math.max(extent[0], extent[1]); // Fix fixed extent in polarCreator // FIXME angleAxis.inverse ? minAngle = maxAngle - 360 : maxAngle = minAngle + 360; var radius = Math.sqrt(dx * dx + dy * dy); dx /= radius; dy /= radius; var radian = Math.atan2(-dy, dx) / Math.PI * 180; // move to angleExtent var dir = radian < minAngle ? 1 : -1; while (radian < minAngle || radian > maxAngle) { radian += dir * 360; } return [radius, radian]; }; /** * Convert a (radius, angle) coord to (x, y) point */ Polar.prototype.coordToPoint = function (coord) { var radius = coord[0]; var radian = coord[1] / 180 * Math.PI; var x = Math.cos(radian) * radius + this.cx; // Inverse the y var y = -Math.sin(radian) * radius + this.cy; return [x, y]; }; /** * Get ring area of cartesian. * Area will have a contain function to determine if a point is in the coordinate system. */ Polar.prototype.getArea = function () { var angleAxis = this.getAngleAxis(); var radiusAxis = this.getRadiusAxis(); var radiusExtent = radiusAxis.getExtent().slice(); radiusExtent[0] > radiusExtent[1] && radiusExtent.reverse(); var angleExtent = angleAxis.getExtent(); var RADIAN = Math.PI / 180; return { cx: this.cx, cy: this.cy, r0: radiusExtent[0], r: radiusExtent[1], startAngle: -angleExtent[0] * RADIAN, endAngle: -angleExtent[1] * RADIAN, clockwise: angleAxis.inverse, contain: function (x, y) { // It's a ring shape. // Start angle and end angle don't matter var dx = x - this.cx; var dy = y - this.cy; var d2 = dx * dx + dy * dy; var r = this.r; var r0 = this.r0; return d2 <= r * r && d2 >= r0 * r0; } }; }; Polar.prototype.convertToPixel = function (ecModel, finder, value) { var coordSys = getCoordSys$2(finder); return coordSys === this ? this.dataToPoint(value) : null; }; Polar.prototype.convertFromPixel = function (ecModel, finder, pixel) { var coordSys = getCoordSys$2(finder); return coordSys === this ? this.pointToData(pixel) : null; }; return Polar; }(); function getCoordSys$2(finder) { var seriesModel = finder.seriesModel; var polarModel = finder.polarModel; return polarModel && polarModel.coordinateSystem || seriesModel && seriesModel.coordinateSystem; } /** * Resize method bound to the polar */ function resizePolar(polar, polarModel, api) { var center = polarModel.get('center'); var width = api.getWidth(); var height = api.getHeight(); polar.cx = parsePercent$1(center[0], width); polar.cy = parsePercent$1(center[1], height); var radiusAxis = polar.getRadiusAxis(); var size = Math.min(width, height) / 2; var radius = polarModel.get('radius'); if (radius == null) { radius = [0, '100%']; } else if (!isArray(radius)) { // r0 = 0 radius = [0, radius]; } var parsedRadius = [parsePercent$1(radius[0], size), parsePercent$1(radius[1], size)]; radiusAxis.inverse ? radiusAxis.setExtent(parsedRadius[1], parsedRadius[0]) : radiusAxis.setExtent(parsedRadius[0], parsedRadius[1]); } /** * Update polar */ function updatePolarScale(ecModel, api) { var polar = this; var angleAxis = polar.getAngleAxis(); var radiusAxis = polar.getRadiusAxis(); // Reset scale angleAxis.scale.setExtent(Infinity, -Infinity); radiusAxis.scale.setExtent(Infinity, -Infinity); ecModel.eachSeries(function (seriesModel) { if (seriesModel.coordinateSystem === polar) { var data_1 = seriesModel.getData(); each(getDataDimensionsOnAxis(data_1, 'radius'), function (dim) { radiusAxis.scale.unionExtentFromData(data_1, dim); }); each(getDataDimensionsOnAxis(data_1, 'angle'), function (dim) { angleAxis.scale.unionExtentFromData(data_1, dim); }); } }); niceScaleExtent(angleAxis.scale, angleAxis.model); niceScaleExtent(radiusAxis.scale, radiusAxis.model); // Fix extent of category angle axis if (angleAxis.type === 'category' && !angleAxis.onBand) { var extent = angleAxis.getExtent(); var diff = 360 / angleAxis.scale.count(); angleAxis.inverse ? extent[1] += diff : extent[1] -= diff; angleAxis.setExtent(extent[0], extent[1]); } } function isAngleAxisModel(axisModel) { return axisModel.mainType === 'angleAxis'; } /** * Set common axis properties */ function setAxis(axis, axisModel) { axis.type = axisModel.get('type'); axis.scale = createScaleByModel(axisModel); axis.onBand = axisModel.get('boundaryGap') && axis.type === 'category'; axis.inverse = axisModel.get('inverse'); if (isAngleAxisModel(axisModel)) { axis.inverse = axis.inverse !== axisModel.get('clockwise'); var startAngle = axisModel.get('startAngle'); axis.setExtent(startAngle, startAngle + (axis.inverse ? -360 : 360)); } // Inject axis instance axisModel.axis = axis; axis.model = axisModel; } var polarCreator = { dimensions: Polar.prototype.dimensions, create: function (ecModel, api) { var polarList = []; ecModel.eachComponent('polar', function (polarModel, idx) { var polar = new Polar(idx + ''); // Inject resize and update method polar.update = updatePolarScale; var radiusAxis = polar.getRadiusAxis(); var angleAxis = polar.getAngleAxis(); var radiusAxisModel = polarModel.findAxisModel('radiusAxis'); var angleAxisModel = polarModel.findAxisModel('angleAxis'); setAxis(radiusAxis, radiusAxisModel); setAxis(angleAxis, angleAxisModel); resizePolar(polar, polarModel, api); polarList.push(polar); polarModel.coordinateSystem = polar; polar.model = polarModel; }); // Inject coordinateSystem to series ecModel.eachSeries(function (seriesModel) { if (seriesModel.get('coordinateSystem') === 'polar') { var polarModel = seriesModel.getReferringComponents('polar', SINGLE_REFERRING).models[0]; if ("development" !== 'production') { if (!polarModel) { throw new Error('Polar "' + retrieve(seriesModel.get('polarIndex'), seriesModel.get('polarId'), 0) + '" not found'); } } seriesModel.coordinateSystem = polarModel.coordinateSystem; } }); return polarList; } }; var elementList$1 = ['axisLine', 'axisLabel', 'axisTick', 'minorTick', 'splitLine', 'minorSplitLine', 'splitArea']; function getAxisLineShape(polar, rExtent, angle) { rExtent[1] > rExtent[0] && (rExtent = rExtent.slice().reverse()); var start = polar.coordToPoint([rExtent[0], angle]); var end = polar.coordToPoint([rExtent[1], angle]); return { x1: start[0], y1: start[1], x2: end[0], y2: end[1] }; } function getRadiusIdx(polar) { var radiusAxis = polar.getRadiusAxis(); return radiusAxis.inverse ? 0 : 1; } // Remove the last tick which will overlap the first tick function fixAngleOverlap(list) { var firstItem = list[0]; var lastItem = list[list.length - 1]; if (firstItem && lastItem && Math.abs(Math.abs(firstItem.coord - lastItem.coord) - 360) < 1e-4) { list.pop(); } } var AngleAxisView = /** @class */ function (_super) { __extends(AngleAxisView, _super); function AngleAxisView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = AngleAxisView.type; _this.axisPointerClass = 'PolarAxisPointer'; return _this; } AngleAxisView.prototype.render = function (angleAxisModel, ecModel) { this.group.removeAll(); if (!angleAxisModel.get('show')) { return; } var angleAxis = angleAxisModel.axis; var polar = angleAxis.polar; var radiusExtent = polar.getRadiusAxis().getExtent(); var ticksAngles = angleAxis.getTicksCoords(); var minorTickAngles = angleAxis.getMinorTicksCoords(); var labels = map(angleAxis.getViewLabels(), function (labelItem) { labelItem = clone(labelItem); var scale = angleAxis.scale; var tickValue = scale.type === 'ordinal' ? scale.getRawOrdinalNumber(labelItem.tickValue) : labelItem.tickValue; labelItem.coord = angleAxis.dataToCoord(tickValue); return labelItem; }); fixAngleOverlap(labels); fixAngleOverlap(ticksAngles); each(elementList$1, function (name) { if (angleAxisModel.get([name, 'show']) && (!angleAxis.scale.isBlank() || name === 'axisLine')) { angelAxisElementsBuilders[name](this.group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent, labels); } }, this); }; AngleAxisView.type = 'angleAxis'; return AngleAxisView; }(AxisView); var angelAxisElementsBuilders = { axisLine: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) { var lineStyleModel = angleAxisModel.getModel(['axisLine', 'lineStyle']); // extent id of the axis radius (r0 and r) var rId = getRadiusIdx(polar); var r0Id = rId ? 0 : 1; var shape; if (radiusExtent[r0Id] === 0) { shape = new Circle({ shape: { cx: polar.cx, cy: polar.cy, r: radiusExtent[rId] }, style: lineStyleModel.getLineStyle(), z2: 1, silent: true }); } else { shape = new Ring({ shape: { cx: polar.cx, cy: polar.cy, r: radiusExtent[rId], r0: radiusExtent[r0Id] }, style: lineStyleModel.getLineStyle(), z2: 1, silent: true }); } shape.style.fill = null; group.add(shape); }, axisTick: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) { var tickModel = angleAxisModel.getModel('axisTick'); var tickLen = (tickModel.get('inside') ? -1 : 1) * tickModel.get('length'); var radius = radiusExtent[getRadiusIdx(polar)]; var lines = map(ticksAngles, function (tickAngleItem) { return new Line({ shape: getAxisLineShape(polar, [radius, radius + tickLen], tickAngleItem.coord) }); }); group.add(mergePath$1(lines, { style: defaults(tickModel.getModel('lineStyle').getLineStyle(), { stroke: angleAxisModel.get(['axisLine', 'lineStyle', 'color']) }) })); }, minorTick: function (group, angleAxisModel, polar, tickAngles, minorTickAngles, radiusExtent) { if (!minorTickAngles.length) { return; } var tickModel = angleAxisModel.getModel('axisTick'); var minorTickModel = angleAxisModel.getModel('minorTick'); var tickLen = (tickModel.get('inside') ? -1 : 1) * minorTickModel.get('length'); var radius = radiusExtent[getRadiusIdx(polar)]; var lines = []; for (var i = 0; i < minorTickAngles.length; i++) { for (var k = 0; k < minorTickAngles[i].length; k++) { lines.push(new Line({ shape: getAxisLineShape(polar, [radius, radius + tickLen], minorTickAngles[i][k].coord) })); } } group.add(mergePath$1(lines, { style: defaults(minorTickModel.getModel('lineStyle').getLineStyle(), defaults(tickModel.getLineStyle(), { stroke: angleAxisModel.get(['axisLine', 'lineStyle', 'color']) })) })); }, axisLabel: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent, labels) { var rawCategoryData = angleAxisModel.getCategories(true); var commonLabelModel = angleAxisModel.getModel('axisLabel'); var labelMargin = commonLabelModel.get('margin'); var triggerEvent = angleAxisModel.get('triggerEvent'); // Use length of ticksAngles because it may remove the last tick to avoid overlapping each(labels, function (labelItem, idx) { var labelModel = commonLabelModel; var tickValue = labelItem.tickValue; var r = radiusExtent[getRadiusIdx(polar)]; var p = polar.coordToPoint([r + labelMargin, labelItem.coord]); var cx = polar.cx; var cy = polar.cy; var labelTextAlign = Math.abs(p[0] - cx) / r < 0.3 ? 'center' : p[0] > cx ? 'left' : 'right'; var labelTextVerticalAlign = Math.abs(p[1] - cy) / r < 0.3 ? 'middle' : p[1] > cy ? 'top' : 'bottom'; if (rawCategoryData && rawCategoryData[tickValue]) { var rawCategoryItem = rawCategoryData[tickValue]; if (isObject(rawCategoryItem) && rawCategoryItem.textStyle) { labelModel = new Model(rawCategoryItem.textStyle, commonLabelModel, commonLabelModel.ecModel); } } var textEl = new ZRText({ silent: AxisBuilder.isLabelSilent(angleAxisModel), style: createTextStyle(labelModel, { x: p[0], y: p[1], fill: labelModel.getTextColor() || angleAxisModel.get(['axisLine', 'lineStyle', 'color']), text: labelItem.formattedLabel, align: labelTextAlign, verticalAlign: labelTextVerticalAlign }) }); group.add(textEl); // Pack data for mouse event if (triggerEvent) { var eventData = AxisBuilder.makeAxisEventDataBase(angleAxisModel); eventData.targetType = 'axisLabel'; eventData.value = labelItem.rawLabel; getECData(textEl).eventData = eventData; } }, this); }, splitLine: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) { var splitLineModel = angleAxisModel.getModel('splitLine'); var lineStyleModel = splitLineModel.getModel('lineStyle'); var lineColors = lineStyleModel.get('color'); var lineCount = 0; lineColors = lineColors instanceof Array ? lineColors : [lineColors]; var splitLines = []; for (var i = 0; i < ticksAngles.length; i++) { var colorIndex = lineCount++ % lineColors.length; splitLines[colorIndex] = splitLines[colorIndex] || []; splitLines[colorIndex].push(new Line({ shape: getAxisLineShape(polar, radiusExtent, ticksAngles[i].coord) })); } // Simple optimization // Batching the lines if color are the same for (var i = 0; i < splitLines.length; i++) { group.add(mergePath$1(splitLines[i], { style: defaults({ stroke: lineColors[i % lineColors.length] }, lineStyleModel.getLineStyle()), silent: true, z: angleAxisModel.get('z') })); } }, minorSplitLine: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) { if (!minorTickAngles.length) { return; } var minorSplitLineModel = angleAxisModel.getModel('minorSplitLine'); var lineStyleModel = minorSplitLineModel.getModel('lineStyle'); var lines = []; for (var i = 0; i < minorTickAngles.length; i++) { for (var k = 0; k < minorTickAngles[i].length; k++) { lines.push(new Line({ shape: getAxisLineShape(polar, radiusExtent, minorTickAngles[i][k].coord) })); } } group.add(mergePath$1(lines, { style: lineStyleModel.getLineStyle(), silent: true, z: angleAxisModel.get('z') })); }, splitArea: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) { if (!ticksAngles.length) { return; } var splitAreaModel = angleAxisModel.getModel('splitArea'); var areaStyleModel = splitAreaModel.getModel('areaStyle'); var areaColors = areaStyleModel.get('color'); var lineCount = 0; areaColors = areaColors instanceof Array ? areaColors : [areaColors]; var splitAreas = []; var RADIAN = Math.PI / 180; var prevAngle = -ticksAngles[0].coord * RADIAN; var r0 = Math.min(radiusExtent[0], radiusExtent[1]); var r1 = Math.max(radiusExtent[0], radiusExtent[1]); var clockwise = angleAxisModel.get('clockwise'); for (var i = 1, len = ticksAngles.length; i <= len; i++) { var coord = i === len ? ticksAngles[0].coord : ticksAngles[i].coord; var colorIndex = lineCount++ % areaColors.length; splitAreas[colorIndex] = splitAreas[colorIndex] || []; splitAreas[colorIndex].push(new Sector({ shape: { cx: polar.cx, cy: polar.cy, r0: r0, r: r1, startAngle: prevAngle, endAngle: -coord * RADIAN, clockwise: clockwise }, silent: true })); prevAngle = -coord * RADIAN; } // Simple optimization // Batching the lines if color are the same for (var i = 0; i < splitAreas.length; i++) { group.add(mergePath$1(splitAreas[i], { style: defaults({ fill: areaColors[i % areaColors.length] }, areaStyleModel.getAreaStyle()), silent: true })); } } }; var axisBuilderAttrs$2 = ['axisLine', 'axisTickLabel', 'axisName']; var selfBuilderAttrs$1 = ['splitLine', 'splitArea', 'minorSplitLine']; var RadiusAxisView = /** @class */ function (_super) { __extends(RadiusAxisView, _super); function RadiusAxisView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = RadiusAxisView.type; _this.axisPointerClass = 'PolarAxisPointer'; return _this; } RadiusAxisView.prototype.render = function (radiusAxisModel, ecModel) { this.group.removeAll(); if (!radiusAxisModel.get('show')) { return; } var oldAxisGroup = this._axisGroup; var newAxisGroup = this._axisGroup = new Group(); this.group.add(newAxisGroup); var radiusAxis = radiusAxisModel.axis; var polar = radiusAxis.polar; var angleAxis = polar.getAngleAxis(); var ticksCoords = radiusAxis.getTicksCoords(); var minorTicksCoords = radiusAxis.getMinorTicksCoords(); var axisAngle = angleAxis.getExtent()[0]; var radiusExtent = radiusAxis.getExtent(); var layout = layoutAxis(polar, radiusAxisModel, axisAngle); var axisBuilder = new AxisBuilder(radiusAxisModel, layout); each(axisBuilderAttrs$2, axisBuilder.add, axisBuilder); newAxisGroup.add(axisBuilder.getGroup()); groupTransition(oldAxisGroup, newAxisGroup, radiusAxisModel); each(selfBuilderAttrs$1, function (name) { if (radiusAxisModel.get([name, 'show']) && !radiusAxis.scale.isBlank()) { axisElementBuilders$1[name](this.group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords); } }, this); }; RadiusAxisView.type = 'radiusAxis'; return RadiusAxisView; }(AxisView); var axisElementBuilders$1 = { splitLine: function (group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) { var splitLineModel = radiusAxisModel.getModel('splitLine'); var lineStyleModel = splitLineModel.getModel('lineStyle'); var lineColors = lineStyleModel.get('color'); var lineCount = 0; lineColors = lineColors instanceof Array ? lineColors : [lineColors]; var splitLines = []; for (var i = 0; i < ticksCoords.length; i++) { var colorIndex = lineCount++ % lineColors.length; splitLines[colorIndex] = splitLines[colorIndex] || []; splitLines[colorIndex].push(new Circle({ shape: { cx: polar.cx, cy: polar.cy, r: ticksCoords[i].coord } })); } // Simple optimization // Batching the lines if color are the same for (var i = 0; i < splitLines.length; i++) { group.add(mergePath$1(splitLines[i], { style: defaults({ stroke: lineColors[i % lineColors.length], fill: null }, lineStyleModel.getLineStyle()), silent: true })); } }, minorSplitLine: function (group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords) { if (!minorTicksCoords.length) { return; } var minorSplitLineModel = radiusAxisModel.getModel('minorSplitLine'); var lineStyleModel = minorSplitLineModel.getModel('lineStyle'); var lines = []; for (var i = 0; i < minorTicksCoords.length; i++) { for (var k = 0; k < minorTicksCoords[i].length; k++) { lines.push(new Circle({ shape: { cx: polar.cx, cy: polar.cy, r: minorTicksCoords[i][k].coord } })); } } group.add(mergePath$1(lines, { style: defaults({ fill: null }, lineStyleModel.getLineStyle()), silent: true })); }, splitArea: function (group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) { if (!ticksCoords.length) { return; } var splitAreaModel = radiusAxisModel.getModel('splitArea'); var areaStyleModel = splitAreaModel.getModel('areaStyle'); var areaColors = areaStyleModel.get('color'); var lineCount = 0; areaColors = areaColors instanceof Array ? areaColors : [areaColors]; var splitAreas = []; var prevRadius = ticksCoords[0].coord; for (var i = 1; i < ticksCoords.length; i++) { var colorIndex = lineCount++ % areaColors.length; splitAreas[colorIndex] = splitAreas[colorIndex] || []; splitAreas[colorIndex].push(new Sector({ shape: { cx: polar.cx, cy: polar.cy, r0: prevRadius, r: ticksCoords[i].coord, startAngle: 0, endAngle: Math.PI * 2 }, silent: true })); prevRadius = ticksCoords[i].coord; } // Simple optimization // Batching the lines if color are the same for (var i = 0; i < splitAreas.length; i++) { group.add(mergePath$1(splitAreas[i], { style: defaults({ fill: areaColors[i % areaColors.length] }, areaStyleModel.getAreaStyle()), silent: true })); } } }; /** * @inner */ function layoutAxis(polar, radiusAxisModel, axisAngle) { return { position: [polar.cx, polar.cy], rotation: axisAngle / 180 * Math.PI, labelDirection: -1, tickDirection: -1, nameDirection: 1, labelRotate: radiusAxisModel.getModel('axisLabel').get('rotate'), // Over splitLine and splitArea z2: 1 }; } function getSeriesStackId$1(seriesModel) { return seriesModel.get('stack') || '__ec_stack_' + seriesModel.seriesIndex; } function getAxisKey$1(polar, axis) { return axis.dim + polar.model.componentIndex; } function barLayoutPolar(seriesType, ecModel, api) { var lastStackCoords = {}; var barWidthAndOffset = calRadialBar(filter(ecModel.getSeriesByType(seriesType), function (seriesModel) { return !ecModel.isSeriesFiltered(seriesModel) && seriesModel.coordinateSystem && seriesModel.coordinateSystem.type === 'polar'; })); ecModel.eachSeriesByType(seriesType, function (seriesModel) { // Check series coordinate, do layout for polar only if (seriesModel.coordinateSystem.type !== 'polar') { return; } var data = seriesModel.getData(); var polar = seriesModel.coordinateSystem; var baseAxis = polar.getBaseAxis(); var axisKey = getAxisKey$1(polar, baseAxis); var stackId = getSeriesStackId$1(seriesModel); var columnLayoutInfo = barWidthAndOffset[axisKey][stackId]; var columnOffset = columnLayoutInfo.offset; var columnWidth = columnLayoutInfo.width; var valueAxis = polar.getOtherAxis(baseAxis); var cx = seriesModel.coordinateSystem.cx; var cy = seriesModel.coordinateSystem.cy; var barMinHeight = seriesModel.get('barMinHeight') || 0; var barMinAngle = seriesModel.get('barMinAngle') || 0; lastStackCoords[stackId] = lastStackCoords[stackId] || []; var valueDim = data.mapDimension(valueAxis.dim); var baseDim = data.mapDimension(baseAxis.dim); var stacked = isDimensionStacked(data, valueDim /*, baseDim*/ ); var clampLayout = baseAxis.dim !== 'radius' || !seriesModel.get('roundCap', true); var valueAxisStart = valueAxis.dataToCoord(0); for (var idx = 0, len = data.count(); idx < len; idx++) { var value = data.get(valueDim, idx); var baseValue = data.get(baseDim, idx); var sign = value >= 0 ? 'p' : 'n'; var baseCoord = valueAxisStart; // Because of the barMinHeight, we can not use the value in // stackResultDimension directly. // Only ordinal axis can be stacked. if (stacked) { if (!lastStackCoords[stackId][baseValue]) { lastStackCoords[stackId][baseValue] = { p: valueAxisStart, n: valueAxisStart // Negative stack }; } // Should also consider #4243 baseCoord = lastStackCoords[stackId][baseValue][sign]; } var r0 = void 0; var r = void 0; var startAngle = void 0; var endAngle = void 0; // radial sector if (valueAxis.dim === 'radius') { var radiusSpan = valueAxis.dataToCoord(value) - valueAxisStart; var angle = baseAxis.dataToCoord(baseValue); if (Math.abs(radiusSpan) < barMinHeight) { radiusSpan = (radiusSpan < 0 ? -1 : 1) * barMinHeight; } r0 = baseCoord; r = baseCoord + radiusSpan; startAngle = angle - columnOffset; endAngle = startAngle - columnWidth; stacked && (lastStackCoords[stackId][baseValue][sign] = r); } // tangential sector else { var angleSpan = valueAxis.dataToCoord(value, clampLayout) - valueAxisStart; var radius = baseAxis.dataToCoord(baseValue); if (Math.abs(angleSpan) < barMinAngle) { angleSpan = (angleSpan < 0 ? -1 : 1) * barMinAngle; } r0 = radius + columnOffset; r = r0 + columnWidth; startAngle = baseCoord; endAngle = baseCoord + angleSpan; // if the previous stack is at the end of the ring, // add a round to differentiate it from origin // let extent = angleAxis.getExtent(); // let stackCoord = angle; // if (stackCoord === extent[0] && value > 0) { // stackCoord = extent[1]; // } // else if (stackCoord === extent[1] && value < 0) { // stackCoord = extent[0]; // } stacked && (lastStackCoords[stackId][baseValue][sign] = endAngle); } data.setItemLayout(idx, { cx: cx, cy: cy, r0: r0, r: r, // Consider that positive angle is anti-clockwise, // while positive radian of sector is clockwise startAngle: -startAngle * Math.PI / 180, endAngle: -endAngle * Math.PI / 180 }); } }); } /** * Calculate bar width and offset for radial bar charts */ function calRadialBar(barSeries) { // Columns info on each category axis. Key is polar name var columnsMap = {}; each(barSeries, function (seriesModel, idx) { var data = seriesModel.getData(); var polar = seriesModel.coordinateSystem; var baseAxis = polar.getBaseAxis(); var axisKey = getAxisKey$1(polar, baseAxis); var axisExtent = baseAxis.getExtent(); var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : Math.abs(axisExtent[1] - axisExtent[0]) / data.count(); var columnsOnAxis = columnsMap[axisKey] || { bandWidth: bandWidth, remainedWidth: bandWidth, autoWidthCount: 0, categoryGap: '20%', gap: '30%', stacks: {} }; var stacks = columnsOnAxis.stacks; columnsMap[axisKey] = columnsOnAxis; var stackId = getSeriesStackId$1(seriesModel); if (!stacks[stackId]) { columnsOnAxis.autoWidthCount++; } stacks[stackId] = stacks[stackId] || { width: 0, maxWidth: 0 }; var barWidth = parsePercent$1(seriesModel.get('barWidth'), bandWidth); var barMaxWidth = parsePercent$1(seriesModel.get('barMaxWidth'), bandWidth); var barGap = seriesModel.get('barGap'); var barCategoryGap = seriesModel.get('barCategoryGap'); if (barWidth && !stacks[stackId].width) { barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth); stacks[stackId].width = barWidth; columnsOnAxis.remainedWidth -= barWidth; } barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth); barGap != null && (columnsOnAxis.gap = barGap); barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap); }); var result = {}; each(columnsMap, function (columnsOnAxis, coordSysName) { result[coordSysName] = {}; var stacks = columnsOnAxis.stacks; var bandWidth = columnsOnAxis.bandWidth; var categoryGap = parsePercent$1(columnsOnAxis.categoryGap, bandWidth); var barGapPercent = parsePercent$1(columnsOnAxis.gap, 1); var remainedWidth = columnsOnAxis.remainedWidth; var autoWidthCount = columnsOnAxis.autoWidthCount; var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent); autoWidth = Math.max(autoWidth, 0); // Find if any auto calculated bar exceeded maxBarWidth each(stacks, function (column, stack) { var maxWidth = column.maxWidth; if (maxWidth && maxWidth < autoWidth) { maxWidth = Math.min(maxWidth, remainedWidth); if (column.width) { maxWidth = Math.min(maxWidth, column.width); } remainedWidth -= maxWidth; column.width = maxWidth; autoWidthCount--; } }); // Recalculate width again autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent); autoWidth = Math.max(autoWidth, 0); var widthSum = 0; var lastColumn; each(stacks, function (column, idx) { if (!column.width) { column.width = autoWidth; } lastColumn = column; widthSum += column.width * (1 + barGapPercent); }); if (lastColumn) { widthSum -= lastColumn.width * barGapPercent; } var offset = -widthSum / 2; each(stacks, function (column, stackId) { result[coordSysName][stackId] = result[coordSysName][stackId] || { offset: offset, width: column.width }; offset += column.width * (1 + barGapPercent); }); }); return result; } var angleAxisExtraOption = { startAngle: 90, clockwise: true, splitNumber: 12, axisLabel: { rotate: 0 } }; var radiusAxisExtraOption = { splitNumber: 5 }; var PolarView = /** @class */ function (_super) { __extends(PolarView, _super); function PolarView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = PolarView.type; return _this; } PolarView.type = 'polar'; return PolarView; }(ComponentView); function install$u(registers) { use(install$s); AxisView.registerAxisPointerClass('PolarAxisPointer', PolarAxisPointer); registers.registerCoordinateSystem('polar', polarCreator); registers.registerComponentModel(PolarModel); registers.registerComponentView(PolarView); // Model and view for angleAxis and radiusAxis axisModelCreator(registers, 'angle', AngleAxisModel, angleAxisExtraOption); axisModelCreator(registers, 'radius', RadiusAxisModel, radiusAxisExtraOption); registers.registerComponentView(AngleAxisView); registers.registerComponentView(RadiusAxisView); registers.registerLayout(curry(barLayoutPolar, 'bar')); } function layout$2(axisModel, opt) { opt = opt || {}; var single = axisModel.coordinateSystem; var axis = axisModel.axis; var layout = {}; var axisPosition = axis.position; var orient = axis.orient; var rect = single.getRect(); var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height]; var positionMap = { horizontal: { top: rectBound[2], bottom: rectBound[3] }, vertical: { left: rectBound[0], right: rectBound[1] } }; layout.position = [orient === 'vertical' ? positionMap.vertical[axisPosition] : rectBound[0], orient === 'horizontal' ? positionMap.horizontal[axisPosition] : rectBound[3]]; var r = { horizontal: 0, vertical: 1 }; layout.rotation = Math.PI / 2 * r[orient]; var directionMap = { top: -1, bottom: 1, right: 1, left: -1 }; layout.labelDirection = layout.tickDirection = layout.nameDirection = directionMap[axisPosition]; if (axisModel.get(['axisTick', 'inside'])) { layout.tickDirection = -layout.tickDirection; } if (retrieve(opt.labelInside, axisModel.get(['axisLabel', 'inside']))) { layout.labelDirection = -layout.labelDirection; } var labelRotation = opt.rotate; labelRotation == null && (labelRotation = axisModel.get(['axisLabel', 'rotate'])); layout.labelRotation = axisPosition === 'top' ? -labelRotation : labelRotation; layout.z2 = 1; return layout; } var axisBuilderAttrs$3 = ['axisLine', 'axisTickLabel', 'axisName']; var selfBuilderAttrs$2 = ['splitArea', 'splitLine']; var SingleAxisView = /** @class */ function (_super) { __extends(SingleAxisView, _super); function SingleAxisView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SingleAxisView.type; _this.axisPointerClass = 'SingleAxisPointer'; return _this; } SingleAxisView.prototype.render = function (axisModel, ecModel, api, payload) { var group = this.group; group.removeAll(); var oldAxisGroup = this._axisGroup; this._axisGroup = new Group(); var layout = layout$2(axisModel); var axisBuilder = new AxisBuilder(axisModel, layout); each(axisBuilderAttrs$3, axisBuilder.add, axisBuilder); group.add(this._axisGroup); group.add(axisBuilder.getGroup()); each(selfBuilderAttrs$2, function (name) { if (axisModel.get([name, 'show'])) { axisElementBuilders$2[name](this, this.group, this._axisGroup, axisModel); } }, this); groupTransition(oldAxisGroup, this._axisGroup, axisModel); _super.prototype.render.call(this, axisModel, ecModel, api, payload); }; SingleAxisView.prototype.remove = function () { rectCoordAxisHandleRemove(this); }; SingleAxisView.type = 'singleAxis'; return SingleAxisView; }(AxisView); var axisElementBuilders$2 = { splitLine: function (axisView, group, axisGroup, axisModel) { var axis = axisModel.axis; if (axis.scale.isBlank()) { return; } var splitLineModel = axisModel.getModel('splitLine'); var lineStyleModel = splitLineModel.getModel('lineStyle'); var lineColors = lineStyleModel.get('color'); lineColors = lineColors instanceof Array ? lineColors : [lineColors]; var gridRect = axisModel.coordinateSystem.getRect(); var isHorizontal = axis.isHorizontal(); var splitLines = []; var lineCount = 0; var ticksCoords = axis.getTicksCoords({ tickModel: splitLineModel }); var p1 = []; var p2 = []; for (var i = 0; i < ticksCoords.length; ++i) { var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord); if (isHorizontal) { p1[0] = tickCoord; p1[1] = gridRect.y; p2[0] = tickCoord; p2[1] = gridRect.y + gridRect.height; } else { p1[0] = gridRect.x; p1[1] = tickCoord; p2[0] = gridRect.x + gridRect.width; p2[1] = tickCoord; } var colorIndex = lineCount++ % lineColors.length; splitLines[colorIndex] = splitLines[colorIndex] || []; splitLines[colorIndex].push(new Line({ subPixelOptimize: true, shape: { x1: p1[0], y1: p1[1], x2: p2[0], y2: p2[1] }, silent: true })); } var lineStyle = lineStyleModel.getLineStyle(['color']); for (var i = 0; i < splitLines.length; ++i) { group.add(mergePath$1(splitLines[i], { style: defaults({ stroke: lineColors[i % lineColors.length] }, lineStyle), silent: true })); } }, splitArea: function (axisView, group, axisGroup, axisModel) { rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, axisModel); } }; var SingleAxisModel = /** @class */ function (_super) { __extends(SingleAxisModel, _super); function SingleAxisModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SingleAxisModel.type; return _this; } SingleAxisModel.prototype.getCoordSysModel = function () { return this; }; SingleAxisModel.type = 'singleAxis'; SingleAxisModel.layoutMode = 'box'; SingleAxisModel.defaultOption = { left: '5%', top: '5%', right: '5%', bottom: '5%', type: 'value', position: 'bottom', orient: 'horizontal', axisLine: { show: true, lineStyle: { width: 1, type: 'solid' } }, // Single coordinate system and single axis is the, // which is used as the parent tooltip model. // same model, so we set default tooltip show as true. tooltip: { show: true }, axisTick: { show: true, length: 6, lineStyle: { width: 1 } }, axisLabel: { show: true, interval: 'auto' }, splitLine: { show: true, lineStyle: { type: 'dashed', opacity: 0.2 } } }; return SingleAxisModel; }(ComponentModel); mixin(SingleAxisModel, AxisModelCommonMixin.prototype); var SingleAxis = /** @class */ function (_super) { __extends(SingleAxis, _super); function SingleAxis(dim, scale, coordExtent, axisType, position) { var _this = _super.call(this, dim, scale, coordExtent) || this; _this.type = axisType || 'value'; _this.position = position || 'bottom'; return _this; } /** * Judge the orient of the axis. */ SingleAxis.prototype.isHorizontal = function () { var position = this.position; return position === 'top' || position === 'bottom'; }; SingleAxis.prototype.pointToData = function (point, clamp) { return this.coordinateSystem.pointToData(point)[0]; }; return SingleAxis; }(Axis); /** * Create a single coordinates system. */ var Single = /** @class */ function () { function Single(axisModel, ecModel, api) { this.type = 'single'; this.dimension = 'single'; /** * Add it just for draw tooltip. */ this.dimensions = ['single']; this.axisPointerEnabled = true; this.model = axisModel; this._init(axisModel, ecModel, api); } /** * Initialize single coordinate system. */ Single.prototype._init = function (axisModel, ecModel, api) { var dim = this.dimension; var axis = new SingleAxis(dim, createScaleByModel(axisModel), [0, 0], axisModel.get('type'), axisModel.get('position')); var isCategory = axis.type === 'category'; axis.onBand = isCategory && axisModel.get('boundaryGap'); axis.inverse = axisModel.get('inverse'); axis.orient = axisModel.get('orient'); axisModel.axis = axis; axis.model = axisModel; axis.coordinateSystem = this; this._axis = axis; }; /** * Update axis scale after data processed */ Single.prototype.update = function (ecModel, api) { ecModel.eachSeries(function (seriesModel) { if (seriesModel.coordinateSystem === this) { var data_1 = seriesModel.getData(); each(data_1.mapDimensionsAll(this.dimension), function (dim) { this._axis.scale.unionExtentFromData(data_1, dim); }, this); niceScaleExtent(this._axis.scale, this._axis.model); } }, this); }; /** * Resize the single coordinate system. */ Single.prototype.resize = function (axisModel, api) { this._rect = getLayoutRect({ left: axisModel.get('left'), top: axisModel.get('top'), right: axisModel.get('right'), bottom: axisModel.get('bottom'), width: axisModel.get('width'), height: axisModel.get('height') }, { width: api.getWidth(), height: api.getHeight() }); this._adjustAxis(); }; Single.prototype.getRect = function () { return this._rect; }; Single.prototype._adjustAxis = function () { var rect = this._rect; var axis = this._axis; var isHorizontal = axis.isHorizontal(); var extent = isHorizontal ? [0, rect.width] : [0, rect.height]; var idx = axis.reverse ? 1 : 0; axis.setExtent(extent[idx], extent[1 - idx]); this._updateAxisTransform(axis, isHorizontal ? rect.x : rect.y); }; Single.prototype._updateAxisTransform = function (axis, coordBase) { var axisExtent = axis.getExtent(); var extentSum = axisExtent[0] + axisExtent[1]; var isHorizontal = axis.isHorizontal(); axis.toGlobalCoord = isHorizontal ? function (coord) { return coord + coordBase; } : function (coord) { return extentSum - coord + coordBase; }; axis.toLocalCoord = isHorizontal ? function (coord) { return coord - coordBase; } : function (coord) { return extentSum - coord + coordBase; }; }; /** * Get axis. */ Single.prototype.getAxis = function () { return this._axis; }; /** * Get axis, add it just for draw tooltip. */ Single.prototype.getBaseAxis = function () { return this._axis; }; Single.prototype.getAxes = function () { return [this._axis]; }; Single.prototype.getTooltipAxes = function () { return { baseAxes: [this.getAxis()], // Empty otherAxes otherAxes: [] }; }; /** * If contain point. */ Single.prototype.containPoint = function (point) { var rect = this.getRect(); var axis = this.getAxis(); var orient = axis.orient; if (orient === 'horizontal') { return axis.contain(axis.toLocalCoord(point[0])) && point[1] >= rect.y && point[1] <= rect.y + rect.height; } else { return axis.contain(axis.toLocalCoord(point[1])) && point[0] >= rect.y && point[0] <= rect.y + rect.height; } }; Single.prototype.pointToData = function (point) { var axis = this.getAxis(); return [axis.coordToData(axis.toLocalCoord(point[axis.orient === 'horizontal' ? 0 : 1]))]; }; /** * Convert the series data to concrete point. * Can be [val] | val */ Single.prototype.dataToPoint = function (val) { var axis = this.getAxis(); var rect = this.getRect(); var pt = []; var idx = axis.orient === 'horizontal' ? 0 : 1; if (val instanceof Array) { val = val[0]; } pt[idx] = axis.toGlobalCoord(axis.dataToCoord(+val)); pt[1 - idx] = idx === 0 ? rect.y + rect.height / 2 : rect.x + rect.width / 2; return pt; }; Single.prototype.convertToPixel = function (ecModel, finder, value) { var coordSys = getCoordSys$3(finder); return coordSys === this ? this.dataToPoint(value) : null; }; Single.prototype.convertFromPixel = function (ecModel, finder, pixel) { var coordSys = getCoordSys$3(finder); return coordSys === this ? this.pointToData(pixel) : null; }; return Single; }(); function getCoordSys$3(finder) { var seriesModel = finder.seriesModel; var singleModel = finder.singleAxisModel; return singleModel && singleModel.coordinateSystem || seriesModel && seriesModel.coordinateSystem; } /** * Create single coordinate system and inject it into seriesModel. */ function create$2(ecModel, api) { var singles = []; ecModel.eachComponent('singleAxis', function (axisModel, idx) { var single = new Single(axisModel, ecModel, api); single.name = 'single_' + idx; single.resize(axisModel, api); axisModel.coordinateSystem = single; singles.push(single); }); ecModel.eachSeries(function (seriesModel) { if (seriesModel.get('coordinateSystem') === 'singleAxis') { var singleAxisModel = seriesModel.getReferringComponents('singleAxis', SINGLE_REFERRING).models[0]; seriesModel.coordinateSystem = singleAxisModel && singleAxisModel.coordinateSystem; } }); return singles; } var singleCreator = { create: create$2, dimensions: Single.prototype.dimensions }; var XY = ['x', 'y']; var WH = ['width', 'height']; var SingleAxisPointer = /** @class */ function (_super) { __extends(SingleAxisPointer, _super); function SingleAxisPointer() { return _super !== null && _super.apply(this, arguments) || this; } /** * @override */ SingleAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) { var axis = axisModel.axis; var coordSys = axis.coordinateSystem; var otherExtent = getGlobalExtent(coordSys, 1 - getPointDimIndex(axis)); var pixelValue = coordSys.dataToPoint(value)[0]; var axisPointerType = axisPointerModel.get('type'); if (axisPointerType && axisPointerType !== 'none') { var elStyle = buildElStyle(axisPointerModel); var pointerOption = pointerShapeBuilder$2[axisPointerType](axis, pixelValue, otherExtent); pointerOption.style = elStyle; elOption.graphicKey = pointerOption.type; elOption.pointer = pointerOption; } var layoutInfo = layout$2(axisModel); buildCartesianSingleLabelElOption( // @ts-ignore value, elOption, layoutInfo, axisModel, axisPointerModel, api); }; /** * @override */ SingleAxisPointer.prototype.getHandleTransform = function (value, axisModel, axisPointerModel) { var layoutInfo = layout$2(axisModel, { labelInside: false }); // @ts-ignore layoutInfo.labelMargin = axisPointerModel.get(['handle', 'margin']); var position = getTransformedPosition(axisModel.axis, value, layoutInfo); return { x: position[0], y: position[1], rotation: layoutInfo.rotation + (layoutInfo.labelDirection < 0 ? Math.PI : 0) }; }; /** * @override */ SingleAxisPointer.prototype.updateHandleTransform = function (transform, delta, axisModel, axisPointerModel) { var axis = axisModel.axis; var coordSys = axis.coordinateSystem; var dimIndex = getPointDimIndex(axis); var axisExtent = getGlobalExtent(coordSys, dimIndex); var currPosition = [transform.x, transform.y]; currPosition[dimIndex] += delta[dimIndex]; currPosition[dimIndex] = Math.min(axisExtent[1], currPosition[dimIndex]); currPosition[dimIndex] = Math.max(axisExtent[0], currPosition[dimIndex]); var otherExtent = getGlobalExtent(coordSys, 1 - dimIndex); var cursorOtherValue = (otherExtent[1] + otherExtent[0]) / 2; var cursorPoint = [cursorOtherValue, cursorOtherValue]; cursorPoint[dimIndex] = currPosition[dimIndex]; return { x: currPosition[0], y: currPosition[1], rotation: transform.rotation, cursorPoint: cursorPoint, tooltipOption: { verticalAlign: 'middle' } }; }; return SingleAxisPointer; }(BaseAxisPointer); var pointerShapeBuilder$2 = { line: function (axis, pixelValue, otherExtent) { var targetShape = makeLineShape([pixelValue, otherExtent[0]], [pixelValue, otherExtent[1]], getPointDimIndex(axis)); return { type: 'Line', subPixelOptimize: true, shape: targetShape }; }, shadow: function (axis, pixelValue, otherExtent) { var bandWidth = axis.getBandWidth(); var span = otherExtent[1] - otherExtent[0]; return { type: 'Rect', shape: makeRectShape([pixelValue - bandWidth / 2, otherExtent[0]], [bandWidth, span], getPointDimIndex(axis)) }; } }; function getPointDimIndex(axis) { return axis.isHorizontal() ? 0 : 1; } function getGlobalExtent(coordSys, dimIndex) { var rect = coordSys.getRect(); return [rect[XY[dimIndex]], rect[XY[dimIndex]] + rect[WH[dimIndex]]]; } var SingleView = /** @class */ function (_super) { __extends(SingleView, _super); function SingleView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SingleView.type; return _this; } SingleView.type = 'single'; return SingleView; }(ComponentView); function install$v(registers) { use(install$s); AxisView.registerAxisPointerClass('SingleAxisPointer', SingleAxisPointer); registers.registerComponentView(SingleView); // Axis registers.registerComponentView(SingleAxisView); registers.registerComponentModel(SingleAxisModel); axisModelCreator(registers, 'single', SingleAxisModel, SingleAxisModel.defaultOption); registers.registerCoordinateSystem('single', singleCreator); } var CalendarModel = /** @class */ function (_super) { __extends(CalendarModel, _super); function CalendarModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = CalendarModel.type; return _this; } /** * @override */ CalendarModel.prototype.init = function (option, parentModel, ecModel) { var inputPositionParams = getLayoutParams(option); _super.prototype.init.apply(this, arguments); mergeAndNormalizeLayoutParams(option, inputPositionParams); }; /** * @override */ CalendarModel.prototype.mergeOption = function (option) { _super.prototype.mergeOption.apply(this, arguments); mergeAndNormalizeLayoutParams(this.option, option); }; CalendarModel.prototype.getCellSize = function () { // Has been normalized return this.option.cellSize; }; CalendarModel.type = 'calendar'; CalendarModel.defaultOption = { zlevel: 0, z: 2, left: 80, top: 60, cellSize: 20, // horizontal vertical orient: 'horizontal', // month separate line style splitLine: { show: true, lineStyle: { color: '#000', width: 1, type: 'solid' } }, // rect style temporarily unused emphasis itemStyle: { color: '#fff', borderWidth: 1, borderColor: '#ccc' }, // week text style dayLabel: { show: true, firstDay: 0, // start end position: 'start', margin: '50%', nameMap: 'en', color: '#000' }, // month text style monthLabel: { show: true, // start end position: 'start', margin: 5, // center or left align: 'center', // cn en [] nameMap: 'en', formatter: null, color: '#000' }, // year text style yearLabel: { show: true, // top bottom left right position: null, margin: 30, formatter: null, color: '#ccc', fontFamily: 'sans-serif', fontWeight: 'bolder', fontSize: 20 } }; return CalendarModel; }(ComponentModel); function mergeAndNormalizeLayoutParams(target, raw) { // Normalize cellSize var cellSize = target.cellSize; var cellSizeArr; if (!isArray(cellSize)) { cellSizeArr = target.cellSize = [cellSize, cellSize]; } else { cellSizeArr = cellSize; } if (cellSizeArr.length === 1) { cellSizeArr[1] = cellSizeArr[0]; } var ignoreSize = map([0, 1], function (hvIdx) { // If user have set `width` or both `left` and `right`, cellSizeArr // will be automatically set to 'auto', otherwise the default // setting of cellSizeArr will make `width` setting not work. if (sizeCalculable(raw, hvIdx)) { cellSizeArr[hvIdx] = 'auto'; } return cellSizeArr[hvIdx] != null && cellSizeArr[hvIdx] !== 'auto'; }); mergeLayoutParam(target, raw, { type: 'box', ignoreSize: ignoreSize }); } var MONTH_TEXT = { EN: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], CN: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'] }; var WEEK_TEXT = { EN: ['S', 'M', 'T', 'W', 'T', 'F', 'S'], CN: ['日', '一', '二', '三', '四', '五', '六'] }; var CalendarView = /** @class */ function (_super) { __extends(CalendarView, _super); function CalendarView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = CalendarView.type; return _this; } CalendarView.prototype.render = function (calendarModel, ecModel, api) { var group = this.group; group.removeAll(); var coordSys = calendarModel.coordinateSystem; // range info var rangeData = coordSys.getRangeInfo(); var orient = coordSys.getOrient(); this._renderDayRect(calendarModel, rangeData, group); // _renderLines must be called prior to following function this._renderLines(calendarModel, rangeData, orient, group); this._renderYearText(calendarModel, rangeData, orient, group); this._renderMonthText(calendarModel, orient, group); this._renderWeekText(calendarModel, rangeData, orient, group); }; // render day rect CalendarView.prototype._renderDayRect = function (calendarModel, rangeData, group) { var coordSys = calendarModel.coordinateSystem; var itemRectStyleModel = calendarModel.getModel('itemStyle').getItemStyle(); var sw = coordSys.getCellWidth(); var sh = coordSys.getCellHeight(); for (var i = rangeData.start.time; i <= rangeData.end.time; i = coordSys.getNextNDay(i, 1).time) { var point = coordSys.dataToRect([i], false).tl; // every rect var rect = new Rect({ shape: { x: point[0], y: point[1], width: sw, height: sh }, cursor: 'default', style: itemRectStyleModel }); group.add(rect); } }; // render separate line CalendarView.prototype._renderLines = function (calendarModel, rangeData, orient, group) { var self = this; var coordSys = calendarModel.coordinateSystem; var lineStyleModel = calendarModel.getModel(['splitLine', 'lineStyle']).getLineStyle(); var show = calendarModel.get(['splitLine', 'show']); var lineWidth = lineStyleModel.lineWidth; this._tlpoints = []; this._blpoints = []; this._firstDayOfMonth = []; this._firstDayPoints = []; var firstDay = rangeData.start; for (var i = 0; firstDay.time <= rangeData.end.time; i++) { addPoints(firstDay.formatedDate); if (i === 0) { firstDay = coordSys.getDateInfo(rangeData.start.y + '-' + rangeData.start.m); } var date = firstDay.date; date.setMonth(date.getMonth() + 1); firstDay = coordSys.getDateInfo(date); } addPoints(coordSys.getNextNDay(rangeData.end.time, 1).formatedDate); function addPoints(date) { self._firstDayOfMonth.push(coordSys.getDateInfo(date)); self._firstDayPoints.push(coordSys.dataToRect([date], false).tl); var points = self._getLinePointsOfOneWeek(calendarModel, date, orient); self._tlpoints.push(points[0]); self._blpoints.push(points[points.length - 1]); show && self._drawSplitline(points, lineStyleModel, group); } // render top/left line show && this._drawSplitline(self._getEdgesPoints(self._tlpoints, lineWidth, orient), lineStyleModel, group); // render bottom/right line show && this._drawSplitline(self._getEdgesPoints(self._blpoints, lineWidth, orient), lineStyleModel, group); }; // get points at both ends CalendarView.prototype._getEdgesPoints = function (points, lineWidth, orient) { var rs = [points[0].slice(), points[points.length - 1].slice()]; var idx = orient === 'horizontal' ? 0 : 1; // both ends of the line are extend half lineWidth rs[0][idx] = rs[0][idx] - lineWidth / 2; rs[1][idx] = rs[1][idx] + lineWidth / 2; return rs; }; // render split line CalendarView.prototype._drawSplitline = function (points, lineStyle, group) { var poyline = new Polyline({ z2: 20, shape: { points: points }, style: lineStyle }); group.add(poyline); }; // render month line of one week points CalendarView.prototype._getLinePointsOfOneWeek = function (calendarModel, date, orient) { var coordSys = calendarModel.coordinateSystem; var parsedDate = coordSys.getDateInfo(date); var points = []; for (var i = 0; i < 7; i++) { var tmpD = coordSys.getNextNDay(parsedDate.time, i); var point = coordSys.dataToRect([tmpD.time], false); points[2 * tmpD.day] = point.tl; points[2 * tmpD.day + 1] = point[orient === 'horizontal' ? 'bl' : 'tr']; } return points; }; CalendarView.prototype._formatterLabel = function (formatter, params) { if (typeof formatter === 'string' && formatter) { return formatTplSimple(formatter, params); } if (typeof formatter === 'function') { return formatter(params); } return params.nameMap; }; CalendarView.prototype._yearTextPositionControl = function (textEl, point, orient, position, margin) { var x = point[0]; var y = point[1]; var aligns = ['center', 'bottom']; if (position === 'bottom') { y += margin; aligns = ['center', 'top']; } else if (position === 'left') { x -= margin; } else if (position === 'right') { x += margin; aligns = ['center', 'top']; } else { // top y -= margin; } var rotate = 0; if (position === 'left' || position === 'right') { rotate = Math.PI / 2; } return { rotation: rotate, x: x, y: y, style: { align: aligns[0], verticalAlign: aligns[1] } }; }; // render year CalendarView.prototype._renderYearText = function (calendarModel, rangeData, orient, group) { var yearLabel = calendarModel.getModel('yearLabel'); if (!yearLabel.get('show')) { return; } var margin = yearLabel.get('margin'); var pos = yearLabel.get('position'); if (!pos) { pos = orient !== 'horizontal' ? 'top' : 'left'; } var points = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]]; var xc = (points[0][0] + points[1][0]) / 2; var yc = (points[0][1] + points[1][1]) / 2; var idx = orient === 'horizontal' ? 0 : 1; var posPoints = { top: [xc, points[idx][1]], bottom: [xc, points[1 - idx][1]], left: [points[1 - idx][0], yc], right: [points[idx][0], yc] }; var name = rangeData.start.y; if (+rangeData.end.y > +rangeData.start.y) { name = name + '-' + rangeData.end.y; } var formatter = yearLabel.get('formatter'); var params = { start: rangeData.start.y, end: rangeData.end.y, nameMap: name }; var content = this._formatterLabel(formatter, params); var yearText = new ZRText({ z2: 30, style: createTextStyle(yearLabel, { text: content }) }); yearText.attr(this._yearTextPositionControl(yearText, posPoints[pos], orient, pos, margin)); group.add(yearText); }; CalendarView.prototype._monthTextPositionControl = function (point, isCenter, orient, position, margin) { var align = 'left'; var vAlign = 'top'; var x = point[0]; var y = point[1]; if (orient === 'horizontal') { y = y + margin; if (isCenter) { align = 'center'; } if (position === 'start') { vAlign = 'bottom'; } } else { x = x + margin; if (isCenter) { vAlign = 'middle'; } if (position === 'start') { align = 'right'; } } return { x: x, y: y, align: align, verticalAlign: vAlign }; }; // render month and year text CalendarView.prototype._renderMonthText = function (calendarModel, orient, group) { var monthLabel = calendarModel.getModel('monthLabel'); if (!monthLabel.get('show')) { return; } var nameMap = monthLabel.get('nameMap'); var margin = monthLabel.get('margin'); var pos = monthLabel.get('position'); var align = monthLabel.get('align'); var termPoints = [this._tlpoints, this._blpoints]; if (isString(nameMap)) { nameMap = MONTH_TEXT[nameMap.toUpperCase()] || []; } var idx = pos === 'start' ? 0 : 1; var axis = orient === 'horizontal' ? 0 : 1; margin = pos === 'start' ? -margin : margin; var isCenter = align === 'center'; for (var i = 0; i < termPoints[idx].length - 1; i++) { var tmp = termPoints[idx][i].slice(); var firstDay = this._firstDayOfMonth[i]; if (isCenter) { var firstDayPoints = this._firstDayPoints[i]; tmp[axis] = (firstDayPoints[axis] + termPoints[0][i + 1][axis]) / 2; } var formatter = monthLabel.get('formatter'); var name_1 = nameMap[+firstDay.m - 1]; var params = { yyyy: firstDay.y, yy: (firstDay.y + '').slice(2), MM: firstDay.m, M: +firstDay.m, nameMap: name_1 }; var content = this._formatterLabel(formatter, params); var monthText = new ZRText({ z2: 30, style: extend(createTextStyle(monthLabel, { text: content }), this._monthTextPositionControl(tmp, isCenter, orient, pos, margin)) }); group.add(monthText); } }; CalendarView.prototype._weekTextPositionControl = function (point, orient, position, margin, cellSize) { var align = 'center'; var vAlign = 'middle'; var x = point[0]; var y = point[1]; var isStart = position === 'start'; if (orient === 'horizontal') { x = x + margin + (isStart ? 1 : -1) * cellSize[0] / 2; align = isStart ? 'right' : 'left'; } else { y = y + margin + (isStart ? 1 : -1) * cellSize[1] / 2; vAlign = isStart ? 'bottom' : 'top'; } return { x: x, y: y, align: align, verticalAlign: vAlign }; }; // render weeks CalendarView.prototype._renderWeekText = function (calendarModel, rangeData, orient, group) { var dayLabel = calendarModel.getModel('dayLabel'); if (!dayLabel.get('show')) { return; } var coordSys = calendarModel.coordinateSystem; var pos = dayLabel.get('position'); var nameMap = dayLabel.get('nameMap'); var margin = dayLabel.get('margin'); var firstDayOfWeek = coordSys.getFirstDayOfWeek(); if (isString(nameMap)) { nameMap = WEEK_TEXT[nameMap.toUpperCase()] || []; } var start = coordSys.getNextNDay(rangeData.end.time, 7 - rangeData.lweek).time; var cellSize = [coordSys.getCellWidth(), coordSys.getCellHeight()]; margin = parsePercent$1(margin, Math.min(cellSize[1], cellSize[0])); if (pos === 'start') { start = coordSys.getNextNDay(rangeData.start.time, -(7 + rangeData.fweek)).time; margin = -margin; } for (var i = 0; i < 7; i++) { var tmpD = coordSys.getNextNDay(start, i); var point = coordSys.dataToRect([tmpD.time], false).center; var day = i; day = Math.abs((i + firstDayOfWeek) % 7); var weekText = new ZRText({ z2: 30, style: extend(createTextStyle(dayLabel, { text: nameMap[day] }), this._weekTextPositionControl(point, orient, pos, margin, cellSize)) }); group.add(weekText); } }; CalendarView.type = 'calendar'; return CalendarView; }(ComponentView); var PROXIMATE_ONE_DAY = 86400000; var Calendar = /** @class */ function () { function Calendar(calendarModel, ecModel, api) { this.type = 'calendar'; this.dimensions = Calendar.dimensions; // Required in createListFromData this.getDimensionsInfo = Calendar.getDimensionsInfo; this._model = calendarModel; } Calendar.getDimensionsInfo = function () { return [{ name: 'time', type: 'time' }, 'value']; }; Calendar.prototype.getRangeInfo = function () { return this._rangeInfo; }; Calendar.prototype.getModel = function () { return this._model; }; Calendar.prototype.getRect = function () { return this._rect; }; Calendar.prototype.getCellWidth = function () { return this._sw; }; Calendar.prototype.getCellHeight = function () { return this._sh; }; Calendar.prototype.getOrient = function () { return this._orient; }; /** * getFirstDayOfWeek * * @example * 0 : start at Sunday * 1 : start at Monday * * @return {number} */ Calendar.prototype.getFirstDayOfWeek = function () { return this._firstDayOfWeek; }; /** * get date info * } */ Calendar.prototype.getDateInfo = function (date) { date = parseDate(date); var y = date.getFullYear(); var m = date.getMonth() + 1; var mStr = m < 10 ? '0' + m : '' + m; var d = date.getDate(); var dStr = d < 10 ? '0' + d : '' + d; var day = date.getDay(); day = Math.abs((day + 7 - this.getFirstDayOfWeek()) % 7); return { y: y + '', m: mStr, d: dStr, day: day, time: date.getTime(), formatedDate: y + '-' + mStr + '-' + dStr, date: date }; }; Calendar.prototype.getNextNDay = function (date, n) { n = n || 0; if (n === 0) { return this.getDateInfo(date); } date = new Date(this.getDateInfo(date).time); date.setDate(date.getDate() + n); return this.getDateInfo(date); }; Calendar.prototype.update = function (ecModel, api) { this._firstDayOfWeek = +this._model.getModel('dayLabel').get('firstDay'); this._orient = this._model.get('orient'); this._lineWidth = this._model.getModel('itemStyle').getItemStyle().lineWidth || 0; this._rangeInfo = this._getRangeInfo(this._initRangeOption()); var weeks = this._rangeInfo.weeks || 1; var whNames = ['width', 'height']; var cellSize = this._model.getCellSize().slice(); var layoutParams = this._model.getBoxLayoutParams(); var cellNumbers = this._orient === 'horizontal' ? [weeks, 7] : [7, weeks]; each([0, 1], function (idx) { if (cellSizeSpecified(cellSize, idx)) { layoutParams[whNames[idx]] = cellSize[idx] * cellNumbers[idx]; } }); var whGlobal = { width: api.getWidth(), height: api.getHeight() }; var calendarRect = this._rect = getLayoutRect(layoutParams, whGlobal); each([0, 1], function (idx) { if (!cellSizeSpecified(cellSize, idx)) { cellSize[idx] = calendarRect[whNames[idx]] / cellNumbers[idx]; } }); function cellSizeSpecified(cellSize, idx) { return cellSize[idx] != null && cellSize[idx] !== 'auto'; } // Has been calculated out number. this._sw = cellSize[0]; this._sh = cellSize[1]; }; /** * Convert a time data(time, value) item to (x, y) point. */ // TODO Clamp of calendar is not same with cartesian coordinate systems. // It will return NaN if data exceeds. Calendar.prototype.dataToPoint = function (data, clamp) { isArray(data) && (data = data[0]); clamp == null && (clamp = true); var dayInfo = this.getDateInfo(data); var range = this._rangeInfo; var date = dayInfo.formatedDate; // if not in range return [NaN, NaN] if (clamp && !(dayInfo.time >= range.start.time && dayInfo.time < range.end.time + PROXIMATE_ONE_DAY)) { return [NaN, NaN]; } var week = dayInfo.day; var nthWeek = this._getRangeInfo([range.start.time, date]).nthWeek; if (this._orient === 'vertical') { return [this._rect.x + week * this._sw + this._sw / 2, this._rect.y + nthWeek * this._sh + this._sh / 2]; } return [this._rect.x + nthWeek * this._sw + this._sw / 2, this._rect.y + week * this._sh + this._sh / 2]; }; /** * Convert a (x, y) point to time data */ Calendar.prototype.pointToData = function (point) { var date = this.pointToDate(point); return date && date.time; }; /** * Convert a time date item to (x, y) four point. */ Calendar.prototype.dataToRect = function (data, clamp) { var point = this.dataToPoint(data, clamp); return { contentShape: { x: point[0] - (this._sw - this._lineWidth) / 2, y: point[1] - (this._sh - this._lineWidth) / 2, width: this._sw - this._lineWidth, height: this._sh - this._lineWidth }, center: point, tl: [point[0] - this._sw / 2, point[1] - this._sh / 2], tr: [point[0] + this._sw / 2, point[1] - this._sh / 2], br: [point[0] + this._sw / 2, point[1] + this._sh / 2], bl: [point[0] - this._sw / 2, point[1] + this._sh / 2] }; }; /** * Convert a (x, y) point to time date * * @param {Array} point point * @return {Object} date */ Calendar.prototype.pointToDate = function (point) { var nthX = Math.floor((point[0] - this._rect.x) / this._sw) + 1; var nthY = Math.floor((point[1] - this._rect.y) / this._sh) + 1; var range = this._rangeInfo.range; if (this._orient === 'vertical') { return this._getDateByWeeksAndDay(nthY, nthX - 1, range); } return this._getDateByWeeksAndDay(nthX, nthY - 1, range); }; Calendar.prototype.convertToPixel = function (ecModel, finder, value) { var coordSys = getCoordSys$4(finder); return coordSys === this ? coordSys.dataToPoint(value) : null; }; Calendar.prototype.convertFromPixel = function (ecModel, finder, pixel) { var coordSys = getCoordSys$4(finder); return coordSys === this ? coordSys.pointToData(pixel) : null; }; Calendar.prototype.containPoint = function (point) { console.warn('Not implemented.'); return false; }; /** * initRange * Normalize to an [start, end] array */ Calendar.prototype._initRangeOption = function () { var range = this._model.get('range'); var normalizedRange; // Convert [1990] to 1990 if (isArray(range) && range.length === 1) { range = range[0]; } if (!isArray(range)) { var rangeStr = range.toString(); // One year. if (/^\d{4}$/.test(rangeStr)) { normalizedRange = [rangeStr + '-01-01', rangeStr + '-12-31']; } // One month if (/^\d{4}[\/|-]\d{1,2}$/.test(rangeStr)) { var start = this.getDateInfo(rangeStr); var firstDay = start.date; firstDay.setMonth(firstDay.getMonth() + 1); var end = this.getNextNDay(firstDay, -1); normalizedRange = [start.formatedDate, end.formatedDate]; } // One day if (/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(rangeStr)) { normalizedRange = [rangeStr, rangeStr]; } } else { normalizedRange = range; } if (!normalizedRange) { if ("development" !== 'production') { logError('Invalid date range.'); } // Not handling it. return range; } var tmp = this._getRangeInfo(normalizedRange); if (tmp.start.time > tmp.end.time) { normalizedRange.reverse(); } return normalizedRange; }; /** * range info * * @private * @param {Array} range range ['2017-01-01', '2017-07-08'] * If range[0] > range[1], they will not be reversed. * @return {Object} obj */ Calendar.prototype._getRangeInfo = function (range) { var parsedRange = [this.getDateInfo(range[0]), this.getDateInfo(range[1])]; var reversed; if (parsedRange[0].time > parsedRange[1].time) { reversed = true; parsedRange.reverse(); } var allDay = Math.floor(parsedRange[1].time / PROXIMATE_ONE_DAY) - Math.floor(parsedRange[0].time / PROXIMATE_ONE_DAY) + 1; // Consider case1 (#11677 #10430): // Set the system timezone as "UK", set the range to `['2016-07-01', '2016-12-31']` // Consider case2: // Firstly set system timezone as "Time Zone: America/Toronto", // ``` // let first = new Date(1478412000000 - 3600 * 1000 * 2.5); // let second = new Date(1478412000000); // let allDays = Math.floor(second / ONE_DAY) - Math.floor(first / ONE_DAY) + 1; // ``` // will get wrong result because of DST. So we should fix it. var date = new Date(parsedRange[0].time); var startDateNum = date.getDate(); var endDateNum = parsedRange[1].date.getDate(); date.setDate(startDateNum + allDay - 1); // The bias can not over a month, so just compare date. var dateNum = date.getDate(); if (dateNum !== endDateNum) { var sign = date.getTime() - parsedRange[1].time > 0 ? 1 : -1; while ((dateNum = date.getDate()) !== endDateNum && (date.getTime() - parsedRange[1].time) * sign > 0) { allDay -= sign; date.setDate(dateNum - sign); } } var weeks = Math.floor((allDay + parsedRange[0].day + 6) / 7); var nthWeek = reversed ? -weeks + 1 : weeks - 1; reversed && parsedRange.reverse(); return { range: [parsedRange[0].formatedDate, parsedRange[1].formatedDate], start: parsedRange[0], end: parsedRange[1], allDay: allDay, weeks: weeks, // From 0. nthWeek: nthWeek, fweek: parsedRange[0].day, lweek: parsedRange[1].day }; }; /** * get date by nthWeeks and week day in range * * @private * @param {number} nthWeek the week * @param {number} day the week day * @param {Array} range [d1, d2] * @return {Object} */ Calendar.prototype._getDateByWeeksAndDay = function (nthWeek, day, range) { var rangeInfo = this._getRangeInfo(range); if (nthWeek > rangeInfo.weeks || nthWeek === 0 && day < rangeInfo.fweek || nthWeek === rangeInfo.weeks && day > rangeInfo.lweek) { return null; } var nthDay = (nthWeek - 1) * 7 - rangeInfo.fweek + day; var date = new Date(rangeInfo.start.time); date.setDate(+rangeInfo.start.d + nthDay); return this.getDateInfo(date); }; Calendar.create = function (ecModel, api) { var calendarList = []; ecModel.eachComponent('calendar', function (calendarModel) { var calendar = new Calendar(calendarModel, ecModel, api); calendarList.push(calendar); calendarModel.coordinateSystem = calendar; }); ecModel.eachSeries(function (calendarSeries) { if (calendarSeries.get('coordinateSystem') === 'calendar') { // Inject coordinate system calendarSeries.coordinateSystem = calendarList[calendarSeries.get('calendarIndex') || 0]; } }); return calendarList; }; Calendar.dimensions = ['time', 'value']; return Calendar; }(); function getCoordSys$4(finder) { var calendarModel = finder.calendarModel; var seriesModel = finder.seriesModel; var coordSys = calendarModel ? calendarModel.coordinateSystem : seriesModel ? seriesModel.coordinateSystem : null; return coordSys; } function install$w(registers) { registers.registerComponentModel(CalendarModel); registers.registerComponentView(CalendarView); registers.registerCoordinateSystem('calendar', Calendar); } var inner$e = makeInner(); var _nonShapeGraphicElements = { // Reserved but not supported in graphic component. path: null, compoundPath: null, // Supported in graphic component. group: Group, image: ZRImage, text: ZRText }; // ------------------------ // Preprocessor // ------------------------ var preprocessor = function (option) { var graphicOption = option.graphic; // Convert // {graphic: [{left: 10, type: 'circle'}, ...]} // or // {graphic: {left: 10, type: 'circle'}} // to // {graphic: [{elements: [{left: 10, type: 'circle'}, ...]}]} if (isArray(graphicOption)) { if (!graphicOption[0] || !graphicOption[0].elements) { option.graphic = [{ elements: graphicOption }]; } else { // Only one graphic instance can be instantiated. (We dont // want that too many views are created in echarts._viewMap) option.graphic = [option.graphic[0]]; } } else if (graphicOption && !graphicOption.elements) { option.graphic = [{ elements: [graphicOption] }]; } }; var GraphicComponentModel = /** @class */ function (_super) { __extends(GraphicComponentModel, _super); function GraphicComponentModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = GraphicComponentModel.type; _this.preventAutoZ = true; return _this; } GraphicComponentModel.prototype.mergeOption = function (option, ecModel) { // Prevent default merge to elements var elements = this.option.elements; this.option.elements = null; _super.prototype.mergeOption.call(this, option, ecModel); this.option.elements = elements; }; GraphicComponentModel.prototype.optionUpdated = function (newOption, isInit) { var thisOption = this.option; var newList = (isInit ? thisOption : newOption).elements; var existList = thisOption.elements = isInit ? [] : thisOption.elements; var flattenedList = []; this._flatten(newList, flattenedList, null); var mappingResult = mappingToExists(existList, flattenedList, 'normalMerge'); // Clear elOptionsToUpdate var elOptionsToUpdate = this._elOptionsToUpdate = []; each(mappingResult, function (resultItem, index) { var newElOption = resultItem.newOption; if ("development" !== 'production') { assert(isObject(newElOption) || resultItem.existing, 'Empty graphic option definition'); } if (!newElOption) { return; } elOptionsToUpdate.push(newElOption); setKeyInfoToNewElOption(resultItem, newElOption); mergeNewElOptionToExist(existList, index, newElOption); setLayoutInfoToExist(existList[index], newElOption); }, this); // Clean for (var i = existList.length - 1; i >= 0; i--) { if (existList[i] == null) { existList.splice(i, 1); } else { // $action should be volatile, otherwise option gotten from // `getOption` will contain unexpected $action. delete existList[i].$action; } } }; /** * Convert * [{ * type: 'group', * id: 'xx', * children: [{type: 'circle'}, {type: 'polygon'}] * }] * to * [ * {type: 'group', id: 'xx'}, * {type: 'circle', parentId: 'xx'}, * {type: 'polygon', parentId: 'xx'} * ] */ GraphicComponentModel.prototype._flatten = function (optionList, result, parentOption) { each(optionList, function (option) { if (!option) { return; } if (parentOption) { option.parentOption = parentOption; } result.push(option); var children = option.children; if (option.type === 'group' && children) { this._flatten(children, result, option); } // Deleting for JSON output, and for not affecting group creation. delete option.children; }, this); }; // FIXME // Pass to view using payload? setOption has a payload? GraphicComponentModel.prototype.useElOptionsToUpdate = function () { var els = this._elOptionsToUpdate; // Clear to avoid render duplicately when zooming. this._elOptionsToUpdate = null; return els; }; GraphicComponentModel.type = 'graphic'; GraphicComponentModel.defaultOption = { elements: [] // parentId: null }; return GraphicComponentModel; }(ComponentModel); // ------------------------ // View // ------------------------ var GraphicComponentView = /** @class */ function (_super) { __extends(GraphicComponentView, _super); function GraphicComponentView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = GraphicComponentView.type; return _this; } GraphicComponentView.prototype.init = function () { this._elMap = createHashMap(); }; GraphicComponentView.prototype.render = function (graphicModel, ecModel, api) { // Having leveraged between use cases and algorithm complexity, a very // simple layout mechanism is used: // The size(width/height) can be determined by itself or its parent (not // implemented yet), but can not by its children. (Top-down travel) // The location(x/y) can be determined by the bounding rect of itself // (can including its descendants or not) and the size of its parent. // (Bottom-up travel) // When `chart.clear()` or `chart.setOption({...}, true)` with the same id, // view will be reused. if (graphicModel !== this._lastGraphicModel) { this._clear(); } this._lastGraphicModel = graphicModel; this._updateElements(graphicModel); this._relocate(graphicModel, api); }; /** * Update graphic elements. */ GraphicComponentView.prototype._updateElements = function (graphicModel) { var elOptionsToUpdate = graphicModel.useElOptionsToUpdate(); if (!elOptionsToUpdate) { return; } var elMap = this._elMap; var rootGroup = this.group; // Top-down tranverse to assign graphic settings to each elements. each(elOptionsToUpdate, function (elOption) { var id = convertOptionIdName(elOption.id, null); var elExisting = id != null ? elMap.get(id) : null; var parentId = convertOptionIdName(elOption.parentId, null); var targetElParent = parentId != null ? elMap.get(parentId) : rootGroup; var elType = elOption.type; var elOptionStyle = elOption.style; if (elType === 'text' && elOptionStyle) { // In top/bottom mode, textVerticalAlign should not be used, which cause // inaccurately locating. if (elOption.hv && elOption.hv[1]) { elOptionStyle.textVerticalAlign = elOptionStyle.textBaseline = elOptionStyle.verticalAlign = elOptionStyle.align = null; } } var textContentOption = elOption.textContent; var textConfig = elOption.textConfig; if (elOptionStyle && isEC4CompatibleStyle(elOptionStyle, elType, !!textConfig, !!textContentOption)) { var convertResult = convertFromEC4CompatibleStyle(elOptionStyle, elType, true); if (!textConfig && convertResult.textConfig) { textConfig = elOption.textConfig = convertResult.textConfig; } if (!textContentOption && convertResult.textContent) { textContentOption = convertResult.textContent; } } // Remove unnecessary props to avoid potential problems. var elOptionCleaned = getCleanedElOption(elOption); // For simple, do not support parent change, otherwise reorder is needed. if ("development" !== 'production') { elExisting && assert(targetElParent === elExisting.parent, 'Changing parent is not supported.'); } var $action = elOption.$action || 'merge'; if ($action === 'merge') { elExisting ? elExisting.attr(elOptionCleaned) : createEl$1(id, targetElParent, elOptionCleaned, elMap); } else if ($action === 'replace') { removeEl(elExisting, elMap); createEl$1(id, targetElParent, elOptionCleaned, elMap); } else if ($action === 'remove') { removeEl(elExisting, elMap); } var el = elMap.get(id); if (el && textContentOption) { if ($action === 'merge') { var textContentExisting = el.getTextContent(); textContentExisting ? textContentExisting.attr(textContentOption) : el.setTextContent(new ZRText(textContentOption)); } else if ($action === 'replace') { el.setTextContent(new ZRText(textContentOption)); } } if (el) { var elInner = inner$e(el); elInner.__ecGraphicWidthOption = elOption.width; elInner.__ecGraphicHeightOption = elOption.height; setEventData(el, graphicModel, elOption); setTooltipConfig({ el: el, componentModel: graphicModel, itemName: el.name, itemTooltipOption: elOption.tooltip }); } }); }; /** * Locate graphic elements. */ GraphicComponentView.prototype._relocate = function (graphicModel, api) { var elOptions = graphicModel.option.elements; var rootGroup = this.group; var elMap = this._elMap; var apiWidth = api.getWidth(); var apiHeight = api.getHeight(); // Top-down to calculate percentage width/height of group for (var i = 0; i < elOptions.length; i++) { var elOption = elOptions[i]; var id = convertOptionIdName(elOption.id, null); var el = id != null ? elMap.get(id) : null; if (!el || !el.isGroup) { continue; } var parentEl = el.parent; var isParentRoot = parentEl === rootGroup; // Like 'position:absolut' in css, default 0. var elInner = inner$e(el); var parentElInner = inner$e(parentEl); elInner.__ecGraphicWidth = parsePercent$1(elInner.__ecGraphicWidthOption, isParentRoot ? apiWidth : parentElInner.__ecGraphicWidth) || 0; elInner.__ecGraphicHeight = parsePercent$1(elInner.__ecGraphicHeightOption, isParentRoot ? apiHeight : parentElInner.__ecGraphicHeight) || 0; } // Bottom-up tranvese all elements (consider ec resize) to locate elements. for (var i = elOptions.length - 1; i >= 0; i--) { var elOption = elOptions[i]; var id = convertOptionIdName(elOption.id, null); var el = id != null ? elMap.get(id) : null; if (!el) { continue; } var parentEl = el.parent; var parentElInner = inner$e(parentEl); var containerInfo = parentEl === rootGroup ? { width: apiWidth, height: apiHeight } : { width: parentElInner.__ecGraphicWidth, height: parentElInner.__ecGraphicHeight }; // PENDING // Currently, when `bounding: 'all'`, the union bounding rect of the group // does not include the rect of [0, 0, group.width, group.height], which // is probably weird for users. Should we make a break change for it? positionElement(el, elOption, containerInfo, null, { hv: elOption.hv, boundingMode: elOption.bounding }); } }; /** * Clear all elements. */ GraphicComponentView.prototype._clear = function () { var elMap = this._elMap; elMap.each(function (el) { removeEl(el, elMap); }); this._elMap = createHashMap(); }; GraphicComponentView.prototype.dispose = function () { this._clear(); }; GraphicComponentView.type = 'graphic'; return GraphicComponentView; }(ComponentView); function createEl$1(id, targetElParent, elOption, elMap) { var graphicType = elOption.type; if ("development" !== 'production') { assert(graphicType, 'graphic type MUST be set'); } var Clz = hasOwn(_nonShapeGraphicElements, graphicType) // Those graphic elements are not shapes. They should not be // overwritten by users, so do them first. ? _nonShapeGraphicElements[graphicType] : getShapeClass(graphicType); if ("development" !== 'production') { assert(Clz, 'graphic type can not be found'); } var el = new Clz(elOption); targetElParent.add(el); elMap.set(id, el); inner$e(el).__ecGraphicId = id; } function removeEl(elExisting, elMap) { var existElParent = elExisting && elExisting.parent; if (existElParent) { elExisting.type === 'group' && elExisting.traverse(function (el) { removeEl(el, elMap); }); elMap.removeKey(inner$e(elExisting).__ecGraphicId); existElParent.remove(elExisting); } } // Remove unnecessary props to avoid potential problems. function getCleanedElOption(elOption) { elOption = extend({}, elOption); each(['id', 'parentId', '$action', 'hv', 'bounding', 'textContent'].concat(LOCATION_PARAMS), function (name) { delete elOption[name]; }); return elOption; } function isSetLoc(obj, props) { var isSet; each(props, function (prop) { obj[prop] != null && obj[prop] !== 'auto' && (isSet = true); }); return isSet; } function setKeyInfoToNewElOption(resultItem, newElOption) { var existElOption = resultItem.existing; // Set id and type after id assigned. newElOption.id = resultItem.keyInfo.id; !newElOption.type && existElOption && (newElOption.type = existElOption.type); // Set parent id if not specified if (newElOption.parentId == null) { var newElParentOption = newElOption.parentOption; if (newElParentOption) { newElOption.parentId = newElParentOption.id; } else if (existElOption) { newElOption.parentId = existElOption.parentId; } } // Clear newElOption.parentOption = null; } function mergeNewElOptionToExist(existList, index, newElOption) { // Update existing options, for `getOption` feature. var newElOptCopy = extend({}, newElOption); var existElOption = existList[index]; var $action = newElOption.$action || 'merge'; if ($action === 'merge') { if (existElOption) { if ("development" !== 'production') { var newType = newElOption.type; assert(!newType || existElOption.type === newType, 'Please set $action: "replace" to change `type`'); } // We can ensure that newElOptCopy and existElOption are not // the same object, so `merge` will not change newElOptCopy. merge(existElOption, newElOptCopy, true); // Rigid body, use ignoreSize. mergeLayoutParam(existElOption, newElOptCopy, { ignoreSize: true }); // Will be used in render. copyLayoutParams(newElOption, existElOption); } else { existList[index] = newElOptCopy; } } else if ($action === 'replace') { existList[index] = newElOptCopy; } else if ($action === 'remove') { // null will be cleaned later. existElOption && (existList[index] = null); } } function setLayoutInfoToExist(existItem, newElOption) { if (!existItem) { return; } existItem.hv = newElOption.hv = [// Rigid body, dont care `width`. isSetLoc(newElOption, ['left', 'right']), // Rigid body, dont care `height`. isSetLoc(newElOption, ['top', 'bottom'])]; // Give default group size. Otherwise layout error may occur. if (existItem.type === 'group') { var existingGroupOpt = existItem; var newGroupOpt = newElOption; existingGroupOpt.width == null && (existingGroupOpt.width = newGroupOpt.width = 0); existingGroupOpt.height == null && (existingGroupOpt.height = newGroupOpt.height = 0); } } function setEventData(el, graphicModel, elOption) { var eventData = getECData(el).eventData; // Simple optimize for large amount of elements that no need event. if (!el.silent && !el.ignore && !eventData) { eventData = getECData(el).eventData = { componentType: 'graphic', componentIndex: graphicModel.componentIndex, name: el.name }; } // `elOption.info` enables user to mount some info on // elements and use them in event handlers. if (eventData) { eventData.info = elOption.info; } } function install$x(registers) { registers.registerComponentModel(GraphicComponentModel); registers.registerComponentView(GraphicComponentView); registers.registerPreprocessor(preprocessor); } var DATA_ZOOM_AXIS_DIMENSIONS = ['x', 'y', 'radius', 'angle', 'single']; // Supported coords. // FIXME: polar has been broken (but rarely used). var SERIES_COORDS = ['cartesian2d', 'polar', 'singleAxis']; function isCoordSupported(seriesModel) { var coordType = seriesModel.get('coordinateSystem'); return indexOf(SERIES_COORDS, coordType) >= 0; } function getAxisMainType(axisDim) { if ("development" !== 'production') { assert(axisDim); } return axisDim + 'Axis'; } /** * If two dataZoomModels has the same axis controlled, we say that they are 'linked'. * This function finds all linked dataZoomModels start from the given payload. */ function findEffectedDataZooms(ecModel, payload) { // Key: `DataZoomAxisDimension` var axisRecords = createHashMap(); var effectedModels = []; // Key: uid of dataZoomModel var effectedModelMap = createHashMap(); // Find the dataZooms specified by payload. ecModel.eachComponent({ mainType: 'dataZoom', query: payload }, function (dataZoomModel) { if (!effectedModelMap.get(dataZoomModel.uid)) { addToEffected(dataZoomModel); } }); // Start from the given dataZoomModels, travel the graph to find // all of the linked dataZoom models. var foundNewLink; do { foundNewLink = false; ecModel.eachComponent('dataZoom', processSingle); } while (foundNewLink); function processSingle(dataZoomModel) { if (!effectedModelMap.get(dataZoomModel.uid) && isLinked(dataZoomModel)) { addToEffected(dataZoomModel); foundNewLink = true; } } function addToEffected(dataZoom) { effectedModelMap.set(dataZoom.uid, true); effectedModels.push(dataZoom); markAxisControlled(dataZoom); } function isLinked(dataZoomModel) { var isLink = false; dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) { var axisIdxArr = axisRecords.get(axisDim); if (axisIdxArr && axisIdxArr[axisIndex]) { isLink = true; } }); return isLink; } function markAxisControlled(dataZoomModel) { dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) { (axisRecords.get(axisDim) || axisRecords.set(axisDim, []))[axisIndex] = true; }); } return effectedModels; } /** * Find the first target coordinate system. * Available after model built. * * @return Like { * grid: [ * {model: coord0, axisModels: [axis1, axis3], coordIndex: 1}, * {model: coord1, axisModels: [axis0, axis2], coordIndex: 0}, * ... * ], // cartesians must not be null/undefined. * polar: [ * {model: coord0, axisModels: [axis4], coordIndex: 0}, * ... * ], // polars must not be null/undefined. * singleAxis: [ * {model: coord0, axisModels: [], coordIndex: 0} * ] * } */ function collectReferCoordSysModelInfo(dataZoomModel) { var ecModel = dataZoomModel.ecModel; var coordSysInfoWrap = { infoList: [], infoMap: createHashMap() }; dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) { var axisModel = ecModel.getComponent(getAxisMainType(axisDim), axisIndex); if (!axisModel) { return; } var coordSysModel = axisModel.getCoordSysModel(); if (!coordSysModel) { return; } var coordSysUid = coordSysModel.uid; var coordSysInfo = coordSysInfoWrap.infoMap.get(coordSysUid); if (!coordSysInfo) { coordSysInfo = { model: coordSysModel, axisModels: [] }; coordSysInfoWrap.infoList.push(coordSysInfo); coordSysInfoWrap.infoMap.set(coordSysUid, coordSysInfo); } coordSysInfo.axisModels.push(axisModel); }); return coordSysInfoWrap; } var DataZoomAxisInfo = /** @class */ function () { function DataZoomAxisInfo() { this.indexList = []; this.indexMap = []; } DataZoomAxisInfo.prototype.add = function (axisCmptIdx) { // Remove duplication. if (!this.indexMap[axisCmptIdx]) { this.indexList.push(axisCmptIdx); this.indexMap[axisCmptIdx] = true; } }; return DataZoomAxisInfo; }(); var DataZoomModel = /** @class */ function (_super) { __extends(DataZoomModel, _super); function DataZoomModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = DataZoomModel.type; _this._autoThrottle = true; _this._noTarget = true; /** * It is `[rangeModeForMin, rangeModeForMax]`. * The optional values for `rangeMode`: * + `'value'` mode: the axis extent will always be determined by * `dataZoom.startValue` and `dataZoom.endValue`, despite * how data like and how `axis.min` and `axis.max` are. * + `'percent'` mode: `100` represents 100% of the `[dMin, dMax]`, * where `dMin` is `axis.min` if `axis.min` specified, otherwise `data.extent[0]`, * and `dMax` is `axis.max` if `axis.max` specified, otherwise `data.extent[1]`. * Axis extent will be determined by the result of the percent of `[dMin, dMax]`. * * For example, when users are using dynamic data (update data periodically via `setOption`), * if in `'value`' mode, the window will be kept in a fixed value range despite how * data are appended, while if in `'percent'` mode, whe window range will be changed alone with * the appended data (suppose `axis.min` and `axis.max` are not specified). */ _this._rangePropMode = ['percent', 'percent']; return _this; } DataZoomModel.prototype.init = function (option, parentModel, ecModel) { var inputRawOption = retrieveRawOption(option); /** * Suppose a "main process" start at the point that model prepared (that is, * model initialized or merged or method called in `action`). * We should keep the `main process` idempotent, that is, given a set of values * on `option`, we get the same result. * * But sometimes, values on `option` will be updated for providing users * a "final calculated value" (`dataZoomProcessor` will do that). Those value * should not be the base/input of the `main process`. * * So in that case we should save and keep the input of the `main process` * separately, called `settledOption`. * * For example, consider the case: * (Step_1) brush zoom the grid by `toolbox.dataZoom`, * where the original input `option.startValue`, `option.endValue` are earsed by * calculated value. * (Step)2) click the legend to hide and show a series, * where the new range is calculated by the earsed `startValue` and `endValue`, * which brings incorrect result. */ this.settledOption = inputRawOption; this.mergeDefaultAndTheme(option, ecModel); this._doInit(inputRawOption); }; DataZoomModel.prototype.mergeOption = function (newOption) { var inputRawOption = retrieveRawOption(newOption); //FIX #2591 merge(this.option, newOption, true); merge(this.settledOption, inputRawOption, true); this._doInit(inputRawOption); }; DataZoomModel.prototype._doInit = function (inputRawOption) { var thisOption = this.option; // if (!env.canvasSupported) { // thisOption.realtime = false; // } this._setDefaultThrottle(inputRawOption); this._updateRangeUse(inputRawOption); var settledOption = this.settledOption; each([['start', 'startValue'], ['end', 'endValue']], function (names, index) { // start/end has higher priority over startValue/endValue if they // both set, but we should make chart.setOption({endValue: 1000}) // effective, rather than chart.setOption({endValue: 1000, end: null}). if (this._rangePropMode[index] === 'value') { thisOption[names[0]] = settledOption[names[0]] = null; } // Otherwise do nothing and use the merge result. }, this); this._resetTarget(); }; DataZoomModel.prototype._resetTarget = function () { var optionOrient = this.get('orient', true); var targetAxisIndexMap = this._targetAxisInfoMap = createHashMap(); var hasAxisSpecified = this._fillSpecifiedTargetAxis(targetAxisIndexMap); if (hasAxisSpecified) { this._orient = optionOrient || this._makeAutoOrientByTargetAxis(); } else { this._orient = optionOrient || 'horizontal'; this._fillAutoTargetAxisByOrient(targetAxisIndexMap, this._orient); } this._noTarget = true; targetAxisIndexMap.each(function (axisInfo) { if (axisInfo.indexList.length) { this._noTarget = false; } }, this); }; DataZoomModel.prototype._fillSpecifiedTargetAxis = function (targetAxisIndexMap) { var hasAxisSpecified = false; each(DATA_ZOOM_AXIS_DIMENSIONS, function (axisDim) { var refering = this.getReferringComponents(getAxisMainType(axisDim), MULTIPLE_REFERRING); // When user set axisIndex as a empty array, we think that user specify axisIndex // but do not want use auto mode. Because empty array may be encountered when // some error occured. if (!refering.specified) { return; } hasAxisSpecified = true; var axisInfo = new DataZoomAxisInfo(); each(refering.models, function (axisModel) { axisInfo.add(axisModel.componentIndex); }); targetAxisIndexMap.set(axisDim, axisInfo); }, this); return hasAxisSpecified; }; DataZoomModel.prototype._fillAutoTargetAxisByOrient = function (targetAxisIndexMap, orient) { var ecModel = this.ecModel; var needAuto = true; // Find axis that parallel to dataZoom as default. if (needAuto) { var axisDim = orient === 'vertical' ? 'y' : 'x'; var axisModels = ecModel.findComponents({ mainType: axisDim + 'Axis' }); setParallelAxis(axisModels, axisDim); } // Find axis that parallel to dataZoom as default. if (needAuto) { var axisModels = ecModel.findComponents({ mainType: 'singleAxis', filter: function (axisModel) { return axisModel.get('orient', true) === orient; } }); setParallelAxis(axisModels, 'single'); } function setParallelAxis(axisModels, axisDim) { // At least use the first parallel axis as the target axis. var axisModel = axisModels[0]; if (!axisModel) { return; } var axisInfo = new DataZoomAxisInfo(); axisInfo.add(axisModel.componentIndex); targetAxisIndexMap.set(axisDim, axisInfo); needAuto = false; // Find parallel axes in the same grid. if (axisDim === 'x' || axisDim === 'y') { var gridModel_1 = axisModel.getReferringComponents('grid', SINGLE_REFERRING).models[0]; gridModel_1 && each(axisModels, function (axModel) { if (axisModel.componentIndex !== axModel.componentIndex && gridModel_1 === axModel.getReferringComponents('grid', SINGLE_REFERRING).models[0]) { axisInfo.add(axModel.componentIndex); } }); } } if (needAuto) { // If no parallel axis, find the first category axis as default. (Also consider polar). each(DATA_ZOOM_AXIS_DIMENSIONS, function (axisDim) { if (!needAuto) { return; } var axisModels = ecModel.findComponents({ mainType: getAxisMainType(axisDim), filter: function (axisModel) { return axisModel.get('type', true) === 'category'; } }); if (axisModels[0]) { var axisInfo = new DataZoomAxisInfo(); axisInfo.add(axisModels[0].componentIndex); targetAxisIndexMap.set(axisDim, axisInfo); needAuto = false; } }, this); } }; DataZoomModel.prototype._makeAutoOrientByTargetAxis = function () { var dim; // Find the first axis this.eachTargetAxis(function (axisDim) { !dim && (dim = axisDim); }, this); return dim === 'y' ? 'vertical' : 'horizontal'; }; DataZoomModel.prototype._setDefaultThrottle = function (inputRawOption) { // When first time user set throttle, auto throttle ends. if (inputRawOption.hasOwnProperty('throttle')) { this._autoThrottle = false; } if (this._autoThrottle) { var globalOption = this.ecModel.option; this.option.throttle = globalOption.animation && globalOption.animationDurationUpdate > 0 ? 100 : 20; } }; DataZoomModel.prototype._updateRangeUse = function (inputRawOption) { var rangePropMode = this._rangePropMode; var rangeModeInOption = this.get('rangeMode'); each([['start', 'startValue'], ['end', 'endValue']], function (names, index) { var percentSpecified = inputRawOption[names[0]] != null; var valueSpecified = inputRawOption[names[1]] != null; if (percentSpecified && !valueSpecified) { rangePropMode[index] = 'percent'; } else if (!percentSpecified && valueSpecified) { rangePropMode[index] = 'value'; } else if (rangeModeInOption) { rangePropMode[index] = rangeModeInOption[index]; } else if (percentSpecified) { // percentSpecified && valueSpecified rangePropMode[index] = 'percent'; } // else remain its original setting. }); }; DataZoomModel.prototype.noTarget = function () { return this._noTarget; }; DataZoomModel.prototype.getFirstTargetAxisModel = function () { var firstAxisModel; this.eachTargetAxis(function (axisDim, axisIndex) { if (firstAxisModel == null) { firstAxisModel = this.ecModel.getComponent(getAxisMainType(axisDim), axisIndex); } }, this); return firstAxisModel; }; /** * @param {Function} callback param: axisModel, dimNames, axisIndex, dataZoomModel, ecModel */ DataZoomModel.prototype.eachTargetAxis = function (callback, context) { this._targetAxisInfoMap.each(function (axisInfo, axisDim) { each(axisInfo.indexList, function (axisIndex) { callback.call(context, axisDim, axisIndex); }); }); }; /** * @return If not found, return null/undefined. */ DataZoomModel.prototype.getAxisProxy = function (axisDim, axisIndex) { var axisModel = this.getAxisModel(axisDim, axisIndex); if (axisModel) { return axisModel.__dzAxisProxy; } }; /** * @return If not found, return null/undefined. */ DataZoomModel.prototype.getAxisModel = function (axisDim, axisIndex) { if ("development" !== 'production') { assert(axisDim && axisIndex != null); } var axisInfo = this._targetAxisInfoMap.get(axisDim); if (axisInfo && axisInfo.indexMap[axisIndex]) { return this.ecModel.getComponent(getAxisMainType(axisDim), axisIndex); } }; /** * If not specified, set to undefined. */ DataZoomModel.prototype.setRawRange = function (opt) { var thisOption = this.option; var settledOption = this.settledOption; each([['start', 'startValue'], ['end', 'endValue']], function (names) { // Consider the pair : // If one has value and the other one is `null/undefined`, we both set them // to `settledOption`. This strategy enables the feature to clear the original // value in `settledOption` to `null/undefined`. // But if both of them are `null/undefined`, we do not set them to `settledOption` // and keep `settledOption` with the original value. This strategy enables users to // only set but not set when calling // `dispatchAction`. // The pair is treated in the same way. if (opt[names[0]] != null || opt[names[1]] != null) { thisOption[names[0]] = settledOption[names[0]] = opt[names[0]]; thisOption[names[1]] = settledOption[names[1]] = opt[names[1]]; } }, this); this._updateRangeUse(opt); }; DataZoomModel.prototype.setCalculatedRange = function (opt) { var option = this.option; each(['start', 'startValue', 'end', 'endValue'], function (name) { option[name] = opt[name]; }); }; DataZoomModel.prototype.getPercentRange = function () { var axisProxy = this.findRepresentativeAxisProxy(); if (axisProxy) { return axisProxy.getDataPercentWindow(); } }; /** * For example, chart.getModel().getComponent('dataZoom').getValueRange('y', 0); * * @return [startValue, endValue] value can only be '-' or finite number. */ DataZoomModel.prototype.getValueRange = function (axisDim, axisIndex) { if (axisDim == null && axisIndex == null) { var axisProxy = this.findRepresentativeAxisProxy(); if (axisProxy) { return axisProxy.getDataValueWindow(); } } else { return this.getAxisProxy(axisDim, axisIndex).getDataValueWindow(); } }; /** * @param axisModel If axisModel given, find axisProxy * corresponding to the axisModel */ DataZoomModel.prototype.findRepresentativeAxisProxy = function (axisModel) { if (axisModel) { return axisModel.__dzAxisProxy; } // Find the first hosted axisProxy var firstProxy; var axisDimList = this._targetAxisInfoMap.keys(); for (var i = 0; i < axisDimList.length; i++) { var axisDim = axisDimList[i]; var axisInfo = this._targetAxisInfoMap.get(axisDim); for (var j = 0; j < axisInfo.indexList.length; j++) { var proxy = this.getAxisProxy(axisDim, axisInfo.indexList[j]); if (proxy.hostedBy(this)) { return proxy; } if (!firstProxy) { firstProxy = proxy; } } } // If no hosted proxy found, still need to return a proxy. // This case always happens in toolbox dataZoom, where axes are all hosted by // other dataZooms. return firstProxy; }; DataZoomModel.prototype.getRangePropMode = function () { return this._rangePropMode.slice(); }; DataZoomModel.prototype.getOrient = function () { if ("development" !== 'production') { // Should not be called before initialized. assert(this._orient); } return this._orient; }; DataZoomModel.type = 'dataZoom'; DataZoomModel.dependencies = ['xAxis', 'yAxis', 'radiusAxis', 'angleAxis', 'singleAxis', 'series', 'toolbox']; DataZoomModel.defaultOption = { zlevel: 0, z: 4, filterMode: 'filter', start: 0, end: 100 }; return DataZoomModel; }(ComponentModel); /** * Retrieve the those raw params from option, which will be cached separately. * becasue they will be overwritten by normalized/calculated values in the main * process. */ function retrieveRawOption(option) { var ret = {}; each(['start', 'end', 'startValue', 'endValue', 'throttle'], function (name) { option.hasOwnProperty(name) && (ret[name] = option[name]); }); return ret; } var SelectDataZoomModel = /** @class */ function (_super) { __extends(SelectDataZoomModel, _super); function SelectDataZoomModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SelectDataZoomModel.type; return _this; } SelectDataZoomModel.type = 'dataZoom.select'; return SelectDataZoomModel; }(DataZoomModel); var DataZoomView = /** @class */ function (_super) { __extends(DataZoomView, _super); function DataZoomView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = DataZoomView.type; return _this; } DataZoomView.prototype.render = function (dataZoomModel, ecModel, api, payload) { this.dataZoomModel = dataZoomModel; this.ecModel = ecModel; this.api = api; }; DataZoomView.type = 'dataZoom'; return DataZoomView; }(ComponentView); var SelectDataZoomView = /** @class */ function (_super) { __extends(SelectDataZoomView, _super); function SelectDataZoomView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SelectDataZoomView.type; return _this; } SelectDataZoomView.type = 'dataZoom.select'; return SelectDataZoomView; }(DataZoomView); var each$9 = each; var asc$1 = asc; /** * Operate single axis. * One axis can only operated by one axis operator. * Different dataZoomModels may be defined to operate the same axis. * (i.e. 'inside' data zoom and 'slider' data zoom components) * So dataZoomModels share one axisProxy in that case. */ var AxisProxy = /** @class */ function () { function AxisProxy(dimName, axisIndex, dataZoomModel, ecModel) { this._dimName = dimName; this._axisIndex = axisIndex; this.ecModel = ecModel; this._dataZoomModel = dataZoomModel; // /** // * @readOnly // * @private // */ // this.hasSeriesStacked; } /** * Whether the axisProxy is hosted by dataZoomModel. */ AxisProxy.prototype.hostedBy = function (dataZoomModel) { return this._dataZoomModel === dataZoomModel; }; /** * @return Value can only be NaN or finite value. */ AxisProxy.prototype.getDataValueWindow = function () { return this._valueWindow.slice(); }; /** * @return {Array.} */ AxisProxy.prototype.getDataPercentWindow = function () { return this._percentWindow.slice(); }; AxisProxy.prototype.getTargetSeriesModels = function () { var seriesModels = []; this.ecModel.eachSeries(function (seriesModel) { if (isCoordSupported(seriesModel)) { var axisMainType = getAxisMainType(this._dimName); var axisModel = seriesModel.getReferringComponents(axisMainType, SINGLE_REFERRING).models[0]; if (axisModel && this._axisIndex === axisModel.componentIndex) { seriesModels.push(seriesModel); } } }, this); return seriesModels; }; AxisProxy.prototype.getAxisModel = function () { return this.ecModel.getComponent(this._dimName + 'Axis', this._axisIndex); }; AxisProxy.prototype.getMinMaxSpan = function () { return clone(this._minMaxSpan); }; /** * Only calculate by given range and this._dataExtent, do not change anything. */ AxisProxy.prototype.calculateDataWindow = function (opt) { var dataExtent = this._dataExtent; var axisModel = this.getAxisModel(); var scale = axisModel.axis.scale; var rangePropMode = this._dataZoomModel.getRangePropMode(); var percentExtent = [0, 100]; var percentWindow = []; var valueWindow = []; var hasPropModeValue; each$9(['start', 'end'], function (prop, idx) { var boundPercent = opt[prop]; var boundValue = opt[prop + 'Value']; // Notice: dataZoom is based either on `percentProp` ('start', 'end') or // on `valueProp` ('startValue', 'endValue'). (They are based on the data extent // but not min/max of axis, which will be calculated by data window then). // The former one is suitable for cases that a dataZoom component controls multiple // axes with different unit or extent, and the latter one is suitable for accurate // zoom by pixel (e.g., in dataZoomSelect). // we use `getRangePropMode()` to mark which prop is used. `rangePropMode` is updated // only when setOption or dispatchAction, otherwise it remains its original value. // (Why not only record `percentProp` and always map to `valueProp`? Because // the map `valueProp` -> `percentProp` -> `valueProp` probably not the original // `valueProp`. consider two axes constrolled by one dataZoom. They have different // data extent. All of values that are overflow the `dataExtent` will be calculated // to percent '100%'). if (rangePropMode[idx] === 'percent') { boundPercent == null && (boundPercent = percentExtent[idx]); // Use scale.parse to math round for category or time axis. boundValue = scale.parse(linearMap(boundPercent, percentExtent, dataExtent)); } else { hasPropModeValue = true; boundValue = boundValue == null ? dataExtent[idx] : scale.parse(boundValue); // Calculating `percent` from `value` may be not accurate, because // This calculation can not be inversed, because all of values that // are overflow the `dataExtent` will be calculated to percent '100%' boundPercent = linearMap(boundValue, dataExtent, percentExtent); } // valueWindow[idx] = round(boundValue); // percentWindow[idx] = round(boundPercent); valueWindow[idx] = boundValue; percentWindow[idx] = boundPercent; }); asc$1(valueWindow); asc$1(percentWindow); // The windows from user calling of `dispatchAction` might be out of the extent, // or do not obey the `min/maxSpan`, `min/maxValueSpan`. But we dont restrict window // by `zoomLock` here, because we see `zoomLock` just as a interaction constraint, // where API is able to initialize/modify the window size even though `zoomLock` // specified. var spans = this._minMaxSpan; hasPropModeValue ? restrictSet(valueWindow, percentWindow, dataExtent, percentExtent, false) : restrictSet(percentWindow, valueWindow, percentExtent, dataExtent, true); function restrictSet(fromWindow, toWindow, fromExtent, toExtent, toValue) { var suffix = toValue ? 'Span' : 'ValueSpan'; sliderMove(0, fromWindow, fromExtent, 'all', spans['min' + suffix], spans['max' + suffix]); for (var i = 0; i < 2; i++) { toWindow[i] = linearMap(fromWindow[i], fromExtent, toExtent, true); toValue && (toWindow[i] = scale.parse(toWindow[i])); } } return { valueWindow: valueWindow, percentWindow: percentWindow }; }; /** * Notice: reset should not be called before series.restoreData() called, * so it is recommanded to be called in "process stage" but not "model init * stage". */ AxisProxy.prototype.reset = function (dataZoomModel) { if (dataZoomModel !== this._dataZoomModel) { return; } var targetSeries = this.getTargetSeriesModels(); // Culculate data window and data extent, and record them. this._dataExtent = calculateDataExtent(this, this._dimName, targetSeries); // this.hasSeriesStacked = false; // each(targetSeries, function (series) { // let data = series.getData(); // let dataDim = data.mapDimension(this._dimName); // let stackedDimension = data.getCalculationInfo('stackedDimension'); // if (stackedDimension && stackedDimension === dataDim) { // this.hasSeriesStacked = true; // } // }, this); // `calculateDataWindow` uses min/maxSpan. this._updateMinMaxSpan(); var dataWindow = this.calculateDataWindow(dataZoomModel.settledOption); this._valueWindow = dataWindow.valueWindow; this._percentWindow = dataWindow.percentWindow; // Update axis setting then. this._setAxisModel(); }; AxisProxy.prototype.filterData = function (dataZoomModel, api) { if (dataZoomModel !== this._dataZoomModel) { return; } var axisDim = this._dimName; var seriesModels = this.getTargetSeriesModels(); var filterMode = dataZoomModel.get('filterMode'); var valueWindow = this._valueWindow; if (filterMode === 'none') { return; } // FIXME // Toolbox may has dataZoom injected. And if there are stacked bar chart // with NaN data, NaN will be filtered and stack will be wrong. // So we need to force the mode to be set empty. // In fect, it is not a big deal that do not support filterMode-'filter' // when using toolbox#dataZoom, utill tooltip#dataZoom support "single axis // selection" some day, which might need "adapt to data extent on the // otherAxis", which is disabled by filterMode-'empty'. // But currently, stack has been fixed to based on value but not index, // so this is not an issue any more. // let otherAxisModel = this.getOtherAxisModel(); // if (dataZoomModel.get('$fromToolbox') // && otherAxisModel // && otherAxisModel.hasSeriesStacked // ) { // filterMode = 'empty'; // } // TODO // filterMode 'weakFilter' and 'empty' is not optimized for huge data yet. each$9(seriesModels, function (seriesModel) { var seriesData = seriesModel.getData(); var dataDims = seriesData.mapDimensionsAll(axisDim); if (!dataDims.length) { return; } if (filterMode === 'weakFilter') { seriesData.filterSelf(function (dataIndex) { var leftOut; var rightOut; var hasValue; for (var i = 0; i < dataDims.length; i++) { var value = seriesData.get(dataDims[i], dataIndex); var thisHasValue = !isNaN(value); var thisLeftOut = value < valueWindow[0]; var thisRightOut = value > valueWindow[1]; if (thisHasValue && !thisLeftOut && !thisRightOut) { return true; } thisHasValue && (hasValue = true); thisLeftOut && (leftOut = true); thisRightOut && (rightOut = true); } // If both left out and right out, do not filter. return hasValue && leftOut && rightOut; }); } else { each$9(dataDims, function (dim) { if (filterMode === 'empty') { seriesModel.setData(seriesData = seriesData.map(dim, function (value) { return !isInWindow(value) ? NaN : value; })); } else { var range = {}; range[dim] = valueWindow; // console.time('select'); seriesData.selectRange(range); // console.timeEnd('select'); } }); } each$9(dataDims, function (dim) { seriesData.setApproximateExtent(valueWindow, dim); }); }); function isInWindow(value) { return value >= valueWindow[0] && value <= valueWindow[1]; } }; AxisProxy.prototype._updateMinMaxSpan = function () { var minMaxSpan = this._minMaxSpan = {}; var dataZoomModel = this._dataZoomModel; var dataExtent = this._dataExtent; each$9(['min', 'max'], function (minMax) { var percentSpan = dataZoomModel.get(minMax + 'Span'); var valueSpan = dataZoomModel.get(minMax + 'ValueSpan'); valueSpan != null && (valueSpan = this.getAxisModel().axis.scale.parse(valueSpan)); // minValueSpan and maxValueSpan has higher priority than minSpan and maxSpan if (valueSpan != null) { percentSpan = linearMap(dataExtent[0] + valueSpan, dataExtent, [0, 100], true); } else if (percentSpan != null) { valueSpan = linearMap(percentSpan, [0, 100], dataExtent, true) - dataExtent[0]; } minMaxSpan[minMax + 'Span'] = percentSpan; minMaxSpan[minMax + 'ValueSpan'] = valueSpan; }, this); }; AxisProxy.prototype._setAxisModel = function () { var axisModel = this.getAxisModel(); var percentWindow = this._percentWindow; var valueWindow = this._valueWindow; if (!percentWindow) { return; } // [0, 500]: arbitrary value, guess axis extent. var precision = getPixelPrecision(valueWindow, [0, 500]); precision = Math.min(precision, 20); // For value axis, if min/max/scale are not set, we just use the extent obtained // by series data, which may be a little different from the extent calculated by // `axisHelper.getScaleExtent`. But the different just affects the experience a // little when zooming. So it will not be fixed until some users require it strongly. var rawExtentInfo = axisModel.axis.scale.rawExtentInfo; if (percentWindow[0] !== 0) { rawExtentInfo.setDeterminedMinMax('min', +valueWindow[0].toFixed(precision)); } if (percentWindow[1] !== 100) { rawExtentInfo.setDeterminedMinMax('max', +valueWindow[1].toFixed(precision)); } rawExtentInfo.freeze(); }; return AxisProxy; }(); function calculateDataExtent(axisProxy, axisDim, seriesModels) { var dataExtent = [Infinity, -Infinity]; each$9(seriesModels, function (seriesModel) { unionAxisExtentFromData(dataExtent, seriesModel.getData(), axisDim); }); // It is important to get "consistent" extent when more then one axes is // controlled by a `dataZoom`, otherwise those axes will not be synchronized // when zooming. But it is difficult to know what is "consistent", considering // axes have different type or even different meanings (For example, two // time axes are used to compare data of the same date in different years). // So basically dataZoom just obtains extent by series.data (in category axis // extent can be obtained from axis.data). // Nevertheless, user can set min/max/scale on axes to make extent of axes // consistent. var axisModel = axisProxy.getAxisModel(); var rawExtentResult = ensureScaleRawExtentInfo(axisModel.axis.scale, axisModel, dataExtent).calculate(); return [rawExtentResult.min, rawExtentResult.max]; } var dataZoomProcessor = { // `dataZoomProcessor` will only be performed in needed series. Consider if // there is a line series and a pie series, it is better not to update the // line series if only pie series is needed to be updated. getTargetSeries: function (ecModel) { function eachAxisModel(cb) { ecModel.eachComponent('dataZoom', function (dataZoomModel) { dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) { var axisModel = ecModel.getComponent(getAxisMainType(axisDim), axisIndex); cb(axisDim, axisIndex, axisModel, dataZoomModel); }); }); } // FIXME: it brings side-effect to `getTargetSeries`. // Prepare axis proxies. eachAxisModel(function (axisDim, axisIndex, axisModel, dataZoomModel) { // dispose all last axis proxy, in case that some axis are deleted. axisModel.__dzAxisProxy = null; }); var proxyList = []; eachAxisModel(function (axisDim, axisIndex, axisModel, dataZoomModel) { // Different dataZooms may constrol the same axis. In that case, // an axisProxy serves both of them. if (!axisModel.__dzAxisProxy) { // Use the first dataZoomModel as the main model of axisProxy. axisModel.__dzAxisProxy = new AxisProxy(axisDim, axisIndex, dataZoomModel, ecModel); proxyList.push(axisModel.__dzAxisProxy); } }); var seriesModelMap = createHashMap(); each(proxyList, function (axisProxy) { each(axisProxy.getTargetSeriesModels(), function (seriesModel) { seriesModelMap.set(seriesModel.uid, seriesModel); }); }); return seriesModelMap; }, // Consider appendData, where filter should be performed. Because data process is // in block mode currently, it is not need to worry about that the overallProgress // execute every frame. overallReset: function (ecModel, api) { ecModel.eachComponent('dataZoom', function (dataZoomModel) { // We calculate window and reset axis here but not in model // init stage and not after action dispatch handler, because // reset should be called after seriesData.restoreData. dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) { dataZoomModel.getAxisProxy(axisDim, axisIndex).reset(dataZoomModel); }); // Caution: data zoom filtering is order sensitive when using // percent range and no min/max/scale set on axis. // For example, we have dataZoom definition: // [ // {xAxisIndex: 0, start: 30, end: 70}, // {yAxisIndex: 0, start: 20, end: 80} // ] // In this case, [20, 80] of y-dataZoom should be based on data // that have filtered by x-dataZoom using range of [30, 70], // but should not be based on full raw data. Thus sliding // x-dataZoom will change both ranges of xAxis and yAxis, // while sliding y-dataZoom will only change the range of yAxis. // So we should filter x-axis after reset x-axis immediately, // and then reset y-axis and filter y-axis. dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) { dataZoomModel.getAxisProxy(axisDim, axisIndex).filterData(dataZoomModel, api); }); }); ecModel.eachComponent('dataZoom', function (dataZoomModel) { // Fullfill all of the range props so that user // is able to get them from chart.getOption(). var axisProxy = dataZoomModel.findRepresentativeAxisProxy(); if (axisProxy) { var percentRange = axisProxy.getDataPercentWindow(); var valueRange = axisProxy.getDataValueWindow(); dataZoomModel.setCalculatedRange({ start: percentRange[0], end: percentRange[1], startValue: valueRange[0], endValue: valueRange[1] }); } }); } }; function installDataZoomAction(registers) { registers.registerAction('dataZoom', function (payload, ecModel) { var effectedModels = findEffectedDataZooms(ecModel, payload); each(effectedModels, function (dataZoomModel) { dataZoomModel.setRawRange({ start: payload.start, end: payload.end, startValue: payload.startValue, endValue: payload.endValue }); }); }); } var installed = false; function installCommon(registers) { if (installed) { return; } installed = true; registers.registerProcessor(registers.PRIORITY.PROCESSOR.FILTER, dataZoomProcessor); installDataZoomAction(registers); registers.registerSubTypeDefaulter('dataZoom', function () { // Default 'slider' when no type specified. return 'slider'; }); } function install$y(registers) { registers.registerComponentModel(SelectDataZoomModel); registers.registerComponentView(SelectDataZoomView); installCommon(registers); } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ var ToolboxFeature = /** @class */ function () { function ToolboxFeature() {} return ToolboxFeature; }(); var features = {}; function registerFeature(name, ctor) { features[name] = ctor; } function getFeature(name) { return features[name]; } var ToolboxModel = /** @class */ function (_super) { __extends(ToolboxModel, _super); function ToolboxModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ToolboxModel.type; return _this; } ToolboxModel.prototype.optionUpdated = function () { _super.prototype.optionUpdated.apply(this, arguments); var ecModel = this.ecModel; each(this.option.feature, function (featureOpt, featureName) { var Feature = getFeature(featureName); if (Feature) { if (Feature.getDefaultOption) { Feature.defaultOption = Feature.getDefaultOption(ecModel); } merge(featureOpt, Feature.defaultOption); } }); }; ToolboxModel.type = 'toolbox'; ToolboxModel.layoutMode = { type: 'box', ignoreSize: true }; ToolboxModel.defaultOption = { show: true, z: 6, zlevel: 0, orient: 'horizontal', left: 'right', top: 'top', // right // bottom backgroundColor: 'transparent', borderColor: '#ccc', borderRadius: 0, borderWidth: 0, padding: 5, itemSize: 15, itemGap: 8, showTitle: true, iconStyle: { borderColor: '#666', color: 'none' }, emphasis: { iconStyle: { borderColor: '#3E98C5' } }, // textStyle: {}, // feature tooltip: { show: false, position: 'bottom' } }; return ToolboxModel; }(ComponentModel); /** * Layout list like component. * It will box layout each items in group of component and then position the whole group in the viewport * @param {module:zrender/group/Group} group * @param {module:echarts/model/Component} componentModel * @param {module:echarts/ExtensionAPI} */ function layout$3(group, componentModel, api) { var boxLayoutParams = componentModel.getBoxLayoutParams(); var padding = componentModel.get('padding'); var viewportSize = { width: api.getWidth(), height: api.getHeight() }; var rect = getLayoutRect(boxLayoutParams, viewportSize, padding); box(componentModel.get('orient'), group, componentModel.get('itemGap'), rect.width, rect.height); positionElement(group, boxLayoutParams, viewportSize, padding); } function makeBackground(rect, componentModel) { var padding = normalizeCssArray$1(componentModel.get('padding')); var style = componentModel.getItemStyle(['color', 'opacity']); style.fill = componentModel.get('backgroundColor'); rect = new Rect({ shape: { x: rect.x - padding[3], y: rect.y - padding[0], width: rect.width + padding[1] + padding[3], height: rect.height + padding[0] + padding[2], r: componentModel.get('borderRadius') }, style: style, silent: true, z2: -1 }); // FIXME // `subPixelOptimizeRect` may bring some gap between edge of viewpart // and background rect when setting like `left: 0`, `top: 0`. // graphic.subPixelOptimizeRect(rect); return rect; } var ToolboxView = /** @class */ function (_super) { __extends(ToolboxView, _super); function ToolboxView() { return _super !== null && _super.apply(this, arguments) || this; } ToolboxView.prototype.render = function (toolboxModel, ecModel, api, payload) { var group = this.group; group.removeAll(); if (!toolboxModel.get('show')) { return; } var itemSize = +toolboxModel.get('itemSize'); var featureOpts = toolboxModel.get('feature') || {}; var features = this._features || (this._features = {}); var featureNames = []; each(featureOpts, function (opt, name) { featureNames.push(name); }); new DataDiffer(this._featureNames || [], featureNames).add(processFeature).update(processFeature).remove(curry(processFeature, null)).execute(); // Keep for diff. this._featureNames = featureNames; function processFeature(newIndex, oldIndex) { var featureName = featureNames[newIndex]; var oldName = featureNames[oldIndex]; var featureOpt = featureOpts[featureName]; var featureModel = new Model(featureOpt, toolboxModel, toolboxModel.ecModel); var feature; // FIX#11236, merge feature title from MagicType newOption. TODO: consider seriesIndex ? if (payload && payload.newTitle != null && payload.featureName === featureName) { featureOpt.title = payload.newTitle; } if (featureName && !oldName) { // Create if (isUserFeatureName(featureName)) { feature = { onclick: featureModel.option.onclick, featureName: featureName }; } else { var Feature = getFeature(featureName); if (!Feature) { return; } feature = new Feature(); } features[featureName] = feature; } else { feature = features[oldName]; // If feature does not exsit. if (!feature) { return; } } feature.uid = getUID('toolbox-feature'); feature.model = featureModel; feature.ecModel = ecModel; feature.api = api; if (feature instanceof ToolboxFeature) { if (!featureName && oldName) { feature.dispose && feature.dispose(ecModel, api); return; } if (!featureModel.get('show') || feature.unusable) { feature.remove && feature.remove(ecModel, api); return; } } createIconPaths(featureModel, feature, featureName); featureModel.setIconStatus = function (iconName, status) { var option = this.option; var iconPaths = this.iconPaths; option.iconStatus = option.iconStatus || {}; option.iconStatus[iconName] = status; if (iconPaths[iconName]) { (status === 'emphasis' ? enterEmphasis : leaveEmphasis)(iconPaths[iconName]); } }; if (feature instanceof ToolboxFeature) { if (feature.render) { feature.render(featureModel, ecModel, api, payload); } } } function createIconPaths(featureModel, feature, featureName) { var iconStyleModel = featureModel.getModel('iconStyle'); var iconStyleEmphasisModel = featureModel.getModel(['emphasis', 'iconStyle']); // If one feature has mutiple icon. they are orginaized as // { // icon: { // foo: '', // bar: '' // }, // title: { // foo: '', // bar: '' // } // } var icons = feature instanceof ToolboxFeature && feature.getIcons ? feature.getIcons() : featureModel.get('icon'); var titles = featureModel.get('title') || {}; var iconsMap; var titlesMap; if (typeof icons === 'string') { iconsMap = {}; iconsMap[featureName] = icons; } else { iconsMap = icons; } if (typeof titles === 'string') { titlesMap = {}; titlesMap[featureName] = titles; } else { titlesMap = titles; } var iconPaths = featureModel.iconPaths = {}; each(iconsMap, function (iconStr, iconName) { var path = createIcon(iconStr, {}, { x: -itemSize / 2, y: -itemSize / 2, width: itemSize, height: itemSize }); // TODO handling image path.setStyle(iconStyleModel.getItemStyle()); var pathEmphasisState = path.ensureState('emphasis'); pathEmphasisState.style = iconStyleEmphasisModel.getItemStyle(); // Text position calculation var textContent = new ZRText({ style: { text: titlesMap[iconName], align: iconStyleEmphasisModel.get('textAlign'), borderRadius: iconStyleEmphasisModel.get('textBorderRadius'), padding: iconStyleEmphasisModel.get('textPadding'), fill: null }, ignore: true }); path.setTextContent(textContent); setTooltipConfig({ el: path, componentModel: toolboxModel, itemName: iconName, formatterParamsExtra: { title: titlesMap[iconName] } }); // graphic.enableHoverEmphasis(path); path.__title = titlesMap[iconName]; path.on('mouseover', function () { // Should not reuse above hoverStyle, which might be modified. var hoverStyle = iconStyleEmphasisModel.getItemStyle(); var defaultTextPosition = toolboxModel.get('orient') === 'vertical' ? toolboxModel.get('right') == null ? 'right' : 'left' : toolboxModel.get('bottom') == null ? 'bottom' : 'top'; textContent.setStyle({ fill: iconStyleEmphasisModel.get('textFill') || hoverStyle.fill || hoverStyle.stroke || '#000', backgroundColor: iconStyleEmphasisModel.get('textBackgroundColor') }); path.setTextConfig({ position: iconStyleEmphasisModel.get('textPosition') || defaultTextPosition }); textContent.ignore = !toolboxModel.get('showTitle'); // Use enterEmphasis and leaveEmphasis provide by ec. // There are flags managed by the echarts. enterEmphasis(this); }).on('mouseout', function () { if (featureModel.get(['iconStatus', iconName]) !== 'emphasis') { leaveEmphasis(this); } textContent.hide(); }); (featureModel.get(['iconStatus', iconName]) === 'emphasis' ? enterEmphasis : leaveEmphasis)(path); group.add(path); path.on('click', bind(feature.onclick, feature, ecModel, api, iconName)); iconPaths[iconName] = path; }); } layout$3(group, toolboxModel, api); // Render background after group is layout // FIXME group.add(makeBackground(group.getBoundingRect(), toolboxModel)); // Adjust icon title positions to avoid them out of screen group.eachChild(function (icon) { var titleText = icon.__title; // const hoverStyle = icon.hoverStyle; // TODO simplify code? var emphasisState = icon.ensureState('emphasis'); var emphasisTextConfig = emphasisState.textConfig || (emphasisState.textConfig = {}); var textContent = icon.getTextContent(); var emphasisTextState = textContent && textContent.states.emphasis; // May be background element if (emphasisTextState && !isFunction(emphasisTextState) && titleText) { var emphasisTextStyle = emphasisTextState.style || (emphasisTextState.style = {}); var rect = getBoundingRect(titleText, ZRText.makeFont(emphasisTextStyle)); var offsetX = icon.x + group.x; var offsetY = icon.y + group.y + itemSize; var needPutOnTop = false; if (offsetY + rect.height > api.getHeight()) { emphasisTextConfig.position = 'top'; needPutOnTop = true; } var topOffset = needPutOnTop ? -5 - rect.height : itemSize + 8; if (offsetX + rect.width / 2 > api.getWidth()) { emphasisTextConfig.position = ['100%', topOffset]; emphasisTextStyle.align = 'right'; } else if (offsetX - rect.width / 2 < 0) { emphasisTextConfig.position = [0, topOffset]; emphasisTextStyle.align = 'left'; } } }); }; ToolboxView.prototype.updateView = function (toolboxModel, ecModel, api, payload) { each(this._features, function (feature) { feature instanceof ToolboxFeature && feature.updateView && feature.updateView(feature.model, ecModel, api, payload); }); }; // updateLayout(toolboxModel, ecModel, api, payload) { // zrUtil.each(this._features, function (feature) { // feature.updateLayout && feature.updateLayout(feature.model, ecModel, api, payload); // }); // }, ToolboxView.prototype.remove = function (ecModel, api) { each(this._features, function (feature) { feature instanceof ToolboxFeature && feature.remove && feature.remove(ecModel, api); }); this.group.removeAll(); }; ToolboxView.prototype.dispose = function (ecModel, api) { each(this._features, function (feature) { feature instanceof ToolboxFeature && feature.dispose && feature.dispose(ecModel, api); }); }; ToolboxView.type = 'toolbox'; return ToolboxView; }(ComponentView); function isUserFeatureName(featureName) { return featureName.indexOf('my') === 0; } var SaveAsImage = /** @class */ function (_super) { __extends(SaveAsImage, _super); function SaveAsImage() { return _super !== null && _super.apply(this, arguments) || this; } SaveAsImage.prototype.onclick = function (ecModel, api) { var model = this.model; var title = model.get('name') || ecModel.get('title.0.text') || 'echarts'; var isSvg = api.getZr().painter.getType() === 'svg'; var type = isSvg ? 'svg' : model.get('type', true) || 'png'; var url = api.getConnectedDataURL({ type: type, backgroundColor: model.get('backgroundColor', true) || ecModel.get('backgroundColor') || '#fff', connectedBackgroundColor: model.get('connectedBackgroundColor'), excludeComponents: model.get('excludeComponents'), pixelRatio: model.get('pixelRatio') }); // Chrome, Firefox, New Edge if (typeof MouseEvent === 'function' && (env.browser.newEdge || !env.browser.ie && !env.browser.edge)) { var $a = document.createElement('a'); $a.download = title + '.' + type; $a.target = '_blank'; $a.href = url; var evt = new MouseEvent('click', { // some micro front-end framework, window maybe is a Proxy view: document.defaultView, bubbles: true, cancelable: false }); $a.dispatchEvent(evt); } // IE or old Edge else { if (window.navigator.msSaveOrOpenBlob || isSvg) { var parts = url.split(','); // data:[][;charset=][;base64], var base64Encoded = parts[0].indexOf('base64') > -1; var bstr = isSvg // should decode the svg data uri first ? decodeURIComponent(parts[1]) : parts[1]; // only `atob` when the data uri is encoded with base64 // otherwise, like `svg` data uri exported by zrender, // there will be an error, for it's not encoded with base64. // (just a url-encoded string through `encodeURIComponent`) base64Encoded && (bstr = atob(bstr)); var filename = title + '.' + type; if (window.navigator.msSaveOrOpenBlob) { var n = bstr.length; var u8arr = new Uint8Array(n); while (n--) { u8arr[n] = bstr.charCodeAt(n); } var blob = new Blob([u8arr]); window.navigator.msSaveOrOpenBlob(blob, filename); } else { var frame = document.createElement('iframe'); document.body.appendChild(frame); var cw = frame.contentWindow; var doc = cw.document; doc.open('image/svg+xml', 'replace'); doc.write(bstr); doc.close(); cw.focus(); doc.execCommand('SaveAs', true, filename); document.body.removeChild(frame); } } else { var lang = model.get('lang'); var html = '' + '' + '' + ''; var tab = window.open(); tab.document.write(html); tab.document.title = title; } } }; SaveAsImage.getDefaultOption = function (ecModel) { var defaultOption = { show: true, icon: 'M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0', title: ecModel.getLocale(['toolbox', 'saveAsImage', 'title']), type: 'png', // Default use option.backgroundColor // backgroundColor: '#fff', connectedBackgroundColor: '#fff', name: '', excludeComponents: ['toolbox'], // use current pixel ratio of device by default // pixelRatio: 1, lang: ecModel.getLocale(['toolbox', 'saveAsImage', 'lang']) }; return defaultOption; }; return SaveAsImage; }(ToolboxFeature); SaveAsImage.prototype.unusable = !env.canvasSupported; var INNER_STACK_KEYWORD = '__ec_magicType_stack__'; var radioTypes = [['line', 'bar'], ['stack']]; var MagicType = /** @class */ function (_super) { __extends(MagicType, _super); function MagicType() { return _super !== null && _super.apply(this, arguments) || this; } MagicType.prototype.getIcons = function () { var model = this.model; var availableIcons = model.get('icon'); var icons = {}; each(model.get('type'), function (type) { if (availableIcons[type]) { icons[type] = availableIcons[type]; } }); return icons; }; MagicType.getDefaultOption = function (ecModel) { var defaultOption = { show: true, type: [], // Icon group icon: { line: 'M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4', bar: 'M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7', // eslint-disable-next-line stack: 'M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z' // jshint ignore:line }, // `line`, `bar`, `stack`, `tiled` title: ecModel.getLocale(['toolbox', 'magicType', 'title']), option: {}, seriesIndex: {} }; return defaultOption; }; MagicType.prototype.onclick = function (ecModel, api, type) { var model = this.model; var seriesIndex = model.get(['seriesIndex', type]); // Not supported magicType if (!seriesOptGenreator[type]) { return; } var newOption = { series: [] }; var generateNewSeriesTypes = function (seriesModel) { var seriesType = seriesModel.subType; var seriesId = seriesModel.id; var newSeriesOpt = seriesOptGenreator[type](seriesType, seriesId, seriesModel, model); if (newSeriesOpt) { // PENDING If merge original option? defaults(newSeriesOpt, seriesModel.option); newOption.series.push(newSeriesOpt); } // Modify boundaryGap var coordSys = seriesModel.coordinateSystem; if (coordSys && coordSys.type === 'cartesian2d' && (type === 'line' || type === 'bar')) { var categoryAxis = coordSys.getAxesByScale('ordinal')[0]; if (categoryAxis) { var axisDim = categoryAxis.dim; var axisType = axisDim + 'Axis'; var axisModel = seriesModel.getReferringComponents(axisType, SINGLE_REFERRING).models[0]; var axisIndex = axisModel.componentIndex; newOption[axisType] = newOption[axisType] || []; for (var i = 0; i <= axisIndex; i++) { newOption[axisType][axisIndex] = newOption[axisType][axisIndex] || {}; } newOption[axisType][axisIndex].boundaryGap = type === 'bar'; } } }; each(radioTypes, function (radio) { if (indexOf(radio, type) >= 0) { each(radio, function (item) { model.setIconStatus(item, 'normal'); }); } }); model.setIconStatus(type, 'emphasis'); ecModel.eachComponent({ mainType: 'series', query: seriesIndex == null ? null : { seriesIndex: seriesIndex } }, generateNewSeriesTypes); var newTitle; // Change title of stack if (type === 'stack') { // use titles in model instead of ecModel // as stack and tiled appears in pair, just flip them // no need of checking stack state newTitle = merge({ stack: model.option.title.tiled, tiled: model.option.title.stack }, model.option.title); } api.dispatchAction({ type: 'changeMagicType', currentType: type, newOption: newOption, newTitle: newTitle, featureName: 'magicType' }); }; return MagicType; }(ToolboxFeature); var seriesOptGenreator = { 'line': function (seriesType, seriesId, seriesModel, model) { if (seriesType === 'bar') { return merge({ id: seriesId, type: 'line', // Preserve data related option data: seriesModel.get('data'), stack: seriesModel.get('stack'), markPoint: seriesModel.get('markPoint'), markLine: seriesModel.get('markLine') }, model.get(['option', 'line']) || {}, true); } }, 'bar': function (seriesType, seriesId, seriesModel, model) { if (seriesType === 'line') { return merge({ id: seriesId, type: 'bar', // Preserve data related option data: seriesModel.get('data'), stack: seriesModel.get('stack'), markPoint: seriesModel.get('markPoint'), markLine: seriesModel.get('markLine') }, model.get(['option', 'bar']) || {}, true); } }, 'stack': function (seriesType, seriesId, seriesModel, model) { var isStack = seriesModel.get('stack') === INNER_STACK_KEYWORD; if (seriesType === 'line' || seriesType === 'bar') { model.setIconStatus('stack', isStack ? 'normal' : 'emphasis'); return merge({ id: seriesId, stack: isStack ? '' : INNER_STACK_KEYWORD }, model.get(['option', 'stack']) || {}, true); } } }; // TODO: SELF REGISTERED. registerAction({ type: 'changeMagicType', event: 'magicTypeChanged', update: 'prepareAndUpdate' }, function (payload, ecModel) { ecModel.mergeOption(payload.newOption); }); var BLOCK_SPLITER = new Array(60).join('-'); var ITEM_SPLITER = '\t'; /** * Group series into two types * 1. on category axis, like line, bar * 2. others, like scatter, pie */ function groupSeries(ecModel) { var seriesGroupByCategoryAxis = {}; var otherSeries = []; var meta = []; ecModel.eachRawSeries(function (seriesModel) { var coordSys = seriesModel.coordinateSystem; if (coordSys && (coordSys.type === 'cartesian2d' || coordSys.type === 'polar')) { // TODO: TYPE Consider polar? Include polar may increase unecessary bundle size. var baseAxis = coordSys.getBaseAxis(); if (baseAxis.type === 'category') { var key = baseAxis.dim + '_' + baseAxis.index; if (!seriesGroupByCategoryAxis[key]) { seriesGroupByCategoryAxis[key] = { categoryAxis: baseAxis, valueAxis: coordSys.getOtherAxis(baseAxis), series: [] }; meta.push({ axisDim: baseAxis.dim, axisIndex: baseAxis.index }); } seriesGroupByCategoryAxis[key].series.push(seriesModel); } else { otherSeries.push(seriesModel); } } else { otherSeries.push(seriesModel); } }); return { seriesGroupByCategoryAxis: seriesGroupByCategoryAxis, other: otherSeries, meta: meta }; } /** * Assemble content of series on cateogory axis * @inner */ function assembleSeriesWithCategoryAxis(groups) { var tables = []; each(groups, function (group, key) { var categoryAxis = group.categoryAxis; var valueAxis = group.valueAxis; var valueAxisDim = valueAxis.dim; var headers = [' '].concat(map(group.series, function (series) { return series.name; })); // @ts-ignore TODO Polar var columns = [categoryAxis.model.getCategories()]; each(group.series, function (series) { var rawData = series.getRawData(); columns.push(series.getRawData().mapArray(rawData.mapDimension(valueAxisDim), function (val) { return val; })); }); // Assemble table content var lines = [headers.join(ITEM_SPLITER)]; for (var i = 0; i < columns[0].length; i++) { var items = []; for (var j = 0; j < columns.length; j++) { items.push(columns[j][i]); } lines.push(items.join(ITEM_SPLITER)); } tables.push(lines.join('\n')); }); return tables.join('\n\n' + BLOCK_SPLITER + '\n\n'); } /** * Assemble content of other series */ function assembleOtherSeries(series) { return map(series, function (series) { var data = series.getRawData(); var lines = [series.name]; var vals = []; data.each(data.dimensions, function () { var argLen = arguments.length; var dataIndex = arguments[argLen - 1]; var name = data.getName(dataIndex); for (var i = 0; i < argLen - 1; i++) { vals[i] = arguments[i]; } lines.push((name ? name + ITEM_SPLITER : '') + vals.join(ITEM_SPLITER)); }); return lines.join('\n'); }).join('\n\n' + BLOCK_SPLITER + '\n\n'); } function getContentFromModel(ecModel) { var result = groupSeries(ecModel); return { value: filter([assembleSeriesWithCategoryAxis(result.seriesGroupByCategoryAxis), assembleOtherSeries(result.other)], function (str) { return !!str.replace(/[\n\t\s]/g, ''); }).join('\n\n' + BLOCK_SPLITER + '\n\n'), meta: result.meta }; } function trim$1(str) { return str.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); } /** * If a block is tsv format */ function isTSVFormat(block) { // Simple method to find out if a block is tsv format var firstLine = block.slice(0, block.indexOf('\n')); if (firstLine.indexOf(ITEM_SPLITER) >= 0) { return true; } } var itemSplitRegex = new RegExp('[' + ITEM_SPLITER + ']+', 'g'); /** * @param {string} tsv * @return {Object} */ function parseTSVContents(tsv) { var tsvLines = tsv.split(/\n+/g); var headers = trim$1(tsvLines.shift()).split(itemSplitRegex); var categories = []; var series = map(headers, function (header) { return { name: header, data: [] }; }); for (var i = 0; i < tsvLines.length; i++) { var items = trim$1(tsvLines[i]).split(itemSplitRegex); categories.push(items.shift()); for (var j = 0; j < items.length; j++) { series[j] && (series[j].data[i] = items[j]); } } return { series: series, categories: categories }; } function parseListContents(str) { var lines = str.split(/\n+/g); var seriesName = trim$1(lines.shift()); var data = []; for (var i = 0; i < lines.length; i++) { // if line is empty, ignore it. // there is a case that a user forgot to delete `\n`. var line = trim$1(lines[i]); if (!line) { continue; } var items = line.split(itemSplitRegex); var name_1 = ''; var value = void 0; var hasName = false; if (isNaN(items[0])) { // First item is name hasName = true; name_1 = items[0]; items = items.slice(1); data[i] = { name: name_1, value: [] }; value = data[i].value; } else { value = data[i] = []; } for (var j = 0; j < items.length; j++) { value.push(+items[j]); } if (value.length === 1) { hasName ? data[i].value = value[0] : data[i] = value[0]; } } return { name: seriesName, data: data }; } function parseContents(str, blockMetaList) { var blocks = str.split(new RegExp('\n*' + BLOCK_SPLITER + '\n*', 'g')); var newOption = { series: [] }; each(blocks, function (block, idx) { if (isTSVFormat(block)) { var result = parseTSVContents(block); var blockMeta = blockMetaList[idx]; var axisKey = blockMeta.axisDim + 'Axis'; if (blockMeta) { newOption[axisKey] = newOption[axisKey] || []; newOption[axisKey][blockMeta.axisIndex] = { data: result.categories }; newOption.series = newOption.series.concat(result.series); } } else { var result = parseListContents(block); newOption.series.push(result); } }); return newOption; } var DataView = /** @class */ function (_super) { __extends(DataView, _super); function DataView() { return _super !== null && _super.apply(this, arguments) || this; } DataView.prototype.onclick = function (ecModel, api) { var container = api.getDom(); var model = this.model; if (this._dom) { container.removeChild(this._dom); } var root = document.createElement('div'); root.style.cssText = 'position:absolute;left:5px;top:5px;bottom:5px;right:5px;'; root.style.backgroundColor = model.get('backgroundColor') || '#fff'; // Create elements var header = document.createElement('h4'); var lang = model.get('lang') || []; header.innerHTML = lang[0] || model.get('title'); header.style.cssText = 'margin: 10px 20px;'; header.style.color = model.get('textColor'); var viewMain = document.createElement('div'); var textarea = document.createElement('textarea'); viewMain.style.cssText = 'display:block;width:100%;overflow:auto;'; var optionToContent = model.get('optionToContent'); var contentToOption = model.get('contentToOption'); var result = getContentFromModel(ecModel); if (typeof optionToContent === 'function') { var htmlOrDom = optionToContent(api.getOption()); if (typeof htmlOrDom === 'string') { viewMain.innerHTML = htmlOrDom; } else if (isDom(htmlOrDom)) { viewMain.appendChild(htmlOrDom); } } else { // Use default textarea viewMain.appendChild(textarea); textarea.readOnly = model.get('readOnly'); textarea.style.cssText = 'width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;'; textarea.style.color = model.get('textColor'); textarea.style.borderColor = model.get('textareaBorderColor'); textarea.style.backgroundColor = model.get('textareaColor'); textarea.value = result.value; } var blockMetaList = result.meta; var buttonContainer = document.createElement('div'); buttonContainer.style.cssText = 'position:absolute;bottom:0;left:0;right:0;'; var buttonStyle = 'float:right;margin-right:20px;border:none;' + 'cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px'; var closeButton = document.createElement('div'); var refreshButton = document.createElement('div'); buttonStyle += ';background-color:' + model.get('buttonColor'); buttonStyle += ';color:' + model.get('buttonTextColor'); var self = this; function close() { container.removeChild(root); self._dom = null; } addEventListener(closeButton, 'click', close); addEventListener(refreshButton, 'click', function () { if (contentToOption == null && optionToContent != null || contentToOption != null && optionToContent == null) { if ("development" !== 'production') { // eslint-disable-next-line console.warn('It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored.'); } close(); return; } var newOption; try { if (typeof contentToOption === 'function') { newOption = contentToOption(viewMain, api.getOption()); } else { newOption = parseContents(textarea.value, blockMetaList); } } catch (e) { close(); throw new Error('Data view format error ' + e); } if (newOption) { api.dispatchAction({ type: 'changeDataView', newOption: newOption }); } close(); }); closeButton.innerHTML = lang[1]; refreshButton.innerHTML = lang[2]; refreshButton.style.cssText = buttonStyle; closeButton.style.cssText = buttonStyle; !model.get('readOnly') && buttonContainer.appendChild(refreshButton); buttonContainer.appendChild(closeButton); root.appendChild(header); root.appendChild(viewMain); root.appendChild(buttonContainer); viewMain.style.height = container.clientHeight - 80 + 'px'; container.appendChild(root); this._dom = root; }; DataView.prototype.remove = function (ecModel, api) { this._dom && api.getDom().removeChild(this._dom); }; DataView.prototype.dispose = function (ecModel, api) { this.remove(ecModel, api); }; DataView.getDefaultOption = function (ecModel) { var defaultOption = { show: true, readOnly: false, optionToContent: null, contentToOption: null, // eslint-disable-next-line icon: 'M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28', title: ecModel.getLocale(['toolbox', 'dataView', 'title']), lang: ecModel.getLocale(['toolbox', 'dataView', 'lang']), backgroundColor: '#fff', textColor: '#000', textareaColor: '#fff', textareaBorderColor: '#333', buttonColor: '#c23531', buttonTextColor: '#fff' }; return defaultOption; }; return DataView; }(ToolboxFeature); /** * @inner */ function tryMergeDataOption(newData, originalData) { return map(newData, function (newVal, idx) { var original = originalData && originalData[idx]; if (isObject(original) && !isArray(original)) { var newValIsObject = isObject(newVal) && !isArray(newVal); if (!newValIsObject) { newVal = { value: newVal }; } // original data has name but new data has no name var shouldDeleteName = original.name != null && newVal.name == null; // Original data has option newVal = defaults(newVal, original); shouldDeleteName && delete newVal.name; return newVal; } else { return newVal; } }); } // TODO: SELF REGISTERED. registerAction({ type: 'changeDataView', event: 'dataViewChanged', update: 'prepareAndUpdate' }, function (payload, ecModel) { var newSeriesOptList = []; each(payload.newOption.series, function (seriesOpt) { var seriesModel = ecModel.getSeriesByName(seriesOpt.name)[0]; if (!seriesModel) { // New created series // Geuss the series type newSeriesOptList.push(extend({ // Default is scatter type: 'scatter' }, seriesOpt)); } else { var originalData = seriesModel.get('data'); newSeriesOptList.push({ name: seriesOpt.name, data: tryMergeDataOption(seriesOpt.data, originalData) }); } }); ecModel.mergeOption(defaults({ series: newSeriesOptList }, payload.newOption)); }); var each$a = each; var inner$f = makeInner(); /** * @param ecModel * @param newSnapshot key is dataZoomId */ function push(ecModel, newSnapshot) { var storedSnapshots = getStoreSnapshots(ecModel); // If previous dataZoom can not be found, // complete an range with current range. each$a(newSnapshot, function (batchItem, dataZoomId) { var i = storedSnapshots.length - 1; for (; i >= 0; i--) { var snapshot = storedSnapshots[i]; if (snapshot[dataZoomId]) { break; } } if (i < 0) { // No origin range set, create one by current range. var dataZoomModel = ecModel.queryComponents({ mainType: 'dataZoom', subType: 'select', id: dataZoomId })[0]; if (dataZoomModel) { var percentRange = dataZoomModel.getPercentRange(); storedSnapshots[0][dataZoomId] = { dataZoomId: dataZoomId, start: percentRange[0], end: percentRange[1] }; } } }); storedSnapshots.push(newSnapshot); } function pop(ecModel) { var storedSnapshots = getStoreSnapshots(ecModel); var head = storedSnapshots[storedSnapshots.length - 1]; storedSnapshots.length > 1 && storedSnapshots.pop(); // Find top for all dataZoom. var snapshot = {}; each$a(head, function (batchItem, dataZoomId) { for (var i = storedSnapshots.length - 1; i >= 0; i--) { batchItem = storedSnapshots[i][dataZoomId]; if (batchItem) { snapshot[dataZoomId] = batchItem; break; } } }); return snapshot; } function clear$1(ecModel) { inner$f(ecModel).snapshots = null; } function count(ecModel) { return getStoreSnapshots(ecModel).length; } /** * History length of each dataZoom may be different. * this._history[0] is used to store origin range. */ function getStoreSnapshots(ecModel) { var store = inner$f(ecModel); if (!store.snapshots) { store.snapshots = [{}]; } return store.snapshots; } var RestoreOption = /** @class */ function (_super) { __extends(RestoreOption, _super); function RestoreOption() { return _super !== null && _super.apply(this, arguments) || this; } RestoreOption.prototype.onclick = function (ecModel, api) { clear$1(ecModel); api.dispatchAction({ type: 'restore', from: this.uid }); }; RestoreOption.getDefaultOption = function (ecModel) { var defaultOption = { show: true, // eslint-disable-next-line icon: 'M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5', title: ecModel.getLocale(['toolbox', 'restore', 'title']) }; return defaultOption; }; return RestoreOption; }(ToolboxFeature); // TODO: SELF REGISTERED. registerAction({ type: 'restore', event: 'restore', update: 'prepareAndUpdate' }, function (payload, ecModel) { ecModel.resetOption('recreate'); }); var COORD_CONVERTS = ['dataToPoint', 'pointToData']; // FIXME // how to genarialize to more coordinate systems. var INCLUDE_FINDER_MAIN_TYPES = ['grid', 'xAxis', 'yAxis', 'geo', 'graph', 'polar', 'radiusAxis', 'angleAxis', 'bmap']; var BrushTargetManager = /** @class */ function () { /** * @param finder contains Index/Id/Name of xAxis/yAxis/geo/grid * Each can be {number|Array.}. like: {xAxisIndex: [3, 4]} * @param opt.include include coordinate system types. */ function BrushTargetManager(finder, ecModel, opt) { var _this = this; this._targetInfoList = []; var foundCpts = parseFinder$1(ecModel, finder); each(targetInfoBuilders, function (builder, type) { if (!opt || !opt.include || indexOf(opt.include, type) >= 0) { builder(foundCpts, _this._targetInfoList); } }); } BrushTargetManager.prototype.setOutputRanges = function (areas, ecModel) { this.matchOutputRanges(areas, ecModel, function (area, coordRange, coordSys) { (area.coordRanges || (area.coordRanges = [])).push(coordRange); // area.coordRange is the first of area.coordRanges if (!area.coordRange) { area.coordRange = coordRange; // In 'category' axis, coord to pixel is not reversible, so we can not // rebuild range by coordRange accrately, which may bring trouble when // brushing only one item. So we use __rangeOffset to rebuilding range // by coordRange. And this it only used in brush component so it is no // need to be adapted to coordRanges. var result = coordConvert[area.brushType](0, coordSys, coordRange); area.__rangeOffset = { offset: diffProcessor[area.brushType](result.values, area.range, [1, 1]), xyMinMax: result.xyMinMax }; } }); return areas; }; BrushTargetManager.prototype.matchOutputRanges = function (areas, ecModel, cb) { each(areas, function (area) { var targetInfo = this.findTargetInfo(area, ecModel); if (targetInfo && targetInfo !== true) { each(targetInfo.coordSyses, function (coordSys) { var result = coordConvert[area.brushType](1, coordSys, area.range); cb(area, result.values, coordSys, ecModel); }); } }, this); }; /** * the `areas` is `BrushModel.areas`. * Called in layout stage. * convert `area.coordRange` to global range and set panelId to `area.range`. */ BrushTargetManager.prototype.setInputRanges = function (areas, ecModel) { each(areas, function (area) { var targetInfo = this.findTargetInfo(area, ecModel); if ("development" !== 'production') { assert(!targetInfo || targetInfo === true || area.coordRange, 'coordRange must be specified when coord index specified.'); assert(!targetInfo || targetInfo !== true || area.range, 'range must be specified in global brush.'); } area.range = area.range || []; // convert coordRange to global range and set panelId. if (targetInfo && targetInfo !== true) { area.panelId = targetInfo.panelId; // (1) area.range shoule always be calculate from coordRange but does // not keep its original value, for the sake of the dataZoom scenario, // where area.coordRange remains unchanged but area.range may be changed. // (2) Only support converting one coordRange to pixel range in brush // component. So do not consider `coordRanges`. // (3) About __rangeOffset, see comment above. var result = coordConvert[area.brushType](0, targetInfo.coordSys, area.coordRange); var rangeOffset = area.__rangeOffset; area.range = rangeOffset ? diffProcessor[area.brushType](result.values, rangeOffset.offset, getScales(result.xyMinMax, rangeOffset.xyMinMax)) : result.values; } }, this); }; BrushTargetManager.prototype.makePanelOpts = function (api, getDefaultBrushType) { return map(this._targetInfoList, function (targetInfo) { var rect = targetInfo.getPanelRect(); return { panelId: targetInfo.panelId, defaultBrushType: getDefaultBrushType ? getDefaultBrushType(targetInfo) : null, clipPath: makeRectPanelClipPath(rect), isTargetByCursor: makeRectIsTargetByCursor(rect, api, targetInfo.coordSysModel), getLinearBrushOtherExtent: makeLinearBrushOtherExtent(rect) }; }); }; BrushTargetManager.prototype.controlSeries = function (area, seriesModel, ecModel) { // Check whether area is bound in coord, and series do not belong to that coord. // If do not do this check, some brush (like lineX) will controll all axes. var targetInfo = this.findTargetInfo(area, ecModel); return targetInfo === true || targetInfo && indexOf(targetInfo.coordSyses, seriesModel.coordinateSystem) >= 0; }; /** * If return Object, a coord found. * If reutrn true, global found. * Otherwise nothing found. */ BrushTargetManager.prototype.findTargetInfo = function (area, ecModel) { var targetInfoList = this._targetInfoList; var foundCpts = parseFinder$1(ecModel, area); for (var i = 0; i < targetInfoList.length; i++) { var targetInfo = targetInfoList[i]; var areaPanelId = area.panelId; if (areaPanelId) { if (targetInfo.panelId === areaPanelId) { return targetInfo; } } else { for (var j = 0; j < targetInfoMatchers.length; j++) { if (targetInfoMatchers[j](foundCpts, targetInfo)) { return targetInfo; } } } } return true; }; return BrushTargetManager; }(); function formatMinMax(minMax) { minMax[0] > minMax[1] && minMax.reverse(); return minMax; } function parseFinder$1(ecModel, finder) { return parseFinder(ecModel, finder, { includeMainTypes: INCLUDE_FINDER_MAIN_TYPES }); } var targetInfoBuilders = { grid: function (foundCpts, targetInfoList) { var xAxisModels = foundCpts.xAxisModels; var yAxisModels = foundCpts.yAxisModels; var gridModels = foundCpts.gridModels; // Remove duplicated. var gridModelMap = createHashMap(); var xAxesHas = {}; var yAxesHas = {}; if (!xAxisModels && !yAxisModels && !gridModels) { return; } each(xAxisModels, function (axisModel) { var gridModel = axisModel.axis.grid.model; gridModelMap.set(gridModel.id, gridModel); xAxesHas[gridModel.id] = true; }); each(yAxisModels, function (axisModel) { var gridModel = axisModel.axis.grid.model; gridModelMap.set(gridModel.id, gridModel); yAxesHas[gridModel.id] = true; }); each(gridModels, function (gridModel) { gridModelMap.set(gridModel.id, gridModel); xAxesHas[gridModel.id] = true; yAxesHas[gridModel.id] = true; }); gridModelMap.each(function (gridModel) { var grid = gridModel.coordinateSystem; var cartesians = []; each(grid.getCartesians(), function (cartesian, index) { if (indexOf(xAxisModels, cartesian.getAxis('x').model) >= 0 || indexOf(yAxisModels, cartesian.getAxis('y').model) >= 0) { cartesians.push(cartesian); } }); targetInfoList.push({ panelId: 'grid--' + gridModel.id, gridModel: gridModel, coordSysModel: gridModel, // Use the first one as the representitive coordSys. coordSys: cartesians[0], coordSyses: cartesians, getPanelRect: panelRectBuilders.grid, xAxisDeclared: xAxesHas[gridModel.id], yAxisDeclared: yAxesHas[gridModel.id] }); }); }, geo: function (foundCpts, targetInfoList) { each(foundCpts.geoModels, function (geoModel) { var coordSys = geoModel.coordinateSystem; targetInfoList.push({ panelId: 'geo--' + geoModel.id, geoModel: geoModel, coordSysModel: geoModel, coordSys: coordSys, coordSyses: [coordSys], getPanelRect: panelRectBuilders.geo }); }); } }; var targetInfoMatchers = [// grid function (foundCpts, targetInfo) { var xAxisModel = foundCpts.xAxisModel; var yAxisModel = foundCpts.yAxisModel; var gridModel = foundCpts.gridModel; !gridModel && xAxisModel && (gridModel = xAxisModel.axis.grid.model); !gridModel && yAxisModel && (gridModel = yAxisModel.axis.grid.model); return gridModel && gridModel === targetInfo.gridModel; }, // geo function (foundCpts, targetInfo) { var geoModel = foundCpts.geoModel; return geoModel && geoModel === targetInfo.geoModel; }]; var panelRectBuilders = { grid: function () { // grid is not Transformable. return this.coordSys.master.getRect().clone(); }, geo: function () { var coordSys = this.coordSys; var rect = coordSys.getBoundingRect().clone(); // geo roam and zoom transform rect.applyTransform(getTransform(coordSys)); return rect; } }; var coordConvert = { lineX: curry(axisConvert, 0), lineY: curry(axisConvert, 1), rect: function (to, coordSys, rangeOrCoordRange) { var xminymin = coordSys[COORD_CONVERTS[to]]([rangeOrCoordRange[0][0], rangeOrCoordRange[1][0]]); var xmaxymax = coordSys[COORD_CONVERTS[to]]([rangeOrCoordRange[0][1], rangeOrCoordRange[1][1]]); var values = [formatMinMax([xminymin[0], xmaxymax[0]]), formatMinMax([xminymin[1], xmaxymax[1]])]; return { values: values, xyMinMax: values }; }, polygon: function (to, coordSys, rangeOrCoordRange) { var xyMinMax = [[Infinity, -Infinity], [Infinity, -Infinity]]; var values = map(rangeOrCoordRange, function (item) { var p = coordSys[COORD_CONVERTS[to]](item); xyMinMax[0][0] = Math.min(xyMinMax[0][0], p[0]); xyMinMax[1][0] = Math.min(xyMinMax[1][0], p[1]); xyMinMax[0][1] = Math.max(xyMinMax[0][1], p[0]); xyMinMax[1][1] = Math.max(xyMinMax[1][1], p[1]); return p; }); return { values: values, xyMinMax: xyMinMax }; } }; function axisConvert(axisNameIndex, to, coordSys, rangeOrCoordRange) { if ("development" !== 'production') { assert(coordSys.type === 'cartesian2d', 'lineX/lineY brush is available only in cartesian2d.'); } var axis = coordSys.getAxis(['x', 'y'][axisNameIndex]); var values = formatMinMax(map([0, 1], function (i) { return to ? axis.coordToData(axis.toLocalCoord(rangeOrCoordRange[i])) : axis.toGlobalCoord(axis.dataToCoord(rangeOrCoordRange[i])); })); var xyMinMax = []; xyMinMax[axisNameIndex] = values; xyMinMax[1 - axisNameIndex] = [NaN, NaN]; return { values: values, xyMinMax: xyMinMax }; } var diffProcessor = { lineX: curry(axisDiffProcessor, 0), lineY: curry(axisDiffProcessor, 1), rect: function (values, refer, scales) { return [[values[0][0] - scales[0] * refer[0][0], values[0][1] - scales[0] * refer[0][1]], [values[1][0] - scales[1] * refer[1][0], values[1][1] - scales[1] * refer[1][1]]]; }, polygon: function (values, refer, scales) { return map(values, function (item, idx) { return [item[0] - scales[0] * refer[idx][0], item[1] - scales[1] * refer[idx][1]]; }); } }; function axisDiffProcessor(axisNameIndex, values, refer, scales) { return [values[0] - scales[axisNameIndex] * refer[0], values[1] - scales[axisNameIndex] * refer[1]]; } // We have to process scale caused by dataZoom manually, // although it might be not accurate. // Return [0~1, 0~1] function getScales(xyMinMaxCurr, xyMinMaxOrigin) { var sizeCurr = getSize(xyMinMaxCurr); var sizeOrigin = getSize(xyMinMaxOrigin); var scales = [sizeCurr[0] / sizeOrigin[0], sizeCurr[1] / sizeOrigin[1]]; isNaN(scales[0]) && (scales[0] = 1); isNaN(scales[1]) && (scales[1] = 1); return scales; } function getSize(xyMinMax) { return xyMinMax ? [xyMinMax[0][1] - xyMinMax[0][0], xyMinMax[1][1] - xyMinMax[1][0]] : [NaN, NaN]; } var each$b = each; var DATA_ZOOM_ID_BASE = makeInternalComponentId('toolbox-dataZoom_'); var DataZoomFeature = /** @class */ function (_super) { __extends(DataZoomFeature, _super); function DataZoomFeature() { return _super !== null && _super.apply(this, arguments) || this; } DataZoomFeature.prototype.render = function (featureModel, ecModel, api, payload) { if (!this._brushController) { this._brushController = new BrushController(api.getZr()); this._brushController.on('brush', bind(this._onBrush, this)).mount(); } updateZoomBtnStatus(featureModel, ecModel, this, payload, api); updateBackBtnStatus(featureModel, ecModel); }; DataZoomFeature.prototype.onclick = function (ecModel, api, type) { handlers$1[type].call(this); }; DataZoomFeature.prototype.remove = function (ecModel, api) { this._brushController && this._brushController.unmount(); }; DataZoomFeature.prototype.dispose = function (ecModel, api) { this._brushController && this._brushController.dispose(); }; DataZoomFeature.prototype._onBrush = function (eventParam) { var areas = eventParam.areas; if (!eventParam.isEnd || !areas.length) { return; } var snapshot = {}; var ecModel = this.ecModel; this._brushController.updateCovers([]); // remove cover var brushTargetManager = new BrushTargetManager(makeAxisFinder(this.model), ecModel, { include: ['grid'] }); brushTargetManager.matchOutputRanges(areas, ecModel, function (area, coordRange, coordSys) { if (coordSys.type !== 'cartesian2d') { return; } var brushType = area.brushType; if (brushType === 'rect') { setBatch('x', coordSys, coordRange[0]); setBatch('y', coordSys, coordRange[1]); } else { setBatch({ lineX: 'x', lineY: 'y' }[brushType], coordSys, coordRange); } }); push(ecModel, snapshot); this._dispatchZoomAction(snapshot); function setBatch(dimName, coordSys, minMax) { var axis = coordSys.getAxis(dimName); var axisModel = axis.model; var dataZoomModel = findDataZoom(dimName, axisModel, ecModel); // Restrict range. var minMaxSpan = dataZoomModel.findRepresentativeAxisProxy(axisModel).getMinMaxSpan(); if (minMaxSpan.minValueSpan != null || minMaxSpan.maxValueSpan != null) { minMax = sliderMove(0, minMax.slice(), axis.scale.getExtent(), 0, minMaxSpan.minValueSpan, minMaxSpan.maxValueSpan); } dataZoomModel && (snapshot[dataZoomModel.id] = { dataZoomId: dataZoomModel.id, startValue: minMax[0], endValue: minMax[1] }); } function findDataZoom(dimName, axisModel, ecModel) { var found; ecModel.eachComponent({ mainType: 'dataZoom', subType: 'select' }, function (dzModel) { var has = dzModel.getAxisModel(dimName, axisModel.componentIndex); has && (found = dzModel); }); return found; } }; DataZoomFeature.prototype._dispatchZoomAction = function (snapshot) { var batch = []; // Convert from hash map to array. each$b(snapshot, function (batchItem, dataZoomId) { batch.push(clone(batchItem)); }); batch.length && this.api.dispatchAction({ type: 'dataZoom', from: this.uid, batch: batch }); }; DataZoomFeature.getDefaultOption = function (ecModel) { var defaultOption = { show: true, filterMode: 'filter', // Icon group icon: { zoom: 'M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1', back: 'M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26' }, // `zoom`, `back` title: ecModel.getLocale(['toolbox', 'dataZoom', 'title']), brushStyle: { borderWidth: 0, color: 'rgba(210,219,238,0.2)' } }; return defaultOption; }; return DataZoomFeature; }(ToolboxFeature); var handlers$1 = { zoom: function () { var nextActive = !this._isZoomActive; this.api.dispatchAction({ type: 'takeGlobalCursor', key: 'dataZoomSelect', dataZoomSelectActive: nextActive }); }, back: function () { this._dispatchZoomAction(pop(this.ecModel)); } }; function makeAxisFinder(dzFeatureModel) { var setting = { xAxisIndex: dzFeatureModel.get('xAxisIndex', true), yAxisIndex: dzFeatureModel.get('yAxisIndex', true), xAxisId: dzFeatureModel.get('xAxisId', true), yAxisId: dzFeatureModel.get('yAxisId', true) }; // If both `xAxisIndex` `xAxisId` not set, it means 'all'. // If both `yAxisIndex` `yAxisId` not set, it means 'all'. // Some old cases set like this below to close yAxis control but leave xAxis control: // `{ feature: { dataZoom: { yAxisIndex: false } }`. if (setting.xAxisIndex == null && setting.xAxisId == null) { setting.xAxisIndex = 'all'; } if (setting.yAxisIndex == null && setting.yAxisId == null) { setting.yAxisIndex = 'all'; } return setting; } function updateBackBtnStatus(featureModel, ecModel) { featureModel.setIconStatus('back', count(ecModel) > 1 ? 'emphasis' : 'normal'); } function updateZoomBtnStatus(featureModel, ecModel, view, payload, api) { var zoomActive = view._isZoomActive; if (payload && payload.type === 'takeGlobalCursor') { zoomActive = payload.key === 'dataZoomSelect' ? payload.dataZoomSelectActive : false; } view._isZoomActive = zoomActive; featureModel.setIconStatus('zoom', zoomActive ? 'emphasis' : 'normal'); var brushTargetManager = new BrushTargetManager(makeAxisFinder(featureModel), ecModel, { include: ['grid'] }); var panels = brushTargetManager.makePanelOpts(api, function (targetInfo) { return targetInfo.xAxisDeclared && !targetInfo.yAxisDeclared ? 'lineX' : !targetInfo.xAxisDeclared && targetInfo.yAxisDeclared ? 'lineY' : 'rect'; }); view._brushController.setPanels(panels).enableBrush(zoomActive && panels.length ? { brushType: 'auto', brushStyle: featureModel.getModel('brushStyle').getItemStyle() } : false); } registerInternalOptionCreator('dataZoom', function (ecModel) { var toolboxModel = ecModel.getComponent('toolbox', 0); if (!toolboxModel) { return; } var dzFeatureModel = toolboxModel.getModel(['feature', 'dataZoom']); var dzOptions = []; var finder = makeAxisFinder(dzFeatureModel); var finderResult = parseFinder(ecModel, finder); each$b(finderResult.xAxisModels, function (axisModel) { return buildInternalOptions(axisModel, 'xAxis', 'xAxisIndex'); }); each$b(finderResult.yAxisModels, function (axisModel) { return buildInternalOptions(axisModel, 'yAxis', 'yAxisIndex'); }); function buildInternalOptions(axisModel, axisMainType, axisIndexPropName) { var axisIndex = axisModel.componentIndex; var newOpt = { type: 'select', $fromToolbox: true, // Default to be filter filterMode: dzFeatureModel.get('filterMode', true) || 'filter', // Id for merge mapping. id: DATA_ZOOM_ID_BASE + axisMainType + axisIndex }; newOpt[axisIndexPropName] = axisIndex; dzOptions.push(newOpt); } return dzOptions; }); function install$z(registers) { registers.registerComponentModel(ToolboxModel); registers.registerComponentView(ToolboxView); registerFeature('saveAsImage', SaveAsImage); registerFeature('magicType', MagicType); registerFeature('dataView', DataView); registerFeature('dataZoom', DataZoomFeature); registerFeature('restore', RestoreOption); use(install$y); } var TooltipModel = /** @class */ function (_super) { __extends(TooltipModel, _super); function TooltipModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = TooltipModel.type; return _this; } TooltipModel.type = 'tooltip'; TooltipModel.dependencies = ['axisPointer']; TooltipModel.defaultOption = { zlevel: 0, z: 60, show: true, // tooltip main content showContent: true, // 'trigger' only works on coordinate system. // 'item' | 'axis' | 'none' trigger: 'item', // 'click' | 'mousemove' | 'none' triggerOn: 'mousemove|click', alwaysShowContent: false, displayMode: 'single', renderMode: 'auto', // whether restraint content inside viewRect. // If renderMode: 'richText', default true. // If renderMode: 'html', defaut false (for backward compat). confine: null, showDelay: 0, hideDelay: 100, // Animation transition time, unit is second transitionDuration: 0.4, enterable: false, backgroundColor: '#fff', // box shadow shadowBlur: 10, shadowColor: 'rgba(0, 0, 0, .2)', shadowOffsetX: 1, shadowOffsetY: 2, // tooltip border radius, unit is px, default is 4 borderRadius: 4, // tooltip border width, unit is px, default is 0 (no border) borderWidth: 1, // Tooltip inside padding, default is 5 for all direction // Array is allowed to set up, right, bottom, left, same with css // The default value: See `tooltip/tooltipMarkup.ts#getPaddingFromTooltipModel`. padding: null, // Extra css text extraCssText: '', // axis indicator, trigger by axis axisPointer: { // default is line // legal values: 'line' | 'shadow' | 'cross' type: 'line', // Valid when type is line, appoint tooltip line locate on which line. Optional // legal values: 'x' | 'y' | 'angle' | 'radius' | 'auto' // default is 'auto', chose the axis which type is category. // for multiply y axis, cartesian coord chose x axis, polar chose angle axis axis: 'auto', animation: 'auto', animationDurationUpdate: 200, animationEasingUpdate: 'exponentialOut', crossStyle: { color: '#999', width: 1, type: 'dashed', // TODO formatter textStyle: {} } // lineStyle and shadowStyle should not be specified here, // otherwise it will always override those styles on option.axisPointer. }, textStyle: { color: '#666', fontSize: 14 } }; return TooltipModel; }(ComponentModel); /* global document */ function shouldTooltipConfine(tooltipModel) { var confineOption = tooltipModel.get('confine'); return confineOption != null ? !!confineOption // In richText mode, the outside part can not be visible. : tooltipModel.get('renderMode') === 'richText'; } function testStyle(styleProps) { if (!env.domSupported) { return; } var style = document.documentElement.style; for (var i = 0, len = styleProps.length; i < len; i++) { if (styleProps[i] in style) { return styleProps[i]; } } } var TRANSFORM_VENDOR = testStyle(['transform', 'webkitTransform', 'OTransform', 'MozTransform', 'msTransform']); var TRANSITION_VENDOR = testStyle(['webkitTransition', 'transition', 'OTransition', 'MozTransition', 'msTransition']); function toCSSVendorPrefix(styleVendor, styleProp) { if (!styleVendor) { return styleProp; } styleProp = toCamelCase(styleProp, true); var idx = styleVendor.indexOf(styleProp); styleVendor = idx === -1 ? styleProp : "-" + styleVendor.slice(0, idx) + "-" + styleProp; return styleVendor.toLowerCase(); } function getComputedStyle(el, style) { var stl = el.currentStyle || document.defaultView && document.defaultView.getComputedStyle(el); return stl ? style ? stl[style] : stl : null; } /* global document, window */ var CSS_TRANSITION_VENDOR = toCSSVendorPrefix(TRANSITION_VENDOR, 'transition'); var CSS_TRANSFORM_VENDOR = toCSSVendorPrefix(TRANSFORM_VENDOR, 'transform'); // eslint-disable-next-line var gCssText = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;" + (env.transform3dSupported ? 'will-change:transform;' : ''); function mirrorPos(pos) { pos = pos === 'left' ? 'right' : pos === 'right' ? 'left' : pos === 'top' ? 'bottom' : 'top'; return pos; } function assembleArrow(backgroundColor, borderColor, arrowPosition) { if (!isString(arrowPosition) || arrowPosition === 'inside') { return ''; } borderColor = convertToColorString(borderColor); var arrowPos = mirrorPos(arrowPosition); var positionStyle = arrowPos + ":-6px;"; var transformStyle = CSS_TRANSFORM_VENDOR + ':'; if (indexOf(['left', 'right'], arrowPos) > -1) { positionStyle += 'top:50%'; transformStyle += "translateY(-50%) rotate(" + (arrowPos === 'left' ? -225 : -45) + "deg)"; } else { positionStyle += 'left:50%'; transformStyle += "translateX(-50%) rotate(" + (arrowPos === 'top' ? 225 : 45) + "deg)"; } var borderStyle = borderColor + " solid 1px;"; var styleCss = ['position:absolute;width:10px;height:10px;', positionStyle + ";" + transformStyle + ";", "border-bottom:" + borderStyle, "border-right:" + borderStyle, "background-color:" + backgroundColor + ";", 'box-shadow:8px 8px 16px -3px #000;']; return "
"; } function assembleTransition(duration, onlyFade) { var transitionCurve = 'cubic-bezier(0.23,1,0.32,1)'; var transitionOption = " " + duration / 2 + "s " + transitionCurve; var transitionText = "opacity" + transitionOption + ",visibility" + transitionOption; if (!onlyFade) { transitionOption = " " + duration + "s " + transitionCurve; transitionText += env.transformSupported ? "," + TRANSFORM_VENDOR + transitionOption : ",left" + transitionOption + ",top" + transitionOption; } return CSS_TRANSITION_VENDOR + ':' + transitionText; } function assembleTransform(x, y, toString) { // If using float on style, the final width of the dom might // keep changing slightly while mouse move. So `toFixed(0)` them. var x0 = x.toFixed(0) + 'px'; var y0 = y.toFixed(0) + 'px'; // not support transform, use `left` and `top` instead. if (!env.transformSupported) { return toString ? "top:" + y0 + ";left:" + x0 + ";" : [['top', y0], ['left', x0]]; } // support transform var is3d = env.transform3dSupported; var translate = "translate" + (is3d ? '3d' : '') + "(" + x0 + "," + y0 + (is3d ? ',0' : '') + ")"; return toString ? 'top:0;left:0;' + CSS_TRANSFORM_VENDOR + ':' + translate + ';' : [['top', 0], ['left', 0], [TRANSFORM_VENDOR, translate]]; } /** * @param {Object} textStyle * @return {string} * @inner */ function assembleFont(textStyleModel) { var cssText = []; var fontSize = textStyleModel.get('fontSize'); var color = textStyleModel.getTextColor(); color && cssText.push('color:' + color); cssText.push('font:' + textStyleModel.getFont()); fontSize // @ts-ignore, leave it to the tooltip refactor. && cssText.push('line-height:' + Math.round(fontSize * 3 / 2) + 'px'); var shadowColor = textStyleModel.get('textShadowColor'); var shadowBlur = textStyleModel.get('textShadowBlur') || 0; var shadowOffsetX = textStyleModel.get('textShadowOffsetX') || 0; var shadowOffsetY = textStyleModel.get('textShadowOffsetY') || 0; shadowColor && shadowBlur && cssText.push('text-shadow:' + shadowOffsetX + 'px ' + shadowOffsetY + 'px ' + shadowBlur + 'px ' + shadowColor); each(['decoration', 'align'], function (name) { var val = textStyleModel.get(name); val && cssText.push('text-' + name + ':' + val); }); return cssText.join(';'); } function assembleCssText(tooltipModel, enableTransition, onlyFade) { var cssText = []; var transitionDuration = tooltipModel.get('transitionDuration'); var backgroundColor = tooltipModel.get('backgroundColor'); var shadowBlur = tooltipModel.get('shadowBlur'); var shadowColor = tooltipModel.get('shadowColor'); var shadowOffsetX = tooltipModel.get('shadowOffsetX'); var shadowOffsetY = tooltipModel.get('shadowOffsetY'); var textStyleModel = tooltipModel.getModel('textStyle'); var padding = getPaddingFromTooltipModel(tooltipModel, 'html'); var boxShadow = shadowOffsetX + "px " + shadowOffsetY + "px " + shadowBlur + "px " + shadowColor; cssText.push('box-shadow:' + boxShadow); // Animation transition. Do not animate when transitionDuration is 0. enableTransition && transitionDuration && cssText.push(assembleTransition(transitionDuration, onlyFade)); if (backgroundColor) { if (env.canvasSupported) { cssText.push('background-color:' + backgroundColor); } else { // for ie cssText.push('background-color:#' + toHex(backgroundColor)); cssText.push('filter:alpha(opacity=70)'); } } // Border style each(['width', 'color', 'radius'], function (name) { var borderName = 'border-' + name; var camelCase = toCamelCase(borderName); var val = tooltipModel.get(camelCase); val != null && cssText.push(borderName + ':' + val + (name === 'color' ? '' : 'px')); }); // Text style cssText.push(assembleFont(textStyleModel)); // Padding if (padding != null) { cssText.push('padding:' + normalizeCssArray$1(padding).join('px ') + 'px'); } return cssText.join(';') + ';'; } // If not able to make, do not modify the input `out`. function makeStyleCoord(out, zr, appendToBody, zrX, zrY) { var zrPainter = zr && zr.painter; if (appendToBody) { var zrViewportRoot = zrPainter && zrPainter.getViewportRoot(); if (zrViewportRoot) { // Some APPs might use scale on body, so we support CSS transform here. transformLocalCoord(out, zrViewportRoot, document.body, zrX, zrY); } } else { out[0] = zrX; out[1] = zrY; // xy should be based on canvas root. But tooltipContent is // the sibling of canvas root. So padding of ec container // should be considered here. var viewportRootOffset = zrPainter && zrPainter.getViewportRootOffset(); if (viewportRootOffset) { out[0] += viewportRootOffset.offsetLeft; out[1] += viewportRootOffset.offsetTop; } } out[2] = out[0] / zr.getWidth(); out[3] = out[1] / zr.getHeight(); } var TooltipHTMLContent = /** @class */ function () { function TooltipHTMLContent(container, api, opt) { this._show = false; this._styleCoord = [0, 0, 0, 0]; this._enterable = true; this._firstShow = true; this._longHide = true; if (env.wxa) { return null; } var el = document.createElement('div'); // TODO: TYPE el.domBelongToZr = true; this.el = el; var zr = this._zr = api.getZr(); var appendToBody = this._appendToBody = opt && opt.appendToBody; makeStyleCoord(this._styleCoord, zr, appendToBody, api.getWidth() / 2, api.getHeight() / 2); if (appendToBody) { document.body.appendChild(el); } else { container.appendChild(el); } this._container = container; // FIXME // Is it needed to trigger zr event manually if // the browser do not support `pointer-events: none`. var self = this; el.onmouseenter = function () { // clear the timeout in hideLater and keep showing tooltip if (self._enterable) { clearTimeout(self._hideTimeout); self._show = true; } self._inContent = true; }; el.onmousemove = function (e) { e = e || window.event; if (!self._enterable) { // `pointer-events: none` is set to tooltip content div // if `enterable` is set as `false`, and `el.onmousemove` // can not be triggered. But in browser that do not // support `pointer-events`, we need to do this: // Try trigger zrender event to avoid mouse // in and out shape too frequently var handler = zr.handler; var zrViewportRoot = zr.painter.getViewportRoot(); normalizeEvent(zrViewportRoot, e, true); handler.dispatch('mousemove', e); } }; el.onmouseleave = function () { // set `_inContent` to `false` before `hideLater` self._inContent = false; if (self._enterable) { if (self._show) { self.hideLater(self._hideDelay); } } }; } /** * Update when tooltip is rendered */ TooltipHTMLContent.prototype.update = function (tooltipModel) { // FIXME // Move this logic to ec main? var container = this._container; var position = getComputedStyle(container, 'position'); var domStyle = container.style; if (domStyle.position !== 'absolute' && position !== 'absolute') { domStyle.position = 'relative'; } // move tooltip if chart resized var alwaysShowContent = tooltipModel.get('alwaysShowContent'); alwaysShowContent && this._moveIfResized(); // update className this.el.className = tooltipModel.get('className') || ''; // Hide the tooltip // PENDING // this.hide(); }; TooltipHTMLContent.prototype.show = function (tooltipModel, nearPointColor) { clearTimeout(this._hideTimeout); clearTimeout(this._longHideTimeout); var el = this.el; var style = el.style; var styleCoord = this._styleCoord; if (!el.innerHTML) { style.display = 'none'; } else { style.cssText = gCssText + assembleCssText(tooltipModel, !this._firstShow, this._longHide) // initial transform + assembleTransform(styleCoord[0], styleCoord[1], true) + ("border-color:" + convertToColorString(nearPointColor) + ";") + (tooltipModel.get('extraCssText') || '') // If mouse occasionally move over the tooltip, a mouseout event will be // triggered by canvas, and cause some unexpectable result like dragging // stop, "unfocusAdjacency". Here `pointer-events: none` is used to solve // it. Although it is not supported by IE8~IE10, fortunately it is a rare // scenario. + (";pointer-event:" + (this._enterable ? 'auto' : 'none')); } this._show = true; this._firstShow = false; this._longHide = false; }; TooltipHTMLContent.prototype.setContent = function (content, markers, tooltipModel, borderColor, arrowPosition) { if (content == null) { return; } var el = this.el; if (isString(arrowPosition) && tooltipModel.get('trigger') === 'item' && !shouldTooltipConfine(tooltipModel)) { content += assembleArrow(tooltipModel.get('backgroundColor'), borderColor, arrowPosition); } if (isString(content)) { el.innerHTML = content; } else if (content) { // Clear previous el.innerHTML = ''; if (!isArray(content)) { content = [content]; } for (var i = 0; i < content.length; i++) { if (isDom(content[i]) && content[i].parentNode !== el) { el.appendChild(content[i]); } } } }; TooltipHTMLContent.prototype.setEnterable = function (enterable) { this._enterable = enterable; }; TooltipHTMLContent.prototype.getSize = function () { var el = this.el; return [el.clientWidth, el.clientHeight]; }; TooltipHTMLContent.prototype.moveTo = function (zrX, zrY) { var styleCoord = this._styleCoord; makeStyleCoord(styleCoord, this._zr, this._appendToBody, zrX, zrY); if (styleCoord[0] != null && styleCoord[1] != null) { var style_1 = this.el.style; var transforms = assembleTransform(styleCoord[0], styleCoord[1]); each(transforms, function (transform) { style_1[transform[0]] = transform[1]; }); } }; /** * when `alwaysShowContent` is true, * move the tooltip after chart resized */ TooltipHTMLContent.prototype._moveIfResized = function () { // The ratio of left to width var ratioX = this._styleCoord[2]; // The ratio of top to height var ratioY = this._styleCoord[3]; this.moveTo(ratioX * this._zr.getWidth(), ratioY * this._zr.getHeight()); }; TooltipHTMLContent.prototype.hide = function () { var _this = this; var style = this.el.style; style.visibility = 'hidden'; style.opacity = '0'; env.transform3dSupported && (style.willChange = ''); this._show = false; this._longHideTimeout = setTimeout(function () { return _this._longHide = true; }, 500); }; TooltipHTMLContent.prototype.hideLater = function (time) { if (this._show && !(this._inContent && this._enterable)) { if (time) { this._hideDelay = time; // Set show false to avoid invoke hideLater multiple times this._show = false; this._hideTimeout = setTimeout(bind(this.hide, this), time); } else { this.hide(); } } }; TooltipHTMLContent.prototype.isShow = function () { return this._show; }; TooltipHTMLContent.prototype.dispose = function () { this.el.parentNode.removeChild(this.el); }; TooltipHTMLContent.prototype.getOuterSize = function () { var width = this.el.clientWidth; var height = this.el.clientHeight; // Consider browser compatibility. // IE8 does not support getComputedStyle. var stl = getComputedStyle(this.el); if (stl) { width += parseInt(stl.borderLeftWidth, 10) + parseInt(stl.borderRightWidth, 10); height += parseInt(stl.borderTopWidth, 10) + parseInt(stl.borderBottomWidth, 10); } return { width: width, height: height }; }; return TooltipHTMLContent; }(); var TooltipRichContent = /** @class */ function () { function TooltipRichContent(api) { this._show = false; this._styleCoord = [0, 0, 0, 0]; this._enterable = true; this._zr = api.getZr(); makeStyleCoord$1(this._styleCoord, this._zr, api.getWidth() / 2, api.getHeight() / 2); } /** * Update when tooltip is rendered */ TooltipRichContent.prototype.update = function (tooltipModel) { var alwaysShowContent = tooltipModel.get('alwaysShowContent'); alwaysShowContent && this._moveIfResized(); }; TooltipRichContent.prototype.show = function () { if (this._hideTimeout) { clearTimeout(this._hideTimeout); } this.el.show(); this._show = true; }; /** * Set tooltip content */ TooltipRichContent.prototype.setContent = function (content, markupStyleCreator, tooltipModel, borderColor, arrowPosition) { if (isObject(content)) { throwError("development" !== 'production' ? 'Passing DOM nodes as content is not supported in richText tooltip!' : ''); } if (this.el) { this._zr.remove(this.el); } var textStyleModel = tooltipModel.getModel('textStyle'); this.el = new ZRText({ style: { rich: markupStyleCreator.richTextStyles, text: content, lineHeight: 22, backgroundColor: tooltipModel.get('backgroundColor'), borderRadius: tooltipModel.get('borderRadius'), borderWidth: 1, borderColor: borderColor, shadowColor: tooltipModel.get('shadowColor'), shadowBlur: tooltipModel.get('shadowBlur'), shadowOffsetX: tooltipModel.get('shadowOffsetX'), shadowOffsetY: tooltipModel.get('shadowOffsetY'), textShadowColor: textStyleModel.get('textShadowColor'), textShadowBlur: textStyleModel.get('textShadowBlur') || 0, textShadowOffsetX: textStyleModel.get('textShadowOffsetX') || 0, textShadowOffsetY: textStyleModel.get('textShadowOffsetY') || 0, fill: tooltipModel.get(['textStyle', 'color']), padding: getPaddingFromTooltipModel(tooltipModel, 'richText'), verticalAlign: 'top', align: 'left' }, z: tooltipModel.get('z') }); this._zr.add(this.el); var self = this; this.el.on('mouseover', function () { // clear the timeout in hideLater and keep showing tooltip if (self._enterable) { clearTimeout(self._hideTimeout); self._show = true; } self._inContent = true; }); this.el.on('mouseout', function () { if (self._enterable) { if (self._show) { self.hideLater(self._hideDelay); } } self._inContent = false; }); }; TooltipRichContent.prototype.setEnterable = function (enterable) { this._enterable = enterable; }; TooltipRichContent.prototype.getSize = function () { var el = this.el; var bounding = this.el.getBoundingRect(); // bounding rect does not include shadow. For renderMode richText, // if overflow, it will be cut. So calculate them accurately. var shadowOuterSize = calcShadowOuterSize(el.style); return [bounding.width + shadowOuterSize.left + shadowOuterSize.right, bounding.height + shadowOuterSize.top + shadowOuterSize.bottom]; }; TooltipRichContent.prototype.moveTo = function (x, y) { var el = this.el; if (el) { var styleCoord = this._styleCoord; makeStyleCoord$1(styleCoord, this._zr, x, y); x = styleCoord[0]; y = styleCoord[1]; var style = el.style; var borderWidth = mathMaxWith0(style.borderWidth || 0); var shadowOuterSize = calcShadowOuterSize(style); // rich text x, y do not include border. el.x = x + borderWidth + shadowOuterSize.left; el.y = y + borderWidth + shadowOuterSize.top; el.markRedraw(); } }; /** * when `alwaysShowContent` is true, * move the tooltip after chart resized */ TooltipRichContent.prototype._moveIfResized = function () { // The ratio of left to width var ratioX = this._styleCoord[2]; // The ratio of top to height var ratioY = this._styleCoord[3]; this.moveTo(ratioX * this._zr.getWidth(), ratioY * this._zr.getHeight()); }; TooltipRichContent.prototype.hide = function () { if (this.el) { this.el.hide(); } this._show = false; }; TooltipRichContent.prototype.hideLater = function (time) { if (this._show && !(this._inContent && this._enterable)) { if (time) { this._hideDelay = time; // Set show false to avoid invoke hideLater multiple times this._show = false; this._hideTimeout = setTimeout(bind(this.hide, this), time); } else { this.hide(); } } }; TooltipRichContent.prototype.isShow = function () { return this._show; }; TooltipRichContent.prototype.getOuterSize = function () { var size = this.getSize(); return { width: size[0], height: size[1] }; }; TooltipRichContent.prototype.dispose = function () { this._zr.remove(this.el); }; return TooltipRichContent; }(); function mathMaxWith0(val) { return Math.max(0, val); } function calcShadowOuterSize(style) { var shadowBlur = mathMaxWith0(style.shadowBlur || 0); var shadowOffsetX = mathMaxWith0(style.shadowOffsetX || 0); var shadowOffsetY = mathMaxWith0(style.shadowOffsetY || 0); return { left: mathMaxWith0(shadowBlur - shadowOffsetX), right: mathMaxWith0(shadowBlur + shadowOffsetX), top: mathMaxWith0(shadowBlur - shadowOffsetY), bottom: mathMaxWith0(shadowBlur + shadowOffsetY) }; } function makeStyleCoord$1(out, zr, zrX, zrY) { out[0] = zrX; out[1] = zrY; out[2] = out[0] / zr.getWidth(); out[3] = out[1] / zr.getHeight(); } var bind$2 = bind; var each$c = each; var parsePercent$2 = parsePercent$1; var proxyRect = new Rect({ shape: { x: -1, y: -1, width: 2, height: 2 } }); var TooltipView = /** @class */ function (_super) { __extends(TooltipView, _super); function TooltipView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = TooltipView.type; return _this; } TooltipView.prototype.init = function (ecModel, api) { if (env.node) { return; } var tooltipModel = ecModel.getComponent('tooltip'); var renderMode = tooltipModel.get('renderMode'); this._renderMode = getTooltipRenderMode(renderMode); this._tooltipContent = this._renderMode === 'richText' ? new TooltipRichContent(api) : new TooltipHTMLContent(api.getDom(), api, { appendToBody: tooltipModel.get('appendToBody', true) }); }; TooltipView.prototype.render = function (tooltipModel, ecModel, api) { if (env.node) { return; } // Reset this.group.removeAll(); this._tooltipModel = tooltipModel; this._ecModel = ecModel; this._api = api; /** * @private * @type {boolean} */ this._alwaysShowContent = tooltipModel.get('alwaysShowContent'); var tooltipContent = this._tooltipContent; tooltipContent.update(tooltipModel); tooltipContent.setEnterable(tooltipModel.get('enterable')); this._initGlobalListener(); this._keepShow(); }; TooltipView.prototype._initGlobalListener = function () { var tooltipModel = this._tooltipModel; var triggerOn = tooltipModel.get('triggerOn'); register('itemTooltip', this._api, bind$2(function (currTrigger, e, dispatchAction) { // If 'none', it is not controlled by mouse totally. if (triggerOn !== 'none') { if (triggerOn.indexOf(currTrigger) >= 0) { this._tryShow(e, dispatchAction); } else if (currTrigger === 'leave') { this._hide(dispatchAction); } } }, this)); }; TooltipView.prototype._keepShow = function () { var tooltipModel = this._tooltipModel; var ecModel = this._ecModel; var api = this._api; // Try to keep the tooltip show when refreshing if (this._lastX != null && this._lastY != null // When user is willing to control tooltip totally using API, // self.manuallyShowTip({x, y}) might cause tooltip hide, // which is not expected. && tooltipModel.get('triggerOn') !== 'none') { var self_1 = this; clearTimeout(this._refreshUpdateTimeout); this._refreshUpdateTimeout = setTimeout(function () { // Show tip next tick after other charts are rendered // In case highlight action has wrong result // FIXME !api.isDisposed() && self_1.manuallyShowTip(tooltipModel, ecModel, api, { x: self_1._lastX, y: self_1._lastY, dataByCoordSys: self_1._lastDataByCoordSys }); }); } }; /** * Show tip manually by * dispatchAction({ * type: 'showTip', * x: 10, * y: 10 * }); * Or * dispatchAction({ * type: 'showTip', * seriesIndex: 0, * dataIndex or dataIndexInside or name * }); * * TODO Batch */ TooltipView.prototype.manuallyShowTip = function (tooltipModel, ecModel, api, payload) { if (payload.from === this.uid || env.node) { return; } var dispatchAction = makeDispatchAction$1(payload, api); // Reset ticket this._ticket = ''; // When triggered from axisPointer. var dataByCoordSys = payload.dataByCoordSys; var cmptRef = findComponentReference(payload, ecModel, api); if (cmptRef) { var rect = cmptRef.el.getBoundingRect().clone(); rect.applyTransform(cmptRef.el.transform); this._tryShow({ offsetX: rect.x + rect.width / 2, offsetY: rect.y + rect.height / 2, target: cmptRef.el, position: payload.position, // When manully trigger, the mouse is not on the el, so we'd better to // position tooltip on the bottom of the el and display arrow is possible. positionDefault: 'bottom' }, dispatchAction); } else if (payload.tooltip && payload.x != null && payload.y != null) { var el = proxyRect; el.x = payload.x; el.y = payload.y; el.update(); getECData(el).tooltipConfig = { name: null, option: payload.tooltip }; // Manually show tooltip while view is not using zrender elements. this._tryShow({ offsetX: payload.x, offsetY: payload.y, target: el }, dispatchAction); } else if (dataByCoordSys) { this._tryShow({ offsetX: payload.x, offsetY: payload.y, position: payload.position, dataByCoordSys: dataByCoordSys, tooltipOption: payload.tooltipOption }, dispatchAction); } else if (payload.seriesIndex != null) { if (this._manuallyAxisShowTip(tooltipModel, ecModel, api, payload)) { return; } var pointInfo = findPointFromSeries(payload, ecModel); var cx = pointInfo.point[0]; var cy = pointInfo.point[1]; if (cx != null && cy != null) { this._tryShow({ offsetX: cx, offsetY: cy, target: pointInfo.el, position: payload.position, // When manully trigger, the mouse is not on the el, so we'd better to // position tooltip on the bottom of the el and display arrow is possible. positionDefault: 'bottom' }, dispatchAction); } } else if (payload.x != null && payload.y != null) { // FIXME // should wrap dispatchAction like `axisPointer/globalListener` ? api.dispatchAction({ type: 'updateAxisPointer', x: payload.x, y: payload.y }); this._tryShow({ offsetX: payload.x, offsetY: payload.y, position: payload.position, target: api.getZr().findHover(payload.x, payload.y).target }, dispatchAction); } }; TooltipView.prototype.manuallyHideTip = function (tooltipModel, ecModel, api, payload) { var tooltipContent = this._tooltipContent; if (!this._alwaysShowContent && this._tooltipModel) { tooltipContent.hideLater(this._tooltipModel.get('hideDelay')); } this._lastX = this._lastY = this._lastDataByCoordSys = null; if (payload.from !== this.uid) { this._hide(makeDispatchAction$1(payload, api)); } }; // Be compatible with previous design, that is, when tooltip.type is 'axis' and // dispatchAction 'showTip' with seriesIndex and dataIndex will trigger axis pointer // and tooltip. TooltipView.prototype._manuallyAxisShowTip = function (tooltipModel, ecModel, api, payload) { var seriesIndex = payload.seriesIndex; var dataIndex = payload.dataIndex; // @ts-ignore var coordSysAxesInfo = ecModel.getComponent('axisPointer').coordSysAxesInfo; if (seriesIndex == null || dataIndex == null || coordSysAxesInfo == null) { return; } var seriesModel = ecModel.getSeriesByIndex(seriesIndex); if (!seriesModel) { return; } var data = seriesModel.getData(); var tooltipCascadedModel = buildTooltipModel([data.getItemModel(dataIndex), seriesModel, (seriesModel.coordinateSystem || {}).model], this._tooltipModel); if (tooltipCascadedModel.get('trigger') !== 'axis') { return; } api.dispatchAction({ type: 'updateAxisPointer', seriesIndex: seriesIndex, dataIndex: dataIndex, position: payload.position }); return true; }; TooltipView.prototype._tryShow = function (e, dispatchAction) { var el = e.target; var tooltipModel = this._tooltipModel; if (!tooltipModel) { return; } // Save mouse x, mouse y. So we can try to keep showing the tip if chart is refreshed this._lastX = e.offsetX; this._lastY = e.offsetY; var dataByCoordSys = e.dataByCoordSys; if (dataByCoordSys && dataByCoordSys.length) { this._showAxisTooltip(dataByCoordSys, e); } else if (el) { this._lastDataByCoordSys = null; var seriesDispatcher_1; var cmptDispatcher_1; findEventDispatcher(el, function (target) { // Always show item tooltip if mouse is on the element with dataIndex if (getECData(target).dataIndex != null) { seriesDispatcher_1 = target; return true; } // Tooltip provided directly. Like legend. if (getECData(target).tooltipConfig != null) { cmptDispatcher_1 = target; return true; } }, true); if (seriesDispatcher_1) { this._showSeriesItemTooltip(e, seriesDispatcher_1, dispatchAction); } else if (cmptDispatcher_1) { this._showComponentItemTooltip(e, cmptDispatcher_1, dispatchAction); } else { this._hide(dispatchAction); } } else { this._lastDataByCoordSys = null; this._hide(dispatchAction); } }; TooltipView.prototype._showOrMove = function (tooltipModel, cb) { // showDelay is used in this case: tooltip.enterable is set // as true. User intent to move mouse into tooltip and click // something. `showDelay` makes it easier to enter the content // but tooltip do not move immediately. var delay = tooltipModel.get('showDelay'); cb = bind(cb, this); clearTimeout(this._showTimout); delay > 0 ? this._showTimout = setTimeout(cb, delay) : cb(); }; TooltipView.prototype._showAxisTooltip = function (dataByCoordSys, e) { var ecModel = this._ecModel; var globalTooltipModel = this._tooltipModel; var point = [e.offsetX, e.offsetY]; var singleTooltipModel = buildTooltipModel([e.tooltipOption], globalTooltipModel); var renderMode = this._renderMode; var cbParamsList = []; var articleMarkup = createTooltipMarkup('section', { blocks: [], noHeader: true }); // Only for legacy: `Serise['formatTooltip']` returns a string. var markupTextArrLegacy = []; var markupStyleCreator = new TooltipMarkupStyleCreator(); each$c(dataByCoordSys, function (itemCoordSys) { each$c(itemCoordSys.dataByAxis, function (axisItem) { var axisModel = ecModel.getComponent(axisItem.axisDim + 'Axis', axisItem.axisIndex); var axisValue = axisItem.value; if (!axisModel || axisValue == null) { return; } var axisValueLabel = getValueLabel(axisValue, axisModel.axis, ecModel, axisItem.seriesDataIndices, axisItem.valueLabelOpt); var axisSectionMarkup = createTooltipMarkup('section', { header: axisValueLabel, noHeader: !trim(axisValueLabel), sortBlocks: true, blocks: [] }); articleMarkup.blocks.push(axisSectionMarkup); each(axisItem.seriesDataIndices, function (idxItem) { var series = ecModel.getSeriesByIndex(idxItem.seriesIndex); var dataIndex = idxItem.dataIndexInside; var cbParams = series.getDataParams(dataIndex); cbParams.axisDim = axisItem.axisDim; cbParams.axisIndex = axisItem.axisIndex; cbParams.axisType = axisItem.axisType; cbParams.axisId = axisItem.axisId; cbParams.axisValue = getAxisRawValue(axisModel.axis, { value: axisValue }); cbParams.axisValueLabel = axisValueLabel; // Pre-create marker style for makers. Users can assemble richText // text in `formatter` callback and use those markers style. cbParams.marker = markupStyleCreator.makeTooltipMarker('item', convertToColorString(cbParams.color), renderMode); var seriesTooltipResult = normalizeTooltipFormatResult(series.formatTooltip(dataIndex, true, null)); if (seriesTooltipResult.markupFragment) { axisSectionMarkup.blocks.push(seriesTooltipResult.markupFragment); } if (seriesTooltipResult.markupText) { markupTextArrLegacy.push(seriesTooltipResult.markupText); } cbParamsList.push(cbParams); }); }); }); // In most cases, the second axis is displays upper on the first one. // So we reverse it to look better. articleMarkup.blocks.reverse(); markupTextArrLegacy.reverse(); var positionExpr = e.position; var orderMode = singleTooltipModel.get('order'); var builtMarkupText = buildTooltipMarkup(articleMarkup, markupStyleCreator, renderMode, orderMode, ecModel.get('useUTC'), singleTooltipModel.get('textStyle')); builtMarkupText && markupTextArrLegacy.unshift(builtMarkupText); var blockBreak = renderMode === 'richText' ? '\n\n' : '
'; var allMarkupText = markupTextArrLegacy.join(blockBreak); this._showOrMove(singleTooltipModel, function () { if (this._updateContentNotChangedOnAxis(dataByCoordSys)) { this._updatePosition(singleTooltipModel, positionExpr, point[0], point[1], this._tooltipContent, cbParamsList); } else { this._showTooltipContent(singleTooltipModel, allMarkupText, cbParamsList, Math.random() + '', point[0], point[1], positionExpr, null, markupStyleCreator); } }); // Do not trigger events here, because this branch only be entered // from dispatchAction. }; TooltipView.prototype._showSeriesItemTooltip = function (e, dispatcher, dispatchAction) { var ecModel = this._ecModel; var ecData = getECData(dispatcher); // Use dataModel in element if possible // Used when mouseover on a element like markPoint or edge // In which case, the data is not main data in series. var seriesIndex = ecData.seriesIndex; var seriesModel = ecModel.getSeriesByIndex(seriesIndex); // For example, graph link. var dataModel = ecData.dataModel || seriesModel; var dataIndex = ecData.dataIndex; var dataType = ecData.dataType; var data = dataModel.getData(dataType); var renderMode = this._renderMode; var positionDefault = e.positionDefault; var tooltipModel = buildTooltipModel([data.getItemModel(dataIndex), dataModel, seriesModel && (seriesModel.coordinateSystem || {}).model], this._tooltipModel, positionDefault ? { position: positionDefault } : null); var tooltipTrigger = tooltipModel.get('trigger'); if (tooltipTrigger != null && tooltipTrigger !== 'item') { return; } var params = dataModel.getDataParams(dataIndex, dataType); var markupStyleCreator = new TooltipMarkupStyleCreator(); // Pre-create marker style for makers. Users can assemble richText // text in `formatter` callback and use those markers style. params.marker = markupStyleCreator.makeTooltipMarker('item', convertToColorString(params.color), renderMode); var seriesTooltipResult = normalizeTooltipFormatResult(dataModel.formatTooltip(dataIndex, false, dataType)); var orderMode = tooltipModel.get('order'); var markupText = seriesTooltipResult.markupFragment ? buildTooltipMarkup(seriesTooltipResult.markupFragment, markupStyleCreator, renderMode, orderMode, ecModel.get('useUTC'), tooltipModel.get('textStyle')) : seriesTooltipResult.markupText; var asyncTicket = 'item_' + dataModel.name + '_' + dataIndex; this._showOrMove(tooltipModel, function () { this._showTooltipContent(tooltipModel, markupText, params, asyncTicket, e.offsetX, e.offsetY, e.position, e.target, markupStyleCreator); }); // FIXME // duplicated showtip if manuallyShowTip is called from dispatchAction. dispatchAction({ type: 'showTip', dataIndexInside: dataIndex, dataIndex: data.getRawIndex(dataIndex), seriesIndex: seriesIndex, from: this.uid }); }; TooltipView.prototype._showComponentItemTooltip = function (e, el, dispatchAction) { var ecData = getECData(el); var tooltipConfig = ecData.tooltipConfig; var tooltipOpt = tooltipConfig.option; if (isString(tooltipOpt)) { var content = tooltipOpt; tooltipOpt = { content: content, // Fixed formatter formatter: content }; } var tooltipModelCascade = [tooltipOpt]; var cmpt = this._ecModel.getComponent(ecData.componentMainType, ecData.componentIndex); if (cmpt) { tooltipModelCascade.push(cmpt); } var positionDefault = e.positionDefault; var subTooltipModel = buildTooltipModel(tooltipModelCascade, this._tooltipModel, positionDefault ? { position: positionDefault } : null); var defaultHtml = subTooltipModel.get('content'); var asyncTicket = Math.random() + ''; // PENDING: this case do not support richText style yet. var markupStyleCreator = new TooltipMarkupStyleCreator(); // Do not check whether `trigger` is 'none' here, because `trigger` // only works on coordinate system. In fact, we have not found case // that requires setting `trigger` nothing on component yet. this._showOrMove(subTooltipModel, function () { // Use formatterParams from element defined in component // Avoid users modify it. var formatterParams = clone(subTooltipModel.get('formatterParams') || {}); this._showTooltipContent(subTooltipModel, defaultHtml, formatterParams, asyncTicket, e.offsetX, e.offsetY, e.position, el, markupStyleCreator); }); // If not dispatch showTip, tip may be hide triggered by axis. dispatchAction({ type: 'showTip', from: this.uid }); }; TooltipView.prototype._showTooltipContent = function ( // Use Model insteadof TooltipModel because this model may be from series or other options. // Instead of top level tooltip. tooltipModel, defaultHtml, params, asyncTicket, x, y, positionExpr, el, markupStyleCreator) { // Reset ticket this._ticket = ''; if (!tooltipModel.get('showContent') || !tooltipModel.get('show')) { return; } var tooltipContent = this._tooltipContent; var formatter = tooltipModel.get('formatter'); positionExpr = positionExpr || tooltipModel.get('position'); var html = defaultHtml; var nearPoint = this._getNearestPoint([x, y], params, tooltipModel.get('trigger'), tooltipModel.get('borderColor')); var nearPointColor = nearPoint.color; if (formatter && isString(formatter)) { var useUTC = tooltipModel.ecModel.get('useUTC'); var params0 = isArray(params) ? params[0] : params; var isTimeAxis = params0 && params0.axisType && params0.axisType.indexOf('time') >= 0; html = formatter; if (isTimeAxis) { html = format(params0.axisValue, html, useUTC); } html = formatTpl(html, params, true); } else if (isFunction(formatter)) { var callback = bind$2(function (cbTicket, html) { if (cbTicket === this._ticket) { tooltipContent.setContent(html, markupStyleCreator, tooltipModel, nearPointColor, positionExpr); this._updatePosition(tooltipModel, positionExpr, x, y, tooltipContent, params, el); } }, this); this._ticket = asyncTicket; html = formatter(params, asyncTicket, callback); } tooltipContent.setContent(html, markupStyleCreator, tooltipModel, nearPointColor, positionExpr); tooltipContent.show(tooltipModel, nearPointColor); this._updatePosition(tooltipModel, positionExpr, x, y, tooltipContent, params, el); }; TooltipView.prototype._getNearestPoint = function (point, tooltipDataParams, trigger, borderColor) { if (trigger === 'axis' || isArray(tooltipDataParams)) { return { color: borderColor || (this._renderMode === 'html' ? '#fff' : 'none') }; } if (!isArray(tooltipDataParams)) { return { color: borderColor || tooltipDataParams.color || tooltipDataParams.borderColor }; } }; TooltipView.prototype._updatePosition = function (tooltipModel, positionExpr, x, // Mouse x y, // Mouse y content, params, el) { var viewWidth = this._api.getWidth(); var viewHeight = this._api.getHeight(); positionExpr = positionExpr || tooltipModel.get('position'); var contentSize = content.getSize(); var align = tooltipModel.get('align'); var vAlign = tooltipModel.get('verticalAlign'); var rect = el && el.getBoundingRect().clone(); el && rect.applyTransform(el.transform); if (isFunction(positionExpr)) { // Callback of position can be an array or a string specify the position positionExpr = positionExpr([x, y], params, content.el, rect, { viewSize: [viewWidth, viewHeight], contentSize: contentSize.slice() }); } if (isArray(positionExpr)) { x = parsePercent$2(positionExpr[0], viewWidth); y = parsePercent$2(positionExpr[1], viewHeight); } else if (isObject(positionExpr)) { var boxLayoutPosition = positionExpr; boxLayoutPosition.width = contentSize[0]; boxLayoutPosition.height = contentSize[1]; var layoutRect = getLayoutRect(boxLayoutPosition, { width: viewWidth, height: viewHeight }); x = layoutRect.x; y = layoutRect.y; align = null; // When positionExpr is left/top/right/bottom, // align and verticalAlign will not work. vAlign = null; } // Specify tooltip position by string 'top' 'bottom' 'left' 'right' around graphic element else if (isString(positionExpr) && el) { var pos = calcTooltipPosition(positionExpr, rect, contentSize); x = pos[0]; y = pos[1]; } else { var pos = refixTooltipPosition(x, y, content, viewWidth, viewHeight, align ? null : 20, vAlign ? null : 20); x = pos[0]; y = pos[1]; } align && (x -= isCenterAlign(align) ? contentSize[0] / 2 : align === 'right' ? contentSize[0] : 0); vAlign && (y -= isCenterAlign(vAlign) ? contentSize[1] / 2 : vAlign === 'bottom' ? contentSize[1] : 0); if (shouldTooltipConfine(tooltipModel)) { var pos = confineTooltipPosition(x, y, content, viewWidth, viewHeight); x = pos[0]; y = pos[1]; } content.moveTo(x, y); }; // FIXME // Should we remove this but leave this to user? TooltipView.prototype._updateContentNotChangedOnAxis = function (dataByCoordSys) { var lastCoordSys = this._lastDataByCoordSys; var contentNotChanged = !!lastCoordSys && lastCoordSys.length === dataByCoordSys.length; contentNotChanged && each$c(lastCoordSys, function (lastItemCoordSys, indexCoordSys) { var lastDataByAxis = lastItemCoordSys.dataByAxis || []; var thisItemCoordSys = dataByCoordSys[indexCoordSys] || {}; var thisDataByAxis = thisItemCoordSys.dataByAxis || []; contentNotChanged = contentNotChanged && lastDataByAxis.length === thisDataByAxis.length; contentNotChanged && each$c(lastDataByAxis, function (lastItem, indexAxis) { var thisItem = thisDataByAxis[indexAxis] || {}; var lastIndices = lastItem.seriesDataIndices || []; var newIndices = thisItem.seriesDataIndices || []; contentNotChanged = contentNotChanged && lastItem.value === thisItem.value && lastItem.axisType === thisItem.axisType && lastItem.axisId === thisItem.axisId && lastIndices.length === newIndices.length; contentNotChanged && each$c(lastIndices, function (lastIdxItem, j) { var newIdxItem = newIndices[j]; contentNotChanged = contentNotChanged && lastIdxItem.seriesIndex === newIdxItem.seriesIndex && lastIdxItem.dataIndex === newIdxItem.dataIndex; }); }); }); this._lastDataByCoordSys = dataByCoordSys; return !!contentNotChanged; }; TooltipView.prototype._hide = function (dispatchAction) { // Do not directly hideLater here, because this behavior may be prevented // in dispatchAction when showTip is dispatched. // FIXME // duplicated hideTip if manuallyHideTip is called from dispatchAction. this._lastDataByCoordSys = null; dispatchAction({ type: 'hideTip', from: this.uid }); }; TooltipView.prototype.dispose = function (ecModel, api) { if (env.node) { return; } this._tooltipContent.dispose(); unregister('itemTooltip', api); }; TooltipView.type = 'tooltip'; return TooltipView; }(ComponentView); /** * From top to bottom. (the last one should be globalTooltipModel); */ function buildTooltipModel(modelCascade, globalTooltipModel, defaultTooltipOption) { // Last is always tooltip model. var ecModel = globalTooltipModel.ecModel; var resultModel; if (defaultTooltipOption) { resultModel = new Model(defaultTooltipOption, ecModel, ecModel); resultModel = new Model(globalTooltipModel.option, resultModel, ecModel); } else { resultModel = globalTooltipModel; } for (var i = modelCascade.length - 1; i >= 0; i--) { var tooltipOpt = modelCascade[i]; if (tooltipOpt) { if (tooltipOpt instanceof Model) { tooltipOpt = tooltipOpt.get('tooltip', true); } // In each data item tooltip can be simply write: // { // value: 10, // tooltip: 'Something you need to know' // } if (isString(tooltipOpt)) { tooltipOpt = { formatter: tooltipOpt }; } if (tooltipOpt) { resultModel = new Model(tooltipOpt, resultModel, ecModel); } } } return resultModel; } function makeDispatchAction$1(payload, api) { return payload.dispatchAction || bind(api.dispatchAction, api); } function refixTooltipPosition(x, y, content, viewWidth, viewHeight, gapH, gapV) { var size = content.getOuterSize(); var width = size.width; var height = size.height; if (gapH != null) { // Add extra 2 pixels for this case: // At present the "values" in defaut tooltip are using CSS `float: right`. // When the right edge of the tooltip box is on the right side of the // viewport, the `float` layout might push the "values" to the second line. if (x + width + gapH + 2 > viewWidth) { x -= width + gapH; } else { x += gapH; } } if (gapV != null) { if (y + height + gapV > viewHeight) { y -= height + gapV; } else { y += gapV; } } return [x, y]; } function confineTooltipPosition(x, y, content, viewWidth, viewHeight) { var size = content.getOuterSize(); var width = size.width; var height = size.height; x = Math.min(x + width, viewWidth) - width; y = Math.min(y + height, viewHeight) - height; x = Math.max(x, 0); y = Math.max(y, 0); return [x, y]; } function calcTooltipPosition(position, rect, contentSize) { var domWidth = contentSize[0]; var domHeight = contentSize[1]; var gap = 10; var offset = 5; var x = 0; var y = 0; var rectWidth = rect.width; var rectHeight = rect.height; switch (position) { case 'inside': x = rect.x + rectWidth / 2 - domWidth / 2; y = rect.y + rectHeight / 2 - domHeight / 2; break; case 'top': x = rect.x + rectWidth / 2 - domWidth / 2; y = rect.y - domHeight - gap; break; case 'bottom': x = rect.x + rectWidth / 2 - domWidth / 2; y = rect.y + rectHeight + gap; break; case 'left': x = rect.x - domWidth - gap - offset; y = rect.y + rectHeight / 2 - domHeight / 2; break; case 'right': x = rect.x + rectWidth + gap + offset; y = rect.y + rectHeight / 2 - domHeight / 2; } return [x, y]; } function isCenterAlign(align) { return align === 'center' || align === 'middle'; } /** * Find target component by payload like: * ```js * { legendId: 'some_id', name: 'xxx' } * { toolboxIndex: 1, name: 'xxx' } * { geoName: 'some_name', name: 'xxx' } * ``` * PENDING: at present only * * If not found, return null/undefined. */ function findComponentReference(payload, ecModel, api) { var queryOptionMap = preParseFinder(payload).queryOptionMap; var componentMainType = queryOptionMap.keys()[0]; if (!componentMainType || componentMainType === 'series') { return; } var queryResult = queryReferringComponents(ecModel, componentMainType, queryOptionMap.get(componentMainType), { useDefault: false, enableAll: false, enableNone: false }); var model = queryResult.models[0]; if (!model) { return; } var view = api.getViewOfComponentModel(model); var el; view.group.traverse(function (subEl) { var tooltipConfig = getECData(subEl).tooltipConfig; if (tooltipConfig && tooltipConfig.name === payload.name) { el = subEl; return true; // stop } }); if (el) { return { componentMainType: componentMainType, componentIndex: model.componentIndex, el: el }; } } function install$A(registers) { use(install$s); registers.registerComponentModel(TooltipModel); registers.registerComponentView(TooltipView); /** * @action * @property {string} type * @property {number} seriesIndex * @property {number} dataIndex * @property {number} [x] * @property {number} [y] */ registers.registerAction({ type: 'showTip', event: 'showTip', update: 'tooltip:manuallyShowTip' }, // noop function () {}); registers.registerAction({ type: 'hideTip', event: 'hideTip', update: 'tooltip:manuallyHideTip' }, // noop function () {}); } var DEFAULT_TOOLBOX_BTNS = ['rect', 'polygon', 'keep', 'clear']; function brushPreprocessor(option, isNew) { var brushComponents = normalizeToArray(option ? option.brush : []); if (!brushComponents.length) { return; } var brushComponentSpecifiedBtns = []; each(brushComponents, function (brushOpt) { var tbs = brushOpt.hasOwnProperty('toolbox') ? brushOpt.toolbox : []; if (tbs instanceof Array) { brushComponentSpecifiedBtns = brushComponentSpecifiedBtns.concat(tbs); } }); var toolbox = option && option.toolbox; if (isArray(toolbox)) { toolbox = toolbox[0]; } if (!toolbox) { toolbox = { feature: {} }; option.toolbox = [toolbox]; } var toolboxFeature = toolbox.feature || (toolbox.feature = {}); var toolboxBrush = toolboxFeature.brush || (toolboxFeature.brush = {}); var brushTypes = toolboxBrush.type || (toolboxBrush.type = []); brushTypes.push.apply(brushTypes, brushComponentSpecifiedBtns); removeDuplicate(brushTypes); if (isNew && !brushTypes.length) { brushTypes.push.apply(brushTypes, DEFAULT_TOOLBOX_BTNS); } } function removeDuplicate(arr) { var map = {}; each(arr, function (val) { map[val] = 1; }); arr.length = 0; each(map, function (flag, val) { arr.push(val); }); } var each$d = each; function hasKeys(obj) { if (obj) { for (var name_1 in obj) { if (obj.hasOwnProperty(name_1)) { return true; } } } } function createVisualMappings(option, stateList, supplementVisualOption) { var visualMappings = {}; each$d(stateList, function (state) { var mappings = visualMappings[state] = createMappings(); each$d(option[state], function (visualData, visualType) { if (!VisualMapping.isValidType(visualType)) { return; } var mappingOption = { type: visualType, visual: visualData }; supplementVisualOption && supplementVisualOption(mappingOption, state); mappings[visualType] = new VisualMapping(mappingOption); // Prepare a alpha for opacity, for some case that opacity // is not supported, such as rendering using gradient color. if (visualType === 'opacity') { mappingOption = clone(mappingOption); mappingOption.type = 'colorAlpha'; mappings.__hidden.__alphaForOpacity = new VisualMapping(mappingOption); } }); }); return visualMappings; function createMappings() { var Creater = function () {}; // Make sure hidden fields will not be visited by // object iteration (with hasOwnProperty checking). Creater.prototype.__hidden = Creater.prototype; var obj = new Creater(); return obj; } } function replaceVisualOption(thisOption, newOption, keys) { // Visual attributes merge is not supported, otherwise it // brings overcomplicated merge logic. See #2853. So if // newOption has anyone of these keys, all of these keys // will be reset. Otherwise, all keys remain. var has; each(keys, function (key) { if (newOption.hasOwnProperty(key) && hasKeys(newOption[key])) { has = true; } }); has && each(keys, function (key) { if (newOption.hasOwnProperty(key) && hasKeys(newOption[key])) { thisOption[key] = clone(newOption[key]); } else { delete thisOption[key]; } }); } /** * @param stateList * @param visualMappings * @param list * @param getValueState param: valueOrIndex, return: state. * @param scope Scope for getValueState * @param dimension Concrete dimension, if used. */ // ???! handle brush? function applyVisual(stateList, visualMappings, data, getValueState, scope, dimension) { var visualTypesMap = {}; each(stateList, function (state) { var visualTypes = VisualMapping.prepareVisualTypes(visualMappings[state]); visualTypesMap[state] = visualTypes; }); var dataIndex; function getVisual(key) { return getItemVisualFromData(data, dataIndex, key); } function setVisual(key, value) { setItemVisualFromData(data, dataIndex, key, value); } if (dimension == null) { data.each(eachItem); } else { data.each([dimension], eachItem); } function eachItem(valueOrIndex, index) { dataIndex = dimension == null ? valueOrIndex // First argument is index : index; var rawDataItem = data.getRawDataItem(dataIndex); // Consider performance // @ts-ignore if (rawDataItem && rawDataItem.visualMap === false) { return; } var valueState = getValueState.call(scope, valueOrIndex); var mappings = visualMappings[valueState]; var visualTypes = visualTypesMap[valueState]; for (var i = 0, len = visualTypes.length; i < len; i++) { var type = visualTypes[i]; mappings[type] && mappings[type].applyVisual(valueOrIndex, getVisual, setVisual); } } } /** * @param data * @param stateList * @param visualMappings > * @param getValueState param: valueOrIndex, return: state. * @param dim dimension or dimension index. */ function incrementalApplyVisual(stateList, visualMappings, getValueState, dim) { var visualTypesMap = {}; each(stateList, function (state) { var visualTypes = VisualMapping.prepareVisualTypes(visualMappings[state]); visualTypesMap[state] = visualTypes; }); return { progress: function progress(params, data) { var dimName; if (dim != null) { dimName = data.getDimension(dim); } function getVisual(key) { return getItemVisualFromData(data, dataIndex, key); } function setVisual(key, value) { setItemVisualFromData(data, dataIndex, key, value); } var dataIndex; while ((dataIndex = params.next()) != null) { var rawDataItem = data.getRawDataItem(dataIndex); // Consider performance // @ts-ignore if (rawDataItem && rawDataItem.visualMap === false) { continue; } var value = dim != null ? data.get(dimName, dataIndex) : dataIndex; var valueState = getValueState(value); var mappings = visualMappings[valueState]; var visualTypes = visualTypesMap[valueState]; for (var i = 0, len = visualTypes.length; i < len; i++) { var type = visualTypes[i]; mappings[type] && mappings[type].applyVisual(value, getVisual, setVisual); } } } }; } function makeBrushCommonSelectorForSeries(area) { var brushType = area.brushType; // Do not use function binding or curry for performance. var selectors = { point: function (itemLayout) { return selector[brushType].point(itemLayout, selectors, area); }, rect: function (itemLayout) { return selector[brushType].rect(itemLayout, selectors, area); } }; return selectors; } var selector = { lineX: getLineSelectors(0), lineY: getLineSelectors(1), rect: { point: function (itemLayout, selectors, area) { return itemLayout && area.boundingRect.contain(itemLayout[0], itemLayout[1]); }, rect: function (itemLayout, selectors, area) { return itemLayout && area.boundingRect.intersect(itemLayout); } }, polygon: { point: function (itemLayout, selectors, area) { return itemLayout && area.boundingRect.contain(itemLayout[0], itemLayout[1]) && contain$1(area.range, itemLayout[0], itemLayout[1]); }, rect: function (itemLayout, selectors, area) { var points = area.range; if (!itemLayout || points.length <= 1) { return false; } var x = itemLayout.x; var y = itemLayout.y; var width = itemLayout.width; var height = itemLayout.height; var p = points[0]; if (contain$1(points, x, y) || contain$1(points, x + width, y) || contain$1(points, x, y + height) || contain$1(points, x + width, y + height) || BoundingRect.create(itemLayout).contain(p[0], p[1]) || linePolygonIntersect(x, y, x + width, y, points) || linePolygonIntersect(x, y, x, y + height, points) || linePolygonIntersect(x + width, y, x + width, y + height, points) || linePolygonIntersect(x, y + height, x + width, y + height, points)) { return true; } } } }; function getLineSelectors(xyIndex) { var xy = ['x', 'y']; var wh = ['width', 'height']; return { point: function (itemLayout, selectors, area) { if (itemLayout) { var range = area.range; var p = itemLayout[xyIndex]; return inLineRange(p, range); } }, rect: function (itemLayout, selectors, area) { if (itemLayout) { var range = area.range; var layoutRange = [itemLayout[xy[xyIndex]], itemLayout[xy[xyIndex]] + itemLayout[wh[xyIndex]]]; layoutRange[1] < layoutRange[0] && layoutRange.reverse(); return inLineRange(layoutRange[0], range) || inLineRange(layoutRange[1], range) || inLineRange(range[0], layoutRange) || inLineRange(range[1], layoutRange); } } }; } function inLineRange(p, range) { return range[0] <= p && p <= range[1]; } var STATE_LIST = ['inBrush', 'outOfBrush']; var DISPATCH_METHOD = '__ecBrushSelect'; var DISPATCH_FLAG = '__ecInBrushSelectEvent'; function layoutCovers(ecModel) { ecModel.eachComponent({ mainType: 'brush' }, function (brushModel) { var brushTargetManager = brushModel.brushTargetManager = new BrushTargetManager(brushModel.option, ecModel); brushTargetManager.setInputRanges(brushModel.areas, ecModel); }); } /** * Register the visual encoding if this modules required. */ function brushVisual(ecModel, api, payload) { var brushSelected = []; var throttleType; var throttleDelay; ecModel.eachComponent({ mainType: 'brush' }, function (brushModel) { payload && payload.type === 'takeGlobalCursor' && brushModel.setBrushOption(payload.key === 'brush' ? payload.brushOption : { brushType: false }); }); layoutCovers(ecModel); ecModel.eachComponent({ mainType: 'brush' }, function (brushModel, brushIndex) { var thisBrushSelected = { brushId: brushModel.id, brushIndex: brushIndex, brushName: brushModel.name, areas: clone(brushModel.areas), selected: [] }; // Every brush component exists in event params, convenient // for user to find by index. brushSelected.push(thisBrushSelected); var brushOption = brushModel.option; var brushLink = brushOption.brushLink; var linkedSeriesMap = []; var selectedDataIndexForLink = []; var rangeInfoBySeries = []; var hasBrushExists = false; if (!brushIndex) { // Only the first throttle setting works. throttleType = brushOption.throttleType; throttleDelay = brushOption.throttleDelay; } // Add boundingRect and selectors to range. var areas = map(brushModel.areas, function (area) { var builder = boundingRectBuilders[area.brushType]; var selectableArea = defaults({ boundingRect: builder ? builder(area) : void 0 }, area); selectableArea.selectors = makeBrushCommonSelectorForSeries(selectableArea); return selectableArea; }); var visualMappings = createVisualMappings(brushModel.option, STATE_LIST, function (mappingOption) { mappingOption.mappingMethod = 'fixed'; }); isArray(brushLink) && each(brushLink, function (seriesIndex) { linkedSeriesMap[seriesIndex] = 1; }); function linkOthers(seriesIndex) { return brushLink === 'all' || !!linkedSeriesMap[seriesIndex]; } // If no supported brush or no brush on the series, // all visuals should be in original state. function brushed(rangeInfoList) { return !!rangeInfoList.length; } /** * Logic for each series: (If the logic has to be modified one day, do it carefully!) * * ( brushed ┬ && ┬hasBrushExist ┬ && linkOthers ) => StepA: ┬record, ┬ StepB: ┬visualByRecord. * !brushed┘ ├hasBrushExist ┤ └nothing,┘ ├visualByRecord. * └!hasBrushExist┘ └nothing. * ( !brushed && ┬hasBrushExist ┬ && linkOthers ) => StepA: nothing, StepB: ┬visualByRecord. * └!hasBrushExist┘ └nothing. * ( brushed ┬ && !linkOthers ) => StepA: nothing, StepB: ┬visualByCheck. * !brushed┘ └nothing. * ( !brushed && !linkOthers ) => StepA: nothing, StepB: nothing. */ // Step A ecModel.eachSeries(function (seriesModel, seriesIndex) { var rangeInfoList = rangeInfoBySeries[seriesIndex] = []; seriesModel.subType === 'parallel' ? stepAParallel(seriesModel, seriesIndex) : stepAOthers(seriesModel, seriesIndex, rangeInfoList); }); function stepAParallel(seriesModel, seriesIndex) { var coordSys = seriesModel.coordinateSystem; hasBrushExists = hasBrushExists || coordSys.hasAxisBrushed(); linkOthers(seriesIndex) && coordSys.eachActiveState(seriesModel.getData(), function (activeState, dataIndex) { activeState === 'active' && (selectedDataIndexForLink[dataIndex] = 1); }); } function stepAOthers(seriesModel, seriesIndex, rangeInfoList) { if (!seriesModel.brushSelector || brushModelNotControll(brushModel, seriesIndex)) { return; } each(areas, function (area) { if (brushModel.brushTargetManager.controlSeries(area, seriesModel, ecModel)) { rangeInfoList.push(area); } hasBrushExists = hasBrushExists || brushed(rangeInfoList); }); if (linkOthers(seriesIndex) && brushed(rangeInfoList)) { var data_1 = seriesModel.getData(); data_1.each(function (dataIndex) { if (checkInRange(seriesModel, rangeInfoList, data_1, dataIndex)) { selectedDataIndexForLink[dataIndex] = 1; } }); } } // Step B ecModel.eachSeries(function (seriesModel, seriesIndex) { var seriesBrushSelected = { seriesId: seriesModel.id, seriesIndex: seriesIndex, seriesName: seriesModel.name, dataIndex: [] }; // Every series exists in event params, convenient // for user to find series by seriesIndex. thisBrushSelected.selected.push(seriesBrushSelected); var rangeInfoList = rangeInfoBySeries[seriesIndex]; var data = seriesModel.getData(); var getValueState = linkOthers(seriesIndex) ? function (dataIndex) { return selectedDataIndexForLink[dataIndex] ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush') : 'outOfBrush'; } : function (dataIndex) { return checkInRange(seriesModel, rangeInfoList, data, dataIndex) ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush') : 'outOfBrush'; }; // If no supported brush or no brush, all visuals are in original state. (linkOthers(seriesIndex) ? hasBrushExists : brushed(rangeInfoList)) && applyVisual(STATE_LIST, visualMappings, data, getValueState); }); }); dispatchAction(api, throttleType, throttleDelay, brushSelected, payload); } function dispatchAction(api, throttleType, throttleDelay, brushSelected, payload) { // This event will not be triggered when `setOpion`, otherwise dead lock may // triggered when do `setOption` in event listener, which we do not find // satisfactory way to solve yet. Some considered resolutions: // (a) Diff with prevoius selected data ant only trigger event when changed. // But store previous data and diff precisely (i.e., not only by dataIndex, but // also detect value changes in selected data) might bring complexity or fragility. // (b) Use spectial param like `silent` to suppress event triggering. // But such kind of volatile param may be weird in `setOption`. if (!payload) { return; } var zr = api.getZr(); if (zr[DISPATCH_FLAG]) { return; } if (!zr[DISPATCH_METHOD]) { zr[DISPATCH_METHOD] = doDispatch; } var fn = createOrUpdate(zr, DISPATCH_METHOD, throttleDelay, throttleType); fn(api, brushSelected); } function doDispatch(api, brushSelected) { if (!api.isDisposed()) { var zr = api.getZr(); zr[DISPATCH_FLAG] = true; api.dispatchAction({ type: 'brushSelect', batch: brushSelected }); zr[DISPATCH_FLAG] = false; } } function checkInRange(seriesModel, rangeInfoList, data, dataIndex) { for (var i = 0, len = rangeInfoList.length; i < len; i++) { var area = rangeInfoList[i]; if (seriesModel.brushSelector(dataIndex, data, area.selectors, area)) { return true; } } } function brushModelNotControll(brushModel, seriesIndex) { var seriesIndices = brushModel.option.seriesIndex; return seriesIndices != null && seriesIndices !== 'all' && (isArray(seriesIndices) ? indexOf(seriesIndices, seriesIndex) < 0 : seriesIndex !== seriesIndices); } var boundingRectBuilders = { rect: function (area) { return getBoundingRectFromMinMax(area.range); }, polygon: function (area) { var minMax; var range = area.range; for (var i = 0, len = range.length; i < len; i++) { minMax = minMax || [[Infinity, -Infinity], [Infinity, -Infinity]]; var rg = range[i]; rg[0] < minMax[0][0] && (minMax[0][0] = rg[0]); rg[0] > minMax[0][1] && (minMax[0][1] = rg[0]); rg[1] < minMax[1][0] && (minMax[1][0] = rg[1]); rg[1] > minMax[1][1] && (minMax[1][1] = rg[1]); } return minMax && getBoundingRectFromMinMax(minMax); } }; function getBoundingRectFromMinMax(minMax) { return new BoundingRect(minMax[0][0], minMax[1][0], minMax[0][1] - minMax[0][0], minMax[1][1] - minMax[1][0]); } var BrushView = /** @class */ function (_super) { __extends(BrushView, _super); function BrushView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = BrushView.type; return _this; } BrushView.prototype.init = function (ecModel, api) { this.ecModel = ecModel; this.api = api; this.model; (this._brushController = new BrushController(api.getZr())).on('brush', bind(this._onBrush, this)).mount(); }; BrushView.prototype.render = function (brushModel, ecModel, api, payload) { this.model = brushModel; this._updateController(brushModel, ecModel, api, payload); }; BrushView.prototype.updateTransform = function (brushModel, ecModel, api, payload) { // PENDING: `updateTransform` is a little tricky, whose layout need // to be calculate mandatorily and other stages will not be performed. // Take care the correctness of the logic. See #11754 . layoutCovers(ecModel); this._updateController(brushModel, ecModel, api, payload); }; BrushView.prototype.updateVisual = function (brushModel, ecModel, api, payload) { this.updateTransform(brushModel, ecModel, api, payload); }; BrushView.prototype.updateView = function (brushModel, ecModel, api, payload) { this._updateController(brushModel, ecModel, api, payload); }; BrushView.prototype._updateController = function (brushModel, ecModel, api, payload) { // Do not update controller when drawing. (!payload || payload.$from !== brushModel.id) && this._brushController.setPanels(brushModel.brushTargetManager.makePanelOpts(api)).enableBrush(brushModel.brushOption).updateCovers(brushModel.areas.slice()); }; // updateLayout: updateController, // updateVisual: updateController, BrushView.prototype.dispose = function () { this._brushController.dispose(); }; BrushView.prototype._onBrush = function (eventParam) { var modelId = this.model.id; var areas = this.model.brushTargetManager.setOutputRanges(eventParam.areas, this.ecModel); // Action is not dispatched on drag end, because the drag end // emits the same params with the last drag move event, and // may have some delay when using touch pad, which makes // animation not smooth (when using debounce). (!eventParam.isEnd || eventParam.removeOnClick) && this.api.dispatchAction({ type: 'brush', brushId: modelId, areas: clone(areas), $from: modelId }); eventParam.isEnd && this.api.dispatchAction({ type: 'brushEnd', brushId: modelId, areas: clone(areas), $from: modelId }); }; BrushView.type = 'brush'; return BrushView; }(ComponentView); var DEFAULT_OUT_OF_BRUSH_COLOR = '#ddd'; var BrushModel = /** @class */ function (_super) { __extends(BrushModel, _super); function BrushModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = BrushModel.type; /** * @readOnly */ _this.areas = []; /** * Current brush painting area settings. * @readOnly */ _this.brushOption = {}; return _this; } BrushModel.prototype.optionUpdated = function (newOption, isInit) { var thisOption = this.option; !isInit && replaceVisualOption(thisOption, newOption, ['inBrush', 'outOfBrush']); var inBrush = thisOption.inBrush = thisOption.inBrush || {}; // Always give default visual, consider setOption at the second time. thisOption.outOfBrush = thisOption.outOfBrush || { color: DEFAULT_OUT_OF_BRUSH_COLOR }; if (!inBrush.hasOwnProperty('liftZ')) { // Bigger than the highlight z lift, otherwise it will // be effected by the highlight z when brush. inBrush.liftZ = 5; } }; /** * If `areas` is null/undefined, range state remain. */ BrushModel.prototype.setAreas = function (areas) { if ("development" !== 'production') { assert(isArray(areas)); each(areas, function (area) { assert(area.brushType, 'Illegal areas'); }); } // If areas is null/undefined, range state remain. // This helps user to dispatchAction({type: 'brush'}) with no areas // set but just want to get the current brush select info from a `brush` event. if (!areas) { return; } this.areas = map(areas, function (area) { return generateBrushOption(this.option, area); }, this); }; /** * Set the current painting brush option. */ BrushModel.prototype.setBrushOption = function (brushOption) { this.brushOption = generateBrushOption(this.option, brushOption); this.brushType = this.brushOption.brushType; }; BrushModel.type = 'brush'; BrushModel.dependencies = ['geo', 'grid', 'xAxis', 'yAxis', 'parallel', 'series']; BrushModel.defaultOption = { seriesIndex: 'all', brushType: 'rect', brushMode: 'single', transformable: true, brushStyle: { borderWidth: 1, color: 'rgba(210,219,238,0.3)', borderColor: '#D2DBEE' }, throttleType: 'fixRate', throttleDelay: 0, removeOnClick: true, z: 10000 }; return BrushModel; }(ComponentModel); function generateBrushOption(option, brushOption) { return merge({ brushType: option.brushType, brushMode: option.brushMode, transformable: option.transformable, brushStyle: new Model(option.brushStyle).getItemStyle(), removeOnClick: option.removeOnClick, z: option.z }, brushOption, true); } var ICON_TYPES = ['rect', 'polygon', 'lineX', 'lineY', 'keep', 'clear']; var BrushFeature = /** @class */ function (_super) { __extends(BrushFeature, _super); function BrushFeature() { return _super !== null && _super.apply(this, arguments) || this; } BrushFeature.prototype.render = function (featureModel, ecModel, api) { var brushType; var brushMode; var isBrushed; ecModel.eachComponent({ mainType: 'brush' }, function (brushModel) { brushType = brushModel.brushType; brushMode = brushModel.brushOption.brushMode || 'single'; isBrushed = isBrushed || !!brushModel.areas.length; }); this._brushType = brushType; this._brushMode = brushMode; each(featureModel.get('type', true), function (type) { featureModel.setIconStatus(type, (type === 'keep' ? brushMode === 'multiple' : type === 'clear' ? isBrushed : type === brushType) ? 'emphasis' : 'normal'); }); }; BrushFeature.prototype.updateView = function (featureModel, ecModel, api) { this.render(featureModel, ecModel, api); }; BrushFeature.prototype.getIcons = function () { var model = this.model; var availableIcons = model.get('icon', true); var icons = {}; each(model.get('type', true), function (type) { if (availableIcons[type]) { icons[type] = availableIcons[type]; } }); return icons; }; BrushFeature.prototype.onclick = function (ecModel, api, type) { var brushType = this._brushType; var brushMode = this._brushMode; if (type === 'clear') { // Trigger parallel action firstly api.dispatchAction({ type: 'axisAreaSelect', intervals: [] }); api.dispatchAction({ type: 'brush', command: 'clear', // Clear all areas of all brush components. areas: [] }); } else { api.dispatchAction({ type: 'takeGlobalCursor', key: 'brush', brushOption: { brushType: type === 'keep' ? brushType : brushType === type ? false : type, brushMode: type === 'keep' ? brushMode === 'multiple' ? 'single' : 'multiple' : brushMode } }); } }; BrushFeature.getDefaultOption = function (ecModel) { var defaultOption = { show: true, type: ICON_TYPES.slice(), icon: { /* eslint-disable */ rect: 'M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13', polygon: 'M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2', lineX: 'M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4', lineY: 'M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4', keep: 'M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z', clear: 'M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2' // jshint ignore:line /* eslint-enable */ }, // `rect`, `polygon`, `lineX`, `lineY`, `keep`, `clear` title: ecModel.getLocale(['toolbox', 'brush', 'title']) }; return defaultOption; }; return BrushFeature; }(ToolboxFeature); function install$B(registers) { registers.registerComponentView(BrushView); registers.registerComponentModel(BrushModel); registers.registerPreprocessor(brushPreprocessor); registers.registerVisual(registers.PRIORITY.VISUAL.BRUSH, brushVisual); registers.registerAction({ type: 'brush', event: 'brush', update: 'updateVisual' }, function (payload, ecModel) { ecModel.eachComponent({ mainType: 'brush', query: payload }, function (brushModel) { brushModel.setAreas(payload.areas); }); }); /** * payload: { * brushComponents: [ * { * brushId, * brushIndex, * brushName, * series: [ * { * seriesId, * seriesIndex, * seriesName, * rawIndices: [21, 34, ...] * }, * ... * ] * }, * ... * ] * } */ registers.registerAction({ type: 'brushSelect', event: 'brushSelected', update: 'none' }, function () {}); registers.registerAction({ type: 'brushEnd', event: 'brushEnd', update: 'none' }, function () {}); registerFeature('brush', BrushFeature); } var TitleModel = /** @class */ function (_super) { __extends(TitleModel, _super); function TitleModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = TitleModel.type; _this.layoutMode = { type: 'box', ignoreSize: true }; return _this; } TitleModel.type = 'title'; TitleModel.defaultOption = { zlevel: 0, z: 6, show: true, text: '', target: 'blank', subtext: '', subtarget: 'blank', left: 0, top: 0, backgroundColor: 'rgba(0,0,0,0)', borderColor: '#ccc', borderWidth: 0, padding: 5, itemGap: 10, textStyle: { fontSize: 18, fontWeight: 'bold', color: '#464646' }, subtextStyle: { fontSize: 12, color: '#6E7079' } }; return TitleModel; }(ComponentModel); // View var TitleView = /** @class */ function (_super) { __extends(TitleView, _super); function TitleView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = TitleView.type; return _this; } TitleView.prototype.render = function (titleModel, ecModel, api) { this.group.removeAll(); if (!titleModel.get('show')) { return; } var group = this.group; var textStyleModel = titleModel.getModel('textStyle'); var subtextStyleModel = titleModel.getModel('subtextStyle'); var textAlign = titleModel.get('textAlign'); var textVerticalAlign = retrieve2(titleModel.get('textBaseline'), titleModel.get('textVerticalAlign')); var textEl = new ZRText({ style: createTextStyle(textStyleModel, { text: titleModel.get('text'), fill: textStyleModel.getTextColor() }, { disableBox: true }), z2: 10 }); var textRect = textEl.getBoundingRect(); var subText = titleModel.get('subtext'); var subTextEl = new ZRText({ style: createTextStyle(subtextStyleModel, { text: subText, fill: subtextStyleModel.getTextColor(), y: textRect.height + titleModel.get('itemGap'), verticalAlign: 'top' }, { disableBox: true }), z2: 10 }); var link = titleModel.get('link'); var sublink = titleModel.get('sublink'); var triggerEvent = titleModel.get('triggerEvent', true); textEl.silent = !link && !triggerEvent; subTextEl.silent = !sublink && !triggerEvent; if (link) { textEl.on('click', function () { windowOpen(link, '_' + titleModel.get('target')); }); } if (sublink) { subTextEl.on('click', function () { windowOpen(sublink, '_' + titleModel.get('subtarget')); }); } getECData(textEl).eventData = getECData(subTextEl).eventData = triggerEvent ? { componentType: 'title', componentIndex: titleModel.componentIndex } : null; group.add(textEl); subText && group.add(subTextEl); // If no subText, but add subTextEl, there will be an empty line. var groupRect = group.getBoundingRect(); var layoutOption = titleModel.getBoxLayoutParams(); layoutOption.width = groupRect.width; layoutOption.height = groupRect.height; var layoutRect = getLayoutRect(layoutOption, { width: api.getWidth(), height: api.getHeight() }, titleModel.get('padding')); // Adjust text align based on position if (!textAlign) { // Align left if title is on the left. center and right is same textAlign = titleModel.get('left') || titleModel.get('right'); // @ts-ignore if (textAlign === 'middle') { textAlign = 'center'; } // Adjust layout by text align if (textAlign === 'right') { layoutRect.x += layoutRect.width; } else if (textAlign === 'center') { layoutRect.x += layoutRect.width / 2; } } if (!textVerticalAlign) { textVerticalAlign = titleModel.get('top') || titleModel.get('bottom'); // @ts-ignore if (textVerticalAlign === 'center') { textVerticalAlign = 'middle'; } if (textVerticalAlign === 'bottom') { layoutRect.y += layoutRect.height; } else if (textVerticalAlign === 'middle') { layoutRect.y += layoutRect.height / 2; } textVerticalAlign = textVerticalAlign || 'top'; } group.x = layoutRect.x; group.y = layoutRect.y; group.markRedraw(); var alignStyle = { align: textAlign, verticalAlign: textVerticalAlign }; textEl.setStyle(alignStyle); subTextEl.setStyle(alignStyle); // Render background // Get groupRect again because textAlign has been changed groupRect = group.getBoundingRect(); var padding = layoutRect.margin; var style = titleModel.getItemStyle(['color', 'opacity']); style.fill = titleModel.get('backgroundColor'); var rect = new Rect({ shape: { x: groupRect.x - padding[3], y: groupRect.y - padding[0], width: groupRect.width + padding[1] + padding[3], height: groupRect.height + padding[0] + padding[2], r: titleModel.get('borderRadius') }, style: style, subPixelOptimize: true, silent: true }); group.add(rect); }; TitleView.type = 'title'; return TitleView; }(ComponentView); function install$C(registers) { registers.registerComponentModel(TitleModel); registers.registerComponentView(TitleView); } var TimelineModel = /** @class */ function (_super) { __extends(TimelineModel, _super); function TimelineModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = TimelineModel.type; _this.layoutMode = 'box'; return _this; } /** * @override */ TimelineModel.prototype.init = function (option, parentModel, ecModel) { this.mergeDefaultAndTheme(option, ecModel); this._initData(); }; /** * @override */ TimelineModel.prototype.mergeOption = function (option) { _super.prototype.mergeOption.apply(this, arguments); this._initData(); }; TimelineModel.prototype.setCurrentIndex = function (currentIndex) { if (currentIndex == null) { currentIndex = this.option.currentIndex; } var count = this._data.count(); if (this.option.loop) { currentIndex = (currentIndex % count + count) % count; } else { currentIndex >= count && (currentIndex = count - 1); currentIndex < 0 && (currentIndex = 0); } this.option.currentIndex = currentIndex; }; /** * @return {number} currentIndex */ TimelineModel.prototype.getCurrentIndex = function () { return this.option.currentIndex; }; /** * @return {boolean} */ TimelineModel.prototype.isIndexMax = function () { return this.getCurrentIndex() >= this._data.count() - 1; }; /** * @param {boolean} state true: play, false: stop */ TimelineModel.prototype.setPlayState = function (state) { this.option.autoPlay = !!state; }; /** * @return {boolean} true: play, false: stop */ TimelineModel.prototype.getPlayState = function () { return !!this.option.autoPlay; }; /** * @private */ TimelineModel.prototype._initData = function () { var thisOption = this.option; var dataArr = thisOption.data || []; var axisType = thisOption.axisType; var names = this._names = []; var processedDataArr; if (axisType === 'category') { processedDataArr = []; each(dataArr, function (item, index) { var value = convertOptionIdName(getDataItemValue(item), ''); var newItem; if (isObject(item)) { newItem = clone(item); newItem.value = index; } else { newItem = index; } processedDataArr.push(newItem); names.push(value); }); } else { processedDataArr = dataArr; } var dimType = { category: 'ordinal', time: 'time', value: 'number' }[axisType] || 'number'; var data = this._data = new List([{ name: 'value', type: dimType }], this); data.initData(processedDataArr, names); }; TimelineModel.prototype.getData = function () { return this._data; }; /** * @public * @return {Array.} categoreis */ TimelineModel.prototype.getCategories = function () { if (this.get('axisType') === 'category') { return this._names.slice(); } }; TimelineModel.type = 'timeline'; /** * @protected */ TimelineModel.defaultOption = { zlevel: 0, z: 4, show: true, axisType: 'time', realtime: true, left: '20%', top: null, right: '20%', bottom: 0, width: null, height: 40, padding: 5, controlPosition: 'left', autoPlay: false, rewind: false, loop: true, playInterval: 2000, currentIndex: 0, itemStyle: {}, label: { color: '#000' }, data: [] }; return TimelineModel; }(ComponentModel); var SliderTimelineModel = /** @class */ function (_super) { __extends(SliderTimelineModel, _super); function SliderTimelineModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SliderTimelineModel.type; return _this; } SliderTimelineModel.type = 'timeline.slider'; /** * @protected */ SliderTimelineModel.defaultOption = inheritDefaultOption(TimelineModel.defaultOption, { backgroundColor: 'rgba(0,0,0,0)', borderColor: '#ccc', borderWidth: 0, orient: 'horizontal', inverse: false, tooltip: { trigger: 'item' // data item may also have tootip attr. }, symbol: 'circle', symbolSize: 12, lineStyle: { show: true, width: 2, color: '#DAE1F5' }, label: { position: 'auto', // When using number, label position is not // restricted by viewRect. // positive: right/bottom, negative: left/top show: true, interval: 'auto', rotate: 0, // formatter: null, // 其余属性默认使用全局文本样式,详见TEXTSTYLE color: '#A4B1D7' }, itemStyle: { color: '#A4B1D7', borderWidth: 1 }, checkpointStyle: { symbol: 'circle', symbolSize: 15, color: '#316bf3', borderColor: '#fff', borderWidth: 2, shadowBlur: 2, shadowOffsetX: 1, shadowOffsetY: 1, shadowColor: 'rgba(0, 0, 0, 0.3)', // borderColor: 'rgba(194,53,49, 0.5)', animation: true, animationDuration: 300, animationEasing: 'quinticInOut' }, controlStyle: { show: true, showPlayBtn: true, showPrevBtn: true, showNextBtn: true, itemSize: 24, itemGap: 12, position: 'left', playIcon: 'path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z', stopIcon: 'path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z', nextIcon: 'M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z', prevIcon: 'M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z', prevBtnSize: 18, nextBtnSize: 18, color: '#A4B1D7', borderColor: '#A4B1D7', borderWidth: 1 }, emphasis: { label: { show: true, // 其余属性默认使用全局文本样式,详见TEXTSTYLE color: '#6f778d' }, itemStyle: { color: '#316BF3' }, controlStyle: { color: '#316BF3', borderColor: '#316BF3', borderWidth: 2 } }, progress: { lineStyle: { color: '#316BF3' }, itemStyle: { color: '#316BF3' }, label: { color: '#6f778d' } }, data: [] }); return SliderTimelineModel; }(TimelineModel); mixin(SliderTimelineModel, DataFormatMixin.prototype); var TimelineView = /** @class */ function (_super) { __extends(TimelineView, _super); function TimelineView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = TimelineView.type; return _this; } TimelineView.type = 'timeline'; return TimelineView; }(ComponentView); /** * Extend axis 2d */ var TimelineAxis = /** @class */ function (_super) { __extends(TimelineAxis, _super); function TimelineAxis(dim, scale, coordExtent, axisType) { var _this = _super.call(this, dim, scale, coordExtent) || this; _this.type = axisType || 'value'; return _this; } /** * @override */ TimelineAxis.prototype.getLabelModel = function () { // Force override return this.model.getModel('label'); }; /** * @override */ TimelineAxis.prototype.isHorizontal = function () { return this.model.get('orient') === 'horizontal'; }; return TimelineAxis; }(Axis); var PI$8 = Math.PI; var labelDataIndexStore = makeInner(); var SliderTimelineView = /** @class */ function (_super) { __extends(SliderTimelineView, _super); function SliderTimelineView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SliderTimelineView.type; return _this; } SliderTimelineView.prototype.init = function (ecModel, api) { this.api = api; }; /** * @override */ SliderTimelineView.prototype.render = function (timelineModel, ecModel, api) { this.model = timelineModel; this.api = api; this.ecModel = ecModel; this.group.removeAll(); if (timelineModel.get('show', true)) { var layoutInfo_1 = this._layout(timelineModel, api); var mainGroup_1 = this._createGroup('_mainGroup'); var labelGroup = this._createGroup('_labelGroup'); var axis_1 = this._axis = this._createAxis(layoutInfo_1, timelineModel); timelineModel.formatTooltip = function (dataIndex) { var name = axis_1.scale.getLabel({ value: dataIndex }); return createTooltipMarkup('nameValue', { noName: true, value: name }); }; each(['AxisLine', 'AxisTick', 'Control', 'CurrentPointer'], function (name) { this['_render' + name](layoutInfo_1, mainGroup_1, axis_1, timelineModel); }, this); this._renderAxisLabel(layoutInfo_1, labelGroup, axis_1, timelineModel); this._position(layoutInfo_1, timelineModel); } this._doPlayStop(); this._updateTicksStatus(); }; /** * @override */ SliderTimelineView.prototype.remove = function () { this._clearTimer(); this.group.removeAll(); }; /** * @override */ SliderTimelineView.prototype.dispose = function () { this._clearTimer(); }; SliderTimelineView.prototype._layout = function (timelineModel, api) { var labelPosOpt = timelineModel.get(['label', 'position']); var orient = timelineModel.get('orient'); var viewRect = getViewRect$5(timelineModel, api); var parsedLabelPos; // Auto label offset. if (labelPosOpt == null || labelPosOpt === 'auto') { parsedLabelPos = orient === 'horizontal' ? viewRect.y + viewRect.height / 2 < api.getHeight() / 2 ? '-' : '+' : viewRect.x + viewRect.width / 2 < api.getWidth() / 2 ? '+' : '-'; } else if (isString(labelPosOpt)) { parsedLabelPos = { horizontal: { top: '-', bottom: '+' }, vertical: { left: '-', right: '+' } }[orient][labelPosOpt]; } else { // is number parsedLabelPos = labelPosOpt; } var labelAlignMap = { horizontal: 'center', vertical: parsedLabelPos >= 0 || parsedLabelPos === '+' ? 'left' : 'right' }; var labelBaselineMap = { horizontal: parsedLabelPos >= 0 || parsedLabelPos === '+' ? 'top' : 'bottom', vertical: 'middle' }; var rotationMap = { horizontal: 0, vertical: PI$8 / 2 }; // Position var mainLength = orient === 'vertical' ? viewRect.height : viewRect.width; var controlModel = timelineModel.getModel('controlStyle'); var showControl = controlModel.get('show', true); var controlSize = showControl ? controlModel.get('itemSize') : 0; var controlGap = showControl ? controlModel.get('itemGap') : 0; var sizePlusGap = controlSize + controlGap; // Special label rotate. var labelRotation = timelineModel.get(['label', 'rotate']) || 0; labelRotation = labelRotation * PI$8 / 180; // To radian. var playPosition; var prevBtnPosition; var nextBtnPosition; var controlPosition = controlModel.get('position', true); var showPlayBtn = showControl && controlModel.get('showPlayBtn', true); var showPrevBtn = showControl && controlModel.get('showPrevBtn', true); var showNextBtn = showControl && controlModel.get('showNextBtn', true); var xLeft = 0; var xRight = mainLength; // position[0] means left, position[1] means middle. if (controlPosition === 'left' || controlPosition === 'bottom') { showPlayBtn && (playPosition = [0, 0], xLeft += sizePlusGap); showPrevBtn && (prevBtnPosition = [xLeft, 0], xLeft += sizePlusGap); showNextBtn && (nextBtnPosition = [xRight - controlSize, 0], xRight -= sizePlusGap); } else { // 'top' 'right' showPlayBtn && (playPosition = [xRight - controlSize, 0], xRight -= sizePlusGap); showPrevBtn && (prevBtnPosition = [0, 0], xLeft += sizePlusGap); showNextBtn && (nextBtnPosition = [xRight - controlSize, 0], xRight -= sizePlusGap); } var axisExtent = [xLeft, xRight]; if (timelineModel.get('inverse')) { axisExtent.reverse(); } return { viewRect: viewRect, mainLength: mainLength, orient: orient, rotation: rotationMap[orient], labelRotation: labelRotation, labelPosOpt: parsedLabelPos, labelAlign: timelineModel.get(['label', 'align']) || labelAlignMap[orient], labelBaseline: timelineModel.get(['label', 'verticalAlign']) || timelineModel.get(['label', 'baseline']) || labelBaselineMap[orient], // Based on mainGroup. playPosition: playPosition, prevBtnPosition: prevBtnPosition, nextBtnPosition: nextBtnPosition, axisExtent: axisExtent, controlSize: controlSize, controlGap: controlGap }; }; SliderTimelineView.prototype._position = function (layoutInfo, timelineModel) { // Position is be called finally, because bounding rect is needed for // adapt content to fill viewRect (auto adapt offset). // Timeline may be not all in the viewRect when 'offset' is specified // as a number, because it is more appropriate that label aligns at // 'offset' but not the other edge defined by viewRect. var mainGroup = this._mainGroup; var labelGroup = this._labelGroup; var viewRect = layoutInfo.viewRect; if (layoutInfo.orient === 'vertical') { // transform to horizontal, inverse rotate by left-top point. var m = create$1(); var rotateOriginX = viewRect.x; var rotateOriginY = viewRect.y + viewRect.height; translate(m, m, [-rotateOriginX, -rotateOriginY]); rotate(m, m, -PI$8 / 2); translate(m, m, [rotateOriginX, rotateOriginY]); viewRect = viewRect.clone(); viewRect.applyTransform(m); } var viewBound = getBound(viewRect); var mainBound = getBound(mainGroup.getBoundingRect()); var labelBound = getBound(labelGroup.getBoundingRect()); var mainPosition = [mainGroup.x, mainGroup.y]; var labelsPosition = [labelGroup.x, labelGroup.y]; labelsPosition[0] = mainPosition[0] = viewBound[0][0]; var labelPosOpt = layoutInfo.labelPosOpt; if (labelPosOpt == null || isString(labelPosOpt)) { // '+' or '-' var mainBoundIdx = labelPosOpt === '+' ? 0 : 1; toBound(mainPosition, mainBound, viewBound, 1, mainBoundIdx); toBound(labelsPosition, labelBound, viewBound, 1, 1 - mainBoundIdx); } else { var mainBoundIdx = labelPosOpt >= 0 ? 0 : 1; toBound(mainPosition, mainBound, viewBound, 1, mainBoundIdx); labelsPosition[1] = mainPosition[1] + labelPosOpt; } mainGroup.setPosition(mainPosition); labelGroup.setPosition(labelsPosition); mainGroup.rotation = labelGroup.rotation = layoutInfo.rotation; setOrigin(mainGroup); setOrigin(labelGroup); function setOrigin(targetGroup) { targetGroup.originX = viewBound[0][0] - targetGroup.x; targetGroup.originY = viewBound[1][0] - targetGroup.y; } function getBound(rect) { // [[xmin, xmax], [ymin, ymax]] return [[rect.x, rect.x + rect.width], [rect.y, rect.y + rect.height]]; } function toBound(fromPos, from, to, dimIdx, boundIdx) { fromPos[dimIdx] += to[dimIdx][boundIdx] - from[dimIdx][boundIdx]; } }; SliderTimelineView.prototype._createAxis = function (layoutInfo, timelineModel) { var data = timelineModel.getData(); var axisType = timelineModel.get('axisType'); var scale = createScaleByModel$1(timelineModel, axisType); // Customize scale. The `tickValue` is `dataIndex`. scale.getTicks = function () { return data.mapArray(['value'], function (value) { return { value: value }; }); }; var dataExtent = data.getDataExtent('value'); scale.setExtent(dataExtent[0], dataExtent[1]); scale.niceTicks(); var axis = new TimelineAxis('value', scale, layoutInfo.axisExtent, axisType); axis.model = timelineModel; return axis; }; SliderTimelineView.prototype._createGroup = function (key) { var newGroup = this[key] = new Group(); this.group.add(newGroup); return newGroup; }; SliderTimelineView.prototype._renderAxisLine = function (layoutInfo, group, axis, timelineModel) { var axisExtent = axis.getExtent(); if (!timelineModel.get(['lineStyle', 'show'])) { return; } var line = new Line({ shape: { x1: axisExtent[0], y1: 0, x2: axisExtent[1], y2: 0 }, style: extend({ lineCap: 'round' }, timelineModel.getModel('lineStyle').getLineStyle()), silent: true, z2: 1 }); group.add(line); var progressLine = this._progressLine = new Line({ shape: { x1: axisExtent[0], x2: this._currentPointer ? this._currentPointer.x : axisExtent[0], y1: 0, y2: 0 }, style: defaults({ lineCap: 'round', lineWidth: line.style.lineWidth }, timelineModel.getModel(['progress', 'lineStyle']).getLineStyle()), silent: true, z2: 1 }); group.add(progressLine); }; SliderTimelineView.prototype._renderAxisTick = function (layoutInfo, group, axis, timelineModel) { var _this = this; var data = timelineModel.getData(); // Show all ticks, despite ignoring strategy. var ticks = axis.scale.getTicks(); this._tickSymbols = []; // The value is dataIndex, see the costomized scale. each(ticks, function (tick) { var tickCoord = axis.dataToCoord(tick.value); var itemModel = data.getItemModel(tick.value); var itemStyleModel = itemModel.getModel('itemStyle'); var hoverStyleModel = itemModel.getModel(['emphasis', 'itemStyle']); var progressStyleModel = itemModel.getModel(['progress', 'itemStyle']); var symbolOpt = { x: tickCoord, y: 0, onclick: bind(_this._changeTimeline, _this, tick.value) }; var el = giveSymbol(itemModel, itemStyleModel, group, symbolOpt); el.ensureState('emphasis').style = hoverStyleModel.getItemStyle(); el.ensureState('progress').style = progressStyleModel.getItemStyle(); enableHoverEmphasis(el); var ecData = getECData(el); if (itemModel.get('tooltip')) { ecData.dataIndex = tick.value; ecData.dataModel = timelineModel; } else { ecData.dataIndex = ecData.dataModel = null; } _this._tickSymbols.push(el); }); }; SliderTimelineView.prototype._renderAxisLabel = function (layoutInfo, group, axis, timelineModel) { var _this = this; var labelModel = axis.getLabelModel(); if (!labelModel.get('show')) { return; } var data = timelineModel.getData(); var labels = axis.getViewLabels(); this._tickLabels = []; each(labels, function (labelItem) { // The tickValue is dataIndex, see the costomized scale. var dataIndex = labelItem.tickValue; var itemModel = data.getItemModel(dataIndex); var normalLabelModel = itemModel.getModel('label'); var hoverLabelModel = itemModel.getModel(['emphasis', 'label']); var progressLabelModel = itemModel.getModel(['progress', 'label']); var tickCoord = axis.dataToCoord(labelItem.tickValue); var textEl = new ZRText({ x: tickCoord, y: 0, rotation: layoutInfo.labelRotation - layoutInfo.rotation, onclick: bind(_this._changeTimeline, _this, dataIndex), silent: false, style: createTextStyle(normalLabelModel, { text: labelItem.formattedLabel, align: layoutInfo.labelAlign, verticalAlign: layoutInfo.labelBaseline }) }); textEl.ensureState('emphasis').style = createTextStyle(hoverLabelModel); textEl.ensureState('progress').style = createTextStyle(progressLabelModel); group.add(textEl); enableHoverEmphasis(textEl); labelDataIndexStore(textEl).dataIndex = dataIndex; _this._tickLabels.push(textEl); }); }; SliderTimelineView.prototype._renderControl = function (layoutInfo, group, axis, timelineModel) { var controlSize = layoutInfo.controlSize; var rotation = layoutInfo.rotation; var itemStyle = timelineModel.getModel('controlStyle').getItemStyle(); var hoverStyle = timelineModel.getModel(['emphasis', 'controlStyle']).getItemStyle(); var playState = timelineModel.getPlayState(); var inverse = timelineModel.get('inverse', true); makeBtn(layoutInfo.nextBtnPosition, 'next', bind(this._changeTimeline, this, inverse ? '-' : '+')); makeBtn(layoutInfo.prevBtnPosition, 'prev', bind(this._changeTimeline, this, inverse ? '+' : '-')); makeBtn(layoutInfo.playPosition, playState ? 'stop' : 'play', bind(this._handlePlayClick, this, !playState), true); function makeBtn(position, iconName, onclick, willRotate) { if (!position) { return; } var iconSize = parsePercent(retrieve2(timelineModel.get(['controlStyle', iconName + 'BtnSize']), controlSize), controlSize); var rect = [0, -iconSize / 2, iconSize, iconSize]; var btn = makeControlIcon(timelineModel, iconName + 'Icon', rect, { x: position[0], y: position[1], originX: controlSize / 2, originY: 0, rotation: willRotate ? -rotation : 0, rectHover: true, style: itemStyle, onclick: onclick }); btn.ensureState('emphasis').style = hoverStyle; group.add(btn); enableHoverEmphasis(btn); } }; SliderTimelineView.prototype._renderCurrentPointer = function (layoutInfo, group, axis, timelineModel) { var data = timelineModel.getData(); var currentIndex = timelineModel.getCurrentIndex(); var pointerModel = data.getItemModel(currentIndex).getModel('checkpointStyle'); var me = this; var callback = { onCreate: function (pointer) { pointer.draggable = true; pointer.drift = bind(me._handlePointerDrag, me); pointer.ondragend = bind(me._handlePointerDragend, me); pointerMoveTo(pointer, me._progressLine, currentIndex, axis, timelineModel, true); }, onUpdate: function (pointer) { pointerMoveTo(pointer, me._progressLine, currentIndex, axis, timelineModel); } }; // Reuse when exists, for animation and drag. this._currentPointer = giveSymbol(pointerModel, pointerModel, this._mainGroup, {}, this._currentPointer, callback); }; SliderTimelineView.prototype._handlePlayClick = function (nextState) { this._clearTimer(); this.api.dispatchAction({ type: 'timelinePlayChange', playState: nextState, from: this.uid }); }; SliderTimelineView.prototype._handlePointerDrag = function (dx, dy, e) { this._clearTimer(); this._pointerChangeTimeline([e.offsetX, e.offsetY]); }; SliderTimelineView.prototype._handlePointerDragend = function (e) { this._pointerChangeTimeline([e.offsetX, e.offsetY], true); }; SliderTimelineView.prototype._pointerChangeTimeline = function (mousePos, trigger) { var toCoord = this._toAxisCoord(mousePos)[0]; var axis = this._axis; var axisExtent = asc(axis.getExtent().slice()); toCoord > axisExtent[1] && (toCoord = axisExtent[1]); toCoord < axisExtent[0] && (toCoord = axisExtent[0]); this._currentPointer.x = toCoord; this._currentPointer.markRedraw(); this._progressLine.shape.x2 = toCoord; this._progressLine.dirty(); var targetDataIndex = this._findNearestTick(toCoord); var timelineModel = this.model; if (trigger || targetDataIndex !== timelineModel.getCurrentIndex() && timelineModel.get('realtime')) { this._changeTimeline(targetDataIndex); } }; SliderTimelineView.prototype._doPlayStop = function () { var _this = this; this._clearTimer(); if (this.model.getPlayState()) { this._timer = setTimeout(function () { // Do not cache var timelineModel = _this.model; _this._changeTimeline(timelineModel.getCurrentIndex() + (timelineModel.get('rewind', true) ? -1 : 1)); }, this.model.get('playInterval')); } }; SliderTimelineView.prototype._toAxisCoord = function (vertex) { var trans = this._mainGroup.getLocalTransform(); return applyTransform$1(vertex, trans, true); }; SliderTimelineView.prototype._findNearestTick = function (axisCoord) { var data = this.model.getData(); var dist = Infinity; var targetDataIndex; var axis = this._axis; data.each(['value'], function (value, dataIndex) { var coord = axis.dataToCoord(value); var d = Math.abs(coord - axisCoord); if (d < dist) { dist = d; targetDataIndex = dataIndex; } }); return targetDataIndex; }; SliderTimelineView.prototype._clearTimer = function () { if (this._timer) { clearTimeout(this._timer); this._timer = null; } }; SliderTimelineView.prototype._changeTimeline = function (nextIndex) { var currentIndex = this.model.getCurrentIndex(); if (nextIndex === '+') { nextIndex = currentIndex + 1; } else if (nextIndex === '-') { nextIndex = currentIndex - 1; } this.api.dispatchAction({ type: 'timelineChange', currentIndex: nextIndex, from: this.uid }); }; SliderTimelineView.prototype._updateTicksStatus = function () { var currentIndex = this.model.getCurrentIndex(); var tickSymbols = this._tickSymbols; var tickLabels = this._tickLabels; if (tickSymbols) { for (var i = 0; i < tickSymbols.length; i++) { tickSymbols && tickSymbols[i] && tickSymbols[i].toggleState('progress', i < currentIndex); } } if (tickLabels) { for (var i = 0; i < tickLabels.length; i++) { tickLabels && tickLabels[i] && tickLabels[i].toggleState('progress', labelDataIndexStore(tickLabels[i]).dataIndex <= currentIndex); } } }; SliderTimelineView.type = 'timeline.slider'; return SliderTimelineView; }(TimelineView); function createScaleByModel$1(model, axisType) { axisType = axisType || model.get('type'); if (axisType) { switch (axisType) { // Buildin scale case 'category': return new OrdinalScale({ ordinalMeta: model.getCategories(), extent: [Infinity, -Infinity] }); case 'time': return new TimeScale({ locale: model.ecModel.getLocaleModel(), useUTC: model.ecModel.get('useUTC') }); default: // default to be value return new IntervalScale(); } } } function getViewRect$5(model, api) { return getLayoutRect(model.getBoxLayoutParams(), { width: api.getWidth(), height: api.getHeight() }, model.get('padding')); } function makeControlIcon(timelineModel, objPath, rect, opts) { var style = opts.style; var icon = createIcon(timelineModel.get(['controlStyle', objPath]), opts || {}, new BoundingRect(rect[0], rect[1], rect[2], rect[3])); // TODO createIcon won't use style in opt. if (style) { icon.setStyle(style); } return icon; } /** * Create symbol or update symbol * opt: basic position and event handlers */ function giveSymbol(hostModel, itemStyleModel, group, opt, symbol, callback) { var color = itemStyleModel.get('color'); if (!symbol) { var symbolType = hostModel.get('symbol'); symbol = createSymbol(symbolType, -1, -1, 2, 2, color); symbol.setStyle('strokeNoScale', true); group.add(symbol); callback && callback.onCreate(symbol); } else { symbol.setColor(color); group.add(symbol); // Group may be new, also need to add. callback && callback.onUpdate(symbol); } // Style var itemStyle = itemStyleModel.getItemStyle(['color']); symbol.setStyle(itemStyle); // Transform and events. opt = merge({ rectHover: true, z2: 100 }, opt, true); var symbolSize = hostModel.get('symbolSize'); symbolSize = symbolSize instanceof Array ? symbolSize.slice() : [+symbolSize, +symbolSize]; opt.scaleX = symbolSize[0] / 2; opt.scaleY = symbolSize[1] / 2; var symbolOffset = hostModel.get('symbolOffset'); if (symbolOffset) { opt.x = opt.x || 0; opt.y = opt.y || 0; opt.x += parsePercent$1(symbolOffset[0], symbolSize[0]); opt.y += parsePercent$1(symbolOffset[1], symbolSize[1]); } var symbolRotate = hostModel.get('symbolRotate'); opt.rotation = (symbolRotate || 0) * Math.PI / 180 || 0; symbol.attr(opt); // FIXME // (1) When symbol.style.strokeNoScale is true and updateTransform is not performed, // getBoundingRect will return wrong result. // (This is supposed to be resolved in zrender, but it is a little difficult to // leverage performance and auto updateTransform) // (2) All of ancesters of symbol do not scale, so we can just updateTransform symbol. symbol.updateTransform(); return symbol; } function pointerMoveTo(pointer, progressLine, dataIndex, axis, timelineModel, noAnimation) { if (pointer.dragging) { return; } var pointerModel = timelineModel.getModel('checkpointStyle'); var toCoord = axis.dataToCoord(timelineModel.getData().get('value', dataIndex)); if (noAnimation || !pointerModel.get('animation', true)) { pointer.attr({ x: toCoord, y: 0 }); progressLine && progressLine.attr({ shape: { x2: toCoord } }); } else { var animationCfg = { duration: pointerModel.get('animationDuration', true), easing: pointerModel.get('animationEasing', true) }; pointer.stopAnimation(null, true); pointer.animateTo({ x: toCoord, y: 0 }, animationCfg); progressLine && progressLine.animateTo({ shape: { x2: toCoord } }, animationCfg); } } function installTimelineAction(registers) { registers.registerAction({ type: 'timelineChange', event: 'timelineChanged', update: 'prepareAndUpdate' }, function (payload, ecModel) { var timelineModel = ecModel.getComponent('timeline'); if (timelineModel && payload.currentIndex != null) { timelineModel.setCurrentIndex(payload.currentIndex); if (!timelineModel.get('loop', true) && timelineModel.isIndexMax()) { timelineModel.setPlayState(false); } } // Set normalized currentIndex to payload. ecModel.resetOption('timeline', { replaceMerge: timelineModel.get('replaceMerge', true) }); return defaults({ currentIndex: timelineModel.option.currentIndex }, payload); }); registers.registerAction({ type: 'timelinePlayChange', event: 'timelinePlayChanged', update: 'update' }, function (payload, ecModel) { var timelineModel = ecModel.getComponent('timeline'); if (timelineModel && payload.playState != null) { timelineModel.setPlayState(payload.playState); } }); } function timelinePreprocessor(option) { var timelineOpt = option && option.timeline; if (!isArray(timelineOpt)) { timelineOpt = timelineOpt ? [timelineOpt] : []; } each(timelineOpt, function (opt) { if (!opt) { return; } compatibleEC2(opt); }); } function compatibleEC2(opt) { var type = opt.type; var ec2Types = { 'number': 'value', 'time': 'time' }; // Compatible with ec2 if (ec2Types[type]) { opt.axisType = ec2Types[type]; delete opt.type; } transferItem(opt); if (has(opt, 'controlPosition')) { var controlStyle = opt.controlStyle || (opt.controlStyle = {}); if (!has(controlStyle, 'position')) { controlStyle.position = opt.controlPosition; } if (controlStyle.position === 'none' && !has(controlStyle, 'show')) { controlStyle.show = false; delete controlStyle.position; } delete opt.controlPosition; } each(opt.data || [], function (dataItem) { if (isObject(dataItem) && !isArray(dataItem)) { if (!has(dataItem, 'value') && has(dataItem, 'name')) { // In ec2, using name as value. dataItem.value = dataItem.name; } transferItem(dataItem); } }); } function transferItem(opt) { var itemStyle = opt.itemStyle || (opt.itemStyle = {}); var itemStyleEmphasis = itemStyle.emphasis || (itemStyle.emphasis = {}); // Transfer label out var label = opt.label || opt.label || {}; var labelNormal = label.normal || (label.normal = {}); var excludeLabelAttr = { normal: 1, emphasis: 1 }; each(label, function (value, name) { if (!excludeLabelAttr[name] && !has(labelNormal, name)) { labelNormal[name] = value; } }); if (itemStyleEmphasis.label && !has(label, 'emphasis')) { label.emphasis = itemStyleEmphasis.label; delete itemStyleEmphasis.label; } } function has(obj, attr) { return obj.hasOwnProperty(attr); } function install$D(registers) { registers.registerComponentModel(SliderTimelineModel); registers.registerComponentView(SliderTimelineView); registers.registerSubTypeDefaulter('timeline', function () { // Only slider now. return 'slider'; }); installTimelineAction(registers); registers.registerPreprocessor(timelinePreprocessor); } function checkMarkerInSeries(seriesOpts, markerType) { if (!seriesOpts) { return false; } var seriesOptArr = isArray(seriesOpts) ? seriesOpts : [seriesOpts]; for (var idx = 0; idx < seriesOptArr.length; idx++) { if (seriesOptArr[idx] && seriesOptArr[idx][markerType]) { return true; } } return false; } function fillLabel(opt) { defaultEmphasis(opt, 'label', ['show']); } // { [componentType]: MarkerModel } var inner$g = makeInner(); var MarkerModel = /** @class */ function (_super) { __extends(MarkerModel, _super); function MarkerModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = MarkerModel.type; /** * If marker model is created by self from series */ _this.createdBySelf = false; return _this; } /** * @overrite */ MarkerModel.prototype.init = function (option, parentModel, ecModel) { if ("development" !== 'production') { if (this.type === 'marker') { throw new Error('Marker component is abstract component. Use markLine, markPoint, markArea instead.'); } } this.mergeDefaultAndTheme(option, ecModel); this._mergeOption(option, ecModel, false, true); }; MarkerModel.prototype.isAnimationEnabled = function () { if (env.node) { return false; } var hostSeries = this.__hostSeries; return this.getShallow('animation') && hostSeries && hostSeries.isAnimationEnabled(); }; /** * @overrite */ MarkerModel.prototype.mergeOption = function (newOpt, ecModel) { this._mergeOption(newOpt, ecModel, false, false); }; MarkerModel.prototype._mergeOption = function (newOpt, ecModel, createdBySelf, isInit) { var componentType = this.mainType; if (!createdBySelf) { ecModel.eachSeries(function (seriesModel) { // mainType can be markPoint, markLine, markArea var markerOpt = seriesModel.get(this.mainType, true); var markerModel = inner$g(seriesModel)[componentType]; if (!markerOpt || !markerOpt.data) { inner$g(seriesModel)[componentType] = null; return; } if (!markerModel) { if (isInit) { // Default label emphasis `position` and `show` fillLabel(markerOpt); } each(markerOpt.data, function (item) { // FIXME Overwrite fillLabel method ? if (item instanceof Array) { fillLabel(item[0]); fillLabel(item[1]); } else { fillLabel(item); } }); markerModel = this.createMarkerModelFromSeries(markerOpt, this, ecModel); // markerModel = new ImplementedMarkerModel( // markerOpt, this, ecModel // ); extend(markerModel, { mainType: this.mainType, // Use the same series index and name seriesIndex: seriesModel.seriesIndex, name: seriesModel.name, createdBySelf: true }); markerModel.__hostSeries = seriesModel; } else { markerModel._mergeOption(markerOpt, ecModel, true); } inner$g(seriesModel)[componentType] = markerModel; }, this); } }; MarkerModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) { var data = this.getData(); var value = this.getRawValue(dataIndex); var itemName = data.getName(dataIndex); return createTooltipMarkup('section', { header: this.name, blocks: [createTooltipMarkup('nameValue', { name: itemName, value: value, noName: !itemName, noValue: value == null })] }); }; MarkerModel.prototype.getData = function () { return this._data; }; MarkerModel.prototype.setData = function (data) { this._data = data; }; MarkerModel.getMarkerModelFromSeries = function (seriesModel, // Support three types of markers. Strict check. componentType) { return inner$g(seriesModel)[componentType]; }; MarkerModel.type = 'marker'; MarkerModel.dependencies = ['series', 'grid', 'polar', 'geo']; return MarkerModel; }(ComponentModel); mixin(MarkerModel, DataFormatMixin.prototype); var MarkPointModel = /** @class */ function (_super) { __extends(MarkPointModel, _super); function MarkPointModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = MarkPointModel.type; return _this; } MarkPointModel.prototype.createMarkerModelFromSeries = function (markerOpt, masterMarkerModel, ecModel) { return new MarkPointModel(markerOpt, masterMarkerModel, ecModel); }; MarkPointModel.type = 'markPoint'; MarkPointModel.defaultOption = { zlevel: 0, z: 5, symbol: 'pin', symbolSize: 50, //symbolRotate: 0, //symbolOffset: [0, 0] tooltip: { trigger: 'item' }, label: { show: true, position: 'inside' }, itemStyle: { borderWidth: 2 }, emphasis: { label: { show: true } } }; return MarkPointModel; }(MarkerModel); function hasXOrY(item) { return !(isNaN(parseFloat(item.x)) && isNaN(parseFloat(item.y))); } function hasXAndY(item) { return !isNaN(parseFloat(item.x)) && !isNaN(parseFloat(item.y)); } // Make it simple, do not visit all stacked value to count precision. // function getPrecision(data, valueAxisDim, dataIndex) { // let precision = -1; // let stackedDim = data.mapDimension(valueAxisDim); // do { // precision = Math.max( // numberUtil.getPrecision(data.get(stackedDim, dataIndex)), // precision // ); // let stackedOnSeries = data.getCalculationInfo('stackedOnSeries'); // if (stackedOnSeries) { // let byValue = data.get(data.getCalculationInfo('stackedByDimension'), dataIndex); // data = stackedOnSeries.getData(); // dataIndex = data.indexOf(data.getCalculationInfo('stackedByDimension'), byValue); // stackedDim = data.getCalculationInfo('stackedDimension'); // } // else { // data = null; // } // } while (data); // return precision; // } function markerTypeCalculatorWithExtent(markerType, data, otherDataDim, targetDataDim, otherCoordIndex, targetCoordIndex) { var coordArr = []; var stacked = isDimensionStacked(data, targetDataDim /*, otherDataDim*/ ); var calcDataDim = stacked ? data.getCalculationInfo('stackResultDimension') : targetDataDim; var value = numCalculate(data, calcDataDim, markerType); var dataIndex = data.indicesOfNearest(calcDataDim, value)[0]; coordArr[otherCoordIndex] = data.get(otherDataDim, dataIndex); coordArr[targetCoordIndex] = data.get(calcDataDim, dataIndex); var coordArrValue = data.get(targetDataDim, dataIndex); // Make it simple, do not visit all stacked value to count precision. var precision = getPrecision(data.get(targetDataDim, dataIndex)); precision = Math.min(precision, 20); if (precision >= 0) { coordArr[targetCoordIndex] = +coordArr[targetCoordIndex].toFixed(precision); } return [coordArr, coordArrValue]; } // TODO Specified percent var markerTypeCalculator = { min: curry(markerTypeCalculatorWithExtent, 'min'), max: curry(markerTypeCalculatorWithExtent, 'max'), average: curry(markerTypeCalculatorWithExtent, 'average'), median: curry(markerTypeCalculatorWithExtent, 'median') }; /** * Transform markPoint data item to format used in List by do the following * 1. Calculate statistic like `max`, `min`, `average` * 2. Convert `item.xAxis`, `item.yAxis` to `item.coord` array * @param {module:echarts/model/Series} seriesModel * @param {module:echarts/coord/*} [coordSys] * @param {Object} item * @return {Object} */ function dataTransform(seriesModel, item) { var data = seriesModel.getData(); var coordSys = seriesModel.coordinateSystem; // 1. If not specify the position with pixel directly // 2. If `coord` is not a data array. Which uses `xAxis`, // `yAxis` to specify the coord on each dimension // parseFloat first because item.x and item.y can be percent string like '20%' if (item && !hasXAndY(item) && !isArray(item.coord) && coordSys) { var dims = coordSys.dimensions; var axisInfo = getAxisInfo$1(item, data, coordSys, seriesModel); // Clone the option // Transform the properties xAxis, yAxis, radiusAxis, angleAxis, geoCoord to value item = clone(item); if (item.type && markerTypeCalculator[item.type] && axisInfo.baseAxis && axisInfo.valueAxis) { var otherCoordIndex = indexOf(dims, axisInfo.baseAxis.dim); var targetCoordIndex = indexOf(dims, axisInfo.valueAxis.dim); var coordInfo = markerTypeCalculator[item.type](data, axisInfo.baseDataDim, axisInfo.valueDataDim, otherCoordIndex, targetCoordIndex); item.coord = coordInfo[0]; // Force to use the value of calculated value. // let item use the value without stack. item.value = coordInfo[1]; } else { // FIXME Only has one of xAxis and yAxis. var coord = [item.xAxis != null ? item.xAxis : item.radiusAxis, item.yAxis != null ? item.yAxis : item.angleAxis]; // Each coord support max, min, average for (var i = 0; i < 2; i++) { if (markerTypeCalculator[coord[i]]) { coord[i] = numCalculate(data, data.mapDimension(dims[i]), coord[i]); } } item.coord = coord; } } return item; } function getAxisInfo$1(item, data, coordSys, seriesModel) { var ret = {}; if (item.valueIndex != null || item.valueDim != null) { ret.valueDataDim = item.valueIndex != null ? data.getDimension(item.valueIndex) : item.valueDim; ret.valueAxis = coordSys.getAxis(dataDimToCoordDim(seriesModel, ret.valueDataDim)); ret.baseAxis = coordSys.getOtherAxis(ret.valueAxis); ret.baseDataDim = data.mapDimension(ret.baseAxis.dim); } else { ret.baseAxis = seriesModel.getBaseAxis(); ret.valueAxis = coordSys.getOtherAxis(ret.baseAxis); ret.baseDataDim = data.mapDimension(ret.baseAxis.dim); ret.valueDataDim = data.mapDimension(ret.valueAxis.dim); } return ret; } function dataDimToCoordDim(seriesModel, dataDim) { var data = seriesModel.getData(); var dimensions = data.dimensions; dataDim = data.getDimension(dataDim); for (var i = 0; i < dimensions.length; i++) { var dimItem = data.getDimensionInfo(dimensions[i]); if (dimItem.name === dataDim) { return dimItem.coordDim; } } } /** * Filter data which is out of coordinateSystem range * [dataFilter description] */ function dataFilter$1( // Currently only polar and cartesian has containData. coordSys, item) { // Alwalys return true if there is no coordSys return coordSys && coordSys.containData && item.coord && !hasXOrY(item) ? coordSys.containData(item.coord) : true; } function dimValueGetter(item, dimName, dataIndex, dimIndex) { // x, y, radius, angle if (dimIndex < 2) { return item.coord && item.coord[dimIndex]; } return item.value; } function numCalculate(data, valueDataDim, type) { if (type === 'average') { var sum_1 = 0; var count_1 = 0; data.each(valueDataDim, function (val, idx) { if (!isNaN(val)) { sum_1 += val; count_1++; } }); return sum_1 / count_1; } else if (type === 'median') { return data.getMedian(valueDataDim); } else { // max & min return data.getDataExtent(valueDataDim)[type === 'max' ? 1 : 0]; } } var inner$h = makeInner(); var MarkerView = /** @class */ function (_super) { __extends(MarkerView, _super); function MarkerView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = MarkerView.type; return _this; } MarkerView.prototype.init = function () { this.markerGroupMap = createHashMap(); }; MarkerView.prototype.render = function (markerModel, ecModel, api) { var _this = this; var markerGroupMap = this.markerGroupMap; markerGroupMap.each(function (item) { inner$h(item).keep = false; }); ecModel.eachSeries(function (seriesModel) { var markerModel = MarkerModel.getMarkerModelFromSeries(seriesModel, _this.type); markerModel && _this.renderSeries(seriesModel, markerModel, ecModel, api); }); markerGroupMap.each(function (item) { !inner$h(item).keep && _this.group.remove(item.group); }); }; MarkerView.prototype.markKeep = function (drawGroup) { inner$h(drawGroup).keep = true; }; MarkerView.prototype.blurSeries = function (seriesModelList) { var _this = this; each(seriesModelList, function (seriesModel) { var markerModel = MarkerModel.getMarkerModelFromSeries(seriesModel, _this.type); if (markerModel) { var data = markerModel.getData(); data.eachItemGraphicEl(function (el) { if (el) { enterBlur(el); } }); } }); }; MarkerView.type = 'marker'; return MarkerView; }(ComponentView); function updateMarkerLayout(mpData, seriesModel, api) { var coordSys = seriesModel.coordinateSystem; mpData.each(function (idx) { var itemModel = mpData.getItemModel(idx); var point; var xPx = parsePercent$1(itemModel.get('x'), api.getWidth()); var yPx = parsePercent$1(itemModel.get('y'), api.getHeight()); if (!isNaN(xPx) && !isNaN(yPx)) { point = [xPx, yPx]; } // Chart like bar may have there own marker positioning logic else if (seriesModel.getMarkerPosition) { // Use the getMarkerPoisition point = seriesModel.getMarkerPosition(mpData.getValues(mpData.dimensions, idx)); } else if (coordSys) { var x = mpData.get(coordSys.dimensions[0], idx); var y = mpData.get(coordSys.dimensions[1], idx); point = coordSys.dataToPoint([x, y]); } // Use x, y if has any if (!isNaN(xPx)) { point[0] = xPx; } if (!isNaN(yPx)) { point[1] = yPx; } mpData.setItemLayout(idx, point); }); } var MarkPointView = /** @class */ function (_super) { __extends(MarkPointView, _super); function MarkPointView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = MarkPointView.type; return _this; } MarkPointView.prototype.updateTransform = function (markPointModel, ecModel, api) { ecModel.eachSeries(function (seriesModel) { var mpModel = MarkerModel.getMarkerModelFromSeries(seriesModel, 'markPoint'); if (mpModel) { updateMarkerLayout(mpModel.getData(), seriesModel, api); this.markerGroupMap.get(seriesModel.id).updateLayout(); } }, this); }; MarkPointView.prototype.renderSeries = function (seriesModel, mpModel, ecModel, api) { var coordSys = seriesModel.coordinateSystem; var seriesId = seriesModel.id; var seriesData = seriesModel.getData(); var symbolDrawMap = this.markerGroupMap; var symbolDraw = symbolDrawMap.get(seriesId) || symbolDrawMap.set(seriesId, new SymbolDraw()); var mpData = createList$1(coordSys, seriesModel, mpModel); // FIXME mpModel.setData(mpData); updateMarkerLayout(mpModel.getData(), seriesModel, api); mpData.each(function (idx) { var itemModel = mpData.getItemModel(idx); var symbol = itemModel.getShallow('symbol'); var symbolSize = itemModel.getShallow('symbolSize'); var symbolRotate = itemModel.getShallow('symbolRotate'); if (isFunction(symbol) || isFunction(symbolSize) || isFunction(symbolRotate)) { var rawIdx = mpModel.getRawValue(idx); var dataParams = mpModel.getDataParams(idx); if (isFunction(symbol)) { symbol = symbol(rawIdx, dataParams); } if (isFunction(symbolSize)) { // FIXME 这里不兼容 ECharts 2.x,2.x 貌似参数是整个数据? symbolSize = symbolSize(rawIdx, dataParams); } if (isFunction(symbolRotate)) { symbolRotate = symbolRotate(rawIdx, dataParams); } } var style = itemModel.getModel('itemStyle').getItemStyle(); var color = getVisualFromData(seriesData, 'color'); if (!style.fill) { style.fill = color; } mpData.setItemVisual(idx, { symbol: symbol, symbolSize: symbolSize, symbolRotate: symbolRotate, style: style }); }); // TODO Text are wrong symbolDraw.updateData(mpData); this.group.add(symbolDraw.group); // Set host model for tooltip // FIXME mpData.eachItemGraphicEl(function (el) { el.traverse(function (child) { getECData(child).dataModel = mpModel; }); }); this.markKeep(symbolDraw); symbolDraw.group.silent = mpModel.get('silent') || seriesModel.get('silent'); }; MarkPointView.type = 'markPoint'; return MarkPointView; }(MarkerView); function createList$1(coordSys, seriesModel, mpModel) { var coordDimsInfos; if (coordSys) { coordDimsInfos = map(coordSys && coordSys.dimensions, function (coordDim) { var info = seriesModel.getData().getDimensionInfo(seriesModel.getData().mapDimension(coordDim)) || {}; // In map series data don't have lng and lat dimension. Fallback to same with coordSys return defaults({ name: coordDim }, info); }); } else { coordDimsInfos = [{ name: 'value', type: 'float' }]; } var mpData = new List(coordDimsInfos, mpModel); var dataOpt = map(mpModel.get('data'), curry(dataTransform, seriesModel)); if (coordSys) { dataOpt = filter(dataOpt, curry(dataFilter$1, coordSys)); } mpData.initData(dataOpt, null, coordSys ? dimValueGetter : function (item) { return item.value; }); return mpData; } function install$E(registers) { registers.registerComponentModel(MarkPointModel); registers.registerComponentView(MarkPointView); registers.registerPreprocessor(function (opt) { if (checkMarkerInSeries(opt.series, 'markPoint')) { // Make sure markPoint component is enabled opt.markPoint = opt.markPoint || {}; } }); } var MarkLineModel = /** @class */ function (_super) { __extends(MarkLineModel, _super); function MarkLineModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = MarkLineModel.type; return _this; } MarkLineModel.prototype.createMarkerModelFromSeries = function (markerOpt, masterMarkerModel, ecModel) { return new MarkLineModel(markerOpt, masterMarkerModel, ecModel); }; MarkLineModel.type = 'markLine'; MarkLineModel.defaultOption = { zlevel: 0, z: 5, symbol: ['circle', 'arrow'], symbolSize: [8, 16], //symbolRotate: 0, symbolOffset: 0, precision: 2, tooltip: { trigger: 'item' }, label: { show: true, position: 'end', distance: 5 }, lineStyle: { type: 'dashed' }, emphasis: { label: { show: true }, lineStyle: { width: 3 } }, animationEasing: 'linear' }; return MarkLineModel; }(MarkerModel); var inner$i = makeInner(); var markLineTransform = function (seriesModel, coordSys, mlModel, item) { var data = seriesModel.getData(); var itemArray; if (!isArray(item)) { // Special type markLine like 'min', 'max', 'average', 'median' var mlType = item.type; if (mlType === 'min' || mlType === 'max' || mlType === 'average' || mlType === 'median' // In case // data: [{ // yAxis: 10 // }] || item.xAxis != null || item.yAxis != null) { var valueAxis = void 0; var value = void 0; if (item.yAxis != null || item.xAxis != null) { valueAxis = coordSys.getAxis(item.yAxis != null ? 'y' : 'x'); value = retrieve(item.yAxis, item.xAxis); } else { var axisInfo = getAxisInfo$1(item, data, coordSys, seriesModel); valueAxis = axisInfo.valueAxis; var valueDataDim = getStackedDimension(data, axisInfo.valueDataDim); value = numCalculate(data, valueDataDim, mlType); } var valueIndex = valueAxis.dim === 'x' ? 0 : 1; var baseIndex = 1 - valueIndex; // Normized to 2d data with start and end point var mlFrom = clone(item); var mlTo = { coord: [] }; mlFrom.type = null; mlFrom.coord = []; mlFrom.coord[baseIndex] = -Infinity; mlTo.coord[baseIndex] = Infinity; var precision = mlModel.get('precision'); if (precision >= 0 && typeof value === 'number') { value = +value.toFixed(Math.min(precision, 20)); } mlFrom.coord[valueIndex] = mlTo.coord[valueIndex] = value; itemArray = [mlFrom, mlTo, { type: mlType, valueIndex: item.valueIndex, // Force to use the value of calculated value. value: value }]; } else { // Invalid data if ("development" !== 'production') { logError('Invalid markLine data.'); } itemArray = []; } } else { itemArray = item; } var normalizedItem = [dataTransform(seriesModel, itemArray[0]), dataTransform(seriesModel, itemArray[1]), extend({}, itemArray[2])]; // Avoid line data type is extended by from(to) data type normalizedItem[2].type = normalizedItem[2].type || null; // Merge from option and to option into line option merge(normalizedItem[2], normalizedItem[0]); merge(normalizedItem[2], normalizedItem[1]); return normalizedItem; }; function isInifinity(val) { return !isNaN(val) && !isFinite(val); } // If a markLine has one dim function ifMarkLineHasOnlyDim(dimIndex, fromCoord, toCoord, coordSys) { var otherDimIndex = 1 - dimIndex; var dimName = coordSys.dimensions[dimIndex]; return isInifinity(fromCoord[otherDimIndex]) && isInifinity(toCoord[otherDimIndex]) && fromCoord[dimIndex] === toCoord[dimIndex] && coordSys.getAxis(dimName).containData(fromCoord[dimIndex]); } function markLineFilter(coordSys, item) { if (coordSys.type === 'cartesian2d') { var fromCoord = item[0].coord; var toCoord = item[1].coord; // In case // { // markLine: { // data: [{ yAxis: 2 }] // } // } if (fromCoord && toCoord && (ifMarkLineHasOnlyDim(1, fromCoord, toCoord, coordSys) || ifMarkLineHasOnlyDim(0, fromCoord, toCoord, coordSys))) { return true; } } return dataFilter$1(coordSys, item[0]) && dataFilter$1(coordSys, item[1]); } function updateSingleMarkerEndLayout(data, idx, isFrom, seriesModel, api) { var coordSys = seriesModel.coordinateSystem; var itemModel = data.getItemModel(idx); var point; var xPx = parsePercent$1(itemModel.get('x'), api.getWidth()); var yPx = parsePercent$1(itemModel.get('y'), api.getHeight()); if (!isNaN(xPx) && !isNaN(yPx)) { point = [xPx, yPx]; } else { // Chart like bar may have there own marker positioning logic if (seriesModel.getMarkerPosition) { // Use the getMarkerPoisition point = seriesModel.getMarkerPosition(data.getValues(data.dimensions, idx)); } else { var dims = coordSys.dimensions; var x = data.get(dims[0], idx); var y = data.get(dims[1], idx); point = coordSys.dataToPoint([x, y]); } // Expand line to the edge of grid if value on one axis is Inifnity // In case // markLine: { // data: [{ // yAxis: 2 // // or // type: 'average' // }] // } if (isCoordinateSystemType(coordSys, 'cartesian2d')) { // TODO: TYPE ts@4.1 may still infer it as Axis instead of Axis2D. Not sure if it's a bug var xAxis = coordSys.getAxis('x'); var yAxis = coordSys.getAxis('y'); var dims = coordSys.dimensions; if (isInifinity(data.get(dims[0], idx))) { point[0] = xAxis.toGlobalCoord(xAxis.getExtent()[isFrom ? 0 : 1]); } else if (isInifinity(data.get(dims[1], idx))) { point[1] = yAxis.toGlobalCoord(yAxis.getExtent()[isFrom ? 0 : 1]); } } // Use x, y if has any if (!isNaN(xPx)) { point[0] = xPx; } if (!isNaN(yPx)) { point[1] = yPx; } } data.setItemLayout(idx, point); } var MarkLineView = /** @class */ function (_super) { __extends(MarkLineView, _super); function MarkLineView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = MarkLineView.type; return _this; } MarkLineView.prototype.updateTransform = function (markLineModel, ecModel, api) { ecModel.eachSeries(function (seriesModel) { var mlModel = MarkerModel.getMarkerModelFromSeries(seriesModel, 'markLine'); if (mlModel) { var mlData_1 = mlModel.getData(); var fromData_1 = inner$i(mlModel).from; var toData_1 = inner$i(mlModel).to; // Update visual and layout of from symbol and to symbol fromData_1.each(function (idx) { updateSingleMarkerEndLayout(fromData_1, idx, true, seriesModel, api); updateSingleMarkerEndLayout(toData_1, idx, false, seriesModel, api); }); // Update layout of line mlData_1.each(function (idx) { mlData_1.setItemLayout(idx, [fromData_1.getItemLayout(idx), toData_1.getItemLayout(idx)]); }); this.markerGroupMap.get(seriesModel.id).updateLayout(); } }, this); }; MarkLineView.prototype.renderSeries = function (seriesModel, mlModel, ecModel, api) { var coordSys = seriesModel.coordinateSystem; var seriesId = seriesModel.id; var seriesData = seriesModel.getData(); var lineDrawMap = this.markerGroupMap; var lineDraw = lineDrawMap.get(seriesId) || lineDrawMap.set(seriesId, new LineDraw()); this.group.add(lineDraw.group); var mlData = createList$2(coordSys, seriesModel, mlModel); var fromData = mlData.from; var toData = mlData.to; var lineData = mlData.line; inner$i(mlModel).from = fromData; inner$i(mlModel).to = toData; // Line data for tooltip and formatter mlModel.setData(lineData); var symbolType = mlModel.get('symbol'); var symbolSize = mlModel.get('symbolSize'); var symbolRotate = mlModel.get('symbolRotate'); var symbolOffset = mlModel.get('symbolOffset'); if (!isArray(symbolType)) { symbolType = [symbolType, symbolType]; } if (!isArray(symbolSize)) { symbolSize = [symbolSize, symbolSize]; } if (!isArray(symbolRotate)) { symbolRotate = [symbolRotate, symbolRotate]; } if (!isArray(symbolOffset)) { symbolOffset = [symbolOffset, symbolOffset]; } // Update visual and layout of from symbol and to symbol mlData.from.each(function (idx) { updateDataVisualAndLayout(fromData, idx, true); updateDataVisualAndLayout(toData, idx, false); }); // Update visual and layout of line lineData.each(function (idx) { var lineStyle = lineData.getItemModel(idx).getModel('lineStyle').getLineStyle(); // lineData.setItemVisual(idx, { // color: lineColor || fromData.getItemVisual(idx, 'color') // }); lineData.setItemLayout(idx, [fromData.getItemLayout(idx), toData.getItemLayout(idx)]); if (lineStyle.stroke == null) { lineStyle.stroke = fromData.getItemVisual(idx, 'style').fill; } lineData.setItemVisual(idx, { fromSymbolKeepAspect: fromData.getItemVisual(idx, 'symbolKeepAspect'), fromSymbolOffset: fromData.getItemVisual(idx, 'symbolOffset'), fromSymbolRotate: fromData.getItemVisual(idx, 'symbolRotate'), fromSymbolSize: fromData.getItemVisual(idx, 'symbolSize'), fromSymbol: fromData.getItemVisual(idx, 'symbol'), toSymbolKeepAspect: toData.getItemVisual(idx, 'symbolKeepAspect'), toSymbolOffset: toData.getItemVisual(idx, 'symbolOffset'), toSymbolRotate: toData.getItemVisual(idx, 'symbolRotate'), toSymbolSize: toData.getItemVisual(idx, 'symbolSize'), toSymbol: toData.getItemVisual(idx, 'symbol'), style: lineStyle }); }); lineDraw.updateData(lineData); // Set host model for tooltip // FIXME mlData.line.eachItemGraphicEl(function (el, idx) { el.traverse(function (child) { getECData(child).dataModel = mlModel; }); }); function updateDataVisualAndLayout(data, idx, isFrom) { var itemModel = data.getItemModel(idx); updateSingleMarkerEndLayout(data, idx, isFrom, seriesModel, api); var style = itemModel.getModel('itemStyle').getItemStyle(); if (style.fill == null) { style.fill = getVisualFromData(seriesData, 'color'); } data.setItemVisual(idx, { symbolKeepAspect: itemModel.get('symbolKeepAspect'), // `0` should be considered as a valid value, so use `retrieve2` instead of `||` symbolOffset: retrieve2(itemModel.get('symbolOffset'), symbolOffset[isFrom ? 0 : 1]), symbolRotate: retrieve2(itemModel.get('symbolRotate', true), symbolRotate[isFrom ? 0 : 1]), symbolSize: retrieve2(itemModel.get('symbolSize'), symbolSize[isFrom ? 0 : 1]), symbol: retrieve2(itemModel.get('symbol', true), symbolType[isFrom ? 0 : 1]), style: style }); } this.markKeep(lineDraw); lineDraw.group.silent = mlModel.get('silent') || seriesModel.get('silent'); }; MarkLineView.type = 'markLine'; return MarkLineView; }(MarkerView); function createList$2(coordSys, seriesModel, mlModel) { var coordDimsInfos; if (coordSys) { coordDimsInfos = map(coordSys && coordSys.dimensions, function (coordDim) { var info = seriesModel.getData().getDimensionInfo(seriesModel.getData().mapDimension(coordDim)) || {}; // In map series data don't have lng and lat dimension. Fallback to same with coordSys return defaults({ name: coordDim }, info); }); } else { coordDimsInfos = [{ name: 'value', type: 'float' }]; } var fromData = new List(coordDimsInfos, mlModel); var toData = new List(coordDimsInfos, mlModel); // No dimensions var lineData = new List([], mlModel); var optData = map(mlModel.get('data'), curry(markLineTransform, seriesModel, coordSys, mlModel)); if (coordSys) { optData = filter(optData, curry(markLineFilter, coordSys)); } var dimValueGetter$1 = coordSys ? dimValueGetter : function (item) { return item.value; }; fromData.initData(map(optData, function (item) { return item[0]; }), null, dimValueGetter$1); toData.initData(map(optData, function (item) { return item[1]; }), null, dimValueGetter$1); lineData.initData(map(optData, function (item) { return item[2]; })); lineData.hasItemOption = true; return { from: fromData, to: toData, line: lineData }; } function install$F(registers) { registers.registerComponentModel(MarkLineModel); registers.registerComponentView(MarkLineView); registers.registerPreprocessor(function (opt) { if (checkMarkerInSeries(opt.series, 'markLine')) { // Make sure markLine component is enabled opt.markLine = opt.markLine || {}; } }); } var MarkAreaModel = /** @class */ function (_super) { __extends(MarkAreaModel, _super); function MarkAreaModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = MarkAreaModel.type; return _this; } MarkAreaModel.prototype.createMarkerModelFromSeries = function (markerOpt, masterMarkerModel, ecModel) { return new MarkAreaModel(markerOpt, masterMarkerModel, ecModel); }; MarkAreaModel.type = 'markArea'; MarkAreaModel.defaultOption = { zlevel: 0, // PENDING z: 1, tooltip: { trigger: 'item' }, // markArea should fixed on the coordinate system animation: false, label: { show: true, position: 'top' }, itemStyle: { // color and borderColor default to use color from series // color: 'auto' // borderColor: 'auto' borderWidth: 0 }, emphasis: { label: { show: true, position: 'top' } } }; return MarkAreaModel; }(MarkerModel); var inner$j = makeInner(); var markAreaTransform = function (seriesModel, coordSys, maModel, item) { var lt = dataTransform(seriesModel, item[0]); var rb = dataTransform(seriesModel, item[1]); // FIXME make sure lt is less than rb var ltCoord = lt.coord; var rbCoord = rb.coord; ltCoord[0] = retrieve(ltCoord[0], -Infinity); ltCoord[1] = retrieve(ltCoord[1], -Infinity); rbCoord[0] = retrieve(rbCoord[0], Infinity); rbCoord[1] = retrieve(rbCoord[1], Infinity); // Merge option into one var result = mergeAll([{}, lt, rb]); result.coord = [lt.coord, rb.coord]; result.x0 = lt.x; result.y0 = lt.y; result.x1 = rb.x; result.y1 = rb.y; return result; }; function isInifinity$1(val) { return !isNaN(val) && !isFinite(val); } // If a markArea has one dim function ifMarkAreaHasOnlyDim(dimIndex, fromCoord, toCoord, coordSys) { var otherDimIndex = 1 - dimIndex; return isInifinity$1(fromCoord[otherDimIndex]) && isInifinity$1(toCoord[otherDimIndex]); } function markAreaFilter(coordSys, item) { var fromCoord = item.coord[0]; var toCoord = item.coord[1]; if (isCoordinateSystemType(coordSys, 'cartesian2d')) { // In case // { // markArea: { // data: [{ yAxis: 2 }] // } // } if (fromCoord && toCoord && (ifMarkAreaHasOnlyDim(1, fromCoord, toCoord) || ifMarkAreaHasOnlyDim(0, fromCoord, toCoord))) { return true; } } return dataFilter$1(coordSys, { coord: fromCoord, x: item.x0, y: item.y0 }) || dataFilter$1(coordSys, { coord: toCoord, x: item.x1, y: item.y1 }); } // dims can be ['x0', 'y0'], ['x1', 'y1'], ['x0', 'y1'], ['x1', 'y0'] function getSingleMarkerEndPoint(data, idx, dims, seriesModel, api) { var coordSys = seriesModel.coordinateSystem; var itemModel = data.getItemModel(idx); var point; var xPx = parsePercent$1(itemModel.get(dims[0]), api.getWidth()); var yPx = parsePercent$1(itemModel.get(dims[1]), api.getHeight()); if (!isNaN(xPx) && !isNaN(yPx)) { point = [xPx, yPx]; } else { // Chart like bar may have there own marker positioning logic if (seriesModel.getMarkerPosition) { // Use the getMarkerPoisition point = seriesModel.getMarkerPosition(data.getValues(dims, idx)); } else { var x = data.get(dims[0], idx); var y = data.get(dims[1], idx); var pt = [x, y]; coordSys.clampData && coordSys.clampData(pt, pt); point = coordSys.dataToPoint(pt, true); } if (isCoordinateSystemType(coordSys, 'cartesian2d')) { // TODO: TYPE ts@4.1 may still infer it as Axis instead of Axis2D. Not sure if it's a bug var xAxis = coordSys.getAxis('x'); var yAxis = coordSys.getAxis('y'); var x = data.get(dims[0], idx); var y = data.get(dims[1], idx); if (isInifinity$1(x)) { point[0] = xAxis.toGlobalCoord(xAxis.getExtent()[dims[0] === 'x0' ? 0 : 1]); } else if (isInifinity$1(y)) { point[1] = yAxis.toGlobalCoord(yAxis.getExtent()[dims[1] === 'y0' ? 0 : 1]); } } // Use x, y if has any if (!isNaN(xPx)) { point[0] = xPx; } if (!isNaN(yPx)) { point[1] = yPx; } } return point; } var dimPermutations = [['x0', 'y0'], ['x1', 'y0'], ['x1', 'y1'], ['x0', 'y1']]; var MarkAreaView = /** @class */ function (_super) { __extends(MarkAreaView, _super); function MarkAreaView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = MarkAreaView.type; return _this; } MarkAreaView.prototype.updateTransform = function (markAreaModel, ecModel, api) { ecModel.eachSeries(function (seriesModel) { var maModel = MarkerModel.getMarkerModelFromSeries(seriesModel, 'markArea'); if (maModel) { var areaData_1 = maModel.getData(); areaData_1.each(function (idx) { var points = map(dimPermutations, function (dim) { return getSingleMarkerEndPoint(areaData_1, idx, dim, seriesModel, api); }); // Layout areaData_1.setItemLayout(idx, points); var el = areaData_1.getItemGraphicEl(idx); el.setShape('points', points); }); } }, this); }; MarkAreaView.prototype.renderSeries = function (seriesModel, maModel, ecModel, api) { var coordSys = seriesModel.coordinateSystem; var seriesId = seriesModel.id; var seriesData = seriesModel.getData(); var areaGroupMap = this.markerGroupMap; var polygonGroup = areaGroupMap.get(seriesId) || areaGroupMap.set(seriesId, { group: new Group() }); this.group.add(polygonGroup.group); this.markKeep(polygonGroup); var areaData = createList$3(coordSys, seriesModel, maModel); // Line data for tooltip and formatter maModel.setData(areaData); // Update visual and layout of line areaData.each(function (idx) { // Layout var points = map(dimPermutations, function (dim) { return getSingleMarkerEndPoint(areaData, idx, dim, seriesModel, api); }); var xAxisScale = coordSys.getAxis('x').scale; var yAxisScale = coordSys.getAxis('y').scale; var xAxisExtent = xAxisScale.getExtent(); var yAxisExtent = yAxisScale.getExtent(); var xPointExtent = [xAxisScale.parse(areaData.get('x0', idx)), xAxisScale.parse(areaData.get('x1', idx))]; var yPointExtent = [yAxisScale.parse(areaData.get('y0', idx)), yAxisScale.parse(areaData.get('y1', idx))]; asc(xPointExtent); asc(yPointExtent); var overlapped = !(xAxisExtent[0] > xPointExtent[1] || xAxisExtent[1] < xPointExtent[0] || yAxisExtent[0] > yPointExtent[1] || yAxisExtent[1] < yPointExtent[0]); // If none of the area is inside coordSys, allClipped is set to be true // in layout so that label will not be displayed. See #12591 var allClipped = !overlapped; areaData.setItemLayout(idx, { points: points, allClipped: allClipped }); var style = areaData.getItemModel(idx).getModel('itemStyle').getItemStyle(); var color$1 = getVisualFromData(seriesData, 'color'); if (!style.fill) { style.fill = color$1; if (typeof style.fill === 'string') { style.fill = modifyAlpha(style.fill, 0.4); } } if (!style.stroke) { style.stroke = color$1; } // Visual areaData.setItemVisual(idx, 'style', style); }); areaData.diff(inner$j(polygonGroup).data).add(function (idx) { var layout = areaData.getItemLayout(idx); if (!layout.allClipped) { var polygon = new Polygon({ shape: { points: layout.points } }); areaData.setItemGraphicEl(idx, polygon); polygonGroup.group.add(polygon); } }).update(function (newIdx, oldIdx) { var polygon = inner$j(polygonGroup).data.getItemGraphicEl(oldIdx); var layout = areaData.getItemLayout(newIdx); if (!layout.allClipped) { if (polygon) { updateProps(polygon, { shape: { points: layout.points } }, maModel, newIdx); } else { polygon = new Polygon({ shape: { points: layout.points } }); } areaData.setItemGraphicEl(newIdx, polygon); polygonGroup.group.add(polygon); } else if (polygon) { polygonGroup.group.remove(polygon); } }).remove(function (idx) { var polygon = inner$j(polygonGroup).data.getItemGraphicEl(idx); polygonGroup.group.remove(polygon); }).execute(); areaData.eachItemGraphicEl(function (polygon, idx) { var itemModel = areaData.getItemModel(idx); var style = areaData.getItemVisual(idx, 'style'); polygon.useStyle(areaData.getItemVisual(idx, 'style')); setLabelStyle(polygon, getLabelStatesModels(itemModel), { labelFetcher: maModel, labelDataIndex: idx, defaultText: areaData.getName(idx) || '', inheritColor: typeof style.fill === 'string' ? modifyAlpha(style.fill, 1) : '#000' }); setStatesStylesFromModel(polygon, itemModel); enableHoverEmphasis(polygon); getECData(polygon).dataModel = maModel; }); inner$j(polygonGroup).data = areaData; polygonGroup.group.silent = maModel.get('silent') || seriesModel.get('silent'); }; MarkAreaView.type = 'markArea'; return MarkAreaView; }(MarkerView); function createList$3(coordSys, seriesModel, maModel) { var coordDimsInfos; var areaData; var dims = ['x0', 'y0', 'x1', 'y1']; if (coordSys) { coordDimsInfos = map(coordSys && coordSys.dimensions, function (coordDim) { var data = seriesModel.getData(); var info = data.getDimensionInfo(data.mapDimension(coordDim)) || {}; // In map series data don't have lng and lat dimension. Fallback to same with coordSys return defaults({ name: coordDim }, info); }); areaData = new List(map(dims, function (dim, idx) { return { name: dim, type: coordDimsInfos[idx % 2].type }; }), maModel); } else { coordDimsInfos = [{ name: 'value', type: 'float' }]; areaData = new List(coordDimsInfos, maModel); } var optData = map(maModel.get('data'), curry(markAreaTransform, seriesModel, coordSys, maModel)); if (coordSys) { optData = filter(optData, curry(markAreaFilter, coordSys)); } var dimValueGetter = coordSys ? function (item, dimName, dataIndex, dimIndex) { // TODO should convert to ParsedValue? return item.coord[Math.floor(dimIndex / 2)][dimIndex % 2]; } : function (item) { return item.value; }; areaData.initData(optData, null, dimValueGetter); areaData.hasItemOption = true; return areaData; } function install$G(registers) { registers.registerComponentModel(MarkAreaModel); registers.registerComponentView(MarkAreaView); registers.registerPreprocessor(function (opt) { if (checkMarkerInSeries(opt.series, 'markArea')) { // Make sure markArea component is enabled opt.markArea = opt.markArea || {}; } }); } var getDefaultSelectorOptions = function (ecModel, type) { if (type === 'all') { return { type: 'all', title: ecModel.getLocale(['legend', 'selector', 'all']) }; } else if (type === 'inverse') { return { type: 'inverse', title: ecModel.getLocale(['legend', 'selector', 'inverse']) }; } }; var LegendModel = /** @class */ function (_super) { __extends(LegendModel, _super); function LegendModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = LegendModel.type; _this.layoutMode = { type: 'box', // legend.width/height are maxWidth/maxHeight actually, // whereas realy width/height is calculated by its content. // (Setting {left: 10, right: 10} does not make sense). // So consider the case: // `setOption({legend: {left: 10});` // then `setOption({legend: {right: 10});` // The previous `left` should be cleared by setting `ignoreSize`. ignoreSize: true }; return _this; } LegendModel.prototype.init = function (option, parentModel, ecModel) { this.mergeDefaultAndTheme(option, ecModel); option.selected = option.selected || {}; this._updateSelector(option); }; LegendModel.prototype.mergeOption = function (option, ecModel) { _super.prototype.mergeOption.call(this, option, ecModel); this._updateSelector(option); }; LegendModel.prototype._updateSelector = function (option) { var selector = option.selector; var ecModel = this.ecModel; if (selector === true) { selector = option.selector = ['all', 'inverse']; } if (isArray(selector)) { each(selector, function (item, index) { isString(item) && (item = { type: item }); selector[index] = merge(item, getDefaultSelectorOptions(ecModel, item.type)); }); } }; LegendModel.prototype.optionUpdated = function () { this._updateData(this.ecModel); var legendData = this._data; // If selectedMode is single, try to select one if (legendData[0] && this.get('selectedMode') === 'single') { var hasSelected = false; // If has any selected in option.selected for (var i = 0; i < legendData.length; i++) { var name_1 = legendData[i].get('name'); if (this.isSelected(name_1)) { // Force to unselect others this.select(name_1); hasSelected = true; break; } } // Try select the first if selectedMode is single !hasSelected && this.select(legendData[0].get('name')); } }; LegendModel.prototype._updateData = function (ecModel) { var potentialData = []; var availableNames = []; ecModel.eachRawSeries(function (seriesModel) { var seriesName = seriesModel.name; availableNames.push(seriesName); var isPotential; if (seriesModel.legendVisualProvider) { var provider = seriesModel.legendVisualProvider; var names = provider.getAllNames(); if (!ecModel.isSeriesFiltered(seriesModel)) { availableNames = availableNames.concat(names); } if (names.length) { potentialData = potentialData.concat(names); } else { isPotential = true; } } else { isPotential = true; } if (isPotential && isNameSpecified(seriesModel)) { potentialData.push(seriesModel.name); } }); /** * @type {Array.} * @private */ this._availableNames = availableNames; // If legend.data not specified in option, use availableNames as data, // which is convinient for user preparing option. var rawData = this.get('data') || potentialData; var legendData = map(rawData, function (dataItem) { // Can be string or number if (typeof dataItem === 'string' || typeof dataItem === 'number') { dataItem = { name: dataItem }; } return new Model(dataItem, this, this.ecModel); }, this); /** * @type {Array.} * @private */ this._data = legendData; }; LegendModel.prototype.getData = function () { return this._data; }; LegendModel.prototype.select = function (name) { var selected = this.option.selected; var selectedMode = this.get('selectedMode'); if (selectedMode === 'single') { var data = this._data; each(data, function (dataItem) { selected[dataItem.get('name')] = false; }); } selected[name] = true; }; LegendModel.prototype.unSelect = function (name) { if (this.get('selectedMode') !== 'single') { this.option.selected[name] = false; } }; LegendModel.prototype.toggleSelected = function (name) { var selected = this.option.selected; // Default is true if (!selected.hasOwnProperty(name)) { selected[name] = true; } this[selected[name] ? 'unSelect' : 'select'](name); }; LegendModel.prototype.allSelect = function () { var data = this._data; var selected = this.option.selected; each(data, function (dataItem) { selected[dataItem.get('name', true)] = true; }); }; LegendModel.prototype.inverseSelect = function () { var data = this._data; var selected = this.option.selected; each(data, function (dataItem) { var name = dataItem.get('name', true); // Initially, default value is true if (!selected.hasOwnProperty(name)) { selected[name] = true; } selected[name] = !selected[name]; }); }; LegendModel.prototype.isSelected = function (name) { var selected = this.option.selected; return !(selected.hasOwnProperty(name) && !selected[name]) && indexOf(this._availableNames, name) >= 0; }; LegendModel.prototype.getOrient = function () { return this.get('orient') === 'vertical' ? { index: 1, name: 'vertical' } : { index: 0, name: 'horizontal' }; }; LegendModel.type = 'legend.plain'; LegendModel.dependencies = ['series']; LegendModel.defaultOption = { zlevel: 0, z: 4, show: true, orient: 'horizontal', left: 'center', // right: 'center', top: 0, // bottom: null, align: 'auto', backgroundColor: 'rgba(0,0,0,0)', borderColor: '#ccc', borderRadius: 0, borderWidth: 0, padding: 5, itemGap: 10, itemWidth: 25, itemHeight: 14, symbolSize: 'auto', inactiveColor: '#ccc', inactiveBorderColor: '#ccc', inactiveBorderWidth: 'auto', itemStyle: { color: 'inherit', opacity: 'inherit', decal: 'inherit', shadowBlur: 0, shadowColor: null, shadowOffsetX: 0, shadowOffsetY: 0, borderColor: 'inherit', borderWidth: 'auto', borderCap: 'inherit', borderJoin: 'inherit', borderDashOffset: 'inherit', borderMiterLimit: 'inherit' }, lineStyle: { width: 'auto', color: 'inherit', inactiveColor: '#ccc', inactiveWidth: 2, opacity: 'inherit', type: 'inherit', cap: 'inherit', join: 'inherit', dashOffset: 'inherit', miterLimit: 'inherit', shadowBlur: 0, shadowColor: null, shadowOffsetX: 0, shadowOffsetY: 0 }, textStyle: { color: '#333' }, selectedMode: true, selector: false, selectorLabel: { show: true, borderRadius: 10, padding: [3, 5, 3, 5], fontSize: 12, fontFamily: ' sans-serif', color: '#666', borderWidth: 1, borderColor: '#666' }, emphasis: { selectorLabel: { show: true, color: '#eee', backgroundColor: '#666' } }, selectorPosition: 'auto', selectorItemGap: 7, selectorButtonGap: 10, tooltip: { show: false } }; return LegendModel; }(ComponentModel); var curry$1 = curry; var each$e = each; var Group$2 = Group; var LegendView = /** @class */ function (_super) { __extends(LegendView, _super); function LegendView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = LegendView.type; _this.newlineDisabled = false; return _this; } LegendView.prototype.init = function () { this.group.add(this._contentGroup = new Group$2()); this.group.add(this._selectorGroup = new Group$2()); this._isFirstRender = true; }; /** * @protected */ LegendView.prototype.getContentGroup = function () { return this._contentGroup; }; /** * @protected */ LegendView.prototype.getSelectorGroup = function () { return this._selectorGroup; }; /** * @override */ LegendView.prototype.render = function (legendModel, ecModel, api) { var isFirstRender = this._isFirstRender; this._isFirstRender = false; this.resetInner(); if (!legendModel.get('show', true)) { return; } var itemAlign = legendModel.get('align'); var orient = legendModel.get('orient'); if (!itemAlign || itemAlign === 'auto') { itemAlign = legendModel.get('left') === 'right' && orient === 'vertical' ? 'right' : 'left'; } // selector has been normalized to an array in model var selector = legendModel.get('selector', true); var selectorPosition = legendModel.get('selectorPosition', true); if (selector && (!selectorPosition || selectorPosition === 'auto')) { selectorPosition = orient === 'horizontal' ? 'end' : 'start'; } this.renderInner(itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition); // Perform layout. var positionInfo = legendModel.getBoxLayoutParams(); var viewportSize = { width: api.getWidth(), height: api.getHeight() }; var padding = legendModel.get('padding'); var maxSize = getLayoutRect(positionInfo, viewportSize, padding); var mainRect = this.layoutInner(legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition); // Place mainGroup, based on the calculated `mainRect`. var layoutRect = getLayoutRect(defaults({ width: mainRect.width, height: mainRect.height }, positionInfo), viewportSize, padding); this.group.x = layoutRect.x - mainRect.x; this.group.y = layoutRect.y - mainRect.y; this.group.markRedraw(); // Render background after group is layout. this.group.add(this._backgroundEl = makeBackground(mainRect, legendModel)); }; LegendView.prototype.resetInner = function () { this.getContentGroup().removeAll(); this._backgroundEl && this.group.remove(this._backgroundEl); this.getSelectorGroup().removeAll(); }; LegendView.prototype.renderInner = function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) { var contentGroup = this.getContentGroup(); var legendDrawnMap = createHashMap(); var selectMode = legendModel.get('selectedMode'); var excludeSeriesId = []; ecModel.eachRawSeries(function (seriesModel) { !seriesModel.get('legendHoverLink') && excludeSeriesId.push(seriesModel.id); }); each$e(legendModel.getData(), function (legendItemModel, dataIndex) { var name = legendItemModel.get('name'); // Use empty string or \n as a newline string if (!this.newlineDisabled && (name === '' || name === '\n')) { var g = new Group$2(); // @ts-ignore g.newline = true; contentGroup.add(g); return; } // Representitive series. var seriesModel = ecModel.getSeriesByName(name)[0]; if (legendDrawnMap.get(name)) { // Have been drawed return; } // Legend to control series. if (seriesModel) { var data = seriesModel.getData(); var lineVisualStyle = data.getVisual('legendLineStyle') || {}; var symbolType = data.getVisual('legendSymbol'); /** * `data.getVisual('style')` may be the color from the register * in series. For example, for line series, */ var style = data.getVisual('style'); data.getVisual('symbolSize'); var itemGroup = this._createItem(seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, lineVisualStyle, style, symbolType, selectMode); itemGroup.on('click', curry$1(dispatchSelectAction, name, null, api, excludeSeriesId)).on('mouseover', curry$1(dispatchHighlightAction, seriesModel.name, null, api, excludeSeriesId)).on('mouseout', curry$1(dispatchDownplayAction, seriesModel.name, null, api, excludeSeriesId)); legendDrawnMap.set(name, true); } else { // Legend to control data. In pie and funnel. ecModel.eachRawSeries(function (seriesModel) { // In case multiple series has same data name if (legendDrawnMap.get(name)) { return; } if (seriesModel.legendVisualProvider) { var provider = seriesModel.legendVisualProvider; if (!provider.containName(name)) { return; } var idx = provider.indexOfName(name); var style = provider.getItemVisual(idx, 'style'); var symbolType = provider.getItemVisual(idx, 'legendSymbol'); var colorArr = parse(style.fill); // Color may be set to transparent in visualMap when data is out of range. // Do not show nothing. if (colorArr && colorArr[3] === 0) { colorArr[3] = 0.2; // TODO color is set to 0, 0, 0, 0. Should show correct RGBA style.fill = stringify(colorArr, 'rgba'); } var itemGroup = this._createItem(seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, {}, style, symbolType, selectMode); // FIXME: consider different series has items with the same name. itemGroup.on('click', curry$1(dispatchSelectAction, null, name, api, excludeSeriesId)) // Should not specify the series name, consider legend controls // more than one pie series. .on('mouseover', curry$1(dispatchHighlightAction, null, name, api, excludeSeriesId)).on('mouseout', curry$1(dispatchDownplayAction, null, name, api, excludeSeriesId)); legendDrawnMap.set(name, true); } }, this); } if ("development" !== 'production') { if (!legendDrawnMap.get(name)) { console.warn(name + ' series not exists. Legend data should be same with series name or data name.'); } } }, this); if (selector) { this._createSelector(selector, legendModel, api, orient, selectorPosition); } }; LegendView.prototype._createSelector = function (selector, legendModel, api, orient, selectorPosition) { var selectorGroup = this.getSelectorGroup(); each$e(selector, function createSelectorButton(selectorItem) { var type = selectorItem.type; var labelText = new ZRText({ style: { x: 0, y: 0, align: 'center', verticalAlign: 'middle' }, onclick: function () { api.dispatchAction({ type: type === 'all' ? 'legendAllSelect' : 'legendInverseSelect' }); } }); selectorGroup.add(labelText); var labelModel = legendModel.getModel('selectorLabel'); var emphasisLabelModel = legendModel.getModel(['emphasis', 'selectorLabel']); setLabelStyle(labelText, { normal: labelModel, emphasis: emphasisLabelModel }, { defaultText: selectorItem.title }); enableHoverEmphasis(labelText); }); }; LegendView.prototype._createItem = function (seriesModel, name, dataIndex, itemModel, legendModel, itemAlign, lineVisualStyle, itemVisualStyle, symbolType, selectMode) { var drawType = seriesModel.visualDrawType; var itemWidth = legendModel.get('itemWidth'); var itemHeight = legendModel.get('itemHeight'); var isSelected = legendModel.isSelected(name); var symbolKeepAspect = itemModel.get('symbolKeepAspect'); var legendIconType = itemModel.get('icon'); symbolType = legendIconType || symbolType || 'roundRect'; var legendLineStyle = legendModel.getModel('lineStyle'); var style = getLegendStyle(symbolType, itemModel, legendLineStyle, lineVisualStyle, itemVisualStyle, drawType, isSelected); var itemGroup = new Group$2(); var textStyleModel = itemModel.getModel('textStyle'); if (typeof seriesModel.getLegendIcon === 'function' && !legendIconType) { // Series has specific way to define legend icon itemGroup.add(seriesModel.getLegendIcon({ itemWidth: itemWidth, itemHeight: itemHeight, symbolType: symbolType, symbolKeepAspect: symbolKeepAspect, itemStyle: style.itemStyle, lineStyle: style.lineStyle })); } else { // Use default legend icon policy for most series itemGroup.add(getDefaultLegendIcon({ itemWidth: itemWidth, itemHeight: itemHeight, symbolType: symbolType, symbolKeepAspect: symbolKeepAspect, itemStyle: style.itemStyle, lineStyle: style.lineStyle })); } var textX = itemAlign === 'left' ? itemWidth + 5 : -5; var textAlign = itemAlign; var formatter = legendModel.get('formatter'); var content = name; if (typeof formatter === 'string' && formatter) { content = formatter.replace('{name}', name != null ? name : ''); } else if (typeof formatter === 'function') { content = formatter(name); } var inactiveColor = itemModel.get('inactiveColor'); itemGroup.add(new ZRText({ style: createTextStyle(textStyleModel, { text: content, x: textX, y: itemHeight / 2, fill: isSelected ? textStyleModel.getTextColor() : inactiveColor, align: textAlign, verticalAlign: 'middle' }) })); // Add a invisible rect to increase the area of mouse hover var hitRect = new Rect({ shape: itemGroup.getBoundingRect(), invisible: true }); var tooltipModel = itemModel.getModel('tooltip'); if (tooltipModel.get('show')) { setTooltipConfig({ el: hitRect, componentModel: legendModel, itemName: name, itemTooltipOption: tooltipModel.option }); } itemGroup.add(hitRect); itemGroup.eachChild(function (child) { child.silent = true; }); hitRect.silent = !selectMode; this.getContentGroup().add(itemGroup); enableHoverEmphasis(itemGroup); // @ts-ignore itemGroup.__legendDataIndex = dataIndex; return itemGroup; }; LegendView.prototype.layoutInner = function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) { var contentGroup = this.getContentGroup(); var selectorGroup = this.getSelectorGroup(); // Place items in contentGroup. box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), maxSize.width, maxSize.height); var contentRect = contentGroup.getBoundingRect(); var contentPos = [-contentRect.x, -contentRect.y]; selectorGroup.markRedraw(); contentGroup.markRedraw(); if (selector) { // Place buttons in selectorGroup box( // Buttons in selectorGroup always layout horizontally 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true)); var selectorRect = selectorGroup.getBoundingRect(); var selectorPos = [-selectorRect.x, -selectorRect.y]; var selectorButtonGap = legendModel.get('selectorButtonGap', true); var orientIdx = legendModel.getOrient().index; var wh = orientIdx === 0 ? 'width' : 'height'; var hw = orientIdx === 0 ? 'height' : 'width'; var yx = orientIdx === 0 ? 'y' : 'x'; if (selectorPosition === 'end') { selectorPos[orientIdx] += contentRect[wh] + selectorButtonGap; } else { contentPos[orientIdx] += selectorRect[wh] + selectorButtonGap; } //Always align selector to content as 'middle' selectorPos[1 - orientIdx] += contentRect[hw] / 2 - selectorRect[hw] / 2; selectorGroup.x = selectorPos[0]; selectorGroup.y = selectorPos[1]; contentGroup.x = contentPos[0]; contentGroup.y = contentPos[1]; var mainRect = { x: 0, y: 0 }; mainRect[wh] = contentRect[wh] + selectorButtonGap + selectorRect[wh]; mainRect[hw] = Math.max(contentRect[hw], selectorRect[hw]); mainRect[yx] = Math.min(0, selectorRect[yx] + selectorPos[1 - orientIdx]); return mainRect; } else { contentGroup.x = contentPos[0]; contentGroup.y = contentPos[1]; return this.group.getBoundingRect(); } }; /** * @protected */ LegendView.prototype.remove = function () { this.getContentGroup().removeAll(); this._isFirstRender = true; }; LegendView.type = 'legend.plain'; return LegendView; }(ComponentView); function getLegendStyle(symbolType, legendModel, legendLineStyle, lineVisualStyle, itemVisualStyle, drawType, isSelected) { /** * Use series style if is inherit; * elsewise, use legend style */ // itemStyle var legendItemModel = legendModel.getModel('itemStyle'); var itemProperties = ITEM_STYLE_KEY_MAP.concat([['decal']]); var itemStyle = {}; for (var i = 0; i < itemProperties.length; ++i) { var propName = itemProperties[i][itemProperties[i].length - 1]; var visualName = itemProperties[i][0]; var value = legendItemModel.getShallow(propName); if (value === 'inherit') { switch (visualName) { case 'fill': /** * Series with visualDrawType as 'stroke' should have * series stroke as legend fill */ itemStyle.fill = itemVisualStyle[drawType]; break; case 'stroke': /** * symbol type with "emptyXXX" should use fill color * in visual style */ itemStyle.stroke = itemVisualStyle[symbolType.startsWith('empty') ? 'fill' : 'stroke']; break; case 'opacity': /** * Use lineStyle.opacity if drawType is stroke */ itemStyle.opacity = (drawType === 'fill' ? itemVisualStyle : lineVisualStyle).opacity; break; default: itemStyle[visualName] = itemVisualStyle[visualName]; } } else if (value === 'auto' && visualName === 'lineWidth') { // If lineStyle.width is 'auto', it is set to be 2 if series has border itemStyle.lineWidth = itemVisualStyle.lineWidth > 0 ? 2 : 0; } else { itemStyle[visualName] = value; } } // lineStyle var legendLineModel = legendModel.getModel('lineStyle'); var lineProperties = LINE_STYLE_KEY_MAP.concat([['inactiveColor'], ['inactiveWidth']]); var lineStyle = {}; for (var i = 0; i < lineProperties.length; ++i) { var propName = lineProperties[i][1]; var visualName = lineProperties[i][0]; var value = legendLineModel.getShallow(propName); if (value === 'inherit') { lineStyle[visualName] = lineVisualStyle[visualName]; } else if (value === 'auto' && visualName === 'lineWidth') { // If lineStyle.width is 'auto', it is set to be 2 if series has border lineStyle.lineWidth = lineVisualStyle.lineWidth > 0 ? 2 : 0; } else { lineStyle[visualName] = value; } } // Fix auto color to real color itemStyle.fill === 'auto' && (itemStyle.fill = itemVisualStyle.fill); itemStyle.stroke === 'auto' && (itemStyle.stroke = itemVisualStyle.fill); lineStyle.stroke === 'auto' && (lineStyle.stroke = itemVisualStyle.fill); if (!isSelected) { var borderWidth = legendModel.get('inactiveBorderWidth'); /** * Since stroke is set to be inactiveBorderColor, it may occur that * there is no border in series but border in legend, so we need to * use border only when series has border if is set to be auto */ var visualHasBorder = itemStyle[symbolType.indexOf('empty') > -1 ? 'fill' : 'stroke']; itemStyle.lineWidth = borderWidth === 'auto' ? itemVisualStyle.lineWidth > 0 && visualHasBorder ? 2 : 0 : itemStyle.lineWidth; itemStyle.fill = legendModel.get('inactiveColor'); itemStyle.stroke = legendModel.get('inactiveBorderColor'); lineStyle.stroke = legendLineStyle.get('inactiveColor'); lineStyle.lineWidth = legendLineStyle.get('inactiveWidth'); } return { itemStyle: itemStyle, lineStyle: lineStyle }; } function getDefaultLegendIcon(opt) { var symboType = opt.symbolType || 'roundRect'; var symbol = createSymbol(symboType, 0, 0, opt.itemWidth, opt.itemHeight, opt.itemStyle.fill, opt.symbolKeepAspect); symbol.setStyle(opt.itemStyle); if (symboType.indexOf('empty') > -1) { symbol.style.stroke = symbol.style.fill; symbol.style.fill = '#fff'; symbol.style.lineWidth = 2; } return symbol; } function dispatchSelectAction(seriesName, dataName, api, excludeSeriesId) { // downplay before unselect dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId); api.dispatchAction({ type: 'legendToggleSelect', name: seriesName != null ? seriesName : dataName }); // highlight after select // TODO higlight immediately may cause animation loss. dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId); } function isUseHoverLayer(api) { var list = api.getZr().storage.getDisplayList(); var emphasisState; var i = 0; var len = list.length; while (i < len && !(emphasisState = list[i].states.emphasis)) { i++; } return emphasisState && emphasisState.hoverLayer; } function dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId) { // If element hover will move to a hoverLayer. if (!isUseHoverLayer(api)) { api.dispatchAction({ type: 'highlight', seriesName: seriesName, name: dataName, excludeSeriesId: excludeSeriesId }); } } function dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId) { // If element hover will move to a hoverLayer. if (!isUseHoverLayer(api)) { api.dispatchAction({ type: 'downplay', seriesName: seriesName, name: dataName, excludeSeriesId: excludeSeriesId }); } } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ function legendFilter(ecModel) { var legendModels = ecModel.findComponents({ mainType: 'legend' }); if (legendModels && legendModels.length) { ecModel.filterSeries(function (series) { // If in any legend component the status is not selected. // Because in legend series is assumed selected when it is not in the legend data. for (var i = 0; i < legendModels.length; i++) { if (!legendModels[i].isSelected(series.name)) { return false; } } return true; }); } } function legendSelectActionHandler(methodName, payload, ecModel) { var selectedMap = {}; var isToggleSelect = methodName === 'toggleSelected'; var isSelected; // Update all legend components ecModel.eachComponent('legend', function (legendModel) { if (isToggleSelect && isSelected != null) { // Force other legend has same selected status // Or the first is toggled to true and other are toggled to false // In the case one legend has some item unSelected in option. And if other legend // doesn't has the item, they will assume it is selected. legendModel[isSelected ? 'select' : 'unSelect'](payload.name); } else if (methodName === 'allSelect' || methodName === 'inverseSelect') { legendModel[methodName](); } else { legendModel[methodName](payload.name); isSelected = legendModel.isSelected(payload.name); } var legendData = legendModel.getData(); each(legendData, function (model) { var name = model.get('name'); // Wrap element if (name === '\n' || name === '') { return; } var isItemSelected = legendModel.isSelected(name); if (selectedMap.hasOwnProperty(name)) { // Unselected if any legend is unselected selectedMap[name] = selectedMap[name] && isItemSelected; } else { selectedMap[name] = isItemSelected; } }); }); // Return the event explicitly return methodName === 'allSelect' || methodName === 'inverseSelect' ? { selected: selectedMap } : { name: payload.name, selected: selectedMap }; } function installLegendAction(registers) { /** * @event legendToggleSelect * @type {Object} * @property {string} type 'legendToggleSelect' * @property {string} [from] * @property {string} name Series name or data item name */ registers.registerAction('legendToggleSelect', 'legendselectchanged', curry(legendSelectActionHandler, 'toggleSelected')); registers.registerAction('legendAllSelect', 'legendselectall', curry(legendSelectActionHandler, 'allSelect')); registers.registerAction('legendInverseSelect', 'legendinverseselect', curry(legendSelectActionHandler, 'inverseSelect')); /** * @event legendSelect * @type {Object} * @property {string} type 'legendSelect' * @property {string} name Series name or data item name */ registers.registerAction('legendSelect', 'legendselected', curry(legendSelectActionHandler, 'select')); /** * @event legendUnSelect * @type {Object} * @property {string} type 'legendUnSelect' * @property {string} name Series name or data item name */ registers.registerAction('legendUnSelect', 'legendunselected', curry(legendSelectActionHandler, 'unSelect')); } function install$H(registers) { registers.registerComponentModel(LegendModel); registers.registerComponentView(LegendView); registers.registerProcessor(registers.PRIORITY.PROCESSOR.SERIES_FILTER, legendFilter); registers.registerSubTypeDefaulter('legend', function () { return 'plain'; }); installLegendAction(registers); } var ScrollableLegendModel = /** @class */ function (_super) { __extends(ScrollableLegendModel, _super); function ScrollableLegendModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ScrollableLegendModel.type; return _this; } /** * @param {number} scrollDataIndex */ ScrollableLegendModel.prototype.setScrollDataIndex = function (scrollDataIndex) { this.option.scrollDataIndex = scrollDataIndex; }; ScrollableLegendModel.prototype.init = function (option, parentModel, ecModel) { var inputPositionParams = getLayoutParams(option); _super.prototype.init.call(this, option, parentModel, ecModel); mergeAndNormalizeLayoutParams$1(this, option, inputPositionParams); }; /** * @override */ ScrollableLegendModel.prototype.mergeOption = function (option, ecModel) { _super.prototype.mergeOption.call(this, option, ecModel); mergeAndNormalizeLayoutParams$1(this, this.option, option); }; ScrollableLegendModel.type = 'legend.scroll'; ScrollableLegendModel.defaultOption = inheritDefaultOption(LegendModel.defaultOption, { scrollDataIndex: 0, pageButtonItemGap: 5, pageButtonGap: null, pageButtonPosition: 'end', pageFormatter: '{current}/{total}', pageIcons: { horizontal: ['M0,0L12,-10L12,10z', 'M0,0L-12,-10L-12,10z'], vertical: ['M0,0L20,0L10,-20z', 'M0,0L20,0L10,20z'] }, pageIconColor: '#2f4554', pageIconInactiveColor: '#aaa', pageIconSize: 15, pageTextStyle: { color: '#333' }, animationDurationUpdate: 800 }); return ScrollableLegendModel; }(LegendModel); function mergeAndNormalizeLayoutParams$1(legendModel, target, raw) { var orient = legendModel.getOrient(); var ignoreSize = [1, 1]; ignoreSize[orient.index] = 0; mergeLayoutParam(target, raw, { type: 'box', ignoreSize: !!ignoreSize }); } var Group$3 = Group; var WH$1 = ['width', 'height']; var XY$1 = ['x', 'y']; var ScrollableLegendView = /** @class */ function (_super) { __extends(ScrollableLegendView, _super); function ScrollableLegendView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ScrollableLegendView.type; _this.newlineDisabled = true; _this._currentIndex = 0; return _this; } ScrollableLegendView.prototype.init = function () { _super.prototype.init.call(this); this.group.add(this._containerGroup = new Group$3()); this._containerGroup.add(this.getContentGroup()); this.group.add(this._controllerGroup = new Group$3()); }; /** * @override */ ScrollableLegendView.prototype.resetInner = function () { _super.prototype.resetInner.call(this); this._controllerGroup.removeAll(); this._containerGroup.removeClipPath(); this._containerGroup.__rectSize = null; }; /** * @override */ ScrollableLegendView.prototype.renderInner = function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) { var self = this; // Render content items. _super.prototype.renderInner.call(this, itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition); var controllerGroup = this._controllerGroup; // FIXME: support be 'auto' adapt to size number text length, // e.g., '3/12345' should not overlap with the control arrow button. var pageIconSize = legendModel.get('pageIconSize', true); var pageIconSizeArr = isArray(pageIconSize) ? pageIconSize : [pageIconSize, pageIconSize]; createPageButton('pagePrev', 0); var pageTextStyleModel = legendModel.getModel('pageTextStyle'); controllerGroup.add(new ZRText({ name: 'pageText', style: { // Placeholder to calculate a proper layout. text: 'xx/xx', fill: pageTextStyleModel.getTextColor(), font: pageTextStyleModel.getFont(), verticalAlign: 'middle', align: 'center' }, silent: true })); createPageButton('pageNext', 1); function createPageButton(name, iconIdx) { var pageDataIndexName = name + 'DataIndex'; var icon = createIcon(legendModel.get('pageIcons', true)[legendModel.getOrient().name][iconIdx], { // Buttons will be created in each render, so we do not need // to worry about avoiding using legendModel kept in scope. onclick: bind(self._pageGo, self, pageDataIndexName, legendModel, api) }, { x: -pageIconSizeArr[0] / 2, y: -pageIconSizeArr[1] / 2, width: pageIconSizeArr[0], height: pageIconSizeArr[1] }); icon.name = name; controllerGroup.add(icon); } }; /** * @override */ ScrollableLegendView.prototype.layoutInner = function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) { var selectorGroup = this.getSelectorGroup(); var orientIdx = legendModel.getOrient().index; var wh = WH$1[orientIdx]; var xy = XY$1[orientIdx]; var hw = WH$1[1 - orientIdx]; var yx = XY$1[1 - orientIdx]; selector && box( // Buttons in selectorGroup always layout horizontally 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true)); var selectorButtonGap = legendModel.get('selectorButtonGap', true); var selectorRect = selectorGroup.getBoundingRect(); var selectorPos = [-selectorRect.x, -selectorRect.y]; var processMaxSize = clone(maxSize); selector && (processMaxSize[wh] = maxSize[wh] - selectorRect[wh] - selectorButtonGap); var mainRect = this._layoutContentAndController(legendModel, isFirstRender, processMaxSize, orientIdx, wh, hw, yx, xy); if (selector) { if (selectorPosition === 'end') { selectorPos[orientIdx] += mainRect[wh] + selectorButtonGap; } else { var offset = selectorRect[wh] + selectorButtonGap; selectorPos[orientIdx] -= offset; mainRect[xy] -= offset; } mainRect[wh] += selectorRect[wh] + selectorButtonGap; selectorPos[1 - orientIdx] += mainRect[yx] + mainRect[hw] / 2 - selectorRect[hw] / 2; mainRect[hw] = Math.max(mainRect[hw], selectorRect[hw]); mainRect[yx] = Math.min(mainRect[yx], selectorRect[yx] + selectorPos[1 - orientIdx]); selectorGroup.x = selectorPos[0]; selectorGroup.y = selectorPos[1]; selectorGroup.markRedraw(); } return mainRect; }; ScrollableLegendView.prototype._layoutContentAndController = function (legendModel, isFirstRender, maxSize, orientIdx, wh, hw, yx, xy) { var contentGroup = this.getContentGroup(); var containerGroup = this._containerGroup; var controllerGroup = this._controllerGroup; // Place items in contentGroup. box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), !orientIdx ? null : maxSize.width, orientIdx ? null : maxSize.height); box( // Buttons in controller are layout always horizontally. 'horizontal', controllerGroup, legendModel.get('pageButtonItemGap', true)); var contentRect = contentGroup.getBoundingRect(); var controllerRect = controllerGroup.getBoundingRect(); var showController = this._showController = contentRect[wh] > maxSize[wh]; // In case that the inner elements of contentGroup layout do not based on [0, 0] var contentPos = [-contentRect.x, -contentRect.y]; // Remain contentPos when scroll animation perfroming. // If first rendering, `contentGroup.position` is [0, 0], which // does not make sense and may cause unexepcted animation if adopted. if (!isFirstRender) { contentPos[orientIdx] = contentGroup[xy]; } // Layout container group based on 0. var containerPos = [0, 0]; var controllerPos = [-controllerRect.x, -controllerRect.y]; var pageButtonGap = retrieve2(legendModel.get('pageButtonGap', true), legendModel.get('itemGap', true)); // Place containerGroup and controllerGroup and contentGroup. if (showController) { var pageButtonPosition = legendModel.get('pageButtonPosition', true); // controller is on the right / bottom. if (pageButtonPosition === 'end') { controllerPos[orientIdx] += maxSize[wh] - controllerRect[wh]; } // controller is on the left / top. else { containerPos[orientIdx] += controllerRect[wh] + pageButtonGap; } } // Always align controller to content as 'middle'. controllerPos[1 - orientIdx] += contentRect[hw] / 2 - controllerRect[hw] / 2; contentGroup.setPosition(contentPos); containerGroup.setPosition(containerPos); controllerGroup.setPosition(controllerPos); // Calculate `mainRect` and set `clipPath`. // mainRect should not be calculated by `this.group.getBoundingRect()` // for sake of the overflow. var mainRect = { x: 0, y: 0 }; // Consider content may be overflow (should be clipped). mainRect[wh] = showController ? maxSize[wh] : contentRect[wh]; mainRect[hw] = Math.max(contentRect[hw], controllerRect[hw]); // `containerRect[yx] + containerPos[1 - orientIdx]` is 0. mainRect[yx] = Math.min(0, controllerRect[yx] + controllerPos[1 - orientIdx]); containerGroup.__rectSize = maxSize[wh]; if (showController) { var clipShape = { x: 0, y: 0 }; clipShape[wh] = Math.max(maxSize[wh] - controllerRect[wh] - pageButtonGap, 0); clipShape[hw] = mainRect[hw]; containerGroup.setClipPath(new Rect({ shape: clipShape })); // Consider content may be larger than container, container rect // can not be obtained from `containerGroup.getBoundingRect()`. containerGroup.__rectSize = clipShape[wh]; } else { // Do not remove or ignore controller. Keep them set as placeholders. controllerGroup.eachChild(function (child) { child.attr({ invisible: true, silent: true }); }); } // Content translate animation. var pageInfo = this._getPageInfo(legendModel); pageInfo.pageIndex != null && updateProps(contentGroup, { x: pageInfo.contentPosition[0], y: pageInfo.contentPosition[1] }, // When switch from "show controller" to "not show controller", view should be // updated immediately without animation, otherwise causes weird effect. showController ? legendModel : null); this._updatePageInfoView(legendModel, pageInfo); return mainRect; }; ScrollableLegendView.prototype._pageGo = function (to, legendModel, api) { var scrollDataIndex = this._getPageInfo(legendModel)[to]; scrollDataIndex != null && api.dispatchAction({ type: 'legendScroll', scrollDataIndex: scrollDataIndex, legendId: legendModel.id }); }; ScrollableLegendView.prototype._updatePageInfoView = function (legendModel, pageInfo) { var controllerGroup = this._controllerGroup; each(['pagePrev', 'pageNext'], function (name) { var key = name + 'DataIndex'; var canJump = pageInfo[key] != null; var icon = controllerGroup.childOfName(name); if (icon) { icon.setStyle('fill', canJump ? legendModel.get('pageIconColor', true) : legendModel.get('pageIconInactiveColor', true)); icon.cursor = canJump ? 'pointer' : 'default'; } }); var pageText = controllerGroup.childOfName('pageText'); var pageFormatter = legendModel.get('pageFormatter'); var pageIndex = pageInfo.pageIndex; var current = pageIndex != null ? pageIndex + 1 : 0; var total = pageInfo.pageCount; pageText && pageFormatter && pageText.setStyle('text', isString(pageFormatter) ? pageFormatter.replace('{current}', current == null ? '' : current + '').replace('{total}', total == null ? '' : total + '') : pageFormatter({ current: current, total: total })); }; /** * contentPosition: Array., null when data item not found. * pageIndex: number, null when data item not found. * pageCount: number, always be a number, can be 0. * pagePrevDataIndex: number, null when no previous page. * pageNextDataIndex: number, null when no next page. * } */ ScrollableLegendView.prototype._getPageInfo = function (legendModel) { var scrollDataIndex = legendModel.get('scrollDataIndex', true); var contentGroup = this.getContentGroup(); var containerRectSize = this._containerGroup.__rectSize; var orientIdx = legendModel.getOrient().index; var wh = WH$1[orientIdx]; var xy = XY$1[orientIdx]; var targetItemIndex = this._findTargetItemIndex(scrollDataIndex); var children = contentGroup.children(); var targetItem = children[targetItemIndex]; var itemCount = children.length; var pCount = !itemCount ? 0 : 1; var result = { contentPosition: [contentGroup.x, contentGroup.y], pageCount: pCount, pageIndex: pCount - 1, pagePrevDataIndex: null, pageNextDataIndex: null }; if (!targetItem) { return result; } var targetItemInfo = getItemInfo(targetItem); result.contentPosition[orientIdx] = -targetItemInfo.s; // Strategy: // (1) Always align based on the left/top most item. // (2) It is user-friendly that the last item shown in the // current window is shown at the begining of next window. // Otherwise if half of the last item is cut by the window, // it will have no chance to display entirely. // (3) Consider that item size probably be different, we // have calculate pageIndex by size rather than item index, // and we can not get page index directly by division. // (4) The window is to narrow to contain more than // one item, we should make sure that the page can be fliped. for (var i = targetItemIndex + 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i <= itemCount; ++i) { currItemInfo = getItemInfo(children[i]); if ( // Half of the last item is out of the window. !currItemInfo && winEndItemInfo.e > winStartItemInfo.s + containerRectSize || // If the current item does not intersect with the window, the new page // can be started at the current item or the last item. currItemInfo && !intersect(currItemInfo, winStartItemInfo.s)) { if (winEndItemInfo.i > winStartItemInfo.i) { winStartItemInfo = winEndItemInfo; } else { // e.g., when page size is smaller than item size. winStartItemInfo = currItemInfo; } if (winStartItemInfo) { if (result.pageNextDataIndex == null) { result.pageNextDataIndex = winStartItemInfo.i; } ++result.pageCount; } } winEndItemInfo = currItemInfo; } for (var i = targetItemIndex - 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i >= -1; --i) { currItemInfo = getItemInfo(children[i]); if ( // If the the end item does not intersect with the window started // from the current item, a page can be settled. (!currItemInfo || !intersect(winEndItemInfo, currItemInfo.s)) && // e.g., when page size is smaller than item size. winStartItemInfo.i < winEndItemInfo.i) { winEndItemInfo = winStartItemInfo; if (result.pagePrevDataIndex == null) { result.pagePrevDataIndex = winStartItemInfo.i; } ++result.pageCount; ++result.pageIndex; } winStartItemInfo = currItemInfo; } return result; function getItemInfo(el) { if (el) { var itemRect = el.getBoundingRect(); var start = itemRect[xy] + el[xy]; return { s: start, e: start + itemRect[wh], i: el.__legendDataIndex }; } } function intersect(itemInfo, winStart) { return itemInfo.e >= winStart && itemInfo.s <= winStart + containerRectSize; } }; ScrollableLegendView.prototype._findTargetItemIndex = function (targetDataIndex) { if (!this._showController) { return 0; } var index; var contentGroup = this.getContentGroup(); var defaultIndex; contentGroup.eachChild(function (child, idx) { var legendDataIdx = child.__legendDataIndex; // FIXME // If the given targetDataIndex (from model) is illegal, // we use defaultIndex. But the index on the legend model and // action payload is still illegal. That case will not be // changed until some scenario requires. if (defaultIndex == null && legendDataIdx != null) { defaultIndex = idx; } if (legendDataIdx === targetDataIndex) { index = idx; } }); return index != null ? index : defaultIndex; }; ScrollableLegendView.type = 'legend.scroll'; return ScrollableLegendView; }(LegendView); /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ function installScrollableLegendAction(registers) { /** * @event legendScroll * @type {Object} * @property {string} type 'legendScroll' * @property {string} scrollDataIndex */ registers.registerAction('legendScroll', 'legendscroll', function (payload, ecModel) { var scrollDataIndex = payload.scrollDataIndex; scrollDataIndex != null && ecModel.eachComponent({ mainType: 'legend', subType: 'scroll', query: payload }, function (legendModel) { legendModel.setScrollDataIndex(scrollDataIndex); }); }); } function install$I(registers) { use(install$H); registers.registerComponentModel(ScrollableLegendModel); registers.registerComponentView(ScrollableLegendView); installScrollableLegendAction(registers); } function install$J(registers) { use(install$H); use(install$I); } var InsideZoomModel = /** @class */ function (_super) { __extends(InsideZoomModel, _super); function InsideZoomModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = InsideZoomModel.type; return _this; } InsideZoomModel.type = 'dataZoom.inside'; InsideZoomModel.defaultOption = inheritDefaultOption(DataZoomModel.defaultOption, { disabled: false, zoomLock: false, zoomOnMouseWheel: true, moveOnMouseMove: true, moveOnMouseWheel: false, preventDefaultMouseMove: true }); return InsideZoomModel; }(DataZoomModel); var inner$k = makeInner(); function setViewInfoToCoordSysRecord(api, dataZoomModel, getRange) { inner$k(api).coordSysRecordMap.each(function (coordSysRecord) { var dzInfo = coordSysRecord.dataZoomInfoMap.get(dataZoomModel.uid); if (dzInfo) { dzInfo.getRange = getRange; } }); } function disposeCoordSysRecordIfNeeded(api, dataZoomModel) { var coordSysRecordMap = inner$k(api).coordSysRecordMap; var coordSysKeyArr = coordSysRecordMap.keys(); for (var i = 0; i < coordSysKeyArr.length; i++) { var coordSysKey = coordSysKeyArr[i]; var coordSysRecord = coordSysRecordMap.get(coordSysKey); var dataZoomInfoMap = coordSysRecord.dataZoomInfoMap; if (dataZoomInfoMap) { var dzUid = dataZoomModel.uid; var dzInfo = dataZoomInfoMap.get(dzUid); if (dzInfo) { dataZoomInfoMap.removeKey(dzUid); if (!dataZoomInfoMap.keys().length) { disposeCoordSysRecord(coordSysRecordMap, coordSysRecord); } } } } } function disposeCoordSysRecord(coordSysRecordMap, coordSysRecord) { if (coordSysRecord) { coordSysRecordMap.removeKey(coordSysRecord.model.uid); var controller = coordSysRecord.controller; controller && controller.dispose(); } } function createCoordSysRecord(api, coordSysModel) { // These init props will never change after record created. var coordSysRecord = { model: coordSysModel, containsPoint: curry(containsPoint, coordSysModel), dispatchAction: curry(dispatchAction$1, api), dataZoomInfoMap: null, controller: null }; // Must not do anything depends on coordSysRecord outside the event handler here, // because coordSysRecord not completed yet. var controller = coordSysRecord.controller = new RoamController(api.getZr()); each(['pan', 'zoom', 'scrollMove'], function (eventName) { controller.on(eventName, function (event) { var batch = []; coordSysRecord.dataZoomInfoMap.each(function (dzInfo) { // Check whether the behaviors (zoomOnMouseWheel, moveOnMouseMove, // moveOnMouseWheel, ...) enabled. if (!event.isAvailableBehavior(dzInfo.model.option)) { return; } var method = (dzInfo.getRange || {})[eventName]; var range = method && method(dzInfo.dzReferCoordSysInfo, coordSysRecord.model.mainType, coordSysRecord.controller, event); !dzInfo.model.get('disabled', true) && range && batch.push({ dataZoomId: dzInfo.model.id, start: range[0], end: range[1] }); }); batch.length && coordSysRecord.dispatchAction(batch); }); }); return coordSysRecord; } /** * This action will be throttled. */ function dispatchAction$1(api, batch) { api.dispatchAction({ type: 'dataZoom', animation: { easing: 'cubicOut', duration: 100 }, batch: batch }); } function containsPoint(coordSysModel, e, x, y) { return coordSysModel.coordinateSystem.containPoint([x, y]); } /** * Merge roamController settings when multiple dataZooms share one roamController. */ function mergeControllerParams(dataZoomInfoMap) { var controlType; // DO NOT use reserved word (true, false, undefined) as key literally. Even if encapsulated // as string, it is probably revert to reserved word by compress tool. See #7411. var prefix = 'type_'; var typePriority = { 'type_true': 2, 'type_move': 1, 'type_false': 0, 'type_undefined': -1 }; var preventDefaultMouseMove = true; dataZoomInfoMap.each(function (dataZoomInfo) { var dataZoomModel = dataZoomInfo.model; var oneType = dataZoomModel.get('disabled', true) ? false : dataZoomModel.get('zoomLock', true) ? 'move' : true; if (typePriority[prefix + oneType] > typePriority[prefix + controlType]) { controlType = oneType; } // Prevent default move event by default. If one false, do not prevent. Otherwise // users may be confused why it does not work when multiple insideZooms exist. preventDefaultMouseMove = preventDefaultMouseMove && dataZoomModel.get('preventDefaultMouseMove', true); }); return { controlType: controlType, opt: { // RoamController will enable all of these functionalities, // and the final behavior is determined by its event listener // provided by each inside zoom. zoomOnMouseWheel: true, moveOnMouseMove: true, moveOnMouseWheel: true, preventDefaultMouseMove: !!preventDefaultMouseMove } }; } function installDataZoomRoamProcessor(registers) { registers.registerProcessor(registers.PRIORITY.PROCESSOR.FILTER, function (ecModel, api) { var apiInner = inner$k(api); var coordSysRecordMap = apiInner.coordSysRecordMap || (apiInner.coordSysRecordMap = createHashMap()); coordSysRecordMap.each(function (coordSysRecord) { // `coordSysRecordMap` always exists (becuase it hold the `roam controller`, which should // better not re-create each time), but clear `dataZoomInfoMap` each round of the workflow. coordSysRecord.dataZoomInfoMap = null; }); ecModel.eachComponent({ mainType: 'dataZoom', subType: 'inside' }, function (dataZoomModel) { var dzReferCoordSysWrap = collectReferCoordSysModelInfo(dataZoomModel); each(dzReferCoordSysWrap.infoList, function (dzCoordSysInfo) { var coordSysUid = dzCoordSysInfo.model.uid; var coordSysRecord = coordSysRecordMap.get(coordSysUid) || coordSysRecordMap.set(coordSysUid, createCoordSysRecord(api, dzCoordSysInfo.model)); var dataZoomInfoMap = coordSysRecord.dataZoomInfoMap || (coordSysRecord.dataZoomInfoMap = createHashMap()); // Notice these props might be changed each time for a single dataZoomModel. dataZoomInfoMap.set(dataZoomModel.uid, { dzReferCoordSysInfo: dzCoordSysInfo, model: dataZoomModel, getRange: null }); }); }); // (1) Merge dataZoom settings for each coord sys and set to the roam controller. // (2) Clear coord sys if not refered by any dataZoom. coordSysRecordMap.each(function (coordSysRecord) { var controller = coordSysRecord.controller; var firstDzInfo; var dataZoomInfoMap = coordSysRecord.dataZoomInfoMap; if (dataZoomInfoMap) { var firstDzKey = dataZoomInfoMap.keys()[0]; if (firstDzKey != null) { firstDzInfo = dataZoomInfoMap.get(firstDzKey); } } if (!firstDzInfo) { disposeCoordSysRecord(coordSysRecordMap, coordSysRecord); return; } var controllerParams = mergeControllerParams(dataZoomInfoMap); controller.enable(controllerParams.controlType, controllerParams.opt); controller.setPointerChecker(coordSysRecord.containsPoint); createOrUpdate(coordSysRecord, 'dispatchAction', firstDzInfo.model.get('throttle', true), 'fixRate'); }); }); } var InsideZoomView = /** @class */ function (_super) { __extends(InsideZoomView, _super); function InsideZoomView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'dataZoom.inside'; return _this; } InsideZoomView.prototype.render = function (dataZoomModel, ecModel, api) { _super.prototype.render.apply(this, arguments); if (dataZoomModel.noTarget()) { this._clear(); return; } // Hence the `throttle` util ensures to preserve command order, // here simply updating range all the time will not cause missing // any of the the roam change. this.range = dataZoomModel.getPercentRange(); // Reset controllers. setViewInfoToCoordSysRecord(api, dataZoomModel, { pan: bind(getRangeHandlers.pan, this), zoom: bind(getRangeHandlers.zoom, this), scrollMove: bind(getRangeHandlers.scrollMove, this) }); }; InsideZoomView.prototype.dispose = function () { this._clear(); _super.prototype.dispose.apply(this, arguments); }; InsideZoomView.prototype._clear = function () { disposeCoordSysRecordIfNeeded(this.api, this.dataZoomModel); this.range = null; }; InsideZoomView.type = 'dataZoom.inside'; return InsideZoomView; }(DataZoomView); var getRangeHandlers = { zoom: function (coordSysInfo, coordSysMainType, controller, e) { var lastRange = this.range; var range = lastRange.slice(); // Calculate transform by the first axis. var axisModel = coordSysInfo.axisModels[0]; if (!axisModel) { return; } var directionInfo = getDirectionInfo[coordSysMainType](null, [e.originX, e.originY], axisModel, controller, coordSysInfo); var percentPoint = (directionInfo.signal > 0 ? directionInfo.pixelStart + directionInfo.pixelLength - directionInfo.pixel : directionInfo.pixel - directionInfo.pixelStart) / directionInfo.pixelLength * (range[1] - range[0]) + range[0]; var scale = Math.max(1 / e.scale, 0); range[0] = (range[0] - percentPoint) * scale + percentPoint; range[1] = (range[1] - percentPoint) * scale + percentPoint; // Restrict range. var minMaxSpan = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan(); sliderMove(0, range, [0, 100], 0, minMaxSpan.minSpan, minMaxSpan.maxSpan); this.range = range; if (lastRange[0] !== range[0] || lastRange[1] !== range[1]) { return range; } }, pan: makeMover(function (range, axisModel, coordSysInfo, coordSysMainType, controller, e) { var directionInfo = getDirectionInfo[coordSysMainType]([e.oldX, e.oldY], [e.newX, e.newY], axisModel, controller, coordSysInfo); return directionInfo.signal * (range[1] - range[0]) * directionInfo.pixel / directionInfo.pixelLength; }), scrollMove: makeMover(function (range, axisModel, coordSysInfo, coordSysMainType, controller, e) { var directionInfo = getDirectionInfo[coordSysMainType]([0, 0], [e.scrollDelta, e.scrollDelta], axisModel, controller, coordSysInfo); return directionInfo.signal * (range[1] - range[0]) * e.scrollDelta; }) }; function makeMover(getPercentDelta) { return function (coordSysInfo, coordSysMainType, controller, e) { var lastRange = this.range; var range = lastRange.slice(); // Calculate transform by the first axis. var axisModel = coordSysInfo.axisModels[0]; if (!axisModel) { return; } var percentDelta = getPercentDelta(range, axisModel, coordSysInfo, coordSysMainType, controller, e); sliderMove(percentDelta, range, [0, 100], 'all'); this.range = range; if (lastRange[0] !== range[0] || lastRange[1] !== range[1]) { return range; } }; } var getDirectionInfo = { grid: function (oldPoint, newPoint, axisModel, controller, coordSysInfo) { var axis = axisModel.axis; var ret = {}; var rect = coordSysInfo.model.coordinateSystem.getRect(); oldPoint = oldPoint || [0, 0]; if (axis.dim === 'x') { ret.pixel = newPoint[0] - oldPoint[0]; ret.pixelLength = rect.width; ret.pixelStart = rect.x; ret.signal = axis.inverse ? 1 : -1; } else { // axis.dim === 'y' ret.pixel = newPoint[1] - oldPoint[1]; ret.pixelLength = rect.height; ret.pixelStart = rect.y; ret.signal = axis.inverse ? -1 : 1; } return ret; }, polar: function (oldPoint, newPoint, axisModel, controller, coordSysInfo) { var axis = axisModel.axis; var ret = {}; var polar = coordSysInfo.model.coordinateSystem; var radiusExtent = polar.getRadiusAxis().getExtent(); var angleExtent = polar.getAngleAxis().getExtent(); oldPoint = oldPoint ? polar.pointToCoord(oldPoint) : [0, 0]; newPoint = polar.pointToCoord(newPoint); if (axisModel.mainType === 'radiusAxis') { ret.pixel = newPoint[0] - oldPoint[0]; // ret.pixelLength = Math.abs(radiusExtent[1] - radiusExtent[0]); // ret.pixelStart = Math.min(radiusExtent[0], radiusExtent[1]); ret.pixelLength = radiusExtent[1] - radiusExtent[0]; ret.pixelStart = radiusExtent[0]; ret.signal = axis.inverse ? 1 : -1; } else { // 'angleAxis' ret.pixel = newPoint[1] - oldPoint[1]; // ret.pixelLength = Math.abs(angleExtent[1] - angleExtent[0]); // ret.pixelStart = Math.min(angleExtent[0], angleExtent[1]); ret.pixelLength = angleExtent[1] - angleExtent[0]; ret.pixelStart = angleExtent[0]; ret.signal = axis.inverse ? -1 : 1; } return ret; }, singleAxis: function (oldPoint, newPoint, axisModel, controller, coordSysInfo) { var axis = axisModel.axis; var rect = coordSysInfo.model.coordinateSystem.getRect(); var ret = {}; oldPoint = oldPoint || [0, 0]; if (axis.orient === 'horizontal') { ret.pixel = newPoint[0] - oldPoint[0]; ret.pixelLength = rect.width; ret.pixelStart = rect.x; ret.signal = axis.inverse ? 1 : -1; } else { // 'vertical' ret.pixel = newPoint[1] - oldPoint[1]; ret.pixelLength = rect.height; ret.pixelStart = rect.y; ret.signal = axis.inverse ? -1 : 1; } return ret; } }; function install$K(registers) { installCommon(registers); registers.registerComponentModel(InsideZoomModel); registers.registerComponentView(InsideZoomView); installDataZoomRoamProcessor(registers); } var SliderZoomModel = /** @class */ function (_super) { __extends(SliderZoomModel, _super); function SliderZoomModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SliderZoomModel.type; return _this; } SliderZoomModel.type = 'dataZoom.slider'; SliderZoomModel.layoutMode = 'box'; SliderZoomModel.defaultOption = inheritDefaultOption(DataZoomModel.defaultOption, { show: true, // deault value can only be drived in view stage. right: 'ph', top: 'ph', width: 'ph', height: 'ph', left: null, bottom: null, borderColor: '#d2dbee', borderRadius: 3, backgroundColor: 'rgba(47,69,84,0)', // dataBackgroundColor: '#ddd', dataBackground: { lineStyle: { color: '#d2dbee', width: 0.5 }, areaStyle: { color: '#d2dbee', opacity: 0.2 } }, selectedDataBackground: { lineStyle: { color: '#8fb0f7', width: 0.5 }, areaStyle: { color: '#8fb0f7', opacity: 0.2 } }, // Color of selected window. fillerColor: 'rgba(135,175,274,0.2)', handleIcon: 'path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z', // Percent of the slider height handleSize: '100%', handleStyle: { color: '#fff', borderColor: '#ACB8D1' }, moveHandleSize: 7, moveHandleIcon: 'path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z', moveHandleStyle: { color: '#D2DBEE', opacity: 0.7 }, showDetail: true, showDataShadow: 'auto', realtime: true, zoomLock: false, textStyle: { color: '#6E7079' }, brushSelect: true, brushStyle: { color: 'rgba(135,175,274,0.15)' }, emphasis: { handleStyle: { borderColor: '#8FB0F7' }, moveHandleStyle: { color: '#8FB0F7' } } }); return SliderZoomModel; }(DataZoomModel); var Rect$2 = Rect; // Constants var DEFAULT_LOCATION_EDGE_GAP = 7; var DEFAULT_FRAME_BORDER_WIDTH = 1; var DEFAULT_FILLER_SIZE = 30; var DEFAULT_MOVE_HANDLE_SIZE = 7; var HORIZONTAL = 'horizontal'; var VERTICAL = 'vertical'; var LABEL_GAP = 5; var SHOW_DATA_SHADOW_SERIES_TYPE = ['line', 'bar', 'candlestick', 'scatter']; var REALTIME_ANIMATION_CONFIG = { easing: 'cubicOut', duration: 100 }; var SliderZoomView = /** @class */ function (_super) { __extends(SliderZoomView, _super); function SliderZoomView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = SliderZoomView.type; _this._displayables = {}; return _this; } SliderZoomView.prototype.init = function (ecModel, api) { this.api = api; // A unique handler for each dataZoom component this._onBrush = bind(this._onBrush, this); this._onBrushEnd = bind(this._onBrushEnd, this); }; SliderZoomView.prototype.render = function (dataZoomModel, ecModel, api, payload) { _super.prototype.render.apply(this, arguments); createOrUpdate(this, '_dispatchZoomAction', dataZoomModel.get('throttle'), 'fixRate'); this._orient = dataZoomModel.getOrient(); if (dataZoomModel.get('show') === false) { this.group.removeAll(); return; } if (dataZoomModel.noTarget()) { this._clear(); this.group.removeAll(); return; } // Notice: this._resetInterval() should not be executed when payload.type // is 'dataZoom', origin this._range should be maintained, otherwise 'pan' // or 'zoom' info will be missed because of 'throttle' of this.dispatchAction, if (!payload || payload.type !== 'dataZoom' || payload.from !== this.uid) { this._buildView(); } this._updateView(); }; SliderZoomView.prototype.dispose = function () { this._clear(); _super.prototype.dispose.apply(this, arguments); }; SliderZoomView.prototype._clear = function () { clear(this, '_dispatchZoomAction'); var zr = this.api.getZr(); zr.off('mousemove', this._onBrush); zr.off('mouseup', this._onBrushEnd); }; SliderZoomView.prototype._buildView = function () { var thisGroup = this.group; thisGroup.removeAll(); this._brushing = false; this._displayables.brushRect = null; this._resetLocation(); this._resetInterval(); var barGroup = this._displayables.sliderGroup = new Group(); this._renderBackground(); this._renderHandle(); this._renderDataShadow(); thisGroup.add(barGroup); this._positionGroup(); }; SliderZoomView.prototype._resetLocation = function () { var dataZoomModel = this.dataZoomModel; var api = this.api; var showMoveHandle = dataZoomModel.get('brushSelect'); var moveHandleSize = showMoveHandle ? DEFAULT_MOVE_HANDLE_SIZE : 0; // If some of x/y/width/height are not specified, // auto-adapt according to target grid. var coordRect = this._findCoordRect(); var ecSize = { width: api.getWidth(), height: api.getHeight() }; // Default align by coordinate system rect. var positionInfo = this._orient === HORIZONTAL ? { // Why using 'right', because right should be used in vertical, // and it is better to be consistent for dealing with position param merge. right: ecSize.width - coordRect.x - coordRect.width, top: ecSize.height - DEFAULT_FILLER_SIZE - DEFAULT_LOCATION_EDGE_GAP - moveHandleSize, width: coordRect.width, height: DEFAULT_FILLER_SIZE } : { right: DEFAULT_LOCATION_EDGE_GAP, top: coordRect.y, width: DEFAULT_FILLER_SIZE, height: coordRect.height }; // Do not write back to option and replace value 'ph', because // the 'ph' value should be recalculated when resize. var layoutParams = getLayoutParams(dataZoomModel.option); // Replace the placeholder value. each(['right', 'top', 'width', 'height'], function (name) { if (layoutParams[name] === 'ph') { layoutParams[name] = positionInfo[name]; } }); var layoutRect = getLayoutRect(layoutParams, ecSize); this._location = { x: layoutRect.x, y: layoutRect.y }; this._size = [layoutRect.width, layoutRect.height]; this._orient === VERTICAL && this._size.reverse(); }; SliderZoomView.prototype._positionGroup = function () { var thisGroup = this.group; var location = this._location; var orient = this._orient; // Just use the first axis to determine mapping. var targetAxisModel = this.dataZoomModel.getFirstTargetAxisModel(); var inverse = targetAxisModel && targetAxisModel.get('inverse'); var sliderGroup = this._displayables.sliderGroup; var otherAxisInverse = (this._dataShadowInfo || {}).otherAxisInverse; // Transform barGroup. sliderGroup.attr(orient === HORIZONTAL && !inverse ? { scaleY: otherAxisInverse ? 1 : -1, scaleX: 1 } : orient === HORIZONTAL && inverse ? { scaleY: otherAxisInverse ? 1 : -1, scaleX: -1 } : orient === VERTICAL && !inverse ? { scaleY: otherAxisInverse ? -1 : 1, scaleX: 1, rotation: Math.PI / 2 } // Dont use Math.PI, considering shadow direction. : { scaleY: otherAxisInverse ? -1 : 1, scaleX: -1, rotation: Math.PI / 2 }); // Position barGroup var rect = thisGroup.getBoundingRect([sliderGroup]); thisGroup.x = location.x - rect.x; thisGroup.y = location.y - rect.y; thisGroup.markRedraw(); }; SliderZoomView.prototype._getViewExtent = function () { return [0, this._size[0]]; }; SliderZoomView.prototype._renderBackground = function () { var dataZoomModel = this.dataZoomModel; var size = this._size; var barGroup = this._displayables.sliderGroup; var brushSelect = dataZoomModel.get('brushSelect'); barGroup.add(new Rect$2({ silent: true, shape: { x: 0, y: 0, width: size[0], height: size[1] }, style: { fill: dataZoomModel.get('backgroundColor') }, z2: -40 })); // Click panel, over shadow, below handles. var clickPanel = new Rect$2({ shape: { x: 0, y: 0, width: size[0], height: size[1] }, style: { fill: 'transparent' }, z2: 0, onclick: bind(this._onClickPanel, this) }); var zr = this.api.getZr(); if (brushSelect) { clickPanel.on('mousedown', this._onBrushStart, this); clickPanel.cursor = 'crosshair'; zr.on('mousemove', this._onBrush); zr.on('mouseup', this._onBrushEnd); } else { zr.off('mousemove', this._onBrush); zr.off('mouseup', this._onBrushEnd); } barGroup.add(clickPanel); }; SliderZoomView.prototype._renderDataShadow = function () { var info = this._dataShadowInfo = this._prepareDataShadowInfo(); this._displayables.dataShadowSegs = []; if (!info) { return; } var size = this._size; var seriesModel = info.series; var data = seriesModel.getRawData(); var otherDim = seriesModel.getShadowDim ? seriesModel.getShadowDim() // @see candlestick : info.otherDim; if (otherDim == null) { return; } var otherDataExtent = data.getDataExtent(otherDim); // Nice extent. var otherOffset = (otherDataExtent[1] - otherDataExtent[0]) * 0.3; otherDataExtent = [otherDataExtent[0] - otherOffset, otherDataExtent[1] + otherOffset]; var otherShadowExtent = [0, size[1]]; var thisShadowExtent = [0, size[0]]; var areaPoints = [[size[0], 0], [0, 0]]; var linePoints = []; var step = thisShadowExtent[1] / (data.count() - 1); var thisCoord = 0; // Optimize for large data shadow var stride = Math.round(data.count() / size[0]); var lastIsEmpty; data.each([otherDim], function (value, index) { if (stride > 0 && index % stride) { thisCoord += step; return; } // FIXME // Should consider axis.min/axis.max when drawing dataShadow. // FIXME // 应该使用统一的空判断?还是在list里进行空判断? var isEmpty = value == null || isNaN(value) || value === ''; // See #4235. var otherCoord = isEmpty ? 0 : linearMap(value, otherDataExtent, otherShadowExtent, true); // Attempt to draw data shadow precisely when there are empty value. if (isEmpty && !lastIsEmpty && index) { areaPoints.push([areaPoints[areaPoints.length - 1][0], 0]); linePoints.push([linePoints[linePoints.length - 1][0], 0]); } else if (!isEmpty && lastIsEmpty) { areaPoints.push([thisCoord, 0]); linePoints.push([thisCoord, 0]); } areaPoints.push([thisCoord, otherCoord]); linePoints.push([thisCoord, otherCoord]); thisCoord += step; lastIsEmpty = isEmpty; }); var dataZoomModel = this.dataZoomModel; function createDataShadowGroup(isSelectedArea) { var model = dataZoomModel.getModel(isSelectedArea ? 'selectedDataBackground' : 'dataBackground'); var group = new Group(); var polygon = new Polygon({ shape: { points: areaPoints }, segmentIgnoreThreshold: 1, style: model.getModel('areaStyle').getAreaStyle(), silent: true, z2: -20 }); var polyline = new Polyline({ shape: { points: linePoints }, segmentIgnoreThreshold: 1, style: model.getModel('lineStyle').getLineStyle(), silent: true, z2: -19 }); group.add(polygon); group.add(polyline); return group; } // let dataBackgroundModel = dataZoomModel.getModel('dataBackground'); for (var i = 0; i < 3; i++) { var group = createDataShadowGroup(i === 1); this._displayables.sliderGroup.add(group); this._displayables.dataShadowSegs.push(group); } }; SliderZoomView.prototype._prepareDataShadowInfo = function () { var dataZoomModel = this.dataZoomModel; var showDataShadow = dataZoomModel.get('showDataShadow'); if (showDataShadow === false) { return; } // Find a representative series. var result; var ecModel = this.ecModel; dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) { var seriesModels = dataZoomModel.getAxisProxy(axisDim, axisIndex).getTargetSeriesModels(); each(seriesModels, function (seriesModel) { if (result) { return; } if (showDataShadow !== true && indexOf(SHOW_DATA_SHADOW_SERIES_TYPE, seriesModel.get('type')) < 0) { return; } var thisAxis = ecModel.getComponent(getAxisMainType(axisDim), axisIndex).axis; var otherDim = getOtherDim(axisDim); var otherAxisInverse; var coordSys = seriesModel.coordinateSystem; if (otherDim != null && coordSys.getOtherAxis) { otherAxisInverse = coordSys.getOtherAxis(thisAxis).inverse; } otherDim = seriesModel.getData().mapDimension(otherDim); result = { thisAxis: thisAxis, series: seriesModel, thisDim: axisDim, otherDim: otherDim, otherAxisInverse: otherAxisInverse }; }, this); }, this); return result; }; SliderZoomView.prototype._renderHandle = function () { var thisGroup = this.group; var displayables = this._displayables; var handles = displayables.handles = [null, null]; var handleLabels = displayables.handleLabels = [null, null]; var sliderGroup = this._displayables.sliderGroup; var size = this._size; var dataZoomModel = this.dataZoomModel; var api = this.api; var borderRadius = dataZoomModel.get('borderRadius') || 0; var brushSelect = dataZoomModel.get('brushSelect'); var filler = displayables.filler = new Rect$2({ silent: brushSelect, style: { fill: dataZoomModel.get('fillerColor') }, textConfig: { position: 'inside' } }); sliderGroup.add(filler); // Frame border. sliderGroup.add(new Rect$2({ silent: true, subPixelOptimize: true, shape: { x: 0, y: 0, width: size[0], height: size[1], r: borderRadius }, style: { stroke: dataZoomModel.get('dataBackgroundColor') // deprecated option || dataZoomModel.get('borderColor'), lineWidth: DEFAULT_FRAME_BORDER_WIDTH, fill: 'rgba(0,0,0,0)' } })); // Left and right handle to resize each([0, 1], function (handleIndex) { var iconStr = dataZoomModel.get('handleIcon'); if (!symbolBuildProxies[iconStr] && iconStr.indexOf('path://') < 0 && iconStr.indexOf('image://') < 0) { // Compatitable with the old icon parsers. Which can use a path string without path:// iconStr = 'path://' + iconStr; if ("development" !== 'production') { deprecateLog('handleIcon now needs \'path://\' prefix when using a path string'); } } var path = createSymbol(iconStr, -1, 0, 2, 2, null, true); path.attr({ cursor: getCursor(this._orient), draggable: true, drift: bind(this._onDragMove, this, handleIndex), ondragend: bind(this._onDragEnd, this), onmouseover: bind(this._showDataInfo, this, true), onmouseout: bind(this._showDataInfo, this, false), z2: 5 }); var bRect = path.getBoundingRect(); var handleSize = dataZoomModel.get('handleSize'); this._handleHeight = parsePercent$1(handleSize, this._size[1]); this._handleWidth = bRect.width / bRect.height * this._handleHeight; path.setStyle(dataZoomModel.getModel('handleStyle').getItemStyle()); path.style.strokeNoScale = true; path.rectHover = true; path.ensureState('emphasis').style = dataZoomModel.getModel(['emphasis', 'handleStyle']).getItemStyle(); enableHoverEmphasis(path); var handleColor = dataZoomModel.get('handleColor'); // deprecated option // Compatitable with previous version if (handleColor != null) { path.style.fill = handleColor; } sliderGroup.add(handles[handleIndex] = path); var textStyleModel = dataZoomModel.getModel('textStyle'); thisGroup.add(handleLabels[handleIndex] = new ZRText({ silent: true, invisible: true, style: createTextStyle(textStyleModel, { x: 0, y: 0, text: '', verticalAlign: 'middle', align: 'center', fill: textStyleModel.getTextColor(), font: textStyleModel.getFont() }), z2: 10 })); }, this); // Handle to move. Only visible when brushSelect is set true. var actualMoveZone = filler; if (brushSelect) { var moveHandleHeight = parsePercent$1(dataZoomModel.get('moveHandleSize'), size[1]); var moveHandle_1 = displayables.moveHandle = new Rect({ style: dataZoomModel.getModel('moveHandleStyle').getItemStyle(), silent: true, shape: { r: [0, 0, 2, 2], y: size[1] - 0.5, height: moveHandleHeight } }); var iconSize = moveHandleHeight * 0.8; var moveHandleIcon = displayables.moveHandleIcon = createSymbol(dataZoomModel.get('moveHandleIcon'), -iconSize / 2, -iconSize / 2, iconSize, iconSize, '#fff', true); moveHandleIcon.silent = true; moveHandleIcon.y = size[1] + moveHandleHeight / 2 - 0.5; moveHandle_1.ensureState('emphasis').style = dataZoomModel.getModel(['emphasis', 'moveHandleStyle']).getItemStyle(); var moveZoneExpandSize = Math.min(size[1] / 2, Math.max(moveHandleHeight, 10)); actualMoveZone = displayables.moveZone = new Rect({ invisible: true, shape: { y: size[1] - moveZoneExpandSize, height: moveHandleHeight + moveZoneExpandSize } }); actualMoveZone.on('mouseover', function () { api.enterEmphasis(moveHandle_1); }).on('mouseout', function () { api.leaveEmphasis(moveHandle_1); }); sliderGroup.add(moveHandle_1); sliderGroup.add(moveHandleIcon); sliderGroup.add(actualMoveZone); } actualMoveZone.attr({ draggable: true, cursor: getCursor(this._orient), drift: bind(this._onDragMove, this, 'all'), ondragstart: bind(this._showDataInfo, this, true), ondragend: bind(this._onDragEnd, this), onmouseover: bind(this._showDataInfo, this, true), onmouseout: bind(this._showDataInfo, this, false) }); }; SliderZoomView.prototype._resetInterval = function () { var range = this._range = this.dataZoomModel.getPercentRange(); var viewExtent = this._getViewExtent(); this._handleEnds = [linearMap(range[0], [0, 100], viewExtent, true), linearMap(range[1], [0, 100], viewExtent, true)]; }; SliderZoomView.prototype._updateInterval = function (handleIndex, delta) { var dataZoomModel = this.dataZoomModel; var handleEnds = this._handleEnds; var viewExtend = this._getViewExtent(); var minMaxSpan = dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan(); var percentExtent = [0, 100]; sliderMove(delta, handleEnds, viewExtend, dataZoomModel.get('zoomLock') ? 'all' : handleIndex, minMaxSpan.minSpan != null ? linearMap(minMaxSpan.minSpan, percentExtent, viewExtend, true) : null, minMaxSpan.maxSpan != null ? linearMap(minMaxSpan.maxSpan, percentExtent, viewExtend, true) : null); var lastRange = this._range; var range = this._range = asc([linearMap(handleEnds[0], viewExtend, percentExtent, true), linearMap(handleEnds[1], viewExtend, percentExtent, true)]); return !lastRange || lastRange[0] !== range[0] || lastRange[1] !== range[1]; }; SliderZoomView.prototype._updateView = function (nonRealtime) { var displaybles = this._displayables; var handleEnds = this._handleEnds; var handleInterval = asc(handleEnds.slice()); var size = this._size; each([0, 1], function (handleIndex) { // Handles var handle = displaybles.handles[handleIndex]; var handleHeight = this._handleHeight; handle.attr({ scaleX: handleHeight / 2, scaleY: handleHeight / 2, // This is a trick, by adding an extra tiny offset to let the default handle's end point align to the drag window. // NOTE: It may affect some custom shapes a bit. But we prefer to have better result by default. x: handleEnds[handleIndex] + (handleIndex ? -1 : 1), y: size[1] / 2 - handleHeight / 2 }); }, this); // Filler displaybles.filler.setShape({ x: handleInterval[0], y: 0, width: handleInterval[1] - handleInterval[0], height: size[1] }); var viewExtent = { x: handleInterval[0], width: handleInterval[1] - handleInterval[0] }; // Move handle if (displaybles.moveHandle) { displaybles.moveHandle.setShape(viewExtent); displaybles.moveZone.setShape(viewExtent); // Force update path on the invisible object displaybles.moveZone.getBoundingRect(); displaybles.moveHandleIcon && displaybles.moveHandleIcon.attr('x', viewExtent.x + viewExtent.width / 2); } // update clip path of shadow. var dataShadowSegs = displaybles.dataShadowSegs; var segIntervals = [0, handleInterval[0], handleInterval[1], size[0]]; for (var i = 0; i < dataShadowSegs.length; i++) { var segGroup = dataShadowSegs[i]; var clipPath = segGroup.getClipPath(); if (!clipPath) { clipPath = new Rect(); segGroup.setClipPath(clipPath); } clipPath.setShape({ x: segIntervals[i], y: 0, width: segIntervals[i + 1] - segIntervals[i], height: size[1] }); } this._updateDataInfo(nonRealtime); }; SliderZoomView.prototype._updateDataInfo = function (nonRealtime) { var dataZoomModel = this.dataZoomModel; var displaybles = this._displayables; var handleLabels = displaybles.handleLabels; var orient = this._orient; var labelTexts = ['', '']; // FIXME // date型,支持formatter,autoformatter(ec2 date.getAutoFormatter) if (dataZoomModel.get('showDetail')) { var axisProxy = dataZoomModel.findRepresentativeAxisProxy(); if (axisProxy) { var axis = axisProxy.getAxisModel().axis; var range = this._range; var dataInterval = nonRealtime // See #4434, data and axis are not processed and reset yet in non-realtime mode. ? axisProxy.calculateDataWindow({ start: range[0], end: range[1] }).valueWindow : axisProxy.getDataValueWindow(); labelTexts = [this._formatLabel(dataInterval[0], axis), this._formatLabel(dataInterval[1], axis)]; } } var orderedHandleEnds = asc(this._handleEnds.slice()); setLabel.call(this, 0); setLabel.call(this, 1); function setLabel(handleIndex) { // Label // Text should not transform by barGroup. // Ignore handlers transform var barTransform = getTransform(displaybles.handles[handleIndex].parent, this.group); var direction = transformDirection(handleIndex === 0 ? 'right' : 'left', barTransform); var offset = this._handleWidth / 2 + LABEL_GAP; var textPoint = applyTransform$1([orderedHandleEnds[handleIndex] + (handleIndex === 0 ? -offset : offset), this._size[1] / 2], barTransform); handleLabels[handleIndex].setStyle({ x: textPoint[0], y: textPoint[1], verticalAlign: orient === HORIZONTAL ? 'middle' : direction, align: orient === HORIZONTAL ? direction : 'center', text: labelTexts[handleIndex] }); } }; SliderZoomView.prototype._formatLabel = function (value, axis) { var dataZoomModel = this.dataZoomModel; var labelFormatter = dataZoomModel.get('labelFormatter'); var labelPrecision = dataZoomModel.get('labelPrecision'); if (labelPrecision == null || labelPrecision === 'auto') { labelPrecision = axis.getPixelPrecision(); } var valueStr = value == null || isNaN(value) ? '' // FIXME Glue code : axis.type === 'category' || axis.type === 'time' ? axis.scale.getLabel({ value: Math.round(value) }) // param of toFixed should less then 20. : value.toFixed(Math.min(labelPrecision, 20)); return isFunction(labelFormatter) ? labelFormatter(value, valueStr) : isString(labelFormatter) ? labelFormatter.replace('{value}', valueStr) : valueStr; }; /** * @param showOrHide true: show, false: hide */ SliderZoomView.prototype._showDataInfo = function (showOrHide) { // Always show when drgging. showOrHide = this._dragging || showOrHide; var displayables = this._displayables; var handleLabels = displayables.handleLabels; handleLabels[0].attr('invisible', !showOrHide); handleLabels[1].attr('invisible', !showOrHide); // Highlight move handle displayables.moveHandle && this.api[showOrHide ? 'enterEmphasis' : 'leaveEmphasis'](displayables.moveHandle, 1); }; SliderZoomView.prototype._onDragMove = function (handleIndex, dx, dy, event) { this._dragging = true; // For mobile device, prevent screen slider on the button. stop(event.event); // Transform dx, dy to bar coordination. var barTransform = this._displayables.sliderGroup.getLocalTransform(); var vertex = applyTransform$1([dx, dy], barTransform, true); var changed = this._updateInterval(handleIndex, vertex[0]); var realtime = this.dataZoomModel.get('realtime'); this._updateView(!realtime); // Avoid dispatch dataZoom repeatly but range not changed, // which cause bad visual effect when progressive enabled. changed && realtime && this._dispatchZoomAction(true); }; SliderZoomView.prototype._onDragEnd = function () { this._dragging = false; this._showDataInfo(false); // While in realtime mode and stream mode, dispatch action when // drag end will cause the whole view rerender, which is unnecessary. var realtime = this.dataZoomModel.get('realtime'); !realtime && this._dispatchZoomAction(false); }; SliderZoomView.prototype._onClickPanel = function (e) { var size = this._size; var localPoint = this._displayables.sliderGroup.transformCoordToLocal(e.offsetX, e.offsetY); if (localPoint[0] < 0 || localPoint[0] > size[0] || localPoint[1] < 0 || localPoint[1] > size[1]) { return; } var handleEnds = this._handleEnds; var center = (handleEnds[0] + handleEnds[1]) / 2; var changed = this._updateInterval('all', localPoint[0] - center); this._updateView(); changed && this._dispatchZoomAction(false); }; SliderZoomView.prototype._onBrushStart = function (e) { var x = e.offsetX; var y = e.offsetY; this._brushStart = new Point(x, y); this._brushing = true; this._brushStartTime = +new Date(); // this._updateBrushRect(x, y); }; SliderZoomView.prototype._onBrushEnd = function (e) { if (!this._brushing) { return; } var brushRect = this._displayables.brushRect; this._brushing = false; if (!brushRect) { return; } brushRect.attr('ignore', true); var brushShape = brushRect.shape; var brushEndTime = +new Date(); // console.log(brushEndTime - this._brushStartTime); if (brushEndTime - this._brushStartTime < 200 && Math.abs(brushShape.width) < 5) { // Will treat it as a click return; } var viewExtend = this._getViewExtent(); var percentExtent = [0, 100]; this._range = asc([linearMap(brushShape.x, viewExtend, percentExtent, true), linearMap(brushShape.x + brushShape.width, viewExtend, percentExtent, true)]); this._handleEnds = [brushShape.x, brushShape.x + brushShape.width]; this._updateView(); this._dispatchZoomAction(false); }; SliderZoomView.prototype._onBrush = function (e) { if (this._brushing) { // For mobile device, prevent screen slider on the button. stop(e.event); this._updateBrushRect(e.offsetX, e.offsetY); } }; SliderZoomView.prototype._updateBrushRect = function (mouseX, mouseY) { var displayables = this._displayables; var dataZoomModel = this.dataZoomModel; var brushRect = displayables.brushRect; if (!brushRect) { brushRect = displayables.brushRect = new Rect$2({ silent: true, style: dataZoomModel.getModel('brushStyle').getItemStyle() }); displayables.sliderGroup.add(brushRect); } brushRect.attr('ignore', false); var brushStart = this._brushStart; var sliderGroup = this._displayables.sliderGroup; var endPoint = sliderGroup.transformCoordToLocal(mouseX, mouseY); var startPoint = sliderGroup.transformCoordToLocal(brushStart.x, brushStart.y); var size = this._size; endPoint[0] = Math.max(Math.min(size[0], endPoint[0]), 0); brushRect.setShape({ x: startPoint[0], y: 0, width: endPoint[0] - startPoint[0], height: size[1] }); }; /** * This action will be throttled. */ SliderZoomView.prototype._dispatchZoomAction = function (realtime) { var range = this._range; this.api.dispatchAction({ type: 'dataZoom', from: this.uid, dataZoomId: this.dataZoomModel.id, animation: realtime ? REALTIME_ANIMATION_CONFIG : null, start: range[0], end: range[1] }); }; SliderZoomView.prototype._findCoordRect = function () { // Find the grid coresponding to the first axis referred by dataZoom. var rect; var coordSysInfoList = collectReferCoordSysModelInfo(this.dataZoomModel).infoList; if (!rect && coordSysInfoList.length) { var coordSys = coordSysInfoList[0].model.coordinateSystem; rect = coordSys.getRect && coordSys.getRect(); } if (!rect) { var width = this.api.getWidth(); var height = this.api.getHeight(); rect = { x: width * 0.2, y: height * 0.2, width: width * 0.6, height: height * 0.6 }; } return rect; }; SliderZoomView.type = 'dataZoom.slider'; return SliderZoomView; }(DataZoomView); function getOtherDim(thisDim) { // FIXME // 这个逻辑和getOtherAxis里一致,但是写在这里是否不好 var map = { x: 'y', y: 'x', radius: 'angle', angle: 'radius' }; return map[thisDim]; } function getCursor(orient) { return orient === 'vertical' ? 'ns-resize' : 'ew-resize'; } function install$L(registers) { registers.registerComponentModel(SliderZoomModel); registers.registerComponentView(SliderZoomView); installCommon(registers); } function install$M(registers) { use(install$K); use(install$L); // Do not install './dataZoomSelect', // since it only work for toolbox dataZoom. } var visualDefault = { /** * @public */ get: function (visualType, key, isCategory) { var value = clone((defaultOption$1[visualType] || {})[key]); return isCategory ? isArray(value) ? value[value.length - 1] : value : value; } }; var defaultOption$1 = { color: { active: ['#006edd', '#e0ffff'], inactive: ['rgba(0,0,0,0)'] }, colorHue: { active: [0, 360], inactive: [0, 0] }, colorSaturation: { active: [0.3, 1], inactive: [0, 0] }, colorLightness: { active: [0.9, 0.5], inactive: [0, 0] }, colorAlpha: { active: [0.3, 1], inactive: [0, 0] }, opacity: { active: [0.3, 1], inactive: [0, 0] }, symbol: { active: ['circle', 'roundRect', 'diamond'], inactive: ['none'] }, symbolSize: { active: [10, 50], inactive: [0, 0] } }; var mapVisual$1 = VisualMapping.mapVisual; var eachVisual = VisualMapping.eachVisual; var isArray$1 = isArray; var each$f = each; var asc$2 = asc; var linearMap$1 = linearMap; var VisualMapModel = /** @class */ function (_super) { __extends(VisualMapModel, _super); function VisualMapModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = VisualMapModel.type; _this.stateList = ['inRange', 'outOfRange']; _this.replacableOptionKeys = ['inRange', 'outOfRange', 'target', 'controller', 'color']; _this.layoutMode = { type: 'box', ignoreSize: true }; /** * [lowerBound, upperBound] */ _this.dataBound = [-Infinity, Infinity]; _this.targetVisuals = {}; _this.controllerVisuals = {}; return _this; } VisualMapModel.prototype.init = function (option, parentModel, ecModel) { this.mergeDefaultAndTheme(option, ecModel); }; /** * @protected */ VisualMapModel.prototype.optionUpdated = function (newOption, isInit) { var thisOption = this.option; // FIXME // necessary? // Disable realtime view update if canvas is not supported. if (!env.canvasSupported) { thisOption.realtime = false; } !isInit && replaceVisualOption(thisOption, newOption, this.replacableOptionKeys); this.textStyleModel = this.getModel('textStyle'); this.resetItemSize(); this.completeVisualOption(); }; /** * @protected */ VisualMapModel.prototype.resetVisual = function (supplementVisualOption) { var stateList = this.stateList; supplementVisualOption = bind(supplementVisualOption, this); this.controllerVisuals = createVisualMappings(this.option.controller, stateList, supplementVisualOption); this.targetVisuals = createVisualMappings(this.option.target, stateList, supplementVisualOption); }; /** * @public */ VisualMapModel.prototype.getItemSymbol = function () { return null; }; /** * @protected * @return {Array.} An array of series indices. */ VisualMapModel.prototype.getTargetSeriesIndices = function () { var optionSeriesIndex = this.option.seriesIndex; var seriesIndices = []; if (optionSeriesIndex == null || optionSeriesIndex === 'all') { this.ecModel.eachSeries(function (seriesModel, index) { seriesIndices.push(index); }); } else { seriesIndices = normalizeToArray(optionSeriesIndex); } return seriesIndices; }; /** * @public */ VisualMapModel.prototype.eachTargetSeries = function (callback, context) { each(this.getTargetSeriesIndices(), function (seriesIndex) { var seriesModel = this.ecModel.getSeriesByIndex(seriesIndex); if (seriesModel) { callback.call(context, seriesModel); } }, this); }; /** * @pubilc */ VisualMapModel.prototype.isTargetSeries = function (seriesModel) { var is = false; this.eachTargetSeries(function (model) { model === seriesModel && (is = true); }); return is; }; /** * @example * this.formatValueText(someVal); // format single numeric value to text. * this.formatValueText(someVal, true); // format single category value to text. * this.formatValueText([min, max]); // format numeric min-max to text. * this.formatValueText([this.dataBound[0], max]); // using data lower bound. * this.formatValueText([min, this.dataBound[1]]); // using data upper bound. * * @param value Real value, or this.dataBound[0 or 1]. * @param isCategory Only available when value is number. * @param edgeSymbols Open-close symbol when value is interval. * @protected */ VisualMapModel.prototype.formatValueText = function (value, isCategory, edgeSymbols) { var option = this.option; var precision = option.precision; var dataBound = this.dataBound; var formatter = option.formatter; var isMinMax; edgeSymbols = edgeSymbols || ['<', '>']; if (isArray(value)) { value = value.slice(); isMinMax = true; } var textValue = isCategory ? value // Value is string when isCategory : isMinMax ? [toFixed(value[0]), toFixed(value[1])] : toFixed(value); if (isString(formatter)) { return formatter.replace('{value}', isMinMax ? textValue[0] : textValue).replace('{value2}', isMinMax ? textValue[1] : textValue); } else if (isFunction(formatter)) { return isMinMax ? formatter(value[0], value[1]) : formatter(value); } if (isMinMax) { if (value[0] === dataBound[0]) { return edgeSymbols[0] + ' ' + textValue[1]; } else if (value[1] === dataBound[1]) { return edgeSymbols[1] + ' ' + textValue[0]; } else { return textValue[0] + ' - ' + textValue[1]; } } else { // Format single value (includes category case). return textValue; } function toFixed(val) { return val === dataBound[0] ? 'min' : val === dataBound[1] ? 'max' : (+val).toFixed(Math.min(precision, 20)); } }; /** * @protected */ VisualMapModel.prototype.resetExtent = function () { var thisOption = this.option; // Can not calculate data extent by data here. // Because series and data may be modified in processing stage. // So we do not support the feature "auto min/max". var extent = asc$2([thisOption.min, thisOption.max]); this._dataExtent = extent; }; /** * Return Concrete dimention. If return null/undefined, no dimension used. */ VisualMapModel.prototype.getDataDimension = function (list) { var optDim = this.option.dimension; var listDimensions = list.dimensions; if (optDim == null && !listDimensions.length) { return; } if (optDim != null) { return list.getDimension(optDim); } var dimNames = list.dimensions; for (var i = dimNames.length - 1; i >= 0; i--) { var dimName = dimNames[i]; var dimInfo = list.getDimensionInfo(dimName); if (!dimInfo.isCalculationCoord) { return dimName; } } }; VisualMapModel.prototype.getExtent = function () { return this._dataExtent.slice(); }; VisualMapModel.prototype.completeVisualOption = function () { var ecModel = this.ecModel; var thisOption = this.option; var base = { inRange: thisOption.inRange, outOfRange: thisOption.outOfRange }; var target = thisOption.target || (thisOption.target = {}); var controller = thisOption.controller || (thisOption.controller = {}); merge(target, base); // Do not override merge(controller, base); // Do not override var isCategory = this.isCategory(); completeSingle.call(this, target); completeSingle.call(this, controller); completeInactive.call(this, target, 'inRange', 'outOfRange'); // completeInactive.call(this, target, 'outOfRange', 'inRange'); completeController.call(this, controller); function completeSingle(base) { // Compatible with ec2 dataRange.color. // The mapping order of dataRange.color is: [high value, ..., low value] // whereas inRange.color and outOfRange.color is [low value, ..., high value] // Notice: ec2 has no inverse. if (isArray$1(thisOption.color) // If there has been inRange: {symbol: ...}, adding color is a mistake. // So adding color only when no inRange defined. && !base.inRange) { base.inRange = { color: thisOption.color.slice().reverse() }; } // Compatible with previous logic, always give a defautl color, otherwise // simple config with no inRange and outOfRange will not work. // Originally we use visualMap.color as the default color, but setOption at // the second time the default color will be erased. So we change to use // constant DEFAULT_COLOR. // If user do not want the default color, set inRange: {color: null}. base.inRange = base.inRange || { color: ecModel.get('gradientColor') }; } function completeInactive(base, stateExist, stateAbsent) { var optExist = base[stateExist]; var optAbsent = base[stateAbsent]; if (optExist && !optAbsent) { optAbsent = base[stateAbsent] = {}; each$f(optExist, function (visualData, visualType) { if (!VisualMapping.isValidType(visualType)) { return; } var defa = visualDefault.get(visualType, 'inactive', isCategory); if (defa != null) { optAbsent[visualType] = defa; // Compatibable with ec2: // Only inactive color to rgba(0,0,0,0) can not // make label transparent, so use opacity also. if (visualType === 'color' && !optAbsent.hasOwnProperty('opacity') && !optAbsent.hasOwnProperty('colorAlpha')) { optAbsent.opacity = [0, 0]; } } }); } } function completeController(controller) { var symbolExists = (controller.inRange || {}).symbol || (controller.outOfRange || {}).symbol; var symbolSizeExists = (controller.inRange || {}).symbolSize || (controller.outOfRange || {}).symbolSize; var inactiveColor = this.get('inactiveColor'); var itemSymbol = this.getItemSymbol(); var defaultSymbol = itemSymbol || 'roundRect'; each$f(this.stateList, function (state) { var itemSize = this.itemSize; var visuals = controller[state]; // Set inactive color for controller if no other color // attr (like colorAlpha) specified. if (!visuals) { visuals = controller[state] = { color: isCategory ? inactiveColor : [inactiveColor] }; } // Consistent symbol and symbolSize if not specified. if (visuals.symbol == null) { visuals.symbol = symbolExists && clone(symbolExists) || (isCategory ? defaultSymbol : [defaultSymbol]); } if (visuals.symbolSize == null) { visuals.symbolSize = symbolSizeExists && clone(symbolSizeExists) || (isCategory ? itemSize[0] : [itemSize[0], itemSize[0]]); } // Filter none visuals.symbol = mapVisual$1(visuals.symbol, function (symbol) { return symbol === 'none' ? defaultSymbol : symbol; }); // Normalize symbolSize var symbolSize = visuals.symbolSize; if (symbolSize != null) { var max_1 = -Infinity; // symbolSize can be object when categories defined. eachVisual(symbolSize, function (value) { value > max_1 && (max_1 = value); }); visuals.symbolSize = mapVisual$1(symbolSize, function (value) { return linearMap$1(value, [0, max_1], [0, itemSize[0]], true); }); } }, this); } }; VisualMapModel.prototype.resetItemSize = function () { this.itemSize = [parseFloat(this.get('itemWidth')), parseFloat(this.get('itemHeight'))]; }; VisualMapModel.prototype.isCategory = function () { return !!this.option.categories; }; /** * @public * @abstract */ VisualMapModel.prototype.setSelected = function (selected) {}; VisualMapModel.prototype.getSelected = function () { return null; }; /** * @public * @abstract */ VisualMapModel.prototype.getValueState = function (value) { return null; }; /** * FIXME * Do not publish to thirt-part-dev temporarily * util the interface is stable. (Should it return * a function but not visual meta?) * * @pubilc * @abstract * @param getColorVisual * params: value, valueState * return: color * @return {Object} visualMeta * should includes {stops, outerColors} * outerColor means [colorBeyondMinValue, colorBeyondMaxValue] */ VisualMapModel.prototype.getVisualMeta = function (getColorVisual) { return null; }; VisualMapModel.type = 'visualMap'; VisualMapModel.dependencies = ['series']; VisualMapModel.defaultOption = { show: true, zlevel: 0, z: 4, seriesIndex: 'all', min: 0, max: 200, left: 0, right: null, top: null, bottom: 0, itemWidth: null, itemHeight: null, inverse: false, orient: 'vertical', backgroundColor: 'rgba(0,0,0,0)', borderColor: '#ccc', contentColor: '#5793f3', inactiveColor: '#aaa', borderWidth: 0, padding: 5, // 接受数组分别设定上右下左边距,同css textGap: 10, precision: 0, textStyle: { color: '#333' // 值域文字颜色 } }; return VisualMapModel; }(ComponentModel); var DEFAULT_BAR_BOUND = [20, 140]; var ContinuousModel = /** @class */ function (_super) { __extends(ContinuousModel, _super); function ContinuousModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ContinuousModel.type; return _this; } /** * @override */ ContinuousModel.prototype.optionUpdated = function (newOption, isInit) { _super.prototype.optionUpdated.apply(this, arguments); this.resetExtent(); this.resetVisual(function (mappingOption) { mappingOption.mappingMethod = 'linear'; mappingOption.dataExtent = this.getExtent(); }); this._resetRange(); }; /** * @protected * @override */ ContinuousModel.prototype.resetItemSize = function () { _super.prototype.resetItemSize.apply(this, arguments); var itemSize = this.itemSize; (itemSize[0] == null || isNaN(itemSize[0])) && (itemSize[0] = DEFAULT_BAR_BOUND[0]); (itemSize[1] == null || isNaN(itemSize[1])) && (itemSize[1] = DEFAULT_BAR_BOUND[1]); }; /** * @private */ ContinuousModel.prototype._resetRange = function () { var dataExtent = this.getExtent(); var range = this.option.range; if (!range || range.auto) { // `range` should always be array (so we dont use other // value like 'auto') for user-friend. (consider getOption). dataExtent.auto = 1; this.option.range = dataExtent; } else if (isArray(range)) { if (range[0] > range[1]) { range.reverse(); } range[0] = Math.max(range[0], dataExtent[0]); range[1] = Math.min(range[1], dataExtent[1]); } }; /** * @protected * @override */ ContinuousModel.prototype.completeVisualOption = function () { _super.prototype.completeVisualOption.apply(this, arguments); each(this.stateList, function (state) { var symbolSize = this.option.controller[state].symbolSize; if (symbolSize && symbolSize[0] !== symbolSize[1]) { symbolSize[0] = symbolSize[1] / 3; // For good looking. } }, this); }; /** * @override */ ContinuousModel.prototype.setSelected = function (selected) { this.option.range = selected.slice(); this._resetRange(); }; /** * @public */ ContinuousModel.prototype.getSelected = function () { var dataExtent = this.getExtent(); var dataInterval = asc((this.get('range') || []).slice()); // Clamp dataInterval[0] > dataExtent[1] && (dataInterval[0] = dataExtent[1]); dataInterval[1] > dataExtent[1] && (dataInterval[1] = dataExtent[1]); dataInterval[0] < dataExtent[0] && (dataInterval[0] = dataExtent[0]); dataInterval[1] < dataExtent[0] && (dataInterval[1] = dataExtent[0]); return dataInterval; }; /** * @override */ ContinuousModel.prototype.getValueState = function (value) { var range = this.option.range; var dataExtent = this.getExtent(); // When range[0] === dataExtent[0], any value larger than dataExtent[0] maps to 'inRange'. // range[1] is processed likewise. return (range[0] <= dataExtent[0] || range[0] <= value) && (range[1] >= dataExtent[1] || value <= range[1]) ? 'inRange' : 'outOfRange'; }; ContinuousModel.prototype.findTargetDataIndices = function (range) { var result = []; this.eachTargetSeries(function (seriesModel) { var dataIndices = []; var data = seriesModel.getData(); data.each(this.getDataDimension(data), function (value, dataIndex) { range[0] <= value && value <= range[1] && dataIndices.push(dataIndex); }, this); result.push({ seriesId: seriesModel.id, dataIndex: dataIndices }); }, this); return result; }; /** * @implement */ ContinuousModel.prototype.getVisualMeta = function (getColorVisual) { var oVals = getColorStopValues(this, 'outOfRange', this.getExtent()); var iVals = getColorStopValues(this, 'inRange', this.option.range.slice()); var stops = []; function setStop(value, valueState) { stops.push({ value: value, color: getColorVisual(value, valueState) }); } // Format to: outOfRange -- inRange -- outOfRange. var iIdx = 0; var oIdx = 0; var iLen = iVals.length; var oLen = oVals.length; for (; oIdx < oLen && (!iVals.length || oVals[oIdx] <= iVals[0]); oIdx++) { // If oVal[oIdx] === iVals[iIdx], oVal[oIdx] should be ignored. if (oVals[oIdx] < iVals[iIdx]) { setStop(oVals[oIdx], 'outOfRange'); } } for (var first = 1; iIdx < iLen; iIdx++, first = 0) { // If range is full, value beyond min, max will be clamped. // make a singularity first && stops.length && setStop(iVals[iIdx], 'outOfRange'); setStop(iVals[iIdx], 'inRange'); } for (var first = 1; oIdx < oLen; oIdx++) { if (!iVals.length || iVals[iVals.length - 1] < oVals[oIdx]) { // make a singularity if (first) { stops.length && setStop(stops[stops.length - 1].value, 'outOfRange'); first = 0; } setStop(oVals[oIdx], 'outOfRange'); } } var stopsLen = stops.length; return { stops: stops, outerColors: [stopsLen ? stops[0].color : 'transparent', stopsLen ? stops[stopsLen - 1].color : 'transparent'] }; }; ContinuousModel.type = 'visualMap.continuous'; ContinuousModel.defaultOption = inheritDefaultOption(VisualMapModel.defaultOption, { align: 'auto', calculable: false, hoverLink: true, realtime: true, handleIcon: 'path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z', handleSize: '120%', handleStyle: { borderColor: '#fff', borderWidth: 1 }, indicatorIcon: 'circle', indicatorSize: '50%', indicatorStyle: { borderColor: '#fff', borderWidth: 2, shadowBlur: 2, shadowOffsetX: 1, shadowOffsetY: 1, shadowColor: 'rgba(0,0,0,0.2)' } // emphasis: { // handleStyle: { // shadowBlur: 3, // shadowOffsetX: 1, // shadowOffsetY: 1, // shadowColor: 'rgba(0,0,0,0.2)' // } // } }); return ContinuousModel; }(VisualMapModel); function getColorStopValues(visualMapModel, valueState, dataExtent) { if (dataExtent[0] === dataExtent[1]) { return dataExtent.slice(); } // When using colorHue mapping, it is not linear color any more. // Moreover, canvas gradient seems not to be accurate linear. // FIXME // Should be arbitrary value 100? or based on pixel size? var count = 200; var step = (dataExtent[1] - dataExtent[0]) / count; var value = dataExtent[0]; var stopValues = []; for (var i = 0; i <= count && value < dataExtent[1]; i++) { stopValues.push(value); value += step; } stopValues.push(dataExtent[1]); return stopValues; } var VisualMapView = /** @class */ function (_super) { __extends(VisualMapView, _super); function VisualMapView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = VisualMapView.type; _this.autoPositionValues = { left: 1, right: 1, top: 1, bottom: 1 }; return _this; } VisualMapView.prototype.init = function (ecModel, api) { this.ecModel = ecModel; this.api = api; }; /** * @protected */ VisualMapView.prototype.render = function (visualMapModel, ecModel, api, payload // TODO: TYPE ) { this.visualMapModel = visualMapModel; if (visualMapModel.get('show') === false) { this.group.removeAll(); return; } this.doRender(visualMapModel, ecModel, api, payload); }; /** * @protected */ VisualMapView.prototype.renderBackground = function (group) { var visualMapModel = this.visualMapModel; var padding = normalizeCssArray$1(visualMapModel.get('padding') || 0); var rect = group.getBoundingRect(); group.add(new Rect({ z2: -1, silent: true, shape: { x: rect.x - padding[3], y: rect.y - padding[0], width: rect.width + padding[3] + padding[1], height: rect.height + padding[0] + padding[2] }, style: { fill: visualMapModel.get('backgroundColor'), stroke: visualMapModel.get('borderColor'), lineWidth: visualMapModel.get('borderWidth') } })); }; /** * @protected * @param targetValue can be Infinity or -Infinity * @param visualCluster Only can be 'color' 'opacity' 'symbol' 'symbolSize' * @param opts * @param opts.forceState Specify state, instead of using getValueState method. * @param opts.convertOpacityToAlpha For color gradient in controller widget. * @return {*} Visual value. */ VisualMapView.prototype.getControllerVisual = function (targetValue, visualCluster, opts) { opts = opts || {}; var forceState = opts.forceState; var visualMapModel = this.visualMapModel; var visualObj = {}; // Default values. if (visualCluster === 'color') { var defaultColor = visualMapModel.get('contentColor'); visualObj.color = defaultColor; } function getter(key) { return visualObj[key]; } function setter(key, value) { visualObj[key] = value; } var mappings = visualMapModel.controllerVisuals[forceState || visualMapModel.getValueState(targetValue)]; var visualTypes = VisualMapping.prepareVisualTypes(mappings); each(visualTypes, function (type) { var visualMapping = mappings[type]; if (opts.convertOpacityToAlpha && type === 'opacity') { type = 'colorAlpha'; visualMapping = mappings.__alphaForOpacity; } if (VisualMapping.dependsOn(type, visualCluster)) { visualMapping && visualMapping.applyVisual(targetValue, getter, setter); } }); return visualObj[visualCluster]; }; VisualMapView.prototype.positionGroup = function (group) { var model = this.visualMapModel; var api = this.api; positionElement(group, model.getBoxLayoutParams(), { width: api.getWidth(), height: api.getHeight() }); }; VisualMapView.prototype.doRender = function (visualMapModel, ecModel, api, payload) {}; VisualMapView.type = 'visualMap'; return VisualMapView; }(ComponentView); var paramsSet = [['left', 'right', 'width'], ['top', 'bottom', 'height']]; /** * @param visualMapModel * @param api * @param itemSize always [short, long] * @return {string} 'left' or 'right' or 'top' or 'bottom' */ function getItemAlign(visualMapModel, api, itemSize) { var modelOption = visualMapModel.option; var itemAlign = modelOption.align; if (itemAlign != null && itemAlign !== 'auto') { return itemAlign; } // Auto decision align. var ecSize = { width: api.getWidth(), height: api.getHeight() }; var realIndex = modelOption.orient === 'horizontal' ? 1 : 0; var reals = paramsSet[realIndex]; var fakeValue = [0, null, 10]; var layoutInput = {}; for (var i = 0; i < 3; i++) { layoutInput[paramsSet[1 - realIndex][i]] = fakeValue[i]; layoutInput[reals[i]] = i === 2 ? itemSize[0] : modelOption[reals[i]]; } var rParam = [['x', 'width', 3], ['y', 'height', 0]][realIndex]; var rect = getLayoutRect(layoutInput, ecSize, modelOption.padding); return reals[(rect.margin[rParam[2]] || 0) + rect[rParam[0]] + rect[rParam[1]] * 0.5 < ecSize[rParam[1]] * 0.5 ? 0 : 1]; } /** * Prepare dataIndex for outside usage, where dataIndex means rawIndex, and * dataIndexInside means filtered index. */ // TODO: TYPE more specified payload types. function makeHighDownBatch(batch, visualMapModel) { each(batch || [], function (batchItem) { if (batchItem.dataIndex != null) { batchItem.dataIndexInside = batchItem.dataIndex; batchItem.dataIndex = null; } batchItem.highlightKey = 'visualMap' + (visualMapModel ? visualMapModel.componentIndex : ''); }); return batch; } var linearMap$2 = linearMap; var each$g = each; var mathMin$a = Math.min; var mathMax$a = Math.max; // Arbitrary value var HOVER_LINK_SIZE = 12; var HOVER_LINK_OUT = 6; // Notice: // Any "interval" should be by the order of [low, high]. // "handle0" (handleIndex === 0) maps to // low data value: this._dataInterval[0] and has low coord. // "handle1" (handleIndex === 1) maps to // high data value: this._dataInterval[1] and has high coord. // The logic of transform is implemented in this._createBarGroup. var ContinuousView = /** @class */ function (_super) { __extends(ContinuousView, _super); function ContinuousView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ContinuousView.type; _this._shapes = {}; _this._dataInterval = []; _this._handleEnds = []; _this._hoverLinkDataIndices = []; return _this; } ContinuousView.prototype.doRender = function (visualMapModel, ecModel, api, payload) { this._api = api; if (!payload || payload.type !== 'selectDataRange' || payload.from !== this.uid) { this._buildView(); } }; ContinuousView.prototype._buildView = function () { this.group.removeAll(); var visualMapModel = this.visualMapModel; var thisGroup = this.group; this._orient = visualMapModel.get('orient'); this._useHandle = visualMapModel.get('calculable'); this._resetInterval(); this._renderBar(thisGroup); var dataRangeText = visualMapModel.get('text'); this._renderEndsText(thisGroup, dataRangeText, 0); this._renderEndsText(thisGroup, dataRangeText, 1); // Do this for background size calculation. this._updateView(true); // After updating view, inner shapes is built completely, // and then background can be rendered. this.renderBackground(thisGroup); // Real update view this._updateView(); this._enableHoverLinkToSeries(); this._enableHoverLinkFromSeries(); this.positionGroup(thisGroup); }; ContinuousView.prototype._renderEndsText = function (group, dataRangeText, endsIndex) { if (!dataRangeText) { return; } // Compatible with ec2, text[0] map to high value, text[1] map low value. var text = dataRangeText[1 - endsIndex]; text = text != null ? text + '' : ''; var visualMapModel = this.visualMapModel; var textGap = visualMapModel.get('textGap'); var itemSize = visualMapModel.itemSize; var barGroup = this._shapes.mainGroup; var position = this._applyTransform([itemSize[0] / 2, endsIndex === 0 ? -textGap : itemSize[1] + textGap], barGroup); var align = this._applyTransform(endsIndex === 0 ? 'bottom' : 'top', barGroup); var orient = this._orient; var textStyleModel = this.visualMapModel.textStyleModel; this.group.add(new ZRText({ style: { x: position[0], y: position[1], verticalAlign: orient === 'horizontal' ? 'middle' : align, align: orient === 'horizontal' ? align : 'center', text: text, font: textStyleModel.getFont(), fill: textStyleModel.getTextColor() } })); }; ContinuousView.prototype._renderBar = function (targetGroup) { var visualMapModel = this.visualMapModel; var shapes = this._shapes; var itemSize = visualMapModel.itemSize; var orient = this._orient; var useHandle = this._useHandle; var itemAlign = getItemAlign(visualMapModel, this.api, itemSize); var mainGroup = shapes.mainGroup = this._createBarGroup(itemAlign); var gradientBarGroup = new Group(); mainGroup.add(gradientBarGroup); // Bar gradientBarGroup.add(shapes.outOfRange = createPolygon()); gradientBarGroup.add(shapes.inRange = createPolygon(null, useHandle ? getCursor$1(this._orient) : null, bind(this._dragHandle, this, 'all', false), bind(this._dragHandle, this, 'all', true))); // A border radius clip. gradientBarGroup.setClipPath(new Rect({ shape: { x: 0, y: 0, width: itemSize[0], height: itemSize[1], r: 3 } })); var textRect = visualMapModel.textStyleModel.getTextRect('国'); var textSize = mathMax$a(textRect.width, textRect.height); // Handle if (useHandle) { shapes.handleThumbs = []; shapes.handleLabels = []; shapes.handleLabelPoints = []; this._createHandle(visualMapModel, mainGroup, 0, itemSize, textSize, orient); this._createHandle(visualMapModel, mainGroup, 1, itemSize, textSize, orient); } this._createIndicator(visualMapModel, mainGroup, itemSize, textSize, orient); targetGroup.add(mainGroup); }; ContinuousView.prototype._createHandle = function (visualMapModel, mainGroup, handleIndex, itemSize, textSize, orient) { var onDrift = bind(this._dragHandle, this, handleIndex, false); var onDragEnd = bind(this._dragHandle, this, handleIndex, true); var handleSize = parsePercent(visualMapModel.get('handleSize'), itemSize[0]); var handleThumb = createSymbol(visualMapModel.get('handleIcon'), -handleSize / 2, -handleSize / 2, handleSize, handleSize, null, true); var cursor = getCursor$1(this._orient); handleThumb.attr({ cursor: cursor, draggable: true, drift: onDrift, ondragend: onDragEnd, onmousemove: function (e) { stop(e.event); } }); handleThumb.x = itemSize[0] / 2; handleThumb.useStyle(visualMapModel.getModel('handleStyle').getItemStyle()); handleThumb.setStyle({ strokeNoScale: true, strokeFirst: true }); handleThumb.style.lineWidth *= 2; handleThumb.ensureState('emphasis').style = visualMapModel.getModel(['emphasis', 'handleStyle']).getItemStyle(); setAsHighDownDispatcher(handleThumb, true); mainGroup.add(handleThumb); // Text is always horizontal layout but should not be effected by // transform (orient/inverse). So label is built separately but not // use zrender/graphic/helper/RectText, and is located based on view // group (according to handleLabelPoint) but not barGroup. var textStyleModel = this.visualMapModel.textStyleModel; var handleLabel = new ZRText({ cursor: cursor, draggable: true, drift: onDrift, onmousemove: function (e) { // Fot mobile devicem, prevent screen slider on the button. stop(e.event); }, ondragend: onDragEnd, style: { x: 0, y: 0, text: '', font: textStyleModel.getFont(), fill: textStyleModel.getTextColor() } }); handleLabel.ensureState('blur').style = { opacity: 0.1 }; handleLabel.stateTransition = { duration: 200 }; this.group.add(handleLabel); var handleLabelPoint = [handleSize, 0]; var shapes = this._shapes; shapes.handleThumbs[handleIndex] = handleThumb; shapes.handleLabelPoints[handleIndex] = handleLabelPoint; shapes.handleLabels[handleIndex] = handleLabel; }; ContinuousView.prototype._createIndicator = function (visualMapModel, mainGroup, itemSize, textSize, orient) { var scale = parsePercent(visualMapModel.get('indicatorSize'), itemSize[0]); var indicator = createSymbol(visualMapModel.get('indicatorIcon'), -scale / 2, -scale / 2, scale, scale, null, true); indicator.attr({ cursor: 'move', invisible: true, silent: true, x: itemSize[0] / 2 }); var indicatorStyle = visualMapModel.getModel('indicatorStyle').getItemStyle(); if (indicator instanceof ZRImage) { var pathStyle = indicator.style; indicator.useStyle(extend({ // TODO other properties like x, y ? image: pathStyle.image, x: pathStyle.x, y: pathStyle.y, width: pathStyle.width, height: pathStyle.height }, indicatorStyle)); } else { indicator.useStyle(indicatorStyle); } mainGroup.add(indicator); var textStyleModel = this.visualMapModel.textStyleModel; var indicatorLabel = new ZRText({ silent: true, invisible: true, style: { x: 0, y: 0, text: '', font: textStyleModel.getFont(), fill: textStyleModel.getTextColor() } }); this.group.add(indicatorLabel); var indicatorLabelPoint = [(orient === 'horizontal' ? textSize / 2 : HOVER_LINK_OUT) + itemSize[0] / 2, 0]; var shapes = this._shapes; shapes.indicator = indicator; shapes.indicatorLabel = indicatorLabel; shapes.indicatorLabelPoint = indicatorLabelPoint; this._firstShowIndicator = true; }; ContinuousView.prototype._dragHandle = function (handleIndex, isEnd, // dx is event from ondragend if isEnd is true. It's not used dx, dy) { if (!this._useHandle) { return; } this._dragging = !isEnd; if (!isEnd) { // Transform dx, dy to bar coordination. var vertex = this._applyTransform([dx, dy], this._shapes.mainGroup, true); this._updateInterval(handleIndex, vertex[1]); this._hideIndicator(); // Considering realtime, update view should be executed // before dispatch action. this._updateView(); } // dragEnd do not dispatch action when realtime. if (isEnd === !this.visualMapModel.get('realtime')) { // jshint ignore:line this.api.dispatchAction({ type: 'selectDataRange', from: this.uid, visualMapId: this.visualMapModel.id, selected: this._dataInterval.slice() }); } if (isEnd) { !this._hovering && this._clearHoverLinkToSeries(); } else if (useHoverLinkOnHandle(this.visualMapModel)) { this._doHoverLinkToSeries(this._handleEnds[handleIndex], false); } }; ContinuousView.prototype._resetInterval = function () { var visualMapModel = this.visualMapModel; var dataInterval = this._dataInterval = visualMapModel.getSelected(); var dataExtent = visualMapModel.getExtent(); var sizeExtent = [0, visualMapModel.itemSize[1]]; this._handleEnds = [linearMap$2(dataInterval[0], dataExtent, sizeExtent, true), linearMap$2(dataInterval[1], dataExtent, sizeExtent, true)]; }; /** * @private * @param {(number|string)} handleIndex 0 or 1 or 'all' * @param {number} dx * @param {number} dy */ ContinuousView.prototype._updateInterval = function (handleIndex, delta) { delta = delta || 0; var visualMapModel = this.visualMapModel; var handleEnds = this._handleEnds; var sizeExtent = [0, visualMapModel.itemSize[1]]; sliderMove(delta, handleEnds, sizeExtent, handleIndex, // cross is forbiden 0); var dataExtent = visualMapModel.getExtent(); // Update data interval. this._dataInterval = [linearMap$2(handleEnds[0], sizeExtent, dataExtent, true), linearMap$2(handleEnds[1], sizeExtent, dataExtent, true)]; }; ContinuousView.prototype._updateView = function (forSketch) { var visualMapModel = this.visualMapModel; var dataExtent = visualMapModel.getExtent(); var shapes = this._shapes; var outOfRangeHandleEnds = [0, visualMapModel.itemSize[1]]; var inRangeHandleEnds = forSketch ? outOfRangeHandleEnds : this._handleEnds; var visualInRange = this._createBarVisual(this._dataInterval, dataExtent, inRangeHandleEnds, 'inRange'); var visualOutOfRange = this._createBarVisual(dataExtent, dataExtent, outOfRangeHandleEnds, 'outOfRange'); shapes.inRange.setStyle({ fill: visualInRange.barColor // opacity: visualInRange.opacity }).setShape('points', visualInRange.barPoints); shapes.outOfRange.setStyle({ fill: visualOutOfRange.barColor // opacity: visualOutOfRange.opacity }).setShape('points', visualOutOfRange.barPoints); this._updateHandle(inRangeHandleEnds, visualInRange); }; ContinuousView.prototype._createBarVisual = function (dataInterval, dataExtent, handleEnds, forceState) { var opts = { forceState: forceState, convertOpacityToAlpha: true }; var colorStops = this._makeColorGradient(dataInterval, opts); var symbolSizes = [this.getControllerVisual(dataInterval[0], 'symbolSize', opts), this.getControllerVisual(dataInterval[1], 'symbolSize', opts)]; var barPoints = this._createBarPoints(handleEnds, symbolSizes); return { barColor: new LinearGradient(0, 0, 0, 1, colorStops), barPoints: barPoints, handlesColor: [colorStops[0].color, colorStops[colorStops.length - 1].color] }; }; ContinuousView.prototype._makeColorGradient = function (dataInterval, opts) { // Considering colorHue, which is not linear, so we have to sample // to calculate gradient color stops, but not only caculate head // and tail. var sampleNumber = 100; // Arbitrary value. var colorStops = []; var step = (dataInterval[1] - dataInterval[0]) / sampleNumber; colorStops.push({ color: this.getControllerVisual(dataInterval[0], 'color', opts), offset: 0 }); for (var i = 1; i < sampleNumber; i++) { var currValue = dataInterval[0] + step * i; if (currValue > dataInterval[1]) { break; } colorStops.push({ color: this.getControllerVisual(currValue, 'color', opts), offset: i / sampleNumber }); } colorStops.push({ color: this.getControllerVisual(dataInterval[1], 'color', opts), offset: 1 }); return colorStops; }; ContinuousView.prototype._createBarPoints = function (handleEnds, symbolSizes) { var itemSize = this.visualMapModel.itemSize; return [[itemSize[0] - symbolSizes[0], handleEnds[0]], [itemSize[0], handleEnds[0]], [itemSize[0], handleEnds[1]], [itemSize[0] - symbolSizes[1], handleEnds[1]]]; }; ContinuousView.prototype._createBarGroup = function (itemAlign) { var orient = this._orient; var inverse = this.visualMapModel.get('inverse'); return new Group(orient === 'horizontal' && !inverse ? { scaleX: itemAlign === 'bottom' ? 1 : -1, rotation: Math.PI / 2 } : orient === 'horizontal' && inverse ? { scaleX: itemAlign === 'bottom' ? -1 : 1, rotation: -Math.PI / 2 } : orient === 'vertical' && !inverse ? { scaleX: itemAlign === 'left' ? 1 : -1, scaleY: -1 } : { scaleX: itemAlign === 'left' ? 1 : -1 }); }; ContinuousView.prototype._updateHandle = function (handleEnds, visualInRange) { if (!this._useHandle) { return; } var shapes = this._shapes; var visualMapModel = this.visualMapModel; var handleThumbs = shapes.handleThumbs; var handleLabels = shapes.handleLabels; var itemSize = visualMapModel.itemSize; var dataExtent = visualMapModel.getExtent(); each$g([0, 1], function (handleIndex) { var handleThumb = handleThumbs[handleIndex]; handleThumb.setStyle('fill', visualInRange.handlesColor[handleIndex]); handleThumb.y = handleEnds[handleIndex]; var val = linearMap$2(handleEnds[handleIndex], [0, itemSize[1]], dataExtent, true); var symbolSize = this.getControllerVisual(val, 'symbolSize'); handleThumb.scaleX = handleThumb.scaleY = symbolSize / itemSize[0]; handleThumb.x = itemSize[0] - symbolSize / 2; // Update handle label position. var textPoint = applyTransform$1(shapes.handleLabelPoints[handleIndex], getTransform(handleThumb, this.group)); handleLabels[handleIndex].setStyle({ x: textPoint[0], y: textPoint[1], text: visualMapModel.formatValueText(this._dataInterval[handleIndex]), verticalAlign: 'middle', align: this._orient === 'vertical' ? this._applyTransform('left', shapes.mainGroup) : 'center' }); }, this); }; ContinuousView.prototype._showIndicator = function (cursorValue, textValue, rangeSymbol, halfHoverLinkSize) { var visualMapModel = this.visualMapModel; var dataExtent = visualMapModel.getExtent(); var itemSize = visualMapModel.itemSize; var sizeExtent = [0, itemSize[1]]; var shapes = this._shapes; var indicator = shapes.indicator; if (!indicator) { return; } indicator.attr('invisible', false); var opts = { convertOpacityToAlpha: true }; var color = this.getControllerVisual(cursorValue, 'color', opts); var symbolSize = this.getControllerVisual(cursorValue, 'symbolSize'); var y = linearMap$2(cursorValue, dataExtent, sizeExtent, true); var x = itemSize[0] - symbolSize / 2; var oldIndicatorPos = { x: indicator.x, y: indicator.y }; // Update handle label position. indicator.y = y; indicator.x = x; var textPoint = applyTransform$1(shapes.indicatorLabelPoint, getTransform(indicator, this.group)); var indicatorLabel = shapes.indicatorLabel; indicatorLabel.attr('invisible', false); var align = this._applyTransform('left', shapes.mainGroup); var orient = this._orient; var isHorizontal = orient === 'horizontal'; indicatorLabel.setStyle({ text: (rangeSymbol ? rangeSymbol : '') + visualMapModel.formatValueText(textValue), verticalAlign: isHorizontal ? align : 'middle', align: isHorizontal ? 'center' : align }); var indicatorNewProps = { x: x, y: y, style: { fill: color } }; var labelNewProps = { style: { x: textPoint[0], y: textPoint[1] } }; if (visualMapModel.ecModel.isAnimationEnabled() && !this._firstShowIndicator) { var animationCfg = { duration: 100, easing: 'cubicInOut', additive: true }; indicator.x = oldIndicatorPos.x; indicator.y = oldIndicatorPos.y; indicator.animateTo(indicatorNewProps, animationCfg); indicatorLabel.animateTo(labelNewProps, animationCfg); } else { indicator.attr(indicatorNewProps); indicatorLabel.attr(labelNewProps); } this._firstShowIndicator = false; var handleLabels = this._shapes.handleLabels; if (handleLabels) { for (var i = 0; i < handleLabels.length; i++) { // Fade out handle labels. // NOTE: Must use api enter/leave on emphasis/blur/select state. Or the global states manager will change it. this._api.enterBlur(handleLabels[i]); } } }; ContinuousView.prototype._enableHoverLinkToSeries = function () { var self = this; this._shapes.mainGroup.on('mousemove', function (e) { self._hovering = true; if (!self._dragging) { var itemSize = self.visualMapModel.itemSize; var pos = self._applyTransform([e.offsetX, e.offsetY], self._shapes.mainGroup, true, true); // For hover link show when hover handle, which might be // below or upper than sizeExtent. pos[1] = mathMin$a(mathMax$a(0, pos[1]), itemSize[1]); self._doHoverLinkToSeries(pos[1], 0 <= pos[0] && pos[0] <= itemSize[0]); } }).on('mouseout', function () { // When mouse is out of handle, hoverLink still need // to be displayed when realtime is set as false. self._hovering = false; !self._dragging && self._clearHoverLinkToSeries(); }); }; ContinuousView.prototype._enableHoverLinkFromSeries = function () { var zr = this.api.getZr(); if (this.visualMapModel.option.hoverLink) { zr.on('mouseover', this._hoverLinkFromSeriesMouseOver, this); zr.on('mouseout', this._hideIndicator, this); } else { this._clearHoverLinkFromSeries(); } }; ContinuousView.prototype._doHoverLinkToSeries = function (cursorPos, hoverOnBar) { var visualMapModel = this.visualMapModel; var itemSize = visualMapModel.itemSize; if (!visualMapModel.option.hoverLink) { return; } var sizeExtent = [0, itemSize[1]]; var dataExtent = visualMapModel.getExtent(); // For hover link show when hover handle, which might be below or upper than sizeExtent. cursorPos = mathMin$a(mathMax$a(sizeExtent[0], cursorPos), sizeExtent[1]); var halfHoverLinkSize = getHalfHoverLinkSize(visualMapModel, dataExtent, sizeExtent); var hoverRange = [cursorPos - halfHoverLinkSize, cursorPos + halfHoverLinkSize]; var cursorValue = linearMap$2(cursorPos, sizeExtent, dataExtent, true); var valueRange = [linearMap$2(hoverRange[0], sizeExtent, dataExtent, true), linearMap$2(hoverRange[1], sizeExtent, dataExtent, true)]; // Consider data range is out of visualMap range, see test/visualMap-continuous.html, // where china and india has very large population. hoverRange[0] < sizeExtent[0] && (valueRange[0] = -Infinity); hoverRange[1] > sizeExtent[1] && (valueRange[1] = Infinity); // Do not show indicator when mouse is over handle, // otherwise labels overlap, especially when dragging. if (hoverOnBar) { if (valueRange[0] === -Infinity) { this._showIndicator(cursorValue, valueRange[1], '< ', halfHoverLinkSize); } else if (valueRange[1] === Infinity) { this._showIndicator(cursorValue, valueRange[0], '> ', halfHoverLinkSize); } else { this._showIndicator(cursorValue, cursorValue, '≈ ', halfHoverLinkSize); } } // When realtime is set as false, handles, which are in barGroup, // also trigger hoverLink, which help user to realize where they // focus on when dragging. (see test/heatmap-large.html) // When realtime is set as true, highlight will not show when hover // handle, because the label on handle, which displays a exact value // but not range, might mislead users. var oldBatch = this._hoverLinkDataIndices; var newBatch = []; if (hoverOnBar || useHoverLinkOnHandle(visualMapModel)) { newBatch = this._hoverLinkDataIndices = visualMapModel.findTargetDataIndices(valueRange); } var resultBatches = compressBatches(oldBatch, newBatch); this._dispatchHighDown('downplay', makeHighDownBatch(resultBatches[0], visualMapModel)); this._dispatchHighDown('highlight', makeHighDownBatch(resultBatches[1], visualMapModel)); }; ContinuousView.prototype._hoverLinkFromSeriesMouseOver = function (e) { var el = e.target; var visualMapModel = this.visualMapModel; if (!el || getECData(el).dataIndex == null) { return; } var ecData = getECData(el); var dataModel = this.ecModel.getSeriesByIndex(ecData.seriesIndex); if (!visualMapModel.isTargetSeries(dataModel)) { return; } var data = dataModel.getData(ecData.dataType); var value = data.get(visualMapModel.getDataDimension(data), ecData.dataIndex); if (!isNaN(value)) { this._showIndicator(value, value); } }; ContinuousView.prototype._hideIndicator = function () { var shapes = this._shapes; shapes.indicator && shapes.indicator.attr('invisible', true); shapes.indicatorLabel && shapes.indicatorLabel.attr('invisible', true); var handleLabels = this._shapes.handleLabels; if (handleLabels) { for (var i = 0; i < handleLabels.length; i++) { // Fade out handle labels. // NOTE: Must use api enter/leave on emphasis/blur/select state. Or the global states manager will change it. this._api.leaveBlur(handleLabels[i]); } } }; ContinuousView.prototype._clearHoverLinkToSeries = function () { this._hideIndicator(); var indices = this._hoverLinkDataIndices; this._dispatchHighDown('downplay', makeHighDownBatch(indices, this.visualMapModel)); indices.length = 0; }; ContinuousView.prototype._clearHoverLinkFromSeries = function () { this._hideIndicator(); var zr = this.api.getZr(); zr.off('mouseover', this._hoverLinkFromSeriesMouseOver); zr.off('mouseout', this._hideIndicator); }; ContinuousView.prototype._applyTransform = function (vertex, element, inverse, global) { var transform = getTransform(element, global ? null : this.group); return isArray(vertex) ? applyTransform$1(vertex, transform, inverse) : transformDirection(vertex, transform, inverse); }; // TODO: TYPE more specified payload types. ContinuousView.prototype._dispatchHighDown = function (type, batch) { batch && batch.length && this.api.dispatchAction({ type: type, batch: batch }); }; /** * @override */ ContinuousView.prototype.dispose = function () { this._clearHoverLinkFromSeries(); this._clearHoverLinkToSeries(); }; /** * @override */ ContinuousView.prototype.remove = function () { this._clearHoverLinkFromSeries(); this._clearHoverLinkToSeries(); }; ContinuousView.type = 'visualMap.continuous'; return ContinuousView; }(VisualMapView); function createPolygon(points, cursor, onDrift, onDragEnd) { return new Polygon({ shape: { points: points }, draggable: !!onDrift, cursor: cursor, drift: onDrift, onmousemove: function (e) { // Fot mobile devicem, prevent screen slider on the button. stop(e.event); }, ondragend: onDragEnd }); } function getHalfHoverLinkSize(visualMapModel, dataExtent, sizeExtent) { var halfHoverLinkSize = HOVER_LINK_SIZE / 2; var hoverLinkDataSize = visualMapModel.get('hoverLinkDataSize'); if (hoverLinkDataSize) { halfHoverLinkSize = linearMap$2(hoverLinkDataSize, dataExtent, sizeExtent, true) / 2; } return halfHoverLinkSize; } function useHoverLinkOnHandle(visualMapModel) { var hoverLinkOnHandle = visualMapModel.get('hoverLinkOnHandle'); return !!(hoverLinkOnHandle == null ? visualMapModel.get('realtime') : hoverLinkOnHandle); } function getCursor$1(orient) { return orient === 'vertical' ? 'ns-resize' : 'ew-resize'; } /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * AUTO-GENERATED FILE. DO NOT MODIFY. */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ var visualMapActionInfo = { type: 'selectDataRange', event: 'dataRangeSelected', // FIXME use updateView appears wrong update: 'update' }; var visualMapActionHander = function (payload, ecModel) { ecModel.eachComponent({ mainType: 'visualMap', query: payload }, function (model) { model.setSelected(payload.selected); }); }; var visualMapEncodingHandlers = [{ createOnAllSeries: true, reset: function (seriesModel, ecModel) { var resetDefines = []; ecModel.eachComponent('visualMap', function (visualMapModel) { var pipelineContext = seriesModel.pipelineContext; if (!visualMapModel.isTargetSeries(seriesModel) || pipelineContext && pipelineContext.large) { return; } resetDefines.push(incrementalApplyVisual(visualMapModel.stateList, visualMapModel.targetVisuals, bind(visualMapModel.getValueState, visualMapModel), visualMapModel.getDataDimension(seriesModel.getData()))); }); return resetDefines; } }, // Only support color. { createOnAllSeries: true, reset: function (seriesModel, ecModel) { var data = seriesModel.getData(); var visualMetaList = []; ecModel.eachComponent('visualMap', function (visualMapModel) { if (visualMapModel.isTargetSeries(seriesModel)) { var visualMeta = visualMapModel.getVisualMeta(bind(getColorVisual, null, seriesModel, visualMapModel)) || { stops: [], outerColors: [] }; var concreteDim = visualMapModel.getDataDimension(data); var dimInfo = data.getDimensionInfo(concreteDim); if (dimInfo != null) { // visualMeta.dimension should be dimension index, but not concrete dimension. visualMeta.dimension = dimInfo.index; visualMetaList.push(visualMeta); } } }); // console.log(JSON.stringify(visualMetaList.map(a => a.stops))); seriesModel.getData().setVisual('visualMeta', visualMetaList); } }]; // FIXME // performance and export for heatmap? // value can be Infinity or -Infinity function getColorVisual(seriesModel, visualMapModel, value, valueState) { var mappings = visualMapModel.targetVisuals[valueState]; var visualTypes = VisualMapping.prepareVisualTypes(mappings); var resultVisual = { color: getVisualFromData(seriesModel.getData(), 'color') // default color. }; for (var i = 0, len = visualTypes.length; i < len; i++) { var type = visualTypes[i]; var mapping = mappings[type === 'opacity' ? '__alphaForOpacity' : type]; mapping && mapping.applyVisual(value, getVisual, setVisual); } return resultVisual.color; function getVisual(key) { return resultVisual[key]; } function setVisual(key, value) { resultVisual[key] = value; } } var each$h = each; function visualMapPreprocessor(option) { var visualMap = option && option.visualMap; if (!isArray(visualMap)) { visualMap = visualMap ? [visualMap] : []; } each$h(visualMap, function (opt) { if (!opt) { return; } // rename splitList to pieces if (has$1(opt, 'splitList') && !has$1(opt, 'pieces')) { opt.pieces = opt.splitList; delete opt.splitList; } var pieces = opt.pieces; if (pieces && isArray(pieces)) { each$h(pieces, function (piece) { if (isObject(piece)) { if (has$1(piece, 'start') && !has$1(piece, 'min')) { piece.min = piece.start; } if (has$1(piece, 'end') && !has$1(piece, 'max')) { piece.max = piece.end; } } }); } }); } function has$1(obj, name) { return obj && obj.hasOwnProperty && obj.hasOwnProperty(name); } var installed$1 = false; function installCommon$1(registers) { if (installed$1) { return; } installed$1 = true; registers.registerSubTypeDefaulter('visualMap', function (option) { // Compatible with ec2, when splitNumber === 0, continuous visualMap will be used. return !option.categories && (!(option.pieces ? option.pieces.length > 0 : option.splitNumber > 0) || option.calculable) ? 'continuous' : 'piecewise'; }); registers.registerAction(visualMapActionInfo, visualMapActionHander); each(visualMapEncodingHandlers, function (handler) { registers.registerVisual(registers.PRIORITY.VISUAL.COMPONENT, handler); }); registers.registerPreprocessor(visualMapPreprocessor); } function install$N(registers) { registers.registerComponentModel(ContinuousModel); registers.registerComponentView(ContinuousView); installCommon$1(registers); } var PiecewiseModel = /** @class */ function (_super) { __extends(PiecewiseModel, _super); function PiecewiseModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = PiecewiseModel.type; /** * The order is always [low, ..., high]. * [{text: string, interval: Array.}, ...] */ _this._pieceList = []; return _this; } PiecewiseModel.prototype.optionUpdated = function (newOption, isInit) { _super.prototype.optionUpdated.apply(this, arguments); this.resetExtent(); var mode = this._mode = this._determineMode(); this._pieceList = []; resetMethods[this._mode].call(this, this._pieceList); this._resetSelected(newOption, isInit); var categories = this.option.categories; this.resetVisual(function (mappingOption, state) { if (mode === 'categories') { mappingOption.mappingMethod = 'category'; mappingOption.categories = clone(categories); } else { mappingOption.dataExtent = this.getExtent(); mappingOption.mappingMethod = 'piecewise'; mappingOption.pieceList = map(this._pieceList, function (piece) { piece = clone(piece); if (state !== 'inRange') { // FIXME // outOfRange do not support special visual in pieces. piece.visual = null; } return piece; }); } }); }; /** * @protected * @override */ PiecewiseModel.prototype.completeVisualOption = function () { // Consider this case: // visualMap: { // pieces: [{symbol: 'circle', lt: 0}, {symbol: 'rect', gte: 0}] // } // where no inRange/outOfRange set but only pieces. So we should make // default inRange/outOfRange for this case, otherwise visuals that only // appear in `pieces` will not be taken into account in visual encoding. var option = this.option; var visualTypesInPieces = {}; var visualTypes = VisualMapping.listVisualTypes(); var isCategory = this.isCategory(); each(option.pieces, function (piece) { each(visualTypes, function (visualType) { if (piece.hasOwnProperty(visualType)) { visualTypesInPieces[visualType] = 1; } }); }); each(visualTypesInPieces, function (v, visualType) { var exists = false; each(this.stateList, function (state) { exists = exists || has(option, state, visualType) || has(option.target, state, visualType); }, this); !exists && each(this.stateList, function (state) { (option[state] || (option[state] = {}))[visualType] = visualDefault.get(visualType, state === 'inRange' ? 'active' : 'inactive', isCategory); }); }, this); function has(obj, state, visualType) { return obj && obj[state] && obj[state].hasOwnProperty(visualType); } _super.prototype.completeVisualOption.apply(this, arguments); }; PiecewiseModel.prototype._resetSelected = function (newOption, isInit) { var thisOption = this.option; var pieceList = this._pieceList; // Selected do not merge but all override. var selected = (isInit ? thisOption : newOption).selected || {}; thisOption.selected = selected; // Consider 'not specified' means true. each(pieceList, function (piece, index) { var key = this.getSelectedMapKey(piece); if (!selected.hasOwnProperty(key)) { selected[key] = true; } }, this); if (thisOption.selectedMode === 'single') { // Ensure there is only one selected. var hasSel_1 = false; each(pieceList, function (piece, index) { var key = this.getSelectedMapKey(piece); if (selected[key]) { hasSel_1 ? selected[key] = false : hasSel_1 = true; } }, this); } // thisOption.selectedMode === 'multiple', default: all selected. }; /** * @public */ PiecewiseModel.prototype.getItemSymbol = function () { return this.get('itemSymbol'); }; /** * @public */ PiecewiseModel.prototype.getSelectedMapKey = function (piece) { return this._mode === 'categories' ? piece.value + '' : piece.index + ''; }; /** * @public */ PiecewiseModel.prototype.getPieceList = function () { return this._pieceList; }; /** * @return {string} */ PiecewiseModel.prototype._determineMode = function () { var option = this.option; return option.pieces && option.pieces.length > 0 ? 'pieces' : this.option.categories ? 'categories' : 'splitNumber'; }; /** * @override */ PiecewiseModel.prototype.setSelected = function (selected) { this.option.selected = clone(selected); }; /** * @override */ PiecewiseModel.prototype.getValueState = function (value) { var index = VisualMapping.findPieceIndex(value, this._pieceList); return index != null ? this.option.selected[this.getSelectedMapKey(this._pieceList[index])] ? 'inRange' : 'outOfRange' : 'outOfRange'; }; /** * @public * @param pieceIndex piece index in visualMapModel.getPieceList() */ PiecewiseModel.prototype.findTargetDataIndices = function (pieceIndex) { var result = []; var pieceList = this._pieceList; this.eachTargetSeries(function (seriesModel) { var dataIndices = []; var data = seriesModel.getData(); data.each(this.getDataDimension(data), function (value, dataIndex) { // Should always base on model pieceList, because it is order sensitive. var pIdx = VisualMapping.findPieceIndex(value, pieceList); pIdx === pieceIndex && dataIndices.push(dataIndex); }, this); result.push({ seriesId: seriesModel.id, dataIndex: dataIndices }); }, this); return result; }; /** * @private * @param piece piece.value or piece.interval is required. * @return Can be Infinity or -Infinity */ PiecewiseModel.prototype.getRepresentValue = function (piece) { var representValue; if (this.isCategory()) { representValue = piece.value; } else { if (piece.value != null) { representValue = piece.value; } else { var pieceInterval = piece.interval || []; representValue = pieceInterval[0] === -Infinity && pieceInterval[1] === Infinity ? 0 : (pieceInterval[0] + pieceInterval[1]) / 2; } } return representValue; }; PiecewiseModel.prototype.getVisualMeta = function (getColorVisual) { // Do not support category. (category axis is ordinal, numerical) if (this.isCategory()) { return; } var stops = []; var outerColors = ['', '']; var visualMapModel = this; function setStop(interval, valueState) { var representValue = visualMapModel.getRepresentValue({ interval: interval }); // Not category if (!valueState) { valueState = visualMapModel.getValueState(representValue); } var color = getColorVisual(representValue, valueState); if (interval[0] === -Infinity) { outerColors[0] = color; } else if (interval[1] === Infinity) { outerColors[1] = color; } else { stops.push({ value: interval[0], color: color }, { value: interval[1], color: color }); } } // Suplement var pieceList = this._pieceList.slice(); if (!pieceList.length) { pieceList.push({ interval: [-Infinity, Infinity] }); } else { var edge = pieceList[0].interval[0]; edge !== -Infinity && pieceList.unshift({ interval: [-Infinity, edge] }); edge = pieceList[pieceList.length - 1].interval[1]; edge !== Infinity && pieceList.push({ interval: [edge, Infinity] }); } var curr = -Infinity; each(pieceList, function (piece) { var interval = piece.interval; if (interval) { // Fulfill gap. interval[0] > curr && setStop([curr, interval[0]], 'outOfRange'); setStop(interval.slice()); curr = interval[1]; } }, this); return { stops: stops, outerColors: outerColors }; }; PiecewiseModel.type = 'visualMap.piecewise'; PiecewiseModel.defaultOption = inheritDefaultOption(VisualMapModel.defaultOption, { selected: null, minOpen: false, maxOpen: false, align: 'auto', itemWidth: 20, itemHeight: 14, itemSymbol: 'roundRect', pieces: null, categories: null, splitNumber: 5, selectedMode: 'multiple', itemGap: 10, hoverLink: true // Enable hover highlight. }); return PiecewiseModel; }(VisualMapModel); /** * Key is this._mode * @type {Object} * @this {module:echarts/component/viusalMap/PiecewiseMode} */ var resetMethods = { splitNumber: function (outPieceList) { var thisOption = this.option; var precision = Math.min(thisOption.precision, 20); var dataExtent = this.getExtent(); var splitNumber = thisOption.splitNumber; splitNumber = Math.max(parseInt(splitNumber, 10), 1); thisOption.splitNumber = splitNumber; var splitStep = (dataExtent[1] - dataExtent[0]) / splitNumber; // Precision auto-adaption while (+splitStep.toFixed(precision) !== splitStep && precision < 5) { precision++; } thisOption.precision = precision; splitStep = +splitStep.toFixed(precision); if (thisOption.minOpen) { outPieceList.push({ interval: [-Infinity, dataExtent[0]], close: [0, 0] }); } for (var index = 0, curr = dataExtent[0]; index < splitNumber; curr += splitStep, index++) { var max = index === splitNumber - 1 ? dataExtent[1] : curr + splitStep; outPieceList.push({ interval: [curr, max], close: [1, 1] }); } if (thisOption.maxOpen) { outPieceList.push({ interval: [dataExtent[1], Infinity], close: [0, 0] }); } reformIntervals(outPieceList); each(outPieceList, function (piece, index) { piece.index = index; piece.text = this.formatValueText(piece.interval); }, this); }, categories: function (outPieceList) { var thisOption = this.option; each(thisOption.categories, function (cate) { // FIXME category模式也使用pieceList,但在visualMapping中不是使用pieceList。 // 是否改一致。 outPieceList.push({ text: this.formatValueText(cate, true), value: cate }); }, this); // See "Order Rule". normalizeReverse(thisOption, outPieceList); }, pieces: function (outPieceList) { var thisOption = this.option; each(thisOption.pieces, function (pieceListItem, index) { if (!isObject(pieceListItem)) { pieceListItem = { value: pieceListItem }; } var item = { text: '', index: index }; if (pieceListItem.label != null) { item.text = pieceListItem.label; } if (pieceListItem.hasOwnProperty('value')) { var value = item.value = pieceListItem.value; item.interval = [value, value]; item.close = [1, 1]; } else { // `min` `max` is legacy option. // `lt` `gt` `lte` `gte` is recommanded. var interval = item.interval = []; var close_1 = item.close = [0, 0]; var closeList = [1, 0, 1]; var infinityList = [-Infinity, Infinity]; var useMinMax = []; for (var lg = 0; lg < 2; lg++) { var names = [['gte', 'gt', 'min'], ['lte', 'lt', 'max']][lg]; for (var i = 0; i < 3 && interval[lg] == null; i++) { interval[lg] = pieceListItem[names[i]]; close_1[lg] = closeList[i]; useMinMax[lg] = i === 2; } interval[lg] == null && (interval[lg] = infinityList[lg]); } useMinMax[0] && interval[1] === Infinity && (close_1[0] = 0); useMinMax[1] && interval[0] === -Infinity && (close_1[1] = 0); if ("development" !== 'production') { if (interval[0] > interval[1]) { console.warn('Piece ' + index + 'is illegal: ' + interval + ' lower bound should not greater then uppper bound.'); } } if (interval[0] === interval[1] && close_1[0] && close_1[1]) { // Consider: [{min: 5, max: 5, visual: {...}}, {min: 0, max: 5}], // we use value to lift the priority when min === max item.value = interval[0]; } } item.visual = VisualMapping.retrieveVisuals(pieceListItem); outPieceList.push(item); }, this); // See "Order Rule". normalizeReverse(thisOption, outPieceList); // Only pieces reformIntervals(outPieceList); each(outPieceList, function (piece) { var close = piece.close; var edgeSymbols = [['<', '≤'][close[1]], ['>', '≥'][close[0]]]; piece.text = piece.text || this.formatValueText(piece.value != null ? piece.value : piece.interval, false, edgeSymbols); }, this); } }; function normalizeReverse(thisOption, pieceList) { var inverse = thisOption.inverse; if (thisOption.orient === 'vertical' ? !inverse : inverse) { pieceList.reverse(); } } var PiecewiseVisualMapView = /** @class */ function (_super) { __extends(PiecewiseVisualMapView, _super); function PiecewiseVisualMapView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = PiecewiseVisualMapView.type; return _this; } PiecewiseVisualMapView.prototype.doRender = function () { var thisGroup = this.group; thisGroup.removeAll(); var visualMapModel = this.visualMapModel; var textGap = visualMapModel.get('textGap'); var textStyleModel = visualMapModel.textStyleModel; var textFont = textStyleModel.getFont(); var textFill = textStyleModel.getTextColor(); var itemAlign = this._getItemAlign(); var itemSize = visualMapModel.itemSize; var viewData = this._getViewData(); var endsText = viewData.endsText; var showLabel = retrieve(visualMapModel.get('showLabel', true), !endsText); endsText && this._renderEndsText(thisGroup, endsText[0], itemSize, showLabel, itemAlign); each(viewData.viewPieceList, function (item) { var piece = item.piece; var itemGroup = new Group(); itemGroup.onclick = bind(this._onItemClick, this, piece); this._enableHoverLink(itemGroup, item.indexInModelPieceList); // TODO Category var representValue = visualMapModel.getRepresentValue(piece); this._createItemSymbol(itemGroup, representValue, [0, 0, itemSize[0], itemSize[1]]); if (showLabel) { var visualState = this.visualMapModel.getValueState(representValue); itemGroup.add(new ZRText({ style: { x: itemAlign === 'right' ? -textGap : itemSize[0] + textGap, y: itemSize[1] / 2, text: piece.text, verticalAlign: 'middle', align: itemAlign, font: textFont, fill: textFill, opacity: visualState === 'outOfRange' ? 0.5 : 1 } })); } thisGroup.add(itemGroup); }, this); endsText && this._renderEndsText(thisGroup, endsText[1], itemSize, showLabel, itemAlign); box(visualMapModel.get('orient'), thisGroup, visualMapModel.get('itemGap')); this.renderBackground(thisGroup); this.positionGroup(thisGroup); }; PiecewiseVisualMapView.prototype._enableHoverLink = function (itemGroup, pieceIndex) { var _this = this; itemGroup.on('mouseover', function () { return onHoverLink('highlight'); }).on('mouseout', function () { return onHoverLink('downplay'); }); var onHoverLink = function (method) { var visualMapModel = _this.visualMapModel; // TODO: TYPE More detailed action types visualMapModel.option.hoverLink && _this.api.dispatchAction({ type: method, batch: makeHighDownBatch(visualMapModel.findTargetDataIndices(pieceIndex), visualMapModel) }); }; }; PiecewiseVisualMapView.prototype._getItemAlign = function () { var visualMapModel = this.visualMapModel; var modelOption = visualMapModel.option; if (modelOption.orient === 'vertical') { return getItemAlign(visualMapModel, this.api, visualMapModel.itemSize); } else { // horizontal, most case left unless specifying right. var align = modelOption.align; if (!align || align === 'auto') { align = 'left'; } return align; } }; PiecewiseVisualMapView.prototype._renderEndsText = function (group, text, itemSize, showLabel, itemAlign) { if (!text) { return; } var itemGroup = new Group(); var textStyleModel = this.visualMapModel.textStyleModel; itemGroup.add(new ZRText({ style: { x: showLabel ? itemAlign === 'right' ? itemSize[0] : 0 : itemSize[0] / 2, y: itemSize[1] / 2, verticalAlign: 'middle', align: showLabel ? itemAlign : 'center', text: text, font: textStyleModel.getFont(), fill: textStyleModel.getTextColor() } })); group.add(itemGroup); }; /** * @private * @return {Object} {peiceList, endsText} The order is the same as screen pixel order. */ PiecewiseVisualMapView.prototype._getViewData = function () { var visualMapModel = this.visualMapModel; var viewPieceList = map(visualMapModel.getPieceList(), function (piece, index) { return { piece: piece, indexInModelPieceList: index }; }); var endsText = visualMapModel.get('text'); // Consider orient and inverse. var orient = visualMapModel.get('orient'); var inverse = visualMapModel.get('inverse'); // Order of model pieceList is always [low, ..., high] if (orient === 'horizontal' ? inverse : !inverse) { viewPieceList.reverse(); } // Origin order of endsText is [high, low] else if (endsText) { endsText = endsText.slice().reverse(); } return { viewPieceList: viewPieceList, endsText: endsText }; }; PiecewiseVisualMapView.prototype._createItemSymbol = function (group, representValue, shapeParam) { group.add(createSymbol( // symbol will be string this.getControllerVisual(representValue, 'symbol'), shapeParam[0], shapeParam[1], shapeParam[2], shapeParam[3], // color will be string this.getControllerVisual(representValue, 'color'))); }; PiecewiseVisualMapView.prototype._onItemClick = function (piece) { var visualMapModel = this.visualMapModel; var option = visualMapModel.option; var selected = clone(option.selected); var newKey = visualMapModel.getSelectedMapKey(piece); if (option.selectedMode === 'single') { selected[newKey] = true; each(selected, function (o, key) { selected[key] = key === newKey; }); } else { selected[newKey] = !selected[newKey]; } this.api.dispatchAction({ type: 'selectDataRange', from: this.uid, visualMapId: this.visualMapModel.id, selected: selected }); }; PiecewiseVisualMapView.type = 'visualMap.piecewise'; return PiecewiseVisualMapView; }(VisualMapView); function install$O(registers) { registers.registerComponentModel(PiecewiseModel); registers.registerComponentView(PiecewiseVisualMapView); installCommon$1(registers); } function install$P(registers) { use(install$N); use(install$O); // Do not install './dataZoomSelect', // since it only work for toolbox dataZoom. } var DEFAULT_OPTION = { label: { enabled: true }, decal: { show: false } }; var inner$l = makeInner(); var decalPaletteScope = {}; function ariaVisual(ecModel, api) { var ariaModel = ecModel.getModel('aria'); // See "area enabled" detection code in `GlobalModel.ts`. if (!ariaModel.get('enabled')) { return; } var defaultOption = clone(DEFAULT_OPTION); merge(defaultOption.label, ecModel.getLocaleModel().get('aria'), false); merge(ariaModel.option, defaultOption, false); setDecal(); setLabel(); function setDecal() { var decalModel = ariaModel.getModel('decal'); var useDecal = decalModel.get('show'); if (useDecal) { // Each type of series use one scope. // Pie and funnel are using diferrent scopes var paletteScopeGroupByType_1 = createHashMap(); ecModel.eachSeries(function (seriesModel) { if (!seriesModel.useColorPaletteOnData) { return; } var decalScope = paletteScopeGroupByType_1.get(seriesModel.type); if (!decalScope) { decalScope = {}; paletteScopeGroupByType_1.set(seriesModel.type, decalScope); } inner$l(seriesModel).scope = decalScope; }); ecModel.eachRawSeries(function (seriesModel) { if (ecModel.isSeriesFiltered(seriesModel)) { return; } if (typeof seriesModel.enableAriaDecal === 'function') { // Let series define how to use decal palette on data seriesModel.enableAriaDecal(); return; } var data = seriesModel.getData(); if (seriesModel.useColorPaletteOnData) { var dataAll_1 = seriesModel.getRawData(); var idxMap_1 = {}; var decalScope_1 = inner$l(seriesModel).scope; data.each(function (idx) { var rawIdx = data.getRawIndex(idx); idxMap_1[rawIdx] = idx; }); var dataCount_1 = dataAll_1.count(); dataAll_1.each(function (rawIdx) { var idx = idxMap_1[rawIdx]; var name = dataAll_1.getName(rawIdx) || rawIdx + ''; var paletteDecal = getDecalFromPalette(seriesModel.ecModel, name, decalScope_1, dataCount_1); var specifiedDecal = data.getItemVisual(idx, 'decal'); data.setItemVisual(idx, 'decal', mergeDecal(specifiedDecal, paletteDecal)); }); } else { var paletteDecal = getDecalFromPalette(seriesModel.ecModel, seriesModel.name, decalPaletteScope, ecModel.getSeriesCount()); var specifiedDecal = data.getVisual('decal'); data.setVisual('decal', mergeDecal(specifiedDecal, paletteDecal)); } function mergeDecal(specifiedDecal, paletteDecal) { // Merge decal from palette to decal from itemStyle. // User do not need to specify all of the decal props. var resultDecal = specifiedDecal ? extend(extend({}, paletteDecal), specifiedDecal) : paletteDecal; resultDecal.dirty = true; return resultDecal; } }); } } function setLabel() { var labelLocale = ecModel.getLocaleModel().get('aria'); var labelModel = ariaModel.getModel('label'); labelModel.option = defaults(labelModel.option, labelLocale); if (!labelModel.get('enabled')) { return; } var dom = api.getZr().dom; if (labelModel.get('description')) { dom.setAttribute('aria-label', labelModel.get('description')); return; } var seriesCnt = ecModel.getSeriesCount(); var maxDataCnt = labelModel.get(['data', 'maxCount']) || 10; var maxSeriesCnt = labelModel.get(['series', 'maxCount']) || 10; var displaySeriesCnt = Math.min(seriesCnt, maxSeriesCnt); var ariaLabel; if (seriesCnt < 1) { // No series, no aria label return; } else { var title = getTitle(); if (title) { var withTitle = labelModel.get(['general', 'withTitle']); ariaLabel = replace(withTitle, { title: title }); } else { ariaLabel = labelModel.get(['general', 'withoutTitle']); } var seriesLabels_1 = []; var prefix = seriesCnt > 1 ? labelModel.get(['series', 'multiple', 'prefix']) : labelModel.get(['series', 'single', 'prefix']); ariaLabel += replace(prefix, { seriesCount: seriesCnt }); ecModel.eachSeries(function (seriesModel, idx) { if (idx < displaySeriesCnt) { var seriesLabel = void 0; var seriesName = seriesModel.get('name'); var withName = seriesName ? 'withName' : 'withoutName'; seriesLabel = seriesCnt > 1 ? labelModel.get(['series', 'multiple', withName]) : labelModel.get(['series', 'single', withName]); seriesLabel = replace(seriesLabel, { seriesId: seriesModel.seriesIndex, seriesName: seriesModel.get('name'), seriesType: getSeriesTypeName(seriesModel.subType) }); var data = seriesModel.getData(); if (data.count() > maxDataCnt) { // Show part of data var partialLabel = labelModel.get(['data', 'partialData']); seriesLabel += replace(partialLabel, { displayCnt: maxDataCnt }); } else { seriesLabel += labelModel.get(['data', 'allData']); } var dataLabels = []; for (var i = 0; i < data.count(); i++) { if (i < maxDataCnt) { var name_1 = data.getName(i); var value = retrieveRawValue(data, i); var dataLabel = labelModel.get(['data', name_1 ? 'withName' : 'withoutName']); dataLabels.push(replace(dataLabel, { name: name_1, value: value })); } } var middleSeparator_1 = labelModel.get(['data', 'separator', 'middle']); var endSeparator_1 = labelModel.get(['data', 'separator', 'end']); seriesLabel += dataLabels.join(middleSeparator_1) + endSeparator_1; seriesLabels_1.push(seriesLabel); } }); var separatorModel = labelModel.getModel(['series', 'multiple', 'separator']); var middleSeparator = separatorModel.get('middle'); var endSeparator = separatorModel.get('end'); ariaLabel += seriesLabels_1.join(middleSeparator) + endSeparator; dom.setAttribute('aria-label', ariaLabel); } } function replace(str, keyValues) { if (typeof str !== 'string') { return str; } var result = str; each(keyValues, function (value, key) { result = result.replace(new RegExp('\\{\\s*' + key + '\\s*\\}', 'g'), value); }); return result; } function getTitle() { var title = ecModel.get('title'); if (title && title.length) { title = title[0]; } return title && title.text; } function getSeriesTypeName(type) { return ecModel.getLocaleModel().get(['series', 'typeNames'])[type] || '自定义图'; } } function ariaPreprocessor(option) { if (!option || !option.aria) { return; } var aria = option.aria; // aria.show is deprecated and should use aria.enabled instead if (aria.show != null) { aria.enabled = aria.show; } aria.label = aria.label || {}; // move description, general, series, data to be under aria.label each(['description', 'general', 'series', 'data'], function (name) { if (aria[name] != null) { aria.label[name] = aria[name]; } }); } function install$Q(registers) { registers.registerPreprocessor(ariaPreprocessor); registers.registerVisual(registers.PRIORITY.VISUAL.ARIA, ariaVisual); } var RELATIONAL_EXPRESSION_OP_ALIAS_MAP = { value: 'eq', // PENDING: not good for literal semantic? '<': 'lt', '<=': 'lte', '>': 'gt', '>=': 'gte', '=': 'eq', '!=': 'ne', '<>': 'ne' // Might mileading for sake of the different between '==' and '===', // So dont support them. // '==': 'eq', // '===': 'seq', // '!==': 'sne' // PENDING: Whether support some common alias "ge", "le", "neq"? // ge: 'gte', // le: 'lte', // neq: 'ne', }; var RegExpEvaluator = /** @class */ function () { function RegExpEvaluator(rVal) { // Support condVal: RegExp | string var condValue = this._condVal = isString(rVal) ? new RegExp(rVal) : isRegExp(rVal) ? rVal : null; if (condValue == null) { var errMsg = ''; if ("development" !== 'production') { errMsg = makePrintable('Illegal regexp', rVal, 'in'); } throwError(errMsg); } } RegExpEvaluator.prototype.evaluate = function (lVal) { var type = typeof lVal; return type === 'string' ? this._condVal.test(lVal) : type === 'number' ? this._condVal.test(lVal + '') : false; }; return RegExpEvaluator; }(); var ConstConditionInternal = /** @class */ function () { function ConstConditionInternal() {} ConstConditionInternal.prototype.evaluate = function () { return this.value; }; return ConstConditionInternal; }(); var AndConditionInternal = /** @class */ function () { function AndConditionInternal() {} AndConditionInternal.prototype.evaluate = function () { var children = this.children; for (var i = 0; i < children.length; i++) { if (!children[i].evaluate()) { return false; } } return true; }; return AndConditionInternal; }(); var OrConditionInternal = /** @class */ function () { function OrConditionInternal() {} OrConditionInternal.prototype.evaluate = function () { var children = this.children; for (var i = 0; i < children.length; i++) { if (children[i].evaluate()) { return true; } } return false; }; return OrConditionInternal; }(); var NotConditionInternal = /** @class */ function () { function NotConditionInternal() {} NotConditionInternal.prototype.evaluate = function () { return !this.child.evaluate(); }; return NotConditionInternal; }(); var RelationalConditionInternal = /** @class */ function () { function RelationalConditionInternal() {} RelationalConditionInternal.prototype.evaluate = function () { var needParse = !!this.valueParser; // Call getValue with no `this`. var getValue = this.getValue; var tarValRaw = getValue(this.valueGetterParam); var tarValParsed = needParse ? this.valueParser(tarValRaw) : null; // Relational cond follow "and" logic internally. for (var i = 0; i < this.subCondList.length; i++) { if (!this.subCondList[i].evaluate(needParse ? tarValParsed : tarValRaw)) { return false; } } return true; }; return RelationalConditionInternal; }(); function parseOption(exprOption, getters) { if (exprOption === true || exprOption === false) { var cond = new ConstConditionInternal(); cond.value = exprOption; return cond; } var errMsg = ''; if (!isObjectNotArray(exprOption)) { if ("development" !== 'production') { errMsg = makePrintable('Illegal config. Expect a plain object but actually', exprOption); } throwError(errMsg); } if (exprOption.and) { return parseAndOrOption('and', exprOption, getters); } else if (exprOption.or) { return parseAndOrOption('or', exprOption, getters); } else if (exprOption.not) { return parseNotOption(exprOption, getters); } return parseRelationalOption(exprOption, getters); } function parseAndOrOption(op, exprOption, getters) { var subOptionArr = exprOption[op]; var errMsg = ''; if ("development" !== 'production') { errMsg = makePrintable('"and"/"or" condition should only be `' + op + ': [...]` and must not be empty array.', 'Illegal condition:', exprOption); } if (!isArray(subOptionArr)) { throwError(errMsg); } if (!subOptionArr.length) { throwError(errMsg); } var cond = op === 'and' ? new AndConditionInternal() : new OrConditionInternal(); cond.children = map(subOptionArr, function (subOption) { return parseOption(subOption, getters); }); if (!cond.children.length) { throwError(errMsg); } return cond; } function parseNotOption(exprOption, getters) { var subOption = exprOption.not; var errMsg = ''; if ("development" !== 'production') { errMsg = makePrintable('"not" condition should only be `not: {}`.', 'Illegal condition:', exprOption); } if (!isObjectNotArray(subOption)) { throwError(errMsg); } var cond = new NotConditionInternal(); cond.child = parseOption(subOption, getters); if (!cond.child) { throwError(errMsg); } return cond; } function parseRelationalOption(exprOption, getters) { var errMsg = ''; var valueGetterParam = getters.prepareGetValue(exprOption); var subCondList = []; var exprKeys = keys(exprOption); var parserName = exprOption.parser; var valueParser = parserName ? getRawValueParser(parserName) : null; for (var i = 0; i < exprKeys.length; i++) { var keyRaw = exprKeys[i]; if (keyRaw === 'parser' || getters.valueGetterAttrMap.get(keyRaw)) { continue; } var op = hasOwn(RELATIONAL_EXPRESSION_OP_ALIAS_MAP, keyRaw) ? RELATIONAL_EXPRESSION_OP_ALIAS_MAP[keyRaw] : keyRaw; var condValueRaw = exprOption[keyRaw]; var condValueParsed = valueParser ? valueParser(condValueRaw) : condValueRaw; var evaluator = createFilterComparator(op, condValueParsed) || op === 'reg' && new RegExpEvaluator(condValueParsed); if (!evaluator) { if ("development" !== 'production') { errMsg = makePrintable('Illegal relational operation: "' + keyRaw + '" in condition:', exprOption); } throwError(errMsg); } subCondList.push(evaluator); } if (!subCondList.length) { if ("development" !== 'production') { errMsg = makePrintable('Relational condition must have at least one operator.', 'Illegal condition:', exprOption); } // No relational operator always disabled in case of dangers result. throwError(errMsg); } var cond = new RelationalConditionInternal(); cond.valueGetterParam = valueGetterParam; cond.valueParser = valueParser; cond.getValue = getters.getValue; cond.subCondList = subCondList; return cond; } function isObjectNotArray(val) { return isObject(val) && !isArrayLike(val); } var ConditionalExpressionParsed = /** @class */ function () { function ConditionalExpressionParsed(exprOption, getters) { this._cond = parseOption(exprOption, getters); } ConditionalExpressionParsed.prototype.evaluate = function () { return this._cond.evaluate(); }; return ConditionalExpressionParsed; }(); function parseConditionalExpression(exprOption, getters) { return new ConditionalExpressionParsed(exprOption, getters); } var filterTransform = { type: 'echarts:filter', // PEDING: enhance to filter by index rather than create new data transform: function (params) { // [Caveat] Fail-Fast: // Do not return the whole dataset unless user config indicate it explicitly. // For example, if no condition specified by mistake, return an empty result // is better than return the entire raw soruce for user to find the mistake. var upstream = params.upstream; var rawItem; var condition = parseConditionalExpression(params.config, { valueGetterAttrMap: createHashMap({ dimension: true }), prepareGetValue: function (exprOption) { var errMsg = ''; var dimLoose = exprOption.dimension; if (!hasOwn(exprOption, 'dimension')) { if ("development" !== 'production') { errMsg = makePrintable('Relation condition must has prop "dimension" specified.', 'Illegal condition:', exprOption); } throwError(errMsg); } var dimInfo = upstream.getDimensionInfo(dimLoose); if (!dimInfo) { if ("development" !== 'production') { errMsg = makePrintable('Can not find dimension info via: ' + dimLoose + '.\n', 'Existing dimensions: ', upstream.cloneAllDimensionInfo(), '.\n', 'Illegal condition:', exprOption, '.\n'); } throwError(errMsg); } return { dimIdx: dimInfo.index }; }, getValue: function (param) { return upstream.retrieveValueFromItem(rawItem, param.dimIdx); } }); var resultData = []; for (var i = 0, len = upstream.count(); i < len; i++) { rawItem = upstream.getRawDataItem(i); if (condition.evaluate()) { resultData.push(rawItem); } } return { data: resultData }; } }; var sampleLog = ''; if ("development" !== 'production') { sampleLog = ['Valid config is like:', '{ dimension: "age", order: "asc" }', 'or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(' '); } var sortTransform = { type: 'echarts:sort', transform: function (params) { var upstream = params.upstream; var config = params.config; var errMsg = ''; // Normalize // const orderExprList: OrderExpression[] = isArray(config[0]) // ? config as OrderExpression[] // : [config as OrderExpression]; var orderExprList = normalizeToArray(config); if (!orderExprList.length) { if ("development" !== 'production') { errMsg = 'Empty `config` in sort transform.'; } throwError(errMsg); } var orderDefList = []; each(orderExprList, function (orderExpr) { var dimLoose = orderExpr.dimension; var order = orderExpr.order; var parserName = orderExpr.parser; var incomparable = orderExpr.incomparable; if (dimLoose == null) { if ("development" !== 'production') { errMsg = 'Sort transform config must has "dimension" specified.' + sampleLog; } throwError(errMsg); } if (order !== 'asc' && order !== 'desc') { if ("development" !== 'production') { errMsg = 'Sort transform config must has "order" specified.' + sampleLog; } throwError(errMsg); } if (incomparable && incomparable !== 'min' && incomparable !== 'max') { var errMsg_1 = ''; if ("development" !== 'production') { errMsg_1 = 'incomparable must be "min" or "max" rather than "' + incomparable + '".'; } throwError(errMsg_1); } if (order !== 'asc' && order !== 'desc') { var errMsg_2 = ''; if ("development" !== 'production') { errMsg_2 = 'order must be "asc" or "desc" rather than "' + order + '".'; } throwError(errMsg_2); } var dimInfo = upstream.getDimensionInfo(dimLoose); if (!dimInfo) { if ("development" !== 'production') { errMsg = makePrintable('Can not find dimension info via: ' + dimLoose + '.\n', 'Existing dimensions: ', upstream.cloneAllDimensionInfo(), '.\n', 'Illegal config:', orderExpr, '.\n'); } throwError(errMsg); } var parser = parserName ? getRawValueParser(parserName) : null; if (parserName && !parser) { if ("development" !== 'production') { errMsg = makePrintable('Invalid parser name ' + parserName + '.\n', 'Illegal config:', orderExpr, '.\n'); } throwError(errMsg); } orderDefList.push({ dimIdx: dimInfo.index, parser: parser, comparator: new SortOrderComparator(order, incomparable) }); }); // TODO: support it? var sourceFormat = upstream.sourceFormat; if (sourceFormat !== SOURCE_FORMAT_ARRAY_ROWS && sourceFormat !== SOURCE_FORMAT_OBJECT_ROWS) { if ("development" !== 'production') { errMsg = 'sourceFormat "' + sourceFormat + '" is not supported yet'; } throwError(errMsg); } // Other upstream format are all array. var resultData = []; for (var i = 0, len = upstream.count(); i < len; i++) { resultData.push(upstream.getRawDataItem(i)); } resultData.sort(function (item0, item1) { for (var i = 0; i < orderDefList.length; i++) { var orderDef = orderDefList[i]; var val0 = upstream.retrieveValueFromItem(item0, orderDef.dimIdx); var val1 = upstream.retrieveValueFromItem(item1, orderDef.dimIdx); if (orderDef.parser) { val0 = orderDef.parser(val0); val1 = orderDef.parser(val1); } var result = orderDef.comparator.evaluate(val0, val1); if (result !== 0) { return result; } } return 0; }); return { data: resultData }; } }; function install$R(registers) { registers.registerTransform(filterTransform); registers.registerTransform(sortTransform); } var DatasetModel = /** @class */ function (_super) { __extends(DatasetModel, _super); function DatasetModel() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'dataset'; return _this; } DatasetModel.prototype.init = function (option, parentModel, ecModel) { _super.prototype.init.call(this, option, parentModel, ecModel); this._sourceManager = new SourceManager(this); disableTransformOptionMerge(this); }; DatasetModel.prototype.mergeOption = function (newOption, ecModel) { _super.prototype.mergeOption.call(this, newOption, ecModel); disableTransformOptionMerge(this); }; DatasetModel.prototype.optionUpdated = function () { this._sourceManager.dirty(); }; DatasetModel.prototype.getSourceManager = function () { return this._sourceManager; }; DatasetModel.type = 'dataset'; DatasetModel.defaultOption = { seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN }; return DatasetModel; }(ComponentModel); var DatasetView = /** @class */ function (_super) { __extends(DatasetView, _super); function DatasetView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'dataset'; return _this; } DatasetView.type = 'dataset'; return DatasetView; }(ComponentView); function install$S(registers) { registers.registerComponentModel(DatasetModel); registers.registerComponentView(DatasetView); } // Render engines // ----------------- // Render via Canvas. // echarts.init(dom, null, { renderer: 'canvas' }) use([install$1]); // Render via SVG. // echarts.init(dom, null, { renderer: 'svg' }) use([install]); // ---------------- // Charts (series) // ---------------- // All of the series types, for example: // chart.setOption({ // series: [{ // type: 'line' // or 'bar', 'pie', ... // }] // }); use([install$2, install$3, install$4, install$6, install$8, install$a, install$b, install$c, install$d, install$e, install$f, install$h, install$i, install$j, install$k, install$l, install$m, install$n, install$o, install$p, install$q, install$r]); // ------------------- // Coordinate systems // ------------------- // All of the axis modules have been included in the // coordinate system module below, do not need to // make extra import. // `cartesian` coordinate system. For some historical // reasons, it is named as grid, for example: // chart.setOption({ // grid: {...}, // xAxis: {...}, // yAxis: {...}, // series: [{...}] // }); use(install$t); // `polar` coordinate system, for example: // chart.setOption({ // polar: {...}, // radiusAxis: {...}, // angleAxis: {...}, // series: [{ // coordinateSystem: 'polar' // }] // }); use(install$u); // `geo` coordinate system, for example: // chart.setOption({ // geo: {...}, // series: [{ // coordinateSystem: 'geo' // }] // }); use(install$9); // `singleAxis` coordinate system (notice, it is a coordinate system // with only one axis, work for chart like theme river), for example: // chart.setOption({ // singleAxis: {...} // series: [{type: 'themeRiver', ...}] // }); use(install$v); // `parallel` coordinate system, only work for parallel series, for example: // chart.setOption({ // parallel: {...}, // parallelAxis: [{...}, ...], // series: [{ // type: 'parallel' // }] // }); use(install$g); // `calendar` coordinate system. for example, // chart.setOptionp({ // calendar: {...}, // series: [{ // coordinateSystem: 'calendar' // }] // ); use(install$w); // ------------------ // Other components // ------------------ // `graphic` component, for example: // chart.setOption({ // graphic: {...} // }); use(install$x); // `toolbox` component, for example: // chart.setOption({ // toolbox: {...} // }); use(install$z); // `tooltip` component, for example: // chart.setOption({ // tooltip: {...} // }); use(install$A); // `axisPointer` component, for example: // chart.setOption({ // tooltip: {axisPointer: {...}, ...} // }); // Or // chart.setOption({ // axisPointer: {...} // }); use(install$s); // `brush` component, for example: // chart.setOption({ // brush: {...} // }); // Or // chart.setOption({ // tooltip: {feature: {brush: {...}} // }) use(install$B); // `title` component, for example: // chart.setOption({ // title: {...} // }); use(install$C); // `timeline` component, for example: // chart.setOption({ // timeline: {...} // }); use(install$D); // `markPoint` component, for example: // chart.setOption({ // series: [{markPoint: {...}}] // }); use(install$E); // `markLine` component, for example: // chart.setOption({ // series: [{markLine: {...}}] // }); use(install$F); // `markArea` component, for example: // chart.setOption({ // series: [{markArea: {...}}] // }); use(install$G); // `legend` component not scrollable. for example: // chart.setOption({ // legend: {...} // }); use(install$J); // `dataZoom` component including both `dataZoomInside` and `dataZoomSlider`. use(install$M); // `dataZoom` component providing drag, pinch, wheel behaviors // inside coodinate system, for example: // chart.setOption({ // dataZoom: {type: 'inside'} // }); use(install$K); // `dataZoom` component providing a slider bar, for example: // chart.setOption({ // dataZoom: {type: 'slider'} // }); use(install$L); // `visualMap` component including both `visualMapContinuous` and `visualMapPiecewise`. use(install$P); // `visualMap` component providing continuous bar, for example: // chart.setOption({ // visualMap: {type: 'continuous'} // }); use(install$N); // `visualMap` component providing pieces bar, for example: // chart.setOption({ // visualMap: {type: 'piecewise'} // }); use(install$O); // `aria` component providing aria, for example: // chart.setOption({ // aria: {...} // }); use(install$Q); // dataset transform // chart.setOption({ // dataset: { // transform: [] // } // }); use(install$R); use(install$S); exports.Axis = Axis; exports.ChartView = ChartView; exports.ComponentModel = ComponentModel; exports.ComponentView = ComponentView; exports.List = List; exports.Model = Model; exports.PRIORITY = PRIORITY; exports.SeriesModel = SeriesModel; exports.color = color; exports.connect = connect; exports.dataTool = dataTool; exports.dependencies = dependencies; exports.disConnect = disConnect; exports.disconnect = disconnect; exports.dispose = dispose$1; exports.env = env; exports.extendChartView = extendChartView; exports.extendComponentModel = extendComponentModel; exports.extendComponentView = extendComponentView; exports.extendSeriesModel = extendSeriesModel; exports.format = format$1; exports.getCoordinateSystemDimensions = getCoordinateSystemDimensions; exports.getInstanceByDom = getInstanceByDom; exports.getInstanceById = getInstanceById; exports.getMap = getMap; exports.graphic = graphic$1; exports.helper = helper; exports.init = init$1; exports.innerDrawElementOnCanvas = brushSingle; exports.matrix = matrix; exports.number = number; exports.parseGeoJSON = parseGeoJSON; exports.parseGeoJson = parseGeoJSON; exports.registerAction = registerAction; exports.registerCoordinateSystem = registerCoordinateSystem; exports.registerLayout = registerLayout; exports.registerLoading = registerLoading; exports.registerLocale = registerLocale; exports.registerMap = registerMap; exports.registerPostInit = registerPostInit; exports.registerPostUpdate = registerPostUpdate; exports.registerPreprocessor = registerPreprocessor; exports.registerProcessor = registerProcessor; exports.registerTheme = registerTheme; exports.registerTransform = registerTransform; exports.registerVisual = registerVisual; exports.setCanvasCreator = setCanvasCreator; exports.throttle = throttle; exports.time = time; exports.use = use; exports.util = util$1; exports.vector = vector; exports.version = version$1; exports.zrUtil = util; exports.zrender = zrender; Object.defineProperty(exports, '__esModule', { value: true }); }))); //# sourceMappingURL=echarts.js.map minify-2.20.37/benchmarks/sample_es6.html000066400000000000000000037173751464346127300202620ustar00rootroot00000000000000 ECMAScript Language Specification ECMA-262 6th Edition – DRAFT

This is not the official ECMAScript Language Specification.

This is a draft of the next edition of the standard. See also:

For copyright information, see Ecma International’s legal disclaimer in the document itself.

Draft

ECMA-262

6th Edition / Draft March 17, 2015

Ecma/TC39/2015/0XX

ECMAScript 2015

Language Specification

Draft
Release Candidate #3

Report Errors and Issues at: https://bugs.ecmascript.org

Product: Draft for 6th Edition

Component: choose an appropriate one

Version: Rev 36, March 17, 2015 Draft

Contents

Introduction

This is the sixth edition of ECMAScript Language Specification. Since publication of the first edition in 1997, ECMAScript has grown to be one of the world’s most widely used general purpose programming languages. It is best known as the language embedded in web browsers but has also been widely adopted for server and embedded applications. The sixth edition is the most extensive update to ECMAScript since the publication of the first edition in 1997.

Goals for the sixth edition include providing better support for large applications, library creation, and for use of ECMAScript as a compilation target for other languages. Some of its major enhancements include modules, class declarations, lexical block scoping, iterators and generators, promises for asynchronous programming, destructuring patterns, and proper tail calls. The ECMAScript library of built-ins has been expanded to support additional data abstractions including maps, sets, and arrays of binary numeric values as well as additional support for Unicode supplemental characters in strings and regular expressions. The built-ins are now extensible via subclassing.

Focused development of the sixth edition started in 2009, as the fifth edition was being prepared for publication. However, this was preceded by significant experimentation and language enhancement design efforts dating to the publication of the third edition in 1999. In a very real sense, the completion of the sixth edition is the culmination of a fifteen year effort. Dozens of individuals representing many organizations have made very significant contributions within TC39 to the development of this edition and to the prior editions. In addition, a vibrant informal community has emerged supporting TC39’s ECMAScript efforts. This community has reviewed numerous drafts, filed thousands of bug reports, performed implementation experiments, contributed test suites, and educated the world-wide developer community about ECMAScript. Unfortunately, it is impossible to identify and acknowledge every person and organization who has contributed to this effort.

New uses and requirements for ECMAScript continue to emerge. The sixth edition provides the foundation for regular, incremental language and library enhancements.

Allen Wirfs-Brock
ECMA-262, 6th Edition Project Editor

This Ecma Standard has been adopted by the General Assembly of <month> <year>.

ECMA-262 Edition History

This Ecma Standard is based on several originating technologies, the most well-known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with Internet Explorer 3.0.

The development of this Standard started in November 1996. The first edition of this Ecma Standard was adopted by the Ecma General Assembly of June 1997.

That Ecma Standard was submitted to ISO/IEC JTC 1 for adoption under the fast-track procedure, and approved as international standard ISO/IEC 16262, in April 1998. The Ecma General Assembly of June 1998 approved the second edition of ECMA-262 to keep it fully aligned with ISO/IEC 16262. Changes between the first and the second edition are editorial in nature.

The third edition of the Standard introduced powerful regular expressions, better string handling, new control statements, try/catch exception handling, tighter definition of errors, formatting for numeric output and minor changes in anticipation future language growth. The third edition of the ECMAScript standard was adopted by the Ecma General Assembly of December 1999 and published as ISO/IEC 16262:2002 in June 2002.

After publication of the third edition, ECMAScript achieved massive adoption in conjunction with the World Wide Web where it has become the programming language that is supported by essentially all web browsers. Significant work was done to develop a fourth edition of ECMAScript. However, that work was not completed and not published as the fourth edition of ECMAScript but some of it was incorporated into the development of the sixth edition.

The fifth edition of ECMAScript (published as ECMA-262 5th edition) codified de facto interpretations of the language specification that have become common among browser implementations and added support for new features that had emerged since the publication of the third edition. Such features include accessor properties, reflective creation and inspection of objects, program control of property attributes, additional array manipulation functions, support for the JSON object encoding format, and a strict mode that provides enhanced error checking and program security. The Fifth Edition was adopted by the Ecma General Assembly of December 2009.

The Fifth Edition was submitted to ISO/IEC JTC 1 for adoption under the fast-track procedure, and approved as international standard ISO/IEC 16262:2011. Edition 5.1 of the ECMAScript Standard incorporated minor corrections and is the same text as ISO/IEC 16262:2011. The 5.1 Edition was adopted by the Ecma General Assembly of June 2011.

"DISCLAIMER

This draft document may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published, and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this section are included on all such copies and derivative works. However, this document itself may not be modified in any way, including by removing the copyright notice or references to Ecma International, except as needed for the purpose of developing any document or deliverable produced by Ecma International.

This disclaimer is valid only prior to final version of this document. After approval all rights on the standard are reserved by Ecma International.

The limited permissions are granted through the standardization phase and will not be revoked by Ecma International or its successors or assigns during this time.

This document and the information contained herein is provided on an "AS IS" basis and ECMA INTERNATIONAL DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE."

ECMAScript 2015 Language Specification

1 Scope

This Standard defines the ECMAScript 2015 general purpose programming language.

2 Conformance

A conforming implementation of ECMAScript must provide and support all the types, values, objects, properties, functions, and program syntax and semantics described in this specification.

A conforming implementation of ECMAScript must interpret source text input in conformance with the Unicode Standard, Version 5.1.0 or later and ISO/IEC 10646. If the adopted ISO/IEC 10646-1 subset is not otherwise specified, it is presumed to be the Unicode set, collection 10646.

A conforming implementation of ECMAScript that provides an application programming interface that supports programs that need to adapt to the linguistic and cultural conventions used by different human languages and countries must implement the interface defined by the most recent edition of ECMA-402 that is compatible with this specification.

A conforming implementation of ECMAScript may provide additional types, values, objects, properties, and functions beyond those described in this specification. In particular, a conforming implementation of ECMAScript may provide properties not described in this specification, and values for those properties, for objects that are described in this specification.

A conforming implementation of ECMAScript may support program and regular expression syntax not described in this specification. In particular, a conforming implementation of ECMAScript may support program syntax that makes use of the “future reserved words” listed in subclause 11.6.2.2 of this specification.

A conforming implementation of ECMAScript must not implement any extension that is listed as a Forbidden Extension in subclause 16.1.

3 Normative references

The following referenced documents are indispensable for the application of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.

IEEE Std 754-2008: IEEE Standard for Floating-Point Arithmetic. Institute of Electrical and Electronic Engineers, New York (2008)

ISO/IEC 10646:2003: Information Technology – Universal Multiple-Octet Coded Character Set (UCS) plus Amendment 1:2005, Amendment 2:2006, Amendment 3:2008, and Amendment 4:2008, plus additional amendments and corrigenda, or successor

The Unicode Standard, Version 5.0, as amended by Unicode 5.1.0, or successor.
http://www.unicode.org/versions/latest

Unicode Standard Annex #15, Unicode Normalization Forms, version Unicode 5.1.0, or successor.
http://www.unicode.org/reports/tr15/

Unicode Standard Annex #31, Unicode Identifiers and Pattern Syntax, version Unicode 5.1.0, or successor. http://www.unicode.org/reports/tr31/

ECMA-402, ECMAScript 2015 Internationalization API Specification.
http://www.ecma-international.org/publications/standards/Ecma-402.htm

ECMA-404, The JSON Data Interchange Format.
http://www.ecma-international.org/publications/standards/Ecma-404.htm

4 Overview

This section contains a non-normative overview of the ECMAScript language.

ECMAScript is an object-oriented programming language for performing computations and manipulating computational objects within a host environment. ECMAScript as defined here is not intended to be computationally self-sufficient; indeed, there are no provisions in this specification for input of external data or output of computed results. Instead, it is expected that the computational environment of an ECMAScript program will provide not only the objects and other facilities described in this specification but also certain environment-specific objects, whose description and behaviour are beyond the scope of this specification except to indicate that they may provide certain properties that can be accessed and certain functions that can be called from an ECMAScript program.

ECMAScript was originally designed to be used as a scripting language, but has become widely used as a general purpose programming language. A scripting language is a programming language that is used to manipulate, customize, and automate the facilities of an existing system. In such systems, useful functionality is already available through a user interface, and the scripting language is a mechanism for exposing that functionality to program control. In this way, the existing system is said to provide a host environment of objects and facilities, which completes the capabilities of the scripting language. A scripting language is intended for use by both professional and non-professional programmers.

ECMAScript was originally designed to be a Web scripting language, providing a mechanism to enliven Web pages in browsers and to perform server computation as part of a Web-based client-server architecture. ECMAScript is now used to provide core scripting capabilities for a variety of host environments. Therefore the core language is specified in this document apart from any particular host environment.

ECMAScript usage has moved beyond simple scripting and it is now used for the full spectrum of programming tasks in many different environments and scales. As the usage of ECMAScript has expanded, so has the features and facilities it provides. ECMAScript is now a fully featured general propose programming language.

Some of the facilities of ECMAScript are similar to those used in other programming languages; in particular C, Java™, Self, and Scheme as described in:

ISO/IEC 9899:1996, Programming Languages – C.

Gosling, James, Bill Joy and Guy Steele. The Java™ Language Specification. Addison Wesley Publishing Co., 1996.

Ungar, David, and Smith, Randall B. Self: The Power of Simplicity. OOPSLA '87 Conference Proceedings, pp. 227–241, Orlando, FL, October 1987.

IEEE Standard for the Scheme Programming Language. IEEE Std 1178-1990.

4.1 Web Scripting

A web browser provides an ECMAScript host environment for client-side computation including, for instance, objects that represent windows, menus, pop-ups, dialog boxes, text areas, anchors, frames, history, cookies, and input/output. Further, the host environment provides a means to attach scripting code to events such as change of focus, page and image loading, unloading, error and abort, selection, form submission, and mouse actions. Scripting code appears within the HTML and the displayed page is a combination of user interface elements and fixed and computed text and images. The scripting code is reactive to user interaction and there is no need for a main program.

A web server provides a different host environment for server-side computation including objects representing requests, clients, and files; and mechanisms to lock and share data. By using browser-side and server-side scripting together, it is possible to distribute computation between the client and server while providing a customized user interface for a Web-based application.

Each Web browser and server that supports ECMAScript supplies its own host environment, completing the ECMAScript execution environment.

4.2 ECMAScript Overview

The following is an informal overview of ECMAScript—not all parts of the language are described. This overview is not part of the standard proper.

ECMAScript is object-based: basic language and host facilities are provided by objects, and an ECMAScript program is a cluster of communicating objects. In ECMAScript, an object is a collection of zero or more properties each with attributes that determine how each property can be used—for example, when the Writable attribute for a property is set to false, any attempt by executed ECMAScript code to assign a different value to the property fails. Properties are containers that hold other objects, primitive values, or functions. A primitive value is a member of one of the following built-in types: Undefined, Null, Boolean, Number, String, and Symbol; an object is a member of the built-in type Object; and a function is a callable object. A function that is associated with an object via a property is called a method.

ECMAScript defines a collection of built-in objects that round out the definition of ECMAScript entities. These built-in objects include the global object; objects that are fundamental to the runtime semantics of the language including Object, Function, Boolean, Symbol, and various Error objects; objects that represent and manipulate numeric values including Math, Number, and Date; the text processing objects String and RegExp; objects that are indexed collections of values including Array and nine different kinds of Typed Arrays whose elements all have a specific numeric data representation; keyed collections including Map and Set objects; objects supporting structured data including the JSON object, ArrayBuffer, and DataView; objects supporting control abstractions including generator functions and Promise objects; and, reflection objects including Proxy and Reflect.

ECMAScript also defines a set of built-in operators. ECMAScript operators include various unary operations, multiplicative operators, additive operators, bitwise shift operators, relational operators, equality operators, binary bitwise operators, binary logical operators, assignment operators, and the comma operator.

Large ECMAScript programs are supported by modules which allow a program to be divided into multiple sequences of statements and declarations. Each module explicitly identifies declarations it uses that need to be provided by other modules and which of its declarations are available for use by other modules.

ECMAScript syntax intentionally resembles Java syntax. ECMAScript syntax is relaxed to enable it to serve as an easy-to-use scripting language. For example, a variable is not required to have its type declared nor are types associated with properties, and defined functions are not required to have their declarations appear textually before calls to them.

4.2.1 Objects

Even though ECMAScript includes syntax for class definitions, ECMAScript objects are not fundamentally class-based such as those in C++, Smalltalk, or Java. Instead objects may be created in various ways including via a literal notation or via constructors which create objects and then execute code that initializes all or part of them by assigning initial values to their properties. Each constructor is a function that has a property named "prototype" that is used to implement prototype-based inheritance and shared properties. Objects are created by using constructors in new expressions; for example, new Date(2009,11) creates a new Date object. Invoking a constructor without using new has consequences that depend on the constructor. For example, Date() produces a string representation of the current date and time rather than an object.

Every object created by a constructor has an implicit reference (called the object’s prototype) to the value of its constructor’s "prototype" property. Furthermore, a prototype may have a non-null implicit reference to its prototype, and so on; this is called the prototype chain. When a reference is made to a property in an object, that reference is to the property of that name in the first object in the prototype chain that contains a property of that name. In other words, first the object mentioned directly is examined for such a property; if that object contains the named property, that is the property to which the reference refers; if that object does not contain the named property, the prototype for that object is examined next; and so on.

An image of lots of boxes and arrows.
Figure 1 — Object/Prototype Relationships

In a class-based object-oriented language, in general, state is carried by instances, methods are carried by classes, and inheritance is only of structure and behaviour. In ECMAScript, the state and methods are carried by objects, while structure, behaviour, and state are all inherited.

All objects that do not directly contain a particular property that their prototype contains share that property and its value. Figure 1 illustrates this:

CF is a constructor (and also an object). Five objects have been created by using new expressions: cf1, cf2, cf3, cf4, and cf5. Each of these objects contains properties named q1 and q2. The dashed lines represent the implicit prototype relationship; so, for example, cf3’s prototype is CFp. The constructor, CF, has two properties itself, named P1 and P2, which are not visible to CFp, cf1, cf2, cf3, cf4, or cf5. The property named CFP1 in CFp is shared by cf1, cf2, cf3, cf4, and cf5 (but not by CF), as are any properties found in CFp’s implicit prototype chain that are not named q1, q2, or CFP1. Notice that there is no implicit prototype link between CF and CFp.

Unlike most class-based object languages, properties can be added to objects dynamically by assigning values to them. That is, constructors are not required to name or assign values to all or any of the constructed object’s properties. In the above diagram, one could add a new shared property for cf1, cf2, cf3, cf4, and cf5 by assigning a new value to the property in CFp.

Although ECMAScript objects are not inherently class-based, it is often convenient to define class-like abstractions based upon a common pattern of constructor functions, prototype objects, and methods. The ECMAScript built-in objects themselves follow such a class-like pattern. Beginning with the sixth edition, the ECMAScript language includes syntactic class definitions that permit programmers to concisely define objects that conform to the same class-like abstraction pattern used by the built-in objects.

4.2.2 The Strict Variant of ECMAScript

The ECMAScript Language recognizes the possibility that some users of the language may wish to restrict their usage of some features available in the language. They might do so in the interests of security, to avoid what they consider to be error-prone features, to get enhanced error checking, or for other reasons of their choosing. In support of this possibility, ECMAScript defines a strict variant of the language. The strict variant of the language excludes some specific syntactic and semantic features of the regular ECMAScript language and modifies the detailed semantics of some features. The strict variant also specifies additional error conditions that must be reported by throwing error exceptions in situations that are not specified as errors by the non-strict form of the language.

The strict variant of ECMAScript is commonly referred to as the strict mode of the language. Strict mode selection and use of the strict mode syntax and semantics of ECMAScript is explicitly made at the level of individual ECMAScript source text units. Because strict mode is selected at the level of a syntactic source text unit, strict mode only imposes restrictions that have local effect within such a source text unit. Strict mode does not restrict or modify any aspect of the ECMAScript semantics that must operate consistently across multiple source text units. A complete ECMAScript program may be composed of both strict mode and non-strict mode ECMAScript source text units. In this case, strict mode only applies when actually executing code that is defined within a strict mode source text unit.

In order to conform to this specification, an ECMAScript implementation must implement both the full unrestricted ECMAScript language and the strict variant of the ECMAScript language as defined by this specification. In addition, an implementation must support the combination of unrestricted and strict mode source text units into a single composite program.

4.3 Terms and definitions

For the purposes of this document, the following terms and definitions apply.

4.3.1 type

set of data values as defined in clause 6 of this specification

4.3.2 primitive value

member of one of the types Undefined, Null, Boolean, Number, Symbol, or String as defined in clause 6

NOTE A primitive value is a datum that is represented directly at the lowest level of the language implementation.

4.3.3 object

member of the type Object

NOTE An object is a collection of properties and has a single prototype object. The prototype may be the null value.

4.3.4 constructor

function object that creates and initializes objects

NOTE The value of a constructor’s prototype property is a prototype object that is used to implement inheritance and shared properties.

4.3.5 prototype

object that provides shared properties for other objects

NOTE When a constructor creates an object, that object implicitly references the constructor’s prototype property for the purpose of resolving property references. The constructor’s prototype property can be referenced by the program expression constructor.prototype, and properties added to an object’s prototype are shared, through inheritance, by all objects sharing the prototype. Alternatively, a new object may be created with an explicitly specified prototype by using the Object.create built-in function.

4.3.6 ordinary object

object that has the default behaviour for the essential internal methods that must be supported by all objects.

4.3.7 exotic object

object that does not have the default behaviour for one or more of the essential internal methods that must be supported by all objects.

NOTE Any object that is not an ordinary object is an exotic object.

4.3.8 standard object

object whose semantics are defined by this specification

4.3.9 built-in object

object specified and supplied by an ECMAScript implementation

NOTE Standard built-in objects are defined in this specification. An ECMAScript implementation may specify and supply additional kinds of built-in objects. A built-in constructor is a built-in object that is also a constructor.

4.3.10 undefined value

primitive value used when a variable has not been assigned a value

4.3.11 Undefined type

type whose sole value is the undefined value

4.3.12 null value

primitive value that represents the intentional absence of any object value

4.3.13 Null type

type whose sole value is the null value

4.3.14 Boolean value

member of the Boolean type

NOTE There are only two Boolean values, true and false

4.3.15 Boolean type

type consisting of the primitive values true and false

4.3.16 Boolean object

member of the Object type that is an instance of the standard built-in Boolean constructor

NOTE A Boolean object is created by using the Boolean constructor in a new expression, supplying a Boolean value as an argument. The resulting object has an internal slot whose value is the Boolean value. A Boolean object can be coerced to a Boolean value.

4.3.17 String value

primitive value that is a finite ordered sequence of zero or more 16-bit unsigned integer

NOTE A String value is a member of the String type. Each integer value in the sequence usually represents a single 16-bit unit of UTF-16 text. However, ECMAScript does not place any restrictions or requirements on the values except that they must be 16-bit unsigned integers.

4.3.18 String type

set of all possible String values

4.3.19 String object

member of the Object type that is an instance of the standard built-in String constructor

NOTE A String object is created by using the String constructor in a new expression, supplying a String value as an argument. The resulting object has an internal slot whose value is the String value. A String object can be coerced to a String value by calling the String constructor as a function (21.1.1.1).

4.3.20 Number value

primitive value corresponding to a double-precision 64-bit binary format IEEE 754 value

NOTE A Number value is a member of the Number type and is a direct representation of a number.

4.3.21 Number type

set of all possible Number values including the special “Not-a-Number” (NaN) value, positive infinity, and negative infinity

4.3.22 Number object

member of the Object type that is an instance of the standard built-in Number constructor

NOTE A Number object is created by using the Number constructor in a new expression, supplying a Number value as an argument. The resulting object has an internal slot whose value is the Number value. A Number object can be coerced to a Number value by calling the Number constructor as a function (20.1.1.1).

4.3.23 Infinity

number value that is the positive infinite Number value

4.3.24 NaN

number value that is an IEEE 754 “Not-a-Number” value

4.3.25 Symbol value

primitive value that represents a unique, non-String Object property key

4.3.26 Symbol type

set of all possible Symbol values

4.3.27 Symbol object

member of the Object type that is an instance of the standard built-in Symbol constructor

4.3.28 function

member of the Object type that may be invoked as a subroutine

NOTE In addition to its properties, a function contains executable code and state that determine how it behaves when invoked. A function’s code may or may not be written in ECMAScript.

4.3.29 built-in function

built-in object that is a function

NOTE Examples of built-in functions include parseInt and Math.exp. An implementation may provide implementation-dependent built-in functions that are not described in this specification.

4.3.30 property

part of an object that associates a key (either a String value or a Symbol value) and a value.

NOTE Depending upon the form of the property the value may be represented either directly as a data value (a primitive value, an object, or a function object) or indirectly by a pair of accessor functions.

4.3.31 method

function that is the value of a property

NOTE When a function is called as a method of an object, the object is passed to the function as its this value.

4.3.32 built-in method

method that is a built-in function

NOTE Standard built-in methods are defined in this specification, and an ECMAScript implementation may specify and provide other additional built-in methods.

4.3.33 attribute

internal value that defines some characteristic of a property

4.3.34 own property

property that is directly contained by its object

4.3.35 inherited property

property of an object that is not an own property but is a property (either own or inherited) of the object’s prototype

4.4 Organization of This Specification

The remainder of this specification is organized as follows:

Clause 5 defines the notational conventions used throughout the specification.

Clauses 6−9 define the execution environment within which ECMAScript programs operate.

Clauses 10−16 define the actual ECMAScript programming language including its syntactic encoding and the execution semantics of all language features.

Clauses 17−26 define the ECMAScript standard library. It includes the definitions of all of the standard objects that are available for use by ECMAScript programs as they execute.

5 Notational Conventions

5.1 Syntactic and Lexical Grammars

5.1.1 Context-Free Grammars

A context-free grammar consists of a number of productions. Each production has an abstract symbol called a nonterminal as its left-hand side, and a sequence of zero or more nonterminal and terminal symbols as its right-hand side. For each grammar, the terminal symbols are drawn from a specified alphabet.

A chain production is a production that has exactly one nonterminal symbol on its right-hand side along with zero or more terminal symbols.

Starting from a sentence consisting of a single distinguished nonterminal, called the goal symbol, a given context-free grammar specifies a language, namely, the (perhaps infinite) set of possible sequences of terminal symbols that can result from repeatedly replacing any nonterminal in the sequence with a right-hand side of a production for which the nonterminal is the left-hand side.

5.1.2 The Lexical and RegExp Grammars

A lexical grammar for ECMAScript is given in clause 11. This grammar has as its terminal symbols Unicode code points that conform to the rules for SourceCharacter defined in 10.1. It defines a set of productions, starting from the goal symbol InputElementDiv, InputElementTemplateTail, or InputElementRegExp, or InputElementRegExpOrTemplateTail, that describe how sequences of such code points are translated into a sequence of input elements.

Input elements other than white space and comments form the terminal symbols for the syntactic grammar for ECMAScript and are called ECMAScript tokens. These tokens are the reserved words, identifiers, literals, and punctuators of the ECMAScript language. Moreover, line terminators, although not considered to be tokens, also become part of the stream of input elements and guide the process of automatic semicolon insertion (11.9). Simple white space and single-line comments are discarded and do not appear in the stream of input elements for the syntactic grammar. A MultiLineComment (that is, a comment of the form /**/ regardless of whether it spans more than one line) is likewise simply discarded if it contains no line terminator; but if a MultiLineComment contains one or more line terminators, then it is replaced by a single line terminator, which becomes part of the stream of input elements for the syntactic grammar.

A RegExp grammar for ECMAScript is given in 21.2.1. This grammar also has as its terminal symbols the code points as defined by SourceCharacter. It defines a set of productions, starting from the goal symbol Pattern, that describe how sequences of code points are translated into regular expression patterns.

Productions of the lexical and RegExp grammars are distinguished by having two colons “::” as separating punctuation. The lexical and RegExp grammars share some productions.

5.1.3 The Numeric String Grammar

Another grammar is used for translating Strings into numeric values. This grammar is similar to the part of the lexical grammar having to do with numeric literals and has as its terminal symbols SourceCharacter. This grammar appears in 7.1.3.1.

Productions of the numeric string grammar are distinguished by having three colons “:::” as punctuation.

5.1.4 The Syntactic Grammar

The syntactic grammar for ECMAScript is given in clauses 11, 12, 13, 14, and 15. This grammar has ECMAScript tokens defined by the lexical grammar as its terminal symbols (5.1.2). It defines a set of productions, starting from two alternative goal symbols Script and Module, that describe how sequences of tokens form syntactically correct independent components of ECMAScript programs.

When a stream of code points is to be parsed as an ECMAScript Script or Module, it is first converted to a stream of input elements by repeated application of the lexical grammar; this stream of input elements is then parsed by a single application of the syntactic grammar. The input stream is syntactically in error if the tokens in the stream of input elements cannot be parsed as a single instance of the goal nonterminal (Script or Module), with no tokens left over.

Productions of the syntactic grammar are distinguished by having just one colon “:” as punctuation.

The syntactic grammar as presented in clauses 12, 13, 14 and 15 is not a complete account of which token sequences are accepted as a correct ECMAScript Script or Module. Certain additional token sequences are also accepted, namely, those that would be described by the grammar if only semicolons were added to the sequence in certain places (such as before line terminator characters). Furthermore, certain token sequences that are described by the grammar are not considered acceptable if a line terminator character appears in certain “awkward” places.

In certain cases in order to avoid ambiguities the syntactic grammar uses generalized productions that permit token sequences that do not form a valid ECMAScript Script or Module. For example, this technique is used for object literals and object destructuring patterns. In such cases a more restrictive supplemental grammar is provided that further restricts the acceptable token sequences. In certain contexts, when explicitly specified, the input elements corresponding to such a production are parsed again using a goal symbol of a supplemental grammar. The input stream is syntactically in error if the tokens in the stream of input elements parsed by a cover grammar cannot be parsed as a single instance of the corresponding supplemental goal symbol, with no tokens left over.

5.1.5 Grammar Notation

Terminal symbols of the lexical, RegExp, and numeric string grammars are shown in fixed width font, both in the productions of the grammars and throughout this specification whenever the text directly refers to such a terminal symbol. These are to appear in a script exactly as written. All terminal symbol code points specified in this way are to be understood as the appropriate Unicode code points from the Basic Latin range, as opposed to any similar-looking code points from other Unicode ranges.

Nonterminal symbols are shown in italic type. The definition of a nonterminal (also called a “production”) is introduced by the name of the nonterminal being defined followed by one or more colons. (The number of colons indicates to which grammar the production belongs.) One or more alternative right-hand sides for the nonterminal then follow on succeeding lines. For example, the syntactic definition:

WhileStatement :
while ( Expression ) Statement

states that the nonterminal WhileStatement represents the token while, followed by a left parenthesis token, followed by an Expression, followed by a right parenthesis token, followed by a Statement. The occurrences of Expression and Statement are themselves nonterminals. As another example, the syntactic definition:

ArgumentList :
AssignmentExpression
ArgumentList , AssignmentExpression

states that an ArgumentList may represent either a single AssignmentExpression or an ArgumentList, followed by a comma, followed by an AssignmentExpression. This definition of ArgumentList is recursive, that is, it is defined in terms of itself. The result is that an ArgumentList may contain any positive number of arguments, separated by commas, where each argument expression is an AssignmentExpression. Such recursive definitions of nonterminals are common.

The subscripted suffix “opt”, which may appear after a terminal or nonterminal, indicates an optional symbol. The alternative containing the optional symbol actually specifies two right-hand sides, one that omits the optional element and one that includes it. This means that:

VariableDeclaration :
BindingIdentifier Initializeropt

is a convenient abbreviation for:

VariableDeclaration :
BindingIdentifier
BindingIdentifier Initializer

and that:

IterationStatement :
for ( LexicalDeclaration Expressionopt ; Expressionopt ) Statement

is a convenient abbreviation for:

IterationStatement :
for ( LexicalDeclaration ; Expressionopt ) Statement
for ( LexicalDeclaration Expression ; Expressionopt ) Statement

which in turn is an abbreviation for:

IterationStatement :
for ( LexicalDeclaration ; ) Statement
for ( LexicalDeclaration ; Expression ) Statement
for ( LexicalDeclaration Expression ; ) Statement
for ( LexicalDeclaration Expression ; Expression ) Statement

so, in this example, the nonterminal IterationStatement actually has four alternative right-hand sides.

A production may be parameterized by a subscripted annotation of the form “[parameters]”, which may appear as a suffix to the nonterminal symbol defined by the production. “parameters” may be either a single name or a comma separated list of names. A parameterized production is shorthand for a set of productions defining all combinations of the parameter names, preceded by an underscore, appended to the parameterized nonterminal symbol. This means that:

StatementList[Return] :
ReturnStatement
ExpressionStatement

is a convenient abbreviation for:

StatementList :
ReturnStatement
ExpressionStatement
StatementList_Return :
ReturnStatement
ExpressionStatement

and that:

StatementList[Return, In] :
ReturnStatement
ExpressionStatement

is an abbreviation for:

StatementList :
ReturnStatement
ExpressionStatement
StatementList_Return :
ReturnStatement
ExpressionStatement
StatementList_In :
ReturnStatement
ExpressionStatement
StatementList_Return_In :
ReturnStatement
ExpressionStatement

Multiple parameters produce a combinatory number of productions, not all of which are necessarily referenced in a complete grammar.

References to nonterminals on the right-hand side of a production can also be parameterized. For example:

StatementList :
ReturnStatement
ExpressionStatement[In]

is equivalent to saying:

StatementList :
ReturnStatement
ExpressionStatement_In

A nonterminal reference may have both a parameter list and an “opt” suffix. For example:

VariableDeclaration :
BindingIdentifier Initializer[In]opt

is an abbreviation for:

VariableDeclaration :
BindingIdentifier
BindingIdentifier Initializer_In

Prefixing a parameter name with “?” on a right-hand side nonterminal reference makes that parameter value dependent upon the occurrence of the parameter name on the reference to the current production’s left-hand side symbol. For example:

VariableDeclaration[In] :
BindingIdentifier Initializer[?In]

is an abbreviation for:

VariableDeclaration :
BindingIdentifier Initializer
VariableDeclaration_In :
BindingIdentifier Initializer_In

If a right-hand side alternative is prefixed with “[+parameter]” that alternative is only available if the named parameter was used in referencing the production’s nonterminal symbol. If a right-hand side alternative is prefixed with “[~parameter]” that alternative is only available if the named parameter was not used in referencing the production’s nonterminal symbol. This means that:

StatementList[Return] :
[+Return] ReturnStatement
ExpressionStatement

is an abbreviation for:

StatementList :
ExpressionStatement
StatementList_Return :
ReturnStatement
ExpressionStatement

and that

StatementList[Return] :
[~Return] ReturnStatement
ExpressionStatement

is an abbreviation for:

StatementList :
ReturnStatement
ExpressionStatement
StatementList_Return :
ExpressionStatement

When the words “one of” follow the colon(s) in a grammar definition, they signify that each of the terminal symbols on the following line or lines is an alternative definition. For example, the lexical grammar for ECMAScript contains the production:

NonZeroDigit :: one of
1 2 3 4 5 6 7 8 9

which is merely a convenient abbreviation for:

NonZeroDigit ::
1
2
3
4
5
6
7
8
9

If the phrase “[empty]” appears as the right-hand side of a production, it indicates that the production's right-hand side contains no terminals or nonterminals.

If the phrase “[lookahead ∉ set]” appears in the right-hand side of a production, it indicates that the production may not be used if the immediately following input token is a member of the given set. The set can be written as a list of terminals enclosed in curly brackets. For convenience, the set can also be written as a nonterminal, in which case it represents the set of all terminals to which that nonterminal could expand. If the set consists of a single terminal the phrase “[lookahead ≠ terminal]” may be used.

For example, given the definitions

DecimalDigit :: one of
0 1 2 3 4 5 6 7 8 9
DecimalDigits ::
DecimalDigit
DecimalDigits DecimalDigit

the definition

LookaheadExample ::
n [lookahead ∉ {1, 3, 5, 7, 9}] DecimalDigits
DecimalDigit [lookahead ∉ DecimalDigit]

matches either the letter n followed by one or more decimal digits the first of which is even, or a decimal digit not followed by another decimal digit.

If the phrase “[no LineTerminator here]” appears in the right-hand side of a production of the syntactic grammar, it indicates that the production is a restricted production: it may not be used if a LineTerminator occurs in the input stream at the indicated position. For example, the production:

ThrowStatement :
throw [no LineTerminator here] Expression ;

indicates that the production may not be used if a LineTerminator occurs in the script between the throw token and the Expression.

Unless the presence of a LineTerminator is forbidden by a restricted production, any number of occurrences of LineTerminator may appear between any two consecutive tokens in the stream of input elements without affecting the syntactic acceptability of the script.

When an alternative in a production of the lexical grammar or the numeric string grammar appears to be a multi-code point token, it represents the sequence of code points that would make up such a token.

The right-hand side of a production may specify that certain expansions are not permitted by using the phrase “but not” and then indicating the expansions to be excluded. For example, the production:

Identifier ::
IdentifierName but not ReservedWord

means that the nonterminal Identifier may be replaced by any sequence of code points that could replace IdentifierName provided that the same sequence of code points could not replace ReservedWord.

Finally, a few nonterminal symbols are described by a descriptive phrase in sans-serif type in cases where it would be impractical to list all the alternatives:

SourceCharacter ::
any Unicode code point

5.2 Algorithm Conventions

The specification often uses a numbered list to specify steps in an algorithm. These algorithms are used to precisely specify the required semantics of ECMAScript language constructs. The algorithms are not intended to imply the use of any specific implementation technique. In practice, there may be more efficient algorithms available to implement a given feature.

Algorithms may be explicitly parameterized, in which case the names and usage of the parameters must be provided as part of the algorithm’s definition. In order to facilitate their use in multiple parts of this specification, some algorithms, called abstract operations, are named and written in parameterized functional form so that they may be referenced by name from within other algorithms. Abstract operations are typically referenced using a functional application style such as operationName(arg1, arg2). Some abstract operations are treated as polymorphically dispatched methods of class-like specification abstractions. Such method-like abstract operations are typically referenced using a method application style such as someValue.operationName(arg1, arg2).

Algorithms may be associated with productions of one of the ECMAScript grammars. A production that has multiple alternative definitions will typically have a distinct algorithm for each alternative. When an algorithm is associated with a grammar production, it may reference the terminal and nonterminal symbols of the production alternative as if they were parameters of the algorithm. When used in this manner, nonterminal symbols refer to the actual alternative definition that is matched when parsing the source text.

When an algorithm is associated with a production alternative, the alternative is typically shown without any “[ ]” grammar annotations. Such annotations should only affect the syntactic recognition of the alternative and have no effect on the associated semantics for the alternative.

Unless explicitly specified otherwise, all chain productions have an implicit definition for every algorithm that might be applied to that production’s left-hand side nonterminal. The implicit definition simply reapplies the same algorithm name with the same parameters, if any, to the chain production’s sole right-hand side nonterminal and then returns the result. For example, assume there is a production:

Block :
{ StatementList }

but there is no corresponding Evaluation algorithm that is explicitly specified for that production. If in some algorithm there is a statement of the form: “Return the result of evaluating Block” it is implicit that an Evaluation algorithm exists of the form:

Runtime Semantics: Evaluation

Block : { StatementList }
  1. Return the result of evaluating StatementList.

For clarity of expression, algorithm steps may be subdivided into sequential substeps. Substeps are indented and may themselves be further divided into indented substeps. Outline numbering conventions are used to identify substeps with the first level of substeps labelled with lower case alphabetic characters and the second level of substeps labelled with lower case roman numerals. If more than three levels are required these rules repeat with the fourth level using numeric labels. For example:

  1. Top-level step
    1. Substep.
    2. Substep.
      1. Subsubstep.
        1. Subsubsubstep
          1. Subsubsubsubstep
            1. Subsubsubsubsubstep

A step or substep may be written as an “if” predicate that conditions its substeps. In this case, the substeps are only applied if the predicate is true. If a step or substep begins with the word “else”, it is a predicate that is the negation of the preceding “if” predicate step at the same level.

A step may specify the iterative application of its substeps.

A step that begins with “Assert:” asserts an invariant condition of its algorithm. Such assertions are used to make explicit algorithmic invariants that would otherwise be implicit. Such assertions add no additional semantic requirements and hence need not be checked by an implementation. They are used simply to clarify algorithms.

Mathematical operations such as addition, subtraction, negation, multiplication, division, and the mathematical functions defined later in this clause should always be understood as computing exact mathematical results on mathematical real numbers, which unless otherwise noted do not include infinities and do not include a negative zero that is distinguished from positive zero. Algorithms in this standard that model floating-point arithmetic include explicit steps, where necessary, to handle infinities and signed zero and to perform rounding. If a mathematical operation or function is applied to a floating-point number, it should be understood as being applied to the exact mathematical value represented by that floating-point number; such a floating-point number must be finite, and if it is +0 or −0 then the corresponding mathematical value is simply 0.

The mathematical function abs(x) produces the absolute value of x, which is x if x is negative (less than zero) and otherwise is x itself.

The mathematical function sign(x) produces 1 if x is positive and −1 if x is negative. The sign function is not used in this standard for cases when x is zero.

The mathematical function min(x1, x2, ..., xn) produces the mathematically smallest of x1 through xn. The mathematical function max(x1, x2, ..., xn) produces the mathematically largest of x1 through xn. The domain and range of these mathematical functions include + and −∞.

The notation “x modulo y” (y must be finite and nonzero) computes a value k of the same sign as y (or zero) such that abs(k) < abs(y) and xk = q × y for some integer q.

The mathematical function floor(x) produces the largest integer (closest to positive infinity) that is not larger than x.

NOTE floor(x) = x−(x modulo 1).

5.3 Static Semantic Rules

Context-free grammars are not sufficiently powerful to express all the rules that define whether a stream of input elements form a valid ECMAScript Script or Module that may be evaluated. In some situations additional rules are needed that may be expressed using either ECMAScript algorithm conventions or prose requirements. Such rules are always associated with a production of a grammar and are called the static semantics of the production.

Static Semantic Rules have names and typically are defined using an algorithm. Named Static Semantic Rules are associated with grammar productions and a production that has multiple alternative definitions will typically have for each alternative a distinct algorithm for each applicable named static semantic rule.

Unless otherwise specified every grammar production alternative in this specification implicitly has a definition for a static semantic rule named Contains which takes an argument named symbol whose value is a terminal or nonterminal of the grammar that includes the associated production. The default definition of Contains is:

  1. For each terminal and nonterminal grammar symbol, sym, in the definition of this production do
    1. If sym is the same grammar symbol as symbol, return true.
    2. If sym is a nonterminal, then
      1. Let contained be the result of sym Contains symbol.
      2. If contained is true, return true.
  2. Return false.

The above definition is explicitly over-ridden for specific productions.

A special kind of static semantic rule is an Early Error Rule. Early error rules define early error conditions (see clause 16) that are associated with specific grammar productions. Evaluation of most early error rules are not explicitly invoked within the algorithms of this specification. A conforming implementation must, prior to the first evaluation of a Script, validate all of the early error rules of the productions used to parse that Script. If any of the early error rules are violated the Script is invalid and cannot be evaluated.

6 ECMAScript Data Types and Values

Algorithms within this specification manipulate values each of which has an associated type. The possible value types are exactly those defined in this clause. Types are further subclassified into ECMAScript language types and specification types.

Within this specification, the notation “Type(x)” is used as shorthand for “the type of x” where “type” refers to the ECMAScript language and specification types defined in this clause. When the term “empty” is used as if it was naming a value, it is equivalent to saying “no value of any type”.

6.1 ECMAScript Language Types

An ECMAScript language type corresponds to values that are directly manipulated by an ECMAScript programmer using the ECMAScript language. The ECMAScript language types are Undefined, Null, Boolean, String, Symbol, Number, and Object. An ECMAScript language value is a value that is characterized by an ECMAScript language type.

6.1.1 The Undefined Type

The Undefined type has exactly one value, called undefined. Any variable that has not been assigned a value has the value undefined.

6.1.2 The Null Type

The Null type has exactly one value, called null.

6.1.3 The Boolean Type

The Boolean type represents a logical entity having two values, called true and false.

6.1.4 The String Type

The String type is the set of all finite ordered sequences of zero or more 16-bit unsigned integer values (“elements”). The String type is generally used to represent textual data in a running ECMAScript program, in which case each element in the String is treated as a UTF-16 code unit value. Each element is regarded as occupying a position within the sequence. These positions are indexed with nonnegative integers. The first element (if any) is at index 0, the next element (if any) at index 1, and so on. The length of a String is the number of elements (i.e., 16-bit values) within it. The empty String has length zero and therefore contains no elements.

Where ECMAScript operations interpret String values, each element is interpreted as a single UTF-16 code unit. However, ECMAScript does not place any restrictions or requirements on the sequence of code units in a String value, so they may be ill-formed when interpreted as UTF-16 code unit sequences. Operations that do not interpret String contents treat them as sequences of undifferentiated 16-bit unsigned integers. The function String.prototype.normalize (see 21.1.3.12) can be used to explicitly normalize a string value. String.prototype.localeCompare (see 21.1.3.10) internally normalizes strings values, but no other operations implicitly normalize the strings upon which they operate. Only operations that are explicitly specified to be language or locale sensitive produce language-sensitive results.

NOTE The rationale behind this design was to keep the implementation of Strings as simple and high-performing as possible. If ECMAScript source text is in Normalized Form C, string literals are guaranteed to also be normalized, as long as they do not contain any Unicode escape sequences.

Some operations interpret String contents as UTF-16 encoded Unicode code points. In that case the interpretation is:

  • A code unit in the range 0 to 0xD7FF or in the range 0xE000 to 0xFFFF is interpreted as a code point with the same value.

  • A sequence of two code units, where the first code unit c1 is in the range 0xD800 to 0xDBFF and the second code unit c2 is in the range 0xDC00 to 0xDFFF, is a surrogate pair and is interpreted as a code point with the value (c1 - 0xD800) × 0x400 + (c20xDC00) + 0x10000. (See 10.1.2)

  • A code unit that is in the range 0xD800 to 0xDFFF, but is not part of a surrogate pair, is interpreted as a code point with the same value.

6.1.5 The Symbol Type

The Symbol type is the set of all non-String values that may be used as the key of an Object property (6.1.7).

Each possible Symbol value is unique and immutable.

Each Symbol value immutably holds an associated value called [[Description]] that is either undefined or a String value.

6.1.5.1 Well-Known Symbols

Well-known symbols are built-in Symbol values that are explicitly referenced by algorithms of this specification. They are typically used as the keys of properties whose values serve as extension points of a specification algorithm. Unless otherwise specified, well-known symbols values are shared by all Code Realms (8.2).

Within this specification a well-known symbol is referred to by using a notation of the form @@name, where “name” is one of the values listed in Table 1.

Table 1— Well-known Symbols
Specification Name [[Description]] Value and Purpose
@@hasInstance "Symbol.hasInstance" A method that determines if a constructor object recognizes an object as one of the constructor’s instances. Called by the semantics of the instanceof operator.
@@isConcatSpreadable "Symbol.isConcatSpreadable" A Boolean valued property that if true indicates that an object should be flattened to its array elements by Array.prototype.concat.
@@iterator "Symbol.iterator" A method that returns the default Iterator for an object. Called by the semantics of the for-of statement.
@@match "Symbol.match" A regular expression method that matches the regular expression against a string. Called by the String.prototype.match method.
@@replace "Symbol.replace" A regular expression method that replaces matched substrings of a string. Called by the String.prototype.replace method.
@@search "Symbol.search" A regular expression method that returns the index within a string that matches the regular expression. Called by the String.prototype.search method.
@@species "Symbol.species" A function valued property that is the constructor function that is used to create derived objects.
@@split "Symbol.split" A regular expression method that splits a string at the indices that match the regular expression. Called by the String.prototype.split method.
@@toPrimitive "Symbol.toPrimitive" A method that converts an object to a corresponding primitive value. Called by the ToPrimitive abstract operation.
@@toStringTag "Symbol.toStringTag" A String valued property that is used in the creation of the default string description of an object. Accessed by the built-in method Object.prototype.toString.
@@unscopables "Symbol.unscopables" An object valued property whose own property names are property names that are excluded from the with environment bindings of the associated object.

6.1.6 The Number Type

The Number type has exactly 18437736874454810627 (that is, 264−253+3) values, representing the double-precision 64-bit format IEEE 754 values as specified in the IEEE Standard for Binary Floating-Point Arithmetic, except that the 9007199254740990 (that is, 253−2) distinct “Not-a-Number” values of the IEEE Standard are represented in ECMAScript as a single special NaN value. (Note that the NaN value is produced by the program expression NaN.) In some implementations, external code might be able to detect a difference between various Not-a-Number values, but such behaviour is implementation-dependent; to ECMAScript code, all NaN values are indistinguishable from each other.

NOTE The bit pattern that might be observed in an ArrayBuffer (see 24.1) after a Number value has been stored into it is not necessarily the same as the internal representation of that Number value used by the ECMAScript implementation.

There are two other special values, called positive Infinity and negative Infinity. For brevity, these values are also referred to for expository purposes by the symbols +∞ and −∞, respectively. (Note that these two infinite Number values are produced by the program expressions +Infinity (or simply Infinity) and -Infinity.)

The other 18437736874454810624 (that is, 264−253) values are called the finite numbers. Half of these are positive numbers and half are negative numbers; for every finite positive Number value there is a corresponding negative value having the same magnitude.

Note that there is both a positive zero and a negative zero. For brevity, these values are also referred to for expository purposes by the symbols +0 and −0, respectively. (Note that these two different zero Number values are produced by the program expressions +0 (or simply 0) and -0.)

The 18437736874454810622 (that is, 264−253−2) finite nonzero values are of two kinds:

18428729675200069632 (that is, 264−254) of them are normalized, having the form

s × m × 2e

where s is +1 or −1, m is a positive integer less than 253 but not less than 252, and e is an integer ranging from −1074 to 971, inclusive.

The remaining 9007199254740990 (that is, 253−2) values are denormalized, having the form

s × m × 2e

where s is +1 or −1, m is a positive integer less than 252, and e is −1074.

Note that all the positive and negative integers whose magnitude is no greater than 253 are representable in the Number type (indeed, the integer 0 has two representations, +0 and -0).

A finite number has an odd significand if it is nonzero and the integer m used to express it (in one of the two forms shown above) is odd. Otherwise, it has an even significand.

In this specification, the phrase “the Number value for x” where x represents an exact nonzero real mathematical quantity (which might even be an irrational number such as π) means a Number value chosen in the following manner. Consider the set of all finite values of the Number type, with −0 removed and with two additional values added to it that are not representable in the Number type, namely 21024 (which is +1 × 253 × 2971) and −21024 (which is −1 × 253 × 2971). Choose the member of this set that is closest in value to x. If two values of the set are equally close, then the one with an even significand is chosen; for this purpose, the two extra values 21024 and −21024 are considered to have even significands. Finally, if 21024 was chosen, replace it with +∞; if −21024 was chosen, replace it with −∞; if +0 was chosen, replace it with −0 if and only if x is less than zero; any other chosen value is used unchanged. The result is the Number value for x. (This procedure corresponds exactly to the behaviour of the IEEE 754 “round to nearest, ties to even” mode.)

Some ECMAScript operators deal only with integers in specific ranges such as −231 through 231−1, inclusive, or in the range 0 through 216−1, inclusive. These operators accept any value of the Number type but first convert each such value to an integer value in the expected range. See the descriptions of the numeric conversion operations in 7.1.

6.1.7 The Object Type

An Object is logically a collection of properties. Each property is either a data property, or an accessor property:

  • A data property associates a key value with an ECMAScript language value and a set of Boolean attributes.

  • An accessor property associates a key value with one or two accessor functions, and a set of Boolean attributes. The accessor functions are used to store or retrieve an ECMAScript language value that is associated with the property.

Properties are identified using key values. A property key value is either an ECMAScript String value or a Symbol value. All String and Symbol values, including the empty string, are valid as property keys. A property name is a property key that is a String value.

An integer index is a String-valued property key that is a canonical numeric String (see 7.1.16) and whose numeric value is either +0 or a positive integer ≤ 253−1. An array index is an integer index whose numeric value i is in the range +0 ≤ i < 232−1.

Property keys are used to access properties and their values. There are two kinds of access for properties: get and set, corresponding to value retrieval and assignment, respectively. The properties accessible via get and set access includes both own properties that are a direct part of an object and inherited properties which are provided by another associated object via a property inheritance relationship. Inherited properties may be either own or inherited properties of the associated object. Each own property of an object must each have a key value that is distinct from the key values of the other own properties of that object.

All objects are logically collections of properties, but there are multiple forms of objects that differ in their semantics for accessing and manipulating their properties. Ordinary objects are the most common form of objects and have the default object semantics. An exotic object is any form of object whose property semantics differ in any way from the default semantics.

6.1.7.1 Property Attributes

Attributes are used in this specification to define and explain the state of Object properties. A data property associates a key value with the attributes listed in Table 2.

Table 2 — Attributes of a Data Property
Attribute Name Value Domain Description
[[Value]] Any ECMAScript language type The value retrieved by a get access of the property.
[[Writable]] Boolean If false, attempts by ECMAScript code to change the property’s [[Value]] attribute using [[Set]] will not succeed.
[[Enumerable]] Boolean If true, the property will be enumerated by a for-in enumeration (see 13.6.4). Otherwise, the property is said to be non-enumerable.
[[Configurable]] Boolean If false, attempts to delete the property, change the property to be an accessor property, or change its attributes (other than [[Value]], or changing [[Writable]] to false) will fail.

An accessor property associates a key value with the attributes listed in Table 3.

Table 3 — Attributes of an Accessor Property
Attribute Name Value Domain Description
[[Get]] Object or Undefined If the value is an Object it must be a function Object. The function’s [[Call]] internal method (Table 6) is called with an empty arguments list to retrieve the property value each time a get access of the property is performed.
[[Set]] Object or Undefined If the value is an Object it must be a function Object. The function’s [[Call]] internal method (Table 6) is called with an arguments list containing the assigned value as its sole argument each time a set access of the property is performed. The effect of a property's [[Set]] internal method may, but is not required to, have an effect on the value returned by subsequent calls to the property's [[Get]] internal method.
[[Enumerable]] Boolean If true, the property is to be enumerated by a for-in enumeration (see 13.6.4). Otherwise, the property is said to be non-enumerable.
[[Configurable]] Boolean If false, attempts to delete the property, change the property to be a data property, or change its attributes will fail.

If the initial values of a property’s attributes are not explicitly specified by this specification, the default value defined in Table 4 is used.

Table 4 — Default Attribute Values
Attribute Name Default Value
[[Value]] undefined
[[Get]] undefined
[[Set]] undefined
[[Writable]] false
[[Enumerable]] false
[[Configurable]] false

6.1.7.2 Object Internal Methods and Internal Slots

The actual semantics of objects, in ECMAScript, are specified via algorithms called internal methods. Each object in an ECMAScript engine is associated with a set of internal methods that defines its runtime behaviour. These internal methods are not part of the ECMAScript language. They are defined by this specification purely for expository purposes. However, each object within an implementation of ECMAScript must behave as specified by the internal methods associated with it. The exact manner in which this is accomplished is determined by the implementation.

Internal method names are polymorphic. This means that different object values may perform different algorithms when a common internal method name is invoked upon them. That actual object upon which an internal method is invoked is the “target” of the invocation. If, at runtime, the implementation of an algorithm attempts to use an internal method of an object that the object does not support, a TypeError exception is thrown.

Internal slots correspond to internal state that is associated with objects and used by various ECMAScript specification algorithms. Internal slots are not object properties and they are not inherited. Depending upon the specific internal slot specification, such state may consist of values of any ECMAScript language type or of specific ECMAScript specification type values. Unless explicitly specified otherwise, internal slots are allocated as part of the process of creating an object and may not be dynamically added to an object. Unless specified otherwise, the initial value of an internal slot is the value undefined. Various algorithms within this specification create objects that have internal slots. However, the ECMAScript language provides no direct way to associate internal slots with an object.

Internal methods and internal slots are identified within this specification using names enclosed in double square brackets [[ ]].

Table 5 summarizes the essential internal methods used by this specification that are applicable to all objects created or manipulated by ECMAScript code. Every object must have algorithms for all of the essential internal methods. However, all objects do not necessarily use the same algorithms for those methods.

The “Signature” column of Table 5 and other similar tables describes the invocation pattern for each internal method. The invocation pattern always includes a parenthesized list of descriptive parameter names. If a parameter name is the same as an ECMAScript type name then the name describes the required type of the parameter value. If an internal method explicitly returns a value, its parameter list is followed by the symbol “→” and the type name of the returned value. The type names used in signatures refer to the types defined in clause 6 augmented by the following additional names. “any” means the value may be any ECMAScript language type. An internal method implicitly returns a Completion Record as described in 6.2.2. In addition to its parameters, an internal method always has access to the object that is the target of the method invocation.

Table 5 — Essential Internal Methods
Internal Method Signature Description
[[GetPrototypeOf]] () Object or Null Determine the object that provides inherited properties for this object. A null value indicates that there are no inherited properties.
[[SetPrototypeOf]] (Object or Null) Boolean Associate with this object another object that provides inherited properties. Passing null indicates that there are no inherited properties. Returns true indicating that the operation was completed successfully or false indicating that the operation was not successful.
[[IsExtensible]] ( ) Boolean Determine whether it is permitted to add additional properties to this object.
[[PreventExtensions]] ( ) Boolean Control whether new properties may be added to this object. Returns true if the operation was successful or false if the operation was unsuccessful.
[[GetOwnProperty]] (propertyKey) → Undefined or Property Descriptor Return a Property Descriptor for the own property of this object whose key is propertyKey, or undefined if no such property exists.
[[HasProperty]] (propertyKey) Boolean Return a Boolean value indicating whether this object already has either an own or inherited property whose key is propertyKey.
[[Get]] (propertyKey, Receiver) any Return the value of the property whose key is propertyKey from this object. If any ECMAScript code must be executed to retrieve the property value, Receiver is used as the this value when evaluating the code.
[[Set]] (propertyKey,value, Receiver)
Boolean
Set the value of this object property whose key is propertyKey to value. If any ECMAScript code must be executed to set the property value, Receiver is used as the this value when evaluating the code. Returns true if that the property value was set or false if that it could not be set.
[[Delete]] (propertyKey) Boolean Remove the own property whose key is propertyKey from this object . Return false if the property was not deleted and is still present. Return true if the property was deleted or is not present.
[[DefineOwnProperty]] (propertyKey,PropertyDescriptor)
Boolean
Create or alter the own property, whose key is propertyKey, to have the state described by PropertyDescriptor. Return true if that the property was successfully created/updated or false if the property could not be created or updated.
[[Enumerate]] ()Object Return an iterator object that produces the keys of the string-keyed enumerable properties of the object.
[[OwnPropertyKeys]] ()List of propertyKey Return a List whose elements are all of the own property keys for the object.

Table 6 summarizes additional essential internal methods that are supported by objects that may be called as functions. A function object is an object that supports the [[Call]] internal methods. A constructor (also referred to as a constructor function) is a function object that supports the [[Construct]] internal method.

Table 6 — Additional Essential Internal Methods of Function Objects
Internal Method Signature Description
[[Call]] (any, a List of any)
any
Executes code associated with this object. Invoked via a function call expression. The arguments to the internal method are a this value and a list containing the arguments passed to the function by a call expression. Objects that implement this internal method are callable.
[[Construct]] (a List of any, Object)
Object
Creates an object. Invoked via the new or super operators. The first arguments to the internal method is a list containing the arguments of the operator. The second argument is the object to which the new operator was initially applied. Objects that implement this internal method are called constructors. A Function object is not necessarily a constructor and such non-constructor Function objects do not have a [[Construct]] internal method.

The semantics of the essential internal methods for ordinary objects and standard exotic objects are specified in clause 9. If any specified use of an internal method of an exotic object is not supported by an implementation, that usage must throw a TypeError exception when attempted.

6.1.7.3 Invariants of the Essential Internal Methods

The Internal Methods of Objects of an ECMAScript engine must conform to the list of invariants specified below. Ordinary ECMAScript Objects as well as all standard exotic objects in this specification maintain these invariants. ECMAScript Proxy objects maintain these invariants by means of runtime checks on the result of traps invoked on the [[ProxyHandler]] object.

Any implementation provided exotic objects must also maintain these invariants for those objects. Violation of these invariants may cause ECMAScript code to have unpredictable behaviour and create security issues. However, violation of these invariants must never compromise the memory safety of an implementation.

An implementation must not allow these invariants to be circumvented in any manner such as by providing alternative interfaces that implement the functionality of the essential internal methods without enforcing their invariants.

Definitions:

● The target of an internal method is the object upon which the internal method is called.

● A target is non-extensible if it has been observed to return false from its [[IsExtensible]] internal method, or true from its [[PreventExtensions]] internal method.

● A non-existent property is a property that does not exist as an own property on a non-extensible target.

● All references to SameValue are according to the definition of SameValue algorithm specified in 7.2.9.

[[GetPrototypeOf]] ( )

● The Type of the return value must be either Object or Null.

● If target is non-extensible, and [[GetPrototypeOf]] returns a value v, then any future calls to [[GetPrototypeOf]] should return the SameValue as v.

NOTE An object’s prototype chain should have finite length (that is, starting from any object, recursively applying the [[GetPrototypeOf]] internal method to its result should eventually lead to the value null). However, this requirement is not enforceable as an object level invariant if the prototype chain includes any exotic objects that do not use the ordinary object definition of [[GetPrototypeOf]]. Such a circular prototype chain may result in infinite loops when accessing object properties.

[[SetPrototypeOf]] (V)

● The Type of the return value must be Boolean.

● If target is non-extensible, [[SetPrototypeOf]] must return false, unless V is the SameValue as the target’s observed [[GetPrototypeOf]] value.

[[PreventExtensions]] ( )

● The Type of the return value must be Boolean.

● If [[PreventExtensions]] returns true, all future calls to [[IsExtensible]] on the target must return false and the target is now considered non-extensible.

[[GetOwnProperty]] (P)

● The Type of the return value must be either Property Descriptor or Undefined.

● If the Type of the return value is Property Descriptor, the return value must be a complete property descriptor (see 6.2.4.6).

● If a property P is described as a data property with Desc.[[Value]] equal to v and Desc.[[Writable]] and Desc.[[Configurable]] are both false, then the SameValue must be returned for the Desc.[[Value]] attribute of the property on all future calls to [[GetOwnProperty]] ( P ).

● If P’s attributes other than [[Writable]] may change over time or if the property might disappear, then P’s [[Configurable]] attribute must be true.

● If the [[Writable]] attribute may change from false to true, then the [[Configurable]] attribute must be true.

● If the target is non-extensible and P is non-existent, then all future calls to [[GetOwnProperty]] (P) on the target must describe P as non-existent (i.e. [[GetOwnProperty]] (P) must return undefined).

NOTE As a consequence of the third invariant, if a property is described as a data property and it may return different values over time, then either or both of the Desc.[[Writable]] and Desc.[[Configurable]] attributes must be true even if no mechanism to change the value is exposed via the other internal methods.

[[DefineOwnProperty]] (P, Desc)

● The Type of the return value must be Boolean.

● [[DefineOwnProperty]] must return false if P has previously been observed as a non-configurable own property of the target, unless either:

1. P is a non-configurable writable own data property. A non-configurable writable data property can be changed into a non-configurable non-writable data property.

2. All attributes in Desc are the SameValue as P’s attributes.

● [[DefineOwnProperty]] (P, Desc) must return false if target is non-extensible and P is a non-existent own property. That is, a non-extensible target object cannot be extended with new properties.

[[HasProperty]] ( P )

● The Type of the return value must be Boolean.

● If P was previously observed as a non-configurable data or accessor own property of the target, [[HasProperty]] must return true.

[[Get]] (P, Receiver)

● If P was previously observed as a non-configurable, non-writable own data property of the target with value v, then [[Get]] must return the SameValue.

● If P was previously observed as a non-configurable own accessor property of the target whose [[Get]] attribute is undefined, the [[Get]] operation must return undefined.

[[Set]] ( P, V, Receiver)

● The Type of the return value must be Boolean.

● If P was previously observed as a non-configurable, non-writable own data property of the target, then [[Set]] must return false unless V is the SameValue as P’s [[Value]] attribute.

● If P was previously observed as a non-configurable own accessor property of the target whose [[Set]] attribute is undefined, the [[Set]] operation must return false.

[[Delete]] ( P )

● The Type of the return value must be Boolean.

● If P was previously observed to be a non-configurable own data or accessor property of the target, [[Delete]] must return false.

[[Enumerate]] ( )

● The Type of the return value must be Object.

[[OwnPropertyKeys]] ( )

● The return value must be a List.

●  The Type of each element of the returned List is either String or Symbol.

● The returned List must contain at least the keys of all non-configurable own properties that have previously been observed.

● If the object is non-extensible, the returned List must contain only the keys of all own properties of the object that are observable using [[GetOwnProperty]].

[[Construct]] ( )

● The Type of the return value must be Object.

6.1.7.4 Well-Known Intrinsic Objects

Well-known intrinsics are built-in objects that are explicitly referenced by the algorithms of this specification and which usually have Realm specific identities. Unless otherwise specified each intrinsic object actually corresponds to a set of similar objects, one per Realm.

Within this specification a reference such as %name% means the intrinsic object, associated with the current Realm, corresponding to the name. Determination of the current Realm and its intrinsics is described in 8.1.2.5. The well-known intrinsics are listed in Table 7.

Table 7 — Well-known Intrinsic Objects
Intrinsic Name Global Name ECMAScript Language Association
%Array% Array The Array constructor (22.1.1)
%ArrayBuffer% ArrayBuffer The ArrayBuffer constructor (24.1.2)
%ArrayBufferPrototype% ArrayBuffer.prototype The initial value of the prototype data property of %ArrayBuffer%.
%ArrayIteratorPrototype% The prototype of Array iterator objects (22.1.5)
%ArrayPrototype% Array.prototype The initial value of the prototype data property of %Array% (22.1.3)
%ArrayProto_values% Array.prototype.values The initial value of the values data property of %ArrayPrototype% (22.1.3.29)
%Boolean% Boolean The Boolean constructor (19.3.1)
%BooleanPrototype% Boolean.prototype The initial value of the prototype data property of %Boolean% (19.3.3)
%DataView% DataView The DataView constructor (24.2.2)
%DataViewPrototype% DataView.prototype The initial value of the prototype data property of %DataView%
%Date% Date The Date constructor (20.3.2)
%DatePrototype% Date.prototype The initial value of the prototype data property of %Date%.
%decodeURI% decodeURI The decodeURI function (18.2.6.2)
%decodeURIComponent% decodeURIComponent The decodeURIComponent function (18.2.6.3)
%encodeURI% encodeURI The encodeURI function (18.2.6.4)
%encodeURIComponent% encodeURIComponent The encodeURIComponent function (18.2.6.5)
%Error% Error The Error constructor (19.5.1)
%ErrorPrototype% Error.prototype The initial value of the prototype data property of %Error%
%eval% eval The eval function (18.2.1)
%EvalError% EvalError The EvalError constructor (19.5.5.1)
%EvalErrorPrototype% EvalError.prototype The initial value of the prototype property of %EvalError%
%Float32Array% Float32Array The Float32Array constructor (22.2)
%Float32ArrayPrototype% Float32Array.prototype The initial value of the prototype data property of %Float32Array%.
%Float64Array% Float64Array The Float64Array constructor (22.2)
%Float64ArrayPrototype% Float64Array.prototype The initial value of the prototype data property of %Float64Array%
%Function% Function The Function constructor (19.2.1)
%FunctionPrototype% Function.prototype The initial value of the prototype data property of %Function%
%Generator% The initial value of the prototype property of %GeneratorFunction%
%GeneratorFunction% The constructor of generator objects (25.2.1)
%GeneratorPrototype% The initial value of the prototype property of %Generator%
%Int8Array% Int8Array The Int8Array constructor (22.2)
%Int8ArrayPrototype% Int8Array.prototype The initial value of the prototype data property of %Int8Array%
%Int16Array% Int16Array The Int16Array constructor (22.2)
%Int16ArrayPrototype% Int16Array.prototype The initial value of the prototype data property of %Int16Array%
%Int32Array% Int32Array The Int32Array constructor (22.2)
%Int32ArrayPrototype% Int32Array.prototype The initial value of the prototype data property of %Int32Array%
%isFinite% isFinite The isFinite function (18.2.2)
%isNaN% isNaN The isNaN function (18.2.3)
%IteratorPrototype% An object that all standard built-in iterator objects indirectly inherit from
%JSON% JSON The JSON object (24.3)
%Map% Map The Map constructor (23.1.1)
%MapIteratorPrototype% The prototype of Map iterator objects (23.1.5)
%MapPrototype% Map.prototype The initial value of the prototype data property of %Map%
%Math% Math The Math object (20.2)
%Number% Number The Number constructor (20.1.1)
%NumberPrototype% Number.prototype The initial value of the prototype property of %Number%
%Object% Object The Object constructor (19.1.1)
%ObjectPrototype% Object.prototype The initial value of the prototype data property of %Object%. (19.1.3)
%ObjProto_toString% Object.prototype.
toString
The initial value of the toString data property of %ObjectPrototype% (19.1.3.6)
%parseFloat% parseFloat The parseFloat function (18.2.4)
%parseInt% parseInt The parseInt function (18.2.5)
%Promise% Promise The Promise constructor (25.4.3)
%PromisePrototype% Promise.prototype The initial value of the prototype data property of %Promise%
%Proxy% Proxy The Proxy constructor (26.2.1)
%RangeError% RangeError The RangeError constructor (19.5.5.2)
%RangeErrorPrototype% RangeError.prototype The initial value of the prototype property of %RangeError%
%ReferenceError% ReferenceError The ReferenceError constructor (19.5.5.3)
%ReferenceErrorPrototype% ReferenceError.
prototype
The initial value of the prototype property of %ReferenceError%
%Reflect% Reflect The Reflect object (26.1)
%RegExp% RegExp The RegExp constructor (21.2.3)
%RegExpPrototype% RegExp.prototype The initial value of the prototype data property of %RegExp%
%Set% Set The Set constructor (23.2.1)
%SetIteratorPrototype% The prototype of Set iterator objects (23.2.5)
%SetPrototype% Set.prototype The initial value of the prototype data property of %Set%
%String% String The String constructor (21.1.1)
%StringIteratorPrototype% The prototype of String iterator objects (21.1.5)
%StringPrototype% String.prototype The initial value of the prototype data property of %String%
%Symbol% Symbol The Symbol constructor (19.4.1)
%SymbolPrototype% Symbol.prototype The initial value of the prototype data property of %Symbol%. (19.4.3)
%SyntaxError% SyntaxError The SyntaxError constructor (19.5.5.4)
%SyntaxErrorPrototype% SyntaxError.prototype The initial value of the prototype property of %SyntaxError%
%ThrowTypeError% A function object that unconditionally throws a new instance of %TypeError%
%TypedArray% The super class of all typed Array constructors (22.2.1)
%TypedArrayPrototype% The initial value of the prototype property of %TypedArray%
%TypeError% TypeError The TypeError constructor (19.5.5.5)
%TypeErrorPrototype% TypeError.prototype The initial value of the prototype property of %TypeError%
%Uint8Array% Uint8Array The Uint8Array constructor (22.2)
%Uint8ArrayPrototype% Uint8Array.prototype The initial value of the prototype data property of %Uint8Array%
%Uint8ClampedArray% Uint8ClampedArray The Uint8ClampedArray constructor (22.2)
%Uint8ClampedArrayPrototype% Uint8ClampedArray.
prototype
The initial value of the prototype data property of %Uint8ClampedArray%
%Uint16Array% Uint16Array The Uint16Array constructor (22.2)
%Uint16ArrayPrototype% Uint16Array.prototype The initial value of the prototype data property of %Uint16Array%
%Uint32Array% Uint32Array The Uint32Array constructor (22.2)
%Uint32ArrayPrototype% Uint32Array.prototype The initial value of the prototype data property of %Uint32Array%
%URIError% URIError The URIError constructor (19.5.5.6)
%URIErrorPrototype% URIError.prototype The initial value of the prototype property of %URIError%
%WeakMap% WeakMap The WeakMap constructor (23.3.1)
%WeakMapPrototype% WeakMap.prototype The initial value of the prototype data property of %WeakMap%
%WeakSet% WeakSet The WeakSet constructor (23.4.1)
%WeakSetPrototype% WeakSet.prototype The initial value of the prototype data property of %WeakSet%

6.2 ECMAScript Specification Types

A specification type corresponds to meta-values that are used within algorithms to describe the semantics of ECMAScript language constructs and ECMAScript language types. The specification types are Reference, List, Completion, Property Descriptor, Lexical Environment, Environment Record, and Data Block. Specification type values are specification artefacts that do not necessarily correspond to any specific entity within an ECMAScript implementation. Specification type values may be used to describe intermediate results of ECMAScript expression evaluation but such values cannot be stored as properties of objects or values of ECMAScript language variables.

6.2.1 The List and Record Specification Type

The List type is used to explain the evaluation of argument lists (see 12.3.6) in new expressions, in function calls, and in other algorithms where a simple ordered list of values is needed. Values of the List type are simply ordered sequences of list elements containing the individual values. These sequences may be of any length. The elements of a list may be randomly accessed using 0-origin indices. For notational convenience an array-like syntax can be used to access List elements. For example, arguments[2] is shorthand for saying the 3rd element of the List arguments.

For notational convenience within this specification, a literal syntax can be used to express a new List value. For example, «1, 2» defines a List value that has two elements each of which is initialized to a specific value. A new empty List can be expressed as «».

The Record type is used to describe data aggregations within the algorithms of this specification. A Record type value consists of one or more named fields. The value of each field is either an ECMAScript value or an abstract value represented by a name associated with the Record type. Field names are always enclosed in double brackets, for example [[value]].

For notational convenience within this specification, an object literal-like syntax can be used to express a Record value. For example, {[[field1]]: 42, [[field2]]: false, [[field3]]: empty} defines a Record value that has three fields, each of which is initialized to a specific value. Field name order is not significant. Any fields that are not explicitly listed are considered to be absent.

In specification text and algorithms, dot notation may be used to refer to a specific field of a Record value. For example, if R is the record shown in the previous paragraph then R.[[field2]] is shorthand for “the field of R named [[field2]]”.

Schema for commonly used Record field combinations may be named, and that name may be used as a prefix to a literal Record value to identify the specific kind of aggregations that is being described. For example: PropertyDescriptor{[[Value]]: 42, [[Writable]]: false, [[Configurable]]: true}.

6.2.2 The Completion Record Specification Type

The Completion type is a Record used to explain the runtime propagation of values and control flow such as the behaviour of statements (break, continue, return and throw) that perform nonlocal transfers of control.

Values of the Completion type are Record values whose fields are defined as by Table 8.

Table 8 — Completion Record Fields
Field Value Meaning
[[type]] One of normal, break, continue, return, or throw The type of completion that occurred.
[[value]] any ECMAScript language value or empty The value that was produced.
[[target]] any ECMAScript string or empty The target label for directed control transfers.

The term “abrupt completion” refers to any completion with a [[type]] value other than normal.

6.2.2.1 NormalCompletion

The abstract operation NormalCompletion with a single argument, such as:

  1. Return NormalCompletion(argument).

Is a shorthand that is defined as follows:

  1. Return Completion{[[type]]: normal, [[value]]: argument, [[target]]:empty}.

6.2.2.2 Implicit Completion Values

The algorithms of this specification often implicitly return Completion Records whose [[type]] is normal. Unless it is otherwise obvious from the context, an algorithm statement that returns a value that is not a Completion Record, such as:

  1. Return "Infinity".

means the same thing as:

  1. Return NormalCompletion("Infinity").

However, if the value expression of a “return” statement is a Completion Record construction literal, the resulting Completion Record is returned. If the value expression is a call to an abstract operation, the “return” statement simply returns the Completion Record produced by the abstract operation.

The abstract operation Completion(completionRecord) is used to emphasize that a previously computed Completion Record is being returned. The Completion abstract operation takes a single argument, completionRecord, and performs the following steps: such as

  1. Assert: completionRecord is a Completion Record.
  2. Return completionRecord as the Completion Record of this abstract operation.

A “return” statement without a value in an algorithm step means the same thing as:

  1. Return NormalCompletion(undefined).

Any reference to a Completion Record value that is in a context that does not explicitly require a complete Completion Record value is equivalent to an explicit reference to the [[value]] field of the Completion Record value unless the Completion Record is an abrupt completion.

6.2.2.3 Throw an Exception

Algorithms steps that say to throw an exception, such as

  1. Throw a TypeError exception.

mean the same things as:

  1. Return Completion{[[type]]: throw, [[value]]: a newly created TypeError object, [[target]]:empty}.

6.2.2.4 ReturnIfAbrupt

Algorithms steps that say

  1. ReturnIfAbrupt(argument).

mean the same thing as:

  1. If argument is an abrupt completion, return argument.
  2. Else if argument is a Completion Record, let argument be argument.[[value]].

6.2.3 The Reference Specification Type

NOTE The Reference type is used to explain the behaviour of such operators as delete, typeof, the assignment operators, the super keyword and other language features. For example, the left-hand operand of an assignment is expected to produce a reference.

A Reference is a resolved name or property binding. A Reference consists of three components, the base value, the referenced name and the Boolean valued strict reference flag. The base value is either undefined, an Object, a Boolean, a String, a Symbol, a Number, or an Environment Record (8.1.1). A base value of undefined indicates that the Reference could not be resolved to a binding. The referenced name is a String or Symbol value.

A Super Reference is a Reference that is used to represents a name binding that was expressed using the super keyword. A Super Reference has an additional thisValue component and its base value will never be an Environment Record.

The following abstract operations are used in this specification to access the components of references:

  • GetBase(V). Returns the base value component of the reference V.

  • GetReferencedName(V). Returns the referenced name component of the reference V.

  • IsStrictReference(V). Returns the strict reference flag component of the reference V.

  • HasPrimitiveBase(V). Returns true if Type(base) is Boolean, String, Symbol, or Number.

  • IsPropertyReference(V). Returns true if either the base value is an object or HasPrimitiveBase(V) is true; otherwise returns false.

  • IsUnresolvableReference(V). Returns true if the base value is undefined and false otherwise.

  • IsSuperReference(V). Returns true if this reference has a thisValue component.

The following abstract operations are used in this specification to operate on references:

6.2.3.1 GetValue (V)

  1. ReturnIfAbrupt(V).
  2. If Type(V) is not Reference, return V.
  3. Let base be GetBase(V).
  4. If IsUnresolvableReference(V), throw a ReferenceError exception.
  5. If IsPropertyReference(V), then
    1. If HasPrimitiveBase(V) is true, then
      1. Assert: In this case, base will never be null or undefined.
      2. Let base be ToObject(base).
    2. Return base.[[Get]](GetReferencedName(V), GetThisValue(V)).
  6. Else base must be an Environment Record,
    1. Return base.GetBindingValue(GetReferencedName(V), IsStrictReference(V)) (see 8.1.1).

NOTE The object that may be created in step 5.a.ii is not accessible outside of the above abstract operation and the ordinary object [[Get]] internal method. An implementation might choose to avoid the actual creation of the object.

6.2.3.2 PutValue (V, W)

  1. ReturnIfAbrupt(V).
  2. ReturnIfAbrupt(W).
  3. If Type(V) is not Reference, throw a ReferenceError exception.
  4. Let base be GetBase(V).
  5. If IsUnresolvableReference(V), then
    1. If IsStrictReference(V) is true, then
      1. Throw ReferenceError exception.
    2. Let globalObj be GetGlobalObject().
    3. Return Set(globalObj,GetReferencedName(V), W, false).
  6. Else if IsPropertyReference(V), then
    1. If HasPrimitiveBase(V) is true, then
      1. Assert: In this case, base will never be null or undefined.
      2. Set base to ToObject(base).
    2. Let succeeded be base.[[Set]](GetReferencedName(V), W, GetThisValue(V)).
    3. ReturnIfAbrupt(succeeded).
    4. If succeeded is false and IsStrictReference(V) is true, throw a TypeError exception.
    5. Return.
  7. Else base must be an Environment Record.
    1. Return base.SetMutableBinding(GetReferencedName(V), W, IsStrictReference(V)) (see 8.1.1).

NOTE The object that may be created in step 6.a.ii is not accessible outside of the above algorithm and the ordinary object [[Set]] internal method. An implementation might choose to avoid the actual creation of that object.

6.2.3.3 GetThisValue (V)

  1. Assert: IsPropertyReference(V) is true.
  2. If IsSuperReference(V), then
    1. Return the value of the thisValue component of the reference V.
  3. Return GetBase(V).

6.2.3.4 InitializeReferencedBinding (V, W)

  1. ReturnIfAbrupt(V).
  2. ReturnIfAbrupt(W).
  3. Assert: Type(V) is Reference.
  4. Assert: IsUnresolvableReference(V) is false.
  5. Let base be GetBase(V).
  6. Assert: base is an Environment Record.
  7. Return base.InitializeBinding(GetReferencedName(V), W).

6.2.4 The Property Descriptor Specification Type

The Property Descriptor type is used to explain the manipulation and reification of Object property attributes. Values of the Property Descriptor type are Records. Each field’s name is an attribute name and its value is a corresponding attribute value as specified in 6.1.7.1. In addition, any field may be present or absent. The schema name used within this specification to tag literal descriptions of Property Descriptor records is “PropertyDescriptor”.

Property Descriptor values may be further classified as data Property Descriptors and accessor Property Descriptors based upon the existence or use of certain fields. A data Property Descriptor is one that includes any fields named either [[Value]] or [[Writable]]. An accessor Property Descriptor is one that includes any fields named either [[Get]] or [[Set]]. Any Property Descriptor may have fields named [[Enumerable]] and [[Configurable]]. A Property Descriptor value may not be both a data Property Descriptor and an accessor Property Descriptor; however, it may be neither. A generic Property Descriptor is a Property Descriptor value that is neither a data Property Descriptor nor an accessor Property Descriptor. A fully populated Property Descriptor is one that is either an accessor Property Descriptor or a data Property Descriptor and that has all of the fields that correspond to the property attributes defined in either Table 2 or Table 3.

The following abstract operations are used in this specification to operate upon Property Descriptor values:

6.2.4.1 IsAccessorDescriptor ( Desc )

When the abstract operation IsAccessorDescriptor is called with Property Descriptor Desc, the following steps are taken:

  1. If Desc is undefined, return false.
  2. If both Desc.[[Get]] and Desc.[[Set]] are absent, return false.
  3. Return true.

6.2.4.2 IsDataDescriptor ( Desc )

When the abstract operation IsDataDescriptor is called with Property Descriptor Desc, the following steps are taken:

  1. If Desc is undefined, return false.
  2. If both Desc.[[Value]] and Desc.[[Writable]] are absent, return false.
  3. Return true.

6.2.4.3 IsGenericDescriptor ( Desc )

When the abstract operation IsGenericDescriptor is called with Property Descriptor Desc, the following steps are taken:

  1. If Desc is undefined, return false.
  2. If IsAccessorDescriptor(Desc) and IsDataDescriptor(Desc) are both false, return true.
  3. Return false.

6.2.4.4 FromPropertyDescriptor ( Desc )

When the abstract operation FromPropertyDescriptor is called with Property Descriptor Desc, the following steps are taken:

  1. If Desc is undefined, return undefined.
  2. Let obj be ObjectCreate(%ObjectPrototype%).
  3. Assert: obj is an extensible ordinary object with no own properties.
  4. If Desc has a [[Value]] field, then
    1. Call CreateDataProperty(obj, "value", Desc.[[Value]]).
  5. If Desc has a [[Writable]] field, then
    1. Call CreateDataProperty(obj, "writable", Desc.[[Writable]]).
  6. If Desc has a [[Get]] field, then
    1. Call CreateDataProperty(obj, "get", Desc.[[Get]]).
  7. If Desc has a [[Set]] field, then
    1. Call CreateDataProperty(obj, "set", Desc.[[Set]])
  8. If Desc has an [[Enumerable]] field, then
    1. Call CreateDataProperty(obj, "enumerable", Desc.[[Enumerable]]).
  9. If Desc has a [[Configurable]] field, then
    1. Call CreateDataProperty(obj , "configurable", Desc.[[Configurable]]).
  10. Assert: all of the above CreateDataProperty operations return true.
  11. Return obj.

6.2.4.5 ToPropertyDescriptor ( Obj )

When the abstract operation ToPropertyDescriptor is called with object Obj, the following steps are taken:

  1. ReturnIfAbrupt(Obj).
  2. If Type(Obj) is not Object throw a TypeError exception.
  3. Let desc be a new Property Descriptor that initially has no fields.
  4. If HasProperty(Obj, "enumerable") is true, then
    1. Let enum be ToBoolean(Get(Obj, "enumerable")).
    2. ReturnIfAbrupt(enum).
    3. Set the [[Enumerable]] field of desc to enum.
  5. If HasProperty(Obj, "configurable") is true, then
    1. Let conf be ToBoolean(Get(Obj, "configurable")).
    2. ReturnIfAbrupt(conf).
    3. Set the [[Configurable]] field of desc to conf.
  6. If HasProperty(Obj, "value") is true, then
    1. Let value be Get(Obj, "value").
    2. ReturnIfAbrupt(value).
    3. Set the [[Value]] field of desc to value.
  7. If HasProperty(Obj, "writable") is true, then
    1. Let writable be ToBoolean(Get(Obj, "writable")).
    2. ReturnIfAbrupt(writable).
    3. Set the [[Writable]] field of desc to writable.
  8. If HasProperty(Obj, "get") is true, then
    1. Let getter be Get(Obj, "get").
    2. ReturnIfAbrupt(getter).
    3. If IsCallable(getter) is false and getter is not undefined, throw a TypeError exception.
    4. Set the [[Get]] field of desc to getter.
  9. If HasProperty(Obj, "set") is true, then
    1. Let setter be Get(Obj, "set").
    2. ReturnIfAbrupt(setter).
    3. If IsCallable(setter) is false and setter is not undefined, throw a TypeError exception.
    4. Set the [[Set]] field of desc to setter.
  10. If either desc.[[Get]] or desc.[[Set]] are present, then
    1. If either desc.[[Value]] or desc.[[Writable]] are present, throw a TypeError exception.
  11. Return desc.

6.2.4.6 CompletePropertyDescriptor ( Desc )

When the abstract operation CompletePropertyDescriptor is called with Property Descriptor Desc the following steps are taken:

  1. ReturnIfAbrupt(Desc).
  2. Assert: Desc is a Property Descriptor
  3. Let like be Record{[[Value]]: undefined, [[Writable]]: false, [[Get]]: undefined, [[Set]]: undefined, [[Enumerable]]: false, [[Configurable]]: false}.
  4. If either IsGenericDescriptor(Desc) or IsDataDescriptor(Desc) is true, then
    1. If Desc does not have a [[Value]] field, set Desc.[[Value]] to like.[[Value]].
    2. If Desc does not have a [[Writable]] field, set Desc.[[Writable]] to like.[[Writable]].
  5. Else,
    1. If Desc does not have a [[Get]] field, set Desc.[[Get]] to like.[[Get]].
    2. If Desc does not have a [[Set]] field, set Desc.[[Set]] to like.[[Set]].
  6. If Desc does not have an [[Enumerable]] field, set Desc.[[Enumerable]] to like.[[Enumerable]].
  7. If Desc does not have a [[Configurable]] field, set Desc.[[Configurable]] to like.[[Configurable]].
  8. Return Desc.

6.2.5 The Lexical Environment and Environment Record Specification Types

The Lexical Environment and Environment Record types are used to explain the behaviour of name resolution in nested functions and blocks. These types and the operations upon them are defined in 8.1.

6.2.6 Data Blocks

The Data Block specification type is used to describe a distinct and mutable sequence of byte-sized (8 bit) numeric values. A Data Block value is created with a fixed number of bytes that each have the initial value 0.

For notational convenience within this specification, an array-like syntax can be used to express to the individual bytes of a Data Block value. This notation presents a Data Block value as a 0-origined integer indexed sequence of bytes. For example, if db is a 5 byte Data Block value then db[2] can be used to express access to its 3rd byte.

The following abstract operations are used in this specification to operate upon Data Block values:

6.2.6.1 CreateByteDataBlock(size)

When the abstract operation CreateByteDataBlock is called with integer argument size, the following steps are taken:

  1. Assert: size≥0.
  2. Let db be a new Data Block value consisting of size bytes. If it is impossible to create such a Data Block, throw a RangeError exception.
  3. Set all of the bytes of db to 0.
  4. Return db.

6.2.6.2 CopyDataBlockBytes(toBlock, toIndex, fromBlock, fromIndex, count)

When the abstract operation CopyDataBlockBytes is called the following steps are taken:

  1. Assert: fromBlock and toBlock are distinct Data Block values.
  2. Assert: fromIndex, toIndex, and count are positive integer values.
  3. Let fromSize be the number of bytes in fromBlock.
  4. Assert: fromIndex+countfromSize.
  5. Let toSize be the number of bytes in toBlock.
  6. Assert: toIndex+counttoSize.
  7. Repeat, while count>0
    1. Set toBlock[toIndex] to the value of fromBlock[fromIndex].
    2. Increment toIndex and fromIndex each by 1.
    3. Decrement count by 1.
  8. Return NormalCompletion(empty)

7 Abstract Operations

These operations are not a part of the ECMAScript language; they are defined here to solely to aid the specification of the semantics of the ECMAScript language. Other, more specialized abstract operations are defined throughout this specification.

7.1 Type Conversion

The ECMAScript language implicitly performs automatic type conversion as needed. To clarify the semantics of certain constructs it is useful to define a set of conversion abstract operations. The conversion abstract operations are polymorphic; they can accept a value of any ECMAScript language type or of a Completion Record value. But no other specification types are used with these operations.

7.1.1 ToPrimitive ( input [, PreferredType] )

The abstract operation ToPrimitive takes an input argument and an optional argument PreferredType. The abstract operation ToPrimitive converts its input argument to a non-Object type. If an object is capable of converting to more than one primitive type, it may use the optional hint PreferredType to favour that type. Conversion occurs according to Table 9:

Table 9 — ToPrimitive Conversions
Input Type Result
Completion Record If input is an abrupt completion, return input. Otherwise return ToPrimitive(input.[[value]]) also passing the optional hint PreferredType.
Undefined Return input.
Null Return input.
Boolean Return input.
Number Return input.
String Return input.
Symbol Return input.
Object Perform the steps following this table.

When Type(input) is Object, the following steps are taken:

  1. If PreferredType was not passed, let hint be "default".
  2. Else if PreferredType is hint String, let hint be "string".
  3. Else PreferredType is hint Number, let hint be "number".
  4. Let exoticToPrim be GetMethod(input, @@toPrimitive).
  5. ReturnIfAbrupt(exoticToPrim).
  6. If exoticToPrim is not undefined, then
    1. Let result be Call(exoticToPrim, input, «hint»).
    2. ReturnIfAbrupt(result).
    3. If Type(result) is not Object, return result.
    4. Throw a TypeError exception.
  7. If hint is "default", let hint be "number".
  8. Return OrdinaryToPrimitive(input,hint).

When the abstract operation OrdinaryToPrimitive is called with arguments O and hint, the following steps are taken:

  1. Assert: Type(O) is Object
  2. Assert: Type(hint) is String and its value is either "string" or "number".
  3. If hint is "string", then
    1. Let methodNames be «"toString", "valueOf"».
  4. Else,
    1. Let methodNames be «"valueOf", "toString"».
  5. For each name in methodNames in List order, do
    1. Let method be Get(O, name).
    2. ReturnIfAbrupt(method).
    3. If IsCallable(method) is true, then
      1. Let result be Call(method, O).
      2. ReturnIfAbrupt(result).
      3. If Type(result) is not Object, return result.
  6. Throw a TypeError exception.

NOTE When ToPrimitive is called with no hint, then it generally behaves as if the hint were Number. However, objects may over-ride this behaviour by defining a @@toPrimitive method. Of the objects defined in this specification only Date objects (see 20.3.4.45) and Symbol objects (see 19.4.3.4) over-ride the default ToPrimitive behaviour. Date objects treat no hint as if the hint were String.

7.1.2 ToBoolean ( argument )

The abstract operation ToBoolean converts argument to a value of type Boolean according to Table 10:

Table 10 — ToBoolean Conversions
Argument Type Result
Completion Record If argument is an abrupt completion, return argument. Otherwise return ToBoolean(argument.[[value]]).
Undefined Return false.
Null Return false.
Boolean Return argument.
Number Return false if argument is +0, −0, or NaN; otherwise return true.
String Return false if argument is the empty String (its length is zero); otherwise return true.
Symbol Return true.
Object Return true.

7.1.3 ToNumber ( argument )

The abstract operation ToNumber converts argument to a value of type Number according to Table 11:

Table 11 — ToNumber Conversions
Argument Type Result
Completion Record If argument is an abrupt completion, return argument. Otherwise return ToNumber(argument.[[value]]).
Undefined Return NaN.
Null Return +0.
Boolean Return 1 if argument is true. Return +0 if argument is false.
Number Return argument (no conversion).
String See grammar and conversion algorithm below.
Symbol Throw a TypeError exception.
Object

Apply the following steps:

  1. Let primValue be ToPrimitive(argument, hint Number).
  2. Return ToNumber(primValue).

7.1.3.1 ToNumber Applied to the String Type

ToNumber applied to Strings applies the following grammar to the input String interpreted as a sequence of UTF-16 encoded code points (6.1.4). If the grammar cannot interpret the String as an expansion of StringNumericLiteral, then the result of ToNumber is NaN.

NOTE The terminal symbols of this grammar are all composed of Unicode BMP code points so the result will be NaN if the string contains the UTF-16 encoding of any supplementary code points or any unpaired surrogate code points

Syntax

StringNumericLiteral :::
StrWhiteSpaceopt
StrWhiteSpaceopt StrNumericLiteral StrWhiteSpaceopt
StrWhiteSpace :::
StrWhiteSpaceChar StrWhiteSpaceopt
StrWhiteSpaceChar :::
WhiteSpace
LineTerminator
StrNumericLiteral :::
StrDecimalLiteral
BinaryIntegerLiteral
OctalIntegerLiteral
HexIntegerLiteral
StrDecimalLiteral :::
StrUnsignedDecimalLiteral
+ StrUnsignedDecimalLiteral
- StrUnsignedDecimalLiteral
StrUnsignedDecimalLiteral :::
Infinity
DecimalDigits . DecimalDigitsopt ExponentPartopt
. DecimalDigits ExponentPartopt
DecimalDigits ExponentPartopt
DecimalDigits :::
DecimalDigit
DecimalDigits DecimalDigit
DecimalDigit ::: one of
0 1 2 3 4 5 6 7 8 9
ExponentPart :::
ExponentIndicator SignedInteger
ExponentIndicator ::: one of
e E
SignedInteger :::
DecimalDigits
+ DecimalDigits
- DecimalDigits

All grammar symbols not explicitly defined above have the definitions used in the Lexical Grammar for numeric literals (11.8.3)

NOTE Some differences should be noted between the syntax of a StringNumericLiteral and a NumericLiteral (see 11.8.3):

  • A StringNumericLiteral may include leading and/or trailing white space and/or line terminators.

  • A StringNumericLiteral that is decimal may have any number of leading 0 digits.

  • A StringNumericLiteral that is decimal may include a + or - to indicate its sign.

  • A StringNumericLiteral that is empty or contains only white space is converted to +0.

  • Infinity and –Infinity are recognized as a StringNumericLiteral but not as a NumericLiteral.

7.1.3.1.1 Runtime Semantics: MV’s

The conversion of a String to a Number value is similar overall to the determination of the Number value for a numeric literal (see 11.8.3), but some of the details are different, so the process for converting a String numeric literal to a value of Number type is given here. This value is determined in two steps: first, a mathematical value (MV) is derived from the String numeric literal; second, this mathematical value is rounded as described below. The MV on any grammar symbol, not provided below, is the MV for that symbol defined in 11.8.3.1.

  • The MV of StringNumericLiteral ::: [empty] is 0.

  • The MV of StringNumericLiteral ::: StrWhiteSpace is 0.

  • The MV of StringNumericLiteral ::: StrWhiteSpaceopt StrNumericLiteral StrWhiteSpaceopt is the MV of StrNumericLiteral, no matter whether white space is present or not.

  • The MV of StrNumericLiteral ::: StrDecimalLiteral is the MV of StrDecimalLiteral.

  • The MV of StrNumericLiteral ::: BinaryIntegerLiteral is the MV of BinaryIntegerLiteral.

  • The MV of StrNumericLiteral ::: OctalIntegerLiteral is the MV of OctalIntegerLiteral.

  • The MV of StrNumericLiteral ::: HexIntegerLiteral is the MV of HexIntegerLiteral.

  • The MV of StrDecimalLiteral ::: StrUnsignedDecimalLiteral is the MV of StrUnsignedDecimalLiteral.

  • The MV of StrDecimalLiteral ::: + StrUnsignedDecimalLiteral is the MV of StrUnsignedDecimalLiteral.

  • The MV of StrDecimalLiteral ::: - StrUnsignedDecimalLiteral is the negative of the MV of StrUnsignedDecimalLiteral. (Note that if the MV of StrUnsignedDecimalLiteral is 0, the negative of this MV is also 0. The rounding rule described below handles the conversion of this signless mathematical zero to a floating-point +0 or −0 as appropriate.)

  • The MV of StrUnsignedDecimalLiteral ::: Infinity is 1010000 (a value so large that it will round to +∞).

  • The MV of StrUnsignedDecimalLiteral ::: DecimalDigits . is the MV of DecimalDigits.

  • The MV of StrUnsignedDecimalLiteral ::: DecimalDigits . DecimalDigits is the MV of the first DecimalDigits plus (the MV of the second DecimalDigits times 10n), where n is the number of code points in the second DecimalDigits.

  • The MV of StrUnsignedDecimalLiteral ::: DecimalDigits . ExponentPart is the MV of DecimalDigits times 10e, where e is the MV of ExponentPart.

  • The MV of StrUnsignedDecimalLiteral ::: DecimalDigits . DecimalDigits ExponentPart is (the MV of the first DecimalDigits plus (the MV of the second DecimalDigits times 10n)) times 10e, where n is the number of code points in the second DecimalDigits and e is the MV of ExponentPart.

  • The MV of StrUnsignedDecimalLiteral ::: . DecimalDigits is the MV of DecimalDigits times 10n, where n is the number of code points in DecimalDigits.

  • The MV of StrUnsignedDecimalLiteral ::: . DecimalDigits ExponentPart is the MV of DecimalDigits times 10en, where n is the number of code points in DecimalDigits and e is the MV of ExponentPart.

  • The MV of StrUnsignedDecimalLiteral ::: DecimalDigits is the MV of DecimalDigits.

  • The MV of StrUnsignedDecimalLiteral ::: DecimalDigits ExponentPart is the MV of DecimalDigits times 10e, where e is the MV of ExponentPart.

Once the exact MV for a String numeric literal has been determined, it is then rounded to a value of the Number type. If the MV is 0, then the rounded value is +0 unless the first non white space code point in the String numeric literal is ‘-’, in which case the rounded value is −0. Otherwise, the rounded value must be the Number value for the MV (in the sense defined in 6.1.6), unless the literal includes a StrUnsignedDecimalLiteral and the literal has more than 20 significant digits, in which case the Number value may be either the Number value for the MV of a literal produced by replacing each significant digit after the 20th with a 0 digit or the Number value for the MV of a literal produced by replacing each significant digit after the 20th with a 0 digit and then incrementing the literal at the 20th digit position. A digit is significant if it is not part of an ExponentPart and

  • it is not 0; or
  • there is a nonzero digit to its left and there is a nonzero digit, not in the ExponentPart, to its right.

7.1.4 ToInteger ( argument )

The abstract operation ToInteger converts argument to an integral numeric value. This abstract operation functions as follows:

  1. Let number be ToNumber(argument).
  2. ReturnIfAbrupt(number).
  3. If number is NaN, return +0.
  4. If number is +0, −0, +∞, or −∞, return number.
  5. Return the number value that is the same sign as number and whose magnitude is floor(abs(number)).

7.1.5 ToInt32 ( argument )

The abstract operation ToInt32 converts argument to one of 232 integer values in the range −231 through 231−1, inclusive. This abstract operation functions as follows:

  1. Let number be ToNumber(argument).
  2. ReturnIfAbrupt(number).
  3. If number is NaN, +0, −0, +∞, or −∞, return +0.
  4. Let int be the mathematical value that is the same sign as number and whose magnitude is floor(abs(number)).
  5. Let int32bit be int modulo 232.
  6. If int32bit ≥ 231, return int32bit − 232, otherwise return int32bit.

NOTE Given the above definition of ToInt32:

  • The ToInt32 abstract operation is idempotent: if applied to a result that it produced, the second application leaves that value unchanged.

  • ToInt32(ToUint32(x)) is equal to ToInt32(x) for all values of x. (It is to preserve this latter property that + and − are mapped to +0.)

  • ToInt32 maps −0 to +0.

7.1.6 ToUint32 ( argument )

The abstract operation ToUint32 converts argument to one of 232 integer values in the range 0 through 232−1, inclusive. This abstract operation functions as follows:

  1. Let number be ToNumber(argument).
  2. ReturnIfAbrupt(number).
  3. If number is NaN, +0, −0, +∞, or −∞, return +0.
  4. Let int be the mathematical value that is the same sign as number and whose magnitude is floor(abs(number)).
  5. Let int32bit be int modulo 232.
  6. Return int32bit.

NOTE Given the above definition of ToUint32:

  • Step 6 is the only difference between ToUint32 and ToInt32.

  • The ToUint32 abstract operation is idempotent: if applied to a result that it produced, the second application leaves that value unchanged.

  • ToUint32(ToInt32(x)) is equal to ToUint32(x) for all values of x. (It is to preserve this latter property that +∞ and −∞ are mapped to +0.)

  • ToUint32 maps −0 to +0.

7.1.7 ToInt16 ( argument )

The abstract operation ToInt16 converts argument to one of 216 integer values in the range −32768 through 32767, inclusive. This abstract operation functions as follows:

  1. Let number be ToNumber(argument).
  2. ReturnIfAbrupt(number).
  3. If number is NaN, +0, −0, +∞, or −∞, return +0.
  4. Let int be the mathematical value that is the same sign as number and whose magnitude is floor(abs(number)).
  5. Let int16bit be int modulo 216.
  6. If int16bit ≥ 215, return int16bit − 216, otherwise return int16bit.

7.1.8 ToUint16 ( argument )

The abstract operation ToUint16 converts argument to one of 216 integer values in the range 0 through 216−1, inclusive. This abstract operation functions as follows:

  1. Let number be ToNumber(argument).
  2. ReturnIfAbrupt(number).
  3. If number is NaN, +0, −0, +∞, or −∞, return +0.
  4. Let int be the mathematical value that is the same sign as number and whose magnitude is floor(abs(number)).
  5. Let int16bit be int modulo 216.
  6. Return int16bit.

NOTE Given the above definition of ToUint16:

  • The substitution of 216 for 232 in step 5 is the only difference between ToUint32 and ToUint16.
  • ToUint16 maps −0 to +0.

7.1.9 ToInt8 ( argument )

The abstract operation ToInt8 converts argument to one of 28 integer values in the range −128 through 127, inclusive. This abstract operation functions as follows:

  1. Let number be ToNumber(argument).
  2. ReturnIfAbrupt(number).
  3. If number is NaN, +0, −0, +∞, or −∞, return +0.
  4. Let int be the mathematical value that is the same sign as number and whose magnitude is floor(abs(number)).
  5. Let int8bit be int modulo 28.
  6. If int8bit ≥ 27, return int8bit − 28, otherwise return int8bit.

7.1.10 ToUint8 ( argument )

The abstract operation ToUint8 converts argument to one of 28 integer values in the range 0 through 255, inclusive. This abstract operation functions as follows:

  1. Let number be ToNumber(argument).
  2. ReturnIfAbrupt(number).
  3. If number is NaN, +0, −0, +&ininfin;, or −∞, return +0.
  4. Let int be the mathematical value that is the same sign as number and whose magnitude is floor(abs(number)).
  5. Let int8bit be int modulo 28.
  6. Return int8bit.

7.1.11 ToUint8Clamp ( argument )

The abstract operation ToUint8Clamp converts argument to one of 28 integer values in the range 0 through 255, inclusive. This abstract operation functions as follows:

  1. Let number be ToNumber(argument).
  2. ReturnIfAbrupt(number).
  3. If number is NaN, return +0.
  4. If number ≤ 0, return +0.
  5. If number ≥ 255, return 255.
  6. Let f be floor(number).
  7. If f + 0.5 < number, return f + 1.
  8. If number < f + 0.5, return f.
  9. If f is odd, return f + 1.
  10. Return f.

NOTE Note that unlike the other ECMAScript integer conversion abstract operation, ToUint8Clamp rounds rather than truncates non-integer values and does not convert + to 0. ToUint8Clamp does “round half to even” tie-breaking. This differs from Math.round which does “round half up” tie-breaking.

7.1.12 ToString ( argument )

The abstract operation ToString converts argument to a value of type String according to Table 12:

Table 12 — ToString Conversions
Argument Type Result
Completion Record If argument is an abrupt completion, return argument. Otherwise return ToString(argument.[[value]]).
Undefined Return "undefined".
Null Return "null".
Boolean

If argument is true, return "true".

If argument is false, return "false".

Number See 7.1.12.1.
String Return argument.
Symbol Throw a TypeError exception.
Object

Apply the following steps:

1. Let primValue be ToPrimitive(argument, hint String).

2. Return ToString(primValue).

7.1.12.1 ToString Applied to the Number Type

The abstract operation ToString converts a Number m to String format as follows:

  1. If m is NaN, return the String "NaN".
  2. If m is +0 or −0, return the String "0".
  3. If m is less than zero, return the String concatenation of the String "-" and ToString(−m).
  4. If m is +∞, return the String "Infinity".
  5. Otherwise, let n, k, and s be integers such that k ≥ 1, 10k−1s < 10k, the Number value for s × 10n−k is m, and k is as small as possible. Note that k is the number of digits in the decimal representation of s, that s is not divisible by 10, and that the least significant digit of s is not necessarily uniquely determined by these criteria.
  6. If kn ≤ 21, return the String consisting of the code units of the k digits of the decimal representation of s (in order, with no leading zeroes), followed by n−k occurrences of the code unit 0x0030 (DIGIT ZERO).
  7. If 0 < n ≤ 21, return the String consisting of the code units of the most significant n digits of the decimal representation of s, followed by the code unit 0x002E (FULL STOP), followed by the code units of the remaining k−n digits of the decimal representation of s.
  8. If −6 < n ≤ 0, return the String consisting of the code unit 0x0030 (DIGIT ZERO), followed by the code unit 0x002E (FULL STOP), followed by −n occurrences of the code unit 0x0030 (DIGIT ZERO), followed by the code units of the k digits of the decimal representation of s.
  9. Otherwise, if k = 1, return the String consisting of the code unit of the single digit of s, followed by code unit 0x0065 (LATIN SMALL LETTER E), followed by the code unit 0x002B (PLUS SIGN) or the code unit 0x002D (HYPHEN-MINUS) according to whether n−1 is positive or negative, followed by the code units of the decimal representation of the integer abs(n−1) (with no leading zeroes).
  10. Return the String consisting of the code units of the most significant digit of the decimal representation of s, followed by code unit 0x002E (FULL STOP), followed by the code units of the remaining k−1 digits of the decimal representation of s, followed by code unit 0x0065 (LATIN SMALL LETTER E), followed by code unit 0x002B (PLUS SIGN) or the code unit 0x002D (HYPHEN-MINUS) according to whether n−1 is positive or negative, followed by the code units of the decimal representation of the integer abs(n−1) (with no leading zeroes).

NOTE 1 The following observations may be useful as guidelines for implementations, but are not part of the normative requirements of this Standard:

  • If x is any Number value other than −0, then ToNumber(ToString(x)) is exactly the same Number value as x.

  • The least significant digit of s is not always uniquely determined by the requirements listed in step 5.

NOTE 2 For implementations that provide more accurate conversions than required by the rules above, it is recommended that the following alternative version of step 5 be used as a guideline:

Otherwise, let n, k, and s be integers such that k ≥ 1, 10k−1s < 10k, the Number value for s × 10nk is m, and k is as small as possible. If there are multiple possibilities for s, choose the value of s for which s × 10nk is closest in value to m. If there are two such possible values of s, choose the one that is even. Note that k is the number of digits in the decimal representation of s and that s is not divisible by 10.

NOTE 3 Implementers of ECMAScript may find useful the paper and code written by David M. Gay for binary-to-decimal conversion of floating-point numbers:

Gay, David M. Correctly Rounded Binary-Decimal and Decimal-Binary Conversions. Numerical Analysis, Manuscript 90-10. AT&T Bell Laboratories (Murray Hill, New Jersey). November 30, 1990. Available as
http://cm.bell-labs.com/cm/cs/doc/90/4-10.ps.gz. Associated code available as
http://netlib.sandia.gov/fp/dtoa.c and as
http://netlib.sandia.gov/fp/g_fmt.c and may also be found at the various netlib mirror sites.

7.1.13 ToObject ( argument )

The abstract operation ToObject converts argument to a value of type Object according to Table 13:

Table 13 — ToObject Conversions
Argument Type Result
Completion Record If argument is an abrupt completion, return argument. Otherwise return ToObject(argument.[[value]]).
Undefined Throw a TypeError exception.
Null Throw a TypeError exception.
Boolean Return a new Boolean object whose [[BooleanData]] internal slot is set to the value of argument. See 19.3 for a description of Boolean objects.
Number Return a new Number object whose [[NumberData]] internal slot is set to the value of argument. See 20.1 for a description of Number objects.
String Return a new String object whose [[StringData]] internal slot is set to the value of argument. See 21.1 for a description of String objects.
Symbol Return a new Symbol object whose [[SymbolData]] internal slot is set to the value of argument. See 19.4 for a description of Symbol objects.
Object Return argument.

7.1.14 ToPropertyKey ( argument )

The abstract operation ToPropertyKey converts argument to a value that can be used as a property key by performing the following steps:

  1. Let key be ToPrimitive(argument, hint String).
  2. ReturnIfAbrupt(key).
  3. If Type(key) is Symbol, then
    1. Return key.
  4. Return ToString(key).

7.1.15 ToLength ( argument )

The abstract operation ToLength converts argument to an integer suitable for use as the length of an array-like object. It performs the following steps:

  1. ReturnIfAbrupt(argument).
  2. Let len be ToInteger(argument).
  3. ReturnIfAbrupt(len).
  4. If len ≤ +0, return +0.
  5. If len is +∞, return 253-1.
  6. Return min(len, 253-1).

7.1.16 CanonicalNumericIndexString ( argument )

The abstract operation CanonicalNumericIndexString returns argument converted to a numeric value if it is a String representation of a Number that would be produced by ToString, or the string "-0". Otherwise, it returns undefined. This abstract operation functions as follows:

  1. Assert: Type(argument) is String.
  2. If argument is "-0", return −0.
  3. Let n be ToNumber(argument).
  4. If SameValue(ToString(n), argument) is false, return undefined.
  5. Return n.

A canonical numeric string is any String value for which the CanonicalNumericIndexString abstract operation does not return undefined.

7.2 Testing and Comparison Operations

7.2.1 RequireObjectCoercible ( argument )

The abstract operation RequireObjectCoercible throws an error if argument is a value that cannot be converted to an Object using ToObject. It is defined by Table 14:

Table 14 — RequireObjectCoercible Results
Argument Type Result
Completion Record If argument is an abrupt completion, return argument. Otherwise return RequireObjectCoercible(argument.[[value]]).
Undefined Throw a TypeError exception.
Null Throw a TypeError exception.
Boolean Return argument.
Number Return argument.
String Return argument.
Symbol Return argument.
Object Return argument.

7.2.2 IsArray ( argument )

The abstract operation IsArray takes one argument argument, and performs the following steps:

  1. If Type(argument) is not Object, return false.
  2. If argument is an Array exotic object, return true.
  3. If argument is a Proxy exotic object, then
    1. If the value of the [[ProxyHandler]] internal slot of argument is null, throw a TypeError exception.
    2. Let target be the value of the [[ProxyTarget]] internal slot of argument.
    3. Return IsArray(target).
  4. Return false.

7.2.3 IsCallable ( argument )

The abstract operation IsCallable determines if argument, which must be an ECMAScript language value or a Completion Record, is a callable function with a [[Call]] internal method.

  1. ReturnIfAbrupt(argument).
  2. If Type(argument) is not Object, return false.
  3. If argument has a [[Call]] internal method, return true.
  4. Return false.

7.2.4 IsConstructor ( argument )

The abstract operation IsConstructor determines if argument, which must be an ECMAScript language value or a Completion Record, is a function object with a [[Construct]] internal method.

  1. ReturnIfAbrupt(argument).
  2. If Type(argument) is not Object, return false.
  3. If argument has a [[Construct]] internal method, return true.
  4. Return false.

7.2.5 IsExtensible (O)

The abstract operation IsExtensible is used to determine whether additional properties can be added to the object that is O. A Boolean value is returned. This abstract operation performs the following steps:

  1. Assert: Type(O) is Object.
  2. Return O.[[IsExtensible]]().

7.2.6 IsInteger ( argument )

The abstract operation IsInteger determines if argument is a finite integer numeric value.

  1. ReturnIfAbrupt(argument).
  2. If Type(argument) is not Number, return false.
  3. If argument is NaN, +∞, or −∞, return false.
  4. If floor(abs(argument)) ≠ abs(argument), return false.
  5. Return true.

7.2.7 IsPropertyKey ( argument )

The abstract operation IsPropertyKey determines if argument, which must be an ECMAScript language value or a Completion Record, is a value that may be used as a property key.

  1. ReturnIfAbrupt(argument).
  2. If Type(argument) is String, return true.
  3. If Type(argument) is Symbol, return true.
  4. Return false.

7.2.8 IsRegExp ( argument )

The abstract operation IsRegExp with argument argument performs the following steps:

  1. If Type(argument) is not Object, return false.
  2. Let isRegExp be Get(argument, @@match).
  3. ReturnIfAbrupt(isRegExp).
  4. If isRegExp is not undefined, return ToBoolean(isRegExp).
  5. If argument has a [[RegExpMatcher]] internal slot, return true.
  6. Return false.

7.2.9 SameValue(x, y)

The internal comparison abstract operation SameValue(x, y), where x and y are ECMAScript language values, produces true or false. Such a comparison is performed as follows:

  1. ReturnIfAbrupt(x).
  2. ReturnIfAbrupt(y).
  3. If Type(x) is different from Type(y), return false.
  4. If Type(x) is Undefined, return true.
  5. If Type(x) is Null, return true.
  6. If Type(x) is Number, then
    1. If x is NaN and y is NaN, return true.
    2. If x is +0 and y is -0, return false.
    3. If x is -0 and y is +0, return false.
    4. If x is the same Number value as y, return true.
    5. Return false.
  7. If Type(x) is String, then
    1. If x and y are exactly the same sequence of code units (same length and same code units at corresponding indices) return true; otherwise, return false.
  8. If Type(x) is Boolean, then
    1. If x and y are both true or both false, return true; otherwise, return false.
  9. If Type(x) is Symbol, then
    1. If x and y are both the same Symbol value, return true; otherwise, return false.
  10. Return true if x and y are the same Object value. Otherwise, return false.

7.2.10 SameValueZero(x, y)

The internal comparison abstract operation SameValueZero(x, y), where x and y are ECMAScript language values, produces true or false. Such a comparison is performed as follows:

  1. ReturnIfAbrupt(x).
  2. ReturnIfAbrupt(y).
  3. If Type(x) is different from Type(y), return false.
  4. If Type(x) is Undefined, return true.
  5. If Type(x) is Null, return true.
  6. If Type(x) is Number, then
    1. If x is NaN and y is NaN, return true.
    2. If x is +0 and y is -0, return true.
    3. If x is -0 and y is +0, return true.
    4. If x is the same Number value as y, return true.
    5. Return false.
  7. If Type(x) is String, then
    1. If x and y are exactly the same sequence of code units (same length and same code units at corresponding indices) return true; otherwise, return false.
  8. If Type(x) is Boolean, then
    1. If x and y are both true or both false, return true; otherwise, return false.
  9. If Type(x) is Symbol, then
    1. If x and y are both the same Symbol value, return true; otherwise, return false.
  10. Return true if x and y are the same Object value. Otherwise, return false.

NOTE SameValueZero differs from SameValue only in its treatment of +0 and -0.

7.2.11 Abstract Relational Comparison

The comparison x < y, where x and y are values, produces true, false, or undefined (which indicates that at least one operand is NaN). In addition to x and y the algorithm takes a Boolean flag named LeftFirst as a parameter. The flag is used to control the order in which operations with potentially visible side-effects are performed upon x and y. It is necessary because ECMAScript specifies left to right evaluation of expressions. The default value of LeftFirst is true and indicates that the x parameter corresponds to an expression that occurs to the left of the y parameter’s corresponding expression. If LeftFirst is false, the reverse is the case and operations must be performed upon y before x. Such a comparison is performed as follows:

  1. ReturnIfAbrupt(x).
  2. ReturnIfAbrupt(y).
  3. If the LeftFirst flag is true, then
    1. Let px be ToPrimitive(x, hint Number).
    2. ReturnIfAbrupt(px).
    3. Let py be ToPrimitive(y, hint Number).
    4. ReturnIfAbrupt(py).
  4. Else the order of evaluation needs to be reversed to preserve left to right evaluation
    1. Let py be ToPrimitive(y, hint Number).
    2. ReturnIfAbrupt(py).
    3. Let px be ToPrimitive(x, hint Number).
    4. ReturnIfAbrupt(px).
  5. If both px and py are Strings, then
    1. If py is a prefix of px, return false. (A String value p is a prefix of String value q if q can be the result of concatenating p and some other String r. Note that any String is a prefix of itself, because r may be the empty String.)
    2. If px is a prefix of py, return true.
    3. Let k be the smallest nonnegative integer such that the code unit at index k within px is different from the code unit at index k within py. (There must be such a k, for neither String is a prefix of the other.)
    4. Let m be the integer that is the code unit value at index k within px.
    5. Let n be the integer that is the code unit value at index k within py.
    6. If m < n, return true. Otherwise, return false.
  6. Else,
    1. Let nx be ToNumber(px). Because px and py are primitive values evaluation order is not important.
    2. ReturnIfAbrupt(nx).
    3. Let ny be ToNumber(py).
    4. ReturnIfAbrupt(ny).
    5. If nx is NaN, return undefined.
    6. If ny is NaN, return undefined.
    7. If nx and ny are the same Number value, return false.
    8. If nx is +0 and ny is −0, return false.
    9. If nx is −0 and ny is +0, return false.
    10. If nx is +∞, return false.
    11. If ny is +∞, return true.
    12. If ny is −∞, return false.
    13. If nx is −∞, return true.
    14. If the mathematical value of nx is less than the mathematical value of ny —note that these mathematical values are both finite and not both zero—return true. Otherwise, return false.

NOTE 1 Step 5 differs from step 11 in the algorithm for the addition operator + (12.7.3) in using “and” instead of “or”.

NOTE 2 The comparison of Strings uses a simple lexicographic ordering on sequences of code unit values. There is no attempt to use the more complex, semantically oriented definitions of character or string equality and collating order defined in the Unicode specification. Therefore String values that are canonically equal according to the Unicode standard could test as unequal. In effect this algorithm assumes that both Strings are already in normalized form. Also, note that for strings containing supplementary characters, lexicographic ordering on sequences of UTF-16 code unit values differs from that on sequences of code point values.

7.2.12 Abstract Equality Comparison

The comparison x == y, where x and y are values, produces true or false. Such a comparison is performed as follows:

  1. ReturnIfAbrupt(x).
  2. ReturnIfAbrupt(y).
  3. If Type(x) is the same as Type(y), then
    1. Return the result of performing Strict Equality Comparison x === y.
  4. If x is null and y is undefined, return true.
  5. If x is undefined and y is null, return true.
  6. If Type(x) is Number and Type(y) is String,
    return the result of the comparison x == ToNumber(y).
  7. If Type(x) is String and Type(y) is Number,
    return the result of the comparison ToNumber(x) == y.
  8. If Type(x) is Boolean, return the result of the comparison ToNumber(x) == y.
  9. If Type(y) is Boolean, return the result of the comparison x == ToNumber(y).
  10. If Type(x) is either String, Number, or Symbol and Type(y) is Object, then
    return the result of the comparison x == ToPrimitive(y).
  11. If Type(x) is Object and Type(y) is either String, Number, or Symbol, then
    return the result of the comparison ToPrimitive(x) == y.
  12. Return false.

7.2.13 Strict Equality Comparison

The comparison x === y, where x and y are values, produces true or false. Such a comparison is performed as follows:

  1. If Type(x) is different from Type(y), return false.
  2. If Type(x) is Undefined, return true.
  3. If Type(x) is Null, return true.
  4. If Type(x) is Number, then
    1. If x is NaN, return false.
    2. If y is NaN, return false.
    3. If x is the same Number value as y, return true.
    4. If x is +0 and y is −0, return true.
    5. If x is −0 and y is +0, return true.
    6. Return false.
  5. If Type(x) is String, then
    1. If x and y are exactly the same sequence of code units (same length and same code units at corresponding indices), return true.
    2. Else, return false.
  6. If Type(x) is Boolean, then
    1. If x and y are both true or both false, return true.
    2. Else, return false.
  7. If x and y are the same Symbol value, return true.
  8. If x and y are the same Object value, return true.
  9. Return false.

NOTE This algorithm differs from the SameValue Algorithm (7.2.9) in its treatment of signed zeroes and NaNs.

7.3 Operations on Objects

7.3.1 Get (O, P)

The abstract operation Get is used to retrieve the value of a specific property of an object. The operation is called with arguments O and P where O is the object and P is the property key. This abstract operation performs the following steps:

  1. Assert: Type(O) is Object.
  2. Assert: IsPropertyKey(P) is true.
  3. Return O.[[Get]](P, O).

7.3.2 GetV (V, P)

The abstract operation GetV is used to retrieve the value of a specific property of an ECMAScript language value. If the value is not an object, the property lookup is performed using a wrapper object appropriate for the type of the value. The operation is called with arguments V and P where V is the value and P is the property key. This abstract operation performs the following steps:

  1. Assert: IsPropertyKey(P) is true.
  2. Let O be ToObject(V).
  3. ReturnIfAbrupt(O).
  4. Return O.[[Get]](P, V).

7.3.3 Set (O, P, V, Throw)

The abstract operation Set is used to set the value of a specific property of an object. The operation is called with arguments O, P, V, and Throw where O is the object, P is the property key, V is the new value for the property and Throw is a Boolean flag. This abstract operation performs the following steps:

  1. Assert: Type(O) is Object.
  2. Assert: IsPropertyKey(P) is true.
  3. Assert: Type(Throw) is Boolean.
  4. Let success be O.[[Set]](P, V, O).
  5. ReturnIfAbrupt(success).
  6. If success is false and Throw is true, throw a TypeError exception.
  7. Return success.

7.3.4 CreateDataProperty (O, P, V)

The abstract operation CreateDataProperty is used to create a new own property of an object. The operation is called with arguments O, P, and V where O is the object, P is the property key, and V is the value for the property. This abstract operation performs the following steps:

  1. Assert: Type(O) is Object.
  2. Assert: IsPropertyKey(P) is true.
  3. Let newDesc be the PropertyDescriptor{[[Value]]: V, [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true}.
  4. Return O.[[DefineOwnProperty]](P, newDesc).

NOTE This abstract operation creates a property whose attributes are set to the same defaults used for properties created by the ECMAScript language assignment operator. Normally, the property will not already exist. If it does exist and is not configurable or if O is not extensible, [[DefineOwnProperty]] will return false.

7.3.5 CreateMethodProperty (O, P, V)

The abstract operation CreateMethodProperty is used to create a new own property of an object. The operation is called with arguments O, P, and V where O is the object, P is the property key, and V is the value for the property. This abstract operation performs the following steps:

  1. Assert: Type(O) is Object.
  2. Assert: IsPropertyKey(P) is true.
  3. Let newDesc be the PropertyDescriptor{[[Value]]: V, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true}.
  4. Return O.[[DefineOwnProperty]](P, newDesc).

NOTE This abstract operation creates a property whose attributes are set to the same defaults used for built-in methods and methods defined using class declaration syntax. Normally, the property will not already exist. If it does exist and is not configurable or if O is not extensible, [[DefineOwnProperty]] will return false.

7.3.6 CreateDataPropertyOrThrow (O, P, V)

The abstract operation CreateDataPropertyOrThrow is used to create a new own property of an object. It throws a TypeError exception if the requested property update cannot be performed. The operation is called with arguments O, P, and V where O is the object, P is the property key, and V is the value for the property. This abstract operation performs the following steps:

  1. Assert: Type(O) is Object.
  2. Assert: IsPropertyKey(P) is true.
  3. Let success be CreateDataProperty(O, P, V).
  4. ReturnIfAbrupt(success).
  5. If success is false, throw a TypeError exception.
  6. Return success.

NOTE This abstract operation creates a property whose attributes are set to the same defaults used for properties created by the ECMAScript language assignment operator. Normally, the property will not already exist. If it does exist and is not configurable or if O is not extensible, [[DefineOwnProperty]] will return false causing this operation to throw a TypeError exception.

7.3.7 DefinePropertyOrThrow (O, P, desc)

The abstract operation DefinePropertyOrThrow is used to call the [[DefineOwnProperty]] internal method of an object in a manner that will throw a TypeError exception if the requested property update cannot be performed. The operation is called with arguments O, P, and desc where O is the object, P is the property key, and desc is the Property Descriptor for the property. This abstract operation performs the following steps:

  1. Assert: Type(O) is Object.
  2. Assert: IsPropertyKey(P) is true.
  3. Let success be O.[[DefineOwnProperty]](P, desc).
  4. ReturnIfAbrupt(success).
  5. If success is false, throw a TypeError exception.
  6. Return success.

7.3.8 DeletePropertyOrThrow (O, P)

The abstract operation DeletePropertyOrThrow is used to remove a specific own property of an object. It throws an exception if the property is not configurable. The operation is called with arguments O and P where O is the object and P is the property key. This abstract operation performs the following steps:

  1. Assert: Type(O) is Object.
  2. Assert: IsPropertyKey(P) is true.
  3. Let success be O.[[Delete]](P).
  4. ReturnIfAbrupt(success).
  5. If success is false, throw a TypeError exception.
  6. Return success.

7.3.9 GetMethod (O, P)

The abstract operation GetMethod is used to get the value of a specific property of an object when the value of the property is expected to be a function. The operation is called with arguments O and P where O is the object, P is the property key. This abstract operation performs the following steps:

  1. Assert: IsPropertyKey(P) is true.
  2. Let func be GetV(O, P).
  3. ReturnIfAbrupt(func).
  4. If func is either undefined or null, return undefined.
  5. If IsCallable(func) is false, throw a TypeError exception.
  6. Return func.

7.3.10 HasProperty (O, P)

The abstract operation HasProperty is used to determine whether an object has a property with the specified property key. The property may be either an own or inherited. A Boolean value is returned. The operation is called with arguments O and P where O is the object and P is the property key. This abstract operation performs the following steps:

  1. Assert: Type(O) is Object.
  2. Assert: IsPropertyKey(P) is true.
  3. Return O.[[HasProperty]](P).

7.3.11 HasOwnProperty (O, P)

The abstract operation HasOwnProperty is used to determine whether an object has an own property with the specified property key. A Boolean value is returned. The operation is called with arguments O and P where O is the object and P is the property key. This abstract operation performs the following steps:

  1. Assert: Type(O) is Object.
  2. Assert: IsPropertyKey(P) is true.
  3. Let desc be O.[[GetOwnProperty]](P).
  4. ReturnIfAbrupt(desc).
  5. If desc is undefined, return false.
  6. Return true.

7.3.12 Call(F, V, [argumentsList])

The abstract operation Call is used to call the [[Call]] internal method of a function object. The operation is called with arguments F, V , and optionally argumentsList where F is the function object, V is an ECMAScript language value that is the this value of the [[Call]], and argumentsList is the value passed to the corresponding argument of the internal method. If argumentsList is not present, an empty List is used as its value. This abstract operation performs the following steps:

  1. ReturnIfAbrupt(F).
  2. If argumentsList was not passed, let argumentsList be a new empty List.
  3. If IsCallable(F) is false, throw a TypeError exception.
  4. Return F.[[Call]](V, argumentsList).

7.3.13 Invoke(O,P, [argumentsList])

The abstract operation Invoke is used to call a method property of an object. The operation is called with arguments O, P , and optionally argumentsList where O serves as both the lookup point for the property and the this value of the call, P is the property key, and argumentsList is the list of arguments values passed to the method. If argumentsList is not present, an empty List is used as its value. This abstract operation performs the following steps:

  1. Assert: P is a valid property key.
  2. If argumentsList was not passed, let argumentsList be a new empty List.
  3. Let func be GetV(O, P).
  4. Return Call(func, O, argumentsList).

7.3.14 Construct (F, [argumentsList], [newTarget])

The abstract operation Construct is used to call the [[Construct]] internal method of a function object. The operation is called with arguments F, and optionally argumentsList, and newTarget where F is the function object. argumentsList and newTarget are the values to be passed as the corresponding arguments of the internal method. If argumentsList is not present, an empty List is used as its value. If newTarget is not present, F is used as its value. This abstract operation performs the following steps:

  1. If newTarget was not passed, let newTarget be F.
  2. If argumentsList was not passed, let argumentsList be a new empty List.
  3. Assert: IsConstructor (F) is true.
  4. Assert: IsConstructor (newTarget) is true.
  5. Return F.[[Construct]](argumentsList, newTarget).

NOTE If newTarget is not passed, this operation is equivalent to: new F(...argumentsList)

7.3.15 SetIntegrityLevel (O, level)

The abstract operation SetIntegrityLevel is used to fix the set of own properties of an object. This abstract operation performs the following steps:

  1. Assert: Type(O) is Object.
  2. Assert: level is either "sealed" or "frozen".
  3. Let status be O.[[PreventExtensions]]().
  4. ReturnIfAbrupt(status).
  5. If status is false, return false.
  6. Let keys be O.[[OwnPropertyKeys]]().
  7. ReturnIfAbrupt(keys).
  8. If level is "sealed", then
    1. Repeat for each element k of keys,
      1. Let status be DefinePropertyOrThrow(O, k, PropertyDescriptor{ [[Configurable]]: false}).
      2. ReturnIfAbrupt(status).
  9. Else level is "frozen",
    1. Repeat for each element k of keys,
      1. Let currentDesc be O.[[GetOwnProperty]](k).
      2. ReturnIfAbrupt(currentDesc).
      3. If currentDesc is not undefined, then
        1. If IsAccessorDescriptor(currentDesc) is true, then
          1. Let desc be the PropertyDescriptor{[[Configurable]]: false}.
        2. Else,
          1. Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
        3. Let status be DefinePropertyOrThrow(O, k, desc).
        4. ReturnIfAbrupt(status).
  10. Return true.

7.3.16 TestIntegrityLevel (O, level)

The abstract operation TestIntegrityLevel is used to determine if the set of own properties of an object are fixed. This abstract operation performs the following steps:

  1. Assert: Type(O) is Object.
  2. Assert: level is either "sealed" or "frozen".
  3. Let status be IsExtensible(O).
  4. ReturnIfAbrupt(status).
  5. If status is true, return false
  6. NOTE If the object is extensible, none of its properties are examined.
  7. Let keys be O.[[OwnPropertyKeys]]().
  8. ReturnIfAbrupt(keys).
  9. Repeat for each element k of keys,
    1. Let currentDesc be O.[[GetOwnProperty]](k).
    2. ReturnIfAbrupt(currentDesc).
    3. If currentDesc is not undefined, then
      1. If currentDesc.[[Configurable]] is true, return false.
      2. If level is "frozen" and IsDataDescriptor(currentDesc) is true, then
        1. If currentDesc.[[Writable]] is true, return false.
  10. Return true.

7.3.17 CreateArrayFromList (elements)

The abstract operation CreateArrayFromList is used to create an Array object whose elements are provided by a List. This abstract operation performs the following steps:

  1. Assert: elements is a List whose elements are all ECMAScript language values.
  2. Let array be ArrayCreate(0) (see 9.4.2.2).
  3. Let n be 0.
  4. For each element e of elements
    1. Let status be CreateDataProperty(array, ToString(n), e).
    2. Assert: status is true.
    3. Increment n by 1.
  5. Return array.

7.3.18 CreateListFromArrayLike (obj [, elementTypes] )

The abstract operation CreateListFromArrayLike is used to create a List value whose elements are provided by the indexed properties of an array-like object, obj. The optional argument elementTypes is a List containing the names of ECMAScript Language Types that are allowed for element values of the List that is created. This abstract operation performs the following steps:

  1. ReturnIfAbrupt(obj).
  2. If elementTypes was not passed, let elementTypes be (Undefined, Null, Boolean, String, Symbol, Number, Object).
  3. If Type(obj) is not Object, throw a TypeError exception.
  4. Let len be ToLength(Get(obj, "length")).
  5. ReturnIfAbrupt(len).
  6. Let list be an empty List.
  7. Let index be 0.
  8. Repeat while index < len
    1. Let indexName be ToString(index).
    2. Let next be Get(obj, indexName).
    3. ReturnIfAbrupt(next).
    4. If Type(next) is not an element of elementTypes, throw a TypeError exception.
    5. Append next as the last element of list.
    6. Set index to index + 1.
  9. Return list.

7.3.19 OrdinaryHasInstance (C, O)

The abstract operation OrdinaryHasInstance implements the default algorithm for determining if an object O inherits from the instance object inheritance path provided by constructor C. This abstract operation performs the following steps:

  1. If IsCallable(C) is false, return false.
  2. If C has a [[BoundTargetFunction]] internal slot, then
    1. Let BC be the value of C’s [[BoundTargetFunction]] internal slot.
    2. Return InstanceofOperator(O,BC) (see 12.9.4).
  3. If Type(O) is not Object, return false.
  4. Let P be Get(C, "prototype").
  5. ReturnIfAbrupt(P).
  6. If Type(P) is not Object, throw a TypeError exception.
  7. Repeat
    1. Let O be O.[[GetPrototypeOf]]().
    2. ReturnIfAbrupt(O).
    3. If O is null, return false.
    4. If SameValue(P, O) is true, return true.

7.3.20 SpeciesConstructor ( O, defaultConstructor )

The abstract operation SpeciesConstructor is used to retrieve the constructor that should be used to create new objects that are derived from the argument object O. The defaultConstructor argument is the constructor to use if a constructor @@species property cannot be found starting from O. This abstract operation performs the following steps:

  1. Assert: Type(O) is Object.
  2. Let C be Get(O, "constructor").
  3. ReturnIfAbrupt(C).
  4. If C is undefined, return defaultConstructor.
  5. If Type(C) is not Object, throw a TypeError exception.
  6. Let S be Get(C, @@species).
  7. ReturnIfAbrupt(S).
  8. If S is either undefined or null, return defaultConstructor.
  9. If IsConstructor(S) is true, return S.
  10. Throw a TypeError exception.

7.3.21 EnumerableOwnNames (O)

When the abstract operation EnumerableOwnNames is called with Object O the following steps are taken:

  1. Assert: Type(O) is Object.
  2. Let ownKeys be O.[[OwnPropertyKeys]]().
  3. ReturnIfAbrupt(ownKeys).
  4. Let names be a new empty List.
  5. Repeat, for each element key of ownKeys in List order
    1. If Type(key) is String, then
      1. Let desc be O.[[GetOwnProperty]](key).
      2. ReturnIfAbrupt(desc).
      3. If desc is not undefined, then
        1. If desc.[[Enumerable]] is true, append key to names.
  6. Order the elements of names so they are in the same relative order as would be produced by the Iterator that would be returned if the [[Enumerate]] internal method was invoked on O.
  7. Return names.

NOTE The order of elements is returned list is the same as the enumeration order that used by a for-in statement.

7.3.22 GetFunctionRealm ( obj )

The abstract operation GetFunctionRealm with argument obj performs the following steps:

  1. Assert: obj is a callable object.
  2. If obj has a [[Realm]] internal slot, then
    1. Return obj’s [[Realm]] internal slot.
  3. If obj is a Bound Function exotic object, then
    1. Let target be obj’s [[BoundTargetFunction]] internal slot.
    2. Return GetFunctionRealm(target).
  4. If obj is a Proxy exotic object, then
    1. If the value of the [[ProxyHandler]] internal slot of obj is null, throw a TypeError exception.
    2. Let proxyTarget be the value of obj’s [[ProxyTarget]] internal slot.
    3. Return GetFunctionRealm(proxyTarget).
  5. Return the running execution context’s Realm.

NOTE Step 5 will only be reached if target is a non-standard exotic function object that does not have a [[Realm]] internal slot.

7.4 Operations on Iterator Objects

See Common Iteration Interfaces (25.1).

7.4.1 GetIterator ( obj, method )

The abstract operation GetIterator with argument obj and optional argument method performs the following steps:

  1. ReturnIfAbrupt(obj).
  2. If method was not passed, then
    1. Let method be GetMethod(obj, @@iterator).
    2. ReturnIfAbrupt(method).
  3. Let iterator be Call(method,obj).
  4. ReturnIfAbrupt(iterator).
  5. If Type(iterator) is not Object, throw a TypeError exception.
  6. Return iterator.

7.4.2 IteratorNext ( iterator, value )

The abstract operation IteratorNext with argument iterator and optional argument value performs the following steps:

  1. If value was not passed, then
    1. Let result be Invoke(iterator, "next", «‍ »).
  2. Else,
    1. Let result be Invoke(iterator, "next", «‍value»).
  3. ReturnIfAbrupt(result).
  4. If Type(result) is not Object, throw a TypeError exception.
  5. Return result.

7.4.3 IteratorComplete ( iterResult )

The abstract operation IteratorComplete with argument iterResult performs the following steps:

  1. Assert: Type(iterResult) is Object.
  2. Return ToBoolean(Get(iterResult, "done")).

7.4.4 IteratorValue ( iterResult )

The abstract operation IteratorValue with argument iterResult performs the following steps:

  1. Assert: Type(iterResult) is Object.
  2. Return Get(iterResult, "value").

7.4.5 IteratorStep ( iterator )

The abstract operation IteratorStep with argument iterator requests the next value from iterator and returns either false indicating that the iterator has reached its end or the IteratorResult object if a next value is available. IteratorStep performs the following steps:

  1. Let result be IteratorNext(iterator).
  2. ReturnIfAbrupt(result).
  3. Let done be IteratorComplete(result).
  4. ReturnIfAbrupt(done).
  5. If done is true, return false.
  6. Return result.

7.4.6 IteratorClose( iterator, completion )

The abstract operation IteratorClose with arguments iterator and completion is used to notify an iterator that it should perform any actions it would normally perform when it has reached its completed state:

  1. Assert: Type(iterator) is Object.
  2. Assert: completion is a Completion Record.
  3. Let return be GetMethod(iterator, "return").
  4. ReturnIfAbrupt(return).
  5. If return is undefined, return Completion(completion).
  6. Let innerResult be Call(return, iterator, «‍ »).
  7. If completion.[[type]] is throw, return Completion(completion).
  8. If innerResult.[[type]] is throw, return Completion(innerResult).
  9. If Type(innerResult.[[value]]) is not Object, throw a TypeError exception.
  10. Return Completion(completion).

7.4.7 CreateIterResultObject ( value, done )

The abstract operation CreateIterResultObject with arguments value and done creates an object that supports the IteratorResult interface by performing the following steps:

  1. Assert: Type(done) is Boolean.
  2. Let obj be ObjectCreate(%ObjectPrototype%).
  3. Perform CreateDataProperty(obj, "value", value).
  4. Perform CreateDataProperty(obj, "done", done).
  5. Return obj.

7.4.8 CreateListIterator ( list )

The abstract operation CreateListIterator with argument list creates an Iterator (25.1.1.2) object whose next method returns the successive elements of list. It performs the following steps:

  1. Let iterator be ObjectCreate(%IteratorPrototype%, «[[IteratorNext]], [[IteratedList]], [[ListIteratorNextIndex]]»).
  2. Set iterator’s [[IteratedList]] internal slot to list.
  3. Set iterator’s [[ListIteratorNextIndex]] internal slot to 0.
  4. Let next be a new built-in function object as defined in ListIterator next (7.4.8.1).
  5. Set iterator’s [[IteratorNext]] internal slot to next.
  6. Perform CreateMethodProperty(iterator, "next", next).
  7. Return iterator.

7.4.8.1 ListIterator next( )

The ListIterator next method is a standard built-in function object (clause 17) that performs the following steps:

  1. Let O be the this value.
  2. Let f be the active function object.
  3. If O does not have a [[IteratorNext]] internal slot, throw a TypeError exception.
  4. Let next be the value of the [[IteratorNext]] internal slot of O.
  5. If SameValue(f, next) is false, throw a TypeError exception.
  6. If O does not have a [[IteratedList]] internal slot, throw a TypeError exception.
  7. Let list be the value of the [[IteratedList]] internal slot of O.
  8. Let index be the value of the [[ListIteratorNextIndex]] internal slot of O.
  9. Let len be the number of elements of list.
  10. If indexlen, then
    1. Return CreateIterResultObject(undefined, true).
  11. Set the value of the [[ListIteratorNextIndex]] internal slot of O to index+1.
  12. Return CreateIterResultObject(list[index], false).

NOTE A ListIterator next method will throw an exception if applied to any object other than the one with which it was originally associated.

8 Executable Code and Execution Contexts

8.1 Lexical Environments

A Lexical Environment is a specification type used to define the association of Identifiers to specific variables and functions based upon the lexical nesting structure of ECMAScript code. A Lexical Environment consists of an Environment Record and a possibly null reference to an outer Lexical Environment. Usually a Lexical Environment is associated with some specific syntactic structure of ECMAScript code such as a FunctionDeclaration, a BlockStatement, or a Catch clause of a TryStatement and a new Lexical Environment is created each time such code is evaluated.

An Environment Record records the identifier bindings that are created within the scope of its associated Lexical Environment. It is referred to as the Lexical Environment’s EnvironmentRecord

The outer environment reference is used to model the logical nesting of Lexical Environment values. The outer reference of a (inner) Lexical Environment is a reference to the Lexical Environment that logically surrounds the inner Lexical Environment. An outer Lexical Environment may, of course, have its own outer Lexical Environment. A Lexical Environment may serve as the outer environment for multiple inner Lexical Environments. For example, if a FunctionDeclaration contains two nested FunctionDeclarations then the Lexical Environments of each of the nested functions will have as their outer Lexical Environment the Lexical Environment of the current evaluation of the surrounding function.

A global environment is a Lexical Environment which does not have an outer environment. The global environment’s outer environment reference is null. A global environment’s Environment Record may be prepopulated with identifier bindings and includes an associated global object whose properties provide some of the global environment’s identifier bindings. This global object is the value of a global environment’s this binding. As ECMAScript code is executed, additional properties may be added to the global object and the initial properties may be modified.

A module environment is a Lexical Environment that contains the bindings for the top level declarations of a Module. It also contains the bindings that are explicitly imported by the Module. The outer environment of a module environment is a global environment.

A function environment is a Lexical Environment that corresponds to the invocation of an ECMAScript function object. A function environment may establish a new this binding. A function environment also captures the state necessary to support super method invocations.

Lexical Environments and Environment Record values are purely specification mechanisms and need not correspond to any specific artefact of an ECMAScript implementation. It is impossible for an ECMAScript program to directly access or manipulate such values.

8.1.1 Environment Records

There are two primary kinds of Environment Record values used in this specification: declarative Environment Records and object Environment Records. Declarative Environment Records are used to define the effect of ECMAScript language syntactic elements such as FunctionDeclarations, VariableDeclarations, and Catch clauses that directly associate identifier bindings with ECMAScript language values. Object Environment Records are used to define the effect of ECMAScript elements such as WithStatement that associate identifier bindings with the properties of some object. Global Environment Records and function Environment Records are specializations that are used for specifically for Script global declarations and for top-level declarations within functions.

For specification purposes Environment Record values are values of the Record specification type and can be thought of as existing in a simple object-oriented hierarchy where Environment Record is an abstract class with three concrete subclasses, declarative Environment Record, object Environment Record, and global Environment Record. Function Environment Records and module Environment Records are subclasses of declarative Environment Record. The abstract class includes the abstract specification methods defined in Table 15. These abstract methods have distinct concrete algorithms for each of the concrete subclasses.

Table 15 — Abstract Methods of Environment Records
Method Purpose
HasBinding(N) Determine if an Environment Record has a binding for the String value N. Return true if it does and false if it does not
CreateMutableBinding(N, D) Create a new but uninitialized mutable binding in an Environment Record. The String value N is the text of the bound name. If the optional Boolean argument D is true the binding is may be subsequently deleted.
CreateImmutableBinding(N, S) Create a new but uninitialized immutable binding in an Environment Record. The String value N is the text of the bound name. If S is true then attempts to access the value of the binding before it is initialized or set it after it has been initialized will always throw an exception, regardless of the strict mode setting of operations that reference that binding. S is an optional parameter that defaults to false.
InitializeBinding(N,V) Set the value of an already existing but uninitialized binding in an Environment Record. The String value N is the text of the bound name. V is the value for the binding and is a value of any ECMAScript language type.
SetMutableBinding(N,V, S) Set the value of an already existing mutable binding in an Environment Record. The String value N is the text of the bound name. V is the value for the binding and may be a value of any ECMAScript language type. S is a Boolean flag. If S is true and the binding cannot be set throw a TypeError exception.
GetBindingValue(N,S) Returns the value of an already existing binding from an Environment Record. The String value N is the text of the bound name. S is used to identify references originating in strict mode code or that otherwise require strict mode reference semantics. If S is true and the binding does not exist throw a ReferenceError exception. If the binding exists but is uninitialized a ReferenceError is thrown, regardless of the value of S.
DeleteBinding(N) Delete a binding from an Environment Record. The String value N is the text of the bound name. If a binding for N exists, remove the binding and return true. If the binding exists but cannot be removed return false. If the binding does not exist return true.
HasThisBinding() Determine if an Environment Record establishes a this binding. Return true if it does and false if it does not.
HasSuperBinding() Determine if an Environment Record establishes a super method binding. Return true if it does and false if it does not.
WithBaseObject () If this Environment Record is associated with a with statement, return the with object. Otherwise, return undefined.

8.1.1.1 Declarative Environment Records

Each declarative Environment Record is associated with an ECMAScript program scope containing variable, constant, let, class, module, import, and/or function declarations. A declarative Environment Record binds the set of identifiers defined by the declarations contained within its scope.

The behaviour of the concrete specification methods for declarative environment records is defined by the following algorithms.

8.1.1.1.1 HasBinding(N)

The concrete Environment Record method HasBinding for declarative Environment Records simply determines if the argument identifier is one of the identifiers bound by the record:

  1. Let envRec be the declarative Environment Record for which the method was invoked.
  2. If envRec has a binding for the name that is the value of N, return true.
  3. Return false.

8.1.1.1.2 CreateMutableBinding (N, D)

The concrete Environment Record method CreateMutableBinding for declarative Environment Records creates a new mutable binding for the name N that is uninitialized. A binding must not already exist in this Environment Record for N. If Boolean argument D is provided and has the value true the new binding is marked as being subject to deletion.

  1. Let envRec be the declarative Environment Record for which the method was invoked.
  2. Assert: envRec does not already have a binding for N.
  3. Create a mutable binding in envRec for N and record that it is uninitialized. If D is true record that the newly created binding may be deleted by a subsequent DeleteBinding call.
  4. Return NormalCompletion(empty).

8.1.1.1.3 CreateImmutableBinding (N, S)

The concrete Environment Record method CreateImmutableBinding for declarative Environment Records creates a new immutable binding for the name N that is uninitialized. A binding must not already exist in this Environment Record for N. If Boolean argument S is provided and has the value true the new binding is marked as a strict binding.

  1. Let envRec be the declarative Environment Record for which the method was invoked.
  2. Assert: envRec does not already have a binding for N.
  3. Create an immutable binding in envRec for N and record that it is uninitialized. If S is true record that the newly created binding is a strict binding.
  4. Return NormalCompletion(empty).

8.1.1.1.4 InitializeBinding (N,V)

The concrete Environment Record method InitializeBinding for declarative Environment Records is used to set the bound value of the current binding of the identifier whose name is the value of the argument N to the value of argument V. An uninitialized binding for N must already exist.

  1. Let envRec be the declarative Environment Record for which the method was invoked.
  2. Assert: envRec must have an uninitialized binding for N.
  3. Set the bound value for N in envRec to V.
  4. Record that the binding for N in envRec has been initialized.
  5. Return NormalCompletion(empty).

8.1.1.1.5 SetMutableBinding (N,V,S)

The concrete Environment Record method SetMutableBinding for declarative Environment Records attempts to change the bound value of the current binding of the identifier whose name is the value of the argument N to the value of argument V. A binding for N normally already exist, but in rare cases it may not. If the binding is an immutable binding, a TypeError is thrown if S is true.

  1. Let envRec be the declarative Environment Record for which the method was invoked.
  2. If envRec does not have a binding for N, then
    1. If S is true throw a ReferenceError exception.
    2. Perform envRec.CreateMutableBinding(N, true).
    3. Perform envRec.InitializeBinding(N, V).
    4. Return NormalCompletion(empty).
  3. If the binding for N in envRec is a strict binding, let S be true.
  4. If the binding for N in envRec has not yet been initialized throw a ReferenceError exception.
  5. Else if the binding for N in envRec is a mutable binding, change its bound value to V.
  6. Else this must be an attempt to change the value of an immutable binding so if S is true throw a TypeError exception.
  7. Return NormalCompletion(empty).

NOTE An example of ECMAScript code that results in a missing binding at step 2 is:

function f(){eval("var x; x = (delete x, 0);")}

8.1.1.1.6 GetBindingValue(N,S)

The concrete Environment Record method GetBindingValue for declarative Environment Records simply returns the value of its bound identifier whose name is the value of the argument N. If the binding exists but is uninitialized a ReferenceError is thrown, regardless of the value of S.

  1. Let envRec be the declarative Environment Record for which the method was invoked.
  2. Assert: envRec has a binding for N.
  3. If the binding for N in envRec is an uninitialized binding, throw a ReferenceError exception.
  4. Return the value currently bound to N in envRec.

8.1.1.1.7 DeleteBinding (N)

The concrete Environment Record method DeleteBinding for declarative Environment Records can only delete bindings that have been explicitly designated as being subject to deletion.

  1. Let envRec be the declarative Environment Record for which the method was invoked.
  2. Assert: envRec has a binding for the name that is the value of N.
  3. If the binding for N in envRec cannot be deleted, return false.
  4. Remove the binding for N from envRec.
  5. Return true.

8.1.1.1.8 HasThisBinding ()

Regular declarative Environment Records do not provide a this binding.

  1. Return false.

8.1.1.1.9 HasSuperBinding ()

Regular declarative Environment Records do not provide a super binding.

  1. Return false.

8.1.1.1.10 WithBaseObject()

Declarative Environment Records always return undefined as their WithBaseObject.

  1. Return undefined.

8.1.1.2 Object Environment Records

Each object Environment Record is associated with an object called its binding object. An object Environment Record binds the set of string identifier names that directly correspond to the property names of its binding object. Property keys that are not strings in the form of an IdentifierName are not included in the set of bound identifiers. Both own and inherited properties are included in the set regardless of the setting of their [[Enumerable]] attribute. Because properties can be dynamically added and deleted from objects, the set of identifiers bound by an object Environment Record may potentially change as a side-effect of any operation that adds or deletes properties. Any bindings that are created as a result of such a side-effect are considered to be a mutable binding even if the Writable attribute of the corresponding property has the value false. Immutable bindings do not exist for object Environment Records.

Object Environment Records created for with statements (13.10) can provide their binding object as an implicit this value for use in function calls. The capability is controlled by a withEnvironment Boolean value that is associated with each object Environment Record. By default, the value of withEnvironment is false for any object Environment Record.

The behaviour of the concrete specification methods for object environment records is defined by the following algorithms.

8.1.1.2.1 HasBinding(N)

The concrete Environment Record method HasBinding for object Environment Records determines if its associated binding object has a property whose name is the value of the argument N:

  1. Let envRec be the object Environment Record for which the method was invoked.
  2. Let bindings be the binding object for envRec.
  3. Let foundBinding be HasProperty(bindings, N)
  4. ReturnIfAbrupt(foundBinding).
  5. If foundBinding is false, return false.
  6. If the withEnvironment flag of envRec is false, return true.
  7. Let unscopables be Get(bindings, @@unscopables).
  8. ReturnIfAbrupt(unscopables).
  9. If Type(unscopables) is Object, then
    1. Let blocked be ToBoolean(Get(unscopables, N)).
    2. ReturnIfAbrupt(blocked).
    3. If blocked is true, return false.
  10. Return true.

8.1.1.2.2 CreateMutableBinding (N, D)

The concrete Environment Record method CreateMutableBinding for object Environment Records creates in an Environment Record’s associated binding object a property whose name is the String value and initializes it to the value undefined. If Boolean argument D is provided and has the value true the new property’s [[Configurable]] attribute is set to true, otherwise it is set to false.

  1. Let envRec be the object Environment Record for which the method was invoked.
  2. Let bindings be the binding object for envRec.
  3. If D is true then let configValue be true otherwise let configValue be false.
  4. Return DefinePropertyOrThrow(bindings, N, PropertyDescriptor{[[Value]]:undefined, [[Writable]]: true, [[Enumerable]]: true , [[Configurable]]: configValue}).

NOTE Normally envRec will not have a binding for N but if it does, the semantics of DefinePropertyOrThrow may result in an existing binding being replaced or shadowed or cause an abrupt completion to be returned.

8.1.1.2.3 CreateImmutableBinding (N, S)

The concrete Environment Record method CreateImmutableBinding is never used within this specification in association with Object Environment Records.

8.1.1.2.4 InitializeBinding (N,V)

The concrete Environment Record method InitializeBinding for object Environment Records is used to set the bound value of the current binding of the identifier whose name is the value of the argument N to the value of argument V. An uninitialized binding for N must already exist.

  1. Let envRec be the object Environment Record for which the method was invoked.
  2. Assert: envRec must have an uninitialized binding for N.
  3. Record that the binding for N in envRec has been initialized.
  4. Return envRec.SetMutableBinding(N, V, false).

NOTE In this specification, all uses of CreateMutableBinding for object Environment Records are immediately followed by a call to InitializeBinding for the same name. Hence, implementations do not need to explicitly track the initialization state of individual object Environment Record bindings.

8.1.1.2.5 SetMutableBinding (N,V,S)

The concrete Environment Record method SetMutableBinding for object Environment Records attempts to set the value of the Environment Record’s associated binding object’s property whose name is the value of the argument N to the value of argument V. A property named N normally already exists but if it does not or is not currently writable, error handling is determined by the value of the Boolean argument S.

  1. Let envRec be the object Environment Record for which the method was invoked.
  2. Let bindings be the binding object for envRec.
  3. Return Set(bindings, N, V, S).

8.1.1.2.6 GetBindingValue(N,S)

The concrete Environment Record method GetBindingValue for object Environment Records returns the value of its associated binding object’s property whose name is the String value of the argument identifier N. The property should already exist but if it does not the result depends upon the value of the S argument:

  1. Let envRec be the object Environment Record for which the method was invoked.
  2. Let bindings be the binding object for envRec.
  3. Let value be HasProperty(bindings, N).
  4. ReturnIfAbrupt(value).
  5. If value is false, then
    1. If S is false, return the value undefined, otherwise throw a ReferenceError exception.
  6. Return Get(bindings, N).

8.1.1.2.7 DeleteBinding (N)

The concrete Environment Record method DeleteBinding for object Environment Records can only delete bindings that correspond to properties of the environment object whose [[Configurable]] attribute have the value true.

  1. Let envRec be the object Environment Record for which the method was invoked.
  2. Let bindings be the binding object for envRec.
  3. Return bindings.[[Delete]](N).

8.1.1.2.8 HasThisBinding ()

Regular object environment records do not provide a this binding.

  1. Return false.

8.1.1.2.9 HasSuperBinding ()

Regular object environment records do not provide a super binding.

  1. Return false.

8.1.1.2.10 WithBaseObject()

Object environment records return undefined as their WithBaseObject unless their withEnvironment flag is true.

  1. Let envRec be the object Environment Record for which the method was invoked.
  2. If the withEnvironment flag of envRec is true, return the binding object for envRec.
  3. Otherwise, return undefined.

8.1.1.3 Function Environment Records

A function Environment Record is a declarative Environment Record that is used to represent the top-level scope of a function and, if the function is not an ArrowFunction, provides a this binding. If a function is not an ArrowFunction function and references super, its function Environment Record also contains the state that is used to perform super method invocations from within the function.

Function Environment Records have the additional state fields listed in Table 16.

Table 16 — Additional Fields of Function Environment Records
Field Name Value Meaning
[[thisValue]] Any This is the this value used for this invocation of the function.
[[thisBindingStatus]] "lexical" | "initialized" | "uninitialized" If the value is "lexical", this is an ArrowFunction and does not have a local this value.
[[FunctionObject]] Object The function Object whose invocation caused this Environment Record to be created.
[[HomeObject]] Object | undefined If the associated function has super property accesses and is not an ArrowFunction, [[HomeObject]] is the object that the function is bound to as a method. The default value for [[HomeObject]] is undefined.
[[NewTarget]] Object | undefined If this Environment Record was created by the [[Construct]] internal method, [[NewTarget]] is the value of the [[Construct]] newTarget parameter. Otherwise, its value is undefined.

Function Environment Records support all of the declarative Environment Record methods listed in Table 15 and share the same specifications for all of those methods except for HasThisBinding and HasSuperBinding. In addition, function Environment Records support the methods listed in Table 17:

Table 17 — Additional Methods of Function Environment Records
Method Purpose
BindThisValue(V) Set the [[thisValue]] and record that it has been initialized.
GetThisBinding() Return the value of this Environment Record’s this binding. Throws a ReferenceError if the this binding has not been initialized.
GetSuperBase() Return the object that is the base for super property accesses bound in this Environment Record. The object is derived from this Environment Record’s [[HomeObject]] field. The value undefined indicates that super property accesses will produce runtime errors.

The behaviour of the additional concrete specification methods for function Environment Records is defined by the following algorithms:

8.1.1.3.1 BindThisValue(V)

  1. Let envRec be the function Environment Record for which the method was invoked.
  2. Assert: envRec.[[thisBindingStatus]] is not "lexical".
  3. If envRec.[[thisBindingStatus]] is "initialized", throw a ReferenceError exception.
  4. Set envRec.[[thisValue]] to V.
  5. Set envRec.[[thisBindingStatus]] to "initialized".
  6. Return V.

8.1.1.3.2 HasThisBinding ()

  1. Let envRec be the function Environment Record for which the method was invoked.
  2. If envRec.[[thisBindingStatus]] is "lexical", return false; otherwise, return true.

8.1.1.3.3 HasSuperBinding ()

  1. Let envRec be the function Environment Record for which the method was invoked.
  2. If envRec.[[thisBindingStatus]] is "lexical", return false.
  3. If envRec.[[HomeObject]] has the value undefined, return false, otherwise, return true.

8.1.1.3.4 GetThisBinding ()

  1. Let envRec be the function Environment Record for which the method was invoked.
  2. Assert: envRec.[[thisBindingStatus]] is not "lexical".
  3. If envRec.[[thisBindingStatus]] is "uninitialized", throw a ReferenceError exception.
  4. Return envRec.[[thisValue]].

8.1.1.3.5 GetSuperBase ()

  1. Let envRec be the function Environment Record for which the method was invoked.
  2. Let home be the value of envRec.[[HomeObject]].
  3. If home has the value undefined, return undefined.
  4. Assert: Type(home) is Object.
  5. Return home.[[GetPrototypeOf]]().

8.1.1.4 Global Environment Records

A global Environment Record is used to represent the outer most scope that is shared by all of the ECMAScript Script elements that are processed in a common Realm (8.2). A global Environment Record provides the bindings for built-in globals (clause 18), properties of the global object, and for all top-level declarations (13.1.8, 13.1.10) that occur within a Script.

A global Environment Record is logically a single record but it is specified as a composite encapsulating an object Environment Record and a declarative Environment Record. The object Environment Record has as its base object the global object of the associated Realm. This global object is the value returned by the global Environment Record’s GetThisBinding concrete method. The object Environment Record component of a global Environment Record contains the bindings for all built-in globals (clause 18) and all bindings introduced by a FunctionDeclaration, GeneratorDeclaration, or VariableStatement contained in global code. The bindings for all other ECMAScript declarations in global code are contained in the declarative Environment Record component of the global Environment Record.

Properties may be created directly on a global object. Hence, the object Environment Record component of a global Environment Record may contain both bindings created explicitly by FunctionDeclaration, GeneratorDeclaration, or VariableDeclaration declarations and binding created implicitly as properties of the global object. In order to identify which bindings were explicitly created using declarations, a global Environment Record maintains a list of the names bound using its CreateGlobalVarBindings and CreateGlobalFunctionBindings concrete methods.

Global Environment Records have the additional fields listed in Table 18 and the additional methods listed in Table 19.

Table 18 — Additional Fields of Global Environment Records
Field Name Value Meaning
[[ObjectRecord]] Object Environment Record Binding object is the global object. It contains global built-in bindings as well as FunctionDeclaration, GeneratorDeclaration, and VariableDeclaration bindings in global code for the associated Realm.
[[DeclarativeRecord]] Declarative Environment Record Contains bindings for all declarations in global code for the associated Realm code except for FunctionDeclaration, GeneratorDeclaration, and VariableDeclaration bindings.
[[VarNames]] List of String The string names bound by FunctionDeclaration, GeneratorDeclaration, and VariableDeclaration declarations in global code for the associated Realm.
Table 19 — Additional Methods of Global Environment Records
Method Purpose
GetThisBinding() Return the value of this Environment Record’s this binding.
HasVarDeclaration (N) Determines if the argument identifier has a binding in this Environment Record that was created using a VariableDeclaration, FunctionDeclaration, or GeneratorDeclaration.
HasLexicalDeclaration (N) Determines if the argument identifier has a binding in this Environment Record that was created using a lexical declaration such as a LexicalDeclaration or a ClassDeclaration.
HasRestrictedGlobalProperty (N) Determines if the argument is the name of a global object property that may not be shadowed by a global lexically binding.
CanDeclareGlobalVar (N) Determines if a corresponding CreateGlobalVarBinding call would succeed if called for the same argument N.
CanDeclareGlobalFunction (N) Determines if a corresponding CreateGlobalFunctionBinding call would succeed if called for the same argument N.
CreateGlobalVarBinding(N, D) Used to create and initialize to undefined a global var binding in the [[ObjectRecord]] component of a global Environment Record. The binding will be a mutable binding. The corresponding global object property will have attribute values appropriate for a var. The String value N is the bound name. If D is true the binding may be deleted. Logically equivalent to CreateMutableBinding followed by a SetMutableBinding but it allows var declarations to receive special treatment.
CreateGlobalFunctionBinding(N, V, D) Create and initialize a global function binding in the [[ObjectRecord]] component of a global Environment Record. The binding will be a mutable binding. The corresponding global object property will have attribute values appropriate for a function. The String value N is the bound name. V is the initialization value. If the optional Boolean argument D is true the binding is may be deleted. Logically equivalent to CreateMutableBinding followed by a SetMutableBinding but it allows function declarations to receive special treatment.

The behaviour of the concrete specification methods for global Environment Records is defined by the following algorithms.

8.1.1.4.1 HasBinding(N)

The concrete Environment Record method HasBinding for global Environment Records simply determines if the argument identifier is one of the identifiers bound by the record:

  1. Let envRec be the global Environment Record for which the method was invoked.
  2. Let DclRec be envRec.[[DeclarativeRecord]].
  3. If DclRec.HasBinding(N) is true, return true.
  4. Let ObjRec be envRec.[[ObjectRecord]].
  5. Return ObjRec.HasBinding(N).

8.1.1.4.2 CreateMutableBinding (N, D)

The concrete Environment Record method CreateMutableBinding for global Environment Records creates a new mutable binding for the name N that is uninitialized. The binding is created in the associated DeclarativeRecord. A binding for N must not already exist in the DeclarativeRecord. If Boolean argument D is provided and has the value true the new binding is marked as being subject to deletion.

  1. Let envRec be the global Environment Record for which the method was invoked.
  2. Let DclRec be envRec.[[DeclarativeRecord]].
  3. If DclRec.HasBinding(N) is true, throw a TypeError exception.
  4. Return DclRec.CreateMutableBinding(N, D).

8.1.1.4.3 CreateImmutableBinding (N, S)

The concrete Environment Record method CreateImmutableBinding for global Environment Records creates a new immutable binding for the name N that is uninitialized. A binding must not already exist in this Environment Record for N. If Boolean argument S is provided and has the value true the new binding is marked as a strict binding.

  1. Let envRec be the global Environment Record for which the method was invoked.
  2. Let DclRec be envRec.[[DeclarativeRecord]].
  3. If DclRec.HasBinding(N) is true, throw a TypeError exception.
  4. Return DclRec.CreateImmutableBinding(N, S).

8.1.1.4.4 InitializeBinding (N,V)

The concrete Environment Record method InitializeBinding for global Environment Records is used to set the bound value of the current binding of the identifier whose name is the value of the argument N to the value of argument V. An uninitialized binding for N must already exist.

  1. Let envRec be the global Environment Record for which the method was invoked.
  2. Let DclRec be envRec.[[DeclarativeRecord]].
  3. If DclRec.HasBinding(N) is true, then
    1. Return DclRec.InitializeBinding(N, V).
  4. Assert: If the binding exists it must be in the object Environment Record.
  5. Let ObjRec be envRec.[[ObjectRecord]].
  6. Return ObjRec.InitializeBinding(N, V).

8.1.1.4.5 SetMutableBinding (N,V,S)

The concrete Environment Record method SetMutableBinding for global Environment Records attempts to change the bound value of the current binding of the identifier whose name is the value of the argument N to the value of argument V. If the binding is an immutable binding, a TypeError is thrown if S is true. A property named N normally already exists but if it does not or is not currently writable, error handling is determined by the value of the Boolean argument S.

  1. Let envRec be the global Environment Record for which the method was invoked.
  2. Let DclRec be envRec.[[DeclarativeRecord]].
  3. If DclRec.HasBinding(N) is true, then
    1. Return DclRec.SetMutableBinding(N, V, S).
  4. Let ObjRec be envRec.[[ObjectRecord]].
  5. Return ObjRec.SetMutableBinding(N, V, S).

8.1.1.4.6 GetBindingValue(N,S)

The concrete Environment Record method GetBindingValue for global Environment Records returns the value of its bound identifier whose name is the value of the argument N. If the binding is an uninitialized binding throw a ReferenceError exception. A property named N normally already exists but if it does not or is not currently writable, error handling is determined by the value of the Boolean argument S.

  1. Let envRec be the global Environment Record for which the method was invoked.
  2. Let DclRec be envRec.[[DeclarativeRecord]].
  3. If DclRec.HasBinding(N) is true, then
    1. Return DclRec.GetBindingValue(N, S).
  4. Let ObjRec be envRec.[[ObjectRecord]].
  5. Return ObjRec.GetBindingValue(N, S).

8.1.1.4.7 DeleteBinding (N)

The concrete Environment Record method DeleteBinding for global Environment Records can only delete bindings that have been explicitly designated as being subject to deletion.

  1. Let envRec be the global Environment Record for which the method was invoked.
  2. Let DclRec be envRec.[[DeclarativeRecord]].
  3. If DclRec.HasBinding(N) is true, then
    1. Return DclRec.DeleteBinding(N).
  4. Let ObjRec be envRec.[[ObjectRecord]].
  5. Let globalObject be the binding object for ObjRec.
  6. Let existingProp be HasOwnProperty(globalObject, N).
  7. ReturnIfAbrupt(existingProp).
  8. If existingProp is true, then
    1. Let status be ObjRec.DeleteBinding(N).
    2. ReturnIfAbrupt(status).
    3. If status is true, then
      1. Let varNames be envRec.[[VarNames]].
      2. If N is an element of varNames, remove that element from the varNames.
    4. Return status.
  9. Return true.

8.1.1.4.8 HasThisBinding ()

Global Environment Records always provide a this binding whose value is the associated global object.

  1. Return true.

8.1.1.4.9 HasSuperBinding ()

  1. Return false.

8.1.1.4.10 WithBaseObject()

Global Environment Records always return undefined as their WithBaseObject.

  1. Return undefined.

8.1.1.4.11 GetThisBinding ()

  1. Let envRec be the global Environment Record for which the method was invoked.
  2. Let ObjRec be envRec.[[ObjectRecord]].
  3. Let bindings be the binding object for ObjRec.
  4. Return bindings.

8.1.1.4.12 HasVarDeclaration (N)

The concrete Environment Record method HasVarDeclaration for global Environment Records determines if the argument identifier has a binding in this record that was created using a VariableStatement or a FunctionDeclaration :

  1. Let envRec be the global Environment Record for which the method was invoked.
  2. Let varDeclaredNames be envRec.[[VarNames]].
  3. If varDeclaredNames contains the value of N, return true.
  4. Return false.

8.1.1.4.13 HasLexicalDeclaration (N)

The concrete Environment Record method HasLexicalDeclaration for global Environment Records determines if the argument identifier has a binding in this record that was created using a lexical declaration such as a LexicalDeclaration or a ClassDeclaration :

  1. Let envRec be the global Environment Record for which the method was invoked.
  2. Let DclRec be envRec.[[DeclarativeRecord]].
  3. Return DclRec.HasBinding(N).

8.1.1.4.14 HasRestrictedGlobalProperty (N)

The concrete Environment Record method HasRestrictedGlobalProperty for global Environment Records determines if the argument identifier is the name of a property of the global object that must not be shadowed by a global lexically binding:

  1. Let envRec be the global Environment Record for which the method was invoked.
  2. Let ObjRec be envRec.[[ObjectRecord]].
  3. Let globalObject be the binding object for ObjRec.
  4. Let existingProp be globalObject.[[GetOwnProperty]](N).
  5. ReturnIfAbrupt(existingProp).
  6. If existingProp is undefined, return false.
  7. If existingProp.[[Configurable]] is true, return false.
  8. Return true.

NOTE Properties may exist upon a global object that were directly created rather than being declared using a var or function declaration. A global lexical binding may not be created that has the same name as a non-configurable property of the global object. The global property undefined is an example of such a property.

8.1.1.4.15 CanDeclareGlobalVar (N)

The concrete Environment Record method CanDeclareGlobalVar for global Environment Records determines if a corresponding CreateGlobalVarBinding call would succeed if called for the same argument N. Redundant var declarations and var declarations for pre-existing global object properties are allowed.

  1. Let envRec be the global Environment Record for which the method was invoked.
  2. Let ObjRec be envRec.[[ObjectRecord]].
  3. Let globalObject be the binding object for ObjRec.
  4. Let hasProperty be HasOwnProperty(globalObject, N).
  5. ReturnIfAbrupt(hasProperty).
  6. If hasProperty is true, return true.
  7. Return IsExtensible(globalObject).

8.1.1.4.16 CanDeclareGlobalFunction (N)

The concrete Environment Record method CanDeclareGlobalFunction for global Environment Records determines if a corresponding CreateGlobalFunctionBinding call would succeed if called for the same argument N.

  1. Let envRec be the global Environment Record for which the method was invoked.
  2. Let ObjRec be envRec.[[ObjectRecord]].
  3. Let globalObject be the binding object for ObjRec.
  4. Let existingProp be globalObject.[[GetOwnProperty]](N).
  5. ReturnIfAbrupt(existingProp).
  6. If existingProp is undefined, return IsExtensible(globalObject).
  7. If existingProp.[[Configurable]] is true, return true.
  8. If IsDataDescriptor(existingProp) is true and existingProp has attribute values {[[Writable]]: true, [[Enumerable]]: true}, return true.
  9. Return false.

8.1.1.4.17 CreateGlobalVarBinding (N, D)

The concrete Environment Record method CreateGlobalVarBinding for global Environment Records creates and initializes a mutable binding in the associated object Environment Record and records the bound name in the associated [[VarNames]] List. If a binding already exists, it is reused and assumed to be initialized.

  1. Let envRec be the global Environment Record for which the method was invoked.
  2. Let ObjRec be envRec.[[ObjectRecord]].
  3. Let globalObject be the binding object for ObjRec.
  4. Let hasProperty be HasOwnProperty(globalObject, N).
  5. ReturnIfAbrupt(hasProperty).
  6. Let extensible be IsExtensible(globalObject).
  7. ReturnIfAbrupt(extensible).
  8. If hasProperty is false and extensible is true, then
    1. Let status be ObjRec.CreateMutableBinding(N, D).
    2. ReturnIfAbrupt(status).
    3. Let status be ObjRec.InitializeBinding(N, undefined).
    4. ReturnIfAbrupt(status).
  9. Let varDeclaredNames be envRec.[[VarNames]].
  10. If varDeclaredNames does not contain the value of N, then
    1. Append N to varDeclaredNames.
  11. Return NormalCompletion(empty).

8.1.1.4.18 CreateGlobalFunctionBinding (N, V, D)

The concrete Environment Record method CreateGlobalFunctionBinding for global Environment Records creates and initializes a mutable binding in the associated object Environment Record and records the bound name in the associated [[VarNames]] List. If a binding already exists, it is replaced.

  1. Let envRec be the global Environment Record for which the method was invoked.
  2. Let ObjRec be envRec.[[ObjectRecord]].
  3. Let globalObject be the binding object for ObjRec.
  4. Let existingProp be globalObject.[[GetOwnProperty]](N).
  5. ReturnIfAbrupt(existingProp).
  6. If existingProp is undefined or existingProp.[[Configurable]] is true, then
    1. Let desc be the PropertyDescriptor{[[Value]]:V, [[Writable]]: true, [[Enumerable]]: true , [[Configurable]]: D}.
  7. Else,
    1. Let desc be the PropertyDescriptor{[[Value]]:V }.
  8. Let status be DefinePropertyOrThrow(globalObject, N, desc).
  9. ReturnIfAbrupt(status).
  10. Let status be Set(globalObject, N, V, false).
  11. Record that the binding for N in ObjRec has been initialized.
  12. ReturnIfAbrupt(status).
  13. Let varDeclaredNames be envRec.[[VarNames]].
  14. If varDeclaredNames does not contain the value of N, then
    1. Append N to varDeclaredNames.
  15. Return NormalCompletion(empty).

NOTE Global function declarations are always represented as own properties of the global object. If possible, an existing own property is reconfigured to have a standard set of attribute values. Steps 10-12 are equivalent to what calling the InitializeBinding concrete method would do and if globalObject is a Proxy will produce the same sequence of Proxy trap calls.

8.1.1.5 Module Environment Records

A module Environment Record is a declarative Environment Record that is used to represent the outer scope of an ECMAScript Module. In additional to normal mutable and immutable bindings, module Environment Records also provide immutable import bindings which are bindings that provide indirect access to a target binding that exists in another Environment Record.

Module Environment Records support all of the declarative Environment Record methods listed in Table 15 and share the same specifications for all of those methods except for GetBindingValue, DeleteBinding, HasThisBinding and GetThisBinding. In addition, module Environment Records support the methods listed in Table 20:

Table 20 — Additional Methods of Module Environment Records
Method Purpose
CreateImportBinding(N, M, N2 ) Create an immutable indirect binding in a module Environment Record. The String value N is the text of the bound name. M is a Module Record (see 15.2.1.14), and N2 is a binding that exists in M’s module Environment Record.
GetThisBinding() Return the value of this Environment Record’s this binding.

The behaviour of the additional concrete specification methods for module Environment Records are defined by the following algorithms:

8.1.1.5.1 GetBindingValue(N,S)

The concrete Environment Record method GetBindingValue for module Environment Records returns the value of its bound identifier whose name is the value of the argument N. However, if the binding is an indirect binding the value of the target binding is returned. If the binding exists but is uninitialized a ReferenceError is thrown, regardless of the value of S.

  1. Let envRec be the module Environment Record for which the method was invoked.
  2. Assert: envRec has a binding for N.
  3. If the binding for N is an indirect binding, then
    1. Let M and N2 be the indirection values provided when this binding for N was created.
    2. If M is undefined, throw a ReferenceError exception.
    3. Let targetEnv be M.[[Environment]].
    4. If targetEnv is undefined, throw a ReferenceError exception.
    5. Let targetER be targetEnv’s EnvironmentRecord.
    6. Return targetER.GetBindingValue(N2, S).
  4. If the binding for N in envRec is an uninitialized binding, throw a ReferenceError exception.
  5. Return the value currently bound to N in envRec.

NOTE Because a Module is always strict mode code, calls to GetBindingValue should always pass true as the value of S.

8.1.1.5.2 DeleteBinding (N)

The concrete Environment Record method DeleteBinding for module Environment Records refuses to delete bindings.

  1. Let envRec be the module Environment Record for which the method was invoked.
  2. If envRec does not have a binding for the name that is the value of N, return true.
  3. Return false.

NOTE Because the bindings of a module Environment Record are not deletable.

8.1.1.5.3 HasThisBinding ()

Module Environment Records provide a this binding.

  1. Return true.

8.1.1.5.4 GetThisBinding ()

  1. Return undefined.

8.1.1.5.5 CreateImportBinding (N, M, N2)

The concrete Environment Record method CreateImportBinding for module Environment Records creates a new initialized immutable indirect binding for the name N. A binding must not already exist in this Environment Record for N. M is a Module Record (see 15.2.1.14), and N2 is the name of a binding that exists in M’s module Environment Record. Accesses to the value of the new binding will indirectly access the bound value of value of the target binding.

  1. Let envRec be the module Environment Record for which the method was invoked.
  2. Assert: envRec does not already have a binding for N.
  3. Assert: M is a Module Record.
  4. Assert: When M.[[Environment]] is instantiated it will have a direct binding for N2.
  5. Create an immutable indirect binding in envRec for N that references M and N2 as its target binding and record that the binding is initialized.
  6. Return NormalCompletion(empty).

8.1.2 Lexical Environment Operations

The following abstract operations are used in this specification to operate upon lexical environments:

8.1.2.1 GetIdentifierReference (lex, name, strict)

The abstract operation GetIdentifierReference is called with a Lexical Environment lex, a String name, and a Boolean flag strict. The value of lex may be null. When called, the following steps are performed:

  1. If lex is the value null, then
    1. Return a value of type Reference whose base value is undefined, whose referenced name is name, and whose strict reference flag is strict.
  2. Let envRec be lex’s EnvironmentRecord.
  3. Let exists be envRec.HasBinding(name).
  4. ReturnIfAbrupt(exists).
  5. If exists is true, then
    1. Return a value of type Reference whose base value is envRec, whose referenced name is name, and whose strict reference flag is strict.
  6. Else
    1. Let outer be the value of lex’s outer environment reference.
    2. Return GetIdentifierReference(outer, name, strict).

8.1.2.2 NewDeclarativeEnvironment (E)

When the abstract operation NewDeclarativeEnvironment is called with a Lexical Environment as argument E the following steps are performed:

  1. Let env be a new Lexical Environment.
  2. Let envRec be a new declarative Environment Record containing no bindings.
  3. Set env’s EnvironmentRecord to be envRec.
  4. Set the outer lexical environment reference of env to E.
  5. Return env.

8.1.2.3 NewObjectEnvironment (O, E)

When the abstract operation NewObjectEnvironment is called with an Object O and a Lexical Environment E as arguments, the following steps are performed:

  1. Let env be a new Lexical Environment.
  2. Let envRec be a new object Environment Record containing O as the binding object.
  3. Set env’s EnvironmentRecord to envRec.
  4. Set the outer lexical environment reference of env to E.
  5. Return env.

8.1.2.4 NewFunctionEnvironment ( F, newTarget )

When the abstract operation NewFunctionEnvironment is called with arguments F and newTarget the following steps are performed:

  1. Assert: F is an ECMAScript function.
  2. Assert: Type(newTarget) is Undefined or Object.
  3. Let env be a new Lexical Environment.
  4. Let envRec be a new function Environment Record containing no bindings.
  5. Set envRec.[[FunctionObject]] to F.
  6. If F’s [[ThisMode]] internal slot is lexical, set envRec.[[thisBindingStatus]] to "lexical".
  7. Else, Set envRec.[[thisBindingStatus]] to "uninitialized".
  8. Let home be the value of F’s [[HomeObject]] internal slot.
  9. Set envRec.[[HomeObject]] to home.
  10. Set envRec.[[NewTarget]] to newTarget.
  11. Set env’s EnvironmentRecord to be envRec.
  12. Set the outer lexical environment reference of env to the value of F’s [[Environment]] internal slot.
  13. Return env.

8.1.2.5 NewGlobalEnvironment ( G )

When the abstract operation NewGlobalEnvironment is called with an ECMAScript Object G as its argument, the following steps are performed:

  1. Let env be a new Lexical Environment.
  2. Let objRec be a new object Environment Record containing G as the binding object.
  3. Let dclRec be a new declarative Environment Record containing no bindings.
  4. Let globalRec be a new global Environment Record.
  5. Set globalRec.[[ObjectRecord]] to objRec.
  6. Set globalRec.[[DeclarativeRecord]] to dclRec.
  7. Set globalRec.[[VarNames]] to a new empty List.
  8. Set env’s EnvironmentRecord to globalRec.
  9. Set the outer lexical environment reference of env to null
  10. Return env.

8.1.2.6 NewModuleEnvironment (E)

When the abstract operation NewModuleEnvironment is called with a Lexical Environment argument E the following steps are performed:

  1. Let env be a new Lexical Environment.
  2. Let envRec be a new module Environment Record containing no bindings.
  3. Set env’s EnvironmentRecord to be envRec.
  4. Set the outer lexical environment reference of env to E.
  5. Return env.

8.2 Code Realms

Before it is evaluated, all ECMAScript code must be associated with a Realm. Conceptually, a realm consists of a set of intrinsic objects, an ECMAScript global environment, all of the ECMAScript code that is loaded within the scope of that global environment, and other associated state and resources.

A Realm is specified as a Record with the fields specified in Table 21:

Table 21 — Realm Record Fields
Field Name Value Meaning
[[intrinsics]] Record whose field names are intrinsic keys and whose values are objects These are the intrinsic values used by code associated with this Realm
[[globalThis]] Object The global object for this Realm
[[globalEnv]] Lexical Environment The global environment for this Realm
[[templateMap]] A List of Record { [[strings]]: List, [[array]]: Object}. Template objects are canonicalized separately for each Realm using its [[templateMap]]. Each [[strings]] value is a List containing, in source text order, the raw string values of a TemplateLiteral that has been evaluated. The associated [[array]] value is the corresponding template object that is passed to a tag function.

An implementation may define other, implementation specific fields.

8.2.1 CreateRealm ( )

The abstract operation CreateRealm with no arguments performs the following steps:

  1. Let realmRec be a new Record.
  2. Perform CreateIntrinsics(realmRec).
  3. Set realmRec.[[globalThis]] to undefined.
  4. Set realmRec.[[globalEnv]] to undefined.
  5. Set realmRec.[[templateMap]] to a new empty List.
  6. Return realmRec.

8.2.2 CreateIntrinsics ( realmRec )

When the abstract operation CreateIntrinsics with argument realmRec performs the following steps:

  1. Let intrinsics be a new Record.
  2. Set realmRec.[[intrinsics]] to intrinsics.
  3. Let objProto be ObjectCreate(null).
  4. Set intrinsics.[[%ObjectPrototype%]] to objProto.
  5. Let throwerSteps be the algorithm steps specified in 9.2.7.1 for the %ThrowTypeError% function.
  6. Let thrower be CreateBuiltinFunction(realmRec, throwerSteps, null).
  7. Set intrinsics.[[%ThrowTypeError%]] to thrower.
  8. Let noSteps be an empty sequence of algorithm steps.
  9. Let funcProto be CreateBuiltinFunction(realmRec, noSteps, objProto).
  10. Set intrinsics.[[%FunctionPrototype%]] to funcProto.
  11. Call thrower.[[SetPrototypeOf]](funcProto).
  12. Perform AddRestrictedFunctionProperties(funcProto, realmRec).
  13. Set fields of intrinsics with the values listed in Table 7 that have not already been handled above. The field names are the names listed in column one of the table. The value of each field is a new object value fully and recursively populated with property values as defined by the specification of each object in clauses 18-26. All object property values are newly created object values. All values that are built-in function objects are created by performing CreateBuiltinFunction(realmRec, <steps>, <prototype>, <slots>) where <steps> is the definition of that function provided by this specification, <prototype> is the specified value of the function’s [[Prototype]] internal slot and <slots> is a list of the names, if any, of the functions specified internal slots. The creation of the intrinsics and their properties must be ordered to avoid any dependencies upon objects that have not yet been created.
  14. Return intrinsics.

8.2.3 SetRealmGlobalObject ( realmRec, globalObj )

The abstract operation SetRealmGlobalObject with arguments realmRec and globalObj performs the following steps:

  1. If globalObj is undefined, then
    1. Let intrinsics be realmRec.[[intrinsics]].
    2. Let globalObj be ObjectCreate(intrinsics.[[%ObjectPrototype%]]).
  2. Assert: Type(globalObj) is Object.
  3. Set realmRec.[[globalThis]] to globalObj.
  4. Let newGlobalEnv be NewGlobalEnvironment(globalObj).
  5. Set realmRec.[[globalEnv]] to newGlobalEnv.
  6. Return realmRec.

8.2.4 SetDefaultGlobalBindings ( realmRec )

The abstract operation SetDefaultGlobalBindings with argument realmRec performs the following steps:

  1. Let global be realmRec.[[globalThis]].
  2. For each property of the Global Object specified in clause 18, do
    1. Let name be the string value of the property name.
    2. Let desc be the fully populated data property descriptor for the property containing the specified attributes for the property. For properties listed in 18.2, 18.3, or 18.4 the value of the [[Value]] attribute is the corresponding intrinsic object from realmRec.
    3. Let status be DefinePropertyOrThrow(global, name, desc).
    4. ReturnIfAbrupt(status).
  3. Return global.

8.3 Execution Contexts

An execution context is a specification device that is used to track the runtime evaluation of code by an ECMAScript implementation. At any point in time, there is at most one execution context that is actually executing code. This is known as the running execution context. A stack is used to track execution contexts. The running execution context is always the top element of this stack. A new execution context is created whenever control is transferred from the executable code associated with the currently running execution context to executable code that is not associated with that execution context. The newly created execution context is pushed onto the stack and becomes the running execution context.

An execution context contains whatever implementation specific state is necessary to track the execution progress of its associated code. Each execution context has at least the state components listed in Table 22.

Table 22 —State Components for All Execution Contexts
Component Purpose
code evaluation state Any state needed to perform, suspend, and resume evaluation of the code associated with this execution context.
Function If this execution context is evaluating the code of a function object, then the value of this component is that function object. If the context is evaluating the code of a Script or Module, the value is null.
Realm The Realm from which associated code accesses ECMAScript resources.

Evaluation of code by the running execution context may be suspended at various points defined within this specification. Once the running execution context has been suspended a different execution context may become the running execution context and commence evaluating its code. At some later time a suspended execution context may again become the running execution context and continue evaluating its code at the point where it had previously been suspended. Transition of the running execution context status among execution contexts usually occurs in stack-like last-in/first-out manner. However, some ECMAScript features require non-LIFO transitions of the running execution context.

The value of the Realm component of the running execution context is also called the current Realm. The value of the Function component of the running execution context is also called the active function object.

Execution contexts for ECMAScript code have the additional state components listed in Table 23.

Table 23 — Additional State Components for ECMAScript Code Execution Contexts
Component Purpose
LexicalEnvironment Identifies the Lexical Environment used to resolve identifier references made by code within this execution context.
VariableEnvironment Identifies the Lexical Environment whose EnvironmentRecord holds bindings created by VariableStatements within this execution context.

The LexicalEnvironment and VariableEnvironment components of an execution context are always Lexical Environments. When an execution context is created its LexicalEnvironment and VariableEnvironment components initially have the same value.

Execution contexts representing the evaluation of generator objects have the additional state components listed in Table 24.

Table 24 — Additional State Components for Generator Execution Contexts
Component Purpose
Generator The GeneratorObject that this execution context is evaluating.

In most situations only the running execution context (the top of the execution context stack) is directly manipulated by algorithms within this specification. Hence when the terms “LexicalEnvironment”, and “VariableEnvironment” are used without qualification they are in reference to those components of the running execution context.

An execution context is purely a specification mechanism and need not correspond to any particular artefact of an ECMAScript implementation. It is impossible for ECMAScript code to directly access or observe an execution context.

8.3.1 ResolveBinding ( name, [env] )

The ResolveBinding abstract operation is used to determine the binding of name passed as a string value. The optional argument env can be used to explicitly provide the Lexical Environment that is to be searched for the binding. During execution of ECMAScript code, ResolveBinding is performed using the following algorithm:

  1. If env was not passed or if env is undefined, then
    1. Let env be the running execution context’s LexicalEnvironment.
  2. Assert: env is a Lexical Environment.
  3. If the code matching the syntactic production that is being evaluated is contained in strict mode code, let strict be true, else let strict be false.
  4. Return GetIdentifierReference(env, name, strict ).

NOTE The result of ResolveBinding is always a Reference value with its referenced name component equal to the name argument.

8.3.2 GetThisEnvironment ( )

The abstract operation GetThisEnvironment finds the Environment Record that currently supplies the binding of the keyword this. GetThisEnvironment performs the following steps:

  1. Let lex be the running execution context’s LexicalEnvironment.
  2. Repeat
    1. Let envRec be lex’s EnvironmentRecord.
    2. Let exists be envRec.HasThisBinding().
    3. If exists is true, return envRec.
    4. Let outer be the value of lex’s outer environment reference.
    5. Let lex be outer.

NOTE The loop in step 2 will always terminate because the list of environments always ends with the global environment which has a this binding.

8.3.3 ResolveThisBinding ( )

The abstract operation ResolveThisBinding determines the binding of the keyword this using the LexicalEnvironment of the running execution context. ResolveThisBinding performs the following steps:

  1. Let envRec be GetThisEnvironment( ).
  2. Return envRec.GetThisBinding().

8.3.4 GetNewTarget ( )

The abstract operation GetNewTarget determines the NewTarget value using the LexicalEnvironment of the running execution context. GetNewTarget performs the following steps:

  1. Let envRec be GetThisEnvironment( ).
  2. Assert: envRec has a [[NewTarget]] field.
  3. Return envRec.[[NewTarget]].

8.3.5 GetGlobalObject ( )

The abstract operation GetGlobalObject returns the global object used by the currently running execution context. GetGlobalObject performs the following steps:

  1. Let ctx be the running execution context.
  2. Let currentRealm be ctx’s Realm.
  3. Return currentRealm.[[globalThis]].

8.4 Jobs and Job Queues

A Job is an abstract operation that initiates an ECMAScript computation when no other ECMAScript computation is currently in progress. A Job abstract operation may be defined to accept an arbitrary set of job parameters.

Execution of a Job can be initiated only when there is no running execution context and the execution context stack is empty. A PendingJob is a request for the future execution of a Job. A PendingJob is an internal Record whose fields are specified in Table 25. Once execution of a Job is initiated, the Job always executes to completion. No other Job may be initiated until the currently running Job completes. However, the currently running Job or external events may cause the enqueuing of additional PendingJobs that may be initiated sometime after completion of the currently running Job.

Table 25 — PendingJob Record Fields
Field Name Value Meaning
[[Job]] The name of a Job abstract operation This is the abstract operation that is performed when execution of this PendingJob is initiated. Jobs are abstract operations that use NextJob rather than Return to indicate that they have completed.
[[Arguments]] A List The List of argument values that are to be passed to [[Job]] when it is activated.
[[Realm]] A Realm Record The Realm for the initial execution context when this Pending Job is initiated.
[[HostDefined]] Any, default value is undefined. Field reserved for use by host environments that need to associate additional information with a pending Job.

A Job Queue is a FIFO queue of PendingJob records. Each Job Queue has a name and the full set of available Job Queues are defined by an ECMAScript implementation. Every ECMAScript implementation has at least the Job Queues defined in Table 26.

Table 26 — Required Job Queues
Name Purpose
ScriptJobs Jobs that validate and evaluate ECMAScript Script and Module source text. See clauses 10 and 15.
PromiseJobs Jobs that are responses to the settlement of a Promise (see 25.4).

A request for the future execution of a Job is made by enqueueing, on a Job Queue, a PendingJob record that includes a Job abstract operation name and any necessary argument values. When there is no running execution context and the execution context stack is empty, the ECMAScript implementation removes the first PendingJob from a Job Queue and uses the information contained in it to create an execution context and starts execution of the associated Job abstract operation.

The PendingJob records from a single Job Queue are always initiated in FIFO order. This specification does not define the order in which multiple Job Queues are serviced. An ECMAScript implementation may interweave the FIFO evaluation of the PendingJob records of a Job Queue with the evaluation of the PendingJob records of one or more other Job Queues. An implementation must define what occurs when there are no running execution context and all Job Queues are empty.

NOTE Typically an ECMAScript implementation will have its Job Queues pre-initialized with at least one PendingJob and one of those Jobs will be the first to be executed. An implementation might choose to free all resources and terminate if the current Job completes and all Job Queues are empty. Alternatively, it might choose to wait for a some implementation specific agent or mechanism to enqueue new PendingJob requests.

The following abstract operations are used to create and manage Jobs and Job Queues:

8.4.1 EnqueueJob ( queueName, job, arguments)

The EnqueueJob abstract operation requires three arguments: queueName, job, and arguments. It performs the following steps:

  1. Assert: Type(queueName) is String and its value is the name of a Job Queue recognized by this implementation.
  2. Assert: job is the name of a Job.
  3. Assert: arguments is a List that has the same number of elements as the number of parameters required by job.
  4. Let callerContext be the running execution context.
  5. Let callerRealm be callerContext’s Realm.
  6. Let pending be PendingJob{ [[Job]]: job, [[Arguments]]: arguments, [[Realm]]: callerRealm, [[HostDefined]]: undefined }.
  7. Perform any implementation or host environment defined processing of pending. This may include modifying the [[HostDefined]] field or any other field of pending.
  8. Add pending at the back of the Job Queue named by queueName.
  9. Return NormalCompletion(empty).

8.4.2 NextJob result

An algorithm step such as:

  1. NextJob result.

is used in Job abstract operations in place of:

  1. Return result.

Job abstract operations must not contain a Return step or a ReturnIfAbrupt step. The NextJob result operation is equivalent to the following steps:

  1. If result is an abrupt completion, perform implementation defined unhandled exception processing.
  2. Suspend the running execution context and remove it from the execution context stack.
  3. Assert: The execution context stack is now empty.
  4. Let nextQueue be a non-empty Job Queue chosen in an implementation defined manner. If all Job Queues are empty, the result is implementation defined.
  5. Let nextPending be the PendingJob record at the front of nextQueue. Remove that record from nextQueue.
  6. Let newContext be a new execution context.
  7. Set newContext’s Realm to nextPending.[[Realm]].
  8. Push newContext onto the execution context stack; newContext is now the running execution context.
  9. Perform any implementation or host environment defined job initialization using nextPending.
  10. Perform the abstract operation named by nextPending.[[Job]] using the elements of nextPending.[[Arguments]] as its arguments.

8.5 ECMAScript Initialization()

An ECMAScript implementation performs the following steps prior to the execution of any Jobs or the evaluation of any ECMAScript code:

  1. Let realm be CreateRealm().
  2. Let newContext be a new execution context.
  3. Set the Function of newContext to null.
  4. Set the Realm of newContext to realm.
  5. Push newContext onto the execution context stack; newContext is now the running execution context.
  6. Let status be InitializeHostDefinedRealm(realm).
  7. If status is an abrupt completion, then
    1. Assert: The first realm could not be created.
    2. Terminate ECMAScript execution.
  8. In an implementation dependent manner, obtain the ECMAScript source texts (see clause 10) for zero or more ECMAScript scripts and/or ECMAScript modules. For each such sourceText do,
    1. If sourceText is the source code of a script, then
      1. Perform EnqueueJob("ScriptJobs", ScriptEvaluationJob, « sourceText »).
    2. Else sourceText is the source code of a module,
      1. Perform EnqueueJob("ScriptJobs", TopLevelModuleEvaluationJob, « sourceText »).
  9. NextJob NormalCompletion(undefined).

8.5.1 InitializeHostDefinedRealm ( realm )

The abstract operation InitializeHostDefinedRealm with parameter realm performs the following steps:

  1. If this implementation requires use of an exotic object to serve as realm’s global object, let global be such an object created in an implementation defined manner. Otherwise, let global be undefined indicating that an ordinary object should be created as the global object.
  2. Perform SetRealmGlobalObject(realm, global).
  3. Let globalObj be SetDefaultGlobalBindings(realm).
  4. ReturnIfAbrupt(globalObj).
  5. Create any implementation defined global object properties on globalObj.
  6. Return NormalCompletion(undefined).

9 Ordinary and Exotic Objects Behaviours

9.1 Ordinary Object Internal Methods and Internal Slots

All ordinary objects have an internal slot called [[Prototype]]. The value of this internal slot is either null or an object and is used for implementing inheritance. Data properties of the [[Prototype]] object are inherited (are visible as properties of the child object) for the purposes of get access, but not for set access. Accessor properties are inherited for both get access and set access.

Every ordinary object has a Boolean-valued [[Extensible]] internal slot that controls whether or not properties may be added to the object. If the value of the [[Extensible]] internal slot is false then additional properties may not be added to the object. In addition, if [[Extensible]] is false the value of the [[Prototype]] internal slot of the object may not be modified. Once the value of an object’s [[Extensible]] internal slot has been set to false it may not be subsequently changed to true.

In the following algorithm descriptions, assume O is an ordinary object, P is a property key value, V is any ECMAScript language value, and Desc is a Property Descriptor record.

9.1.1 [[GetPrototypeOf]] ( )

When the [[GetPrototypeOf]] internal method of O is called the following steps are taken:

  1. Return the value of the [[Prototype]] internal slot of O.

9.1.2 [[SetPrototypeOf]] (V)

When the [[SetPrototypeOf]] internal method of O is called with argument V the following steps are taken:

  1. Assert: Either Type(V) is Object or Type(V) is Null.
  2. Let extensible be the value of the [[Extensible]] internal slot of O.
  3. Let current be the value of the [[Prototype]] internal slot of O.
  4. If SameValue(V, current), return true.
  5. If extensible is false, return false.
  6. Let p be V.
  7. Let done be false.
  8. Repeat while done is false,
    1. If p is null, let done be true.
    2. Else, if SameValue(p, O) is true, return false.
    3. Else,
      1. If the [[GetPrototypeOf]] internal method of p is not the ordinary object internal method defined in 9.1.1, let done be true.
      2. Else, let p be the value of p’s [[Prototype]] internal slot.
  9. Set the value of the [[Prototype]] internal slot of O to V.
  10. Return true.

NOTE The loop in step 8 guarantees that there will be no circularities in any prototype chain that only includes objects that use the ordinary object definitions for [[GetPrototypeOf]] and [[SetPrototypeOf]].

9.1.3 [[IsExtensible]] ( )

When the [[IsExtensible]] internal method of O is called the following steps are taken:

  1. Return the value of the [[Extensible]] internal slot of O.

9.1.4 [[PreventExtensions]] ( )

When the [[PreventExtensions]] internal method of O is called the following steps are taken:

  1. Set the value of the [[Extensible]] internal slot of O to false.
  2. Return true.

9.1.5 [[GetOwnProperty]] (P)

When the [[GetOwnProperty]] internal method of O is called with property key P, the following steps are taken:

  1. Return OrdinaryGetOwnProperty(O, P).

9.1.5.1 OrdinaryGetOwnProperty (O, P)

When the abstract operation OrdinaryGetOwnProperty is called with Object O and with property key P, the following steps are taken:

  1. Assert: IsPropertyKey(P) is true.
  2. If O does not have an own property with key P, return undefined.
  3. Let D be a newly created Property Descriptor with no fields.
  4. Let X be O’s own property whose key is P.
  5. If X is a data property, then
    1. Set D.[[Value]] to the value of X’s [[Value]] attribute.
    2. Set D.[[Writable]] to the value of X’s [[Writable]] attribute
  6. Else X is an accessor property, so
    1. Set D.[[Get]] to the value of X’s [[Get]] attribute.
    2. Set D.[[Set]] to the value of X’s [[Set]] attribute.
  7. Set D.[[Enumerable]] to the value of X’s [[Enumerable]] attribute.
  8. Set D.[[Configurable]] to the value of X’s [[Configurable]] attribute.
  9. Return D.

9.1.6 [[DefineOwnProperty]] (P, Desc)

When the [[DefineOwnProperty]] internal method of O is called with property key P and Property Descriptor Desc, the following steps are taken:

  1. Return OrdinaryDefineOwnProperty(O, P, Desc).

9.1.6.1 OrdinaryDefineOwnProperty (O, P, Desc)

When the abstract operation OrdinaryDefineOwnProperty is called with Object O, property key P, and Property Descriptor Desc the following steps are taken:

  1. Let current be O.[[GetOwnProperty]](P).
  2. ReturnIfAbrupt(current).
  3. Let extensible be the value of the [[Extensible]] internal slot of O.
  4. Return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current).

9.1.6.2 IsCompatiblePropertyDescriptor (Extensible, Desc, Current)

When the abstract operation IsCompatiblePropertyDescriptor is called with Boolean value Extensible, and Property Descriptors Desc, and Current the following steps are taken:

  1. Return ValidateAndApplyPropertyDescriptor(undefined, undefined, Extensible, Desc, Current).

9.1.6.3 ValidateAndApplyPropertyDescriptor (O, P, extensible, Desc, current)

When the abstract operation ValidateAndApplyPropertyDescriptor is called with Object O, property key P, Boolean value extensible, and Property Descriptors Desc, and current the following steps are taken:

This algorithm contains steps that test various fields of the Property Descriptor Desc for specific values. The fields that are tested in this manner need not actually exist in Desc. If a field is absent then its value is considered to be false.

NOTE If undefined is passed as the O argument only validation is performed and no object updates are performed.

  1. Assert: If O is not undefined then P is a valid property key.
  2. If current is undefined, then
    1. If extensible is false, return false.
    2. Assert: extensible is true.
    3. If IsGenericDescriptor(Desc) or IsDataDescriptor(Desc) is true, then
      1. If O is not undefined, create an own data property named P of object O whose [[Value]], [[Writable]], [[Enumerable]] and [[Configurable]] attribute values are described by Desc. If the value of an attribute field of Desc is absent, the attribute of the newly created property is set to its default value.
    4. Else Desc must be an accessor Property Descriptor,
      1. If O is not undefined, create an own accessor property named P of object O whose [[Get]], [[Set]], [[Enumerable]] and [[Configurable]] attribute values are described by Desc. If the value of an attribute field of Desc is absent, the attribute of the newly created property is set to its default value.
    5. Return true.
  3. Return true, if every field in Desc is absent.
  4. Return true, if every field in Desc also occurs in current and the value of every field in Desc is the same value as the corresponding field in current when compared using the SameValue algorithm.
  5. If the [[Configurable]] field of current is false, then
    1. Return false, if the [[Configurable]] field of Desc is true.
    2. Return false, if the [[Enumerable]] field of Desc is present and the [[Enumerable]] fields of current and Desc are the Boolean negation of each other.
  6. If IsGenericDescriptor(Desc) is true, no further validation is required.
  7. Else if IsDataDescriptor(current) and IsDataDescriptor(Desc) have different results, then
    1. Return false, if the [[Configurable]] field of current is false.
    2. If IsDataDescriptor(current) is true, then
      1. If O is not undefined, convert the property named P of object O from a data property to an accessor property. Preserve the existing values of the converted property’s [[Configurable]] and [[Enumerable]] attributes and set the rest of the property’s attributes to their default values.
    3. Else,
      1. If O is not undefined, convert the property named P of object O from an accessor property to a data property. Preserve the existing values of the converted property’s [[Configurable]] and [[Enumerable]] attributes and set the rest of the property’s attributes to their default values.
  8. Else if IsDataDescriptor(current) and IsDataDescriptor(Desc) are both true, then
    1. If the [[Configurable]] field of current is false, then
      1. Return false, if the [[Writable]] field of current is false and the [[Writable]] field of Desc is true.
      2. If the [[Writable]] field of current is false, then
        1. Return false, if the [[Value]] field of Desc is present and SameValue(Desc.[[Value]], current.[[Value]]) is false.
    2. Else the [[Configurable]] field of current is true, so any change is acceptable.
  9. Else IsAccessorDescriptor(current) and IsAccessorDescriptor(Desc) are both true,
    1. If the [[Configurable]] field of current is false, then
      1. Return false, if the [[Set]] field of Desc is present and SameValue(Desc.[[Set]], current.[[Set]]) is false.
      2. Return false, if the [[Get]] field of Desc is present and SameValue(Desc.[[Get]], current.[[Get]]) is false.
  10. If O is not undefined, then
    1. For each field of Desc that is present, set the corresponding attribute of the property named P of object O to the value of the field.
  11. Return true.

NOTE Step 8.b allows any field of Desc to be different from the corresponding field of current if current’s [[Configurable]] field is true. This even permits changing the [[Value]] of a property whose [[Writable]] attribute is false. This is allowed because a true [[Configurable]] attribute would permit an equivalent sequence of calls where [[Writable]] is first set to true, a new [[Value]] is set, and then [[Writable]] is set to false.

9.1.7 [[HasProperty]](P)

When the [[HasProperty]] internal method of O is called with property key P, the following steps are taken:

  1. Return OrdinaryHasProperty(O, P).

9.1.7.1 OrdinaryHasProperty (O, P)

When the abstract operation OrdinaryHasProperty is called with Object O and with property key P, the following steps are taken:

  1. Assert: IsPropertyKey(P) is true.
  2. Let hasOwn be OrdinaryGetOwnProperty(O, P).
  3. If hasOwn is not undefined, return true.
  4. Let parent be O.[[GetPrototypeOf]]().
  5. ReturnIfAbrupt(parent).
  6. If parent is not null, then
    1. Return parent.[[HasProperty]](P).
  7. Return false.

9.1.8 [[Get]] (P, Receiver)

When the [[Get]] internal method of O is called with property key P and ECMAScript language value Receiver the following steps are taken:

  1. Assert: IsPropertyKey(P) is true.
  2. Let desc be O.[[GetOwnProperty]](P).
  3. ReturnIfAbrupt(desc).
  4. If desc is undefined, then
    1. Let parent be O.[[GetPrototypeOf]]().
    2. ReturnIfAbrupt(parent).
    3. If parent is null, return undefined.
    4. Return parent.[[Get]](P, Receiver).
  5. If IsDataDescriptor(desc) is true, return desc.[[Value]].
  6. Otherwise, IsAccessorDescriptor(desc) must be true so, let getter be desc.[[Get]].
  7. If getter is undefined, return undefined.
  8. Return Call(getter, Receiver).

9.1.9 [[Set]] ( P, V, Receiver)

When the [[Set]] internal method of O is called with property key P, value V, and ECMAScript language value Receiver, the following steps are taken:

  1. Assert: IsPropertyKey(P) is true.
  2. Let ownDesc be O.[[GetOwnProperty]](P).
  3. ReturnIfAbrupt(ownDesc).
  4. If ownDesc is undefined, then
    1. Let parent be O.[[GetPrototypeOf]]().
    2. ReturnIfAbrupt(parent).
    3. If parent is not null, then
      1. Return parent.[[Set]](P, V, Receiver).
    4. Else,
      1. Let ownDesc be the PropertyDescriptor{[[Value]]: undefined, [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true}.
  5. If IsDataDescriptor(ownDesc) is true, then
    1. If ownDesc.[[Writable]] is false, return false.
    2. If Type(Receiver) is not Object, return false.
    3. Let existingDescriptor be Receiver.[[GetOwnProperty]](P).
    4. ReturnIfAbrupt(existingDescriptor).
    5. If existingDescriptor is not undefined, then
      1. Let valueDesc be the PropertyDescriptor{[[Value]]: V}.
      2. Return Receiver.[[DefineOwnProperty]](P, valueDesc).
    6. Else Receiver does not currently have a property P,
      1. Return CreateDataProperty(Receiver, P, V).
  6. Assert: IsAccessorDescriptor(ownDesc) is true.
  7. Let setter be ownDesc.[[Set]].
  8. If setter is undefined, return false.
  9. Let setterResult be Call(setter, Receiver, «V»).
  10. ReturnIfAbrupt(setterResult).
  11. Return true.

9.1.10 [[Delete]] (P)

When the [[Delete]] internal method of O is called with property key P the following steps are taken:

  1. Assert: IsPropertyKey(P) is true.
  2. Let desc be O.[[GetOwnProperty]](P).
  3. ReturnIfAbrupt(desc).
  4. If desc is undefined, return true.
  5. If desc.[[Configurable]] is true, then
    1. Remove the own property with name P from O.
    2. Return true.
  6. Return false.

9.1.11 [[Enumerate]] ()

When the [[Enumerate]] internal method of O is called the following steps are taken:

  1. Return an Iterator object (25.1.1.2) whose next method iterates over all the String-valued keys of enumerable properties of O. The Iterator object must inherit from %IteratorPrototype% (25.1.2). The mechanics and order of enumerating the properties is not specified but must conform to the rules specified below.

The iterator’s next method processes object properties to determine whether the property key should be returned as an iterator value. Returned property keys do not include keys that are Symbols. Properties of the target object may be deleted during enumeration. A property that is deleted before it is processed by the iterator’s next method is ignored. If new properties are added to the target object during enumeration, the newly added properties are not guaranteed to be processed in the active enumeration. A property name will be returned by the iterator’s next method at most once in any enumeration.

Enumerating the properties of the target object includes enumerating properties of its prototype, and the prototype of the prototype, and so on, recursively; but a property of a prototype is not processed if it has the same name as a property that has already been processed by the iterator’s next method. The values of [[Enumerable]] attributes are not considered when determining if a property of a prototype object has already been processed. The enumerable property names of prototype objects must be obtained as if by invoking the prototype object’s [[Enumerate]] internal method. [[Enumerate]] must obtain the own property keys of the target object as if by calling its [[OwnPropertyKeys]] internal method. Property attributes of the target object must be obtained as if by calling its [[GetOwnProperty]] internal method.

NOTE The following is an informative definition of an ECMAScript generator function that conforms to these rules:

function* enumerate(obj) {
let visited=new Set;
for (let key of Reflect.ownKeys(obj)) {
if (typeof key === "string") {
let desc = Reflect.getOwnPropertyDescriptor(obj,key);
if (desc) {
visited.add(key);
if (desc.enumerable) yield key;
}
}
}
let proto = Reflect.getPrototypeOf(obj)
if (proto === null) return;
for (let protoName of Reflect.enumerate(proto)) {
if (!visited.has(protoName)) yield protoName;
}
}

9.1.12 [[OwnPropertyKeys]] ( )

When the [[OwnPropertyKeys]] internal method of O is called the following steps are taken:

  1. Let keys be a new empty List.
  2. For each own property key P of O that is an integer index, in ascending numeric index order
    1. Add P as the last element of keys.
  3. For each own property key P of O that is a String but is not an integer index, in property creation order
    1. Add P as the last element of keys.
  4. For each own property key P of O that is a Symbol, in property creation order
    1. Add P as the last element of keys.
  5. Return keys.

9.1.13 ObjectCreate(proto, internalSlotsList)

The abstract operation ObjectCreate with argument proto (an object or null) is used to specify the runtime creation of new ordinary objects. The optional argument internalSlotsList is a List of the names of additional internal slots that must be defined as part of the object. If the list is not provided, an empty List is used. This abstract operation performs the following steps:

  1. If internalSlotsList was not provided, let internalSlotsList be an empty List.
  2. Let obj be a newly created object with an internal slot for each name in internalSlotsList.
  3. Set obj’s essential internal methods to the default ordinary object definitions specified in 9.1.
  4. Set the [[Prototype]] internal slot of obj to proto.
  5. Set the [[Extensible]] internal slot of obj to true.
  6. Return obj.

9.1.14 OrdinaryCreateFromConstructor ( constructor, intrinsicDefaultProto, internalSlotsList )

The abstract operation OrdinaryCreateFromConstructor creates an ordinary object whose [[Prototype]] value is retrieved from a constructor’s prototype property, if it exists. Otherwise the intrinsic named by intrinsicDefaultProto is used for [[Prototype]]. The optional internalSlotsList is a List of the names of additional internal slots that must be defined as part of the object. If the list is not provided, an empty List is used. This abstract operation performs the following steps:

  1. Assert: intrinsicDefaultProto is a string value that is this specification’s name of an intrinsic object. The corresponding object must be an intrinsic that is intended to be used as the [[Prototype]] value of an object.
  2. Let proto be GetPrototypeFromConstructor(constructor, intrinsicDefaultProto).
  3. ReturnIfAbrupt(proto).
  4. Return ObjectCreate(proto, internalSlotsList).

9.1.15 GetPrototypeFromConstructor ( constructor, intrinsicDefaultProto )

The abstract operation GetPrototypeFromConstructor determines the [[Prototype]] value that should be used to create an object corresponding to a specific constructor. The value is retrieved from the constructor’s prototype property, if it exists. Otherwise the intrinsic named by intrinsicDefaultProto is used for [[Prototype]]. This abstract operation performs the following steps:

  1. Assert: intrinsicDefaultProto is a string value that is this specification’s name of an intrinsic object. The corresponding object must be an intrinsic that is intended to be used as the [[Prototype]] value of an object.
  2. Assert: IsConstructor (constructor) is true.
  3. Let proto be Get(constructor, "prototype").
  4. ReturnIfAbrupt(proto).
  5. If Type(proto) is not Object, then
    1. Let realm be GetFunctionRealm(constructor).
    2. ReturnIfAbrupt(realm).
    3. Let proto be realm’s intrinsic object named intrinsicDefaultProto.
  6. Return proto.

NOTE If constructor does not supply a [[Prototype]] value, the default value that is used is obtained from the Code Realm of the constructor function rather than from the running execution context.

9.2 ECMAScript Function Objects

ECMAScript function objects encapsulate parameterized ECMAScript code closed over a lexical environment and support the dynamic evaluation of that code. An ECMAScript function object is an ordinary object and has the same internal slots and the same internal methods as other ordinary objects. The code of an ECMAScript function object may be either strict mode code (10.2.1) or non-strict mode code. An ECMAScript function object whose code is strict mode code is called a strict function. One whose code is not strict mode code is called a non-strict function.

ECMAScript function objects have the additional internal slots listed in Table 27.

Table 27 — Internal Slots of ECMAScript Function Objects
Internal Slot Type Description
[[Environment]] Lexical Environment The Lexical Environment that the function was closed over. Used as the outer environment when evaluating the code of the function.
[[FormalParameters]] Parse Node The root parse node of the source text that defines the function’s formal parameter list.
[[FunctionKind]] String Either "normal", "classConstructor" or "generator".
[[ECMAScriptCode]] Parse Node The root parse node of the source text that defines the function’s body.
[[ConstructorKind]] String Either "base" or "derived".
[[Realm]] Realm Record The Code Realm in which the function was created and which provides any intrinsic objects that are accessed when evaluating the function.
[[ThisMode]] (lexical, strict, global) Defines how this references are interpreted within the formal parameters and code body of the function. lexical means that this refers to the this value of a lexically enclosing function. strict means that the this value is used exactly as provided by an invocation of the function. global means that a this value of undefined is interpreted as a reference to the global object.
[[Strict]] Boolean true if this is a strict mode function, false if this is not a strict mode function.
[[HomeObject]] Object If the function uses super, this is the object whose [[GetPrototypeOf]] provides the object where super property lookups begin.

All ECMAScript function objects have the [[Call]] internal method defined here. ECMAScript functions that are also constructors in addition have the [[Construct]] internal method. ECMAScript function objects whose code is not strict mode code have the [[GetOwnProperty]] internal method defined here.

9.2.1 [[Call]] ( thisArgument, argumentsList)

The [[Call]] internal method for an ECMAScript function object F is called with parameters thisArgument and argumentsList, a List of ECMAScript language values. The following steps are taken:

  1. Assert: F is an ECMAScript function object.
  2. If F’s [[FunctionKind]] internal slot is "classConstructor", throw a TypeError exception.
  3. Let callerContext be the running execution context.
  4. Let calleeContext be PrepareForOrdinaryCall(F, undefined).
  5. Assert: calleeContext is now the running execution context.
  6. Perform OrdinaryCallBindThis(F, calleeContext, thisArgument).
  7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
  8. Remove calleeContext from the execution context stack and restore callerContext as the running execution context.
  9. If result.[[type]] is return, return NormalCompletion(result.[[value]]).
  10. ReturnIfAbrupt(result).
  11. Return NormalCompletion(undefined).

NOTE When calleeContext is removed from the execution context stack in step 8 it must not be destroyed if it is suspended and retained for later resumption by an accessible generator object.

9.2.1.1 PrepareForOrdinaryCall( F, newTarget )

When the abstract operation PrepareForOrdinaryCall is called with function object F and ECMAScript language value newTarget, the following steps are taken:

  1. Assert: Type(newTarget) is Undefined or Object.
  2. Let callerContext be the running execution context.
  3. Let calleeContext be a new ECMAScript code execution context.
  4. Set the Function of calleeContext to F.
  5. Let calleeRealm be the value of F’s [[Realm]] internal slot.
  6. Set the Realm of calleeContext to calleeRealm.
  7. Let localEnv be NewFunctionEnvironment(F, newTarget).
  8. Set the LexicalEnvironment of calleeContext to localEnv.
  9. Set the VariableEnvironment of calleeContext to localEnv.
  10. If callerContext is not already suspended, Suspend callerContext.
  11. Push calleeContext onto the execution context stack; calleeContext is now the running execution context.
  12. NOTE Any exception objects produced after this point are associated with calleeRealm.
  13. Return calleeContext.

9.2.1.2 OrdinaryCallBindThis ( F, calleeContext, thisArgument )

When the abstract operation OrdinaryCallBindThis is called with function object F, execution context calleeContext, and ECMAScript value thisArgument the following steps are taken:

  1. Let thisMode be the value of F’s [[ThisMode]] internal slot.
  2. If thisMode is lexical, return NormalCompletion(undefined).
  3. Let calleeRealm be the value of F’s [[Realm]] internal slot.
  4. Let localEnv be the LexicalEnvironment of calleeContext.
  5. If thisMode is strict, let thisValue be thisArgument.
  6. Else
    1. if thisArgument is null or undefined, then
      1. Let thisValue be calleeRealm.[[globalThis]].
    2. Else
      1. Let thisValue be ToObject(thisArgument).
      2. Assert: thisValue is not an abrupt completion.
      3. NOTE ToObject produces wrapper objects using calleeRealm.
  7. Let envRec be localEnv’s EnvironmentRecord.
  8. Assert: The next step never returns an abrupt completion because envRec.[[thisBindingStatus]] is "uninitialized".
  9. Return envRec.BindThisValue(thisValue).

9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )

When the abstract operation OrdinaryCallEvaluateBody is called with function object F and List argumentsList the following steps are taken:

  1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
  2. ReturnIfAbrupt(status)
  3. Return the result of EvaluateBody of the parsed code that is the value of F's [[ECMAScriptCode]] internal slot passing F as the argument.

9.2.2 [[Construct]] ( argumentsList, newTarget)

The [[Construct]] internal method for an ECMAScript Function object F is called with parameters argumentsList and newTarget. argumentsList is a possibly empty List of ECMAScript language values. The following steps are taken:

  1. Assert: F is an ECMAScript function object.
  2. Assert: Type(newTarget) is Object.
  3. Let callerContext be the running execution context.
  4. Let kind be F’s [[ConstructorKind]] internal slot.
  5. If kind is "base", then
    1. Let thisArgument be OrdinaryCreateFromConstructor(newTarget, "%ObjectPrototype%").
    2. ReturnIfAbrupt(thisArgument).
  6. Let calleeContext be PrepareForOrdinaryCall(F, newTarget).
  7. Assert: calleeContext is now the running execution context.
  8. If kind is "base", perform OrdinaryCallBindThis(F, calleeContext, thisArgument).
  9. Let constructorEnv be the LexicalEnvironment of calleeContext.
  10. Let envRec be constructorEnv’s EnvironmentRecord.
  11. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
  12. Remove calleeContext from the execution context stack and restore callerContext as the running execution context.
  13. If result.[[type]] is return, then
    1. If Type(result.[[value]]) is Object, return NormalCompletion(result.[[value]]).
    2. If kind is "base", return NormalCompletion(thisArgument).
    3. If result.[[value]] is not undefined, throw a TypeError exception.
  14. Else, ReturnIfAbrupt(result).
  15. Return envRec.GetThisBinding().

9.2.3 FunctionAllocate (functionPrototype, strict [,functionKind] )

The abstract operation FunctionAllocate requires the two arguments functionPrototype and strict. It also accepts one optional argument, functionKind. FunctionAllocate performs the following steps:

  1. Assert: Type(functionPrototype) is Object.
  2. Assert: If functionKind is present, its value is either "normal", "non-constructor" or "generator".
  3. If functionKind is not present, let functionKind be "normal".
  4. If functionKind is "non-constructor", then
    1. Let functionKind be "normal".
    2. Let needsConstruct be false.
  5. Else let needsConstruct be true.
  6. Let F be a newly created ECMAScript function object with the internal slots listed in Table 27. All of those internal slots are initialized to undefined.
  7. Set F’s essential internal methods to the default ordinary object definitions specified in 9.1.
  8. Set F’s [[Call]] internal method to the definition specified in 9.2.1.
  9. If needsConstruct is true, then
    1. Set F’s [[Construct]] internal method to the definition specified in 9.2.2.
    2. If functionKind is "generator", set the [[ConstructorKind]] internal slot of F to "derived".
    3. Else, set the [[ConstructorKind]] internal slot of F to "base".
    4. NOTE Generator functions are tagged as "derived" constructors to prevent [[Construct]] from preallocating a generator instance. Generator instance objects are allocated when EvaluateBody is applied to the GeneratorBody of a generator function.
  10. Set the [[Strict]] internal slot of F to strict.
  11. Set the [[FunctionKind]] internal slot of F to functionKind.
  12. Set the [[Prototype]] internal slot of F to functionPrototype.
  13. Set the [[Extensible]] internal slot of F to true.
  14. Set the [[Realm]] internal slot of F to the running execution context’s Realm.
  15. Return F.

9.2.4 FunctionInitialize (F, kind, ParameterList, Body, Scope)

The abstract operation FunctionInitialize requires the arguments: a function object F, kind which is one of (Normal, Method, Arrow), a parameter list production specified by ParameterList, a body production specified by Body, a Lexical Environment specified by Scope. FunctionInitialize performs the following steps:

  1. Assert: F is an extensible object that does not have a length own property.
  2. Let len be the ExpectedArgumentCount of ParameterList.
  3. Let status be DefinePropertyOrThrow(F, "length", PropertyDescriptor{[[Value]]: len, [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true}).
  4. Assert: status is not an abrupt completion.
  5. Let Strict be the value of the [[Strict]] internal slot of F.
  6. Set the [[Environment]] internal slot of F to the value of Scope.
  7. Set the [[FormalParameters]] internal slot of F to ParameterList .
  8. Set the [[ECMAScriptCode]] internal slot of F to Body.
  9. If kind is Arrow, set the [[ThisMode]] internal slot of F to lexical.
  10. Else if Strict is true, set the [[ThisMode]] internal slot of F to strict.
  11. Else set the [[ThisMode]] internal slot of F to global.
  12. Return F.

9.2.5 FunctionCreate (kind, ParameterList, Body, Scope, Strict, prototype)

The abstract operation FunctionCreate requires the arguments: kind which is one of (Normal, Method, Arrow), a parameter list production specified by ParameterList, a body production specified by Body, a Lexical Environment specified by Scope, a Boolean flag Strict, and optionally, an object prototype. FunctionCreate performs the following steps:

  1. If the prototype argument was not passed, then
    1. Let prototype be the intrinsic object %FunctionPrototype%.
  2. If kind is not Normal, let allocKind be "non-constructor".
  3. Else let allocKind be "normal".
  4. Let F be FunctionAllocate(prototype, Strict, allocKind).
  5. Return FunctionInitialize(F, kind, ParameterList, Body, Scope).

9.2.6 GeneratorFunctionCreate (kind, ParameterList, Body, Scope, Strict)

The abstract operation GeneratorFunctionCreate requires the arguments: kind which is one of (Normal, Method), a parameter list production specified by ParameterList, a body production specified by Body, a Lexical Environment specified by Scope, and a Boolean flag Strict. GeneratorFunctionCreate performs the following steps:

  1. Let functionPrototype be the intrinsic object %Generator%.
  2. Let F be FunctionAllocate(functionPrototype, Strict, "generator").
  3. Return FunctionInitialize(F, kind, ParameterList, Body, Scope).

9.2.7 AddRestrictedFunctionProperties ( F, realm )

The abstract operation AddRestrictedFunctionProperties is called with a function object F and Realm Record realm as its argument. It performs the following steps:

  1. Assert: realm.[[intrinsics]].[[%ThrowTypeError%]] exists and has been initialized.
  2. Let thrower be realm.[[intrinsics]].[[%ThrowTypeError%]].
  3. Let status be DefinePropertyOrThrow(F, "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: true}).
  4. Assert: status is not an abrupt completion.
  5. Return DefinePropertyOrThrow(F , "arguments", PropertyDescriptor {[[Get]]: thrower, [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: true}).
  6. Assert: The above returned value is not an abrupt completion.

9.2.7.1 %ThrowTypeError% ( )

The %ThrowTypeError% intrinsic is an anonymous built-in function object that is defined once for each Realm. When %ThrowTypeError% is called it performs the following steps:

  1. Throw a TypeError exception.

The value of the [[Extensible]] internal slot of a %ThrowTypeError% function is false.

The length property of a %ThrowTypeError% function has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }.

9.2.8 MakeConstructor (F, writablePrototype, prototype)

The abstract operation MakeConstructor requires a Function argument F and optionally, a Boolean writablePrototype and an object prototype. If prototype is provided it is assumed to already contain, if needed, a "constructor" property whose value is F. This operation converts F into a constructor by performing the following steps:

  1. Assert: F is an ECMAScript function object.
  2. Assert: F has a [[Construct]] internal method.
  3. Assert: F is an extensible object that does not have a prototype own property.
  4. Let installNeeded be false.
  5. If the prototype argument was not provided, then
    1. Let installNeeded be true.
    2. Let prototype be ObjectCreate(%ObjectPrototype%).
  6. If the writablePrototype argument was not provided, then
    1. Let writablePrototype be true.
  7. If installNeeded, then
    1. Let status be DefinePropertyOrThrow(prototype, "constructor", PropertyDescriptor{[[Value]]: F, [[Writable]]: writablePrototype, [[Enumerable]]: false, [[Configurable]]: writablePrototype }).
    2. Assert: status is not an abrupt completion.
  8. Let status be DefinePropertyOrThrow(F, "prototype", PropertyDescriptor{[[Value]]: prototype, [[Writable]]: writablePrototype, [[Enumerable]]: false, [[Configurable]]: false}).
  9. Assert: status is not an abrupt completion.
  10. Return NormalCompletion(undefined).

9.2.9 MakeClassConstructor ( F)

The abstract operation MakeClassConstructor with argument F performs the following steps:

  1. Assert: F is an ECMAScript function object.
  2. Assert: F’s [[FunctionKind]] internal slot is "normal".
  3. Set F’s [[FunctionKind]] internal slot to "classConstructor".
  4. Return NormalCompletion(undefined).

9.2.10 MakeMethod ( F, homeObject)

The abstract operation MakeMethod with arguments F and homeObject configures F as a method by performing the following steps:

  1. Assert: F is an ECMAScript function object.
  2. Assert: Type(homeObject ) is Object.
  3. Set the [[HomeObject]] internal slot of F to homeObject.
  4. Return NormalCompletion(undefined).

9.2.11 SetFunctionName (F, name, prefix)

The abstract operation SetFunctionName requires a Function argument F, a String or Symbol argument name and optionally a String argument prefix. This operation adds a name property to F by performing the following steps:

  1. Assert: F is an extensible object that does not have a name own property.
  2. Assert: Type(name) is either Symbol or String.
  3. Assert: If prefix was passed then Type(prefix) is String.
  4. If Type(name) is Symbol, then
    1. Let description be name’s [[Description]] value.
    2. If description is undefined, let name be the empty String.
    3. Else, let name be the concatenation of "[", description, and "]".
  5. If prefix was passed, then
    1. Let name be the concatenation of prefix, code unit 0x0020 (SPACE), and name.
  6. Return DefinePropertyOrThrow(F, "name", PropertyDescriptor{[[Value]]: name, [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true}).
  7. Assert: the result is never an abrupt completion.

9.2.12 FunctionDeclarationInstantiation(func, argumentsList)

NOTE When an execution context is established for evaluating an ECMAScript function a new function Environment Record is created and bindings for each formal parameter are instantiated in that Environment Record. Each declaration in the function body is also instantiated. If the function’s formal parameters do not include any default value initializers then the body declarations are instantiated in the same Environment Record as the parameters. If default value parameter initializers exist, a second Environment Record is created for the body declarations. Formal parameters and functions are initialized as part of FunctionDeclarationInstantiation. All other bindings are initialized during evaluation of the function body.

FunctionDeclarationInstantiation is performed as follows using arguments func and argumentsList. func is the function object for which the execution context is being established.

  1. Let calleeContext be the running execution context.
  2. Let env be the LexicalEnvironment of calleeContext.
  3. Let envRec be env’s Environment Record.
  4. Let code be the value of the [[ECMAScriptCode]] internal slot of func.
  5. Let strict be the value of the [[Strict]] internal slot of func.
  6. Let formals be the value of the [[FormalParameters]] internal slot of func.
  7. Let parameterNames be the BoundNames of formals.
  8. If parameterNames has any duplicate entries, let hasDuplicates be true. Otherwise, let hasDuplicates be false.
  9. Let simpleParameterList be IsSimpleParameterList of formals.
  10. Let hasParameterExpressions be ContainsExpression of formals.
  11. Let varNames be the VarDeclaredNames of code.
  12. Let varDeclarations be the VarScopedDeclarations of code.
  13. Let lexicalNames be the LexicallyDeclaredNames of code.
  14. Let functionNames be an empty List.
  15. Let functionsToInitialize be an empty List.
  16. For each d in varDeclarations, in reverse list order do
    1. If d is neither a VariableDeclaration or a ForBinding, then
      1. Assert: d is either a FunctionDeclaration or a GeneratorDeclaration.
      2. Let fn be the sole element of the BoundNames of d.
      3. If fn is not an element of functionNames, then
        1. Insert fn as the first element of functionNames.
        2. NOTE If there are multiple FunctionDeclarations or GeneratorDeclarations for the same name, the last declaration is used.
        3. Insert d as the first element of functionsToInitialize.
  17. Let argumentsObjectNeeded be true.
  18. If the value of the [[ThisMode]] internal slot of func is lexical, then
    1. NOTE Arrow functions never have an arguments objects.
    2. Let argumentsObjectNeeded be false.
  19. Else if "arguments" is an element of parameterNames, then
    1. Let argumentsObjectNeeded be false.
  20. Else if hasParameterExpressions is false, then
    1. If "arguments" is an element of functionNames or if "arguments" is an element of lexicalNames, then
      1. Let argumentsObjectNeeded be false.
  21. For each String paramName in parameterNames, do
    1. Let alreadyDeclared be envRec.HasBinding(paramName).
    2. NOTE Early errors ensure that duplicate parameter names can only occur in non-strict functions that do not have parameter default values or rest parameters.
    3. If alreadyDeclared is false, then
      1. Let status be envRec.CreateMutableBinding(paramName).
      2. If hasDuplicates is true, then
        1. Let status be envRec.InitializeBinding(paramName, undefined).
      3. Assert: status is never an abrupt completion for either of the above operations.
  22. If argumentsObjectNeeded is true, then
    1. If strict is true or if simpleParameterList is false, then
      1. Let ao be CreateUnmappedArgumentsObject(argumentsList).
    2. Else,
      1. NOTE mapped argument object is only provided for non-strict functions that don’t have a rest parameter, any parameter default value initializers, or any destructured parameters .
      2. Let ao be CreateMappedArgumentsObject(func, formals, argumentsList, env).
    3. ReturnIfAbrupt(ao).
    4. If strict is true, then
      1. Let status be envRec.CreateImmutableBinding("arguments").
    5. Else,
      1. Let status be envRec.CreateMutableBinding("arguments").
    6. Assert: status is never an abrupt completion.
    7. Call envRec.InitializeBinding("arguments", ao).
    8. Append "arguments" to parameterNames.
  23. Let iteratorRecord be Record {[[iterator]]: CreateListIterator(argumentsList), [[done]]: false}.
  24. If hasDuplicates is true, then
    1. Let formalStatus be IteratorBindingInitialization for formals with iteratorRecord and undefined as arguments.
  25. Else,
    1. Let formalStatus be IteratorBindingInitialization for formals with iteratorRecord and envRec as arguments.
  26. ReturnIfAbrupt(formalStatus).
  27. If hasParameterExpressions is false, then
    1. NOTE Only a single lexical environment is needed for the parameters and top-level vars.
    2. Let instantiatedVarNames be a copy of the List parameterNames.
    3. For each n in varNames, do
      1. If n is not an element of instantiatedVarNames, then
        1. Append n to instantiatedVarNames.
        2. Let status be envRec.CreateMutableBinding(n).
        3. Assert: status is never an abrupt completion.
        4. Call envRec.InitializeBinding(n, undefined).
    4. Let varEnv be env.
    5. Let varEnvRec be envRec.
  28. Else,
    1. NOTE A separate Environment Record is needed to ensure that closures created by expressions in the formal parameter list do not have visibility of declarations in the function body.
    2. Let varEnv be NewDeclarativeEnvironment(env).
    3. Let varEnvRec be varEnv’s EnvironmentRecord.
    4. Set the VariableEnvironment of calleeContext to varEnv.
    5. Let instantiatedVarNames be a new empty List.
    6. For each n in varNames, do
      1. If n is not an element of instantiatedVarNames, then
        1. Append n to instantiatedVarNames.
        2. Let status be varEnvRec.CreateMutableBinding(n).
        3. Assert: status is never an abrupt completion.
        4. If n is not an element of parameterNames or if n is an element of functionNames, let initialValue be undefined.
        5. else,
          1. Let initialValue be envRec.GetBindingValue(n, false).
          2. ReturnIfAbrupt(initialValue).
        6. Call varEnvRec.InitializeBinding(n, initialValue).
        7. NOTE vars whose names are the same as a formal parameter, initially have the same value as the corresponding initialized parameter.
  29. NOTE: Annex B.3.3 adds additional steps at this point.
  30. If strict is false, then
    1. Let lexEnv be NewDeclarativeEnvironment(varEnv).
    2. NOTE: Non-strict functions use a separate lexical Environment Record for top-level lexical declarations so that a direct eval (see 12.3.4.1) can determine whether any var scoped declarations introduced by the eval code conflict with pre-existing top-level lexically scoped declarations. This is not needed for strict functions because a strict direct eval always places all declarations into a new Environment Record.
  31. Else, let lexEnv be varEnv.
  32. Let lexEnvRec be lexEnv’s EnvironmentRecord.
  33. Set the LexicalEnvironment of calleeContext to lexEnv.
  34. Let lexDeclarations be the LexicallyScopedDeclarations of code.
  35. For each element d in lexDeclarations do
    1. NOTE A lexically declared name cannot be the same as a function/generator declaration, formal parameter, or a var name. Lexically declared names are only instantiated here but not initialized.
    2. For each element dn of the BoundNames of d do
      1. If IsConstantDeclaration of d is true, then
        1. Let status be lexEnvRec.CreateImmutableBinding(dn, true).
      2. Else,
        1. Let status be lexEnvRec.CreateMutableBinding(dn, false).
    3. Assert: status is never an abrupt completion.
  36. For each parsed grammar phrase f in functionsToInitialize, do
    1. Let fn be the sole element of the BoundNames of f.
    2. Let fo be the result of performing InstantiateFunctionObject for f with argument lexEnv.
    3. Let status be varEnvRec.SetMutableBinding(fn, fo, false).
    4. Assert: status is never an abrupt completion.
  37. Return NormalCompletion(empty).

NOTE 1 B.3.3 provides an extension to the above algorithm that is necessary for backwards compatibility with web browser implementations of ECMAScript that predate the sixth edition of ECMA-262.

NOTE 2 Parameter Initializers may contain direct eval expressions (12.3.4.1). Any top level declarations of such evals are only visible to the eval code (10.2). The creation of the environment for such declarations is described in 14.1.18.

9.3 Built-in Function Objects

The built-in function objects defined in this specification may be implemented as either ECMAScript function objects (9.2) whose behaviour is provided using ECMAScript code or as implementation provided exotic function objects whose behaviour is provided in some other manner. In either case, the effect of calling such functions must conform to their specifications. An implementation may also provide additional built-in function objects that are not defined in this specification.

If a built-in function object is implemented as an exotic object it must have the ordinary object behaviour specified in 9.1. All such exotic function objects also have [[Prototype]], [[Extensible]], and [[Realm]] internal slots.

Unless otherwise specified every built-in function object has the %FunctionPrototype% object (19.2.3) as the initial value of its [[Prototype]] internal slot.

The behaviour specified for each built-in function via algorithm steps or other means is the specification of the function body behaviour for both [[Call]] and [[Construct]] invocations of the function. However, [[Construct]] invocation is not supported by all built-in functions. For each built-in function, when invoked with [[Call]], the [[Call]] thisArgument provides the this value, the [[Call]] argumentsList provides the named parameters, and the NewTarget value is undefined. When invoked with [[Construct]], the this value is uninitialized, the [[Construct]] argumentsList provides the named parameters, and the [[Construct]] newTarget parameter provides the NewTarget value. If the built-in function is implemented as an ECMAScript function object then this specified behaviour must be implemented by the ECMAScript code that is the body of the function. Built-in functions that are ECMAScript function objects must be strict mode functions. If a built-in constructor has any [[Call]] behaviour other than throwing a TypeError exception, an ECMAScript implementation of the function must be done in a manner that does not cause the function’s [[FunctionKind]] internal slot to have the value "classConstructor".

Built-in function objects that are not identified as constructors do not implement the [[Construct]] internal method unless otherwise specified in the description of a particular function. When a built-in constructor is called as part of a new expression the argumentsList parameter of the invoked [[Construct]] internal method provides the values for the built-in constructor’s named parameters.

Built-in functions that are not constructors do not have a prototype property unless otherwise specified in the description of a particular function.

If a built-in function object is not implemented as an ECMAScript function it must provide [[Call]] and [[Construct]] internal methods that conform to the following definitions:

9.3.1 [[Call]] ( thisArgument, argumentsList)

The [[Call]] internal method for a built-in function object F is called with parameters thisArgument and argumentsList, a List of ECMAScript language values. The following steps are taken:

  1. Let callerContext be the running execution context.
  2. If callerContext is not already suspended, Suspend callerContext.
  3. Let calleeContext be a new ECMAScript code execution context.
  4. Set the Function of calleeContext to F.
  5. Let calleeRealm be the value of F’s [[Realm]] internal slot.
  6. Set the Realm of calleeContext to calleeRealm.
  7. Perform any necessary implementation defined initialization of calleeContext.
  8. Push calleeContext onto the execution context stack; calleeContext is now the running execution context.
  9. Let result be the Completion Record that is the result of evaluating F in an implementation defined manner that conforms to the specification of F. thisArgument is the this value, argumentsList provides the named parameters, and the NewTarget value is undefined.
  10. Remove calleeContext from the execution context stack and restore callerContext as the running execution context.
  11. Return result.

NOTE 1 When calleeContext is removed from the execution context stack it must not be destroyed if it has been suspended and retained by an accessible generator object for later resumption.

9.3.2 [[Construct]] (argumentsList, newTarget)

The [[Construct]] internal method for built-in function object F is called with parameters argumentsList and newTarget. The steps performed are the same as [[Call]] (see 9.3.1) except that step 9 is replaced by:

  1. Let result be the Completion Record that is the result of evaluating F in an implementation defined manner that conforms to the specification of F. The this value is uninitialized, argumentsList provides the named parameters, and newTarget provides the NewTarget value.

9.3.3 CreateBuiltinFunction(realm, steps, prototype, internalSlotsList)

The abstract operation CreateBuiltinFunction takes arguments realm, prototype, and steps. The optional argument internalSlotsList is a List of the names of additional internal slots that must be defined as part of the object. If the list is not provided, an empty List is used. CreateBuiltinFunction returns a built-in function object created by the following steps:

  1. Assert: realm is a Realm Record.
  2. Assert: steps is either a set of algorithm steps or other definition of a functions behaviour provided in this specification.
  3. Let func be a new built-in function object that when called performs the action described by steps. The new function object has internal slots whose names are the elements of internalSlotsList. The initial value of each of those internal slots is undefined.
  4. Set the [[Realm]] internal slot of func to realm.
  5. Set the [[Prototype]] internal slot of func to prototype.
  6. Return func.

Each built-in function defined in this specification is created as if by calling the CreateBuiltinFunction abstract operation, unless otherwise specified.

9.4 Built-in Exotic Object Internal Methods and Slots

This specification defines several kinds of built-in exotic objects. These objects generally behave similar to ordinary objects except for a few specific situations. The following exotic objects use the ordinary object internal methods except where it is explicitly specified otherwise below:

9.4.1 Bound Function Exotic Objects

A bound function is an exotic object that wraps another function object. A bound function is callable (it has a [[Call]] internal method and may have a [[Construct]] internal method). Calling a bound function generally results in a call of its wrapped function.

Bound function objects do not have the internal slots of ECMAScript function objects defined in Table 27. Instead they have the internal slots defined in Table 28.

Table 28 — Internal Slots of Exotic Bound Function Objects
Internal Slot Type Description
[[BoundTargetFunction]] Callable Object The wrapped function object.
[[BoundThis]] Any The value that is always passed as the this value when calling the wrapped function.
[[BoundArguments]] List of Any A list of values whose elements are used as the first arguments to any call to the wrapped function.

Unlike ECMAScript function objects, bound function objects do not use an alternative definition of the [[GetOwnProperty]] internal methods. Bound function objects provide all of the essential internal methods as specified in 9.1. However, they use the following definitions for the essential internal methods of function objects.

9.4.1.1 [[Call]] ( thisArgument, argumentsList)

When the [[Call]] internal method of an exotic bound function object, F, which was created using the bind function is called with parameters thisArgument and argumentsList, a List of ECMAScript language values, the following steps are taken:

  1. Let target be the value of F’s [[BoundTargetFunction]] internal slot.
  2. Let boundThis be the value of F’s [[BoundThis]] internal slot.
  3. Let boundArgs be the value of F’s [[BoundArguments]] internal slot.
  4. Let args be a new list containing the same values as the list boundArgs in the same order followed by the same values as the list argumentsList in the same order.
  5. Return Call(target, boundThis, args).

9.4.1.2 [[Construct]] (argumentsList, newTarget)

When the [[Construct]] internal method of an exotic bound function object, F that was created using the bind function is called with a list of arguments argumentsList and newTarget, the following steps are taken:

  1. Let target be the value of F’s [[BoundTargetFunction]] internal slot.
  2. Assert: target has a [[Construct]] internal method.
  3. Let boundArgs be the value of F’s [[BoundArguments]] internal slot.
  4. Let args be a new list containing the same values as the list boundArgs in the same order followed by the same values as the list argumentsList in the same order.
  5. If SameValue(F, newTarget) is true, let newTarget be target.
  6. Return Construct(target, args, newTarget).

9.4.1.3 BoundFunctionCreate (targetFunction, boundThis, boundArgs)

The abstract operation BoundFunctionCreate with arguments targetFunction, boundThis and boundArgs is used to specify the creation of new Bound Function exotic objects. It performs the following steps:

  1. Assert: Type(targetFunction) is Object.
  2. Let proto be targetFunction.[[GetPrototypeOf]]().
  3. ReturnIfAbrupt(proto).
  4. Let obj be a newly created object.
  5. Set obj’s essential internal methods to the default ordinary object definitions specified in 9.1.
  6. Set the [[Call]] internal method of obj as described in 9.4.1.1.
  7. If targetFunction has a [[Construct]] internal method, then
    1. Set the [[Construct]] internal method of obj as described in 9.4.1.2.
  8. Set the [[Prototype]] internal slot of obj to proto.
  9. Set the [[Extensible]] internal slot of obj to true.
  10. Set the [[BoundTargetFunction]] internal slot of obj to targetFunction.
  11. Set the [[BoundThis]] internal slot of obj to the value of boundThis.
  12. Set the [[BoundArguments]] internal slot of obj to boundArgs.
  13. Return obj.

9.4.2 Array Exotic Objects

An Array object is an exotic object that gives special treatment to array index property keys (see 6.1.7). A property whose property name is an array index is also called an element. Every Array object has a length property whose value is always a nonnegative integer less than 232. The value of the length property is numerically greater than the name of every own property whose name is an array index; whenever an own property of an Array object is created or changed, other properties are adjusted as necessary to maintain this invariant. Specifically, whenever an own property is added whose name is an array index, the value of the length property is changed, if necessary, to be one more than the numeric value of that array index; and whenever the value of the length property is changed, every own property whose name is an array index whose value is not smaller than the new length is deleted. This constraint applies only to own properties of an Array object and is unaffected by length or array index properties that may be inherited from its prototypes.

NOTE A String property name P is an array index if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 232−1.

Array exotic objects always have a non-configurable property named "length".

Array exotic objects provide an alternative definition for the [[DefineOwnProperty]] internal method. Except for that internal method, Array exotic objects provide all of the other essential internal methods as specified in 9.1.

9.4.2.1 [[DefineOwnProperty]] ( P, Desc)

When the [[DefineOwnProperty]] internal method of an Array exotic object A is called with property key P, and Property Descriptor Desc the following steps are taken:

  1. Assert: IsPropertyKey(P) is true.
  2. If P is "length", then
    1. Return ArraySetLength(A, Desc).
  3. Else if P is an array index, then
    1. Let oldLenDesc be OrdinaryGetOwnProperty(A, "length").
    2. Assert: oldLenDesc will never be undefined or an accessor descriptor because Array objects are created with a length data property that cannot be deleted or reconfigured.
    3. Let oldLen be oldLenDesc.[[Value]].
    4. Let index be ToUint32(P).
    5. Assert: index will never be an abrupt completion.
    6. If indexoldLen and oldLenDesc.[[Writable]] is false, return false.
    7. Let succeeded be OrdinaryDefineOwnProperty(A, P, Desc).
    8. Assert: succeeded is not an abrupt completion.
    9. If succeeded is false, return false.
    10. If indexoldLen
      1. Set oldLenDesc.[[Value]] to index + 1.
      2. Let succeeded be OrdinaryDefineOwnProperty(A, "length", oldLenDesc).
      3. Assert: succeeded is true.
    11. Return true.
  4. Return OrdinaryDefineOwnProperty(A, P, Desc).

9.4.2.2 ArrayCreate(length, proto)

The abstract operation ArrayCreate with argument length (a positive integer) and optional argument proto is used to specify the creation of new Array exotic objects. It performs the following steps:

  1. Assert: length is an integer Number ≥ 0.
  2. If length is −0, let length be +0.
  3. If length>232-1, throw a RangeError exception.
  4. If the proto argument was not passed, let proto be the intrinsic object %ArrayPrototype%.
  5. Let A be a newly created Array exotic object.
  6. Set A’s essential internal methods except for [[DefineOwnProperty]] to the default ordinary object definitions specified in 9.1.
  7. Set the [[DefineOwnProperty]] internal method of A as specified in 9.4.2.1.
  8. Set the [[Prototype]] internal slot of A to proto.
  9. Set the [[Extensible]] internal slot of A to true.
  10. Perform OrdinaryDefineOwnProperty(A, "length", PropertyDescriptor{[[Value]]: length, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: false}).
  11. Assert: the preceding step never produces an abrupt completion.
  12. Return A.

9.4.2.3 ArraySpeciesCreate(originalArray, length)

The abstract operation ArraySpeciesCreate with arguments originalArray and length is used to specify the creation of a new Array object using a constructor function that is derived from originalArray. It performs the following steps:

  1. Assert: length is an integer Number ≥ 0.
  2. If length is −0, let length be +0.
  3. Let C be undefined.
  4. Let isArray be IsArray(originalArray).
  5. ReturnIfAbrupt(isArray).
  6. If isArray is true, then
    1. Let C be Get(originalArray, "constructor").
    2. ReturnIfAbrupt(C).
    3. If IsConstructor(C) is true, then
      1. Let thisRealm be the running execution context’s Realm.
      2. Let realmC be GetFunctionRealm(C).
      3. ReturnIfAbrupt(realmC).
      4. If thisRealm and realmC are not the same Realm Record, then
        1. If SameValue(C, realmC.[[intrinsics]].[[%Array%]]) is true, let C be undefined.
    4. If Type(C) is Object, then
      1. Let C be Get(C, @@species).
      2. ReturnIfAbrupt(C).
      3. If C is null, let C be undefined.
  7. If C is undefined, return ArrayCreate(length).
  8. If IsConstructor(C) is false, throw a TypeError exception.
  9. Return Construct(C, «length»).

NOTE If originalArray was created using the standard built-in Array constructor for a Realm that is not the Realm of the running execution context, then a new Array is created using the Realm of the running execution context. This maintains compatibility with Web browsers that have historically had that behaviour for the Array.prototype methods that now are defined using ArraySpeciesCreate.

9.4.2.4 ArraySetLength(A, Desc)

When the abstract operation ArraySetLength is called with an Array exotic object A, and Property Descriptor Desc the following steps are taken:

  1. If the [[Value]] field of Desc is absent, then
    1. Return OrdinaryDefineOwnProperty(A, "length", Desc).
  2. Let newLenDesc be a copy of Desc.
  3. Let newLen be ToUint32(Desc.[[Value]]).
  4. ReturnIfAbrupt(newLen).
  5. Let numberLen be ToNumber(Desc.[[Value]]).
  6. ReturnIfAbrupt(newLen).
  7. If newLennumberLen, throw a RangeError exception.
  8. Set newLenDesc.[[Value]] to newLen.
  9. Let oldLenDesc be OrdinaryGetOwnProperty(A, "length").
  10. Assert: oldLenDesc will never be undefined or an accessor descriptor because Array objects are created with a length data property that cannot be deleted or reconfigured.
  11. Let oldLen be oldLenDesc.[[Value]].
  12. If newLenoldLen, then
    1. Return OrdinaryDefineOwnProperty(A, "length", newLenDesc).
  13. If oldLenDesc.[[Writable]] is false, return false.
  14. If newLenDesc.[[Writable]] is absent or has the value true, let newWritable be true.
  15. Else,
    1. Need to defer setting the [[Writable]] attribute to false in case any elements cannot be deleted.
    2. Let newWritable be false.
    3. Set newLenDesc.[[Writable]] to true.
  16. Let succeeded be OrdinaryDefineOwnProperty(A, "length", newLenDesc).
  17. Assert: succeeded is not an abrupt completion.
  18. If succeeded is false, return false.
  19. While newLen < oldLen repeat,
    1. Set oldLen to oldLen – 1.
    2. Let deleteSucceeded be A.[[Delete]](ToString(oldLen)).
    3. Assert: deleteSucceeded is not an abrupt completion.
    4. If deleteSucceeded is false, then
      1. Set newLenDesc.[[Value]] to oldLen + 1.
      2. If newWritable is false, set newLenDesc.[[Writable]] to false.
      3. Let succeeded be OrdinaryDefineOwnProperty(A, "length", newLenDesc).
      4. Assert: succeeded is not an abrupt completion.
      5. Return false.
  20. If newWritable is false, then
    1. Return OrdinaryDefineOwnProperty(A, "length", PropertyDescriptor{[[Writable]]: false}). This call will always return true.
  21. Return true.

NOTE In steps 3 and 4, if Desc.[[Value]] is an object then its valueOf method is called twice. This is legacy behaviour that was specified with this effect starting with the 2nd Edition of this specification.

9.4.3 String Exotic Objects

A String object is an exotic object that encapsulates a String value and exposes virtual integer indexed data properties corresponding to the individual code unit elements of the string value. Exotic String objects always have a data property named "length" whose value is the number of code unit elements in the encapsulated String value. Both the code unit data properties and the "length" property are non-writable and non-configurable.

Exotic String objects have the same internal slots as ordinary objects. They also have a [[StringData]] internal slot.

Exotic String objects provide alternative definitions for the following internal methods. All of the other exotic String object essential internal methods that are not defined below are as specified in 9.1.

9.4.3.1 [[GetOwnProperty]] ( P )

When the [[GetOwnProperty]] internal method of an exotic String object S is called with property key P the following steps are taken:

  1. Assert: IsPropertyKey(P) is true.
  2. Let desc be OrdinaryGetOwnProperty(S, P).
  3. If desc is not undefined return desc.
  4. Return StringGetIndexProperty(S, P).

9.4.3.1.1 StringGetIndexProperty (S, P)

When the abstract operation StringGetIndexProperty is called with an exotic String object S and with property key P, the following steps are taken:

  1. If Type(P) is not String, return undefined.
  2. Let index be CanonicalNumericIndexString (P).
  3. Assert: index is not an abrupt completion.
  4. If index is undefined, return undefined.
  5. If IsInteger(index) is false, return undefined.
  6. If index = −0, return undefined.
  7. Let str be the String value of the [[StringData]] internal slot of S.
  8. Let len be the number of elements in str.
  9. If index < 0 or lenindex, return undefined.
  10. Let resultStr be a String value of length 1, containing one code unit from str, specifically the code unit at index index.
  11. Return a PropertyDescriptor{ [[Value]]: resultStr, [[Enumerable]]: true, [[Writable]]: false, [[Configurable]]: false }.

9.4.3.2 [[HasProperty]](P)

When the [[HasProperty]] internal method of an exotic String object S is called with property key P, the following steps are taken:

  1. Let elementDesc be StringGetIndexProperty(S, P).
  2. If elementDesc is not undefined, return true.
  3. Return OrdinaryHasProperty(S, P)..

9.4.3.3 [[OwnPropertyKeys]] ( )

When the [[OwnPropertyKeys]] internal method of a String exotic object O is called the following steps are taken:

  1. Let keys be a new empty List.
  2. Let str be the String value of the [[StringData]] internal slot of O.
  3. Let len be the number of elements in str.
  4. For each integer i starting with 0 such that i < len, in ascending order,
    1. Add ToString(i) as the last element of keys
  5. For each own property key P of O such that P is an integer index and ToInteger(P) ≥ len, in ascending numeric index order,
    1. Add P as the last element of keys.
  6. For each own property key P of O such that Type(P) is String and P is not an integer index, in property creation order,
    1. Add P as the last element of keys.
  7. For each own property key P of O such that Type(P) is Symbol, in property creation order,
    1. Add P as the last element of keys.
  8. Return keys.

9.4.3.4 StringCreate( value, prototype)

The abstract operation StringCreate with arguments value and prototype is used to specify the creation of new exotic String objects. It performs the following steps:

  1. ReturnIfAbrupt(prototype).
  2. Assert: Type(value) is String.
  3. Let S be a newly created String exotic object.
  4. Set the [[StringData]] internal slot of S to value.
  5. Set S’s essential internal methods to the default ordinary object definitions specified in 9.1.
  6. Set the [[GetOwnProperty]] internal method of S as specified in 9.4.3.1.
  7. Set the [[HasProperty]] internal method of S as specified in 9.4.3.2.
  8. Set the [[OwnPropertyKeys]] internal method of S as specified in 9.4.3.3.
  9. Set the [[Prototype]] internal slot of S to prototype.
  10. Set the [[Extensible]] internal slot of S to true.
  11. Let length be the number of code unit elements in value.
  12. Let status be DefinePropertyOrThrow(S, "length", PropertyDescriptor{[[Value]]: length, [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }).
  13. Assert: status is not an abrupt completion.
  14. Return S.

9.4.4 Arguments Exotic Objects

Most ECMAScript functions make an arguments objects available to their code. Depending upon the characteristics of the function definition, its argument object is either an ordinary object or an arguments exotic object. An arguments exotic object is an exotic object whose array index properties map to the formal parameters bindings of an invocation of its associated ECMAScript function.

Arguments exotic objects have the same internal slots as ordinary objects. They also have a [[ParameterMap]] internal slot. Ordinary arguments objects also have a [[ParameterMap]] internal slot whose value is always undefined. For ordinary argument objects the [[ParameterMap]] internal slot is only used by Object.prototype.toString (19.1.3.6) to identify them as such.

Arguments exotic objects provide alternative definitions for the following internal methods. All of the other exotic arguments object essential internal methods that are not defined below are as specified in 9.1

NOTE 1 For non-strict functions the integer indexed data properties of an arguments object whose numeric name values are less than the number of formal parameters of the corresponding function object initially share their values with the corresponding argument bindings in the function’s execution context. This means that changing the property changes the corresponding value of the argument binding and vice-versa. This correspondence is broken if such a property is deleted and then redefined or if the property is changed into an accessor property. For strict mode functions, the values of the arguments object’s properties are simply a copy of the arguments passed to the function and there is no dynamic linkage between the property values and the formal parameter values.

NOTE 2 The ParameterMap object and its property values are used as a device for specifying the arguments object correspondence to argument bindings. The ParameterMap object and the objects that are the values of its properties are not directly observable from ECMAScript code. An ECMAScript implementation does not need to actually create or use such objects to implement the specified semantics.

NOTE 3 Arguments objects for strict mode functions define non-configurable accessor properties named "caller" and "callee" which throw a TypeError exception on access. The "callee" property has a more specific meaning for non-strict functions and a "caller" property has historically been provided as an implementation-defined extension by some ECMAScript implementations. The strict mode definition of these properties exists to ensure that neither of them is defined in any other manner by conforming ECMAScript implementations.

9.4.4.1 [[GetOwnProperty]] (P)

The [[GetOwnProperty]] internal method of an arguments exotic object when called with a property key P performs the following steps:

  1. Let args be the arguments object.
  2. Let desc be OrdinaryGetOwnProperty(args, P).
  3. If desc is undefined, return desc.
  4. Let map be the value of the [[ParameterMap]] internal slot of the arguments object.
  5. Let isMapped be HasOwnProperty(map, P).
  6. Assert: isMapped is never an abrupt completion.
  7. If the value of isMapped is true, then
    1. Set desc.[[Value]] to Get(map, P).
  8. If IsDataDescriptor(desc) is true and P is "caller" and desc.[[Value]] is a strict mode Function object, throw a TypeError exception.
  9. Return desc.

If an implementation does not provide a built-in caller property for argument exotic objects then step 8 of this algorithm is must be skipped.

9.4.4.2 [[DefineOwnProperty]] (P, Desc)

The [[DefineOwnProperty]] internal method of an arguments exotic object when called with a property key P and Property Descriptor Desc performs the following steps:

  1. Let args be the arguments object.
  2. Let map be the value of the [[ParameterMap]] internal slot of the arguments object.
  3. Let isMapped be HasOwnProperty(map, P).
  4. Let allowed be OrdinaryDefineOwnProperty(args, P, Desc).
  5. ReturnIfAbrupt(allowed).
  6. If allowed is false, return false.
  7. If the value of isMapped is true, then
    1. If IsAccessorDescriptor(Desc) is true, then
      1. Call map.[[Delete]](P).
    2. Else
      1. If Desc.[[Value]] is present, then
        1. Let setStatus be Set(map, P, Desc.[[Value]], false).
        2. Assert: setStatus is true because formal parameters mapped by argument objects are always writable.
      2. If Desc.[[Writable]] is present and its value is false, then
        1. Call map.[[Delete]](P).
  8. Return true.

9.4.4.3 [[Get]] (P, Receiver)

The [[Get]] internal method of an arguments exotic object when called with a property key P and ECMAScript language value Receiver performs the following steps:

  1. Let args be the arguments object.
  2. Let map be the value of the [[ParameterMap]] internal slot of the arguments object.
  3. Let isMapped be HasOwnProperty(map, P).
  4. Assert: isMapped is not an abrupt completion.
  5. If the value of isMapped is false, then
    1. Let v be the result of calling the default ordinary object [[Get]] internal method (9.1.8) on args passing P and Receiver as the arguments.
  6. Else map contains a formal parameter mapping for P,
    1. Let v be Get(map, P).
  7. ReturnIfAbrupt(v).
  8. Return v.

9.4.4.4 [[Set]] ( P, V, Receiver)

The [[Set]] internal method of an arguments exotic object when called with property key P, value V, and ECMAScript language value Receiver performs the following steps:

  1. Let args be the arguments object.
  2. If SameValue(args, Receiver) is false, then
    1. Let isMapped be false.
  3. Else,
    1. Let map be the value of the [[ParameterMap]] internal slot of the arguments object.
    2. Let isMapped be HasOwnProperty(map, P).
    3. Assert: isMapped is not an abrupt completion.
  4. If the value of isMapped is false, then
    1. Return the result of calling the default ordinary object [[Set]] internal method (9.1.9) on args passing P, V and Receiver as the arguments.
  5. Else map contains a formal parameter mapping for P,
    1. Return Set(map, P, V, false).

9.4.4.5 [[Delete]] (P)

The [[Delete]] internal method of an arguments exotic object when called with a property key P performs the following steps:

  1. Let map be the value of the [[ParameterMap]] internal slot of the arguments object.
  2. Let isMapped be HasOwnProperty(map, P).
  3. Assert: isMapped is not an abrupt completion.
  4. Let result be the result of calling the default [[Delete]] internal method for ordinary objects (9.1.10) on the arguments object passing P as the argument.
  5. ReturnIfAbrupt(result).
  6. If result is true and the value of isMapped is true, then
    1. Call map.[[Delete]](P).
  7. Return result.

9.4.4.6 CreateUnmappedArgumentsObject(argumentsList)

The abstract operation CreateUnmappedArgumentsObject called with an argument argumentsList performs the following steps:

  1. Let len be the number of elements in argumentsList.
  2. Let obj be ObjectCreate(%ObjectPrototype%, «‍[[ParameterMap]]»).
  3. Set obj’s [[ParameterMap]] internal slot to undefined.
  4. Perform DefinePropertyOrThrow(obj, "length", PropertyDescriptor{[[Value]]: len, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true}).
  5. Let index be 0.
  6. Repeat while index < len,
    1. Let val be argumentsList[index].
    2. Perform CreateDataProperty(obj, ToString(index), val).
    3. Let index be index + 1
  7. Perform DefinePropertyOrThrow(obj, @@iterator, PropertyDescriptor {[[Value]]:%ArrayProto_values%, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true}).
  8. Perform DefinePropertyOrThrow(obj, "caller", PropertyDescriptor {[[Get]]: %ThrowTypeError%, [[Set]]: %ThrowTypeError%, [[Enumerable]]: false, [[Configurable]]: false}).
  9. Perform DefinePropertyOrThrow(obj, "callee", PropertyDescriptor {[[Get]]: %ThrowTypeError%, [[Set]]: %ThrowTypeError%, [[Enumerable]]: false, [[Configurable]]: false}).
  10. Assert: the above property definitions will not produce an abrupt completion.
  11. Return obj

9.4.4.7 CreateMappedArgumentsObject ( func, formals, argumentsList, env )

The abstract operation CreateMappedArgumentsObject is called with object func, parsed grammar phrase formals, List argumentsList, and Environment Record env. The following steps are performed:

  1. Assert: formals does not contain a rest parameter, any binding patterns, or any initializers. It may contain duplicate identifiers.
  2. Let len be the number of elements in argumentsList.
  3. Let obj be a newly created arguments exotic object with a [[ParameterMap]] internal slot.
  4. Set the [[GetOwnProperty]] internal method of obj as specified in 9.4.4.1.
  5. Set the [[DefineOwnProperty]] internal method of obj as specified in 9.4.4.2.
  6. Set the [[Get]] internal method of obj as specified in 9.4.4.3.
  7. Set the [[Set]] internal method of obj as specified in 9.4.4.4.
  8. Set the [[Delete]] internal method of obj as specified in 9.4.4.5.
  9. Set the remainder of obj’s essential internal methods to the default ordinary object definitions specified in 9.1.
  10. Set the [[Prototype]] internal slot of obj to %ObjectPrototype%.
  11. Set the [[Extensible]] internal slot of obj to true.
  12. Let parameterNames be the BoundNames of formals.
  13. Let numberOfParameters be the number of elements in parameterNames
  14. Let index be 0.
  15. Repeat while index < len ,
    1. Let val be argumentsList[index].
    2. Perform CreateDataProperty(obj, ToString(index), val).
    3. Let index be index + 1
  16. Perform DefinePropertyOrThrow(obj, "length", PropertyDescriptor{[[Value]]: len, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true}).
  17. Let map be ObjectCreate(null).
  18. Let mappedNames be an empty List.
  19. Let index be numberOfParameters − 1.
  20. Repeat while index ≥ 0 ,
    1. Let name be parameterNames[index].
    2. If name is not an element of mappedNames, then
      1. Add name as an element of the list mappedNames.
      2. If index < len, then
        1. Let g be MakeArgGetter(name, env).
        2. Let p be MakeArgSetter(name, env).
        3. Call map.[[DefineOwnProperty]](ToString(index), PropertyDescriptor{[[Set]]: p, [[Get]]: g, [[Enumerable]]: false, [[Configurable]]: true}).
    3. Let index be index − 1
  21. Set the [[ParameterMap]] internal slot of obj to map.
  22. Perform DefinePropertyOrThrow(obj, @@iterator, PropertyDescriptor {[[Value]]:%ArrayProto_values%, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true}).
  23. Perform DefinePropertyOrThrow(obj, "callee", PropertyDescriptor {[[Value]]: func, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true}).
  24. Assert: the above property definitions will not produce an abrupt completion.
  25. Return obj

9.4.4.7.1 MakeArgGetter ( name, env)

The abstract operation MakeArgGetter called with String name and Environment Record env creates a built-in function object that when executed returns the value bound for name in env. It performs the following steps:

  1. Let realm be the current Realm.
  2. Let steps be the steps of an ArgGetter function as specified below.
  3. Let getter be CreateBuiltinFunction(realm, steps, %FunctionPrototype%, «‍[[name]], [[env]]» ).
  4. Set getter’s [[name]] internal slot to name.
  5. Set getter’s [[env]] internal slot to env.
  6. Return getter.

An ArgGetter function is an anonymous built-in function with [[name]] and [[env]] internal slots. When an ArgGetter function f that expects no arguments is called it performs the following steps:

  1. Let name be the value of f’s [[name]] internal slot.
  2. Let env be the value of f’s [[env]] internal slot
  3. Return env.GetBindingValue(name, false).

NOTE ArgGetter functions are never directly accessible to ECMAScript code.

9.4.4.7.2 MakeArgSetter ( name, env)

The abstract operation MakeArgSetter called with String name and Environment Record env creates a built-in function object that when executed sets the value bound for name in env. It performs the following steps:

  1. Let realm be the current Realm.
  2. Let steps be the steps of an ArgSetter function as specified below.
  3. Let setter be CreateBuiltinFunction(realm, steps, %FunctionPrototype%, «‍[[name]], [[env]]» ).
  4. Set setter’s [[name]] internal slot to name.
  5. Set setter’s [[env]] internal slot to env.
  6. Return setter.

An ArgSetter function is an anonymous built-in function with [[name]] and [[env]] internal slots. When an ArgSetter function f is called with argument value it performs the following steps:

  1. Let name be the value of f’s [[name]] internal slot.
  2. Let env be the value of f’s [[env]] internal slot
  3. Return env.SetMutableBinding(name, value, false).

NOTE ArgSetter functions are never directly accessible to ECMAScript code.

9.4.5 Integer Indexed Exotic Objects

An Integer Indexed object is an exotic object that performs special handling of integer index property keys.

Integer Indexed exotic objects have the same internal slots as ordinary objects additionally [[ViewedArrayBuffer]], [[ArrayLength]], [[ByteOffset]], and [[TypedArrayName]] internal slots.

Integer Indexed Exotic objects provide alternative definitions for the following internal methods. All of the other Integer Indexed exotic object essential internal methods that are not defined below are as specified in 9.1.

9.4.5.1 [[GetOwnProperty]] ( P )

When the [[GetOwnProperty]] internal method of an Integer Indexed exotic object O is called with property key P the following steps are taken:

  1. Assert: IsPropertyKey(P) is true.
  2. Assert: O is an Object that has a [[ViewedArrayBuffer]] internal slot.
  3. If Type(P) is String, then
    1. Let numericIndex be CanonicalNumericIndexString(P).
    2. Assert: numericIndex is not an abrupt completion.
    3. If numericIndex is not undefined, then
      1. Let value be IntegerIndexedElementGet (O, numericIndex).
      2. ReturnIfAbrupt(value).
      3. If value is undefined, return undefined.
      4. Return a PropertyDescriptor{ [[Value]]: value, [[Enumerable]]: true, [[Writable]]: true, [[Configurable]]: false }.
  4. Return OrdinaryGetOwnProperty(O, P).

9.4.5.2 [[HasProperty]](P)

When the [[HasProperty]] internal method of an Integer Indexed exotic object O is called with property key P, the following steps are taken:

  1. Assert: IsPropertyKey(P) is true.
  2. Assert: O is an Object that has a [[ViewedArrayBuffer]] internal slot.
  3. If Type(P) is String, then
    1. Let numericIndex be CanonicalNumericIndexString(P).
    2. Assert: numericIndex is not an abrupt completion.
    3. If numericIndex is not undefined, then
      1. Let buffer be the value of O’s [[ViewedArrayBuffer]] internal slot.
      2. If IsDetachedBuffer(buffer) is true, throw a TypeError exception.
      3. If IsInteger(numericIndex) is false, return false
      4. If numericIndex = −0, return false.
      5. If numericIndex < 0, return false.
      6. If numericIndex ≥ the value of O’s [[ArrayLength]] internal slot, return false.
      7. Return true.
  4. Return OrdinaryHasProperty(O, P).

9.4.5.3 [[DefineOwnProperty]] ( P, Desc)

When the [[DefineOwnProperty]] internal method of an Integer Indexed exotic object O is called with property key P, and Property Descriptor Desc the following steps are taken:

  1. Assert: IsPropertyKey(P) is true.
  2. Assert: O is an Object that has a [[ViewedArrayBuffer]] internal slot.
  3. If Type(P) is String, then
    1. Let numericIndex be CanonicalNumericIndexString (P).
    2. Assert: numericIndex is not an abrupt completion.
    3. If numericIndex is not undefined, then
      1. If IsInteger(numericIndex) is false, return false
      2. Let intIndex be numericIndex.
      3. If intIndex = −0, return false.
      4. If intIndex < 0, return false.
      5. Let length be the value of O’s [[ArrayLength]] internal slot.
      6. If intIndexlength, return false.
      7. If IsAccessorDescriptor(Desc) is true, return false.
      8. If Desc has a [[Configurable]] field and if Desc.[[Configurable]] is true, return false.
      9. If Desc has an [[Enumerable]] field and if Desc.[[Enumerable]] is false, return false.
      10. If Desc has a [[Writable]] field and if Desc.[[Writable]] is false, return false.
      11. If Desc has a [[Value]] field, then
        1. Let value be Desc.[[Value]].
        2. Return IntegerIndexedElementSet (O, intIndex, value).
      12. Return true.
  4. Return OrdinaryDefineOwnProperty(O, P, Desc).

9.4.5.4 [[Get]] (P, Receiver)

When the [[Get]] internal method of an Integer Indexed exotic object O is called with property key P and ECMAScript language value Receiver the following steps are taken:

  1. Assert: IsPropertyKey(P) is true.
  2. If Type(P) is String and if SameValue(O, Receiver) is true, then
    1. Let numericIndex be CanonicalNumericIndexString (P).
    2. Assert: numericIndex is not an abrupt completion.
    3. If numericIndex is not undefined, then
      1. Return IntegerIndexedElementGet (O, numericIndex).
  3. Return the result of calling the default ordinary object [[Get]] internal method (9.1.8) on O passing P and Receiver as arguments.

9.4.5.5 [[Set]] ( P, V, Receiver)

When the [[Set]] internal method of an Integer Indexed exotic object O is called with property key P, value V, and ECMAScript language value Receiver, the following steps are taken:

  1. Assert: IsPropertyKey(P) is true.
  2. If Type(P) is String and if SameValue(O, Receiver) is true, then
    1. Let numericIndex be CanonicalNumericIndexString (P).
    2. Assert: numericIndex is not an abrupt completion.
    3. If numericIndex is not undefined, then
      1. Return IntegerIndexedElementSet (O, numericIndex, V).
  3. Return the result of calling the default ordinary object [[Set]] internal method (9.1.8) on O passing P, V, and Receiver as arguments.

9.4.5.6 [[OwnPropertyKeys]] ()

When the [[OwnPropertyKeys]] internal method of an Integer Indexed exotic object O is called the following steps are taken:

  1. Let keys be a new empty List.
  2. Assert: O is an Object that has [[ViewedArrayBuffer]], [[ArrayLength]], [[ByteOffset]], and [[TypedArrayName]] internal slots.
  3. Let len be the value of O’s [[ArrayLength]] internal slot.
  4. For each integer i starting with 0 such that i < len, in ascending order,
    1. Add ToString(i) as the last element of keys.
  5. For each own property key P of O such that Type(P) is String and P is not an integer index, in property creation order
    1. Add P as the last element of keys.
  6. For each own property key P of O such that Type(P) is Symbol, in property creation order
    1. Add P as the last element of keys.
  7. Return keys.

9.4.5.7 IntegerIndexedObjectCreate (prototype, internalSlotsList)

The abstract operation IntegerIndexedObjectCreate with arguments prototype and internalSlotsList is used to specify the creation of new Integer Indexed exotic objects. The argument internalSlotsList is a List of the names of additional internal slots that must be defined as part of the object. IntegerIndexedObjectCreate performs the following steps:

  1. Let A be a newly created object with an internal slot for each name in internalSlotsList.
  2. Set A’s essential internal methods to the default ordinary object definitions specified in 9.1.
  3. Set the [[GetOwnProperty]] internal method of A as specified in 9.4.5.1.
  4. Set the [[HasProperty]] internal method of A as specified in 9.4.5.2.
  5. Set the [[DefineOwnProperty]] internal method of A as specified in 9.4.5.3.
  6. Set the [[Get]] internal method of A as specified in 9.4.5.4.
  7. Set the [[Set]] internal method of A as specified in 9.4.5.5.
  8. Set the [[OwnPropertyKeys]] internal method of A as specified in 9.4.5.6.
  9. Set the [[Prototype]] internal slot of A to prototype.
  10. Set the [[Extensible]] internal slot of A to true.
  11. Return A.

9.4.5.8 IntegerIndexedElementGet ( O, index )

The abstract operation IntegerIndexedElementGet with arguments O and index performs the following steps:

  1. Assert: Type(index) is Number.
  2. Assert: O is an Object that has [[ViewedArrayBuffer]], [[ArrayLength]], [[ByteOffset]], and [[TypedArrayName]] internal slots.
  3. Let buffer be the value of O’s [[ViewedArrayBuffer]] internal slot.
  4. If IsDetachedBuffer(buffer) is true, throw a TypeError exception.
  5. If IsInteger(index) is false, return undefined
  6. If index = −0, return undefined.
  7. Let length be the value of O’s [[ArrayLength]] internal slot.
  8. If index < 0 or indexlength, return undefined.
  9. Let offset be the value of O’s [[ByteOffset]] internal slot.
  10. Let arrayTypeName be the string value of O’s [[TypedArrayName]] internal slot.
  11. Let elementSize be the Number value of the Element Size value specified in Table 49 for arrayTypeName.
  12. Let indexedPosition = (index × elementSize) + offset.
  13. Let elementType be the string value of the Element Type value in Table 49 for arrayTypeName.
  14. Return GetValueFromBuffer(buffer, indexedPosition, elementType).

9.4.5.9 IntegerIndexedElementSet ( O, index, value )

The abstract operation IntegerIndexedElementSet with arguments O, index, and value performs the following steps:

  1. Assert: Type(index) is Number.
  2. Assert: O is an Object that has [[ViewedArrayBuffer]], [[ArrayLength]], [[ByteOffset]], and [[TypedArrayName]] internal slots.
  3. Let numValue be ToNumber(value).
  4. ReturnIfAbrupt(numValue).
  5. Let buffer be the value of O’s [[ViewedArrayBuffer]] internal slot.
  6. If IsDetachedBuffer(buffer) is true, throw a TypeError exception.
  7. If IsInteger(index) is false, return false
  8. If index = −0, return false.
  9. Let length be the value of O’s [[ArrayLength]] internal slot.
  10. If index < 0 or indexlength, return false.
  11. Let offset be the value of O’s [[ByteOffset]] internal slot.
  12. Let arrayTypeName be the string value of O’s [[TypedArrayName]] internal slot.
  13. Let elementSize be the Number value of the Element Size value specified in Table 49 for arrayTypeName.
  14. Let indexedPosition = (index × elementSize) + offset.
  15. Let elementType be the string value of the Element Type value in Table 49 for arrayTypeName.
  16. Let status be SetValueInBuffer(buffer, indexedPosition, elementType, numValue).
  17. ReturnIfAbrupt(status).
  18. Return true.

9.4.6 Module Namespace Exotic Objects

A module namespace object is an exotic object that exposes the bindings exported from an ECMAScript Module (See 15.2.3). There is a one-to-one correspondence between the String-keyed own properties of a module namespace exotic object and the binding names exported by the Module. The exported bindings include any bindings that are indirectly exported using export * export items. Each String-valued own property key is the StringValue of the corresponding exported binding name. These are the only String-keyed properties of a module namespace exotic object. Each such property has the attributes {[[Configurable]]: false, [[Enumerable]]: true}. Module namespace objects are not extensible.

Module namespace objects have the internal slots defined in Table 29.

Table 29 — Internal Slots of Module Namespace Exotic Objects
Internal Slot Type Description
[[Module]] Module Record The Module Record whose exports this namespace exposes.
[[Exports]] List of String A List containing the String values of the exported names exposed as own properties of this object. The list is ordered as if an Array of those string values had been sorted using Array.prototype.sort using SortCompare as comparefn.

Module namespace exotic objects provide alternative definitions for all of the internal methods.

9.4.6.1 [[GetPrototypeOf]] ( )

When the [[GetPrototypeOf]] internal method of a module namespace exotic object O is called the following steps are taken:

  1. Return null.

9.4.6.2 [[SetPrototypeOf]] (V)

When the [[SetPrototypeOf]] internal method of a module namespace exotic object O is called with argument V the following steps are taken:

  1. Assert: Either Type(V) is Object or Type(V) is Null.
  2. Return false.

9.4.6.3 [[IsExtensible]] ( )

When the [[IsExtensible]] internal method of a module namespace exotic object O is called the following steps are taken:

  1. Return false.

9.4.6.4 [[PreventExtensions]] ( )

When the [[PreventExtensions]] internal method of a module namespace exotic object O is called the following steps are taken:

  1. Return true.

9.4.6.5 [[GetOwnProperty]] (P)

When the [[GetOwnProperty]] internal method of a module namespace exotic object O is called with property key P, the following steps are taken:

  1. If Type(P) is Symbol, return OrdinaryGetOwnProperty(O, P).
  2. Throw a TypeError exception.

9.4.6.6 [[DefineOwnProperty]] (P, Desc)

When the [[DefineOwnProperty]] internal method of a module namespace exotic object O is called with property key P and Property Descriptor Desc, the following steps are taken:

  1. Return false.

9.4.6.7 [[HasProperty]] (P)

When the [[HasProperty]] internal method of a module namespace exotic object O is called with property key P, the following steps are taken:

  1. If Type(P) is Symbol, return OrdinaryHasProperty(O, P).
  2. Let exports be the value of O’s [[Exports]] internal slot.
  3. If P is an element of exports, return true.
  4. Return false.

9.4.6.8 [[Get]] (P, Receiver)

When the [[Get]] internal method of a module namespace exotic object O is called with property key P and ECMAScript language value Receiver the following steps are taken:

  1. Assert: IsPropertyKey(P) is true.
  2. If Type(P) is Symbol, then
    1. Return the result of calling the default ordinary object [[Get]] internal method (9.1.8) on O passing P and Receiver as arguments.
  3. Let exports be the value of O’s [[Exports]] internal slot.
  4. If P is not an element of exports, return undefined.
  5. Let m be the value of O’s [[Module]] internal slot.
  6. Let binding be m.ResolveExport(P, «», «»).
  7. ReturnIfAbrupt(binding).
  8. Assert: binding is neither null nor "ambiguous".
  9. Let targetModule be binding.[[module]],
  10. Assert: targetModule is not undefined.
  11. Let targetEnv be targetModule.[[Environment]].
  12. If targetEnv is undefined, throw a ReferenceError exception.
  13. Let targetEnvRec be targetEnv’s EnvironmentRecord.
  14. Return targetEnvRec.GetBindingValue(binding.[[bindingName]], true).

NOTE ResolveExport is idempotent and side-effect free. An implementation might choose to pre-compute or cache the ResolveExport results for the [[Exports]] of each module namespace exotic object.

9.4.6.9 [[Set]] ( P, V, Receiver)

When the [[Set]] internal method of a module namespace exotic object O is called with property key P, value V, and ECMAScript language value Receiver, the following steps are taken:

  1. Return false.

9.4.6.10 [[Delete]] (P)

When the [[Delete]] internal method of a module namespace exotic object O is called with property key P the following steps are taken:

  1. Assert: IsPropertyKey(P) is true.
  2. Let exports be the value of O’s [[Exports]] internal slot.
  3. If P is an element of exports, return false.
  4. Return true.

9.4.6.11 [[Enumerate]] ()

When the [[Enumerate]] internal method of a module namespace exotic object O is called the following steps are taken:

  1. Let exports be the value of O’s [[Exports]] internal slot.
  2. Return CreateListIterator(exports).

9.4.6.12 [[OwnPropertyKeys]] ( )

When the [[OwnPropertyKeys]] internal method of a module namespace exotic object O is called the following steps are taken:

  1. Let exports be a copy of the value of O’s [[Exports]] internal slot.
  2. Let symbolKeys be the result of calling the default ordinary object [[OwnPropertyKeys]] internal method (9.1.12) on O passing no arguments.
  3. Append all the entries of symbolKeys to the end of exports.
  4. Return exports.

9.4.6.13 ModuleNamespaceCreate (module, exports)

The abstract operation ModuleNamespaceCreate with arguments module, and exports is used to specify the creation of new module namespace exotic objects. It performs the following steps:

  1. Assert: module is a Module Record (see 15.2.1.14).
  2. Assert: module.[[Namespace]] is undefined.
  3. Assert: exports is a List of string values.
  4. Let M be a newly created object.
  5. Set M’s essential internal methods to the definitions specified in 9.4.6.
  6. Set M’s [[Module]] internal slot to module.
  7. Set M’s [[Exports]] internal slot to exports.
  8. Create own properties of M corresponding to the definitions in 26.3.
  9. Set module.[[Namespace]] to M.
  10. Return M.

9.5 Proxy Object Internal Methods and Internal Slots

A proxy object is an exotic object whose essential internal methods are partially implemented using ECMAScript code. Every proxy objects has an internal slot called [[ProxyHandler]]. The value of [[ProxyHandler]] is an object, called the proxy’s handler object, or null. Methods (see Table 30) of a handler object may be used to augment the implementation for one or more of the proxy object’s internal methods. Every proxy object also has an internal slot called [[ProxyTarget]] whose value is either an object or the null value. This object is called the proxy’s target object.

Table 30 — Proxy Handler Methods
Internal Method Handler Method
[[GetPrototypeOf]] getPrototypeOf
[[SetPrototypeOf]] setPrototypeOf
[[IsExtensible]] isExtensible
[[PreventExtensions]] preventExtensions
[[GetOwnProperty]] getOwnPropertyDescriptor
[[HasProperty]] has
[[Get]] get
[[Set]] set
[[Delete]] deleteProperty
[[DefineOwnProperty]] defineProperty
[[Enumerate]] enumerate
[[OwnPropertyKeys]] ownKeys
[[Call]] apply
[[Construct]] construct

When a handler method is called to provide the implementation of a proxy object internal method, the handler method is passed the proxy’s target object as a parameter. A proxy’s handler object does not necessarily have a method corresponding to every essential internal method. Invoking an internal method on the proxy results in the invocation of the corresponding internal method on the proxy’s target object if the handler object does not have a method corresponding to the internal trap.

The [[ProxyHandler]] and [[ProxyTarget]] internal slots of a proxy object are always initialized when the object is created and typically may not be modified. Some proxy objects are created in a manner that permits them to be subsequently revoked. When a proxy is revoked, its [[ProxyHander]] and [[ProxyTarget]] internal slots are set to null causing subsequent invocations of internal methods on that proxy object to throw a TypeError exception.

Because proxy objects permit the implementation of internal methods to be provided by arbitrary ECMAScript code, it is possible to define a proxy object whose handler methods violates the invariants defined in 6.1.7.3. Some of the internal method invariants defined in 6.1.7.3 are essential integrity invariants. These invariants are explicitly enforced by the proxy object internal methods specified in this section. An ECMAScript implementation must be robust in the presence of all possible invariant violations.

In the following algorithm descriptions, assume O is an ECMAScript proxy object, P is a property key value, V is any ECMAScript language value and Desc is a Property Descriptor record.

9.5.1 [[GetPrototypeOf]] ( )

When the [[GetPrototypeOf]] internal method of a Proxy exotic object O is called the following steps are taken:

  1. Let handler be the value of the [[ProxyHandler]] internal slot of O.
  2. If handler is null, throw a TypeError exception.
  3. Assert: Type(handler) is Object.
  4. Let target be the value of the [[ProxyTarget]] internal slot of O.
  5. Let trap be GetMethod(handler, "getPrototypeOf").
  6. ReturnIfAbrupt(trap).
  7. If trap is undefined, then
    1. Return target.[[GetPrototypeOf]]().
  8. Let handlerProto be Call(trap, handler, «target»).
  9. ReturnIfAbrupt(handlerProto).
  10. If Type(handlerProto) is neither Object nor Null, throw a TypeError exception.
  11. Let extensibleTarget be IsExtensible(target).
  12. ReturnIfAbrupt(extensibleTarget).
  13. If extensibleTarget is true, return handlerProto.
  14. Let targetProto be target.[[GetPrototypeOf]]().
  15. ReturnIfAbrupt(targetProto).
  16. If SameValue(handlerProto, targetProto) is false, throw a TypeError exception.
  17. Return handlerProto.

NOTE [[GetPrototypeOf]] for proxy objects enforces the following invariant:

  • The result of [[GetPrototypeOf]] must be either an Object or null.

  • If the target object is not extensible, [[GetPrototypeOf]] applied to the proxy object must return the same value as [[GetPrototypeOf]] applied to the proxy object’s target object.

9.5.2 [[SetPrototypeOf]] (V)

When the [[SetPrototypeOf]] internal method of a Proxy exotic object O is called with argument V the following steps are taken:

  1. Assert: Either Type(V) is Object or Type(V) is Null.
  2. Let handler be the value of the [[ProxyHandler]] internal slot of O.
  3. If handler is null, throw a TypeError exception.
  4. Assert: Type(handler) is Object.
  5. Let target be the value of the [[ProxyTarget]] internal slot of O.
  6. Let trap be GetMethod(handler, "setPrototypeOf").
  7. ReturnIfAbrupt(trap).
  8. If trap is undefined, then
    1. Return target.[[SetPrototypeOf]](V).
  9. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target, V»)).
  10. ReturnIfAbrupt(booleanTrapResult).
  11. Let extensibleTarget be IsExtensible(target).
  12. ReturnIfAbrupt(extensibleTarget).
  13. If extensibleTarget is true, return booleanTrapResult.
  14. Let targetProto be target.[[GetPrototypeOf]]().
  15. ReturnIfAbrupt(targetProto).
  16. If booleanTrapResult is true and SameValue(V, targetProto) is false, throw a TypeError exception.
  17. Return booleanTrapResult.

NOTE [[SetPrototypeOf]] for proxy objects enforces the following invariant:

  • The result of [[SetPrototypeOf]] is a Boolean value.

  • If the target object is not extensible, the argument value must be the same as the result of [[GetPrototypeOf]] applied to target object.

9.5.3 [[IsExtensible]] ( )

When the [[IsExtensible]] internal method of a Proxy exotic object O is called the following steps are taken:

  1. Let handler be the value of the [[ProxyHandler]] internal slot of O.
  2. If handler is null, throw a TypeError exception.
  3. Assert: Type(handler) is Object.
  4. Let target be the value of the [[ProxyTarget]] internal slot of O.
  5. Let trap be GetMethod(handler, "isExtensible").
  6. ReturnIfAbrupt(trap).
  7. If trap is undefined, then
    1. Return target.[[IsExtensible]]().
  8. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target»)).
  9. ReturnIfAbrupt(booleanTrapResult).
  10. Let targetResult be target.[[IsExtensible]]().
  11. ReturnIfAbrupt(targetResult).
  12. If SameValue(booleanTrapResult, targetResult) is false, throw a TypeError exception.
  13. Return booleanTrapResult.

NOTE [[IsExtensible]] for proxy objects enforces the following invariant:

  • The result of [[IsExtensible]] is a Boolean value.

  • [[IsExtensible]] applied to the proxy object must return the same value as [[IsExtensible]] applied to the proxy object’s target object with the same argument.

9.5.4 [[PreventExtensions]] ( )

When the [[PreventExtensions]] internal method of a Proxy exotic object O is called the following steps are taken:

  1. Let handler be the value of the [[ProxyHandler]] internal slot of O.
  2. If handler is null, throw a TypeError exception.
  3. Assert: Type(handler) is Object.
  4. Let target be the value of the [[ProxyTarget]] internal slot of O.
  5. Let trap be GetMethod(handler, "preventExtensions").
  6. ReturnIfAbrupt(trap).
  7. If trap is undefined, then
    1. Return target.[[PreventExtensions]]().
  8. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target»)).
  9. ReturnIfAbrupt(booleanTrapResult).
  10. If booleanTrapResult is true, then
    1. Let targetIsExtensible be target.[[IsExtensible]]().
    2. ReturnIfAbrupt(targetIsExtensible).
    3. If targetIsExtensible is true, throw a TypeError exception.
  11. Return booleanTrapResult.

NOTE [[PreventExtensions]] for proxy objects enforces the following invariant:

  • The result of [[PreventExtensions]] is a Boolean value.

  • [[PreventExtensions]] applied to the proxy object only returns true if [[IsExtensible]] applied to the proxy object’s target object is false.

9.5.5 [[GetOwnProperty]] (P)

When the [[GetOwnProperty]] internal method of a Proxy exotic object O is called with property key P, the following steps are taken:

  1. Assert: IsPropertyKey(P) is true.
  2. Let handler be the value of the [[ProxyHandler]] internal slot of O.
  3. If handler is null, throw a TypeError exception.
  4. Assert: Type(handler) is Object.
  5. Let target be the value of the [[ProxyTarget]] internal slot of O.
  6. Let trap be GetMethod(handler, "getOwnPropertyDescriptor").
  7. ReturnIfAbrupt(trap).
  8. If trap is undefined, then
    1. Return target.[[GetOwnProperty]](P).
  9. Let trapResultObj be Call(trap, handler, «target, P»).
  10. ReturnIfAbrupt(trapResultObj).
  11. If Type(trapResultObj) is neither Object nor Undefined, throw a TypeError exception.
  12. Let targetDesc be target.[[GetOwnProperty]](P).
  13. ReturnIfAbrupt(targetDesc).
  14. If trapResultObj is undefined, then
    1. If targetDesc is undefined, return undefined.
    2. If targetDesc.[[Configurable]] is false, throw a TypeError exception.
    3. Let extensibleTarget be IsExtensible(target).
    4. ReturnIfAbrupt(extensibleTarget).
    5. If ToBoolean(extensibleTarget) is false, throw a TypeError exception.
    6. Return undefined.
  15. Let extensibleTarget be IsExtensible(target).
  16. ReturnIfAbrupt(extensibleTarget).
  17. Let resultDesc be ToPropertyDescriptor(trapResultObj).
  18. ReturnIfAbrupt(resultDesc).
  19. Call CompletePropertyDescriptor(resultDesc).
  20. Let valid be IsCompatiblePropertyDescriptor (extensibleTarget, resultDesc, targetDesc).
  21. If valid is false, throw a TypeError exception.
  22. If resultDesc.[[Configurable]] is false, then
    1. If targetDesc is undefined or targetDesc.[[Configurable]] is true, then
      1. Throw a TypeError exception.
  23. Return resultDesc.

NOTE [[GetOwnProperty]] for proxy objects enforces the following invariants:

  • The result of [[GetOwnProperty]] must be either an Object or undefined.

  • A property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.

  • A property cannot be reported as non-existent, if it exists as an own property of the target object and the target object is not extensible.

  • A property cannot be reported as existent, if it does not exists as an own property of the target object and the target object is not extensible.

  • A property cannot be reported as non-configurable, if it does not exists as an own property of the target object or if it exists as a configurable own property of the target object.

9.5.6 [[DefineOwnProperty]] (P, Desc)

When the [[DefineOwnProperty]] internal method of a Proxy exotic object O is called with property key P and Property Descriptor Desc, the following steps are taken:

  1. Assert: IsPropertyKey(P) is true.
  2. Let handler be the value of the [[ProxyHandler]] internal slot of O.
  3. If handler is null, throw a TypeError exception.
  4. Assert: Type(handler) is Object.
  5. Let target be the value of the [[ProxyTarget]] internal slot of O.
  6. Let trap be GetMethod(handler, "defineProperty").
  7. ReturnIfAbrupt(trap).
  8. If trap is undefined, then
    1. Return target.[[DefineOwnProperty]](P, Desc).
  9. Let descObj be FromPropertyDescriptor(Desc).
  10. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target, P, descObj»)).
  11. ReturnIfAbrupt(booleanTrapResult).
  12. If booleanTrapResult is false, return false.
  13. Let targetDesc be target.[[GetOwnProperty]](P).
  14. ReturnIfAbrupt(targetDesc).
  15. Let extensibleTarget be IsExtensible(target).
  16. ReturnIfAbrupt(extensibleTarget).
  17. If Desc has a [[Configurable]] field and if Desc.[[Configurable]] is false, then
    1. Let settingConfigFalse be true.
  18. Else let settingConfigFalse be false.
  19. If targetDesc is undefined, then
    1. If extensibleTarget is false, throw a TypeError exception.
    2. If settingConfigFalse is true, throw a TypeError exception.
  20. Else targetDesc is not undefined,
    1. If IsCompatiblePropertyDescriptor(extensibleTarget, Desc , targetDesc) is false, throw a TypeError exception.
    2. If settingConfigFalse is true and targetDesc.[[Configurable]] is true, throw a TypeError exception.
  21. Return true.

NOTE [[DefineOwnProperty]] for proxy objects enforces the following invariants:

  • The result of [[DefineOwnProperty]] is a Boolean value.

  • A property cannot be added, if the target object is not extensible.

  • A property cannot be non-configurable, unless there exists a corresponding non-configurable own property of the target object.

  • If a property has a corresponding target object property then applying the Property Descriptor of the property to the target object using [[DefineOwnProperty]] will not throw an exception.

9.5.7 [[HasProperty]] (P)

When the [[HasProperty]] internal method of a Proxy exotic object O is called with property key P, the following steps are taken:

  1. Assert: IsPropertyKey(P) is true.
  2. Let handler be the value of the [[ProxyHandler]] internal slot of O.
  3. If handler is null, throw a TypeError exception.
  4. Assert: Type(handler) is Object.
  5. Let target be the value of the [[ProxyTarget]] internal slot of O.
  6. Let trap be GetMethod(handler, "has").
  7. ReturnIfAbrupt(trap).
  8. If trap is undefined, then
    1. Return target.[[HasProperty]](P).
  9. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target, P»)).
  10. ReturnIfAbrupt(booleanTrapResult).
  11. If booleanTrapResult is false, then
    1. Let targetDesc be target.[[GetOwnProperty]](P).
    2. ReturnIfAbrupt(targetDesc).
    3. If targetDesc is not undefined, then
      1. If targetDesc.[[Configurable]] is false, throw a TypeError exception.
      2. Let extensibleTarget be IsExtensible(target).
      3. ReturnIfAbrupt(extensibleTarget).
      4. If extensibleTarget is false, throw a TypeError exception.
  12. Return booleanTrapResult.

NOTE [[HasProperty]] for proxy objects enforces the following invariants:

  • The result of [[HasProperty]] is a Boolean value.

  • A property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.

  • A property cannot be reported as non-existent, if it exists as an own property of the target object and the target object is not extensible.

9.5.8 [[Get]] (P, Receiver)

When the [[Get]] internal method of a Proxy exotic object O is called with property key P and ECMAScript language value Receiver the following steps are taken:

  1. Assert: IsPropertyKey(P) is true.
  2. Let handler be the value of the [[ProxyHandler]] internal slot of O.
  3. If handler is null, throw a TypeError exception.
  4. Assert: Type(handler) is Object.
  5. Let target be the value of the [[ProxyTarget]] internal slot of O.
  6. Let trap be GetMethod(handler, "get").
  7. ReturnIfAbrupt(trap).
  8. If trap is undefined, then
    1. Return target.[[Get]](P, Receiver).
  9. Let trapResult be Call(trap, handler, «target, P, Receiver»).
  10. ReturnIfAbrupt(trapResult).
  11. Let targetDesc be target.[[GetOwnProperty]](P).
  12. ReturnIfAbrupt(targetDesc).
  13. If targetDesc is not undefined, then
    1. If IsDataDescriptor(targetDesc) and targetDesc.[[Configurable]] is false and targetDesc.[[Writable]] is false, then
      1. If SameValue(trapResult, targetDesc.[[Value]]) is false, throw a TypeError exception.
    2. If IsAccessorDescriptor(targetDesc) and targetDesc.[[Configurable]] is false and targetDesc.[[Get]] is undefined, then
      1. If trapResult is not undefined, throw a TypeError exception.
  14. Return trapResult.

NOTE [[Get]] for proxy objects enforces the following invariants:

  • The value reported for a property must be the same as the value of the corresponding target object property if the target object property is a non-writable, non-configurable own data property.

  • The value reported for a property must be undefined if the corresponding target object property is a non-configurable own accessor property that has undefined as its [[Get]] attribute.

9.5.9 [[Set]] ( P, V, Receiver)

When the [[Set]] internal method of a Proxy exotic object O is called with property key P, value V, and ECMAScript language value Receiver, the following steps are taken:

  1. Assert: IsPropertyKey(P) is true.
  2. Let handler be the value of the [[ProxyHandler]] internal slot of O.
  3. If handler is null, throw a TypeError exception.
  4. Assert: Type(handler) is Object.
  5. Let target be the value of the [[ProxyTarget]] internal slot of O.
  6. Let trap be GetMethod(handler, "set").
  7. ReturnIfAbrupt(trap).
  8. If trap is undefined, then
    1. Return target.[[Set]](P, V, Receiver).
  9. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target, P, V, Receiver»)).
  10. ReturnIfAbrupt(booleanTrapResult).
  11. If booleanTrapResult is false, return false.
  12. Let targetDesc be target.[[GetOwnProperty]](P).
  13. ReturnIfAbrupt(targetDesc).
  14. If targetDesc is not undefined, then
    1. If IsDataDescriptor(targetDesc) and targetDesc.[[Configurable]] is false and targetDesc.[[Writable]] is false, then
      1. If SameValue(V, targetDesc.[[Value]]) is false, throw a TypeError exception.
    2. If IsAccessorDescriptor(targetDesc) and targetDesc.[[Configurable]] is false, then
      1. If targetDesc.[[Set]] is undefined, throw a TypeError exception.
  15. Return true.

NOTE [[Set]] for proxy objects enforces the following invariants:

  • The result of [[Set]] is a Boolean value.

  • Cannot change the value of a property to be different from the value of the corresponding target object property if the corresponding target object property is a non-writable, non-configurable own data property.

  • Cannot set the value of a property if the corresponding target object property is a non-configurable own accessor property that has undefined as its [[Set]] attribute.

9.5.10 [[Delete]] (P)

When the [[Delete]] internal method of a Proxy exotic object O is called with property key P the following steps are taken:

  1. Assert: IsPropertyKey(P) is true.
  2. Let handler be the value of the [[ProxyHandler]] internal slot of O.
  3. If handler is null, throw a TypeError exception.
  4. Assert: Type(handler) is Object.
  5. Let target be the value of the [[ProxyTarget]] internal slot of O.
  6. Let trap be GetMethod(handler, "deleteProperty").
  7. ReturnIfAbrupt(trap).
  8. If trap is undefined, then
    1. Return target.[[Delete]](P).
  9. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target, P»)).
  10. ReturnIfAbrupt(booleanTrapResult).
  11. If booleanTrapResult is false, return false.
  12. Let targetDesc be target.[[GetOwnProperty]](P).
  13. ReturnIfAbrupt(targetDesc).
  14. If targetDesc is undefined, return true.
  15. If targetDesc.[[Configurable]] is false, throw a TypeError exception.
  16. Return true.

NOTE [[Delete]] for proxy objects enforces the following invariant:

  • The result of [[Delete]] is a Boolean value.
  • A property cannot be reported as deleted, if it exists as a non-configurable own property of the target object.

9.5.11 [[Enumerate]] ()

When the [[Enumerate]] internal method of a Proxy exotic object O is called the following steps are taken:

  1. Let handler be the value of the [[ProxyHandler]] internal slot of O.
  2. If handler is null, throw a TypeError exception.
  3. Assert: Type(handler) is Object.
  4. Let target be the value of the [[ProxyTarget]] internal slot of O.
  5. Let trap be GetMethod(handler, "enumerate").
  6. ReturnIfAbrupt(trap).
  7. If trap is undefined, then
    1. Return target.[[Enumerate]]().
  8. Let trapResult be Call(trap, handler, «target»).
  9. ReturnIfAbrupt(trapResult).
  10. If Type(trapResult) is not Object, throw a TypeError exception.
  11. Return trapResult.

NOTE [[Enumerate]] for proxy objects enforces the following invariants:

  • The result of [[Enumerate]] must be an Object.

9.5.12 [[OwnPropertyKeys]] ( )

When the [[OwnPropertyKeys]] internal method of a Proxy exotic object O is called the following steps are taken:

  1. Let handler be the value of the [[ProxyHandler]] internal slot of O.
  2. If handler is null, throw a TypeError exception.
  3. Assert: Type(handler) is Object.
  4. Let target be the value of the [[ProxyTarget]] internal slot of O.
  5. Let trap be GetMethod(handler, "ownKeys").
  6. ReturnIfAbrupt(trap).
  7. If trap is undefined, then
    1. Return target.[[OwnPropertyKeys]]().
  8. Let trapResultArray be Call(trap, handler, «target»).
  9. Let trapResult be CreateListFromArrayLike(trapResultArray, «‍String, Symbol»).
  10. ReturnIfAbrupt(trapResult).
  11. Let extensibleTarget be IsExtensible(target).
  12. ReturnIfAbrupt(extensibleTarget).
  13. Let targetKeys be target.[[OwnPropertyKeys]]().
  14. ReturnIfAbrupt(targetKeys).
  15. Assert: targetKeys is a List containing only String and Symbol values.
  16. Let targetConfigurableKeys be an empty List.
  17. Let targetNonconfigurableKeys be an empty List.
  18. Repeat, for each element key of targetKeys,
    1. Let desc be target.[[GetOwnProperty]](key).
    2. ReturnIfAbrupt(desc).
    3. If desc is not undefined and desc.[[Configurable]] is false, then
      1. Append key as an element of targetNonconfigurableKeys.
    4. Else,
      1. Append key as an element of targetConfigurableKeys.
  19. If extensibleTarget is true and targetNonconfigurableKeys is empty, then
    1. Return trapResult.
  20. Let uncheckedResultKeys be a new List which is a copy of trapResult.
  21. Repeat, for each key that is an element of targetNonconfigurableKeys,
    1. If key is not an element of uncheckedResultKeys, throw a TypeError exception.
    2. Remove key from uncheckedResultKeys
  22. If extensibleTarget is true, return trapResult.
  23. Repeat, for each key that is an element of targetConfigurableKeys,
    1. If key is not an element of uncheckedResultKeys, throw a TypeError exception.
    2. Remove key from uncheckedResultKeys
  24. If uncheckedResultKeys is not empty, throw a TypeError exception.
  25. Return trapResult.

NOTE [[OwnPropertyKeys]] for proxy objects enforces the following invariants:

  • The result of [[OwnPropertyKeys]] is a List.

  • The Type of each result List element is either String or Symbol.

  • The result List must contain the keys of all non-configurable own properties of the target object.

  • If the target object is not extensible, then the result List must contain all the keys of the own properties of the target object and no other values.

9.5.13 [[Call]] (thisArgument, argumentsList)

The [[Call]] internal method of a Proxy exotic object O is called with parameters thisArgument and argumentsList, a List of ECMAScript language values. The following steps are taken:

  1. Let handler be the value of the [[ProxyHandler]] internal slot of O.
  2. If handler is null, throw a TypeError exception.
  3. Assert: Type(handler) is Object.
  4. Let target be the value of the [[ProxyTarget]] internal slot of O.
  5. Let trap be GetMethod(handler, "apply").
  6. ReturnIfAbrupt(trap).
  7. If trap is undefined, then
    1. Return Call(target, thisArgument, argumentsList).
  8. Let argArray be CreateArrayFromList(argumentsList).
  9. Return Call(trap, handler, «target, thisArgument, argArray»).

NOTE A Proxy exotic object only has a [[Call]] internal method if the initial value of its [[ProxyTarget]] internal slot is an object that has a [[Call]] internal method.

9.5.14 [[Construct]] ( argumentsList, newTarget)

The [[Construct]] internal method of a Proxy exotic object O is called with parameters argumentsList which is a possibly empty List of ECMAScript language values and newTarget. The following steps are taken:

  1. Let handler be the value of the [[ProxyHandler]] internal slot of O.
  2. If handler is null, throw a TypeError exception.
  3. Assert: Type(handler) is Object.
  4. Let target be the value of the [[ProxyTarget]] internal slot of O.
  5. Let trap be GetMethod(handler, "construct").
  6. ReturnIfAbrupt(trap).
  7. If trap is undefined, then
    1. Assert: target has a [[Construct]] internal method.
    2. Return Construct(target, argumentsList, newTarget).
  8. Let argArray be CreateArrayFromList(argumentsList).
  9. Let newObj be Call(trap, handler, «target, argArray, newTarget »).
  10. ReturnIfAbrupt(newObj).
  11. If Type(newObj) is not Object, throw a TypeError exception.
  12. Return newObj.

NOTE 1 A Proxy exotic object only has a [[Construct]] internal method if the initial value of its [[ProxyTarget]] internal slot is an object that has a [[Construct]] internal method.

NOTE 2 [[Construct]] for proxy objects enforces the following invariants:

  • The result of [[Construct]] must be an Object.

9.5.15 ProxyCreate(target, handler)

The abstract operation ProxyCreate with arguments target and handler is used to specify the creation of new Proxy exotic objects. It performs the following steps:

  1. If Type(target) is not Object, throw a TypeError Exception.
  2. If target is a Proxy exotic object and the value of the [[ProxyHandler]] internal slot of target is null, throw a TypeError exception.
  3. If Type(handler) is not Object, throw a TypeError Exception.
  4. If handler is a Proxy exotic object and the value of the [[ProxyHandler]] internal slot of handler is null, throw a TypeError exception.
  5. Let P be a newly created object.
  6. Set P’s essential internal methods (except for [[Call]] and [[Construct]]) to the definitions specified in 9.5.
  7. If IsCallable(target) is true, then
    1. Set the [[Call]] internal method of P as specified in 9.5.13.
    2. If target has a [[Construct]] internal method, then
      1. Set the [[Construct]] internal method of P as specified in 9.5.14.
  8. Set the [[ProxyTarget]] internal slot of P to target.
  9. Set the [[ProxyHandler]] internal slot of P to handler.
  10. Return P.

10 ECMAScript Language: Source Code

10.1 Source Text

Syntax

SourceCharacter ::
any Unicode code point

ECMAScript code is expressed using Unicode, version 5.1 or later. ECMAScript source text is a sequence of code points. All Unicode code point values from U+0000 to U+10FFFF, including surrogate code points, may occur in source text where permitted by the ECMAScript grammars. The actual encodings used to store and interchange ECMAScript source text is not relevant to this specification. Regardless of the external source text encoding, a conforming ECMAScript implementation processes the source text as if it was an equivalent sequence of SourceCharacter values. Each SourceCharacter being a Unicode code point. Conforming ECMAScript implementations are not required to perform any normalization of source text, or behave as though they were performing normalization of source text.

The components of a combining character sequence are treated as individual Unicode code points even though a user might think of the whole sequence as a single character.

NOTE In string literals, regular expression literals, template literals and identifiers, any Unicode code point may also be expressed using Unicode escape sequences that explicitly express a code point’s numeric value. Within a comment, such an escape sequence is effectively ignored as part of the comment.

ECMAScript differs from the Java programming language in the behaviour of Unicode escape sequences. In a Java program, if the Unicode escape sequence \u000A, for example, occurs within a single-line comment, it is interpreted as a line terminator (Unicode code point U+000A is line feed (lf)) and therefore the next code point is not part of the comment. Similarly, if the Unicode escape sequence \u000A occurs within a string literal in a Java program, it is likewise interpreted as a line terminator, which is not allowed within a string literal—one must write \n instead of \u000A to cause a line feed (lf) to be part of the string value of a string literal. In an ECMAScript program, a Unicode escape sequence occurring within a comment is never interpreted and therefore cannot contribute to termination of the comment. Similarly, a Unicode escape sequence occurring within a string literal in an ECMAScript program always contributes to the literal and is never interpreted as a line terminator or as a code point that might terminate the string literal.

10.1.1 Static Semantics: UTF16Encoding ( cp )

The UTF16Encoding of a numeric code point value, cp, is determined as follows:

  1. Assert: 0 ≤ cp ≤ 0x10FFFF.
  2. If cp ≤ 65535, return cp.
  3. Let cu1 be floor((cp – 65536) / 1024) + 0xD800.
  4. Let cu2 be ((cp – 65536) modulo 1024) + 0xDC00.
  5. Return the code unit sequence consisting of cu1 followed by cu2.

10.1.2 Static Semantics: UTF16Decode( lead, trail )

Two code units, lead and trail, that form a UTF-16 surrogate pair are converted to a code point by performing the following steps:

  1. Assert: 0xD800 ≤ lead ≤ 0xDBFF and 0xDC00 ≤ trail ≤ 0xDFFF.
  2. Let cp be (lead – 0xD800) × 1024 + (trail – 0xDC00) + 0x10000.
  3. Return the code point cp.

10.2 Types of Source Code

There are four types of ECMAScript code:

  • Global code is source text that is treated as an ECMAScript Script. The global code of a particular Script does not include any source text that is parsed as part of a FunctionDeclaration, FunctionExpression, GeneratorDeclaration, GeneratorExpression, MethodDefinition, ArrowFunction, ClassDeclaration, or ClassExpression.

  • Eval code is the source text supplied to the built-in eval function. More precisely, if the parameter to the built-in eval function is a String, it is treated as an ECMAScript Script. The eval code for a particular invocation of eval is the global code portion of that Script.

  • Function code is source text that is parsed to supply the value of the [[ECMAScriptCode]] and [[FormalParameters]] internal slots (see 9.2) of an ECMAScript function object. The function code of a particular ECMAScript function does not include any source text that is parsed as the function code of a nested FunctionDeclaration, FunctionExpression, GeneratorDeclaration, GeneratorExpression, MethodDefinition, ArrowFunction, ClassDeclaration, or ClassExpression.

  • Module code is source text that is code that is provided as a ModuleBody. It is the code that is directly evaluated when a module is initialized. The module code of a particular module does not include any source text that is parsed as part of a nested FunctionDeclaration, FunctionExpression, GeneratorDeclaration, GeneratorExpression, MethodDefinition, ArrowFunction, ClassDeclaration, or ClassExpression.

NOTE Function code is generally provided as the bodies of Function Definitions (14.1), Arrow Function Definitions (14.2), Method Definitions (14.3) and Generator Definitions (14.4). Function code is also derived from the arguments to the Function constructor (19.2.1.1) and the GeneratorFunction constructor (25.2.1.1).

10.2.1 Strict Mode Code

An ECMAScript Script syntactic unit may be processed using either unrestricted or strict mode syntax and semantics. Code is interpreted as strict mode code in the following situations:

  • Global code is strict mode code if it begins with a Directive Prologue that contains a Use Strict Directive (see 14.1.1).

  • Module code is always strict mode code.

  • All parts of a ClassDeclaration or a ClassExpression are strict mode code.

  • Eval code is strict mode code if it begins with a Directive Prologue that contains a Use Strict Directive or if the call to eval is a direct eval (see 12.3.4.1) that is contained in strict mode code.

  • Function code is strict mode code if the associated FunctionDeclaration, FunctionExpression, GeneratorDeclaration, GeneratorExpression, MethodDefinition, or ArrowFunction is contained in strict mode code or if the code that produces the value of the function’s [[ECMAScriptCode]] internal slot begins with a Directive Prologue that contains a Use Strict Directive.

  • Function code that is supplied as the arguments to the built-in Function and Generator constructors is strict mode code if the last argument is a String that when processed has a FunctionBody begins with a Directive Prologue that contains a Use Strict Directive.

ECMAScript code that is not strict mode code is called non-strict code.

10.2.2 Non-ECMAScript Functions

An ECMAScript implementation may support the evaluation of exotic function objects whose evaluative behaviour is expressed in some implementation defined form of executable code other than via ECMAScript code. Whether a function object is an ECMAScript code function or a non-ECMAScript function is not semantically observable from the perspective of an ECMAScript code function that calls or is called by such a non-ECMAScript function.

11 ECMAScript Language: Lexical Grammar

The source text of an ECMAScript Script or Module is first converted into a sequence of input elements, which are tokens, line terminators, comments, or white space. The source text is scanned from left to right, repeatedly taking the longest possible sequence of code points as the next input element.

There are several situations where the identification of lexical input elements is sensitive to the syntactic grammar context that is consuming the input elements. This requires multiple goal symbols for the lexical grammar. The InputElementRegExpOrTemplateTail goal is used in syntactic grammar contexts where a RegularExpressionLiteral, a TemplateMiddle, or a TemplateTail is permitted. The InputElementRegExp goal symbol is used in all syntactic grammar contexts where a RegularExpressionLiteral is permitted but neither a TemplateMiddle, nor a TemplateTail is permitted. The InputElementTemplateTail goal is used in all syntactic grammar contexts where a TemplateMiddle or a TemplateTail is permitted but a RegularExpressionLiteral is not permitted. In all other contexts, InputElementDiv is used as the lexical goal symbol.

NOTE The use of multiple lexical goals ensures that there are no lexical ambiguities that would affect automatic semicolon insertion. For example, there are no syntactic grammar contexts where both a leading division or division-assignment, and a leading RegularExpressionLiteral are permitted. This is not affected by semicolon insertion (see 11.9); in examples such as the following:

a = b
/hi/g.exec(c).map(d);

where the first non-whitespace, non-comment code point after a LineTerminator is U+002F (SOLIDUS) and the syntactic context allows division or division-assignment, no semicolon is inserted at the LineTerminator. That is, the above example is interpreted in the same way as:

a = b / hi / g.exec(c).map(d);

Syntax

InputElementDiv ::
WhiteSpace
LineTerminator
Comment
CommonToken
DivPunctuator
RightBracePunctuator
InputElementRegExp ::
WhiteSpace
LineTerminator
Comment
CommonToken
RightBracePunctuator
RegularExpressionLiteral
InputElementRegExpOrTemplateTail ::
WhiteSpace
LineTerminator
Comment
CommonToken
RegularExpressionLiteral
TemplateSubstitutionTail
InputElementTemplateTail ::
WhiteSpace
LineTerminator
Comment
CommonToken
DivPunctuator
TemplateSubstitutionTail

11.1 Unicode Format-Control Characters

The Unicode format-control characters (i.e., the characters in category “Cf” in the Unicode Character Database such as left-to-right mark or right-to-left mark) are control codes used to control the formatting of a range of text in the absence of higher-level protocols for this (such as mark-up languages).

It is useful to allow format-control characters in source text to facilitate editing and display. All format control characters may be used within comments, and within string literals, template literals, and regular expression literals.

U+200C (Zero width non-joiner) and U+200D (Zero width joiner) are format-control characters that are used to make necessary distinctions when forming words or phrases in certain languages. In ECMAScript source text these code points may also be used in an IdentifierName (see 11.6.1) after the first character.

U+FEFF (Zero Width no-break space) is a format-control character used primarily at the start of a text to mark it as Unicode and to allow detection of the text's encoding and byte order. <ZWNBSP> characters intended for this purpose can sometimes also appear after the start of a text, for example as a result of concatenating files. In ECMAScript source text <ZWNBSP> code points are treated as white space characters (see 11.2).

The special treatment of certain format-control characters outside of comments, string literals, and regular expression literals is summarized in Table 31.

Table 31 — Format-Control Code Point Usage
Code Point Name Abbreviation Usage
U+200C Zero width non-joiner <ZWNJ> IdentifierPart
U+200D Zero width joiner <ZWJ> IdentifierPart
U+FEFF ZERO WIDTH NO-BREAK SPACE <ZWNBSP> WhiteSpace

11.2 White Space

White space code points are used to improve source text readability and to separate tokens (indivisible lexical units) from each other, but are otherwise insignificant. White space code points may occur between any two tokens and at the start or end of input. White space code points may occur within a StringLiteral, a RegularExpressionLiteral, a Template, or a TemplateSubstitutionTail where they are considered significant code points forming part of a literal value. They may also occur within a Comment, but cannot appear within any other kind of token.

The ECMAScript white space code points are listed in Table 32.

Table 32 — White Space Code Points
Code Point Name Abbreviation
U+0009 Character Tabulation <TAB>
U+000B LINE TABULATION <VT>
U+000C Form Feed (ff) <FF>
U+0020 Space <SP>
U+00A0 No-break space <NBSP>
U+FEFF ZERO wIDTH nO-bREAK SPACE <ZWNBSP>
Other category “Zs” Any other Unicode “Separator, space” code point <USP>

ECMAScript implementations must recognize as WhiteSpace code points listed in the “Separator, space” (Zs) category by Unicode 5.1. ECMAScript implementations may also recognize as WhiteSpace additional category Zs code points from subsequent editions of the Unicode Standard.

NOTE Other than for the code points listed in Table 32, ECMAScript WhiteSpace intentionally excludes all code points that have the Unicode “White_Space” property but which are not classified in category “Zs”.

Syntax

WhiteSpace ::
<TAB>
<VT>
<FF>
<SP>
<NBSP>
<zwnbsp>
<USP>

11.3 Line Terminators

Like white space code points, line terminator code points are used to improve source text readability and to separate tokens (indivisible lexical units) from each other. However, unlike white space code points, line terminators have some influence over the behaviour of the syntactic grammar. In general, line terminators may occur between any two tokens, but there are a few places where they are forbidden by the syntactic grammar. Line terminators also affect the process of automatic semicolon insertion (11.9). A line terminator cannot occur within any token except a StringLiteral, Template, or TemplateSubstitutionTail. Line terminators may only occur within a StringLiteral token as part of a LineContinuation.

A line terminator can occur within a MultiLineComment (11.4) but cannot occur within a SingleLineComment.

Line terminators are included in the set of white space code points that are matched by the \s class in regular expressions.

The ECMAScript line terminator code points are listed in Table 33.

Table 33 — Line Terminator Code Points
Code Point Unicode Name Abbreviation
U+000A Line Feed (LF) <LF>
U+000D Carriage Return (CR) <CR>
U+2028 Line separator <LS>
U+2029 Paragraph separator <PS>

Only the Unicode code points in Table 33 are treated as line terminators. Other new line or line breaking Unicode code points are not treated as line terminators but are treated as white space if they meet the requirements listed in Table 32. The sequence <CR><LF> is commonly used as a line terminator. It should be considered a single SourceCharacter for the purpose of reporting line numbers.

Syntax

LineTerminator ::
<LF>
<CR>
<LS>
<PS>
LineTerminatorSequence ::
<LF>
<CR> [lookahead ≠ <LF> ]
<LS>
<PS>
<CR> <LF>

11.4 Comments

Comments can be either single or multi-line. Multi-line comments cannot nest.

Because a single-line comment can contain any Unicode code point except a LineTerminator code point, and because of the general rule that a token is always as long as possible, a single-line comment always consists of all code points from the // marker to the end of the line. However, the LineTerminator at the end of the line is not considered to be part of the single-line comment; it is recognized separately by the lexical grammar and becomes part of the stream of input elements for the syntactic grammar. This point is very important, because it implies that the presence or absence of single-line comments does not affect the process of automatic semicolon insertion (see 11.9).

Comments behave like white space and are discarded except that, if a MultiLineComment contains a line terminator code point, then the entire comment is considered to be a LineTerminator for purposes of parsing by the syntactic grammar.

Syntax

Comment ::
MultiLineComment
SingleLineComment
MultiLineComment ::
/* MultiLineCommentCharsopt */
MultiLineCommentChars ::
MultiLineNotAsteriskChar MultiLineCommentCharsopt
* PostAsteriskCommentCharsopt
PostAsteriskCommentChars ::
MultiLineNotForwardSlashOrAsteriskChar MultiLineCommentCharsopt
* PostAsteriskCommentCharsopt
MultiLineNotAsteriskChar ::
SourceCharacter but not *
MultiLineNotForwardSlashOrAsteriskChar ::
SourceCharacter but not one of / or *
SingleLineComment ::
// SingleLineCommentCharsopt
SingleLineCommentChars ::
SingleLineCommentChar SingleLineCommentCharsopt
SingleLineCommentChar ::
SourceCharacter but not LineTerminator

11.5 Tokens

Syntax

CommonToken ::
IdentifierName
Punctuator
NumericLiteral
StringLiteral
Template

NOTE The DivPunctuator, RegularExpressionLiteral, RightBracePunctuator, and TemplateSubstitutionTail productions derive additional tokens that are not included in the CommonToken production.

11.6 Names and Keywords

IdentifierName and ReservedWord are tokens that are interpreted according to the Default Identifier Syntax given in Unicode Standard Annex #31, Identifier and Pattern Syntax, with some small modifications. ReservedWord is an enumerated subset of IdentifierName. The syntactic grammar defines Identifier as an IdentifierName that is not a ReservedWord (see 11.6.2). The Unicode identifier grammar is based on character properties specified by the Unicode Standard. The Unicode code points in the specified categories in version 5.1.0 of the Unicode standard must be treated as in those categories by all conforming ECMAScript implementations. ECMAScript implementations may recognize identifier code points defined in later editions of the Unicode Standard.

NOTE This standard specifies specific code point additions: U+0024 (dollar sign) and U+005F (LOW LINE) are permitted anywhere in an IdentifierName, and the code points U+200C (zero-width non-joiner) and U+200D (zero-width joiner) are permitted anywhere after the first code point of an IdentifierName.

Unicode escape sequences are permitted in an IdentifierName, where they contribute a single Unicode code point to the IdentifierName. The code point is expressed by the HexDigits of the UnicodeEscapeSequence (see 11.8.4). The \ preceding the UnicodeEscapeSequence and the u and { } code units, if they appear, do not contribute code points to the IdentifierName. A UnicodeEscapeSequence cannot be used to put a code point into an IdentifierName that would otherwise be illegal. In other words, if a \ UnicodeEscapeSequence sequence were replaced by the SourceCharacter it contributes, the result must still be a valid IdentifierName that has the exact same sequence of SourceCharacter elements as the original IdentifierName. All interpretations of IdentifierName within this specification are based upon their actual code points regardless of whether or not an escape sequence was used to contribute any particular code point.

Two IdentifierName that are canonically equivalent according to the Unicode standard are not equal unless, after replacement of each UnicodeEscapeSequence, they are represented by the exact same sequence of code points.

Syntax

IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart ::
UnicodeIDContinue
$
_
\ UnicodeEscapeSequence
<ZWNJ>
<ZWJ>
UnicodeIDStart ::
any Unicode code point with the Unicode property “ID_Start”
UnicodeIDContinue ::
any Unicode code point with the Unicode property “ID_Continue”

The definitions of the nonterminal UnicodeEscapeSequence is given in 11.8.4.

NOTE The sets of code points with Unicode properties “ID_Start” and “ID_Continue” include, respectively, the code points with Unicode properties “Other_ID_Start” and “Other_ID_Continue”.

11.6.1 Identifier Names

11.6.1.1 Static Semantics: Early Errors

IdentifierStart :: \ UnicodeEscapeSequence
  • It is a Syntax Error if SV(UnicodeEscapeSequence) is none of "$", or "_", or the UTF16Encoding (10.1.1) of a code point that would be matched by the UnicodeIDStart lexical grammar production.

IdentifierPart :: \ UnicodeEscapeSequence
  • It is a Syntax Error if SV(UnicodeEscapeSequence) is none of "$", or "_", or the UTF16Encoding (10.1.1) of either <ZWNJ> or <ZWJ>, or the UTF16Encoding of a Unicode code point that would be matched by the UnicodeIDContinue lexical grammar production.

11.6.1.2 Static Semantics: StringValue

See also: 11.8.4.2, 12.1.4.

IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
  1. Return the String value consisting of the sequence of code units corresponding to IdentifierName. In determining the sequence any occurrences of \ UnicodeEscapeSequence are first replaced with the code point represented by the UnicodeEscapeSequence and then the code points of the entire IdentifierName are converted to code units by UTF16Encoding (10.1.1) each code point.

11.6.2 Reserved Words

A reserved word is an IdentifierName that cannot be used as an Identifier.

Syntax

ReservedWord ::
Keyword
FutureReservedWord
NullLiteral
BooleanLiteral

NOTE The ReservedWord definitions are specified as literal sequences of specific SourceCharacter elements. A code point in a ReservedWord cannot be expressed by a \ UnicodeEscapeSequence.

11.6.2.1 Keywords

The following tokens are ECMAScript keywords and may not be used as Identifiers in ECMAScript programs.

Syntax

Keyword :: one of
break do in typeof
case else instanceof var
catch export new void
class extends return while
const finally super with
continue for switch yield
debugger function this
default if throw
delete import try

NOTE In some contexts yield is given the semantics of an Identifier. See 12.1.1. In strict mode code, let and static are treated as reserved keywords through static semantic restrictions (see 12.1.1, 13.2.1.1, 13.6.4.1, and 14.5.1) rather than the lexical grammar.

11.6.2.2 Future Reserved Words

The following tokens are reserved for used as keywords in future language extensions.

Syntax

FutureReservedWord ::
enum
await

await is only treated as a FutureReservedWord when Module is the goal symbol of the syntactic grammar.

NOTE Use of the following tokens within strict mode code (see 10.2.1) is also reserved. That usage is restricted using static semantic restrictions (see 12.1.1) rather than the lexical grammar:

implements package protected
interface private public

11.7 Punctuators

Syntax

Punctuator :: one of
{ ( ) [ ] .
... ; , < > <=
>= == != === !==
+ - * % ++ --
<< >> >>> & | ^
! ~ && || ? :
= += -= *= %= <<=
>>= >>>= &= |= ^= =>
DivPunctuator :: one of
/ /=
RightBracePunctuator ::
}

11.8 Literals

11.8.1 Null Literals

Syntax

NullLiteral ::
null

11.8.2 Boolean Literals

Syntax

BooleanLiteral ::
true
false

11.8.3 Numeric Literals

Syntax

NumericLiteral ::
DecimalLiteral
BinaryIntegerLiteral
OctalIntegerLiteral
HexIntegerLiteral
DecimalLiteral ::
DecimalIntegerLiteral . DecimalDigitsopt ExponentPartopt
. DecimalDigits ExponentPartopt
DecimalIntegerLiteral ExponentPartopt
DecimalIntegerLiteral ::
0
NonZeroDigit DecimalDigitsopt
DecimalDigits ::
DecimalDigit
DecimalDigits DecimalDigit
DecimalDigit :: one of
0 1 2 3 4 5 6 7 8 9
NonZeroDigit :: one of
1 2 3 4 5 6 7 8 9
ExponentPart ::
ExponentIndicator SignedInteger
ExponentIndicator :: one of
e E
SignedInteger ::
DecimalDigits
+ DecimalDigits
- DecimalDigits
BinaryIntegerLiteral ::
0b BinaryDigits
0B BinaryDigits
BinaryDigits ::
BinaryDigit
BinaryDigits BinaryDigit
BinaryDigit :: one of
0 1
OctalIntegerLiteral ::
0o OctalDigits
0O OctalDigits
OctalDigits ::
OctalDigit
OctalDigits OctalDigit
OctalDigit :: one of
0 1 2 3 4 5 6 7
HexIntegerLiteral ::
0x HexDigits
0X HexDigits
HexDigits ::
HexDigit
HexDigits HexDigit
HexDigit :: one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F

The SourceCharacter immediately following a NumericLiteral must not be an IdentifierStart or DecimalDigit.

NOTE For example:

3in

is an error and not the two input elements 3 and in.

A conforming implementation, when processing strict mode code (see 10.2.1), must not extend, as described in B.1.1, the syntax of NumericLiteral to include LegacyOctalIntegerLiteral, nor extend the syntax of DecimalIntegerLiteral to include NonOctalDecimalIntegerLiteral.

11.8.3.1 Static Semantics: MV’s

A numeric literal stands for a value of the Number type. This value is determined in two steps: first, a mathematical value (MV) is derived from the literal; second, this mathematical value is rounded as described below.

  • The MV of NumericLiteral :: DecimalLiteral is the MV of DecimalLiteral.

  • The MV of NumericLiteral :: BinaryIntegerLiteral is the MV of BinaryIntegerLiteral.

  • The MV of NumericLiteral :: OctalIntegerLiteral is the MV of OctalIntegerLiteral.

  • The MV of NumericLiteral :: HexIntegerLiteral is the MV of HexIntegerLiteral.

  • The MV of DecimalLiteral :: DecimalIntegerLiteral . is the MV of DecimalIntegerLiteral.

  • The MV of DecimalLiteral :: DecimalIntegerLiteral . DecimalDigits is the MV of DecimalIntegerLiteral plus (the MV of DecimalDigits × 10n), where n is the number of code points in DecimalDigits.

  • The MV of DecimalLiteral :: DecimalIntegerLiteral . ExponentPart is the MV of DecimalIntegerLiteral × 10e, where e is the MV of ExponentPart.

  • The MV of DecimalLiteral :: DecimalIntegerLiteral . DecimalDigits ExponentPart is (the MV of DecimalIntegerLiteral plus (the MV of DecimalDigits × 10n)) × 10e, where n is the number of code points in DecimalDigits and e is the MV of ExponentPart.

  • The MV of DecimalLiteral :: . DecimalDigits is the MV of DecimalDigits × 10n, where n is the number of code points in DecimalDigits.

  • The MV of DecimalLiteral :: . DecimalDigits ExponentPart is the MV of DecimalDigits × 10en, where n is the number of code points in DecimalDigits and e is the MV of ExponentPart.

  • The MV of DecimalLiteral :: DecimalIntegerLiteral is the MV of DecimalIntegerLiteral.

  • The MV of DecimalLiteral :: DecimalIntegerLiteral ExponentPart is the MV of DecimalIntegerLiteral × 10e, where e is the MV of ExponentPart.

  • The MV of DecimalIntegerLiteral :: 0 is 0.

  • The MV of DecimalIntegerLiteral :: NonZeroDigit is the MV of NonZeroDigit.

  • The MV of DecimalIntegerLiteral :: NonZeroDigit DecimalDigits is (the MV of NonZeroDigit × 10n) plus the MV of DecimalDigits, where n is the number of code points in DecimalDigits.

  • The MV of DecimalDigits :: DecimalDigit is the MV of DecimalDigit.

  • The MV of DecimalDigits :: DecimalDigits DecimalDigit is (the MV of DecimalDigits × 10) plus the MV of DecimalDigit.

  • The MV of ExponentPart :: ExponentIndicator SignedInteger is the MV of SignedInteger.

  • The MV of SignedInteger :: DecimalDigits is the MV of DecimalDigits.

  • The MV of SignedInteger :: + DecimalDigits is the MV of DecimalDigits.

  • The MV of SignedInteger :: - DecimalDigits is the negative of the MV of DecimalDigits.

  • The MV of DecimalDigit :: 0 or of HexDigit :: 0 or of OctalDigit :: 0 or of BinaryDigit :: 0 is 0.

  • The MV of DecimalDigit :: 1 or of NonZeroDigit :: 1 or of HexDigit :: 1 or of OctalDigit :: 1 or
    of BinaryDigit :: 1 is 1.

  • The MV of DecimalDigit :: 2 or of NonZeroDigit :: 2 or of HexDigit :: 2 or of OctalDigit :: 2 is 2.

  • The MV of DecimalDigit :: 3 or of NonZeroDigit :: 3 or of HexDigit :: 3 or of OctalDigit :: 3 is 3.

  • The MV of DecimalDigit :: 4 or of NonZeroDigit :: 4 or of HexDigit :: 4 or of OctalDigit :: 4 is 4.

  • The MV of DecimalDigit :: 5 or of NonZeroDigit :: 5 or of HexDigit :: 5 or of OctalDigit :: 5 is 5.

  • The MV of DecimalDigit :: 6 or of NonZeroDigit :: 6 or of HexDigit :: 6 or of OctalDigit :: 6 is 6.

  • The MV of DecimalDigit :: 7 or of NonZeroDigit :: 7 or of HexDigit :: 7 or of OctalDigit :: 7 is 7.

  • The MV of DecimalDigit :: 8 or of NonZeroDigit :: 8 or of HexDigit :: 8 is 8.

  • The MV of DecimalDigit :: 9 or of NonZeroDigit :: 9 or of HexDigit :: 9 is 9.

  • The MV of HexDigit :: a or of HexDigit :: A is 10.

  • The MV of HexDigit :: b or of HexDigit :: B is 11.

  • The MV of HexDigit :: c or of HexDigit :: C is 12.

  • The MV of HexDigit :: d or of HexDigit :: D is 13.

  • The MV of HexDigit :: e or of HexDigit :: E is 14.

  • The MV of HexDigit :: f or of HexDigit :: F is 15.

  • The MV of BinaryIntegerLiteral :: 0b BinaryDigits is the MV of BinaryDigits.

  • The MV of BinaryIntegerLiteral :: 0B BinaryDigits is the MV of BinaryDigits.

  • The MV of BinaryDigits :: BinaryDigit is the MV of BinaryDigit.

  • The MV of BinaryDigits :: BinaryDigits BinaryDigit is (the MV of BinaryDigits × 2) plus the MV of BinaryDigit.

  • The MV of OctalIntegerLiteral :: 0o OctalDigits is the MV of OctalDigits.

  • The MV of OctalIntegerLiteral :: 0O OctalDigits is the MV of OctalDigits.

  • The MV of OctalDigits :: OctalDigit is the MV of OctalDigit.

  • The MV of OctalDigits :: OctalDigits OctalDigit is (the MV of OctalDigits × 8) plus the MV of OctalDigit.

  • The MV of HexIntegerLiteral :: 0x HexDigits is the MV of HexDigits.

  • The MV of HexIntegerLiteral :: 0X HexDigits is the MV of HexDigits.

  • The MV of HexDigits :: HexDigit is the MV of HexDigit.

  • The MV of HexDigits :: HexDigits HexDigit is (the MV of HexDigits × 16) plus the MV of HexDigit.

Once the exact MV for a numeric literal has been determined, it is then rounded to a value of the Number type. If the MV is 0, then the rounded value is +0; otherwise, the rounded value must be the Number value for the MV (as specified in 6.1.6), unless the literal is a DecimalLiteral and the literal has more than 20 significant digits, in which case the Number value may be either the Number value for the MV of a literal produced by replacing each significant digit after the 20th with a 0 digit or the Number value for the MV of a literal produced by replacing each significant digit after the 20th with a 0 digit and then incrementing the literal at the 20th significant digit position. A digit is significant if it is not part of an ExponentPart and

  • it is not 0; or
  • there is a nonzero digit to its left and there is a nonzero digit, not in the ExponentPart, to its right.

11.8.4 String Literals

NOTE A string literal is zero or more Unicode code points enclosed in single or double quotes. Unicode code points may also be represented by an escape sequence. All code points may appear literally in a string literal except for the closing quote code points, U+005C (REVERSE SOLIDUS), U+000D (carriage return), U+2028 (line separator), U+2029 (paragraph separator), and U+000A (line feed). Any code points may appear in the form of an escape sequence. String literals evaluate to ECMAScript String values. When generating these string values Unicode code points are UTF-16 encoded as defined in 10.1.1. Code points belonging to the Basic Multilingual Plane are encoded as a single code unit element of the string. All other code points are encoded as two code unit elements of the string.

Syntax

StringLiteral ::
" DoubleStringCharactersopt "
' SingleStringCharactersopt '
DoubleStringCharacters ::
DoubleStringCharacter DoubleStringCharactersopt
SingleStringCharacters ::
SingleStringCharacter SingleStringCharactersopt
DoubleStringCharacter ::
SourceCharacter but not one of " or \ or LineTerminator
\ EscapeSequence
LineContinuation
SingleStringCharacter ::
SourceCharacter but not one of ' or \ or LineTerminator
\ EscapeSequence
LineContinuation
LineContinuation ::
\ LineTerminatorSequence
EscapeSequence ::
CharacterEscapeSequence
0 [lookahead ∉ DecimalDigit]
HexEscapeSequence
UnicodeEscapeSequence

A conforming implementation, when processing strict mode code (see 10.2.1), must not extend the syntax of EscapeSequence to include LegacyOctalEscapeSequence as described in B.1.2.

CharacterEscapeSequence ::
SingleEscapeCharacter
NonEscapeCharacter
SingleEscapeCharacter :: one of
' " \ b f n r t v
NonEscapeCharacter ::
SourceCharacter but not one of EscapeCharacter or LineTerminator
EscapeCharacter ::
SingleEscapeCharacter
DecimalDigit
x
u
HexEscapeSequence ::
x HexDigit HexDigit
UnicodeEscapeSequence ::
u Hex4Digits
u{ HexDigits }
Hex4Digits ::
HexDigit HexDigit HexDigit HexDigit

The definition of the nonterminal HexDigit is given in 11.8.3. SourceCharacter is defined in 10.1.

NOTE A line terminator code point cannot appear in a string literal, except as part of a LineContinuation to produce the empty code points sequence. The proper way to cause a line terminator code point to be part of the String value of a string literal is to use an escape sequence such as \n or \u000A.

11.8.4.1 Static Semantics: Early Errors

UnicodeEscapeSequence :: u{ HexDigits }
  • It is a Syntax Error if the MV of HexDigits > 1114111.

11.8.4.2 Static Semantics: StringValue

See also: 11.6.1.2, 12.1.4.

StringLiteral ::
" DoubleStringCharactersopt "
' SingleStringCharactersopt '
  1. Return the String value whose elements are the SV of this StringLiteral.

11.8.4.3 Static Semantics: SV’s

A string literal stands for a value of the String type. The String value (SV) of the literal is described in terms of code unit values contributed by the various parts of the string literal. As part of this process, some Unicode code points within the string literal are interpreted as having a mathematical value (MV), as described below or in 11.8.3.

  • The SV of StringLiteral :: "" is the empty code unit sequence.

  • The SV of StringLiteral :: '' is the empty code unit sequence.

  • The SV of StringLiteral :: " DoubleStringCharacters " is the SV of DoubleStringCharacters.

  • The SV of StringLiteral :: ' SingleStringCharacters ' is the SV of SingleStringCharacters.

  • The SV of DoubleStringCharacters :: DoubleStringCharacter is a sequence of one or two code units that is the SV of DoubleStringCharacter.

  • The SV of DoubleStringCharacters :: DoubleStringCharacter DoubleStringCharacters is a sequence of one or two code units that is the SV of DoubleStringCharacter followed by all the code units in the SV of DoubleStringCharacters in order.

  • The SV of SingleStringCharacters :: SingleStringCharacter is a sequence of one or two code units that is the SV of SingleStringCharacter.

  • The SV of SingleStringCharacters :: SingleStringCharacter SingleStringCharacters is a sequence of one or two code units that is the SV of SingleStringCharacter followed by all the code units in the SV of SingleStringCharacters in order.

  • The SV of DoubleStringCharacter :: SourceCharacter but not one of " or \ or LineTerminator is the UTF16Encoding (10.1.1) of the code point value of SourceCharacter.

  • The SV of DoubleStringCharacter :: \ EscapeSequence is the SV of the EscapeSequence.

  • The SV of DoubleStringCharacter :: LineContinuation is the empty code unit sequence.

  • The SV of SingleStringCharacter :: SourceCharacter but not one of ' or \ or LineTerminator is the UTF16Encoding (10.1.1) of the code point value of SourceCharacter.

  • The SV of SingleStringCharacter :: \ EscapeSequence is the SV of the EscapeSequence.

  • The SV of SingleStringCharacter :: LineContinuation is the empty code unit sequence.

  • The SV of EscapeSequence :: CharacterEscapeSequence is the SV of the CharacterEscapeSequence.

  • The SV of EscapeSequence :: 0 is the code unit value 0.

  • The SV of EscapeSequence :: HexEscapeSequence is the SV of the HexEscapeSequence.

  • The SV of EscapeSequence :: UnicodeEscapeSequence is the SV of the UnicodeEscapeSequence.

  • The SV of CharacterEscapeSequence :: SingleEscapeCharacter is the code unit whose value is determined by the SingleEscapeCharacter according to { REF _Ref365803173 \h }Table 34.

Table 34 — String Single Character Escape Sequences
Escape Sequence Code Unit Value Unicode Character Name Symbol
\b 0x0008 BACKSPACE <BS>
\t 0x0009 CHARACTER TABULATION <HT>
\n 0x000A line feed (lf) <LF>
\v 0x000B LINE TABULATION <VT>
\f 0x000C form feed (ff) <FF>
\r 0x000D carriage return (cr) <CR>
\" 0x0022 quotation Mark "
\' 0x0027 apostrophe '
\\ 0x005C REverse Solidus \
  • The SV of CharacterEscapeSequence :: NonEscapeCharacter is the SV of the NonEscapeCharacter.

  • The SV of NonEscapeCharacter :: SourceCharacter but not one of EscapeCharacter or LineTerminator is the UTF16Encoding (10.1.1) of the code point value of SourceCharacter.

  • The SV of HexEscapeSequence :: x HexDigit HexDigit is the code unit value that is (16 times the MV of the first HexDigit) plus the MV of the second HexDigit.

  • The SV of UnicodeEscapeSequence :: u Hex4Digits is the SV of Hex4Digits.

  • The SV of Hex4Digits :: HexDigit HexDigit HexDigit HexDigit is the code unit value that is (4096 times the MV of the first HexDigit) plus (256 times the MV of the second HexDigit) plus (16 times the MV of the third HexDigit) plus the MV of the fourth HexDigit.

  • The SV of UnicodeEscapeSequence :: u{ HexDigits } is the UTF16Encoding (10.1.1) of the MV of HexDigits.

11.8.5 Regular Expression Literals

NOTE A regular expression literal is an input element that is converted to a RegExp object (see 21.2) each time the literal is evaluated. Two regular expression literals in a program evaluate to regular expression objects that never compare as === to each other even if the two literals' contents are identical. A RegExp object may also be created at runtime by new RegExp or calling the RegExp constructor as a function (see 21.2.3).

The productions below describe the syntax for a regular expression literal and are used by the input element scanner to find the end of the regular expression literal. The source text comprising the RegularExpressionBody and the RegularExpressionFlags are subsequently parsed again using the more stringent ECMAScript Regular Expression grammar (21.2.1).

An implementation may extend the ECMAScript Regular Expression grammar defined in 21.2.1, but it must not extend the RegularExpressionBody and RegularExpressionFlags productions defined below or the productions used by these productions.

Syntax

RegularExpressionLiteral ::
/ RegularExpressionBody / RegularExpressionFlags
RegularExpressionBody ::
RegularExpressionFirstChar RegularExpressionChars
RegularExpressionChars ::
[empty]
RegularExpressionChars RegularExpressionChar
RegularExpressionFirstChar ::
RegularExpressionNonTerminator but not one of * or \ or / or [
RegularExpressionBackslashSequence
RegularExpressionClass
RegularExpressionChar ::
RegularExpressionNonTerminator but not one of \ or / or [
RegularExpressionBackslashSequence
RegularExpressionClass
RegularExpressionBackslashSequence ::
\ RegularExpressionNonTerminator
RegularExpressionNonTerminator ::
SourceCharacter but not LineTerminator
RegularExpressionClass ::
[ RegularExpressionClassChars ]
RegularExpressionClassChars ::
[empty]
RegularExpressionClassChars RegularExpressionClassChar
RegularExpressionClassChar ::
RegularExpressionNonTerminator but not one of ] or \
RegularExpressionBackslashSequence
RegularExpressionFlags ::
[empty]
RegularExpressionFlags IdentifierPart

NOTE Regular expression literals may not be empty; instead of representing an empty regular expression literal, the code unit sequence // starts a single-line comment. To specify an empty regular expression, use: /(?:)/.

11.8.5.1 Static Semantics: Early Errors

RegularExpressionFlags :: RegularExpressionFlags IdentifierPart
  • It is a Syntax Error if IdentifierPart contains a Unicode escape sequence.

11.8.5.2 Static Semantics: BodyText

RegularExpressionLiteral :: / RegularExpressionBody / RegularExpressionFlags
  1. Return the source text that was recognized as RegularExpressionBody.

11.8.5.3 Static Semantics: FlagText

RegularExpressionLiteral :: / RegularExpressionBody / RegularExpressionFlags
  1. Return the source text that was recognized as RegularExpressionFlags.

11.8.6 Template Literal Lexical Components

Syntax

Template ::
NoSubstitutionTemplate
TemplateHead
NoSubstitutionTemplate ::
` TemplateCharactersopt `
TemplateHead ::
` TemplateCharactersopt ${
TemplateSubstitutionTail ::
TemplateMiddle
TemplateTail
TemplateMiddle ::
} TemplateCharactersopt ${
TemplateTail ::
} TemplateCharactersopt `
TemplateCharacters ::
TemplateCharacter TemplateCharactersopt
TemplateCharacter ::
$ [lookahead ≠ { ]
\ EscapeSequence
LineContinuation
LineTerminatorSequence
SourceCharacter but not one of ` or \ or $ or LineTerminator

A conforming implementation must not use the extended definition of EscapeSequence described in B.1.2 when parsing a TemplateCharacter.

NOTE TemplateSubstitutionTail is used by the InputElementTemplateTail alternative lexical goal.

11.8.6.1 Static Semantics: TV’s and TRV’s

A template literal component is interpreted as a sequence of Unicode code points. The Template Value (TV) of a literal component is described in terms of code unit values (SV, 11.8.4) contributed by the various parts of the template literal component. As part of this process, some Unicode code points within the template component are interpreted as having a mathematical value (MV, 11.8.3). In determining a TV, escape sequences are replaced by the UTF-16 code unit(s) of the Unicode code point represented by the escape sequence. The Template Raw Value (TRV) is similar to a Template Value with the difference that in TRVs escape sequences are interpreted literally.

  • The TV and TRV of NoSubstitutionTemplate :: `` is the empty code unit sequence.

  • The TV and TRV of TemplateHead :: `${ is the empty code unit sequence.

  • The TV and TRV of TemplateMiddle :: }${ is the empty code unit sequence.

  • The TV and TRV of TemplateTail :: }` is the empty code unit sequence.

  • The TV of NoSubstitutionTemplate :: ` TemplateCharacters ` is the TV of TemplateCharacters.

  • The TV of TemplateHead :: ` TemplateCharacters ${ is the TV of TemplateCharacters.

  • The TV of TemplateMiddle :: } TemplateCharacters ${ is the TV of TemplateCharacters.

  • The TV of TemplateTail :: } TemplateCharacters ` is the TV of TemplateCharacters.

  • The TV of TemplateCharacters :: TemplateCharacter is the TV of TemplateCharacter.

  • The TV of TemplateCharacters :: TemplateCharacter TemplateCharacters is a sequence consisting of the code units in the TV of TemplateCharacter followed by all the code units in the TV of TemplateCharacters in order.

  • The TV of TemplateCharacter :: SourceCharacter but not one of ` or \ or $ or LineTerminator is the UTF16Encoding (10.1.1) of the code point value of SourceCharacter.

  • The TV of TemplateCharacter :: $ is the code unit value 0x0024.

  • The TV of TemplateCharacter :: \ EscapeSequence is the SV of EscapeSequence.

  • The TV of TemplateCharacter :: LineContinuation is the TV of LineContinuation.

  • The TV of TemplateCharacter :: LineTerminatorSequence is the TRV of LineTerminatorSequence.

  • The TV of LineContinuation :: \ LineTerminatorSequence is the empty code unit sequence.

  • The TRV of NoSubstitutionTemplate :: ` TemplateCharacters ` is the TRV of TemplateCharacters.

  • The TRV of TemplateHead :: ` TemplateCharacters ${ is the TRV of TemplateCharacters.

  • The TRV of TemplateMiddle :: } TemplateCharacters ${ is the TRV of TemplateCharacters.

  • The TRV of TemplateTail :: } TemplateCharacters ` is the TRV of TemplateCharacters.

  • The TRV of TemplateCharacters :: TemplateCharacter is the TRV of TemplateCharacter.

  • The TRV of TemplateCharacters :: TemplateCharacter TemplateCharacters is a sequence consisting of the code units in the TRV of TemplateCharacter followed by all the code units in the TRV of TemplateCharacters, in order.

  • The TRV of TemplateCharacter :: SourceCharacter but not one of ` or \ or $ or LineTerminator is the UTF16Encoding (10.1.1) of the code point value of SourceCharacter.

  • The TRV of TemplateCharacter :: $ is the code unit value 0x0024.

  • The TRV of TemplateCharacter :: \ EscapeSequence is the sequence consisting of the code unit value 0x005C followed by the code units of TRV of EscapeSequence.

  • The TRV of TemplateCharacter :: LineContinuation is the TRV of LineContinuation.

  • The TRV of TemplateCharacter :: LineTerminatorSequence is the TRV of LineTerminatorSequence.

  • The TRV of EscapeSequence :: CharacterEscapeSequence is the TRV of the CharacterEscapeSequence.

  • The TRV of EscapeSequence :: 0 is the code unit value 0x0030.

  • The TRV of EscapeSequence :: HexEscapeSequence is the TRV of the HexEscapeSequence.

  • The TRV of EscapeSequence :: UnicodeEscapeSequence is the TRV of the UnicodeEscapeSequence.

  • The TRV of CharacterEscapeSequence :: SingleEscapeCharacter is the TRV of the SingleEscapeCharacter.

  • The TRV of CharacterEscapeSequence :: NonEscapeCharacter is the SV of the NonEscapeCharacter.

  • The TRV of SingleEscapeCharacter :: one of ' " \ b f n r t v is the SV of the SourceCharacter that is that single code point.

  • The TRV of HexEscapeSequence :: x HexDigit HexDigit is the sequence consisting of code unit value 0x0078 followed by TRV of the first HexDigit followed by the TRV of the second HexDigit.

  • The TRV of UnicodeEscapeSequence :: u Hex4Digits is the sequence consisting of code unit value 0x0075 followed by TRV of Hex4Digits.

  • The TRV of UnicodeEscapeSequence :: u{ HexDigits } is the sequence consisting of code unit value 0x0075 followed by code unit value 0x007B followed by TRV of HexDigits followed by code unit value 0x007D.

  • The TRV of Hex4Digits :: HexDigit HexDigit HexDigit HexDigit is the sequence consisting of the TRV of the first HexDigit followed by the TRV of the second HexDigit followed by the TRV of the third HexDigit followed by the TRV of the fourth HexDigit.

  • The TRV of HexDigits :: HexDigit is the TRV of HexDigit.

  • The TRV of HexDigits :: HexDigits HexDigit is the sequence consisting of TRV of HexDigits followed by TRV of HexDigit.

  • The TRV of a HexDigit is the SV of the SourceCharacter that is that HexDigit.

  • The TRV of LineContinuation :: \ LineTerminatorSequence is the sequence consisting of the code unit value 0x005C followed by the code units of TRV of LineTerminatorSequence.

  • The TRV of LineTerminatorSequence :: <LF> is the code unit value 0x000A.

  • The TRV of LineTerminatorSequence :: <CR> is the code unit value 0x000A.

  • The TRV of LineTerminatorSequence :: <LS> is the code unit value 0x2028.

  • The TRV of LineTerminatorSequence :: <PS> is the code unit value 0x2029.

  • The TRV of LineTerminatorSequence :: <CR><LF> is the sequence consisting of the code unit value 0x000A.

NOTE TV excludes the code units of LineContinuation while TRV includes them. <CR><LF> and <CR> LineTerminatorSequences are normalized to <LF> for both TV and TRV. An explicit EscapeSequence is needed to include a <CR> or <CR><LF> sequence.

11.9 Automatic Semicolon Insertion

Certain ECMAScript statements (empty statement, let, const, import, and export declarations, variable statement, expression statement, debugger statement, continue statement, break statement, return statement, and throw statement) must be terminated with semicolons. Such semicolons may always appear explicitly in the source text. For convenience, however, such semicolons may be omitted from the source text in certain situations. These situations are described by saying that semicolons are automatically inserted into the source code token stream in those situations.

11.9.1 Rules of Automatic Semicolon Insertion

In the following rules, “token” means the actual recognized lexical token determined using the current lexical goal symbol as described in clause 11.

There are three basic rules of semicolon insertion:

  1. When, as a Script or Module is parsed from left to right, a token (called the offending token) is encountered that is not allowed by any production of the grammar, then a semicolon is automatically inserted before the offending token if one or more of the following conditions is true:
    • The offending token is separated from the previous token by at least one LineTerminator.

    • The offending token is }.

    • The previous token is ) and the inserted semicolon would then be parsed as the terminating semicolon of a do-while statement (13.6.1).

  2. When, as the Script or Module is parsed from left to right, the end of the input stream of tokens is encountered and the parser is unable to parse the input token stream as a single complete ECMAScript Script or Module, then a semicolon is automatically inserted at the end of the input stream.
  3. When, as the Script or Module is parsed from left to right, a token is encountered that is allowed by some production of the grammar, but the production is a restricted production and the token would be the first token for a terminal or nonterminal immediately following the annotation [no LineTerminator here]” within the restricted production (and therefore such a token is called a restricted token), and the restricted token is separated from the previous token by at least one LineTerminator, then a semicolon is automatically inserted before the restricted token.

However, there is an additional overriding condition on the preceding rules: a semicolon is never inserted automatically if the semicolon would then be parsed as an empty statement or if that semicolon would become one of the two semicolons in the header of a for statement (see 13.6.3).

NOTE The following are the only restricted productions in the grammar:

PostfixExpression[Yield] :
LeftHandSideExpression[?Yield] [no LineTerminator here] ++
LeftHandSideExpression[?Yield] [no LineTerminator here] --
ContinueStatement[Yield] :
continue;
continue [no LineTerminator here] LabelIdentifier[?Yield] ;
BreakStatement[Yield] :
break ;
break [no LineTerminator here] LabelIdentifier[?Yield] ;
ReturnStatement[Yield] :
return [no LineTerminator here] Expression ;
return [no LineTerminator here] Expression[In, ?Yield] ;
ThrowStatement[Yield] :
throw [no LineTerminator here] Expression[In, ?Yield] ;
ArrowFunction[In, Yield] :
ArrowParameters[?Yield] [no LineTerminator here] => ConciseBody[?In]
YieldExpression[In] :
yield [no LineTerminator here] * AssignmentExpression[?In, Yield]
yield [no LineTerminator here] AssignmentExpression[?In, Yield]

The practical effect of these restricted productions is as follows:

When a ++ or -- token is encountered where the parser would treat it as a postfix operator, and at least one LineTerminator occurred between the preceding token and the ++ or -- token, then a semicolon is automatically inserted before the ++ or -- token.

When a continue, break, return, throw, or yield token is encountered and a LineTerminator is encountered before the next token, a semicolon is automatically inserted after the continue, break, return, throw, or yield token.

The resulting practical advice to ECMAScript programmers is:

A postfix ++ or -- operator should appear on the same line as its operand.

An Expression in a return or throw statement or an AssignmentExpression in a yield expression should start on the same line as the return, throw, or yield token.

An IdentifierReference in a break or continue statement should be on the same line as the break or continue token.

11.9.2 Examples of Automatic Semicolon Insertion

The source

{ 1 2 } 3

is not a valid sentence in the ECMAScript grammar, even with the automatic semicolon insertion rules. In contrast, the source

{ 1
2 } 3

is also not a valid ECMAScript sentence, but is transformed by automatic semicolon insertion into the following:

{ 1
;2 ;} 3;

which is a valid ECMAScript sentence.

The source

for (a; b
)

is not a valid ECMAScript sentence and is not altered by automatic semicolon insertion because the semicolon is needed for the header of a for statement. Automatic semicolon insertion never inserts one of the two semicolons in the header of a for statement.

The source

return
a + b

is transformed by automatic semicolon insertion into the following:

return;
a + b;

NOTE The expression a + b is not treated as a value to be returned by the return statement, because a LineTerminator separates it from the token return.

The source

a = b
++c

is transformed by automatic semicolon insertion into the following:

a = b;
++c;

NOTE The token ++ is not treated as a postfix operator applying to the variable b, because a LineTerminator occurs between b and ++.

The source

if (a > b)
else c = d

is not a valid ECMAScript sentence and is not altered by automatic semicolon insertion before the else token, even though no production of the grammar applies at that point, because an automatically inserted semicolon would then be parsed as an empty statement.

The source

a = b + c
(d + e).print()

is not transformed by automatic semicolon insertion, because the parenthesized expression that begins the second line can be interpreted as an argument list for a function call:

a = b + c(d + e).print()

In the circumstance that an assignment statement must begin with a left parenthesis, it is a good idea for the programmer to provide an explicit semicolon at the end of the preceding statement rather than to rely on automatic semicolon insertion.

12 ECMAScript Language: Expressions

12.1 Identifiers

Syntax

IdentifierReference[Yield] :
Identifier
[~Yield] yield

BindingIdentifier[Yield] :

Identifier
[~Yield] yield

LabelIdentifier[Yield] :
Identifier
[~Yield] yield
Identifier :
IdentifierName but not ReservedWord

12.1.1 Static Semantics: Early Errors

BindingIdentifier : Identifier
  • It is a Syntax Error if the code matched by this production is contained in strict mode code and the StringValue of Identifier is "arguments" or "eval".

IdentifierReference : yield

BindingIdentifier : yield

LabelIdentifier : yield
  • It is a Syntax Error if the code matched by this production is contained in strict code.

IdentifierReference[Yield] : Identifier

BindingIdentifier[Yield] : Identifier

LabelIdentifier[Yield] : Identifier

  • It is a Syntax Error if this production has a [Yield] parameter and StringValue of Identifier is "yield".

Identifier : IdentifierName but not ReservedWord
  • It is a Syntax Error if this phrase is contained in strict mode code and the StringValue of IdentifierName is: "implements", "interface", "let", "package", "private", "protected", "public", "static", or "yield".

  • It is a Syntax Error if StringValue of IdentifierName is the same string value as the StringValue of any ReservedWord except for yield.

NOTE StringValue of IdentifierName normalizes any Unicode escape sequences in IdentifierName hence such escapes cannot be used to write an Identifier whose code point sequence is the same as a ReservedWord.

12.1.2 Static Semantics: BoundNames

See also: 13.2.1.2, 13.2.2.1, 13.2.3.1, 13.6.4.2, 14.1.3, 14.2.2, 14.4.2, 14.5.2, 15.2.2.2, 15.2.3.2.

BindingIdentifier : Identifier
  1. Return a new List containing the StringValue of Identifier.
BindingIdentifier : yield
  1. Return a new List containing "yield".

12.1.3 Static Semantics: IsValidSimpleAssignmentTarget

See also: 12.2.0.4, 12.2.9.3, 12.3.1.5, 12.4.3, 12.5.3, 12.6.2, 12.7.2, 12.8.2, 12.9.2, 12.10.2, 12.11.2, 12.12.2, 12.13.2, 12.14.3, 12.15.2.

IdentifierReference : Identifier
  1. If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return false.
  2. Return true.
IdentifierReference : yield
  1. Return true.

12.1.4 Static Semantics: StringValue

See also: 11.6.1.2, 11.8.4.2.

IdentifierReference : yield

BindingIdentifier : yield

LabelIdentifier : yield
  1. Return "yield".
Identifier : IdentifierName but not ReservedWord
  1. Return the StringValue of IdentifierName.

12.1.5 Runtime Semantics: BindingInitialization

With arguments value and environment.

See also: 13.2.3.5, 13.6.4.9.

NOTE undefined is passed for environment to indicate that a PutValue operation should be used to assign the initialization value. This is the case for var statements and formal parameter lists of some non-strict functions (See 9.2.12). In those cases a lexical binding is hoisted and preinitialized prior to evaluation of its initializer.

BindingIdentifier : Identifier
  1. Let name be StringValue of Identifier.
  2. Return InitializeBoundName( name, value, environment).
BindingIdentifier : yield
  1. Return InitializeBoundName("yield", value, environment).

12.1.5.1 Runtime Semantics: InitializeBoundName(name, value, environment)

  1. Assert: Type(name) is String.
  2. If environment is not undefined, then
    1. Let env be the EnvironmentRecord component of environment.
    2. Perform env.InitializeBinding(name, value).
    3. Return NormalCompletion(undefined).
  3. Else
    1. Let lhs be ResolveBinding(name).
    2. Return PutValue(lhs, value).

12.1.6 Runtime Semantics: Evaluation

IdentifierReference : Identifier
  1. Return ResolveBinding(StringValue of Identifier).
IdentifierReference : yield
  1. Return ResolveBinding("yield").

NOTE 1: The result of evaluating an IdentifierReference is always a value of type Reference.

NOTE 2: In non-strict code, the keyword yield may be used as an identifier. Evaluating the IdentifierReference production resolves the binding of yield as if it was an Identifier. Early Error restriction ensures that such an evaluation only can occur for non-strict code. See 13.2.1 for the handling of yield in binding creation contexts.

12.2 Primary Expression

Syntax

PrimaryExpression[Yield] :
this
IdentifierReference[?Yield]
Literal
ArrayLiteral[?Yield]
ObjectLiteral[?Yield]
FunctionExpression
ClassExpression
GeneratorExpression
RegularExpressionLiteral
TemplateLiteral[?Yield]
CoverParenthesizedExpressionAndArrowParameterList[?Yield]
CoverParenthesizedExpressionAndArrowParameterList[Yield] :
( Expression[In, ?Yield] )
( )
( ... BindingIdentifier[?Yield] )
( Expression[In, ?Yield] , ... BindingIdentifier[?Yield] )

Supplemental Syntax

When processing the production

PrimaryExpression[Yield] : CoverParenthesizedExpressionAndArrowParameterList[?Yield]
the interpretation of CoverParenthesizedExpressionAndArrowParameterList is refined using the following grammar:

ParenthesizedExpression[Yield] :
( Expression[In, ?Yield] )

12.2.0 Semantics

12.2.0.1 Static Semantics: CoveredParenthesizedExpression

CoverParenthesizedExpressionAndArrowParameterList[Yield] : ( Expression[In, ?Yield] )
  1. Return the result of parsing the lexical token stream matched by CoverParenthesizedExpressionAndArrowParameterList[Yield] using either ParenthesizedExpression or ParenthesizedExpression[Yield] as the goal symbol depending upon whether the [Yield] grammar parameter was present when CoverParenthesizedExpressionAndArrowParameterList was matched.

12.2.0.2 Static Semantics: IsFunctionDefinition

See also: 12.2.9.2, 12.3.1.2, 12.4.2, 12.5.2, 12.6.1, 12.7.1, 12.8.1, 12.9.1, 12.10.1, 12.11.1, 12.12.1, 12.13.1, 12.14.2, 12.15.1, 14.1.11, 14.4.9, 14.5.8.

PrimaryExpression :
this
IdentifierReference
Literal
ArrayLiteral
ObjectLiteral
RegularExpressionLiteral
TemplateLiteral
  1. Return false.
PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList
  1. Let expr be CoveredParenthesizedExpression of CoverParenthesizedExpressionAndArrowParameterList.
  2. Return IsFunctionDefinition of expr.

12.2.0.3 Static Semantics: IsIdentifierRef

See also: 12.3.1.4.

PrimaryExpression :
IdentifierReference
  1. Return true.
PrimaryExpression :
this
Literal
ArrayLiteral
ObjectLiteral
FunctionExpression
ClassExpression
GeneratorExpression
RegularExpressionLiteral
TemplateLiteral
CoverParenthesizedExpressionAndArrowParameterList
  1. Return false.

12.2.0.4 Static Semantics: IsValidSimpleAssignmentTarget

See also: 12.1.3, 12.2.9.3, 12.3.1.5, 12.4.3, 12.5.3, 12.6.2, 12.7.2, 12.8.2, 12.9.2, 12.10.2, 12.11.2, 12.12.2, 12.13.2, 12.14.3, 12.15.2.

PrimaryExpression :
this
Literal
ArrayLiteral
ObjectLiteral
FunctionExpression
ClassExpression
GeneratorExpression
RegularExpressionLiteral
TemplateLiteral
  1. Return false.
PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList
  1. Let expr be CoveredParenthesizedExpression of CoverParenthesizedExpressionAndArrowParameterList.
  2. Return IsValidSimpleAssignmentTarget of expr.

12.2.1 The this Keyword

12.2.1.1 Runtime Semantics: Evaluation

PrimaryExpression : this
  1. Return ResolveThisBinding( ) .

12.2.2 Identifier Reference

See 12.1 for IdentifierReference.

12.2.3 Literals

Syntax

Literal :
NullLiteral
BooleanLiteral
NumericLiteral
StringLiteral

12.2.3.1 Runtime Semantics: Evaluation

Literal : NullLiteral
  1. Return null.
Literal : BooleanLiteral
  1. Return false if BooleanLiteral is the token false.
  2. Return true if BooleanLiteral is the token true.
Literal : NumericLiteral
  1. Return the number whose value is MV of NumericLiteral as defined in 11.8.3.
Literal : StringLiteral
  1. Return the StringValue of StringLiteral as defined in 11.8.4.2.

12.2.4 Array Initializer

NOTE An ArrayLiteral is an expression describing the initialization of an Array object, using a list, of zero or more expressions each of which represents an array element, enclosed in square brackets. The elements need not be literals; they are evaluated each time the array initializer is evaluated.

Array elements may be elided at the beginning, middle or end of the element list. Whenever a comma in the element list is not preceded by an AssignmentExpression (i.e., a comma at the beginning or after another comma), the missing array element contributes to the length of the Array and increases the index of subsequent elements. Elided array elements are not defined. If an element is elided at the end of an array, that element does not contribute to the length of the Array.

Syntax

ArrayLiteral[Yield] :
[ Elisionopt ]
[ ElementList[?Yield] ]
[ ElementList[?Yield] , Elisionopt ]
ElementList[Yield] :
Elisionopt AssignmentExpression[In, ?Yield]
Elisionopt SpreadElement[?Yield]
ElementList[?Yield] , Elisionopt AssignmentExpression[In, ?Yield]
ElementList[?Yield] , Elisionopt SpreadElement[?Yield]
Elision :
,
Elision ,
SpreadElement[Yield] :
... AssignmentExpression[In, ?Yield]

12.2.4.1 Static Semantics: ElisionWidth

Elision : ,
  1. Return the numeric value 1.
Elision : Elision ,
  1. Let preceding be the ElisionWidth of Elision.
  2. Return preceding+1.

12.2.4.2 Runtime Semantics: ArrayAccumulation

With parameters array and nextIndex.

ElementList : Elisionopt AssignmentExpression
  1. Let padding be the ElisionWidth of Elision; if Elision is not present, use the numeric value zero.
  2. Let initResult be the result of evaluating AssignmentExpression.
  3. Let initValue be GetValue(initResult).
  4. ReturnIfAbrupt(initValue).
  5. Let created be CreateDataProperty(array, ToString(ToUint32(nextIndex+padding)), initValue).
  6. Assert: created is true.
  7. Return nextIndex+padding+1.
ElementList : Elisionopt SpreadElement
  1. Let padding be the ElisionWidth of Elision; if Elision is not present, use the numeric value zero.
  2. Return the result of performing ArrayAccumulation for SpreadElement with arguments array and nextIndex+padding.
ElementList : ElementList , Elisionopt AssignmentExpression
  1. Let postIndex be the result of performing ArrayAccumulation for ElementList with arguments array and nextIndex.
  2. ReturnIfAbrupt(postIndex).
  3. Let padding be the ElisionWidth of Elision; if Elision is not present, use the numeric value zero.
  4. Let initResult be the result of evaluating AssignmentExpression.
  5. Let initValue be GetValue(initResult).
  6. ReturnIfAbrupt(initValue).
  7. Let created be CreateDataProperty(array, ToString(ToUint32(postIndex+padding)), initValue).
  8. Assert: created is true.
  9. Return postIndex+padding+1.
ElementList : ElementList , Elisionopt SpreadElement
  1. Let postIndex be the result of performing ArrayAccumulation for ElementList with arguments array and nextIndex.
  2. ReturnIfAbrupt(postIndex).
  3. Let padding be the ElisionWidth of Elision; if Elision is not present, use the numeric value zero.
  4. Return the result of performing ArrayAccumulation for SpreadElement with arguments array and postIndex+padding.
SpreadElement : ... AssignmentExpression
  1. Let spreadRef be the result of evaluating AssignmentExpression.
  2. Let spreadObj be GetValue(spreadRef).
  3. Let iterator be GetIterator(spreadObj).
  4. ReturnIfAbrupt(iterator).
  5. Repeat
    1. Let next be IteratorStep(iterator).
    2. ReturnIfAbrupt(next).
    3. If next is false, return nextIndex.
    4. Let nextValue be IteratorValue(next).
    5. ReturnIfAbrupt(nextValue).
    6. Let status be CreateDataProperty(array, ToString(nextIndex), nextValue).
    7. Assert: status is true .
    8. Let nextIndex be nextIndex + 1.

NOTE CreateDataProperty is used to ensure that own properties are defined for the array even if the standard built-in Array prototype object has been modified in a manner that would preclude the creation of new own properties using [[Set]].

12.2.4.3 Runtime Semantics: Evaluation

ArrayLiteral : [ Elisionopt ]
  1. Let array be ArrayCreate(0).
  2. Let pad be the ElisionWidth of Elision; if Elision is not present, use the numeric value zero.
  3. Perform Set(array, "length", pad, false).
  4. NOTE: The above Set cannot fail because of the nature of the object returned by ArrayCreate.
  5. Return array.
ArrayLiteral : [ ElementList ]
  1. Let array be ArrayCreate(0).
  2. Let len be the result of performing ArrayAccumulation for ElementList with arguments array and 0.
  3. ReturnIfAbrupt(len).
  4. Perform Set(array, "length", len, false).
  5. NOTE: The above Set cannot fail because of the nature of the object returned by ArrayCreate.
  6. Return array.
ArrayLiteral : [ ElementList , Elisionopt ]
  1. Let array be ArrayCreate(0).
  2. Let len be the result of performing ArrayAccumulation for ElementList with arguments array and 0.
  3. ReturnIfAbrupt(len).
  4. Let padding be the ElisionWidth of Elision; if Elision is not present, use the numeric value zero.
  5. Perform Set(array, "length", ToUint32(padding+len), false).
  6. NOTE: The above Set cannot fail because of the nature of the object returned by ArrayCreate.
  7. Return array.

12.2.5 Object Initializer

NOTE 1 An object initializer is an expression describing the initialization of an Object, written in a form resembling a literal. It is a list of zero or more pairs of property keys and associated values, enclosed in curly brackets. The values need not be literals; they are evaluated each time the object initializer is evaluated.

Syntax

ObjectLiteral[Yield] :
{ }
{ PropertyDefinitionList[?Yield] }
{ PropertyDefinitionList[?Yield] , }
PropertyDefinitionList[Yield] :
PropertyDefinition[?Yield]
PropertyDefinitionList[?Yield] , PropertyDefinition[?Yield]
PropertyDefinition[Yield] :
IdentifierReference[?Yield]
CoverInitializedName[?Yield]
PropertyName[?Yield] : AssignmentExpression[In, ?Yield]
MethodDefinition[?Yield]
PropertyName[Yield,GeneratorParameter] :
LiteralPropertyName
[+GeneratorParameter] ComputedPropertyName
[~GeneratorParameter] ComputedPropertyName[?Yield]
LiteralPropertyName :
IdentifierName
StringLiteral
NumericLiteral
ComputedPropertyName[Yield] :
[ AssignmentExpression[In, ?Yield] ]
CoverInitializedName[Yield] :
IdentifierReference[?Yield] Initializer[In, ?Yield]
Initializer[In, Yield] :
= AssignmentExpression[?In, ?Yield]

NOTE 2 MethodDefinition is defined in 14.3.

NOTE 3 In certain contexts, ObjectLiteral is used as a cover grammar for a more restricted secondary grammar. The CoverInitializedName production is necessary to fully cover these secondary grammars. However, use of this production results in an early Syntax Error in normal contexts where an actual ObjectLiteral is expected.

12.2.5.1 Static Semantics: Early Errors

PropertyDefinition : MethodDefinition
  • It is a Syntax Error if HasDirectSuper of MethodDefinition is true.

In addition to describing an actual object initializer the ObjectLiteral productions are also used as a cover grammar for ObjectAssignmentPattern (12.14.5). and may be recognized as part of a CoverParenthesizedExpressionAndArrowParameterList. When ObjectLiteral appears in a context where ObjectAssignmentPattern is required the following Early Error rules are not applied. In addition, they are not applied when initially parsing a CoverParenthesizedExpressionAndArrowParameterList.

PropertyDefinition : CoverInitializedName
  • Always throw a Syntax Error if code matches this production.

NOTE This production exists so that ObjectLiteral can serve as a cover grammar for ObjectAssignmentPattern (12.14.5). It cannot occur in an actual object initializer.

12.2.5.2 Static Semantics: ComputedPropertyContains

With parameter symbol.

See also: 14.3.2, 14.4.3, 14.5.5.

PropertyName : LiteralPropertyName
  1. Return false.
PropertyName : ComputedPropertyName
  1. Return the result of ComputedPropertyName Contains symbol.

12.2.5.3 Static Semantics: Contains

With parameter symbol.

See also: 5.3, 12.3.1.1, 14.1.4, 14.2.3, 14.4.4, 14.5.4.

PropertyDefinition : MethodDefinition
  1. If symbol is MethodDefinition, return true.
  2. Return the result of ComputedPropertyContains for MethodDefinition with argument symbol.

NOTE Static semantic rules that depend upon substructure generally do not look into function definitions.

LiteralPropertyName : IdentifierName
  1. If symbol is a ReservedWord, return false.
  2. If symbol is an Identifier and StringValue of symbol is the same value as the StringValue of IdentifierName, return true;
  3. Return false.

12.2.5.4 Static Semantics: HasComputedPropertyKey

See also: 14.3.4, 14.4.5

PropertyDefinitionList : PropertyDefinitionList , PropertyDefinition
  1. If HasComputedPropertyKey of PropertyDefinitionList is true, return true.
  2. Return HasComputedPropertyKey of PropertyDefinition.
PropertyDefinition : IdentifierReference
  1. Return false.
PropertyDefinition : PropertyName : AssignmentExpression
  1. Return IsComputedPropertyKey of PropertyName.

12.2.5.5 Static Semantics: IsComputedPropertyKey

PropertyName : LiteralPropertyName
  1. Return false.
PropertyName : ComputedPropertyName
  1. Return true.

12.2.5.6 Static Semantics: PropName

See also: 14.3.6, 14.4.10, 14.5.12

PropertyDefinition : IdentifierReference
  1. Return StringValue of IdentifierReference.
PropertyDefinition : PropertyName : AssignmentExpression
  1. Return PropName of PropertyName.
LiteralPropertyName : IdentifierName
  1. Return StringValue of IdentifierName.
LiteralPropertyName : StringLiteral
  1. Return a String value whose code units are the SV of the StringLiteral.
LiteralPropertyName : NumericLiteral
  1. Let nbr be the result of forming the value of the NumericLiteral.
  2. Return ToString(nbr).
ComputedPropertyName : [ AssignmentExpression ]
  1. Return empty.

12.2.5.7 Static Semantics: PropertyNameList

PropertyDefinitionList : PropertyDefinition
  1. If PropName of PropertyDefinition is empty, return a new empty List.
  2. Return a new List containing PropName of PropertyDefinition.
PropertyDefinitionList : PropertyDefinitionList , PropertyDefinition
  1. Let list be PropertyNameList of PropertyDefinitionList.
  2. If PropName of PropertyDefinition is empty, return list.
  3. Append PropName of PropertyDefinition to the end of list.
  4. Return list.

12.2.5.8 Runtime Semantics: Evaluation

ObjectLiteral : { }
  1. Return ObjectCreate(%ObjectPrototype%).

ObjectLiteral :
{ PropertyDefinitionList }
{ PropertyDefinitionList , }

  1. Let obj be ObjectCreate(%ObjectPrototype%).
  2. Let status be the result of performing PropertyDefinitionEvaluation of PropertyDefinitionList with arguments obj and true.
  3. ReturnIfAbrupt(status).
  4. Return obj.
LiteralPropertyName : IdentifierName
  1. Return StringValue of IdentifierName.
LiteralPropertyName : StringLiteral
  1. Return a String value whose code units are the SV of the StringLiteral.
LiteralPropertyName : NumericLiteral
  1. Let nbr be the result of forming the value of the NumericLiteral.
  2. Return ToString(nbr).
ComputedPropertyName : [ AssignmentExpression ]
  1. Let exprValue be the result of evaluating AssignmentExpression.
  2. Let propName be GetValue(exprValue).
  3. ReturnIfAbrupt(propName).
  4. Return ToPropertyKey(propName).

12.2.5.9 Runtime Semantics: PropertyDefinitionEvaluation

With parameter object and enumerable.

See also: 14.3.9, 14.4.13, B.3.1

PropertyDefinitionList : PropertyDefinitionList , PropertyDefinition
  1. Let status be the result of performing PropertyDefinitionEvaluation of PropertyDefinitionList with arguments object and enumerable.
  2. ReturnIfAbrupt(status).
  3. Return the result of performing PropertyDefinitionEvaluation of PropertyDefinition with arguments object and enumerable.
PropertyDefinition : IdentifierReference
  1. Let propName be StringValue of IdentifierReference.
  2. Let exprValue be the result of evaluating IdentifierReference.
  3. ReturnIfAbrupt(exprValue).
  4. Let propValue be GetValue(exprValue).
  5. ReturnIfAbrupt(propValue).
  6. Assert: enumerable is true.
  7. Return CreateDataPropertyOrThrow(object, propName, propValue).
PropertyDefinition : PropertyName : AssignmentExpression
  1. Let propKey be the result of evaluating PropertyName.
  2. ReturnIfAbrupt(propKey).
  3. Let exprValueRef be the result of evaluating AssignmentExpression.
  4. Let propValue be GetValue(exprValueRef).
  5. ReturnIfAbrupt(propValue).
  6. If IsAnonymousFunctionDefinition(AssignmentExpression) is true, then
    1. Let hasNameProperty be HasOwnProperty(propValue, "name").
    2. ReturnIfAbrupt(hasNameProperty).
    3. If hasNameProperty is false, perform SetFunctionName(propValue, propKey).
  7. Assert: enumerable is true.
  8. Return CreateDataPropertyOrThrow(object, propKey, propValue).

NOTE An alternative semantics for this production is given in B.3.1.

12.2.6 Function Defining Expressions

See 14.1 for PrimaryExpression : FunctionExpression .

See 14.4 for PrimaryExpression : GeneratorExpression .

See 14.5 for PrimaryExpression : ClassExpression .

12.2.7 Regular Expression Literals

Syntax

See 11.8.4.

12.2.7.1 Static Semantics: Early Errors

PrimaryExpression : RegularExpressionLiteral
  • It is a Syntax Error if BodyText of RegularExpressionLiteral cannot be recognized using the goal symbol Pattern of the ECMAScript RegExp grammar specified in 21.2.1.

  • It is a Syntax Error if FlagText of RegularExpressionLiteral contains any code points other than "g", "i", "m", "u", or "y", or if it contains the same code point more than once.

12.2.7.2 Runtime Semantics: Evaluation

PrimaryExpression : RegularExpressionLiteral
  1. Let pattern be the string value consisting of the UTF16Encoding of each code point of BodyText of RegularExpressionLiteral.
  2. Let flags be the string value consisting of the UTF16Encoding of each code point of FlagText of RegularExpressionLiteral.
  3. Return RegExpCreate(pattern, flags).

12.2.8 Template Literals

Syntax

TemplateLiteral[Yield] :
NoSubstitutionTemplate
TemplateHead Expression[In, ?Yield] TemplateSpans[?Yield]
TemplateSpans[Yield] :
TemplateTail
TemplateMiddleList[?Yield] TemplateTail
TemplateMiddleList[Yield] :
TemplateMiddle Expression[In, ?Yield]
TemplateMiddleList[?Yield] TemplateMiddle Expression[In, ?Yield]

12.2.8.1 Static Semantics: TemplateStrings

With parameter raw.

TemplateLiteral : NoSubstitutionTemplate
  1. If raw is false, then
    1. Let string be the TV of NoSubstitutionTemplate.
  2. Else,
    1. Let string be the TRV of NoSubstitutionTemplate.
  3. Return a List containing the single element, string.
TemplateLiteral : TemplateHead Expression TemplateSpans
  1. If raw is false, then
    1. Let head be the TV of TemplateHead.
  2. Else,
    1. Let head be the TRV of TemplateHead.
  3. Let tail be TemplateStrings of TemplateSpans with argument raw.
  4. Return a List containing head followed by the element, in order of tail.
TemplateSpans : TemplateTail
  1. If raw is false, then
    1. Let tail be the TV of TemplateTail.
  2. Else,
    1. Let tail be the TRV of TemplateTail.
  3. Return a List containing the single element, tail.
TemplateSpans : TemplateMiddleList TemplateTail
  1. Let middle be TemplateStrings of TemplateMiddleList with argument raw.
  2. If raw is false, then
    1. Let tail be the TV of TemplateTail.
  3. Else,
    1. Let tail be the TRV of TemplateTail.
  4. Return a List containing the elements, in order, of middle followed by tail.
TemplateMiddleList : TemplateMiddle Expression
  1. If raw is false, then
    1. Let string be the TV of TemplateMiddle.
  2. Else,
    1. Let string be the TRV of TemplateMiddle.
  3. Return a List containing the single element, string.
TemplateMiddleList : TemplateMiddleList TemplateMiddle Expression
  1. Let front be TemplateStrings of TemplateMiddleList with argument raw.
  2. If raw is false, then
    1. Let last be the TV of TemplateMiddle.
  3. Else,
    1. Let last be the TRV of TemplateMiddle.
  4. Append last as the last element of the List front.
  5. Return front.

12.2.8.2 Runtime Semantics: ArgumentListEvaluation

See also: 12.3.6.1

TemplateLiteral : NoSubstitutionTemplate
  1. Let templateLiteral be this TemplateLiteral.
  2. Let siteObj be GetTemplateObject(templateLiteral).
  3. Return a List containing the one element which is siteObj.
TemplateLiteral : TemplateHead Expression TemplateSpans
  1. Let templateLiteral be this TemplateLiteral.
  2. Let siteObj be GetTemplateObject(templateLiteral).
  3. Let firstSub be the result of evaluating Expression.
  4. ReturnIfAbrupt(firstSub).
  5. Let restSub be SubstitutionEvaluation of TemplateSpans.
  6. ReturnIfAbrupt(restSub).
  7. Assert: restSub is a List.
  8. Return a List whose first element is siteObj, whose second elements is firstSub, and whose subsequent elements are the elements of restSub, in order. restSub may contain no elements.

12.2.8.3 Runtime Semantics: GetTemplateObject ( templateLiteral )

The abstract operation GetTemplateObject is called with a grammar production, templateLiteral, as an argument. It performs the following steps:

  1. Let rawStrings be TemplateStrings of templateLiteral with argument true.
  2. Let ctx be the running execution context.
  3. Let realm be the ctx’s Realm.
  4. Let templateRegistry be realm.[[templateMap]].
  5. For each element e of templateRegistry, do
    1. If e.[[strings]] and rawStrings contain the same values in the same order, then
      1. Return e.[[array]].
  6. Let cookedStrings be TemplateStrings of templateLiteral with argument false.
  7. Let count be the number of elements in the List cookedStrings.
  8. Let template be ArrayCreate(count).
  9. Let rawObj be ArrayCreate(count).
  10. Let index be 0.
  11. Repeat while index < count
    1. Let prop be ToString(index).
    2. Let cookedValue be the string value cookedStrings[index].
    3. Call template.[[DefineOwnProperty]](prop, PropertyDescriptor{[[Value]]: cookedValue, [[Enumerable]]: true, [[Writable]]: false, [[Configurable]]: false}).
    4. Let rawValue be the string value rawStrings[index].
    5. Call rawObj.[[DefineOwnProperty]](prop, PropertyDescriptor{[[Value]]: rawValue, [[Enumerable]]: true, [[Writable]]: false, [[Configurable]]: false}).
    6. Let index be index+1.
  12. Perform SetIntegrityLevel(rawObj, "frozen").
  13. Call template.[[DefineOwnProperty]]("raw", PropertyDescriptor{[[Value]]: rawObj, [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false}).
  14. Perform SetIntegrityLevel(template, "frozen").
  15. Append the Record{[[strings]]: rawStrings, [[array]]: template} to templateRegistry.
  16. Return template.

NOTE 1 The creation of a template object cannot result in an abrupt completion.

NOTE 2 Each TemplateLiteral in the program code of a Realm is associated with a unique template object that is used in the evaluation of tagged Templates (12.2.8.5). The template objects are frozen and the same template object is used each time a specific tagged Template is evaluated. Whether template objects are created lazily upon first evaluation of the TemplateLiteral or eagerly prior to first evaluation is an implementation choice that is not observable to ECMAScript code.

NOTE 3 Future editions of this specification may define additional non-enumerable properties of template objects.

12.2.8.4 Runtime Semantics: SubstitutionEvaluation

TemplateSpans : TemplateTail
  1. Return an empty List.
TemplateSpans : TemplateMiddleList TemplateTail
  1. Return the result of SubstitutionEvaluation of TemplateMiddleList.
TemplateMiddleList : TemplateMiddle Expression
  1. Let sub be the result of evaluating Expression.
  2. ReturnIfAbrupt(sub).
  3. Return a List containing only sub.
TemplateMiddleList : TemplateMiddleList TemplateMiddle Expression
  1. Let preceding be the result of SubstitutionEvaluation of TemplateMiddleList .
  2. ReturnIfAbrupt(preceding).
  3. Let next be the result of evaluating Expression.
  4. ReturnIfAbrupt(next).
  5. Append next as the last element of the List preceding.
  6. Return preceding.

12.2.8.5 Runtime Semantics: Evaluation

TemplateLiteral : NoSubstitutionTemplate
  1. Return the string value whose code units are the elements of the TV of NoSubstitutionTemplate as defined in 11.8.6.
TemplateLiteral : TemplateHead Expression TemplateSpans
  1. Let head be the TV of TemplateHead as defined in 11.8.6.
  2. Let sub be the result of evaluating Expression.
  3. Let middle be ToString(sub).
  4. ReturnIfAbrupt(middle).
  5. Let tail be the result of evaluating TemplateSpans .
  6. ReturnIfAbrupt(tail).
  7. Return the string value whose code units are the elements of head followed by the elements of middle followed by the elements of tail.

NOTE The string conversion semantics applied to the Expression value are like String.prototype.concat rather than the + operator.

TemplateSpans : TemplateTail
  1. Let tail be the TV of TemplateTail as defined in 11.8.6.
  2. Return the string consisting of the code units of tail.
TemplateSpans : TemplateMiddleList TemplateTail
  1. Let head be the result of evaluating TemplateMiddleList.
  2. ReturnIfAbrupt(head).
  3. Let tail be the TV of TemplateTail as defined in 11.8.6.
  4. Return the string whose code units are the elements of head followed by the elements of tail.
TemplateMiddleList : TemplateMiddle Expression
  1. Let head be the TV of TemplateMiddle as defined in 11.8.6.
  2. Let sub be the result of evaluating Expression.
  3. Let middle be ToString(sub).
  4. ReturnIfAbrupt(middle).
  5. Return the sequence of code units consisting of the code units of head followed by the elements of middle.

NOTE The string conversion semantics applied to the Expression value are like String.prototype.concat rather than the + operator.

TemplateMiddleList : TemplateMiddleList TemplateMiddle Expression
  1. Let rest be the result of evaluating TemplateMiddleList .
  2. ReturnIfAbrupt(rest).
  3. Let middle be the TV of TemplateMiddle as defined in 11.8.6.
  4. Let sub be the result of evaluating Expression.
  5. Let last be ToString(sub).
  6. ReturnIfAbrupt(last).
  7. Return the sequence of code units consisting of the elements of rest followed by the code units of middle followed by the elements of last.

NOTE The string conversion semantics applied to the Expression value are like String.prototype.concat rather than the + operator.

12.2.9 The Grouping Operator

12.2.9.1 Static Semantics: Early Errors

PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList
  • It is a Syntax Error if the lexical token sequence matched by CoverParenthesizedExpressionAndArrowParameterList cannot be parsed with no tokens left over using ParenthesizedExpression as the goal symbol.

  • All Early Errors rules for ParenthesizedExpression and its derived productions also apply to CoveredParenthesizedExpression of CoverParenthesizedExpressionAndArrowParameterList.

12.2.9.2 Static Semantics: IsFunctionDefinition

See also: 12.2.0.2, 12.3.1.2, 12.4.2, 12.5.2, 12.6.1, 12.7.1, 12.8.1, 12.9.1, 12.10.1, 12.11.1, 12.12.1, 12.13.1, 12.14.2, 12.15.1, 14.1.11, 14.4.9, 14.5.8.

ParenthesizedExpression : ( Expression )
  1. Return IsFunctionDefinition of Expression.

12.2.9.3 Static Semantics: IsValidSimpleAssignmentTarget

See also: 12.1.3, 12.2.0.4, 12.3.1.5, 12.4.3, 12.5.3, 12.6.2, 12.7.2, 12.8.2, 12.9.2, 12.10.2, 12.11.2, 12.12.2, 12.13.2, 12.14.3, 12.15.2.

ParenthesizedExpression : ( Expression )
  1. Return IsValidSimpleAssignmentTarget of Expression.

12.2.9.4 Runtime Semantics: Evaluation

PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList
  1. Let expr be CoveredParenthesizedExpression of CoverParenthesizedExpressionAndArrowParameterList.
  2. Return the result of evaluating expr.
ParenthesizedExpression : ( Expression )
  1. Return the result of evaluating Expression. This may be of type Reference.

NOTE This algorithm does not apply GetValue to the result of evaluating Expression. The principal motivation for this is so that operators such as delete and typeof may be applied to parenthesized expressions.

12.3 Left-Hand-Side Expressions

Syntax

MemberExpression[Yield] :
PrimaryExpression[?Yield]
MemberExpression[?Yield] [ Expression[In, ?Yield] ]
MemberExpression[?Yield] . IdentifierName
MemberExpression[?Yield] TemplateLiteral[?Yield]
SuperProperty[?Yield]
MetaProperty
new MemberExpression[?Yield] Arguments[?Yield]
SuperProperty[Yield] :
super [ Expression[In, ?Yield] ]
super . IdentifierName
MetaProperty :
NewTarget
NewTarget :
new . target
NewExpression[Yield] :
MemberExpression[?Yield]
new NewExpression[?Yield]
CallExpression[Yield] :
MemberExpression[?Yield] Arguments[?Yield]
SuperCall[?Yield]
CallExpression[?Yield] Arguments[?Yield]
CallExpression[?Yield] [ Expression[In, ?Yield] ]
CallExpression[?Yield] . IdentifierName
CallExpression[?Yield] TemplateLiteral[?Yield]
SuperCall[Yield] :
super Arguments[?Yield]
Arguments[Yield] :
( )
( ArgumentList[?Yield] )
ArgumentList[Yield] :
AssignmentExpression[In, ?Yield]
... AssignmentExpression[In, ?Yield]
ArgumentList[?Yield] , AssignmentExpression[In, ?Yield]
ArgumentList[?Yield] , ... AssignmentExpression[In, ?Yield]
LeftHandSideExpression[Yield] :
NewExpression[?Yield]
CallExpression[?Yield]

12.3.1 Static Semantics

12.3.1.1 Static Semantics: Contains

With parameter symbol.

See also: 5.3, 12.2.5.3, 14.1.4, 14.2.3, 14.4.4, 14.5.4

MemberExpression : MemberExpression . IdentifierName
  1. If MemberExpression Contains symbol is true, return true.
  2. If symbol is a ReservedWord, return false.
  3. If symbol is an Identifier and StringValue of symbol is the same value as the StringValue of IdentifierName, return true;
  4. Return false.
SuperProperty : super . IdentifierName
  1. If symbol is the ReservedWord super, return true.
  2. If symbol is a ReservedWord, return false.
  3. If symbol is an Identifier and StringValue of symbol is the same value as the StringValue of IdentifierName, return true;
  4. Return false.
CallExpression : CallExpression . IdentifierName
  1. If CallExpression Contains symbol is true, return true.
  2. If symbol is a ReservedWord, return false.
  3. If symbol is an Identifier and StringValue of symbol is the same value as the StringValue of IdentifierName, return true;
  4. Return false.

12.3.1.2 Static Semantics: IsFunctionDefinition

See also: 12.2.0.2, 12.2.9.2, 12.4.2, 12.5.2, 12.6.1, 12.7.1, 12.8.1, 12.9.1, 12.10.1, 12.11.1, 12.12.1, 12.13.1, 12.14.2, 12.15.1, 14.1.11, 14.4.9, 14.5.8.

MemberExpression :
MemberExpression [ Expression ]
MemberExpression . IdentifierName
MemberExpression TemplateLiteral
SuperProperty
MetaProperty
new MemberExpression Arguments
NewExpression :
new NewExpression
CallExpression :
MemberExpression Arguments
SuperCall
CallExpression Arguments
CallExpression [ Expression ]
CallExpression . IdentifierName
CallExpression TemplateLiteral
  1. Return false.

12.3.1.3 Static Semantics: IsDestructuring

See also: 13.6.4.6.

MemberExpression : PrimaryExpression
  1. If PrimaryExpression is either an ObjectLiteral or an ArrayLiteral, return true.
  2. Return false.
MemberExpression :
MemberExpression [ Expression ]
MemberExpression . IdentifierName
MemberExpression TemplateLiteral
SuperProperty
MetaProperty
new MemberExpression Arguments
NewExpression :
new NewExpression
CallExpression :
MemberExpression Arguments
SuperCall
CallExpression Arguments
CallExpression [ Expression ]
CallExpression . IdentifierName
CallExpression TemplateLiteral
  1. Return false.

12.3.1.4 Static Semantics: IsIdentifierRef

See also: 12.2.0.3.

LeftHandSideExpression :
CallExpression
MemberExpression :
MemberExpression [ Expression ]
MemberExpression . IdentifierName
MemberExpression TemplateLiteral
SuperProperty
MetaProperty
new MemberExpression Arguments
NewExpression :
new NewExpression
  1. Return false.

12.3.1.5 Static Semantics: IsValidSimpleAssignmentTarget

See also: 12.1.3, 12.2.0.4, 12.2.9.3, 12.4.3, 12.5.3, 12.6.2, 12.7.2, 12.8.2, 12.9.2, 12.10.2, 12.11.2, 12.12.2, 12.13.2, 12.14.3, 12.15.2.

CallExpression :
CallExpression [ Expression ]
CallExpression . IdentifierName
MemberExpression :
MemberExpression [ Expression ]
MemberExpression . IdentifierName
SuperProperty
  1. Return true.
CallExpression :
MemberExpression Arguments
SuperCall
CallExpression Arguments
CallExpression TemplateLiteral
NewExpression :
new NewExpression
MemberExpression :
MemberExpression TemplateLiteral
new MemberExpression Arguments
NewTarget :
new . target
  1. Return false.

12.3.2 Property Accessors

NOTE Properties are accessed by name, using either the dot notation:

MemberExpression . IdentifierName
CallExpression . IdentifierName

or the bracket notation:

MemberExpression [ Expression ]
CallExpression [ Expression ]

The dot notation is explained by the following syntactic conversion:

MemberExpression . IdentifierName

is identical in its behaviour to

MemberExpression [ <identifier-name-string> ]

and similarly

CallExpression . IdentifierName

is identical in its behaviour to

CallExpression [ <identifier-name-string> ]

where <identifier-name-string> is the result of evaluating StringValue of IdentifierName.

12.3.2.1 Runtime Semantics: Evaluation

MemberExpression : MemberExpression [ Expression ]
  1. Let baseReference be the result of evaluating MemberExpression.
  2. Let baseValue be GetValue(baseReference).
  3. ReturnIfAbrupt(baseValue).
  4. Let propertyNameReference be the result of evaluating Expression.
  5. Let propertyNameValue be GetValue(propertyNameReference).
  6. ReturnIfAbrupt(propertyNameValue).
  7. Let bv be RequireObjectCoercible(baseValue).
  8. ReturnIfAbrupt(bv).
  9. Let propertyKey be ToPropertyKey(propertyNameValue).
  10. ReturnIfAbrupt(propertyKey).
  11. If the code matched by the syntactic production that is being evaluated is strict mode code, let strict be true, else let strict be false.
  12. Return a value of type Reference whose base value is bv and whose referenced name is propertyKey, and whose strict reference flag is strict.
MemberExpression : MemberExpression . IdentifierName
  1. Let baseReference be the result of evaluating MemberExpression.
  2. Let baseValue be GetValue(baseReference).
  3. ReturnIfAbrupt(baseValue).
  4. Let bv be RequireObjectCoercible(baseValue).
  5. ReturnIfAbrupt(bv).
  6. Let propertyNameString be StringValue of IdentifierName
  7. If the code matched by the syntactic production that is being evaluated is strict mode code, let strict be true, else let strict be false.
  8. Return a value of type Reference whose base value is bv and whose referenced name is propertyNameString, and whose strict reference flag is strict.
CallExpression : CallExpression [ Expression ]

Is evaluated in exactly the same manner as MemberExpression : MemberExpression [ Expression ] except that the contained CallExpression is evaluated in step 1.

CallExpression : CallExpression . IdentifierName

Is evaluated in exactly the same manner as MemberExpression : MemberExpression . IdentifierName except that the contained CallExpression is evaluated in step 1.

12.3.3 The new Operator

12.3.3.1 Runtime Semantics: Evaluation

NewExpression : new NewExpression
  1. Return EvaluateNew(NewExpression, empty).
MemberExpression : new MemberExpression Arguments
  1. Return EvaluateNew(MemberExpression, Arguments).

12.3.3.1.1 Runtime Semantics: EvaluateNew(constructProduction, arguments)

The abstract operation EvaluateNew with arguments constructProduction, and arguments performs the following steps:

  1. Assert: constructProduction is either a NewExpression or a MemberExpression.
  2. Assert: arguments is either empty or an Arguments production.
  3. Let ref be the result of evaluating constructProduction.
  4. Let constructor be GetValue(ref).
  5. ReturnIfAbrupt(constructor).
  6. If arguments is empty, let argList be an empty List.
  7. Else,
    1. Let argList be ArgumentListEvaluation of arguments.
    2. ReturnIfAbrupt(argList).
  8. If IsConstructor (constructor) is false, throw a TypeError exception.
  9. Return Construct(constructor, argList).

12.3.4 Function Calls

12.3.4.1 Runtime Semantics: Evaluation

CallExpression : MemberExpression Arguments
  1. Let ref be the result of evaluating MemberExpression.
  2. Let func be GetValue(ref).
  3. ReturnIfAbrupt(func).
  4. If Type(ref) is Reference and IsPropertyReference(ref) is false and GetReferencedName(ref) is "eval", then
    1. If SameValue(func, %eval%) is true, then
      1. Let argList be ArgumentListEvaluation(Arguments).
      2. ReturnIfAbrupt(argList).
      3. If argList has no elements, return undefined.
      4. Let evalText be the first element of argList.
      5. If the source code matching this CallExpression is strict code, let strictCaller be true. Otherwise let strictCaller be false.
      6. Let evalRealm be the running execution context’s Realm.
      7. Return PerformEval(evalText, evalRealm, strictCaller, true). .
  5. If Type(ref) is Reference, then
    1. If IsPropertyReference(ref) is true, then
      1. Let thisValue be GetThisValue(ref).
    2. Else, the base of ref is an Environment Record
      1. Let refEnv be GetBase(ref).
      2. Let thisValue be refEnv.WithBaseObject().
  6. Else Type(ref) is not Reference,
    1. Let thisValue be undefined.
  7. Let thisCall be this CallExpression.
  8. Let tailCall be IsInTailPosition(thisCall). (See 14.6.1)
  9. Return EvaluateDirectCall(func, thisValue, Arguments, tailCall).

A CallExpression whose evaluation executes step 4.a.vii is a direct eval.

CallExpression : CallExpression Arguments
  1. Let ref be the result of evaluating CallExpression.
  2. Let thisCall be this CallExpression
  3. Let tailCall be IsInTailPosition(thisCall). (See 14.6.1)
  4. Return EvaluateCall(ref, Arguments, tailCall).

12.3.4.2 Runtime Semantics: EvaluateCall( ref, arguments, tailPosition )

The abstract operation EvaluateCall takes as arguments a value ref, a syntactic grammar production arguments, and a Boolean argument tailPosition. It performs the following steps:

  1. Let func be GetValue(ref).
  2. ReturnIfAbrupt(func).
  3. If Type(ref) is Reference, then
    1. If IsPropertyReference(ref) is true, then
      1. Let thisValue be GetThisValue(ref).
    2. Else, the base of ref is an Environment Record
      1. Let refEnv be GetBase(ref).
      2. Let thisValue be refEnv.WithBaseObject().
  4. Else Type(ref) is not Reference,
    1. Let thisValue be undefined.
  5. Return EvaluateDirectCall(func, thisValue, arguments, tailPosition).

12.3.4.3 Runtime Semantics: EvaluateDirectCall( func, thisValue, arguments, tailPosition )

The abstract operation EvaluateDirectCall takes as arguments a value func, a value thisValue, a syntactic grammar production arguments, and a Boolean argument tailPosition. It performs the following steps:

  1. Let argList be ArgumentListEvaluation(arguments).
  2. ReturnIfAbrupt(argList).
  3. If Type(func) is not Object, throw a TypeError exception.
  4. If IsCallable(func) is false, throw a TypeError exception.
  5. If tailPosition is true, perform PrepareForTailCall().
  6. Let result be Call(func, thisValue, argList).
  7. Assert: If tailPosition is true, the above call will not return here, but instead evaluation will continue as if the following return has already occurred.
  8. Assert: If result is not an abrupt completion then Type(result) is an ECMAScript language type.
  9. Return result.

12.3.5 The super Keyword

12.3.5.1 Runtime Semantics: Evaluation

SuperProperty : super [ Expression ]
  1. Let propertyNameReference be the result of evaluating Expression.
  2. Let propertyNameValue be GetValue(propertyNameReference).
  3. Let propertyKey be ToPropertyKey(propertyNameValue).
  4. ReturnIfAbrupt(propertyKey).
  5. If the code matched by the syntactic production that is being evaluated is strict mode code, let strict be true, else let strict be false.
  6. Return MakeSuperPropertyReference(propertyKey, strict).
SuperProperty : super . IdentifierName
  1. Let propertyKey be StringValue of IdentifierName.
  2. If the code matched by the syntactic production that is being evaluated is strict mode code, let strict be true, else let strict be false.
  3. Return MakeSuperPropertyReference(propertyKey, strict).
SuperCall : super Arguments
  1. Let newTarget be GetNewTarget().
  2. If newTarget is undefined, throw a ReferenceError exception.
  3. Let func be GetSuperConstructor().
  4. ReturnIfAbrupt(func).
  5. Let argList be ArgumentListEvaluation of Arguments.
  6. ReturnIfAbrupt(argList).
  7. Let result be Construct(func, argList, newTarget).
  8. ReturnIfAbrupt(result).
  9. Let thisER be GetThisEnvironment( ).
  10. Return thisER.BindThisValue(result).

12.3.5.2 Runtime Semantics: GetSuperConstructor ( )

The abstract operation GetSuperConstructor performs the following steps:

  1. Let envRec be GetThisEnvironment( ).
  2. Assert: envRec is a function Environment Record.
  3. Let activeFunction be envRec.[[FunctionObject]].
  4. Let superConstructor be activeFunction.[[GetPrototypeOf]]().
  5. ReturnIfAbrupt(superConstructor).
  6. If IsConstructor(superConstructor) is false, throw a TypeError exception.
  7. Return superConstructor.

12.3.5.3 Runtime Semantics: MakeSuperPropertyReference(propertyKey, strict)

The abstract operation MakeSuperPropertyReference with arguments propertyKey and strict performs the following steps:

  1. Let env be GetThisEnvironment( ).
  2. If env.HasSuperBinding() is false, throw a ReferenceError exception.
  3. Let actualThis be env.GetThisBinding().
  4. ReturnIfAbrupt(actualThis).
  5. Let baseValue be env.GetSuperBase().
  6. Let bv be RequireObjectCoercible(baseValue).
  7. ReturnIfAbrupt(bv).
  8. Return a value of type Reference that is a Super Reference whose base value is bv, whose referenced name is propertyKey, whose thisValue is actualThis, and whose strict reference flag is strict.

12.3.6 Argument Lists

NOTE The evaluation of an argument list produces a List of values (see 6.2.1).

12.3.6.1 Runtime Semantics: ArgumentListEvaluation

See also: 12.2.8.2

Arguments : ( )
  1. Return an empty List.
ArgumentList : AssignmentExpression
  1. Let ref be the result of evaluating AssignmentExpression.
  2. Let arg be GetValue(ref).
  3. ReturnIfAbrupt(arg).
  4. Return a List whose sole item is arg.
ArgumentList : ... AssignmentExpression
  1. Let list be an empty List.
  2. Let spreadRef be the result of evaluating AssignmentExpression.
  3. Let spreadObj be GetValue(spreadRef).
  4. Let iterator be GetIterator(spreadObj).
  5. ReturnIfAbrupt(iterator).
  6. Repeat
    1. Let next be IteratorStep(iterator).
    2. ReturnIfAbrupt(next).
    3. If next is false, return list.
    4. Let nextArg be IteratorValue(next).
    5. ReturnIfAbrupt(nextArg).
    6. Append nextArg as the last element of list.
ArgumentList : ArgumentList , AssignmentExpression
  1. Let precedingArgs be the result of evaluating ArgumentList.
  2. ReturnIfAbrupt(precedingArgs).
  3. Let ref be the result of evaluating AssignmentExpression.
  4. Let arg be GetValue(ref).
  5. ReturnIfAbrupt(arg).
  6. Append arg to the end of precedingArgs.
  7. Return precedingArgs.
ArgumentList : ArgumentList , ... AssignmentExpression
  1. Let precedingArgs be the result of evaluating ArgumentList.
  2. Let spreadRef be the result of evaluating AssignmentExpression.
  3. Let iterator be GetIterator(GetValue(spreadRef) ).
  4. ReturnIfAbrupt(iterator).
  5. Repeat
    1. Let next be IteratorStep(iterator).
    2. ReturnIfAbrupt(next).
    3. If next is false, return precedingArgs.
    4. Let nextArg be IteratorValue(next).
    5. ReturnIfAbrupt(nextArg).
    6. Append nextArg as the last element of precedingArgs.

12.3.7 Tagged Templates

NOTE A tagged template is a function call where the arguments of the call are derived from a TemplateLiteral (12.2.8). The actual arguments include a template object (12.2.8.3) and the values produced by evaluating the expressions embedded within the TemplateLiteral.

12.3.7.1 Runtime Semantics: Evaluation

MemberExpression : MemberExpression TemplateLiteral
  1. Let tagRef be the result of evaluating MemberExpression.
  2. Let thisCall be this MemberExpression.
  3. Let tailCall be IsInTailPosition(thisCall). (See 14.6.1)
  4. Return EvaluateCall(tagRef, TemplateLiteral, tailCall).
CallExpression : CallExpression TemplateLiteral
  1. Let tagRef be the result of evaluating CallExpression.
  2. Let thisCall be this CallExpression.
  3. Let tailCall be IsInTailPosition(thisCall). (See 14.6.1)
  4. Return EvaluateCall(tagRef, TemplateLiteral, tailCall).

12.3.8 Meta Properties

12.3.8.1 Runtime Semantics: Evaluation

NewTarget : new . target
  1. Return GetNewTarget().

12.4 Postfix Expressions

Syntax

PostfixExpression[Yield] :
LeftHandSideExpression[?Yield]
LeftHandSideExpression[?Yield] [no LineTerminator here] ++
LeftHandSideExpression[?Yield] [no LineTerminator here] --

12.4.1 Static Semantics: Early Errors

PostfixExpression :
LeftHandSideExpression ++
LeftHandSideExpression --
  • It is an early Reference Error if IsValidSimpleAssignmentTarget of LeftHandSideExpression is false.

12.4.2 Static Semantics: IsFunctionDefinition

See also: 12.2.0.2, 12.2.9.2, 12.3.1.2, 12.5.2, 12.6.1, 12.7.1, 12.8.1, 12.9.1, 12.10.1, 12.11.1, 12.12.1, 12.13.1, 12.14.2, 12.15.1, 14.1.11, 14.4.9, 14.5.8

PostfixExpression :
LeftHandSideExpression ++
LeftHandSideExpression --
  1. Return false.

12.4.3 Static Semantics: IsValidSimpleAssignmentTarget

See also: 12.1.3, 12.2.0.4, 12.2.9.3, 12.3.1.5, 12.5.3, 12.6.2, 12.7.2, 12.8.2, 12.9.2, 12.10.2, 12.11.2, 12.12.2, 12.13.2, 12.14.3, 12.15.2.

PostfixExpression :
LeftHandSideExpression ++
LeftHandSideExpression --
  1. Return false.

12.4.4 Postfix Increment Operator

12.4.4.1 Runtime Semantics: Evaluation

PostfixExpression : LeftHandSideExpression ++
  1. Let lhs be the result of evaluating LeftHandSideExpression.
  2. Let oldValue be ToNumber(GetValue(lhs)).
  3. ReturnIfAbrupt(oldValue).
  4. Let newValue be the result of adding the value 1 to oldValue, using the same rules as for the + operator (see 12.7.5).
  5. Let status be PutValue(lhs, newValue).
  6. ReturnIfAbrupt(status).
  7. Return oldValue.

12.4.5 Postfix Decrement Operator

12.4.5.1 Runtime Semantics: Evaluation

PostfixExpression : LeftHandSideExpression --
  1. Let lhs be the result of evaluating LeftHandSideExpression.
  2. Let oldValue be ToNumber(GetValue(lhs)).
  3. ReturnIfAbrupt(oldValue).
  4. Let newValue be the result of subtracting the value 1 from oldValue, using the same rules as for the - operator (12.7.5).
  5. Let status be PutValue(lhs, newValue).
  6. ReturnIfAbrupt(status).
  7. Return oldValue.

12.5 Unary Operators

Syntax

UnaryExpression[Yield] :
PostfixExpression[?Yield]
delete UnaryExpression[?Yield]
void UnaryExpression[?Yield]
typeof UnaryExpression[?Yield]
++ UnaryExpression[?Yield]
-- UnaryExpression[?Yield]
+ UnaryExpression[?Yield]
- UnaryExpression[?Yield]
~ UnaryExpression[?Yield]
! UnaryExpression[?Yield]

12.5.1 Static Semantics: Early Errors

UnaryExpression :
++ UnaryExpression
-- UnaryExpression
  • It is an early Reference Error if IsValidSimpleAssignmentTarget of UnaryExpression is false.

12.5.2 Static Semantics: IsFunctionDefinition

See also: 12.2.0.2, 12.2.9.2, 12.3.1.2, 12.4.2, 12.6.1, 12.7.1, 12.8.1, 12.9.1, 12.10.1, 12.11.1, 12.12.1, 12.13.1, 12.14.2, 12.15.1, 14.1.11, 14.4.9, 14.5.8.

UnaryExpression :
delete UnaryExpression
void UnaryExpression
typeof UnaryExpression
++ UnaryExpression
-- UnaryExpression
+ UnaryExpression
- UnaryExpression
~ UnaryExpression
! UnaryExpression
  1. Return false.

12.5.3 Static Semantics: IsValidSimpleAssignmentTarget

See also: 12.1.3, 12.2.0.4, 12.2.9.3, 12.3.1.5, 12.4.3, 12.6.2, 12.7.2, 12.8.2, 12.9.2, 12.10.2, 12.11.2, 12.12.2, 12.13.2, 12.14.3, 12.15.2.

UnaryExpression :
delete UnaryExpression
void UnaryExpression
typeof UnaryExpression
++ UnaryExpression
-- UnaryExpression
+ UnaryExpression
- UnaryExpression
~ UnaryExpression
! UnaryExpression
  1. Return false.

12.5.4 The delete Operator

12.5.4.1 Static Semantics: Early Errors

UnaryExpression : delete UnaryExpression
  • It is a Syntax Error if the UnaryExpression is contained in strict mode code and the derived UnaryExpression is PrimaryExpression : IdentifierReference.

  • It is a Syntax Error if the derived UnaryExpression is
    PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList
    and CoverParenthesizedExpressionAndArrowParameterList ultimately derives a phrase that, if used in place of UnaryExpression, would produce a Syntax Error according to these rules. This rule is recursively applied.

NOTE The last rule means that expressions such as
delete (((foo)))
produce early errors because of recursive application of the first rule.

12.5.4.2 Runtime Semantics: Evaluation

UnaryExpression : delete UnaryExpression
  1. Let ref be the result of evaluating UnaryExpression.
  2. ReturnIfAbrupt(ref).
  3. If Type(ref) is not Reference, return true.
  4. If IsUnresolvableReference(ref) is true, then
    1. Assert: IsStrictReference(ref) is false.
    2. Return true.
  5. If IsPropertyReference(ref) is true, then
    1. If IsSuperReference(ref), throw a ReferenceError exception.
    2. Let baseObj be ToObject(GetBase(ref)).
    3. Let deleteStatus be baseObj.[[Delete]](GetReferencedName(ref)).
    4. ReturnIfAbrupt(deleteStatus).
    5. If deleteStatus is false and IsStrictReference(ref) is true, throw a TypeError exception.
    6. Return deleteStatus.
  6. Else ref is a Reference to an Environment Record binding,
    1. Let bindings be GetBase(ref).
    2. Return bindings.DeleteBinding(GetReferencedName(ref)).

NOTE When a delete operator occurs within strict mode code, a SyntaxError exception is thrown if its UnaryExpression is a direct reference to a variable, function argument, or function name. In addition, if a delete operator occurs within strict mode code and the property to be deleted has the attribute { [[Configurable]]: false }, a TypeError exception is thrown.

12.5.5 The void Operator

12.5.5.1 Runtime Semantics: Evaluation

UnaryExpression : void UnaryExpression
  1. Let expr be the result of evaluating UnaryExpression.
  2. Let status be GetValue(expr).
  3. ReturnIfAbrupt(status).
  4. Return undefined.

NOTE GetValue must be called even though its value is not used because it may have observable side-effects.

12.5.6 The typeof Operator

12.5.6.1 Runtime Semantics: Evaluation

UnaryExpression : typeof UnaryExpression
  1. Let val be the result of evaluating UnaryExpression.
  2. If Type(val) is Reference, then
    1. If IsUnresolvableReference(val) is true, return "undefined".
  3. Let val be GetValue(val).
  4. ReturnIfAbrupt(val).
  5. Return a String according to Table 35.
Table 35 — typeof Operator Results
Type of val Result
Undefined "undefined"
Null "object"
Boolean "boolean"
Number "number"
String "string"
Symbol "symbol"
Object (ordinary and does not implement [[Call]]) "object"
Object (standard exotic and does not implement [[Call]]) "object"
Object (implements [[Call]]) "function"
Object (non-standard exotic and does not implement [[Call]]) Implementation-defined. Must not be "undefined", "boolean", "function", "number", "symbol", or "string".

NOTE Implementations are discouraged from defining new typeof result values for non-standard exotic objects. If possible "object"should be used for such objects.

12.5.7 Prefix Increment Operator

12.5.7.1 Runtime Semantics: Evaluation

UnaryExpression : ++ UnaryExpression
  1. Let expr be the result of evaluating UnaryExpression.
  2. Let oldValue be ToNumber(GetValue(expr)).
  3. ReturnIfAbrupt(oldValue).
  4. Let newValue be the result of adding the value 1 to oldValue, using the same rules as for the + operator (see 12.7.5).
  5. Let status be PutValue(expr, newValue).
  6. ReturnIfAbrupt(status).
  7. Return newValue.

12.5.8 Prefix Decrement Operator

12.5.8.1 Runtime Semantics: Evaluation

UnaryExpression : -- UnaryExpression
  1. Let expr be the result of evaluating UnaryExpression.
  2. Let oldValue be ToNumber(GetValue(expr)).
  3. ReturnIfAbrupt(oldValue).
  4. Let newValue be the result of subtracting the value 1 from oldValue, using the same rules as for the - operator (see 12.7.5).
  5. Let status be PutValue(expr, newValue).
  6. ReturnIfAbrupt(status).
  7. Return newValue.

12.5.9 Unary + Operator

NOTE The unary + operator converts its operand to Number type.

12.5.9.1 Runtime Semantics: Evaluation

UnaryExpression : + UnaryExpression
  1. Let expr be the result of evaluating UnaryExpression.
  2. Return ToNumber(GetValue(expr)).

12.5.10 Unary - Operator

NOTE The unary - operator converts its operand to Number type and then negates it. Negating +0 produces −0, and negating −0 produces +0.

12.5.10.1 Runtime Semantics: Evaluation

UnaryExpression : - UnaryExpression
  1. Let expr be the result of evaluating UnaryExpression.
  2. Let oldValue be ToNumber(GetValue(expr)).
  3. ReturnIfAbrupt(oldValue).
  4. If oldValue is NaN, return NaN.
  5. Return the result of negating oldValue; that is, compute a Number with the same magnitude but opposite sign.

12.5.11 Bitwise NOT Operator ( ~ )

12.5.11.1 Runtime Semantics: Evaluation

UnaryExpression : ~ UnaryExpression
  1. Let expr be the result of evaluating UnaryExpression.
  2. Let oldValue be ToInt32(GetValue(expr)).
  3. ReturnIfAbrupt(oldValue).
  4. Return the result of applying bitwise complement to oldValue. The result is a signed 32-bit integer.

12.5.12 Logical NOT Operator ( ! )

12.5.12.1 Runtime Semantics: Evaluation

UnaryExpression : ! UnaryExpression
  1. Let expr be the result of evaluating UnaryExpression.
  2. Let oldValue be ToBoolean(GetValue(expr)).
  3. ReturnIfAbrupt(oldValue).
  4. If oldValue is true, return false.
  5. Return true.

12.6 Multiplicative Operators

Syntax

MultiplicativeExpression[Yield] :
UnaryExpression[?Yield]
MultiplicativeExpression[?Yield] MultiplicativeOperator UnaryExpression[?Yield]
MultiplicativeOperator : one of
* / %

12.6.1 Static Semantics: IsFunctionDefinition

See also: 12.2.0.2, 12.2.9.2, 12.3.1.2, 12.4.2, 12.5.2, 12.7.1, 12.8.1, 12.9.1, 12.10.1, 12.11.1, 12.12.1, 12.13.1, 12.14.2, 12.15.1, 14.1.11, 14.4.9, 14.5.8.

MultiplicativeExpression : MultiplicativeExpression MultiplicativeOperator UnaryExpression

  1. Return false.

12.6.2 Static Semantics: IsValidSimpleAssignmentTarget

See also: 12.1.3, 12.2.0.4, 12.2.9.3, 12.3.1.5, 12.4.3, 12.5.3, 12.7.2, 12.8.2, 12.9.2, 12.10.2, 12.11.2, 12.12.2, 12.13.2, 12.14.3, 12.15.2.

MultiplicativeExpression : MultiplicativeExpression MultiplicativeOperator UnaryExpression

  1. Return false.

12.6.3 Runtime Semantics: Evaluation

MultiplicativeExpression : MultiplicativeExpression MultiplicativeOperator UnaryExpression

  1. Let left be the result of evaluating MultiplicativeExpression.
  2. Let leftValue be GetValue(left).
  3. ReturnIfAbrupt(leftValue).
  4. Let right be the result of evaluating UnaryExpression.
  5. Let rightValue be GetValue(right).
  6. Let lnum be ToNumber(leftValue).
  7. ReturnIfAbrupt(lnum).
  8. Let rnum be ToNumber(rightValue).
  9. ReturnIfAbrupt(rnum).
  10. Return the result of applying the MultiplicativeOperator (*, /, or %) to lnum and rnum as specified in 12.6.3.1, 12.6.3.2, or 12.6.3.3.

12.6.3.1 Applying the * Operator

The * MultiplicativeOperator performs multiplication, producing the product of its operands. Multiplication is commutative. Multiplication is not always associative in ECMAScript, because of finite precision.

The result of a floating-point multiplication is governed by the rules of IEEE 754 binary double-precision arithmetic:

  • If either operand is NaN, the result is NaN.

  • The sign of the result is positive if both operands have the same sign, negative if the operands have different signs.

  • Multiplication of an infinity by a zero results in NaN.

  • Multiplication of an infinity by an infinity results in an infinity. The sign is determined by the rule already stated above.

  • Multiplication of an infinity by a finite nonzero value results in a signed infinity. The sign is determined by the rule already stated above.

  • In the remaining cases, where neither an infinity nor NaN is involved, the product is computed and rounded to the nearest representable value using IEEE 754 round-to-nearest mode. If the magnitude is too large to represent, the result is then an infinity of appropriate sign. If the magnitude is too small to represent, the result is then a zero of appropriate sign. The ECMAScript language requires support of gradual underflow as defined by IEEE 754.

12.6.3.2 Applying the / Operator

The / MultiplicativeOperator performs division, producing the quotient of its operands. The left operand is the dividend and the right operand is the divisor. ECMAScript does not perform integer division. The operands and result of all division operations are double-precision floating-point numbers. The result of division is determined by the specification of IEEE 754 arithmetic:

  • If either operand is NaN, the result is NaN.

  • The sign of the result is positive if both operands have the same sign, negative if the operands have different signs.

  • Division of an infinity by an infinity results in NaN.

  • Division of an infinity by a zero results in an infinity. The sign is determined by the rule already stated above.

  • Division of an infinity by a nonzero finite value results in a signed infinity. The sign is determined by the rule already stated above.

  • Division of a finite value by an infinity results in zero. The sign is determined by the rule already stated above.

  • Division of a zero by a zero results in NaN; division of zero by any other finite value results in zero, with the sign determined by the rule already stated above.

  • Division of a nonzero finite value by a zero results in a signed infinity. The sign is determined by the rule already stated above.

  • In the remaining cases, where neither an infinity, nor a zero, nor NaN is involved, the quotient is computed and rounded to the nearest representable value using IEEE 754 round-to-nearest mode. If the magnitude is too large to represent, the operation overflows; the result is then an infinity of appropriate sign. If the magnitude is too small to represent, the operation underflows and the result is a zero of the appropriate sign. The ECMAScript language requires support of gradual underflow as defined by IEEE 754.

12.6.3.3 Applying the % Operator

The % MultiplicativeOperator yields the remainder of its operands from an implied division; the left operand is the dividend and the right operand is the divisor.

NOTE In C and C++, the remainder operator accepts only integral operands; in ECMAScript, it also accepts floating-point operands.

The result of a floating-point remainder operation as computed by the % operator is not the same as the “remainder” operation defined by IEEE 754. The IEEE 754 “remainder” operation computes the remainder from a rounding division, not a truncating division, and so its behaviour is not analogous to that of the usual integer remainder operator. Instead the ECMAScript language defines % on floating-point operations to behave in a manner analogous to that of the Java integer remainder operator; this may be compared with the C library function fmod.

The result of an ECMAScript floating-point remainder operation is determined by the rules of IEEE arithmetic:

  • If either operand is NaN, the result is NaN.

  • The sign of the result equals the sign of the dividend.

  • If the dividend is an infinity, or the divisor is a zero, or both, the result is NaN.

  • If the dividend is finite and the divisor is an infinity, the result equals the dividend.

  • If the dividend is a zero and the divisor is nonzero and finite, the result is the same as the dividend.

  • In the remaining cases, where neither an infinity, nor a zero, nor NaN is involved, the floating-point remainder r from a dividend n and a divisor d is defined by the mathematical relation r = n − (d × q) where q is an integer that is negative only if n/d is negative and positive only if n/d is positive, and whose magnitude is as large as possible without exceeding the magnitude of the true mathematical quotient of n and d. r is computed and rounded to the nearest representable value using IEEE 754 round-to-nearest mode.

minify-2.20.37/benchmarks/sample_fontawesome.css000066400000000000000000001335371464346127300217250ustar00rootroot00000000000000/*! * * Font Awesome Free 5.2.0 by @fontawesome - https://fontawesome.com * * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * */ .fa,.fab,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{animation:a 2s infinite linear}.fa-pulse{animation:a 1s infinite steps(8)}@keyframes a{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.fa-flip-vertical{transform:scaleY(-1)}.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asterisk:before{content:"\f069"}.fa-asymmetrik:before{content:"\f372"}.fa-at:before{content:"\f1fa"}.fa-atlas:before{content:"\f558"}.fa-atom:before{content:"\f5d2"}.fa-audible:before{content:"\f373"}.fa-audio-description:before{content:"\f29e"}.fa-autoprefixer:before{content:"\f41c"}.fa-avianex:before{content:"\f374"}.fa-aviato:before{content:"\f421"}.fa-award:before{content:"\f559"}.fa-aws:before{content:"\f375"}.fa-backspace:before{content:"\f55a"}.fa-backward:before{content:"\f04a"}.fa-balance-scale:before{content:"\f24e"}.fa-ban:before{content:"\f05e"}.fa-band-aid:before{content:"\f462"}.fa-bandcamp:before{content:"\f2d5"}.fa-barcode:before{content:"\f02a"}.fa-bars:before{content:"\f0c9"}.fa-baseball-ball:before{content:"\f433"}.fa-basketball-ball:before{content:"\f434"}.fa-bath:before{content:"\f2cd"}.fa-battery-empty:before{content:"\f244"}.fa-battery-full:before{content:"\f240"}.fa-battery-half:before{content:"\f242"}.fa-battery-quarter:before{content:"\f243"}.fa-battery-three-quarters:before{content:"\f241"}.fa-bed:before{content:"\f236"}.fa-beer:before{content:"\f0fc"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-bell:before{content:"\f0f3"}.fa-bell-slash:before{content:"\f1f6"}.fa-bezier-curve:before{content:"\f55b"}.fa-bicycle:before{content:"\f206"}.fa-bimobject:before{content:"\f378"}.fa-binoculars:before{content:"\f1e5"}.fa-birthday-cake:before{content:"\f1fd"}.fa-bitbucket:before{content:"\f171"}.fa-bitcoin:before{content:"\f379"}.fa-bity:before{content:"\f37a"}.fa-black-tie:before{content:"\f27e"}.fa-blackberry:before{content:"\f37b"}.fa-blender:before{content:"\f517"}.fa-blind:before{content:"\f29d"}.fa-blogger:before{content:"\f37c"}.fa-blogger-b:before{content:"\f37d"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-bold:before{content:"\f032"}.fa-bolt:before{content:"\f0e7"}.fa-bomb:before{content:"\f1e2"}.fa-bone:before{content:"\f5d7"}.fa-bong:before{content:"\f55c"}.fa-book:before{content:"\f02d"}.fa-book-open:before{content:"\f518"}.fa-book-reader:before{content:"\f5da"}.fa-bookmark:before{content:"\f02e"}.fa-bowling-ball:before{content:"\f436"}.fa-box:before{content:"\f466"}.fa-box-open:before{content:"\f49e"}.fa-boxes:before{content:"\f468"}.fa-braille:before{content:"\f2a1"}.fa-brain:before{content:"\f5dc"}.fa-briefcase:before{content:"\f0b1"}.fa-briefcase-medical:before{content:"\f469"}.fa-broadcast-tower:before{content:"\f519"}.fa-broom:before{content:"\f51a"}.fa-brush:before{content:"\f55d"}.fa-btc:before{content:"\f15a"}.fa-bug:before{content:"\f188"}.fa-building:before{content:"\f1ad"}.fa-bullhorn:before{content:"\f0a1"}.fa-bullseye:before{content:"\f140"}.fa-burn:before{content:"\f46a"}.fa-buromobelexperte:before{content:"\f37f"}.fa-bus:before{content:"\f207"}.fa-bus-alt:before{content:"\f55e"}.fa-buysellads:before{content:"\f20d"}.fa-calculator:before{content:"\f1ec"}.fa-calendar:before{content:"\f133"}.fa-calendar-alt:before{content:"\f073"}.fa-calendar-check:before{content:"\f274"}.fa-calendar-minus:before{content:"\f272"}.fa-calendar-plus:before{content:"\f271"}.fa-calendar-times:before{content:"\f273"}.fa-camera:before{content:"\f030"}.fa-camera-retro:before{content:"\f083"}.fa-cannabis:before{content:"\f55f"}.fa-capsules:before{content:"\f46b"}.fa-car:before{content:"\f1b9"}.fa-car-alt:before{content:"\f5de"}.fa-car-battery:before{content:"\f5df"}.fa-car-crash:before{content:"\f5e1"}.fa-car-side:before{content:"\f5e4"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-caret-square-down:before{content:"\f150"}.fa-caret-square-left:before{content:"\f191"}.fa-caret-square-right:before{content:"\f152"}.fa-caret-square-up:before{content:"\f151"}.fa-caret-up:before{content:"\f0d8"}.fa-cart-arrow-down:before{content:"\f218"}.fa-cart-plus:before{content:"\f217"}.fa-cc-amazon-pay:before{content:"\f42d"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-apple-pay:before{content:"\f416"}.fa-cc-diners-club:before{content:"\f24c"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-cc-visa:before{content:"\f1f0"}.fa-centercode:before{content:"\f380"}.fa-certificate:before{content:"\f0a3"}.fa-chalkboard:before{content:"\f51b"}.fa-chalkboard-teacher:before{content:"\f51c"}.fa-charging-station:before{content:"\f5e7"}.fa-chart-area:before{content:"\f1fe"}.fa-chart-bar:before{content:"\f080"}.fa-chart-line:before{content:"\f201"}.fa-chart-pie:before{content:"\f200"}.fa-check:before{content:"\f00c"}.fa-check-circle:before{content:"\f058"}.fa-check-double:before{content:"\f560"}.fa-check-square:before{content:"\f14a"}.fa-chess:before{content:"\f439"}.fa-chess-bishop:before{content:"\f43a"}.fa-chess-board:before{content:"\f43c"}.fa-chess-king:before{content:"\f43f"}.fa-chess-knight:before{content:"\f441"}.fa-chess-pawn:before{content:"\f443"}.fa-chess-queen:before{content:"\f445"}.fa-chess-rook:before{content:"\f447"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-down:before{content:"\f078"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-chevron-up:before{content:"\f077"}.fa-child:before{content:"\f1ae"}.fa-chrome:before{content:"\f268"}.fa-church:before{content:"\f51d"}.fa-circle:before{content:"\f111"}.fa-circle-notch:before{content:"\f1ce"}.fa-clipboard:before{content:"\f328"}.fa-clipboard-check:before{content:"\f46c"}.fa-clipboard-list:before{content:"\f46d"}.fa-clock:before{content:"\f017"}.fa-clone:before{content:"\f24d"}.fa-closed-captioning:before{content:"\f20a"}.fa-cloud:before{content:"\f0c2"}.fa-cloud-download-alt:before{content:"\f381"}.fa-cloud-upload-alt:before{content:"\f382"}.fa-cloudscale:before{content:"\f383"}.fa-cloudsmith:before{content:"\f384"}.fa-cloudversify:before{content:"\f385"}.fa-cocktail:before{content:"\f561"}.fa-code:before{content:"\f121"}.fa-code-branch:before{content:"\f126"}.fa-codepen:before{content:"\f1cb"}.fa-codiepie:before{content:"\f284"}.fa-coffee:before{content:"\f0f4"}.fa-cog:before{content:"\f013"}.fa-cogs:before{content:"\f085"}.fa-coins:before{content:"\f51e"}.fa-columns:before{content:"\f0db"}.fa-comment:before{content:"\f075"}.fa-comment-alt:before{content:"\f27a"}.fa-comment-dots:before{content:"\f4ad"}.fa-comment-slash:before{content:"\f4b3"}.fa-comments:before{content:"\f086"}.fa-compact-disc:before{content:"\f51f"}.fa-compass:before{content:"\f14e"}.fa-compress:before{content:"\f066"}.fa-concierge-bell:before{content:"\f562"}.fa-connectdevelop:before{content:"\f20e"}.fa-contao:before{content:"\f26d"}.fa-cookie:before{content:"\f563"}.fa-cookie-bite:before{content:"\f564"}.fa-copy:before{content:"\f0c5"}.fa-copyright:before{content:"\f1f9"}.fa-couch:before{content:"\f4b8"}.fa-cpanel:before{content:"\f388"}.fa-creative-commons:before{content:"\f25e"}.fa-creative-commons-by:before{content:"\f4e7"}.fa-creative-commons-nc:before{content:"\f4e8"}.fa-creative-commons-nc-eu:before{content:"\f4e9"}.fa-creative-commons-nc-jp:before{content:"\f4ea"}.fa-creative-commons-nd:before{content:"\f4eb"}.fa-creative-commons-pd:before{content:"\f4ec"}.fa-creative-commons-pd-alt:before{content:"\f4ed"}.fa-creative-commons-remix:before{content:"\f4ee"}.fa-creative-commons-sa:before{content:"\f4ef"}.fa-creative-commons-sampling:before{content:"\f4f0"}.fa-creative-commons-sampling-plus:before{content:"\f4f1"}.fa-creative-commons-share:before{content:"\f4f2"}.fa-credit-card:before{content:"\f09d"}.fa-crop:before{content:"\f125"}.fa-crop-alt:before{content:"\f565"}.fa-crosshairs:before{content:"\f05b"}.fa-crow:before{content:"\f520"}.fa-crown:before{content:"\f521"}.fa-css3:before{content:"\f13c"}.fa-css3-alt:before{content:"\f38b"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-cut:before{content:"\f0c4"}.fa-cuttlefish:before{content:"\f38c"}.fa-d-and-d:before{content:"\f38d"}.fa-dashcube:before{content:"\f210"}.fa-database:before{content:"\f1c0"}.fa-deaf:before{content:"\f2a4"}.fa-delicious:before{content:"\f1a5"}.fa-deploydog:before{content:"\f38e"}.fa-deskpro:before{content:"\f38f"}.fa-desktop:before{content:"\f108"}.fa-deviantart:before{content:"\f1bd"}.fa-diagnoses:before{content:"\f470"}.fa-dice:before{content:"\f522"}.fa-dice-five:before{content:"\f523"}.fa-dice-four:before{content:"\f524"}.fa-dice-one:before{content:"\f525"}.fa-dice-six:before{content:"\f526"}.fa-dice-three:before{content:"\f527"}.fa-dice-two:before{content:"\f528"}.fa-digg:before{content:"\f1a6"}.fa-digital-ocean:before{content:"\f391"}.fa-digital-tachograph:before{content:"\f566"}.fa-directions:before{content:"\f5eb"}.fa-discord:before{content:"\f392"}.fa-discourse:before{content:"\f393"}.fa-divide:before{content:"\f529"}.fa-dizzy:before{content:"\f567"}.fa-dna:before{content:"\f471"}.fa-dochub:before{content:"\f394"}.fa-docker:before{content:"\f395"}.fa-dollar-sign:before{content:"\f155"}.fa-dolly:before{content:"\f472"}.fa-dolly-flatbed:before{content:"\f474"}.fa-donate:before{content:"\f4b9"}.fa-door-closed:before{content:"\f52a"}.fa-door-open:before{content:"\f52b"}.fa-dot-circle:before{content:"\f192"}.fa-dove:before{content:"\f4ba"}.fa-download:before{content:"\f019"}.fa-draft2digital:before{content:"\f396"}.fa-drafting-compass:before{content:"\f568"}.fa-draw-polygon:before{content:"\f5ee"}.fa-dribbble:before{content:"\f17d"}.fa-dribbble-square:before{content:"\f397"}.fa-dropbox:before{content:"\f16b"}.fa-drum:before{content:"\f569"}.fa-drum-steelpan:before{content:"\f56a"}.fa-drupal:before{content:"\f1a9"}.fa-dumbbell:before{content:"\f44b"}.fa-dyalog:before{content:"\f399"}.fa-earlybirds:before{content:"\f39a"}.fa-ebay:before{content:"\f4f4"}.fa-edge:before{content:"\f282"}.fa-edit:before{content:"\f044"}.fa-eject:before{content:"\f052"}.fa-elementor:before{content:"\f430"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-ello:before{content:"\f5f1"}.fa-ember:before{content:"\f423"}.fa-empire:before{content:"\f1d1"}.fa-envelope:before{content:"\f0e0"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-square:before{content:"\f199"}.fa-envira:before{content:"\f299"}.fa-equals:before{content:"\f52c"}.fa-eraser:before{content:"\f12d"}.fa-erlang:before{content:"\f39d"}.fa-ethereum:before{content:"\f42e"}.fa-etsy:before{content:"\f2d7"}.fa-euro-sign:before{content:"\f153"}.fa-exchange-alt:before{content:"\f362"}.fa-exclamation:before{content:"\f12a"}.fa-exclamation-circle:before{content:"\f06a"}.fa-exclamation-triangle:before{content:"\f071"}.fa-expand:before{content:"\f065"}.fa-expand-arrows-alt:before{content:"\f31e"}.fa-expeditedssl:before{content:"\f23e"}.fa-external-link-alt:before{content:"\f35d"}.fa-external-link-square-alt:before{content:"\f360"}.fa-eye:before{content:"\f06e"}.fa-eye-dropper:before{content:"\f1fb"}.fa-eye-slash:before{content:"\f070"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f39e"}.fa-facebook-messenger:before{content:"\f39f"}.fa-facebook-square:before{content:"\f082"}.fa-fast-backward:before{content:"\f049"}.fa-fast-forward:before{content:"\f050"}.fa-fax:before{content:"\f1ac"}.fa-feather:before{content:"\f52d"}.fa-feather-alt:before{content:"\f56b"}.fa-female:before{content:"\f182"}.fa-fighter-jet:before{content:"\f0fb"}.fa-file:before{content:"\f15b"}.fa-file-alt:before{content:"\f15c"}.fa-file-archive:before{content:"\f1c6"}.fa-file-audio:before{content:"\f1c7"}.fa-file-code:before{content:"\f1c9"}.fa-file-contract:before{content:"\f56c"}.fa-file-download:before{content:"\f56d"}.fa-file-excel:before{content:"\f1c3"}.fa-file-export:before{content:"\f56e"}.fa-file-image:before{content:"\f1c5"}.fa-file-import:before{content:"\f56f"}.fa-file-invoice:before{content:"\f570"}.fa-file-invoice-dollar:before{content:"\f571"}.fa-file-medical:before{content:"\f477"}.fa-file-medical-alt:before{content:"\f478"}.fa-file-pdf:before{content:"\f1c1"}.fa-file-powerpoint:before{content:"\f1c4"}.fa-file-prescription:before{content:"\f572"}.fa-file-signature:before{content:"\f573"}.fa-file-upload:before{content:"\f574"}.fa-file-video:before{content:"\f1c8"}.fa-file-word:before{content:"\f1c2"}.fa-fill:before{content:"\f575"}.fa-fill-drip:before{content:"\f576"}.fa-film:before{content:"\f008"}.fa-filter:before{content:"\f0b0"}.fa-fingerprint:before{content:"\f577"}.fa-fire:before{content:"\f06d"}.fa-fire-extinguisher:before{content:"\f134"}.fa-firefox:before{content:"\f269"}.fa-first-aid:before{content:"\f479"}.fa-first-order:before{content:"\f2b0"}.fa-first-order-alt:before{content:"\f50a"}.fa-firstdraft:before{content:"\f3a1"}.fa-fish:before{content:"\f578"}.fa-flag:before{content:"\f024"}.fa-flag-checkered:before{content:"\f11e"}.fa-flask:before{content:"\f0c3"}.fa-flickr:before{content:"\f16e"}.fa-flipboard:before{content:"\f44d"}.fa-flushed:before{content:"\f579"}.fa-fly:before{content:"\f417"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-font:before{content:"\f031"}.fa-font-awesome:before{content:"\f2b4"}.fa-font-awesome-alt:before{content:"\f35c"}.fa-font-awesome-flag:before{content:"\f425"}.fa-font-awesome-logo-full:before{content:"\f4e6"}.fa-fonticons:before{content:"\f280"}.fa-fonticons-fi:before{content:"\f3a2"}.fa-football-ball:before{content:"\f44e"}.fa-fort-awesome:before{content:"\f286"}.fa-fort-awesome-alt:before{content:"\f3a3"}.fa-forumbee:before{content:"\f211"}.fa-forward:before{content:"\f04e"}.fa-foursquare:before{content:"\f180"}.fa-free-code-camp:before{content:"\f2c5"}.fa-freebsd:before{content:"\f3a4"}.fa-frog:before{content:"\f52e"}.fa-frown:before{content:"\f119"}.fa-frown-open:before{content:"\f57a"}.fa-fulcrum:before{content:"\f50b"}.fa-futbol:before{content:"\f1e3"}.fa-galactic-republic:before{content:"\f50c"}.fa-galactic-senate:before{content:"\f50d"}.fa-gamepad:before{content:"\f11b"}.fa-gas-pump:before{content:"\f52f"}.fa-gavel:before{content:"\f0e3"}.fa-gem:before{content:"\f3a5"}.fa-genderless:before{content:"\f22d"}.fa-get-pocket:before{content:"\f265"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-gift:before{content:"\f06b"}.fa-git:before{content:"\f1d3"}.fa-git-square:before{content:"\f1d2"}.fa-github:before{content:"\f09b"}.fa-github-alt:before{content:"\f113"}.fa-github-square:before{content:"\f092"}.fa-gitkraken:before{content:"\f3a6"}.fa-gitlab:before{content:"\f296"}.fa-gitter:before{content:"\f426"}.fa-glass-martini:before{content:"\f000"}.fa-glass-martini-alt:before{content:"\f57b"}.fa-glasses:before{content:"\f530"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-globe:before{content:"\f0ac"}.fa-globe-africa:before{content:"\f57c"}.fa-globe-americas:before{content:"\f57d"}.fa-globe-asia:before{content:"\f57e"}.fa-gofore:before{content:"\f3a7"}.fa-golf-ball:before{content:"\f450"}.fa-goodreads:before{content:"\f3a8"}.fa-goodreads-g:before{content:"\f3a9"}.fa-google:before{content:"\f1a0"}.fa-google-drive:before{content:"\f3aa"}.fa-google-play:before{content:"\f3ab"}.fa-google-plus:before{content:"\f2b3"}.fa-google-plus-g:before{content:"\f0d5"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-wallet:before{content:"\f1ee"}.fa-graduation-cap:before{content:"\f19d"}.fa-gratipay:before{content:"\f184"}.fa-grav:before{content:"\f2d6"}.fa-greater-than:before{content:"\f531"}.fa-greater-than-equal:before{content:"\f532"}.fa-grimace:before{content:"\f57f"}.fa-grin:before{content:"\f580"}.fa-grin-alt:before{content:"\f581"}.fa-grin-beam:before{content:"\f582"}.fa-grin-beam-sweat:before{content:"\f583"}.fa-grin-hearts:before{content:"\f584"}.fa-grin-squint:before{content:"\f585"}.fa-grin-squint-tears:before{content:"\f586"}.fa-grin-stars:before{content:"\f587"}.fa-grin-tears:before{content:"\f588"}.fa-grin-tongue:before{content:"\f589"}.fa-grin-tongue-squint:before{content:"\f58a"}.fa-grin-tongue-wink:before{content:"\f58b"}.fa-grin-wink:before{content:"\f58c"}.fa-grip-horizontal:before{content:"\f58d"}.fa-grip-vertical:before{content:"\f58e"}.fa-gripfire:before{content:"\f3ac"}.fa-grunt:before{content:"\f3ad"}.fa-gulp:before{content:"\f3ae"}.fa-h-square:before{content:"\f0fd"}.fa-hacker-news:before{content:"\f1d4"}.fa-hacker-news-square:before{content:"\f3af"}.fa-hackerrank:before{content:"\f5f7"}.fa-hand-holding:before{content:"\f4bd"}.fa-hand-holding-heart:before{content:"\f4be"}.fa-hand-holding-usd:before{content:"\f4c0"}.fa-hand-lizard:before{content:"\f258"}.fa-hand-paper:before{content:"\f256"}.fa-hand-peace:before{content:"\f25b"}.fa-hand-point-down:before{content:"\f0a7"}.fa-hand-point-left:before{content:"\f0a5"}.fa-hand-point-right:before{content:"\f0a4"}.fa-hand-point-up:before{content:"\f0a6"}.fa-hand-pointer:before{content:"\f25a"}.fa-hand-rock:before{content:"\f255"}.fa-hand-scissors:before{content:"\f257"}.fa-hand-spock:before{content:"\f259"}.fa-hands:before{content:"\f4c2"}.fa-hands-helping:before{content:"\f4c4"}.fa-handshake:before{content:"\f2b5"}.fa-hashtag:before{content:"\f292"}.fa-hdd:before{content:"\f0a0"}.fa-heading:before{content:"\f1dc"}.fa-headphones:before{content:"\f025"}.fa-headphones-alt:before{content:"\f58f"}.fa-headset:before{content:"\f590"}.fa-heart:before{content:"\f004"}.fa-heartbeat:before{content:"\f21e"}.fa-helicopter:before{content:"\f533"}.fa-highlighter:before{content:"\f591"}.fa-hips:before{content:"\f452"}.fa-hire-a-helper:before{content:"\f3b0"}.fa-history:before{content:"\f1da"}.fa-hockey-puck:before{content:"\f453"}.fa-home:before{content:"\f015"}.fa-hooli:before{content:"\f427"}.fa-hornbill:before{content:"\f592"}.fa-hospital:before{content:"\f0f8"}.fa-hospital-alt:before{content:"\f47d"}.fa-hospital-symbol:before{content:"\f47e"}.fa-hot-tub:before{content:"\f593"}.fa-hotel:before{content:"\f594"}.fa-hotjar:before{content:"\f3b1"}.fa-hourglass:before{content:"\f254"}.fa-hourglass-end:before{content:"\f253"}.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-start:before{content:"\f251"}.fa-houzz:before{content:"\f27c"}.fa-html5:before{content:"\f13b"}.fa-hubspot:before{content:"\f3b2"}.fa-i-cursor:before{content:"\f246"}.fa-id-badge:before{content:"\f2c1"}.fa-id-card:before{content:"\f2c2"}.fa-id-card-alt:before{content:"\f47f"}.fa-image:before{content:"\f03e"}.fa-images:before{content:"\f302"}.fa-imdb:before{content:"\f2d8"}.fa-inbox:before{content:"\f01c"}.fa-indent:before{content:"\f03c"}.fa-industry:before{content:"\f275"}.fa-infinity:before{content:"\f534"}.fa-info:before{content:"\f129"}.fa-info-circle:before{content:"\f05a"}.fa-instagram:before{content:"\f16d"}.fa-internet-explorer:before{content:"\f26b"}.fa-ioxhost:before{content:"\f208"}.fa-italic:before{content:"\f033"}.fa-itunes:before{content:"\f3b4"}.fa-itunes-note:before{content:"\f3b5"}.fa-java:before{content:"\f4e4"}.fa-jedi-order:before{content:"\f50e"}.fa-jenkins:before{content:"\f3b6"}.fa-joget:before{content:"\f3b7"}.fa-joint:before{content:"\f595"}.fa-joomla:before{content:"\f1aa"}.fa-js:before{content:"\f3b8"}.fa-js-square:before{content:"\f3b9"}.fa-jsfiddle:before{content:"\f1cc"}.fa-kaggle:before{content:"\f5fa"}.fa-key:before{content:"\f084"}.fa-keybase:before{content:"\f4f5"}.fa-keyboard:before{content:"\f11c"}.fa-keycdn:before{content:"\f3ba"}.fa-kickstarter:before{content:"\f3bb"}.fa-kickstarter-k:before{content:"\f3bc"}.fa-kiss:before{content:"\f596"}.fa-kiss-beam:before{content:"\f597"}.fa-kiss-wink-heart:before{content:"\f598"}.fa-kiwi-bird:before{content:"\f535"}.fa-korvue:before{content:"\f42f"}.fa-language:before{content:"\f1ab"}.fa-laptop:before{content:"\f109"}.fa-laptop-code:before{content:"\f5fc"}.fa-laravel:before{content:"\f3bd"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-laugh:before{content:"\f599"}.fa-laugh-beam:before{content:"\f59a"}.fa-laugh-squint:before{content:"\f59b"}.fa-laugh-wink:before{content:"\f59c"}.fa-layer-group:before{content:"\f5fd"}.fa-leaf:before{content:"\f06c"}.fa-leanpub:before{content:"\f212"}.fa-lemon:before{content:"\f094"}.fa-less:before{content:"\f41d"}.fa-less-than:before{content:"\f536"}.fa-less-than-equal:before{content:"\f537"}.fa-level-down-alt:before{content:"\f3be"}.fa-level-up-alt:before{content:"\f3bf"}.fa-life-ring:before{content:"\f1cd"}.fa-lightbulb:before{content:"\f0eb"}.fa-line:before{content:"\f3c0"}.fa-link:before{content:"\f0c1"}.fa-linkedin:before{content:"\f08c"}.fa-linkedin-in:before{content:"\f0e1"}.fa-linode:before{content:"\f2b8"}.fa-linux:before{content:"\f17c"}.fa-lira-sign:before{content:"\f195"}.fa-list:before{content:"\f03a"}.fa-list-alt:before{content:"\f022"}.fa-list-ol:before{content:"\f0cb"}.fa-list-ul:before{content:"\f0ca"}.fa-location-arrow:before{content:"\f124"}.fa-lock:before{content:"\f023"}.fa-lock-open:before{content:"\f3c1"}.fa-long-arrow-alt-down:before{content:"\f309"}.fa-long-arrow-alt-left:before{content:"\f30a"}.fa-long-arrow-alt-right:before{content:"\f30b"}.fa-long-arrow-alt-up:before{content:"\f30c"}.fa-low-vision:before{content:"\f2a8"}.fa-luggage-cart:before{content:"\f59d"}.fa-lyft:before{content:"\f3c3"}.fa-magento:before{content:"\f3c4"}.fa-magic:before{content:"\f0d0"}.fa-magnet:before{content:"\f076"}.fa-mailchimp:before{content:"\f59e"}.fa-male:before{content:"\f183"}.fa-mandalorian:before{content:"\f50f"}.fa-map:before{content:"\f279"}.fa-map-marked:before{content:"\f59f"}.fa-map-marked-alt:before{content:"\f5a0"}.fa-map-marker:before{content:"\f041"}.fa-map-marker-alt:before{content:"\f3c5"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-markdown:before{content:"\f60f"}.fa-marker:before{content:"\f5a1"}.fa-mars:before{content:"\f222"}.fa-mars-double:before{content:"\f227"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mastodon:before{content:"\f4f6"}.fa-maxcdn:before{content:"\f136"}.fa-medal:before{content:"\f5a2"}.fa-medapps:before{content:"\f3c6"}.fa-medium:before{content:"\f23a"}.fa-medium-m:before{content:"\f3c7"}.fa-medkit:before{content:"\f0fa"}.fa-medrt:before{content:"\f3c8"}.fa-meetup:before{content:"\f2e0"}.fa-megaport:before{content:"\f5a3"}.fa-meh:before{content:"\f11a"}.fa-meh-blank:before{content:"\f5a4"}.fa-meh-rolling-eyes:before{content:"\f5a5"}.fa-memory:before{content:"\f538"}.fa-mercury:before{content:"\f223"}.fa-microchip:before{content:"\f2db"}.fa-microphone:before{content:"\f130"}.fa-microphone-alt:before{content:"\f3c9"}.fa-microphone-alt-slash:before{content:"\f539"}.fa-microphone-slash:before{content:"\f131"}.fa-microscope:before{content:"\f610"}.fa-microsoft:before{content:"\f3ca"}.fa-minus:before{content:"\f068"}.fa-minus-circle:before{content:"\f056"}.fa-minus-square:before{content:"\f146"}.fa-mix:before{content:"\f3cb"}.fa-mixcloud:before{content:"\f289"}.fa-mizuni:before{content:"\f3cc"}.fa-mobile:before{content:"\f10b"}.fa-mobile-alt:before{content:"\f3cd"}.fa-modx:before{content:"\f285"}.fa-monero:before{content:"\f3d0"}.fa-money-bill:before{content:"\f0d6"}.fa-money-bill-alt:before{content:"\f3d1"}.fa-money-bill-wave:before{content:"\f53a"}.fa-money-bill-wave-alt:before{content:"\f53b"}.fa-money-check:before{content:"\f53c"}.fa-money-check-alt:before{content:"\f53d"}.fa-monument:before{content:"\f5a6"}.fa-moon:before{content:"\f186"}.fa-mortar-pestle:before{content:"\f5a7"}.fa-motorcycle:before{content:"\f21c"}.fa-mouse-pointer:before{content:"\f245"}.fa-music:before{content:"\f001"}.fa-napster:before{content:"\f3d2"}.fa-neos:before{content:"\f612"}.fa-neuter:before{content:"\f22c"}.fa-newspaper:before{content:"\f1ea"}.fa-nimblr:before{content:"\f5a8"}.fa-nintendo-switch:before{content:"\f418"}.fa-node:before{content:"\f419"}.fa-node-js:before{content:"\f3d3"}.fa-not-equal:before{content:"\f53e"}.fa-notes-medical:before{content:"\f481"}.fa-npm:before{content:"\f3d4"}.fa-ns8:before{content:"\f3d5"}.fa-nutritionix:before{content:"\f3d6"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-oil-can:before{content:"\f613"}.fa-old-republic:before{content:"\f510"}.fa-opencart:before{content:"\f23d"}.fa-openid:before{content:"\f19b"}.fa-opera:before{content:"\f26a"}.fa-optin-monster:before{content:"\f23c"}.fa-osi:before{content:"\f41a"}.fa-outdent:before{content:"\f03b"}.fa-page4:before{content:"\f3d7"}.fa-pagelines:before{content:"\f18c"}.fa-paint-brush:before{content:"\f1fc"}.fa-paint-roller:before{content:"\f5aa"}.fa-palette:before{content:"\f53f"}.fa-palfed:before{content:"\f3d8"}.fa-pallet:before{content:"\f482"}.fa-paper-plane:before{content:"\f1d8"}.fa-paperclip:before{content:"\f0c6"}.fa-parachute-box:before{content:"\f4cd"}.fa-paragraph:before{content:"\f1dd"}.fa-parking:before{content:"\f540"}.fa-passport:before{content:"\f5ab"}.fa-paste:before{content:"\f0ea"}.fa-patreon:before{content:"\f3d9"}.fa-pause:before{content:"\f04c"}.fa-pause-circle:before{content:"\f28b"}.fa-paw:before{content:"\f1b0"}.fa-paypal:before{content:"\f1ed"}.fa-pen:before{content:"\f304"}.fa-pen-alt:before{content:"\f305"}.fa-pen-fancy:before{content:"\f5ac"}.fa-pen-nib:before{content:"\f5ad"}.fa-pen-square:before{content:"\f14b"}.fa-pencil-alt:before{content:"\f303"}.fa-pencil-ruler:before{content:"\f5ae"}.fa-people-carry:before{content:"\f4ce"}.fa-percent:before{content:"\f295"}.fa-percentage:before{content:"\f541"}.fa-periscope:before{content:"\f3da"}.fa-phabricator:before{content:"\f3db"}.fa-phoenix-framework:before{content:"\f3dc"}.fa-phoenix-squadron:before{content:"\f511"}.fa-phone:before{content:"\f095"}.fa-phone-slash:before{content:"\f3dd"}.fa-phone-square:before{content:"\f098"}.fa-phone-volume:before{content:"\f2a0"}.fa-php:before{content:"\f457"}.fa-pied-piper:before{content:"\f2ae"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-pied-piper-hat:before{content:"\f4e5"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-piggy-bank:before{content:"\f4d3"}.fa-pills:before{content:"\f484"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-p:before{content:"\f231"}.fa-pinterest-square:before{content:"\f0d3"}.fa-plane:before{content:"\f072"}.fa-plane-arrival:before{content:"\f5af"}.fa-plane-departure:before{content:"\f5b0"}.fa-play:before{content:"\f04b"}.fa-play-circle:before{content:"\f144"}.fa-playstation:before{content:"\f3df"}.fa-plug:before{content:"\f1e6"}.fa-plus:before{content:"\f067"}.fa-plus-circle:before{content:"\f055"}.fa-plus-square:before{content:"\f0fe"}.fa-podcast:before{content:"\f2ce"}.fa-poo:before{content:"\f2fe"}.fa-poop:before{content:"\f619"}.fa-portrait:before{content:"\f3e0"}.fa-pound-sign:before{content:"\f154"}.fa-power-off:before{content:"\f011"}.fa-prescription:before{content:"\f5b1"}.fa-prescription-bottle:before{content:"\f485"}.fa-prescription-bottle-alt:before{content:"\f486"}.fa-print:before{content:"\f02f"}.fa-procedures:before{content:"\f487"}.fa-product-hunt:before{content:"\f288"}.fa-project-diagram:before{content:"\f542"}.fa-pushed:before{content:"\f3e1"}.fa-puzzle-piece:before{content:"\f12e"}.fa-python:before{content:"\f3e2"}.fa-qq:before{content:"\f1d6"}.fa-qrcode:before{content:"\f029"}.fa-question:before{content:"\f128"}.fa-question-circle:before{content:"\f059"}.fa-quidditch:before{content:"\f458"}.fa-quinscape:before{content:"\f459"}.fa-quora:before{content:"\f2c4"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-r-project:before{content:"\f4f7"}.fa-random:before{content:"\f074"}.fa-ravelry:before{content:"\f2d9"}.fa-react:before{content:"\f41b"}.fa-readme:before{content:"\f4d5"}.fa-rebel:before{content:"\f1d0"}.fa-receipt:before{content:"\f543"}.fa-recycle:before{content:"\f1b8"}.fa-red-river:before{content:"\f3e3"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-alien:before{content:"\f281"}.fa-reddit-square:before{content:"\f1a2"}.fa-redo:before{content:"\f01e"}.fa-redo-alt:before{content:"\f2f9"}.fa-registered:before{content:"\f25d"}.fa-rendact:before{content:"\f3e4"}.fa-renren:before{content:"\f18b"}.fa-reply:before{content:"\f3e5"}.fa-reply-all:before{content:"\f122"}.fa-replyd:before{content:"\f3e6"}.fa-researchgate:before{content:"\f4f8"}.fa-resolving:before{content:"\f3e7"}.fa-retweet:before{content:"\f079"}.fa-rev:before{content:"\f5b2"}.fa-ribbon:before{content:"\f4d6"}.fa-road:before{content:"\f018"}.fa-robot:before{content:"\f544"}.fa-rocket:before{content:"\f135"}.fa-rocketchat:before{content:"\f3e8"}.fa-rockrms:before{content:"\f3e9"}.fa-route:before{content:"\f4d7"}.fa-rss:before{content:"\f09e"}.fa-rss-square:before{content:"\f143"}.fa-ruble-sign:before{content:"\f158"}.fa-ruler:before{content:"\f545"}.fa-ruler-combined:before{content:"\f546"}.fa-ruler-horizontal:before{content:"\f547"}.fa-ruler-vertical:before{content:"\f548"}.fa-rupee-sign:before{content:"\f156"}.fa-sad-cry:before{content:"\f5b3"}.fa-sad-tear:before{content:"\f5b4"}.fa-safari:before{content:"\f267"}.fa-sass:before{content:"\f41e"}.fa-save:before{content:"\f0c7"}.fa-schlix:before{content:"\f3ea"}.fa-school:before{content:"\f549"}.fa-screwdriver:before{content:"\f54a"}.fa-scribd:before{content:"\f28a"}.fa-search:before{content:"\f002"}.fa-search-minus:before{content:"\f010"}.fa-search-plus:before{content:"\f00e"}.fa-searchengin:before{content:"\f3eb"}.fa-seedling:before{content:"\f4d8"}.fa-sellcast:before{content:"\f2da"}.fa-sellsy:before{content:"\f213"}.fa-server:before{content:"\f233"}.fa-servicestack:before{content:"\f3ec"}.fa-shapes:before{content:"\f61f"}.fa-share:before{content:"\f064"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-share-square:before{content:"\f14d"}.fa-shekel-sign:before{content:"\f20b"}.fa-shield-alt:before{content:"\f3ed"}.fa-ship:before{content:"\f21a"}.fa-shipping-fast:before{content:"\f48b"}.fa-shirtsinbulk:before{content:"\f214"}.fa-shoe-prints:before{content:"\f54b"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-shopping-cart:before{content:"\f07a"}.fa-shopware:before{content:"\f5b5"}.fa-shower:before{content:"\f2cc"}.fa-shuttle-van:before{content:"\f5b6"}.fa-sign:before{content:"\f4d9"}.fa-sign-in-alt:before{content:"\f2f6"}.fa-sign-language:before{content:"\f2a7"}.fa-sign-out-alt:before{content:"\f2f5"}.fa-signal:before{content:"\f012"}.fa-signature:before{content:"\f5b7"}.fa-simplybuilt:before{content:"\f215"}.fa-sistrix:before{content:"\f3ee"}.fa-sitemap:before{content:"\f0e8"}.fa-sith:before{content:"\f512"}.fa-skull:before{content:"\f54c"}.fa-skyatlas:before{content:"\f216"}.fa-skype:before{content:"\f17e"}.fa-slack:before{content:"\f198"}.fa-slack-hash:before{content:"\f3ef"}.fa-sliders-h:before{content:"\f1de"}.fa-slideshare:before{content:"\f1e7"}.fa-smile:before{content:"\f118"}.fa-smile-beam:before{content:"\f5b8"}.fa-smile-wink:before{content:"\f4da"}.fa-smoking:before{content:"\f48d"}.fa-smoking-ban:before{content:"\f54d"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-snowflake:before{content:"\f2dc"}.fa-solar-panel:before{content:"\f5ba"}.fa-sort:before{content:"\f0dc"}.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-up:before{content:"\f161"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-up:before{content:"\f163"}.fa-sort-up:before{content:"\f0de"}.fa-soundcloud:before{content:"\f1be"}.fa-spa:before{content:"\f5bb"}.fa-space-shuttle:before{content:"\f197"}.fa-speakap:before{content:"\f3f3"}.fa-spinner:before{content:"\f110"}.fa-splotch:before{content:"\f5bc"}.fa-spotify:before{content:"\f1bc"}.fa-spray-can:before{content:"\f5bd"}.fa-square:before{content:"\f0c8"}.fa-square-full:before{content:"\f45c"}.fa-squarespace:before{content:"\f5be"}.fa-stack-exchange:before{content:"\f18d"}.fa-stack-overflow:before{content:"\f16c"}.fa-stamp:before{content:"\f5bf"}.fa-star:before{content:"\f005"}.fa-star-half:before{content:"\f089"}.fa-star-half-alt:before{content:"\f5c0"}.fa-star-of-life:before{content:"\f621"}.fa-staylinked:before{content:"\f3f5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-steam-symbol:before{content:"\f3f6"}.fa-step-backward:before{content:"\f048"}.fa-step-forward:before{content:"\f051"}.fa-stethoscope:before{content:"\f0f1"}.fa-sticker-mule:before{content:"\f3f7"}.fa-sticky-note:before{content:"\f249"}.fa-stop:before{content:"\f04d"}.fa-stop-circle:before{content:"\f28d"}.fa-stopwatch:before{content:"\f2f2"}.fa-store:before{content:"\f54e"}.fa-store-alt:before{content:"\f54f"}.fa-strava:before{content:"\f428"}.fa-stream:before{content:"\f550"}.fa-street-view:before{content:"\f21d"}.fa-strikethrough:before{content:"\f0cc"}.fa-stripe:before{content:"\f429"}.fa-stripe-s:before{content:"\f42a"}.fa-stroopwafel:before{content:"\f551"}.fa-studiovinari:before{content:"\f3f8"}.fa-stumbleupon:before{content:"\f1a4"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-subscript:before{content:"\f12c"}.fa-subway:before{content:"\f239"}.fa-suitcase:before{content:"\f0f2"}.fa-suitcase-rolling:before{content:"\f5c1"}.fa-sun:before{content:"\f185"}.fa-superpowers:before{content:"\f2dd"}.fa-superscript:before{content:"\f12b"}.fa-supple:before{content:"\f3f9"}.fa-surprise:before{content:"\f5c2"}.fa-swatchbook:before{content:"\f5c3"}.fa-swimmer:before{content:"\f5c4"}.fa-swimming-pool:before{content:"\f5c5"}.fa-sync:before{content:"\f021"}.fa-sync-alt:before{content:"\f2f1"}.fa-syringe:before{content:"\f48e"}.fa-table:before{content:"\f0ce"}.fa-table-tennis:before{content:"\f45d"}.fa-tablet:before{content:"\f10a"}.fa-tablet-alt:before{content:"\f3fa"}.fa-tablets:before{content:"\f490"}.fa-tachometer-alt:before{content:"\f3fd"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-tape:before{content:"\f4db"}.fa-tasks:before{content:"\f0ae"}.fa-taxi:before{content:"\f1ba"}.fa-teamspeak:before{content:"\f4f9"}.fa-teeth:before{content:"\f62e"}.fa-teeth-open:before{content:"\f62f"}.fa-telegram:before{content:"\f2c6"}.fa-telegram-plane:before{content:"\f3fe"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-terminal:before{content:"\f120"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-th:before{content:"\f00a"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-theater-masks:before{content:"\f630"}.fa-themeco:before{content:"\f5c6"}.fa-themeisle:before{content:"\f2b2"}.fa-thermometer:before{content:"\f491"}.fa-thermometer-empty:before{content:"\f2cb"}.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thumbs-down:before{content:"\f165"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbtack:before{content:"\f08d"}.fa-ticket-alt:before{content:"\f3ff"}.fa-times:before{content:"\f00d"}.fa-times-circle:before{content:"\f057"}.fa-tint:before{content:"\f043"}.fa-tint-slash:before{content:"\f5c7"}.fa-tired:before{content:"\f5c8"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-toolbox:before{content:"\f552"}.fa-tooth:before{content:"\f5c9"}.fa-trade-federation:before{content:"\f513"}.fa-trademark:before{content:"\f25c"}.fa-traffic-light:before{content:"\f637"}.fa-train:before{content:"\f238"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-trash:before{content:"\f1f8"}.fa-trash-alt:before{content:"\f2ed"}.fa-tree:before{content:"\f1bb"}.fa-trello:before{content:"\f181"}.fa-tripadvisor:before{content:"\f262"}.fa-trophy:before{content:"\f091"}.fa-truck:before{content:"\f0d1"}.fa-truck-loading:before{content:"\f4de"}.fa-truck-monster:before{content:"\f63b"}.fa-truck-moving:before{content:"\f4df"}.fa-truck-pickup:before{content:"\f63c"}.fa-tshirt:before{content:"\f553"}.fa-tty:before{content:"\f1e4"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-tv:before{content:"\f26c"}.fa-twitch:before{content:"\f1e8"}.fa-twitter:before{content:"\f099"}.fa-twitter-square:before{content:"\f081"}.fa-typo3:before{content:"\f42b"}.fa-uber:before{content:"\f402"}.fa-uikit:before{content:"\f403"}.fa-umbrella:before{content:"\f0e9"}.fa-umbrella-beach:before{content:"\f5ca"}.fa-underline:before{content:"\f0cd"}.fa-undo:before{content:"\f0e2"}.fa-undo-alt:before{content:"\f2ea"}.fa-uniregistry:before{content:"\f404"}.fa-universal-access:before{content:"\f29a"}.fa-university:before{content:"\f19c"}.fa-unlink:before{content:"\f127"}.fa-unlock:before{content:"\f09c"}.fa-unlock-alt:before{content:"\f13e"}.fa-untappd:before{content:"\f405"}.fa-upload:before{content:"\f093"}.fa-usb:before{content:"\f287"}.fa-user:before{content:"\f007"}.fa-user-alt:before{content:"\f406"}.fa-user-alt-slash:before{content:"\f4fa"}.fa-user-astronaut:before{content:"\f4fb"}.fa-user-check:before{content:"\f4fc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-clock:before{content:"\f4fd"}.fa-user-cog:before{content:"\f4fe"}.fa-user-edit:before{content:"\f4ff"}.fa-user-friends:before{content:"\f500"}.fa-user-graduate:before{content:"\f501"}.fa-user-lock:before{content:"\f502"}.fa-user-md:before{content:"\f0f0"}.fa-user-minus:before{content:"\f503"}.fa-user-ninja:before{content:"\f504"}.fa-user-plus:before{content:"\f234"}.fa-user-secret:before{content:"\f21b"}.fa-user-shield:before{content:"\f505"}.fa-user-slash:before{content:"\f506"}.fa-user-tag:before{content:"\f507"}.fa-user-tie:before{content:"\f508"}.fa-user-times:before{content:"\f235"}.fa-users:before{content:"\f0c0"}.fa-users-cog:before{content:"\f509"}.fa-ussunnah:before{content:"\f407"}.fa-utensil-spoon:before{content:"\f2e5"}.fa-utensils:before{content:"\f2e7"}.fa-vaadin:before{content:"\f408"}.fa-vector-square:before{content:"\f5cb"}.fa-venus:before{content:"\f221"}.fa-venus-double:before{content:"\f226"}.fa-venus-mars:before{content:"\f228"}.fa-viacoin:before{content:"\f237"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-vial:before{content:"\f492"}.fa-vials:before{content:"\f493"}.fa-viber:before{content:"\f409"}.fa-video:before{content:"\f03d"}.fa-video-slash:before{content:"\f4e2"}.fa-vimeo:before{content:"\f40a"}.fa-vimeo-square:before{content:"\f194"}.fa-vimeo-v:before{content:"\f27d"}.fa-vine:before{content:"\f1ca"}.fa-vk:before{content:"\f189"}.fa-vnv:before{content:"\f40b"}.fa-volleyball-ball:before{content:"\f45f"}.fa-volume-down:before{content:"\f027"}.fa-volume-off:before{content:"\f026"}.fa-volume-up:before{content:"\f028"}.fa-vuejs:before{content:"\f41f"}.fa-walking:before{content:"\f554"}.fa-wallet:before{content:"\f555"}.fa-warehouse:before{content:"\f494"}.fa-weebly:before{content:"\f5cc"}.fa-weibo:before{content:"\f18a"}.fa-weight:before{content:"\f496"}.fa-weight-hanging:before{content:"\f5cd"}.fa-weixin:before{content:"\f1d7"}.fa-whatsapp:before{content:"\f232"}.fa-whatsapp-square:before{content:"\f40c"}.fa-wheelchair:before{content:"\f193"}.fa-whmcs:before{content:"\f40d"}.fa-wifi:before{content:"\f1eb"}.fa-wikipedia-w:before{content:"\f266"}.fa-window-close:before{content:"\f410"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-windows:before{content:"\f17a"}.fa-wine-glass:before{content:"\f4e3"}.fa-wine-glass-alt:before{content:"\f5ce"}.fa-wix:before{content:"\f5cf"}.fa-wolf-pack-battalion:before{content:"\f514"}.fa-won-sign:before{content:"\f159"}.fa-wordpress:before{content:"\f19a"}.fa-wordpress-simple:before{content:"\f411"}.fa-wpbeginner:before{content:"\f297"}.fa-wpexplorer:before{content:"\f2de"}.fa-wpforms:before{content:"\f298"}.fa-wrench:before{content:"\f0ad"}.fa-x-ray:before{content:"\f497"}.fa-xbox:before{content:"\f412"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-y-combinator:before{content:"\f23b"}.fa-yahoo:before{content:"\f19e"}.fa-yandex:before{content:"\f413"}.fa-yandex-international:before{content:"\f414"}.fa-yelp:before{content:"\f1e9"}.fa-yen-sign:before{content:"\f157"}.fa-yoast:before{content:"\f2b1"}.fa-youtube:before{content:"\f167"}.fa-youtube-square:before{content:"\f431"}.fa-zhihu:before{content:"\f63f"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}@font-face{font-family:"Font Awesome 5 Brands";font-style:normal;font-weight:normal;src:url(../webfonts/fa-brands-400.eot);src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:"Font Awesome 5 Brands"}@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:400;src:url(../webfonts/fa-regular-400.eot);src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.far{font-weight:400}@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:900;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.far,.fas{font-family:"Font Awesome 5 Free"}.fa,.fas{font-weight:900} minify-2.20.37/benchmarks/sample_gopher.svg000066400000000000000000000133001464346127300206520ustar00rootroot00000000000000 minify-2.20.37/benchmarks/sample_gumby.css000066400000000000000000005536061464346127300205240ustar00rootroot00000000000000@charset "UTF-8"; /** * Gumby Framework * --------------- * * Follow @gumbycss on twitter and spread the love. * We worked super hard on making this awesome and released it to the web. * All we ask is you leave this intact. #gumbyisawesome * * Gumby Framework * http://gumbyframework.com * * Built with love by your friends @digitalsurgeons * http://www.digitalsurgeons.com * * Free to use under the MIT license. * http://www.opensource.org/licenses/mit-license.php */ @import url(//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700); html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font: inherit; font-size: 100%; vertical-align: baseline; } html { line-height: 1; } ol, ul { list-style: none; } table { border-collapse: collapse; border-spacing: 0; } caption, th, td { text-align: left; font-weight: normal; vertical-align: middle; } q, blockquote { quotes: none; } q:before, q:after, blockquote:before, blockquote:after { content: ""; content: none; } a img { border: none; } article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { display: block; } .pull_right { float: right; } .pull_left { float: left; } /* Base Styles */ html { font-size: 100%; line-height: 1.5em; } * { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } body { background: #fff; font-family: "Open Sans"; font-weight: 400; color: #555555; position: relative; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } @media only screen and (max-width: 767px) { body { -webkit-text-size-adjust: none; -ms-text-size-adjust: none; width: 100%; min-width: 0; } } html, body { height: 100%; } .hide { display: none; } .hide.active, .show { display: block; } .icon-note.icon-left a:before, .icon-note.icon-right a:after, i.icon-note:before { content: "\\266a"; height: inherit; } .icon-note-beamed.icon-left a:before, .icon-note-beamed.icon-right a:after, i.icon-note-beamed:before { content: "\\266b"; height: inherit; } .icon-music.icon-left a:before, .icon-music.icon-right a:after, i.icon-music:before { content: "\\1f3b5"; height: inherit; } .icon-search.icon-left a:before, .icon-search.icon-right a:after, i.icon-search:before { content: "\\1f50d"; height: inherit; } .icon-flashlight.icon-left a:before, .icon-flashlight.icon-right a:after, i.icon-flashlight:before { content: "\\1f526"; height: inherit; } .icon-mail.icon-left a:before, .icon-mail.icon-right a:after, i.icon-mail:before { content: "\\2709"; height: inherit; } .icon-heart.icon-left a:before, .icon-heart.icon-right a:after, i.icon-heart:before { content: "\\2665"; height: inherit; } .icon-heart-empty.icon-left a:before, .icon-heart-empty.icon-right a:after, i.icon-heart-empty:before { content: "\\2661"; height: inherit; } .icon-star.icon-left a:before, .icon-star.icon-right a:after, i.icon-star:before { content: "\\2605"; height: inherit; } .icon-star-empty.icon-left a:before, .icon-star-empty.icon-right a:after, i.icon-star-empty:before { content: "\\2606"; height: inherit; } .icon-user.icon-left a:before, .icon-user.icon-right a:after, i.icon-user:before { content: "\\1f464"; height: inherit; } .icon-users.icon-left a:before, .icon-users.icon-right a:after, i.icon-users:before { content: "\\1f465"; height: inherit; } .icon-user-add.icon-left a:before, .icon-user-add.icon-right a:after, i.icon-user-add:before { content: "\\e700"; height: inherit; } .icon-video.icon-left a:before, .icon-video.icon-right a:after, i.icon-video:before { content: "\\1f3ac"; height: inherit; } .icon-picture.icon-left a:before, .icon-picture.icon-right a:after, i.icon-picture:before { content: "\\1f304"; height: inherit; } .icon-camera.icon-left a:before, .icon-camera.icon-right a:after, i.icon-camera:before { content: "\\1f4f7"; height: inherit; } .icon-layout.icon-left a:before, .icon-layout.icon-right a:after, i.icon-layout:before { content: "\\268f"; height: inherit; } .icon-menu.icon-left a:before, .icon-menu.icon-right a:after, i.icon-menu:before { content: "\\2630"; height: inherit; } .icon-check.icon-left a:before, .icon-check.icon-right a:after, i.icon-check:before { content: "\\2713"; height: inherit; } .icon-cancel.icon-left a:before, .icon-cancel.icon-right a:after, i.icon-cancel:before { content: "\\2715"; height: inherit; } .icon-cancel-circled.icon-left a:before, .icon-cancel-circled.icon-right a:after, i.icon-cancel-circled:before { content: "\\2716"; height: inherit; } .icon-cancel-squared.icon-left a:before, .icon-cancel-squared.icon-right a:after, i.icon-cancel-squared:before { content: "\\274e"; height: inherit; } .icon-plus.icon-left a:before, .icon-plus.icon-right a:after, i.icon-plus:before { content: "\\2b"; height: inherit; } .icon-plus-circled.icon-left a:before, .icon-plus-circled.icon-right a:after, i.icon-plus-circled:before { content: "\\2795"; height: inherit; } .icon-plus-squared.icon-left a:before, .icon-plus-squared.icon-right a:after, i.icon-plus-squared:before { content: "\\229e"; height: inherit; } .icon-minus.icon-left a:before, .icon-minus.icon-right a:after, i.icon-minus:before { content: "\\2d"; height: inherit; } .icon-minus-circled.icon-left a:before, .icon-minus-circled.icon-right a:after, i.icon-minus-circled:before { content: "\\2796"; height: inherit; } .icon-minus-squared.icon-left a:before, .icon-minus-squared.icon-right a:after, i.icon-minus-squared:before { content: "\\229f"; height: inherit; } .icon-help.icon-left a:before, .icon-help.icon-right a:after, i.icon-help:before { content: "\\2753"; height: inherit; } .icon-help-circled.icon-left a:before, .icon-help-circled.icon-right a:after, i.icon-help-circled:before { content: "\\e704"; height: inherit; } .icon-info.icon-left a:before, .icon-info.icon-right a:after, i.icon-info:before { content: "\\2139"; height: inherit; } .icon-info-circled.icon-left a:before, .icon-info-circled.icon-right a:after, i.icon-info-circled:before { content: "\\e705"; height: inherit; } .icon-back.icon-left a:before, .icon-back.icon-right a:after, i.icon-back:before { content: "\\1f519"; height: inherit; } .icon-home.icon-left a:before, .icon-home.icon-right a:after, i.icon-home:before { content: "\\2302"; height: inherit; } .icon-link.icon-left a:before, .icon-link.icon-right a:after, i.icon-link:before { content: "\\1f517"; height: inherit; } .icon-attach.icon-left a:before, .icon-attach.icon-right a:after, i.icon-attach:before { content: "\\1f4ce"; height: inherit; } .icon-lock.icon-left a:before, .icon-lock.icon-right a:after, i.icon-lock:before { content: "\\1f512"; height: inherit; } .icon-lock-open.icon-left a:before, .icon-lock-open.icon-right a:after, i.icon-lock-open:before { content: "\\1f513"; height: inherit; } .icon-eye.icon-left a:before, .icon-eye.icon-right a:after, i.icon-eye:before { content: "\\e70a"; height: inherit; } .icon-tag.icon-left a:before, .icon-tag.icon-right a:after, i.icon-tag:before { content: "\\e70c"; height: inherit; } .icon-bookmark.icon-left a:before, .icon-bookmark.icon-right a:after, i.icon-bookmark:before { content: "\\1f516"; height: inherit; } .icon-bookmarks.icon-left a:before, .icon-bookmarks.icon-right a:after, i.icon-bookmarks:before { content: "\\1f4d1"; height: inherit; } .icon-flag.icon-left a:before, .icon-flag.icon-right a:after, i.icon-flag:before { content: "\\2691"; height: inherit; } .icon-thumbs-up.icon-left a:before, .icon-thumbs-up.icon-right a:after, i.icon-thumbs-up:before { content: "\\1f44d"; height: inherit; } .icon-thumbs-down.icon-left a:before, .icon-thumbs-down.icon-right a:after, i.icon-thumbs-down:before { content: "\\1f44e"; height: inherit; } .icon-download.icon-left a:before, .icon-download.icon-right a:after, i.icon-download:before { content: "\\1f4e5"; height: inherit; } .icon-upload.icon-left a:before, .icon-upload.icon-right a:after, i.icon-upload:before { content: "\\1f4e4"; height: inherit; } .icon-upload-cloud.icon-left a:before, .icon-upload-cloud.icon-right a:after, i.icon-upload-cloud:before { content: "\\e711"; height: inherit; } .icon-reply.icon-left a:before, .icon-reply.icon-right a:after, i.icon-reply:before { content: "\\e712"; height: inherit; } .icon-reply-all.icon-left a:before, .icon-reply-all.icon-right a:after, i.icon-reply-all:before { content: "\\e713"; height: inherit; } .icon-forward.icon-left a:before, .icon-forward.icon-right a:after, i.icon-forward:before { content: "\\27a6"; height: inherit; } .icon-quote.icon-left a:before, .icon-quote.icon-right a:after, i.icon-quote:before { content: "\\275e"; height: inherit; } .icon-code.icon-left a:before, .icon-code.icon-right a:after, i.icon-code:before { content: "\\e714"; height: inherit; } .icon-export.icon-left a:before, .icon-export.icon-right a:after, i.icon-export:before { content: "\\e715"; height: inherit; } .icon-pencil.icon-left a:before, .icon-pencil.icon-right a:after, i.icon-pencil:before { content: "\\270e"; height: inherit; } .icon-feather.icon-left a:before, .icon-feather.icon-right a:after, i.icon-feather:before { content: "\\2712"; height: inherit; } .icon-print.icon-left a:before, .icon-print.icon-right a:after, i.icon-print:before { content: "\\e716"; height: inherit; } .icon-retweet.icon-left a:before, .icon-retweet.icon-right a:after, i.icon-retweet:before { content: "\\e717"; height: inherit; } .icon-keyboard.icon-left a:before, .icon-keyboard.icon-right a:after, i.icon-keyboard:before { content: "\\2328"; height: inherit; } .icon-comment.icon-left a:before, .icon-comment.icon-right a:after, i.icon-comment:before { content: "\\e718"; height: inherit; } .icon-chat.icon-left a:before, .icon-chat.icon-right a:after, i.icon-chat:before { content: "\\e720"; height: inherit; } .icon-bell.icon-left a:before, .icon-bell.icon-right a:after, i.icon-bell:before { content: "\\1f514"; height: inherit; } .icon-attention.icon-left a:before, .icon-attention.icon-right a:after, i.icon-attention:before { content: "\\26a0"; height: inherit; } .icon-alert.icon-left a:before, .icon-alert.icon-right a:after, i.icon-alert:before { content: "\\1f4a5"; height: inherit; } .icon-vcard.icon-left a:before, .icon-vcard.icon-right a:after, i.icon-vcard:before { content: "\\e722"; height: inherit; } .icon-address.icon-left a:before, .icon-address.icon-right a:after, i.icon-address:before { content: "\\e723"; height: inherit; } .icon-location.icon-left a:before, .icon-location.icon-right a:after, i.icon-location:before { content: "\\e724"; height: inherit; } .icon-map.icon-left a:before, .icon-map.icon-right a:after, i.icon-map:before { content: "\\e727"; height: inherit; } .icon-direction.icon-left a:before, .icon-direction.icon-right a:after, i.icon-direction:before { content: "\\27a2"; height: inherit; } .icon-compass.icon-left a:before, .icon-compass.icon-right a:after, i.icon-compass:before { content: "\\e728"; height: inherit; } .icon-cup.icon-left a:before, .icon-cup.icon-right a:after, i.icon-cup:before { content: "\\2615"; height: inherit; } .icon-trash.icon-left a:before, .icon-trash.icon-right a:after, i.icon-trash:before { content: "\\e729"; height: inherit; } .icon-doc.icon-left a:before, .icon-doc.icon-right a:after, i.icon-doc:before { content: "\\e730"; height: inherit; } .icon-docs.icon-left a:before, .icon-docs.icon-right a:after, i.icon-docs:before { content: "\\e736"; height: inherit; } .icon-doc-landscape.icon-left a:before, .icon-doc-landscape.icon-right a:after, i.icon-doc-landscape:before { content: "\\e737"; height: inherit; } .icon-doc-text.icon-left a:before, .icon-doc-text.icon-right a:after, i.icon-doc-text:before { content: "\\1f4c4"; height: inherit; } .icon-doc-text-inv.icon-left a:before, .icon-doc-text-inv.icon-right a:after, i.icon-doc-text-inv:before { content: "\\e731"; height: inherit; } .icon-newspaper.icon-left a:before, .icon-newspaper.icon-right a:after, i.icon-newspaper:before { content: "\\1f4f0"; height: inherit; } .icon-book-open.icon-left a:before, .icon-book-open.icon-right a:after, i.icon-book-open:before { content: "\\1f4d6"; height: inherit; } .icon-book.icon-left a:before, .icon-book.icon-right a:after, i.icon-book:before { content: "\\1f4d5"; height: inherit; } .icon-folder.icon-left a:before, .icon-folder.icon-right a:after, i.icon-folder:before { content: "\\1f4c1"; height: inherit; } .icon-archive.icon-left a:before, .icon-archive.icon-right a:after, i.icon-archive:before { content: "\\e738"; height: inherit; } .icon-box.icon-left a:before, .icon-box.icon-right a:after, i.icon-box:before { content: "\\1f4e6"; height: inherit; } .icon-rss.icon-left a:before, .icon-rss.icon-right a:after, i.icon-rss:before { content: "\\e73a"; height: inherit; } .icon-phone.icon-left a:before, .icon-phone.icon-right a:after, i.icon-phone:before { content: "\\1f4de"; height: inherit; } .icon-cog.icon-left a:before, .icon-cog.icon-right a:after, i.icon-cog:before { content: "\\2699"; height: inherit; } .icon-tools.icon-left a:before, .icon-tools.icon-right a:after, i.icon-tools:before { content: "\\2692"; height: inherit; } .icon-share.icon-left a:before, .icon-share.icon-right a:after, i.icon-share:before { content: "\\e73c"; height: inherit; } .icon-shareable.icon-left a:before, .icon-shareable.icon-right a:after, i.icon-shareable:before { content: "\\e73e"; height: inherit; } .icon-basket.icon-left a:before, .icon-basket.icon-right a:after, i.icon-basket:before { content: "\\e73d"; height: inherit; } .icon-bag.icon-left a:before, .icon-bag.icon-right a:after, i.icon-bag:before { content: "\\1f45c"; height: inherit; } .icon-calendar.icon-left a:before, .icon-calendar.icon-right a:after, i.icon-calendar:before { content: "\\1f4c5"; height: inherit; } .icon-login.icon-left a:before, .icon-login.icon-right a:after, i.icon-login:before { content: "\\e740"; height: inherit; } .icon-logout.icon-left a:before, .icon-logout.icon-right a:after, i.icon-logout:before { content: "\\e741"; height: inherit; } .icon-mic.icon-left a:before, .icon-mic.icon-right a:after, i.icon-mic:before { content: "\\1f3a4"; height: inherit; } .icon-mute.icon-left a:before, .icon-mute.icon-right a:after, i.icon-mute:before { content: "\\1f507"; height: inherit; } .icon-sound.icon-left a:before, .icon-sound.icon-right a:after, i.icon-sound:before { content: "\\1f50a"; height: inherit; } .icon-volume.icon-left a:before, .icon-volume.icon-right a:after, i.icon-volume:before { content: "\\e742"; height: inherit; } .icon-clock.icon-left a:before, .icon-clock.icon-right a:after, i.icon-clock:before { content: "\\1f554"; height: inherit; } .icon-hourglass.icon-left a:before, .icon-hourglass.icon-right a:after, i.icon-hourglass:before { content: "\\23f3"; height: inherit; } .icon-lamp.icon-left a:before, .icon-lamp.icon-right a:after, i.icon-lamp:before { content: "\\1f4a1"; height: inherit; } .icon-light-down.icon-left a:before, .icon-light-down.icon-right a:after, i.icon-light-down:before { content: "\\1f505"; height: inherit; } .icon-light-up.icon-left a:before, .icon-light-up.icon-right a:after, i.icon-light-up:before { content: "\\1f506"; height: inherit; } .icon-adjust.icon-left a:before, .icon-adjust.icon-right a:after, i.icon-adjust:before { content: "\\25d1"; height: inherit; } .icon-block.icon-left a:before, .icon-block.icon-right a:after, i.icon-block:before { content: "\\1f6ab"; height: inherit; } .icon-resize-full.icon-left a:before, .icon-resize-full.icon-right a:after, i.icon-resize-full:before { content: "\\e744"; height: inherit; } .icon-resize-small.icon-left a:before, .icon-resize-small.icon-right a:after, i.icon-resize-small:before { content: "\\e746"; height: inherit; } .icon-popup.icon-left a:before, .icon-popup.icon-right a:after, i.icon-popup:before { content: "\\e74c"; height: inherit; } .icon-publish.icon-left a:before, .icon-publish.icon-right a:after, i.icon-publish:before { content: "\\e74d"; height: inherit; } .icon-window.icon-left a:before, .icon-window.icon-right a:after, i.icon-window:before { content: "\\e74e"; height: inherit; } .icon-arrow-combo.icon-left a:before, .icon-arrow-combo.icon-right a:after, i.icon-arrow-combo:before { content: "\\e74f"; height: inherit; } .icon-down-circled.icon-left a:before, .icon-down-circled.icon-right a:after, i.icon-down-circled:before { content: "\\e758"; height: inherit; } .icon-left-circled.icon-left a:before, .icon-left-circled.icon-right a:after, i.icon-left-circled:before { content: "\\e759"; height: inherit; } .icon-right-circled.icon-left a:before, .icon-right-circled.icon-right a:after, i.icon-right-circled:before { content: "\\e75a"; height: inherit; } .icon-up-circled.icon-left a:before, .icon-up-circled.icon-right a:after, i.icon-up-circled:before { content: "\\e75b"; height: inherit; } .icon-down-open.icon-left a:before, .icon-down-open.icon-right a:after, i.icon-down-open:before { content: "\\e75c"; height: inherit; } .icon-left-open.icon-left a:before, .icon-left-open.icon-right a:after, i.icon-left-open:before { content: "\\e75d"; height: inherit; } .icon-right-open.icon-left a:before, .icon-right-open.icon-right a:after, i.icon-right-open:before { content: "\\e75e"; height: inherit; } .icon-up-open.icon-left a:before, .icon-up-open.icon-right a:after, i.icon-up-open:before { content: "\\e75f"; height: inherit; } .icon-down-open-mini.icon-left a:before, .icon-down-open-mini.icon-right a:after, i.icon-down-open-mini:before { content: "\\e760"; height: inherit; } .icon-left-open-mini.icon-left a:before, .icon-left-open-mini.icon-right a:after, i.icon-left-open-mini:before { content: "\\e761"; height: inherit; } .icon-right-open-mini.icon-left a:before, .icon-right-open-mini.icon-right a:after, i.icon-right-open-mini:before { content: "\\e762"; height: inherit; } .icon-up-open-mini.icon-left a:before, .icon-up-open-mini.icon-right a:after, i.icon-up-open-mini:before { content: "\\e763"; height: inherit; } .icon-down-open-big.icon-left a:before, .icon-down-open-big.icon-right a:after, i.icon-down-open-big:before { content: "\\e764"; height: inherit; } .icon-left-open-big.icon-left a:before, .icon-left-open-big.icon-right a:after, i.icon-left-open-big:before { content: "\\e765"; height: inherit; } .icon-right-open-big.icon-left a:before, .icon-right-open-big.icon-right a:after, i.icon-right-open-big:before { content: "\\e766"; height: inherit; } .icon-up-open-big.icon-left a:before, .icon-up-open-big.icon-right a:after, i.icon-up-open-big:before { content: "\\e767"; height: inherit; } .icon-down.icon-left a:before, .icon-down.icon-right a:after, i.icon-down:before { content: "\\2b07"; height: inherit; } .icon-arrow-left.icon-left a:before, .icon-arrow-left.icon-right a:after, i.icon-arrow-left:before { content: "\\2b05"; height: inherit; } .icon-arrow-right.icon-left a:before, .icon-arrow-right.icon-right a:after, i.icon-arrow-right:before { content: "\\27a1"; height: inherit; } .icon-up.icon-left a:before, .icon-up.icon-right a:after, i.icon-up:before { content: "\\2b06"; height: inherit; } .icon-down-dir.icon-left a:before, .icon-down-dir.icon-right a:after, i.icon-down-dir:before { content: "\\25be"; height: inherit; } .icon-left-dir.icon-left a:before, .icon-left-dir.icon-right a:after, i.icon-left-dir:before { content: "\\25c2"; height: inherit; } .icon-right-dir.icon-left a:before, .icon-right-dir.icon-right a:after, i.icon-right-dir:before { content: "\\25b8"; height: inherit; } .icon-up-dir.icon-left a:before, .icon-up-dir.icon-right a:after, i.icon-up-dir:before { content: "\\25b4"; height: inherit; } .icon-down-bold.icon-left a:before, .icon-down-bold.icon-right a:after, i.icon-down-bold:before { content: "\\e4b0"; height: inherit; } .icon-left-bold.icon-left a:before, .icon-left-bold.icon-right a:after, i.icon-left-bold:before { content: "\\e4ad"; height: inherit; } .icon-right-bold.icon-left a:before, .icon-right-bold.icon-right a:after, i.icon-right-bold:before { content: "\\e4ae"; height: inherit; } .icon-up-bold.icon-left a:before, .icon-up-bold.icon-right a:after, i.icon-up-bold:before { content: "\\e4af"; height: inherit; } .icon-down-thin.icon-left a:before, .icon-down-thin.icon-right a:after, i.icon-down-thin:before { content: "\\2193"; height: inherit; } .icon-left-thin.icon-left a:before, .icon-left-thin.icon-right a:after, i.icon-left-thin:before { content: "\\2190"; height: inherit; } .icon-right-thin.icon-left a:before, .icon-right-thin.icon-right a:after, i.icon-right-thin:before { content: "\\2192"; height: inherit; } .icon-up-thin.icon-left a:before, .icon-up-thin.icon-right a:after, i.icon-up-thin:before { content: "\\2191"; height: inherit; } .icon-ccw.icon-left a:before, .icon-ccw.icon-right a:after, i.icon-ccw:before { content: "\\27f2"; height: inherit; } .icon-cw.icon-left a:before, .icon-cw.icon-right a:after, i.icon-cw:before { content: "\\27f3"; height: inherit; } .icon-arrows-ccw.icon-left a:before, .icon-arrows-ccw.icon-right a:after, i.icon-arrows-ccw:before { content: "\\1f504"; height: inherit; } .icon-level-down.icon-left a:before, .icon-level-down.icon-right a:after, i.icon-level-down:before { content: "\\21b3"; height: inherit; } .icon-level-up.icon-left a:before, .icon-level-up.icon-right a:after, i.icon-level-up:before { content: "\\21b0"; height: inherit; } .icon-shuffle.icon-left a:before, .icon-shuffle.icon-right a:after, i.icon-shuffle:before { content: "\\1f500"; height: inherit; } .icon-loop.icon-left a:before, .icon-loop.icon-right a:after, i.icon-loop:before { content: "\\1f501"; height: inherit; } .icon-switch.icon-left a:before, .icon-switch.icon-right a:after, i.icon-switch:before { content: "\\21c6"; height: inherit; } .icon-play.icon-left a:before, .icon-play.icon-right a:after, i.icon-play:before { content: "\\25b6"; height: inherit; } .icon-stop.icon-left a:before, .icon-stop.icon-right a:after, i.icon-stop:before { content: "\\25a0"; height: inherit; } .icon-pause.icon-left a:before, .icon-pause.icon-right a:after, i.icon-pause:before { content: "\\2389"; height: inherit; } .icon-record.icon-left a:before, .icon-record.icon-right a:after, i.icon-record:before { content: "\\26ab"; height: inherit; } .icon-to-end.icon-left a:before, .icon-to-end.icon-right a:after, i.icon-to-end:before { content: "\\23ed"; height: inherit; } .icon-to-start.icon-left a:before, .icon-to-start.icon-right a:after, i.icon-to-start:before { content: "\\23ee"; height: inherit; } .icon-fast-forward.icon-left a:before, .icon-fast-forward.icon-right a:after, i.icon-fast-forward:before { content: "\\23e9"; height: inherit; } .icon-fast-backward.icon-left a:before, .icon-fast-backward.icon-right a:after, i.icon-fast-backward:before { content: "\\23ea"; height: inherit; } .icon-progress-0.icon-left a:before, .icon-progress-0.icon-right a:after, i.icon-progress-0:before { content: "\\e768"; height: inherit; } .icon-progress-1.icon-left a:before, .icon-progress-1.icon-right a:after, i.icon-progress-1:before { content: "\\e769"; height: inherit; } .icon-progress-2.icon-left a:before, .icon-progress-2.icon-right a:after, i.icon-progress-2:before { content: "\\e76a"; height: inherit; } .icon-progress-3.icon-left a:before, .icon-progress-3.icon-right a:after, i.icon-progress-3:before { content: "\\e76b"; height: inherit; } .icon-target.icon-left a:before, .icon-target.icon-right a:after, i.icon-target:before { content: "\\1f3af"; height: inherit; } .icon-palette.icon-left a:before, .icon-palette.icon-right a:after, i.icon-palette:before { content: "\\1f3a8"; height: inherit; } .icon-list.icon-left a:before, .icon-list.icon-right a:after, i.icon-list:before { content: "\\e005"; height: inherit; } .icon-list-add.icon-left a:before, .icon-list-add.icon-right a:after, i.icon-list-add:before { content: "\\e003"; height: inherit; } .icon-signal.icon-left a:before, .icon-signal.icon-right a:after, i.icon-signal:before { content: "\\1f4f6"; height: inherit; } .icon-trophy.icon-left a:before, .icon-trophy.icon-right a:after, i.icon-trophy:before { content: "\\1f3c6"; height: inherit; } .icon-battery.icon-left a:before, .icon-battery.icon-right a:after, i.icon-battery:before { content: "\\1f50b"; height: inherit; } .icon-back-in-time.icon-left a:before, .icon-back-in-time.icon-right a:after, i.icon-back-in-time:before { content: "\\e771"; height: inherit; } .icon-monitor.icon-left a:before, .icon-monitor.icon-right a:after, i.icon-monitor:before { content: "\\1f4bb"; height: inherit; } .icon-mobile.icon-left a:before, .icon-mobile.icon-right a:after, i.icon-mobile:before { content: "\\1f4f1"; height: inherit; } .icon-network.icon-left a:before, .icon-network.icon-right a:after, i.icon-network:before { content: "\\e776"; height: inherit; } .icon-cd.icon-left a:before, .icon-cd.icon-right a:after, i.icon-cd:before { content: "\\1f4bf"; height: inherit; } .icon-inbox.icon-left a:before, .icon-inbox.icon-right a:after, i.icon-inbox:before { content: "\\e777"; height: inherit; } .icon-install.icon-left a:before, .icon-install.icon-right a:after, i.icon-install:before { content: "\\e778"; height: inherit; } .icon-globe.icon-left a:before, .icon-globe.icon-right a:after, i.icon-globe:before { content: "\\1f30e"; height: inherit; } .icon-cloud.icon-left a:before, .icon-cloud.icon-right a:after, i.icon-cloud:before { content: "\\2601"; height: inherit; } .icon-cloud-thunder.icon-left a:before, .icon-cloud-thunder.icon-right a:after, i.icon-cloud-thunder:before { content: "\\26c8"; height: inherit; } .icon-flash.icon-left a:before, .icon-flash.icon-right a:after, i.icon-flash:before { content: "\\26a1"; height: inherit; } .icon-moon.icon-left a:before, .icon-moon.icon-right a:after, i.icon-moon:before { content: "\\263d"; height: inherit; } .icon-flight.icon-left a:before, .icon-flight.icon-right a:after, i.icon-flight:before { content: "\\2708"; height: inherit; } .icon-paper-plane.icon-left a:before, .icon-paper-plane.icon-right a:after, i.icon-paper-plane:before { content: "\\e79b"; height: inherit; } .icon-leaf.icon-left a:before, .icon-leaf.icon-right a:after, i.icon-leaf:before { content: "\\1f342"; height: inherit; } .icon-lifebuoy.icon-left a:before, .icon-lifebuoy.icon-right a:after, i.icon-lifebuoy:before { content: "\\e788"; height: inherit; } .icon-mouse.icon-left a:before, .icon-mouse.icon-right a:after, i.icon-mouse:before { content: "\\e789"; height: inherit; } .icon-briefcase.icon-left a:before, .icon-briefcase.icon-right a:after, i.icon-briefcase:before { content: "\\1f4bc"; height: inherit; } .icon-suitcase.icon-left a:before, .icon-suitcase.icon-right a:after, i.icon-suitcase:before { content: "\\e78e"; height: inherit; } .icon-dot.icon-left a:before, .icon-dot.icon-right a:after, i.icon-dot:before { content: "\\e78b"; height: inherit; } .icon-dot-2.icon-left a:before, .icon-dot-2.icon-right a:after, i.icon-dot-2:before { content: "\\e78c"; height: inherit; } .icon-dot-3.icon-left a:before, .icon-dot-3.icon-right a:after, i.icon-dot-3:before { content: "\\e78d"; height: inherit; } .icon-brush.icon-left a:before, .icon-brush.icon-right a:after, i.icon-brush:before { content: "\\e79a"; height: inherit; } .icon-magnet.icon-left a:before, .icon-magnet.icon-right a:after, i.icon-magnet:before { content: "\\e7a1"; height: inherit; } .icon-infinity.icon-left a:before, .icon-infinity.icon-right a:after, i.icon-infinity:before { content: "\\221e"; height: inherit; } .icon-erase.icon-left a:before, .icon-erase.icon-right a:after, i.icon-erase:before { content: "\\232b"; height: inherit; } .icon-chart-pie.icon-left a:before, .icon-chart-pie.icon-right a:after, i.icon-chart-pie:before { content: "\\e751"; height: inherit; } .icon-chart-line.icon-left a:before, .icon-chart-line.icon-right a:after, i.icon-chart-line:before { content: "\\1f4c8"; height: inherit; } .icon-chart-bar.icon-left a:before, .icon-chart-bar.icon-right a:after, i.icon-chart-bar:before { content: "\\1f4ca"; height: inherit; } .icon-chart-area.icon-left a:before, .icon-chart-area.icon-right a:after, i.icon-chart-area:before { content: "\\1f53e"; height: inherit; } .icon-tape.icon-left a:before, .icon-tape.icon-right a:after, i.icon-tape:before { content: "\\2707"; height: inherit; } .icon-graduation-cap.icon-left a:before, .icon-graduation-cap.icon-right a:after, i.icon-graduation-cap:before { content: "\\1f393"; height: inherit; } .icon-language.icon-left a:before, .icon-language.icon-right a:after, i.icon-language:before { content: "\\e752"; height: inherit; } .icon-ticket.icon-left a:before, .icon-ticket.icon-right a:after, i.icon-ticket:before { content: "\\1f3ab"; height: inherit; } .icon-water.icon-left a:before, .icon-water.icon-right a:after, i.icon-water:before { content: "\\1f4a6"; height: inherit; } .icon-droplet.icon-left a:before, .icon-droplet.icon-right a:after, i.icon-droplet:before { content: "\\1f4a7"; height: inherit; } .icon-air.icon-left a:before, .icon-air.icon-right a:after, i.icon-air:before { content: "\\e753"; height: inherit; } .icon-credit-card.icon-left a:before, .icon-credit-card.icon-right a:after, i.icon-credit-card:before { content: "\\1f4b3"; height: inherit; } .icon-floppy.icon-left a:before, .icon-floppy.icon-right a:after, i.icon-floppy:before { content: "\\1f4be"; height: inherit; } .icon-clipboard.icon-left a:before, .icon-clipboard.icon-right a:after, i.icon-clipboard:before { content: "\\1f4cb"; height: inherit; } .icon-megaphone.icon-left a:before, .icon-megaphone.icon-right a:after, i.icon-megaphone:before { content: "\\1f4e3"; height: inherit; } .icon-database.icon-left a:before, .icon-database.icon-right a:after, i.icon-database:before { content: "\\e754"; height: inherit; } .icon-drive.icon-left a:before, .icon-drive.icon-right a:after, i.icon-drive:before { content: "\\e755"; height: inherit; } .icon-bucket.icon-left a:before, .icon-bucket.icon-right a:after, i.icon-bucket:before { content: "\\e756"; height: inherit; } .icon-thermometer.icon-left a:before, .icon-thermometer.icon-right a:after, i.icon-thermometer:before { content: "\\e757"; height: inherit; } .icon-key.icon-left a:before, .icon-key.icon-right a:after, i.icon-key:before { content: "\\1f511"; height: inherit; } .icon-flow-cascade.icon-left a:before, .icon-flow-cascade.icon-right a:after, i.icon-flow-cascade:before { content: "\\e790"; height: inherit; } .icon-flow-branch.icon-left a:before, .icon-flow-branch.icon-right a:after, i.icon-flow-branch:before { content: "\\e791"; height: inherit; } .icon-flow-tree.icon-left a:before, .icon-flow-tree.icon-right a:after, i.icon-flow-tree:before { content: "\\e792"; height: inherit; } .icon-flow-line.icon-left a:before, .icon-flow-line.icon-right a:after, i.icon-flow-line:before { content: "\\e793"; height: inherit; } .icon-flow-parallel.icon-left a:before, .icon-flow-parallel.icon-right a:after, i.icon-flow-parallel:before { content: "\\e794"; height: inherit; } .icon-rocket.icon-left a:before, .icon-rocket.icon-right a:after, i.icon-rocket:before { content: "\\1f680"; height: inherit; } .icon-gauge.icon-left a:before, .icon-gauge.icon-right a:after, i.icon-gauge:before { content: "\\e7a2"; height: inherit; } .icon-traffic-cone.icon-left a:before, .icon-traffic-cone.icon-right a:after, i.icon-traffic-cone:before { content: "\\e7a3"; height: inherit; } .icon-cc.icon-left a:before, .icon-cc.icon-right a:after, i.icon-cc:before { content: "\\e7a5"; height: inherit; } .icon-cc-by.icon-left a:before, .icon-cc-by.icon-right a:after, i.icon-cc-by:before { content: "\\e7a6"; height: inherit; } .icon-cc-nc.icon-left a:before, .icon-cc-nc.icon-right a:after, i.icon-cc-nc:before { content: "\\e7a7"; height: inherit; } .icon-cc-nc-eu.icon-left a:before, .icon-cc-nc-eu.icon-right a:after, i.icon-cc-nc-eu:before { content: "\\e7a8"; height: inherit; } .icon-cc-nc-jp.icon-left a:before, .icon-cc-nc-jp.icon-right a:after, i.icon-cc-nc-jp:before { content: "\\e7a9"; height: inherit; } .icon-cc-sa.icon-left a:before, .icon-cc-sa.icon-right a:after, i.icon-cc-sa:before { content: "\\e7aa"; height: inherit; } .icon-cc-nd.icon-left a:before, .icon-cc-nd.icon-right a:after, i.icon-cc-nd:before { content: "\\e7ab"; height: inherit; } .icon-cc-pd.icon-left a:before, .icon-cc-pd.icon-right a:after, i.icon-cc-pd:before { content: "\\e7ac"; height: inherit; } .icon-cc-zero.icon-left a:before, .icon-cc-zero.icon-right a:after, i.icon-cc-zero:before { content: "\\e7ad"; height: inherit; } .icon-cc-share.icon-left a:before, .icon-cc-share.icon-right a:after, i.icon-cc-share:before { content: "\\e7ae"; height: inherit; } .icon-cc-remix.icon-left a:before, .icon-cc-remix.icon-right a:after, i.icon-cc-remix:before { content: "\\e7af"; height: inherit; } .icon-github.icon-left a:before, .icon-github.icon-right a:after, i.icon-github:before { content: "\\f300"; height: inherit; } .icon-github-circled.icon-left a:before, .icon-github-circled.icon-right a:after, i.icon-github-circled:before { content: "\\f301"; height: inherit; } .icon-flickr.icon-left a:before, .icon-flickr.icon-right a:after, i.icon-flickr:before { content: "\\f303"; height: inherit; } .icon-flickr-circled.icon-left a:before, .icon-flickr-circled.icon-right a:after, i.icon-flickr-circled:before { content: "\\f304"; height: inherit; } .icon-vimeo.icon-left a:before, .icon-vimeo.icon-right a:after, i.icon-vimeo:before { content: "\\f306"; height: inherit; } .icon-vimeo-circled.icon-left a:before, .icon-vimeo-circled.icon-right a:after, i.icon-vimeo-circled:before { content: "\\f307"; height: inherit; } .icon-twitter.icon-left a:before, .icon-twitter.icon-right a:after, i.icon-twitter:before { content: "\\f309"; height: inherit; } .icon-twitter-circled.icon-left a:before, .icon-twitter-circled.icon-right a:after, i.icon-twitter-circled:before { content: "\\f30a"; height: inherit; } .icon-facebook.icon-left a:before, .icon-facebook.icon-right a:after, i.icon-facebook:before { content: "\\f30c"; height: inherit; } .icon-facebook-circled.icon-left a:before, .icon-facebook-circled.icon-right a:after, i.icon-facebook-circled:before { content: "\\f30d"; height: inherit; } .icon-facebook-squared.icon-left a:before, .icon-facebook-squared.icon-right a:after, i.icon-facebook-squared:before { content: "\\f30e"; height: inherit; } .icon-gplus.icon-left a:before, .icon-gplus.icon-right a:after, i.icon-gplus:before { content: "\\f30f"; height: inherit; } .icon-gplus-circled.icon-left a:before, .icon-gplus-circled.icon-right a:after, i.icon-gplus-circled:before { content: "\\f310"; height: inherit; } .icon-pinterest.icon-left a:before, .icon-pinterest.icon-right a:after, i.icon-pinterest:before { content: "\\f312"; height: inherit; } .icon-pinterest-circled.icon-left a:before, .icon-pinterest-circled.icon-right a:after, i.icon-pinterest-circled:before { content: "\\f313"; height: inherit; } .icon-tumblr.icon-left a:before, .icon-tumblr.icon-right a:after, i.icon-tumblr:before { content: "\\f315"; height: inherit; } .icon-tumblr-circled.icon-left a:before, .icon-tumblr-circled.icon-right a:after, i.icon-tumblr-circled:before { content: "\\f316"; height: inherit; } .icon-linkedin.icon-left a:before, .icon-linkedin.icon-right a:after, i.icon-linkedin:before { content: "\\f318"; height: inherit; } .icon-linkedin-circled.icon-left a:before, .icon-linkedin-circled.icon-right a:after, i.icon-linkedin-circled:before { content: "\\f319"; height: inherit; } .icon-dribbble.icon-left a:before, .icon-dribbble.icon-right a:after, i.icon-dribbble:before { content: "\\f31b"; height: inherit; } .icon-dribbble-circled.icon-left a:before, .icon-dribbble-circled.icon-right a:after, i.icon-dribbble-circled:before { content: "\\f31c"; height: inherit; } .icon-stumbleupon.icon-left a:before, .icon-stumbleupon.icon-right a:after, i.icon-stumbleupon:before { content: "\\f31e"; height: inherit; } .icon-stumbleupon-circled.icon-left a:before, .icon-stumbleupon-circled.icon-right a:after, i.icon-stumbleupon-circled:before { content: "\\f31f"; height: inherit; } .icon-lastfm.icon-left a:before, .icon-lastfm.icon-right a:after, i.icon-lastfm:before { content: "\\f321"; height: inherit; } .icon-lastfm-circled.icon-left a:before, .icon-lastfm-circled.icon-right a:after, i.icon-lastfm-circled:before { content: "\\f322"; height: inherit; } .icon-rdio.icon-left a:before, .icon-rdio.icon-right a:after, i.icon-rdio:before { content: "\\f324"; height: inherit; } .icon-rdio-circled.icon-left a:before, .icon-rdio-circled.icon-right a:after, i.icon-rdio-circled:before { content: "\\f325"; height: inherit; } .icon-spotify.icon-left a:before, .icon-spotify.icon-right a:after, i.icon-spotify:before { content: "\\f327"; height: inherit; } .icon-spotify-circled.icon-left a:before, .icon-spotify-circled.icon-right a:after, i.icon-spotify-circled:before { content: "\\f328"; height: inherit; } .icon-qq.icon-left a:before, .icon-qq.icon-right a:after, i.icon-qq:before { content: "\\f32a"; height: inherit; } .icon-instagram.icon-left a:before, .icon-instagram.icon-right a:after, i.icon-instagram:before { content: "\\f32d"; height: inherit; } .icon-dropbox.icon-left a:before, .icon-dropbox.icon-right a:after, i.icon-dropbox:before { content: "\\f330"; height: inherit; } .icon-evernote.icon-left a:before, .icon-evernote.icon-right a:after, i.icon-evernote:before { content: "\\f333"; height: inherit; } .icon-flattr.icon-left a:before, .icon-flattr.icon-right a:after, i.icon-flattr:before { content: "\\f336"; height: inherit; } .icon-skype.icon-left a:before, .icon-skype.icon-right a:after, i.icon-skype:before { content: "\\f339"; height: inherit; } .icon-skype-circled.icon-left a:before, .icon-skype-circled.icon-right a:after, i.icon-skype-circled:before { content: "\\f33a"; height: inherit; } .icon-renren.icon-left a:before, .icon-renren.icon-right a:after, i.icon-renren:before { content: "\\f33c"; height: inherit; } .icon-sina-weibo.icon-left a:before, .icon-sina-weibo.icon-right a:after, i.icon-sina-weibo:before { content: "\\f33f"; height: inherit; } .icon-paypal.icon-left a:before, .icon-paypal.icon-right a:after, i.icon-paypal:before { content: "\\f342"; height: inherit; } .icon-picasa.icon-left a:before, .icon-picasa.icon-right a:after, i.icon-picasa:before { content: "\\f345"; height: inherit; } .icon-soundcloud.icon-left a:before, .icon-soundcloud.icon-right a:after, i.icon-soundcloud:before { content: "\\f348"; height: inherit; } .icon-mixi.icon-left a:before, .icon-mixi.icon-right a:after, i.icon-mixi:before { content: "\\f34b"; height: inherit; } .icon-behance.icon-left a:before, .icon-behance.icon-right a:after, i.icon-behance:before { content: "\\f34e"; height: inherit; } .icon-google-circles.icon-left a:before, .icon-google-circles.icon-right a:after, i.icon-google-circles:before { content: "\\f351"; height: inherit; } .icon-vkontakte.icon-left a:before, .icon-vkontakte.icon-right a:after, i.icon-vkontakte:before { content: "\\f354"; height: inherit; } .icon-smashing.icon-left a:before, .icon-smashing.icon-right a:after, i.icon-smashing:before { content: "\\f357"; height: inherit; } .icon-sweden.icon-left a:before, .icon-sweden.icon-right a:after, i.icon-sweden:before { content: "\\f601"; height: inherit; } .icon-db-shape.icon-left a:before, .icon-db-shape.icon-right a:after, i.icon-db-shape:before { content: "\\f600"; height: inherit; } .icon-logo-db.icon-left a:before, .icon-logo-db.icon-right a:after, i.icon-logo-db:before { content: "\\f603"; height: inherit; } .fixed { position: fixed; } .fixed.pinned { position: absolute; } @media only screen and (max-width: 768px) { .fixed { position: relative !important; top: auto !important; left: auto !important; } } .unfixed { position: relative !important; top: auto !important; left: auto !important; } .text-center { text-align: center; } .text-left { text-align: left; } .text-right { text-align: right; } /* Fonts */ @font-face { font-family: "entypo"; font-style: normal; font-weight: 400; src: url(../fonts/icons/entypo.eot); src: url("../fonts/icons/entypo.eot?#iefix") format("ie9-skip-eot"), url("../fonts/icons/entypo.woff") format("woff"), url("../fonts/icons/entypo.ttf") format("truetype"); } /* Typography */ h1, h2, h3, h4, h5, h6 { font-family: "Open Sans"; font-weight: 300; color: #444444; text-rendering: optimizeLegibility; padding-top: 0.252em; line-height: 1.0665em; padding-bottom: 0.252em; } h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { color: #d04526; } @media only screen and (max-width: 767px) { h1, h2, h3, h4, h5, h6 { word-wrap: break-word; } } h1 { font-size: 67.77709px; font-size: 4.23607rem; } h1.xlarge { font-size: 109.66563px; font-size: 6.8541rem; } h1.xxlarge { font-size: 126.20665px; font-size: 7.88792rem; } h1.absurd { font-size: 177.44273px; font-size: 11.09017rem; } h2 { font-size: 41.88854px; font-size: 2.61803rem; } h3 { font-size: 29.79335px; font-size: 1.86208rem; } h4 { font-size: 25.88854px; font-size: 1.61803rem; } h5 { font-size: 18.4133px; font-size: 1.15083rem; } h6 { font-size: 16px; font-size: 1rem; } @media only screen and (max-width: 767px) { h1 { font-size: 41.88854px; font-size: 2.61803rem; } h2 { font-size: 35.79335px; font-size: 2.23708rem; } } .subhead { color: #777; font-weight: normal; margin-bottom: 20px; } /*===================================================== Links & Paragraph styles ======================================================*/ p { font-family: "Open Sans"; font-weight: 400; font-size: 16px; font-size: 1rem; margin-bottom: 12px; line-height: 1.5em; } p.lead { font-size: 20px; font-size: 1.25rem; margin-bottom: 18.4133px; } @media only screen and (max-width: 768px) { p { font-size: 17.6px; font-size: 1.1rem; line-height: 1.5em; } } a { color: #d04526; text-decoration: none; outline: 0; line-height: inherit; } a:hover { color: #c03d20; } /*===================================================== Lists ======================================================*/ ul, ol { margin-bottom: 0.252em; } ul { list-style: none outside; } ol { list-style: decimal; margin-left: 30px; } ul.square, ul.circle, ul.disc { margin-left: 25px; } ul.square { list-style: square outside; } ul.circle { list-style: circle outside; } ul.disc { list-style: disc outside; } ul ul { margin: 4px 0 5px 25px; } ol ol { margin: 4px 0 5px 30px; } li { padding-bottom: 0.252em; } ul.large li { line-height: 21px; } dl dt { font-weight: bold; font-size: 16px; font-size: 1rem; } @media only screen and (max-width: 768px) { ul, ol, dl, p { text-align: left; } } /* Mobile */ em { font-style: italic; line-height: inherit; } strong { font-weight: 700; line-height: inherit; } small { font-size: 56.4%; line-height: inherit; } h1 small, h2 small, h3 small, h4 small, h5 small { color: #777; } /* Blockquotes */ blockquote { line-height: 20px; color: #777; margin: 0 0 18px; padding: 9px 20px 0 19px; border-left: 5px solid #ccc; } blockquote p { line-height: 20px; color: #777; } blockquote cite { display: block; font-size: 12px; font-size: 1.2rem; color: #555555; } blockquote cite:before { content: "\2014 \0020"; } blockquote cite a { color: #555555; } blockquote cite a:visited { color: #555555; } hr { border: 1px solid #ccc; clear: both; margin: 16px 0 18px; height: 0; } abbr, acronym { text-transform: uppercase; font-size: 90%; color: #222; border-bottom: 1px solid #ccc; cursor: help; } abbr { text-transform: none; } /** Print styles. Inlined to avoid required HTTP connection: www.phpied.com/delay-loading-your-print-css/ Credit to Paul Irish and HTML5 Boilerplate (html5boilerplate.com) */ @media print { * { background: transparent !important; color: black !important; text-shadow: none !important; filter: none !important; -ms-filter: none !important; } /* Black prints faster: sanbeiji.com/archives/953 */ p a { color: #555555 !important; text-decoration: underline; } p a:visited { color: #555555 !important; text-decoration: underline; } p a[href]:after { content: " (" attr(href) ")"; } abbr[title]:after { content: " (" attr(title) ")"; } a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */ pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */ tr, img { page-break-inside: avoid; } @page { margin: 0.5cm; } p, h2, h3 { orphans: 3; widows: 3; } h2, h3 { page-break-after: avoid; } } .row .pull_one.one.column:first-child, .row .pull_one.two.columns:first-child, .row .pull_one.three.columns:first-child, .row .pull_one.four.columns:first-child, .row .pull_one.five.columns:first-child, .row .pull_one.six.columns:first-child, .row .pull_one.seven.columns:first-child, .row .pull_one.eight.columns:first-child, .row .pull_one.nine.columns:first-child, .row .pull_one.ten.columns:first-child, .row .pull_two.one.column:first-child, .row .pull_two.two.columns:first-child, .row .pull_two.three.columns:first-child, .row .pull_two.four.columns:first-child, .row .pull_two.five.columns:first-child, .row .pull_two.six.columns:first-child, .row .pull_two.seven.columns:first-child, .row .pull_two.eight.columns:first-child, .row .pull_two.nine.columns:first-child, .row .pull_two.eleven.columns:first-child, .row .pull_three.one.column:first-child, .row .pull_three.two.columns:first-child, .row .pull_three.three.columns:first-child, .row .pull_three.four.columns:first-child, .row .pull_three.five.columns:first-child, .row .pull_three.six.columns:first-child, .row .pull_three.seven.columns:first-child, .row .pull_three.eight.columns:first-child, .row .pull_three.ten.columns:first-child, .row .pull_three.eleven.columns:first-child, .row .pull_four.one.column:first-child, .row .pull_four.two.columns:first-child, .row .pull_four.three.columns:first-child, .row .pull_four.four.columns:first-child, .row .pull_four.five.columns:first-child, .row .pull_four.six.columns:first-child, .row .pull_four.seven.columns:first-child, .row .pull_four.nine.columns:first-child, .row .pull_four.ten.columns:first-child, .row .pull_four.eleven.columns:first-child, .row .pull_five.one.column:first-child, .row .pull_five.two.columns:first-child, .row .pull_five.three.columns:first-child, .row .pull_five.four.columns:first-child, .row .pull_five.five.columns:first-child, .row .pull_five.six.columns:first-child, .row .pull_five.eight.columns:first-child, .row .pull_five.nine.columns:first-child, .row .pull_five.ten.columns:first-child, .row .pull_five.eleven.columns:first-child, .row .pull_six.one.column:first-child, .row .pull_six.two.columns:first-child, .row .pull_six.three.columns:first-child, .row .pull_six.four.columns:first-child, .row .pull_six.five.columns:first-child, .row .pull_six.seven.columns:first-child, .row .pull_six.eight.columns:first-child, .row .pull_six.nine.columns:first-child, .row .pull_six.ten.columns:first-child, .row .pull_six.eleven.columns:first-child, .row .pull_seven.one.column:first-child, .row .pull_seven.two.columns:first-child, .row .pull_seven.three.columns:first-child, .row .pull_seven.four.columns:first-child, .row .pull_seven.six.columns:first-child, .row .pull_seven.seven.columns:first-child, .row .pull_seven.eight.columns:first-child, .row .pull_seven.nine.columns:first-child, .row .pull_seven.ten.columns:first-child, .row .pull_seven.eleven.columns:first-child, .row .pull_eight.one.column:first-child, .row .pull_eight.two.columns:first-child, .row .pull_eight.three.columns:first-child, .row .pull_eight.five.columns:first-child, .row .pull_eight.six.columns:first-child, .row .pull_eight.seven.columns:first-child, .row .pull_eight.eight.columns:first-child, .row .pull_eight.nine.columns:first-child, .row .pull_eight.ten.columns:first-child, .row .pull_eight.eleven.columns:first-child, .row .pull_nine.one.column:first-child, .row .pull_nine.two.columns:first-child, .row .pull_nine.four.columns:first-child, .row .pull_nine.five.columns:first-child, .row .pull_nine.six.columns:first-child, .row .pull_nine.seven.columns:first-child, .row .pull_nine.eight.columns:first-child, .row .pull_nine.nine.columns:first-child, .row .pull_nine.ten.columns:first-child, .row .pull_nine.eleven.columns:first-child, .row .pull_ten.one.column:first-child, .row .pull_ten.three.columns:first-child, .row .pull_ten.four.columns:first-child, .row .pull_ten.five.columns:first-child, .row .pull_ten.six.columns:first-child, .row .pull_ten.seven.columns:first-child, .row .pull_ten.eight.columns:first-child, .row .pull_ten.nine.columns:first-child, .row .pull_ten.ten.columns:first-child, .row .pull_ten.eleven.columns:first-child, .row .pull_eleven.two.columns:first-child, .row .pull_eleven.three.columns:first-child, .row .pull_eleven.four.columns:first-child, .row .pull_eleven.five.columns:first-child, .row .pull_eleven.six.columns:first-child, .row .pull_eleven.seven.columns:first-child, .row .pull_eleven.eight.columns:first-child, .row .pull_eleven.nine.columns:first-child, .row .pull_eleven.ten.columns:first-child, .row .pull_eleven.eleven.columns:first-child, .sixteen.colgrid .row .pull_one.one.column:first-child, .sixteen.colgrid .row .pull_one.two.columns:first-child, .sixteen.colgrid .row .pull_one.three.columns:first-child, .sixteen.colgrid .row .pull_one.four.columns:first-child, .sixteen.colgrid .row .pull_one.five.columns:first-child, .sixteen.colgrid .row .pull_one.six.columns:first-child, .sixteen.colgrid .row .pull_one.seven.columns:first-child, .sixteen.colgrid .row .pull_one.eight.columns:first-child, .sixteen.colgrid .row .pull_one.nine.columns:first-child, .sixteen.colgrid .row .pull_one.ten.columns:first-child, .sixteen.colgrid .row .pull_one.eleven.columns:first-child, .sixteen.colgrid .row .pull_one.twelve.columns:first-child, .sixteen.colgrid .row .pull_one.thirteen.columns:first-child, .sixteen.colgrid .row .pull_one.fourteen.columns:first-child, .sixteen.colgrid .row .pull_two.one.column:first-child, .sixteen.colgrid .row .pull_two.two.columns:first-child, .sixteen.colgrid .row .pull_two.three.columns:first-child, .sixteen.colgrid .row .pull_two.four.columns:first-child, .sixteen.colgrid .row .pull_two.five.columns:first-child, .sixteen.colgrid .row .pull_two.six.columns:first-child, .sixteen.colgrid .row .pull_two.seven.columns:first-child, .sixteen.colgrid .row .pull_two.eight.columns:first-child, .sixteen.colgrid .row .pull_two.nine.columns:first-child, .sixteen.colgrid .row .pull_two.ten.columns:first-child, .sixteen.colgrid .row .pull_two.eleven.columns:first-child, .sixteen.colgrid .row .pull_two.twelve.columns:first-child, .sixteen.colgrid .row .pull_two.thirteen.columns:first-child, .sixteen.colgrid .row .pull_two.fifteen.columns:first-child, .sixteen.colgrid .row .pull_three.one.column:first-child, .sixteen.colgrid .row .pull_three.two.columns:first-child, .sixteen.colgrid .row .pull_three.three.columns:first-child, .sixteen.colgrid .row .pull_three.four.columns:first-child, .sixteen.colgrid .row .pull_three.five.columns:first-child, .sixteen.colgrid .row .pull_three.six.columns:first-child, .sixteen.colgrid .row .pull_three.seven.columns:first-child, .sixteen.colgrid .row .pull_three.eight.columns:first-child, .sixteen.colgrid .row .pull_three.nine.columns:first-child, .sixteen.colgrid .row .pull_three.ten.columns:first-child, .sixteen.colgrid .row .pull_three.eleven.columns:first-child, .sixteen.colgrid .row .pull_three.twelve.columns:first-child, .sixteen.colgrid .row .pull_three.fourteen.columns:first-child, .sixteen.colgrid .row .pull_three.fifteen.columns:first-child, .sixteen.colgrid .row .pull_four.one.column:first-child, .sixteen.colgrid .row .pull_four.two.columns:first-child, .sixteen.colgrid .row .pull_four.three.columns:first-child, .sixteen.colgrid .row .pull_four.four.columns:first-child, .sixteen.colgrid .row .pull_four.five.columns:first-child, .sixteen.colgrid .row .pull_four.six.columns:first-child, .sixteen.colgrid .row .pull_four.seven.columns:first-child, .sixteen.colgrid .row .pull_four.eight.columns:first-child, .sixteen.colgrid .row .pull_four.nine.columns:first-child, .sixteen.colgrid .row .pull_four.ten.columns:first-child, .sixteen.colgrid .row .pull_four.eleven.columns:first-child, .sixteen.colgrid .row .pull_four.thirteen.columns:first-child, .sixteen.colgrid .row .pull_four.fourteen.columns:first-child, .sixteen.colgrid .row .pull_four.fifteen.columns:first-child, .sixteen.colgrid .row .pull_five.one.column:first-child, .sixteen.colgrid .row .pull_five.two.columns:first-child, .sixteen.colgrid .row .pull_five.three.columns:first-child, .sixteen.colgrid .row .pull_five.four.columns:first-child, .sixteen.colgrid .row .pull_five.five.columns:first-child, .sixteen.colgrid .row .pull_five.six.columns:first-child, .sixteen.colgrid .row .pull_five.seven.columns:first-child, .sixteen.colgrid .row .pull_five.eight.columns:first-child, .sixteen.colgrid .row .pull_five.nine.columns:first-child, .sixteen.colgrid .row .pull_five.ten.columns:first-child, .sixteen.colgrid .row .pull_five.twelve.columns:first-child, .sixteen.colgrid .row .pull_five.thirteen.columns:first-child, .sixteen.colgrid .row .pull_five.fourteen.columns:first-child, .sixteen.colgrid .row .pull_five.fifteen.columns:first-child, .sixteen.colgrid .row .pull_six.one.column:first-child, .sixteen.colgrid .row .pull_six.two.columns:first-child, .sixteen.colgrid .row .pull_six.three.columns:first-child, .sixteen.colgrid .row .pull_six.four.columns:first-child, .sixteen.colgrid .row .pull_six.five.columns:first-child, .sixteen.colgrid .row .pull_six.six.columns:first-child, .sixteen.colgrid .row .pull_six.seven.columns:first-child, .sixteen.colgrid .row .pull_six.eight.columns:first-child, .sixteen.colgrid .row .pull_six.nine.columns:first-child, .sixteen.colgrid .row .pull_six.eleven.columns:first-child, .sixteen.colgrid .row .pull_six.twelve.columns:first-child, .sixteen.colgrid .row .pull_six.thirteen.columns:first-child, .sixteen.colgrid .row .pull_six.fourteen.columns:first-child, .sixteen.colgrid .row .pull_six.fifteen.columns:first-child, .sixteen.colgrid .row .pull_seven.one.column:first-child, .sixteen.colgrid .row .pull_seven.two.columns:first-child, .sixteen.colgrid .row .pull_seven.three.columns:first-child, .sixteen.colgrid .row .pull_seven.four.columns:first-child, .sixteen.colgrid .row .pull_seven.five.columns:first-child, .sixteen.colgrid .row .pull_seven.six.columns:first-child, .sixteen.colgrid .row .pull_seven.seven.columns:first-child, .sixteen.colgrid .row .pull_seven.eight.columns:first-child, .sixteen.colgrid .row .pull_seven.ten.columns:first-child, .sixteen.colgrid .row .pull_seven.eleven.columns:first-child, .sixteen.colgrid .row .pull_seven.twelve.columns:first-child, .sixteen.colgrid .row .pull_seven.thirteen.columns:first-child, .sixteen.colgrid .row .pull_seven.fourteen.columns:first-child, .sixteen.colgrid .row .pull_seven.fifteen.columns:first-child, .sixteen.colgrid .row .pull_eight.one.column:first-child, .sixteen.colgrid .row .pull_eight.two.columns:first-child, .sixteen.colgrid .row .pull_eight.three.columns:first-child, .sixteen.colgrid .row .pull_eight.four.columns:first-child, .sixteen.colgrid .row .pull_eight.five.columns:first-child, .sixteen.colgrid .row .pull_eight.six.columns:first-child, .sixteen.colgrid .row .pull_eight.seven.columns:first-child, .sixteen.colgrid .row .pull_eight.nine.columns:first-child, .sixteen.colgrid .row .pull_eight.ten.columns:first-child, .sixteen.colgrid .row .pull_eight.eleven.columns:first-child, .sixteen.colgrid .row .pull_eight.twelve.columns:first-child, .sixteen.colgrid .row .pull_eight.thirteen.columns:first-child, .sixteen.colgrid .row .pull_eight.fourteen.columns:first-child, .sixteen.colgrid .row .pull_eight.fifteen.columns:first-child, .sixteen.colgrid .row .pull_nine.one.column:first-child, .sixteen.colgrid .row .pull_nine.two.columns:first-child, .sixteen.colgrid .row .pull_nine.three.columns:first-child, .sixteen.colgrid .row .pull_nine.four.columns:first-child, .sixteen.colgrid .row .pull_nine.five.columns:first-child, .sixteen.colgrid .row .pull_nine.six.columns:first-child, .sixteen.colgrid .row .pull_nine.eight.columns:first-child, .sixteen.colgrid .row .pull_nine.nine.columns:first-child, .sixteen.colgrid .row .pull_nine.ten.columns:first-child, .sixteen.colgrid .row .pull_nine.eleven.columns:first-child, .sixteen.colgrid .row .pull_nine.twelve.columns:first-child, .sixteen.colgrid .row .pull_nine.thirteen.columns:first-child, .sixteen.colgrid .row .pull_nine.fourteen.columns:first-child, .sixteen.colgrid .row .pull_nine.fifteen.columns:first-child, .sixteen.colgrid .row .pull_ten.one.column:first-child, .sixteen.colgrid .row .pull_ten.two.columns:first-child, .sixteen.colgrid .row .pull_ten.three.columns:first-child, .sixteen.colgrid .row .pull_ten.four.columns:first-child, .sixteen.colgrid .row .pull_ten.five.columns:first-child, .sixteen.colgrid .row .pull_ten.seven.columns:first-child, .sixteen.colgrid .row .pull_ten.eight.columns:first-child, .sixteen.colgrid .row .pull_ten.nine.columns:first-child, .sixteen.colgrid .row .pull_ten.ten.columns:first-child, .sixteen.colgrid .row .pull_ten.eleven.columns:first-child, .sixteen.colgrid .row .pull_ten.twelve.columns:first-child, .sixteen.colgrid .row .pull_ten.thirteen.columns:first-child, .sixteen.colgrid .row .pull_ten.fourteen.columns:first-child, .sixteen.colgrid .row .pull_ten.fifteen.columns:first-child, .sixteen.colgrid .row .pull_eleven.one.column:first-child, .sixteen.colgrid .row .pull_eleven.two.columns:first-child, .sixteen.colgrid .row .pull_eleven.three.columns:first-child, .sixteen.colgrid .row .pull_eleven.four.columns:first-child, .sixteen.colgrid .row .pull_eleven.six.columns:first-child, .sixteen.colgrid .row .pull_eleven.seven.columns:first-child, .sixteen.colgrid .row .pull_eleven.eight.columns:first-child, .sixteen.colgrid .row .pull_eleven.nine.columns:first-child, .sixteen.colgrid .row .pull_eleven.ten.columns:first-child, .sixteen.colgrid .row .pull_eleven.eleven.columns:first-child, .sixteen.colgrid .row .pull_eleven.twelve.columns:first-child, .sixteen.colgrid .row .pull_eleven.thirteen.columns:first-child, .sixteen.colgrid .row .pull_eleven.fourteen.columns:first-child, .sixteen.colgrid .row .pull_eleven.fifteen.columns:first-child, .sixteen.colgrid .row .pull_twelve.one.column:first-child, .sixteen.colgrid .row .pull_twelve.two.columns:first-child, .sixteen.colgrid .row .pull_twelve.three.columns:first-child, .sixteen.colgrid .row .pull_twelve.five.columns:first-child, .sixteen.colgrid .row .pull_twelve.six.columns:first-child, .sixteen.colgrid .row .pull_twelve.seven.columns:first-child, .sixteen.colgrid .row .pull_twelve.eight.columns:first-child, .sixteen.colgrid .row .pull_twelve.nine.columns:first-child, .sixteen.colgrid .row .pull_twelve.ten.columns:first-child, .sixteen.colgrid .row .pull_twelve.eleven.columns:first-child, .sixteen.colgrid .row .pull_twelve.twelve.columns:first-child, .sixteen.colgrid .row .pull_twelve.thirteen.columns:first-child, .sixteen.colgrid .row .pull_twelve.fourteen.columns:first-child, .sixteen.colgrid .row .pull_twelve.fifteen.columns:first-child, .sixteen.colgrid .row .pull_thirteen.one.column:first-child, .sixteen.colgrid .row .pull_thirteen.two.columns:first-child, .sixteen.colgrid .row .pull_thirteen.four.columns:first-child, .sixteen.colgrid .row .pull_thirteen.five.columns:first-child, .sixteen.colgrid .row .pull_thirteen.six.columns:first-child, .sixteen.colgrid .row .pull_thirteen.seven.columns:first-child, .sixteen.colgrid .row .pull_thirteen.eight.columns:first-child, .sixteen.colgrid .row .pull_thirteen.nine.columns:first-child, .sixteen.colgrid .row .pull_thirteen.ten.columns:first-child, .sixteen.colgrid .row .pull_thirteen.eleven.columns:first-child, .sixteen.colgrid .row .pull_thirteen.twelve.columns:first-child, .sixteen.colgrid .row .pull_thirteen.thirteen.columns:first-child, .sixteen.colgrid .row .pull_thirteen.fourteen.columns:first-child, .sixteen.colgrid .row .pull_thirteen.fifteen.columns:first-child, .sixteen.colgrid .row .pull_fourteen.one.column:first-child, .sixteen.colgrid .row .pull_fourteen.three.columns:first-child, .sixteen.colgrid .row .pull_fourteen.four.columns:first-child, .sixteen.colgrid .row .pull_fourteen.five.columns:first-child, .sixteen.colgrid .row .pull_fourteen.six.columns:first-child, .sixteen.colgrid .row .pull_fourteen.seven.columns:first-child, .sixteen.colgrid .row .pull_fourteen.eight.columns:first-child, .sixteen.colgrid .row .pull_fourteen.nine.columns:first-child, .sixteen.colgrid .row .pull_fourteen.ten.columns:first-child, .sixteen.colgrid .row .pull_fourteen.eleven.columns:first-child, .sixteen.colgrid .row .pull_fourteen.twelve.columns:first-child, .sixteen.colgrid .row .pull_fourteen.thirteen.columns:first-child, .sixteen.colgrid .row .pull_fourteen.fourteen.columns:first-child, .sixteen.colgrid .row .pull_fourteen.fifteen.columns:first-child, .sixteen.colgrid .row .pull_fifteen.two.columns:first-child, .sixteen.colgrid .row .pull_fifteen.three.columns:first-child, .sixteen.colgrid .row .pull_fifteen.four.columns:first-child, .sixteen.colgrid .row .pull_fifteen.five.columns:first-child, .sixteen.colgrid .row .pull_fifteen.six.columns:first-child, .sixteen.colgrid .row .pull_fifteen.seven.columns:first-child, .sixteen.colgrid .row .pull_fifteen.eight.columns:first-child, .sixteen.colgrid .row .pull_fifteen.nine.columns:first-child, .sixteen.colgrid .row .pull_fifteen.ten.columns:first-child, .sixteen.colgrid .row .pull_fifteen.eleven.columns:first-child, .sixteen.colgrid .row .pull_fifteen.twelve.columns:first-child, .sixteen.colgrid .row .pull_fifteen.thirteen.columns:first-child, .sixteen.colgrid .row .pull_fifteen.fourteen.columns:first-child, .sixteen.colgrid .row .pull_fifteen.fifteen.columns:first-child { margin-left: 0; } /*================================================= +++ LE GRID +++ A Responsive Grid -- Gumby defaults to a standard 960 grid, but you can change it to whatever you'd like. ==================================================*/ /*.container { padding: 0 $gutter-in-px; }*/ .row { width: 100%; max-width: 980px; min-width: 320px; margin: 0 auto; padding-left: 20px; padding-right: 20px; } .row .row { min-width: 0; padding-left: 0; padding-right: 0; } /* To fix the grid into a different size, set max-width to your desired width */ .column, .columns { margin-left: 2.12766%; float: left; min-height: 1px; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } .column:first-child, .columns:first-child, .alpha { margin-left: 0; } .column.omega, .columns.omega { float: right; } /* Column Classes */ .row .one.column { width: 6.38298%; } .row .one.columns { width: 6.38298%; } .row .two.columns { width: 14.89362%; } .row .three.columns { width: 23.40426%; } .row .four.columns { width: 31.91489%; } .row .five.columns { width: 40.42553%; } .row .six.columns { width: 48.93617%; } .row .seven.columns { width: 57.44681%; } .row .eight.columns { width: 65.95745%; } .row .nine.columns { width: 74.46809%; } .row .ten.columns { width: 82.97872%; } .row .eleven.columns { width: 91.48936%; } .row .twelve.columns { width: 100%; } /* Push and Pull Classes */ .row .push_one { margin-left: 10.6383%; } .row .push_one:first-child { margin-left: 8.51064%; } .row .pull_one.one.column { margin-left: -14.89362%; } .row .pull_one.two.columns { margin-left: -23.40426%; } .row .pull_one.three.columns { margin-left: -31.91489%; } .row .pull_one.four.columns { margin-left: -40.42553%; } .row .pull_one.five.columns { margin-left: -48.93617%; } .row .pull_one.six.columns { margin-left: -57.44681%; } .row .pull_one.seven.columns { margin-left: -65.95745%; } .row .pull_one.eight.columns { margin-left: -74.46809%; } .row .pull_one.nine.columns { margin-left: -82.97872%; } .row .pull_one.ten.columns { margin-left: -91.48936%; } .row .push_two { margin-left: 19.14894%; } .row .push_two:first-child { margin-left: 17.02128%; } .row .pull_two.one.column { margin-left: -23.40426%; } .row .pull_two.two.columns { margin-left: -31.91489%; } .row .pull_two.three.columns { margin-left: -40.42553%; } .row .pull_two.four.columns { margin-left: -48.93617%; } .row .pull_two.five.columns { margin-left: -57.44681%; } .row .pull_two.six.columns { margin-left: -65.95745%; } .row .pull_two.seven.columns { margin-left: -74.46809%; } .row .pull_two.eight.columns { margin-left: -82.97872%; } .row .pull_two.nine.columns { margin-left: -91.48936%; } .row .pull_two.eleven.columns { margin-left: -108.51064%; } .row .push_three { margin-left: 27.65957%; } .row .push_three:first-child { margin-left: 25.53191%; } .row .pull_three.one.column { margin-left: -31.91489%; } .row .pull_three.two.columns { margin-left: -40.42553%; } .row .pull_three.three.columns { margin-left: -48.93617%; } .row .pull_three.four.columns { margin-left: -57.44681%; } .row .pull_three.five.columns { margin-left: -65.95745%; } .row .pull_three.six.columns { margin-left: -74.46809%; } .row .pull_three.seven.columns { margin-left: -82.97872%; } .row .pull_three.eight.columns { margin-left: -91.48936%; } .row .pull_three.ten.columns { margin-left: -108.51064%; } .row .pull_three.eleven.columns { margin-left: -117.02128%; } .row .push_four { margin-left: 36.17021%; } .row .push_four:first-child { margin-left: 34.04255%; } .row .pull_four.one.column { margin-left: -40.42553%; } .row .pull_four.two.columns { margin-left: -48.93617%; } .row .pull_four.three.columns { margin-left: -57.44681%; } .row .pull_four.four.columns { margin-left: -65.95745%; } .row .pull_four.five.columns { margin-left: -74.46809%; } .row .pull_four.six.columns { margin-left: -82.97872%; } .row .pull_four.seven.columns { margin-left: -91.48936%; } .row .pull_four.nine.columns { margin-left: -108.51064%; } .row .pull_four.ten.columns { margin-left: -117.02128%; } .row .pull_four.eleven.columns { margin-left: -125.53191%; } .row .push_five { margin-left: 44.68085%; } .row .push_five:first-child { margin-left: 42.55319%; } .row .pull_five.one.column { margin-left: -48.93617%; } .row .pull_five.two.columns { margin-left: -57.44681%; } .row .pull_five.three.columns { margin-left: -65.95745%; } .row .pull_five.four.columns { margin-left: -74.46809%; } .row .pull_five.five.columns { margin-left: -82.97872%; } .row .pull_five.six.columns { margin-left: -91.48936%; } .row .pull_five.eight.columns { margin-left: -108.51064%; } .row .pull_five.nine.columns { margin-left: -117.02128%; } .row .pull_five.ten.columns { margin-left: -125.53191%; } .row .pull_five.eleven.columns { margin-left: -134.04255%; } .row .push_six { margin-left: 53.19149%; } .row .push_six:first-child { margin-left: 51.06383%; } .row .pull_six.one.column { margin-left: -57.44681%; } .row .pull_six.two.columns { margin-left: -65.95745%; } .row .pull_six.three.columns { margin-left: -74.46809%; } .row .pull_six.four.columns { margin-left: -82.97872%; } .row .pull_six.five.columns { margin-left: -91.48936%; } .row .pull_six.seven.columns { margin-left: -108.51064%; } .row .pull_six.eight.columns { margin-left: -117.02128%; } .row .pull_six.nine.columns { margin-left: -125.53191%; } .row .pull_six.ten.columns { margin-left: -134.04255%; } .row .pull_six.eleven.columns { margin-left: -142.55319%; } .row .push_seven { margin-left: 61.70213%; } .row .push_seven:first-child { margin-left: 59.57447%; } .row .pull_seven.one.column { margin-left: -65.95745%; } .row .pull_seven.two.columns { margin-left: -74.46809%; } .row .pull_seven.three.columns { margin-left: -82.97872%; } .row .pull_seven.four.columns { margin-left: -91.48936%; } .row .pull_seven.six.columns { margin-left: -108.51064%; } .row .pull_seven.seven.columns { margin-left: -117.02128%; } .row .pull_seven.eight.columns { margin-left: -125.53191%; } .row .pull_seven.nine.columns { margin-left: -134.04255%; } .row .pull_seven.ten.columns { margin-left: -142.55319%; } .row .pull_seven.eleven.columns { margin-left: -151.06383%; } .row .push_eight { margin-left: 70.21277%; } .row .push_eight:first-child { margin-left: 68.08511%; } .row .pull_eight.one.column { margin-left: -74.46809%; } .row .pull_eight.two.columns { margin-left: -82.97872%; } .row .pull_eight.three.columns { margin-left: -91.48936%; } .row .pull_eight.five.columns { margin-left: -108.51064%; } .row .pull_eight.six.columns { margin-left: -117.02128%; } .row .pull_eight.seven.columns { margin-left: -125.53191%; } .row .pull_eight.eight.columns { margin-left: -134.04255%; } .row .pull_eight.nine.columns { margin-left: -142.55319%; } .row .pull_eight.ten.columns { margin-left: -151.06383%; } .row .pull_eight.eleven.columns { margin-left: -159.57447%; } .row .push_nine { margin-left: 78.7234%; } .row .push_nine:first-child { margin-left: 76.59574%; } .row .pull_nine.one.column { margin-left: -82.97872%; } .row .pull_nine.two.columns { margin-left: -91.48936%; } .row .pull_nine.four.columns { margin-left: -108.51064%; } .row .pull_nine.five.columns { margin-left: -117.02128%; } .row .pull_nine.six.columns { margin-left: -125.53191%; } .row .pull_nine.seven.columns { margin-left: -134.04255%; } .row .pull_nine.eight.columns { margin-left: -142.55319%; } .row .pull_nine.nine.columns { margin-left: -151.06383%; } .row .pull_nine.ten.columns { margin-left: -159.57447%; } .row .pull_nine.eleven.columns { margin-left: -168.08511%; } .row .push_ten { margin-left: 87.23404%; } .row .push_ten:first-child { margin-left: 85.10638%; } .row .pull_ten.one.column { margin-left: -91.48936%; } .row .pull_ten.three.columns { margin-left: -108.51064%; } .row .pull_ten.four.columns { margin-left: -117.02128%; } .row .pull_ten.five.columns { margin-left: -125.53191%; } .row .pull_ten.six.columns { margin-left: -134.04255%; } .row .pull_ten.seven.columns { margin-left: -142.55319%; } .row .pull_ten.eight.columns { margin-left: -151.06383%; } .row .pull_ten.nine.columns { margin-left: -159.57447%; } .row .pull_ten.ten.columns { margin-left: -168.08511%; } .row .pull_ten.eleven.columns { margin-left: -176.59574%; } .row .push_eleven { margin-left: 95.74468%; } .row .push_eleven:first-child { margin-left: 93.61702%; } .row .pull_eleven.two.columns { margin-left: -108.51064%; } .row .pull_eleven.three.columns { margin-left: -117.02128%; } .row .pull_eleven.four.columns { margin-left: -125.53191%; } .row .pull_eleven.five.columns { margin-left: -134.04255%; } .row .pull_eleven.six.columns { margin-left: -142.55319%; } .row .pull_eleven.seven.columns { margin-left: -151.06383%; } .row .pull_eleven.eight.columns { margin-left: -159.57447%; } .row .pull_eleven.nine.columns { margin-left: -168.08511%; } .row .pull_eleven.ten.columns { margin-left: -176.59574%; } .row .pull_eleven.eleven.columns { margin-left: -185.10638%; } /* Centered Classes */ .row .one.centered { margin-left: 46.80851%; } .row .two.centered { margin-left: 42.55319%; } .row .three.centered { margin-left: 38.29787%; } .row .four.centered { margin-left: 34.04255%; } .row .five.centered { margin-left: 29.78723%; } .row .six.centered { margin-left: 25.53191%; } .row .seven.centered { margin-left: 21.2766%; } .row .eight.centered { margin-left: 17.02128%; } .row .nine.centered { margin-left: 12.76596%; } .row .ten.centered { margin-left: 8.51064%; } .row .eleven.centered { margin-left: 4.25532%; } /* Hybrid Grid Columns */ .sixteen.colgrid .row .one.column { width: 4.25532%; } .sixteen.colgrid .row .one.columns { width: 4.25532%; } .sixteen.colgrid .row .two.columns { width: 10.6383%; } .sixteen.colgrid .row .three.columns { width: 17.02128%; } .sixteen.colgrid .row .four.columns { width: 23.40426%; } .sixteen.colgrid .row .five.columns { width: 29.78723%; } .sixteen.colgrid .row .six.columns { width: 36.17021%; } .sixteen.colgrid .row .seven.columns { width: 42.55319%; } .sixteen.colgrid .row .eight.columns { width: 48.93617%; } .sixteen.colgrid .row .nine.columns { width: 55.31915%; } .sixteen.colgrid .row .ten.columns { width: 61.70213%; } .sixteen.colgrid .row .eleven.columns { width: 68.08511%; } .sixteen.colgrid .row .twelve.columns { width: 74.46809%; } .sixteen.colgrid .row .thirteen.columns { width: 80.85106%; } .sixteen.colgrid .row .fourteen.columns { width: 87.23404%; } .sixteen.colgrid .row .fifteen.columns { width: 93.61702%; } .sixteen.colgrid .row .sixteen.columns { width: 100%; } /* Hybrid Push and Pull Classes */ .sixteen.colgrid .row .push_one { margin-left: 8.51064%; } .sixteen.colgrid .row .push_one:first-child { margin-left: 6.38298%; } .sixteen.colgrid .row .pull_one.one.column { margin-left: -10.6383%; } .sixteen.colgrid .row .pull_one.two.columns { margin-left: -17.02128%; } .sixteen.colgrid .row .pull_one.three.columns { margin-left: -23.40426%; } .sixteen.colgrid .row .pull_one.four.columns { margin-left: -29.78723%; } .sixteen.colgrid .row .pull_one.five.columns { margin-left: -36.17021%; } .sixteen.colgrid .row .pull_one.six.columns { margin-left: -42.55319%; } .sixteen.colgrid .row .pull_one.seven.columns { margin-left: -48.93617%; } .sixteen.colgrid .row .pull_one.eight.columns { margin-left: -55.31915%; } .sixteen.colgrid .row .pull_one.nine.columns { margin-left: -61.70213%; } .sixteen.colgrid .row .pull_one.ten.columns { margin-left: -68.08511%; } .sixteen.colgrid .row .pull_one.eleven.columns { margin-left: -74.46809%; } .sixteen.colgrid .row .pull_one.twelve.columns { margin-left: -80.85106%; } .sixteen.colgrid .row .pull_one.thirteen.columns { margin-left: -87.23404%; } .sixteen.colgrid .row .pull_one.fourteen.columns { margin-left: -93.61702%; } .sixteen.colgrid .row .push_two { margin-left: 14.89362%; } .sixteen.colgrid .row .push_two:first-child { margin-left: 12.76596%; } .sixteen.colgrid .row .pull_two.one.column { margin-left: -17.02128%; } .sixteen.colgrid .row .pull_two.two.columns { margin-left: -23.40426%; } .sixteen.colgrid .row .pull_two.three.columns { margin-left: -29.78723%; } .sixteen.colgrid .row .pull_two.four.columns { margin-left: -36.17021%; } .sixteen.colgrid .row .pull_two.five.columns { margin-left: -42.55319%; } .sixteen.colgrid .row .pull_two.six.columns { margin-left: -48.93617%; } .sixteen.colgrid .row .pull_two.seven.columns { margin-left: -55.31915%; } .sixteen.colgrid .row .pull_two.eight.columns { margin-left: -61.70213%; } .sixteen.colgrid .row .pull_two.nine.columns { margin-left: -68.08511%; } .sixteen.colgrid .row .pull_two.ten.columns { margin-left: -74.46809%; } .sixteen.colgrid .row .pull_two.eleven.columns { margin-left: -80.85106%; } .sixteen.colgrid .row .pull_two.twelve.columns { margin-left: -87.23404%; } .sixteen.colgrid .row .pull_two.thirteen.columns { margin-left: -93.61702%; } .sixteen.colgrid .row .pull_two.fifteen.columns { margin-left: -106.38298%; } .sixteen.colgrid .row .push_three { margin-left: 21.2766%; } .sixteen.colgrid .row .push_three:first-child { margin-left: 19.14894%; } .sixteen.colgrid .row .pull_three.one.column { margin-left: -23.40426%; } .sixteen.colgrid .row .pull_three.two.columns { margin-left: -29.78723%; } .sixteen.colgrid .row .pull_three.three.columns { margin-left: -36.17021%; } .sixteen.colgrid .row .pull_three.four.columns { margin-left: -42.55319%; } .sixteen.colgrid .row .pull_three.five.columns { margin-left: -48.93617%; } .sixteen.colgrid .row .pull_three.six.columns { margin-left: -55.31915%; } .sixteen.colgrid .row .pull_three.seven.columns { margin-left: -61.70213%; } .sixteen.colgrid .row .pull_three.eight.columns { margin-left: -68.08511%; } .sixteen.colgrid .row .pull_three.nine.columns { margin-left: -74.46809%; } .sixteen.colgrid .row .pull_three.ten.columns { margin-left: -80.85106%; } .sixteen.colgrid .row .pull_three.eleven.columns { margin-left: -87.23404%; } .sixteen.colgrid .row .pull_three.twelve.columns { margin-left: -93.61702%; } .sixteen.colgrid .row .pull_three.fourteen.columns { margin-left: -106.38298%; } .sixteen.colgrid .row .pull_three.fifteen.columns { margin-left: -112.76596%; } .sixteen.colgrid .row .push_four { margin-left: 27.65957%; } .sixteen.colgrid .row .push_four:first-child { margin-left: 25.53191%; } .sixteen.colgrid .row .pull_four.one.column { margin-left: -29.78723%; } .sixteen.colgrid .row .pull_four.two.columns { margin-left: -36.17021%; } .sixteen.colgrid .row .pull_four.three.columns { margin-left: -42.55319%; } .sixteen.colgrid .row .pull_four.four.columns { margin-left: -48.93617%; } .sixteen.colgrid .row .pull_four.five.columns { margin-left: -55.31915%; } .sixteen.colgrid .row .pull_four.six.columns { margin-left: -61.70213%; } .sixteen.colgrid .row .pull_four.seven.columns { margin-left: -68.08511%; } .sixteen.colgrid .row .pull_four.eight.columns { margin-left: -74.46809%; } .sixteen.colgrid .row .pull_four.nine.columns { margin-left: -80.85106%; } .sixteen.colgrid .row .pull_four.ten.columns { margin-left: -87.23404%; } .sixteen.colgrid .row .pull_four.eleven.columns { margin-left: -93.61702%; } .sixteen.colgrid .row .pull_four.thirteen.columns { margin-left: -106.38298%; } .sixteen.colgrid .row .pull_four.fourteen.columns { margin-left: -112.76596%; } .sixteen.colgrid .row .pull_four.fifteen.columns { margin-left: -119.14894%; } .sixteen.colgrid .row .push_five { margin-left: 34.04255%; } .sixteen.colgrid .row .push_five:first-child { margin-left: 31.91489%; } .sixteen.colgrid .row .pull_five.one.column { margin-left: -36.17021%; } .sixteen.colgrid .row .pull_five.two.columns { margin-left: -42.55319%; } .sixteen.colgrid .row .pull_five.three.columns { margin-left: -48.93617%; } .sixteen.colgrid .row .pull_five.four.columns { margin-left: -55.31915%; } .sixteen.colgrid .row .pull_five.five.columns { margin-left: -61.70213%; } .sixteen.colgrid .row .pull_five.six.columns { margin-left: -68.08511%; } .sixteen.colgrid .row .pull_five.seven.columns { margin-left: -74.46809%; } .sixteen.colgrid .row .pull_five.eight.columns { margin-left: -80.85106%; } .sixteen.colgrid .row .pull_five.nine.columns { margin-left: -87.23404%; } .sixteen.colgrid .row .pull_five.ten.columns { margin-left: -93.61702%; } .sixteen.colgrid .row .pull_five.twelve.columns { margin-left: -106.38298%; } .sixteen.colgrid .row .pull_five.thirteen.columns { margin-left: -112.76596%; } .sixteen.colgrid .row .pull_five.fourteen.columns { margin-left: -119.14894%; } .sixteen.colgrid .row .pull_five.fifteen.columns { margin-left: -125.53191%; } .sixteen.colgrid .row .push_six { margin-left: 40.42553%; } .sixteen.colgrid .row .push_six:first-child { margin-left: 38.29787%; } .sixteen.colgrid .row .pull_six.one.column { margin-left: -42.55319%; } .sixteen.colgrid .row .pull_six.two.columns { margin-left: -48.93617%; } .sixteen.colgrid .row .pull_six.three.columns { margin-left: -55.31915%; } .sixteen.colgrid .row .pull_six.four.columns { margin-left: -61.70213%; } .sixteen.colgrid .row .pull_six.five.columns { margin-left: -68.08511%; } .sixteen.colgrid .row .pull_six.six.columns { margin-left: -74.46809%; } .sixteen.colgrid .row .pull_six.seven.columns { margin-left: -80.85106%; } .sixteen.colgrid .row .pull_six.eight.columns { margin-left: -87.23404%; } .sixteen.colgrid .row .pull_six.nine.columns { margin-left: -93.61702%; } .sixteen.colgrid .row .pull_six.eleven.columns { margin-left: -106.38298%; } .sixteen.colgrid .row .pull_six.twelve.columns { margin-left: -112.76596%; } .sixteen.colgrid .row .pull_six.thirteen.columns { margin-left: -119.14894%; } .sixteen.colgrid .row .pull_six.fourteen.columns { margin-left: -125.53191%; } .sixteen.colgrid .row .pull_six.fifteen.columns { margin-left: -131.91489%; } .sixteen.colgrid .row .push_seven { margin-left: 46.80851%; } .sixteen.colgrid .row .push_seven:first-child { margin-left: 44.68085%; } .sixteen.colgrid .row .pull_seven.one.column { margin-left: -48.93617%; } .sixteen.colgrid .row .pull_seven.two.columns { margin-left: -55.31915%; } .sixteen.colgrid .row .pull_seven.three.columns { margin-left: -61.70213%; } .sixteen.colgrid .row .pull_seven.four.columns { margin-left: -68.08511%; } .sixteen.colgrid .row .pull_seven.five.columns { margin-left: -74.46809%; } .sixteen.colgrid .row .pull_seven.six.columns { margin-left: -80.85106%; } .sixteen.colgrid .row .pull_seven.seven.columns { margin-left: -87.23404%; } .sixteen.colgrid .row .pull_seven.eight.columns { margin-left: -93.61702%; } .sixteen.colgrid .row .pull_seven.ten.columns { margin-left: -106.38298%; } .sixteen.colgrid .row .pull_seven.eleven.columns { margin-left: -112.76596%; } .sixteen.colgrid .row .pull_seven.twelve.columns { margin-left: -119.14894%; } .sixteen.colgrid .row .pull_seven.thirteen.columns { margin-left: -125.53191%; } .sixteen.colgrid .row .pull_seven.fourteen.columns { margin-left: -131.91489%; } .sixteen.colgrid .row .pull_seven.fifteen.columns { margin-left: -138.29787%; } .sixteen.colgrid .row .push_eight { margin-left: 53.19149%; } .sixteen.colgrid .row .push_eight:first-child { margin-left: 51.06383%; } .sixteen.colgrid .row .pull_eight.one.column { margin-left: -55.31915%; } .sixteen.colgrid .row .pull_eight.two.columns { margin-left: -61.70213%; } .sixteen.colgrid .row .pull_eight.three.columns { margin-left: -68.08511%; } .sixteen.colgrid .row .pull_eight.four.columns { margin-left: -74.46809%; } .sixteen.colgrid .row .pull_eight.five.columns { margin-left: -80.85106%; } .sixteen.colgrid .row .pull_eight.six.columns { margin-left: -87.23404%; } .sixteen.colgrid .row .pull_eight.seven.columns { margin-left: -93.61702%; } .sixteen.colgrid .row .pull_eight.nine.columns { margin-left: -106.38298%; } .sixteen.colgrid .row .pull_eight.ten.columns { margin-left: -112.76596%; } .sixteen.colgrid .row .pull_eight.eleven.columns { margin-left: -119.14894%; } .sixteen.colgrid .row .pull_eight.twelve.columns { margin-left: -125.53191%; } .sixteen.colgrid .row .pull_eight.thirteen.columns { margin-left: -131.91489%; } .sixteen.colgrid .row .pull_eight.fourteen.columns { margin-left: -138.29787%; } .sixteen.colgrid .row .pull_eight.fifteen.columns { margin-left: -144.68085%; } .sixteen.colgrid .row .push_nine { margin-left: 59.57447%; } .sixteen.colgrid .row .push_nine:first-child { margin-left: 57.44681%; } .sixteen.colgrid .row .pull_nine.one.column { margin-left: -61.70213%; } .sixteen.colgrid .row .pull_nine.two.columns { margin-left: -68.08511%; } .sixteen.colgrid .row .pull_nine.three.columns { margin-left: -74.46809%; } .sixteen.colgrid .row .pull_nine.four.columns { margin-left: -80.85106%; } .sixteen.colgrid .row .pull_nine.five.columns { margin-left: -87.23404%; } .sixteen.colgrid .row .pull_nine.six.columns { margin-left: -93.61702%; } .sixteen.colgrid .row .pull_nine.eight.columns { margin-left: -106.38298%; } .sixteen.colgrid .row .pull_nine.nine.columns { margin-left: -112.76596%; } .sixteen.colgrid .row .pull_nine.ten.columns { margin-left: -119.14894%; } .sixteen.colgrid .row .pull_nine.eleven.columns { margin-left: -125.53191%; } .sixteen.colgrid .row .pull_nine.twelve.columns { margin-left: -131.91489%; } .sixteen.colgrid .row .pull_nine.thirteen.columns { margin-left: -138.29787%; } .sixteen.colgrid .row .pull_nine.fourteen.columns { margin-left: -144.68085%; } .sixteen.colgrid .row .pull_nine.fifteen.columns { margin-left: -151.06383%; } .sixteen.colgrid .row .push_ten { margin-left: 65.95745%; } .sixteen.colgrid .row .push_ten:first-child { margin-left: 63.82979%; } .sixteen.colgrid .row .pull_ten.one.column { margin-left: -68.08511%; } .sixteen.colgrid .row .pull_ten.two.columns { margin-left: -74.46809%; } .sixteen.colgrid .row .pull_ten.three.columns { margin-left: -80.85106%; } .sixteen.colgrid .row .pull_ten.four.columns { margin-left: -87.23404%; } .sixteen.colgrid .row .pull_ten.five.columns { margin-left: -93.61702%; } .sixteen.colgrid .row .pull_ten.seven.columns { margin-left: -106.38298%; } .sixteen.colgrid .row .pull_ten.eight.columns { margin-left: -112.76596%; } .sixteen.colgrid .row .pull_ten.nine.columns { margin-left: -119.14894%; } .sixteen.colgrid .row .pull_ten.ten.columns { margin-left: -125.53191%; } .sixteen.colgrid .row .pull_ten.eleven.columns { margin-left: -131.91489%; } .sixteen.colgrid .row .pull_ten.twelve.columns { margin-left: -138.29787%; } .sixteen.colgrid .row .pull_ten.thirteen.columns { margin-left: -144.68085%; } .sixteen.colgrid .row .pull_ten.fourteen.columns { margin-left: -151.06383%; } .sixteen.colgrid .row .pull_ten.fifteen.columns { margin-left: -157.44681%; } .sixteen.colgrid .row .push_eleven { margin-left: 72.34043%; } .sixteen.colgrid .row .push_eleven:first-child { margin-left: 70.21277%; } .sixteen.colgrid .row .pull_eleven.one.column { margin-left: -74.46809%; } .sixteen.colgrid .row .pull_eleven.two.columns { margin-left: -80.85106%; } .sixteen.colgrid .row .pull_eleven.three.columns { margin-left: -87.23404%; } .sixteen.colgrid .row .pull_eleven.four.columns { margin-left: -93.61702%; } .sixteen.colgrid .row .pull_eleven.six.columns { margin-left: -106.38298%; } .sixteen.colgrid .row .pull_eleven.seven.columns { margin-left: -112.76596%; } .sixteen.colgrid .row .pull_eleven.eight.columns { margin-left: -119.14894%; } .sixteen.colgrid .row .pull_eleven.nine.columns { margin-left: -125.53191%; } .sixteen.colgrid .row .pull_eleven.ten.columns { margin-left: -131.91489%; } .sixteen.colgrid .row .pull_eleven.eleven.columns { margin-left: -138.29787%; } .sixteen.colgrid .row .pull_eleven.twelve.columns { margin-left: -144.68085%; } .sixteen.colgrid .row .pull_eleven.thirteen.columns { margin-left: -151.06383%; } .sixteen.colgrid .row .pull_eleven.fourteen.columns { margin-left: -157.44681%; } .sixteen.colgrid .row .pull_eleven.fifteen.columns { margin-left: -163.82979%; } .sixteen.colgrid .row .push_twelve { margin-left: 78.7234%; } .sixteen.colgrid .row .push_twelve:first-child { margin-left: 76.59574%; } .sixteen.colgrid .row .pull_twelve.one.column { margin-left: -80.85106%; } .sixteen.colgrid .row .pull_twelve.two.columns { margin-left: -87.23404%; } .sixteen.colgrid .row .pull_twelve.three.columns { margin-left: -93.61702%; } .sixteen.colgrid .row .pull_twelve.five.columns { margin-left: -106.38298%; } .sixteen.colgrid .row .pull_twelve.six.columns { margin-left: -112.76596%; } .sixteen.colgrid .row .pull_twelve.seven.columns { margin-left: -119.14894%; } .sixteen.colgrid .row .pull_twelve.eight.columns { margin-left: -125.53191%; } .sixteen.colgrid .row .pull_twelve.nine.columns { margin-left: -131.91489%; } .sixteen.colgrid .row .pull_twelve.ten.columns { margin-left: -138.29787%; } .sixteen.colgrid .row .pull_twelve.eleven.columns { margin-left: -144.68085%; } .sixteen.colgrid .row .pull_twelve.twelve.columns { margin-left: -151.06383%; } .sixteen.colgrid .row .pull_twelve.thirteen.columns { margin-left: -157.44681%; } .sixteen.colgrid .row .pull_twelve.fourteen.columns { margin-left: -163.82979%; } .sixteen.colgrid .row .pull_twelve.fifteen.columns { margin-left: -170.21277%; } .sixteen.colgrid .row .push_thirteen { margin-left: 85.10638%; } .sixteen.colgrid .row .push_thirteen:first-child { margin-left: 82.97872%; } .sixteen.colgrid .row .pull_thirteen.one.column { margin-left: -87.23404%; } .sixteen.colgrid .row .pull_thirteen.two.columns { margin-left: -93.61702%; } .sixteen.colgrid .row .pull_thirteen.four.columns { margin-left: -106.38298%; } .sixteen.colgrid .row .pull_thirteen.five.columns { margin-left: -112.76596%; } .sixteen.colgrid .row .pull_thirteen.six.columns { margin-left: -119.14894%; } .sixteen.colgrid .row .pull_thirteen.seven.columns { margin-left: -125.53191%; } .sixteen.colgrid .row .pull_thirteen.eight.columns { margin-left: -131.91489%; } .sixteen.colgrid .row .pull_thirteen.nine.columns { margin-left: -138.29787%; } .sixteen.colgrid .row .pull_thirteen.ten.columns { margin-left: -144.68085%; } .sixteen.colgrid .row .pull_thirteen.eleven.columns { margin-left: -151.06383%; } .sixteen.colgrid .row .pull_thirteen.twelve.columns { margin-left: -157.44681%; } .sixteen.colgrid .row .pull_thirteen.thirteen.columns { margin-left: -163.82979%; } .sixteen.colgrid .row .pull_thirteen.fourteen.columns { margin-left: -170.21277%; } .sixteen.colgrid .row .pull_thirteen.fifteen.columns { margin-left: -176.59574%; } .sixteen.colgrid .row .push_fourteen { margin-left: 91.48936%; } .sixteen.colgrid .row .push_fourteen:first-child { margin-left: 89.3617%; } .sixteen.colgrid .row .pull_fourteen.one.column { margin-left: -93.61702%; } .sixteen.colgrid .row .pull_fourteen.three.columns { margin-left: -106.38298%; } .sixteen.colgrid .row .pull_fourteen.four.columns { margin-left: -112.76596%; } .sixteen.colgrid .row .pull_fourteen.five.columns { margin-left: -119.14894%; } .sixteen.colgrid .row .pull_fourteen.six.columns { margin-left: -125.53191%; } .sixteen.colgrid .row .pull_fourteen.seven.columns { margin-left: -131.91489%; } .sixteen.colgrid .row .pull_fourteen.eight.columns { margin-left: -138.29787%; } .sixteen.colgrid .row .pull_fourteen.nine.columns { margin-left: -144.68085%; } .sixteen.colgrid .row .pull_fourteen.ten.columns { margin-left: -151.06383%; } .sixteen.colgrid .row .pull_fourteen.eleven.columns { margin-left: -157.44681%; } .sixteen.colgrid .row .pull_fourteen.twelve.columns { margin-left: -163.82979%; } .sixteen.colgrid .row .pull_fourteen.thirteen.columns { margin-left: -170.21277%; } .sixteen.colgrid .row .pull_fourteen.fourteen.columns { margin-left: -176.59574%; } .sixteen.colgrid .row .pull_fourteen.fifteen.columns { margin-left: -182.97872%; } .sixteen.colgrid .row .push_fifteen { margin-left: 97.87234%; } .sixteen.colgrid .row .push_fifteen:first-child { margin-left: 95.74468%; } .sixteen.colgrid .row .pull_fifteen.two.columns { margin-left: -106.38298%; } .sixteen.colgrid .row .pull_fifteen.three.columns { margin-left: -112.76596%; } .sixteen.colgrid .row .pull_fifteen.four.columns { margin-left: -119.14894%; } .sixteen.colgrid .row .pull_fifteen.five.columns { margin-left: -125.53191%; } .sixteen.colgrid .row .pull_fifteen.six.columns { margin-left: -131.91489%; } .sixteen.colgrid .row .pull_fifteen.seven.columns { margin-left: -138.29787%; } .sixteen.colgrid .row .pull_fifteen.eight.columns { margin-left: -144.68085%; } .sixteen.colgrid .row .pull_fifteen.nine.columns { margin-left: -151.06383%; } .sixteen.colgrid .row .pull_fifteen.ten.columns { margin-left: -157.44681%; } .sixteen.colgrid .row .pull_fifteen.eleven.columns { margin-left: -163.82979%; } .sixteen.colgrid .row .pull_fifteen.twelve.columns { margin-left: -170.21277%; } .sixteen.colgrid .row .pull_fifteen.thirteen.columns { margin-left: -176.59574%; } .sixteen.colgrid .row .pull_fifteen.fourteen.columns { margin-left: -182.97872%; } .sixteen.colgrid .row .pull_fifteen.fifteen.columns { margin-left: -189.3617%; } .row .pull_one.one.column:first-child, .row .pull_one.two.columns:first-child, .row .pull_one.three.columns:first-child, .row .pull_one.four.columns:first-child, .row .pull_one.five.columns:first-child, .row .pull_one.six.columns:first-child, .row .pull_one.seven.columns:first-child, .row .pull_one.eight.columns:first-child, .row .pull_one.nine.columns:first-child, .row .pull_one.ten.columns:first-child, .row .pull_two.one.column:first-child, .row .pull_two.two.columns:first-child, .row .pull_two.three.columns:first-child, .row .pull_two.four.columns:first-child, .row .pull_two.five.columns:first-child, .row .pull_two.six.columns:first-child, .row .pull_two.seven.columns:first-child, .row .pull_two.eight.columns:first-child, .row .pull_two.nine.columns:first-child, .row .pull_two.eleven.columns:first-child, .row .pull_three.one.column:first-child, .row .pull_three.two.columns:first-child, .row .pull_three.three.columns:first-child, .row .pull_three.four.columns:first-child, .row .pull_three.five.columns:first-child, .row .pull_three.six.columns:first-child, .row .pull_three.seven.columns:first-child, .row .pull_three.eight.columns:first-child, .row .pull_three.ten.columns:first-child, .row .pull_three.eleven.columns:first-child, .row .pull_four.one.column:first-child, .row .pull_four.two.columns:first-child, .row .pull_four.three.columns:first-child, .row .pull_four.four.columns:first-child, .row .pull_four.five.columns:first-child, .row .pull_four.six.columns:first-child, .row .pull_four.seven.columns:first-child, .row .pull_four.nine.columns:first-child, .row .pull_four.ten.columns:first-child, .row .pull_four.eleven.columns:first-child, .row .pull_five.one.column:first-child, .row .pull_five.two.columns:first-child, .row .pull_five.three.columns:first-child, .row .pull_five.four.columns:first-child, .row .pull_five.five.columns:first-child, .row .pull_five.six.columns:first-child, .row .pull_five.eight.columns:first-child, .row .pull_five.nine.columns:first-child, .row .pull_five.ten.columns:first-child, .row .pull_five.eleven.columns:first-child, .row .pull_six.one.column:first-child, .row .pull_six.two.columns:first-child, .row .pull_six.three.columns:first-child, .row .pull_six.four.columns:first-child, .row .pull_six.five.columns:first-child, .row .pull_six.seven.columns:first-child, .row .pull_six.eight.columns:first-child, .row .pull_six.nine.columns:first-child, .row .pull_six.ten.columns:first-child, .row .pull_six.eleven.columns:first-child, .row .pull_seven.one.column:first-child, .row .pull_seven.two.columns:first-child, .row .pull_seven.three.columns:first-child, .row .pull_seven.four.columns:first-child, .row .pull_seven.six.columns:first-child, .row .pull_seven.seven.columns:first-child, .row .pull_seven.eight.columns:first-child, .row .pull_seven.nine.columns:first-child, .row .pull_seven.ten.columns:first-child, .row .pull_seven.eleven.columns:first-child, .row .pull_eight.one.column:first-child, .row .pull_eight.two.columns:first-child, .row .pull_eight.three.columns:first-child, .row .pull_eight.five.columns:first-child, .row .pull_eight.six.columns:first-child, .row .pull_eight.seven.columns:first-child, .row .pull_eight.eight.columns:first-child, .row .pull_eight.nine.columns:first-child, .row .pull_eight.ten.columns:first-child, .row .pull_eight.eleven.columns:first-child, .row .pull_nine.one.column:first-child, .row .pull_nine.two.columns:first-child, .row .pull_nine.four.columns:first-child, .row .pull_nine.five.columns:first-child, .row .pull_nine.six.columns:first-child, .row .pull_nine.seven.columns:first-child, .row .pull_nine.eight.columns:first-child, .row .pull_nine.nine.columns:first-child, .row .pull_nine.ten.columns:first-child, .row .pull_nine.eleven.columns:first-child, .row .pull_ten.one.column:first-child, .row .pull_ten.three.columns:first-child, .row .pull_ten.four.columns:first-child, .row .pull_ten.five.columns:first-child, .row .pull_ten.six.columns:first-child, .row .pull_ten.seven.columns:first-child, .row .pull_ten.eight.columns:first-child, .row .pull_ten.nine.columns:first-child, .row .pull_ten.ten.columns:first-child, .row .pull_ten.eleven.columns:first-child, .row .pull_eleven.two.columns:first-child, .row .pull_eleven.three.columns:first-child, .row .pull_eleven.four.columns:first-child, .row .pull_eleven.five.columns:first-child, .row .pull_eleven.six.columns:first-child, .row .pull_eleven.seven.columns:first-child, .row .pull_eleven.eight.columns:first-child, .row .pull_eleven.nine.columns:first-child, .row .pull_eleven.ten.columns:first-child, .row .pull_eleven.eleven.columns:first-child, .sixteen.colgrid .row .pull_one.one.column:first-child, .sixteen.colgrid .row .pull_one.two.columns:first-child, .sixteen.colgrid .row .pull_one.three.columns:first-child, .sixteen.colgrid .row .pull_one.four.columns:first-child, .sixteen.colgrid .row .pull_one.five.columns:first-child, .sixteen.colgrid .row .pull_one.six.columns:first-child, .sixteen.colgrid .row .pull_one.seven.columns:first-child, .sixteen.colgrid .row .pull_one.eight.columns:first-child, .sixteen.colgrid .row .pull_one.nine.columns:first-child, .sixteen.colgrid .row .pull_one.ten.columns:first-child, .sixteen.colgrid .row .pull_one.eleven.columns:first-child, .sixteen.colgrid .row .pull_one.twelve.columns:first-child, .sixteen.colgrid .row .pull_one.thirteen.columns:first-child, .sixteen.colgrid .row .pull_one.fourteen.columns:first-child, .sixteen.colgrid .row .pull_two.one.column:first-child, .sixteen.colgrid .row .pull_two.two.columns:first-child, .sixteen.colgrid .row .pull_two.three.columns:first-child, .sixteen.colgrid .row .pull_two.four.columns:first-child, .sixteen.colgrid .row .pull_two.five.columns:first-child, .sixteen.colgrid .row .pull_two.six.columns:first-child, .sixteen.colgrid .row .pull_two.seven.columns:first-child, .sixteen.colgrid .row .pull_two.eight.columns:first-child, .sixteen.colgrid .row .pull_two.nine.columns:first-child, .sixteen.colgrid .row .pull_two.ten.columns:first-child, .sixteen.colgrid .row .pull_two.eleven.columns:first-child, .sixteen.colgrid .row .pull_two.twelve.columns:first-child, .sixteen.colgrid .row .pull_two.thirteen.columns:first-child, .sixteen.colgrid .row .pull_two.fifteen.columns:first-child, .sixteen.colgrid .row .pull_three.one.column:first-child, .sixteen.colgrid .row .pull_three.two.columns:first-child, .sixteen.colgrid .row .pull_three.three.columns:first-child, .sixteen.colgrid .row .pull_three.four.columns:first-child, .sixteen.colgrid .row .pull_three.five.columns:first-child, .sixteen.colgrid .row .pull_three.six.columns:first-child, .sixteen.colgrid .row .pull_three.seven.columns:first-child, .sixteen.colgrid .row .pull_three.eight.columns:first-child, .sixteen.colgrid .row .pull_three.nine.columns:first-child, .sixteen.colgrid .row .pull_three.ten.columns:first-child, .sixteen.colgrid .row .pull_three.eleven.columns:first-child, .sixteen.colgrid .row .pull_three.twelve.columns:first-child, .sixteen.colgrid .row .pull_three.fourteen.columns:first-child, .sixteen.colgrid .row .pull_three.fifteen.columns:first-child, .sixteen.colgrid .row .pull_four.one.column:first-child, .sixteen.colgrid .row .pull_four.two.columns:first-child, .sixteen.colgrid .row .pull_four.three.columns:first-child, .sixteen.colgrid .row .pull_four.four.columns:first-child, .sixteen.colgrid .row .pull_four.five.columns:first-child, .sixteen.colgrid .row .pull_four.six.columns:first-child, .sixteen.colgrid .row .pull_four.seven.columns:first-child, .sixteen.colgrid .row .pull_four.eight.columns:first-child, .sixteen.colgrid .row .pull_four.nine.columns:first-child, .sixteen.colgrid .row .pull_four.ten.columns:first-child, .sixteen.colgrid .row .pull_four.eleven.columns:first-child, .sixteen.colgrid .row .pull_four.thirteen.columns:first-child, .sixteen.colgrid .row .pull_four.fourteen.columns:first-child, .sixteen.colgrid .row .pull_four.fifteen.columns:first-child, .sixteen.colgrid .row .pull_five.one.column:first-child, .sixteen.colgrid .row .pull_five.two.columns:first-child, .sixteen.colgrid .row .pull_five.three.columns:first-child, .sixteen.colgrid .row .pull_five.four.columns:first-child, .sixteen.colgrid .row .pull_five.five.columns:first-child, .sixteen.colgrid .row .pull_five.six.columns:first-child, .sixteen.colgrid .row .pull_five.seven.columns:first-child, .sixteen.colgrid .row .pull_five.eight.columns:first-child, .sixteen.colgrid .row .pull_five.nine.columns:first-child, .sixteen.colgrid .row .pull_five.ten.columns:first-child, .sixteen.colgrid .row .pull_five.twelve.columns:first-child, .sixteen.colgrid .row .pull_five.thirteen.columns:first-child, .sixteen.colgrid .row .pull_five.fourteen.columns:first-child, .sixteen.colgrid .row .pull_five.fifteen.columns:first-child, .sixteen.colgrid .row .pull_six.one.column:first-child, .sixteen.colgrid .row .pull_six.two.columns:first-child, .sixteen.colgrid .row .pull_six.three.columns:first-child, .sixteen.colgrid .row .pull_six.four.columns:first-child, .sixteen.colgrid .row .pull_six.five.columns:first-child, .sixteen.colgrid .row .pull_six.six.columns:first-child, .sixteen.colgrid .row .pull_six.seven.columns:first-child, .sixteen.colgrid .row .pull_six.eight.columns:first-child, .sixteen.colgrid .row .pull_six.nine.columns:first-child, .sixteen.colgrid .row .pull_six.eleven.columns:first-child, .sixteen.colgrid .row .pull_six.twelve.columns:first-child, .sixteen.colgrid .row .pull_six.thirteen.columns:first-child, .sixteen.colgrid .row .pull_six.fourteen.columns:first-child, .sixteen.colgrid .row .pull_six.fifteen.columns:first-child, .sixteen.colgrid .row .pull_seven.one.column:first-child, .sixteen.colgrid .row .pull_seven.two.columns:first-child, .sixteen.colgrid .row .pull_seven.three.columns:first-child, .sixteen.colgrid .row .pull_seven.four.columns:first-child, .sixteen.colgrid .row .pull_seven.five.columns:first-child, .sixteen.colgrid .row .pull_seven.six.columns:first-child, .sixteen.colgrid .row .pull_seven.seven.columns:first-child, .sixteen.colgrid .row .pull_seven.eight.columns:first-child, .sixteen.colgrid .row .pull_seven.ten.columns:first-child, .sixteen.colgrid .row .pull_seven.eleven.columns:first-child, .sixteen.colgrid .row .pull_seven.twelve.columns:first-child, .sixteen.colgrid .row .pull_seven.thirteen.columns:first-child, .sixteen.colgrid .row .pull_seven.fourteen.columns:first-child, .sixteen.colgrid .row .pull_seven.fifteen.columns:first-child, .sixteen.colgrid .row .pull_eight.one.column:first-child, .sixteen.colgrid .row .pull_eight.two.columns:first-child, .sixteen.colgrid .row .pull_eight.three.columns:first-child, .sixteen.colgrid .row .pull_eight.four.columns:first-child, .sixteen.colgrid .row .pull_eight.five.columns:first-child, .sixteen.colgrid .row .pull_eight.six.columns:first-child, .sixteen.colgrid .row .pull_eight.seven.columns:first-child, .sixteen.colgrid .row .pull_eight.nine.columns:first-child, .sixteen.colgrid .row .pull_eight.ten.columns:first-child, .sixteen.colgrid .row .pull_eight.eleven.columns:first-child, .sixteen.colgrid .row .pull_eight.twelve.columns:first-child, .sixteen.colgrid .row .pull_eight.thirteen.columns:first-child, .sixteen.colgrid .row .pull_eight.fourteen.columns:first-child, .sixteen.colgrid .row .pull_eight.fifteen.columns:first-child, .sixteen.colgrid .row .pull_nine.one.column:first-child, .sixteen.colgrid .row .pull_nine.two.columns:first-child, .sixteen.colgrid .row .pull_nine.three.columns:first-child, .sixteen.colgrid .row .pull_nine.four.columns:first-child, .sixteen.colgrid .row .pull_nine.five.columns:first-child, .sixteen.colgrid .row .pull_nine.six.columns:first-child, .sixteen.colgrid .row .pull_nine.eight.columns:first-child, .sixteen.colgrid .row .pull_nine.nine.columns:first-child, .sixteen.colgrid .row .pull_nine.ten.columns:first-child, .sixteen.colgrid .row .pull_nine.eleven.columns:first-child, .sixteen.colgrid .row .pull_nine.twelve.columns:first-child, .sixteen.colgrid .row .pull_nine.thirteen.columns:first-child, .sixteen.colgrid .row .pull_nine.fourteen.columns:first-child, .sixteen.colgrid .row .pull_nine.fifteen.columns:first-child, .sixteen.colgrid .row .pull_ten.one.column:first-child, .sixteen.colgrid .row .pull_ten.two.columns:first-child, .sixteen.colgrid .row .pull_ten.three.columns:first-child, .sixteen.colgrid .row .pull_ten.four.columns:first-child, .sixteen.colgrid .row .pull_ten.five.columns:first-child, .sixteen.colgrid .row .pull_ten.seven.columns:first-child, .sixteen.colgrid .row .pull_ten.eight.columns:first-child, .sixteen.colgrid .row .pull_ten.nine.columns:first-child, .sixteen.colgrid .row .pull_ten.ten.columns:first-child, .sixteen.colgrid .row .pull_ten.eleven.columns:first-child, .sixteen.colgrid .row .pull_ten.twelve.columns:first-child, .sixteen.colgrid .row .pull_ten.thirteen.columns:first-child, .sixteen.colgrid .row .pull_ten.fourteen.columns:first-child, .sixteen.colgrid .row .pull_ten.fifteen.columns:first-child, .sixteen.colgrid .row .pull_eleven.one.column:first-child, .sixteen.colgrid .row .pull_eleven.two.columns:first-child, .sixteen.colgrid .row .pull_eleven.three.columns:first-child, .sixteen.colgrid .row .pull_eleven.four.columns:first-child, .sixteen.colgrid .row .pull_eleven.six.columns:first-child, .sixteen.colgrid .row .pull_eleven.seven.columns:first-child, .sixteen.colgrid .row .pull_eleven.eight.columns:first-child, .sixteen.colgrid .row .pull_eleven.nine.columns:first-child, .sixteen.colgrid .row .pull_eleven.ten.columns:first-child, .sixteen.colgrid .row .pull_eleven.eleven.columns:first-child, .sixteen.colgrid .row .pull_eleven.twelve.columns:first-child, .sixteen.colgrid .row .pull_eleven.thirteen.columns:first-child, .sixteen.colgrid .row .pull_eleven.fourteen.columns:first-child, .sixteen.colgrid .row .pull_eleven.fifteen.columns:first-child, .sixteen.colgrid .row .pull_twelve.one.column:first-child, .sixteen.colgrid .row .pull_twelve.two.columns:first-child, .sixteen.colgrid .row .pull_twelve.three.columns:first-child, .sixteen.colgrid .row .pull_twelve.five.columns:first-child, .sixteen.colgrid .row .pull_twelve.six.columns:first-child, .sixteen.colgrid .row .pull_twelve.seven.columns:first-child, .sixteen.colgrid .row .pull_twelve.eight.columns:first-child, .sixteen.colgrid .row .pull_twelve.nine.columns:first-child, .sixteen.colgrid .row .pull_twelve.ten.columns:first-child, .sixteen.colgrid .row .pull_twelve.eleven.columns:first-child, .sixteen.colgrid .row .pull_twelve.twelve.columns:first-child, .sixteen.colgrid .row .pull_twelve.thirteen.columns:first-child, .sixteen.colgrid .row .pull_twelve.fourteen.columns:first-child, .sixteen.colgrid .row .pull_twelve.fifteen.columns:first-child, .sixteen.colgrid .row .pull_thirteen.one.column:first-child, .sixteen.colgrid .row .pull_thirteen.two.columns:first-child, .sixteen.colgrid .row .pull_thirteen.four.columns:first-child, .sixteen.colgrid .row .pull_thirteen.five.columns:first-child, .sixteen.colgrid .row .pull_thirteen.six.columns:first-child, .sixteen.colgrid .row .pull_thirteen.seven.columns:first-child, .sixteen.colgrid .row .pull_thirteen.eight.columns:first-child, .sixteen.colgrid .row .pull_thirteen.nine.columns:first-child, .sixteen.colgrid .row .pull_thirteen.ten.columns:first-child, .sixteen.colgrid .row .pull_thirteen.eleven.columns:first-child, .sixteen.colgrid .row .pull_thirteen.twelve.columns:first-child, .sixteen.colgrid .row .pull_thirteen.thirteen.columns:first-child, .sixteen.colgrid .row .pull_thirteen.fourteen.columns:first-child, .sixteen.colgrid .row .pull_thirteen.fifteen.columns:first-child, .sixteen.colgrid .row .pull_fourteen.one.column:first-child, .sixteen.colgrid .row .pull_fourteen.three.columns:first-child, .sixteen.colgrid .row .pull_fourteen.four.columns:first-child, .sixteen.colgrid .row .pull_fourteen.five.columns:first-child, .sixteen.colgrid .row .pull_fourteen.six.columns:first-child, .sixteen.colgrid .row .pull_fourteen.seven.columns:first-child, .sixteen.colgrid .row .pull_fourteen.eight.columns:first-child, .sixteen.colgrid .row .pull_fourteen.nine.columns:first-child, .sixteen.colgrid .row .pull_fourteen.ten.columns:first-child, .sixteen.colgrid .row .pull_fourteen.eleven.columns:first-child, .sixteen.colgrid .row .pull_fourteen.twelve.columns:first-child, .sixteen.colgrid .row .pull_fourteen.thirteen.columns:first-child, .sixteen.colgrid .row .pull_fourteen.fourteen.columns:first-child, .sixteen.colgrid .row .pull_fourteen.fifteen.columns:first-child, .sixteen.colgrid .row .pull_fifteen.two.columns:first-child, .sixteen.colgrid .row .pull_fifteen.three.columns:first-child, .sixteen.colgrid .row .pull_fifteen.four.columns:first-child, .sixteen.colgrid .row .pull_fifteen.five.columns:first-child, .sixteen.colgrid .row .pull_fifteen.six.columns:first-child, .sixteen.colgrid .row .pull_fifteen.seven.columns:first-child, .sixteen.colgrid .row .pull_fifteen.eight.columns:first-child, .sixteen.colgrid .row .pull_fifteen.nine.columns:first-child, .sixteen.colgrid .row .pull_fifteen.ten.columns:first-child, .sixteen.colgrid .row .pull_fifteen.eleven.columns:first-child, .sixteen.colgrid .row .pull_fifteen.twelve.columns:first-child, .sixteen.colgrid .row .pull_fifteen.thirteen.columns:first-child, .sixteen.colgrid .row .pull_fifteen.fourteen.columns:first-child, .sixteen.colgrid .row .pull_fifteen.fifteen.columns:first-child { margin-left: 0; } .row .pull_one.eleven.columns, .row .pull_two.ten.columns, .row .pull_three.nine.columns, .row .pull_four.eight.columns, .row .pull_five.seven.columns, .row .pull_six.six.columns, .row .pull_seven.five.columns, .row .pull_eight.four.columns, .row .pull_nine.three.columns, .row .pull_ten.two.columns, .row .pull_eleven.one.columns, .sixteen.colgrid .row .pull_one.fifteen.columns, .sixteen.colgrid .row .pull_two.fourteen.columns, .sixteen.colgrid .row .pull_three.thirteen.columns, .sixteen.colgrid .row .pull_four.twelve.columns, .sixteen.colgrid .row .pull_five.eleven.columns, .sixteen.colgrid .row .pull_six.ten.columns, .sixteen.colgrid .row .pull_seven.nine.columns, .sixteen.colgrid .row .pull_eight.eight.columns, .sixteen.colgrid .row .pull_nine.seven.columns, .sixteen.colgrid .row .pull_ten.six.columns, .sixteen.colgrid .row .pull_eleven.five.columns, .sixteen.colgrid .row .pull_twelve.four.columns, .sixteen.colgrid .row .pull_thirteen.three.columns, .sixteen.colgrid .row .pull_fourteen.two.columns, .sixteen.colgrid .row .pull_fifteen.one.columns { margin-left: -100%; } /* Hybrid Centered Classes */ .sixteen.colgrid .row .one.centered { margin-left: 47.87234%; } .sixteen.colgrid .row .two.centered { margin-left: 44.68085%; } .sixteen.colgrid .row .three.centered { margin-left: 41.48936%; } .sixteen.colgrid .row .four.centered { margin-left: 38.29787%; } .sixteen.colgrid .row .five.centered { margin-left: 35.10638%; } .sixteen.colgrid .row .six.centered { margin-left: 31.91489%; } .sixteen.colgrid .row .seven.centered { margin-left: 28.7234%; } .sixteen.colgrid .row .eight.centered { margin-left: 25.53191%; } .sixteen.colgrid .row .nine.centered { margin-left: 22.34043%; } .sixteen.colgrid .row .ten.centered { margin-left: 19.14894%; } .sixteen.colgrid .row .eleven.centered { margin-left: 15.95745%; } .sixteen.colgrid .row .twelve.centered { margin-left: 12.76596%; } .sixteen.colgrid .row .thirteen.centered { margin-left: 9.57447%; } .sixteen.colgrid .row .fourteen.centered { margin-left: 6.38298%; } .sixteen.colgrid .row .fifteen.centered { margin-left: 3.19149%; } img, object, embed { max-width: 100%; height: auto; } img { -ms-interpolation-mode: bicubic; } #map_canvas img, .map_canvas img { max-width: none !important; } /* Tile Grid */ .tiles { display: block; overflow: hidden; } .tiles > li, .tiles > .tile { display: block; height: auto; float: left; padding-bottom: 0; } .tiles.two_up { margin-left: -4%; } .tiles.two_up > li, .tiles.two_up > .tile { margin-left: 4%; width: 46%; } .tiles.three_up, .tiles.four_up { margin-left: -2%; } .tiles.three_up > li, .tiles.three_up > .tile { margin-left: 2%; width: 31.3%; } .tiles.four_up > li, .tiles.four_up > .tile { margin-left: 2%; width: 23%; } .tiles.five_up { margin-left: -1.5%; } .tiles.five_up > li, .tiles.five_up > .tile { margin-left: 1.5%; width: 18.5%; } /* Nicolas Gallagher's micro clearfix */ .clearfix { *zoom: 1; } .clearfix:before, .clearfix:after { content: ""; display: table; } .clearfix:after { clear: both; } .row { *zoom: 1; } .row:before, .row:after { content: ""; display: table; } .row:after { clear: both; } .valign:before { content: ' '; display: inline-block; height: 400px; vertical-align: middle; margin-right: -0.25em; } .valign > div, .valign > article, .valign > section, .valign > figure { display: inline-block; vertical-align: middle; } /* Mobile */ @media only screen and (max-width: 767px) { body { -webkit-text-size-adjust: none; -ms-text-size-adjust: none; width: 100%; min-width: 0; } .container { min-width: 0; margin-left: 0; margin-right: 0; } .row { width: 100%; min-width: 0; margin-left: 0; margin-right: 0; } .row .row .column, .row .row .columns { padding: 0; } .row .centered { margin-left: 0 !important; } .column, .columns { width: auto !important; float: none; margin-left: 0; margin-right: 0; } .column:last-child, .columns:last-child { margin-right: 0; float: none; } [class*="column"] + [class*="column"]:last-child { float: none; } [class*="column"]:before { display: table; } [class*="column"]:after { display: table; clear: both; } [class^="push_"], [class*="push_"], [class^="pull_"], [class*="pull_"] { margin-left: 0 !important; } } /* Navigation (with dropdowns) */ .navbar { width: 100%; min-height: 60px; display: block; margin-bottom: 20px; background: #4a4d50; position: relative; } @media only screen and (max-width: 767px) { .navbar { border: none; } .navbar .column, .navbar .columns { min-height: 0; } } .navbar.fixed { position: fixed; z-index: 99999; } .navbar.pinned { position: absolute; } .navbar a.toggle { display: none; } @media only screen and (max-width: 767px) { .navbar a.toggle { top: 18%; right: 4%; width: 46px; position: absolute; text-align: center; display: inline-block; color: #fff; background: #4a4d50; height: 40px; line-height: 38px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; font-size: 29.79335px; font-size: 1.86208rem; } .navbar a.toggle:hover { background: #565a5d; } .navbar a.toggle:active, .navbar a.toggle.active { background: #3e4043; } } .navbar .logo { display: inline-block; margin: 0 2.12766% 0 0; padding: 0; height: 59.36817px; line-height: 57.36817px; } .navbar .logo a { display: block; padding: 0; overflow: hidden; height: 59.36817px; line-height: 57.36817px; } .navbar .logo a img { max-height: 95%; } @media only screen and (max-width: 767px) { .navbar .logo { float: left; display: inline; } .navbar .logo a { padding: 0; } .navbar .logo a img { width: auto; height: auto; max-width: 100%; } } .navbar ul { display: table; vertical-align: middle; margin: 0; float: none; } @media only screen and (max-width: 767px) { .navbar ul { position: absolute; display: block; width: 100% !important; height: 0; max-height: 0; top: 60px; left: 0; overflow: hidden; text-align: center; background: #3e4043; } .navbar ul.active { height: auto; max-height: 600px; z-index: 999998; -moz-transition-duration: 0.5s; -o-transition-duration: 0.5s; -webkit-transition-duration: 0.5s; transition-duration: 0.5s; -moz-box-shadow: 0 2px 2px #252728; -webkit-box-shadow: 0 2px 2px #252728; box-shadow: 0 2px 2px #252728; } } .navbar ul li { display: table-cell; text-align: center; padding-bottom: 0; margin: 0; height: 59.36817px; line-height: 57.36817px; } @media only screen and (max-width: 767px) { .navbar ul li { display: block; position: relative; min-height: 50px; max-height: 320px; height: auto; width: 100%; border-right: 0 !important; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; -moz-transition-duration: 0.5s; -o-transition-duration: 0.5s; -webkit-transition-duration: 0.5s; transition-duration: 0.5s; } } .navbar ul li > a { display: block; padding: 0 16px; white-space: nowrap; color: #fff; text-shadow: 0 1px 2px #191a1b, 0 1px 0 #191a1b; height: 59.36817px; line-height: 57.36817px; font-size: 16px; font-size: 1rem; } .navbar ul li > a i.icon-popup { position: absolute; } .navbar ul li .btn { border-color: #000101 !important; } .navbar ul li.field { margin-bottom: 0 !important; margin-right: 0; } @media only screen and (max-width: 767px) { .navbar ul li.field { padding: 0 20px; } } .navbar ul li.field input.search { background: #191a1b; border: none; color: #f2f2f2; } .navbar ul li .dropdown { width: auto; min-width: 0; max-width: 320px; height: 0; position: absolute; background: #fafafa; overflow: hidden; z-index: 999; } @media only screen and (max-width: 767px) { .navbar ul li .dropdown { width: 100%; max-width: 100%; position: relative; -moz-box-shadow: none !important; -webkit-box-shadow: none !important; box-shadow: none !important; } .navbar ul li.active .dropdown { border-bottom: 1px solid #313436; } .navbar ul li.active .dropdown ul { position: relative; top: 0; background: #36393b; min-height: 50px; max-height: 250px; height: auto; overflow: auto; -moz-box-shadow: none !important; -webkit-box-shadow: none !important; box-shadow: none !important; } .navbar ul li.active .dropdown ul li { min-height: 50px; border-bottom: #3e4043; } .navbar ul li.active .dropdown ul li a { color: #fff; border-bottom: 1px solid #313436; } .navbar ul li.active .dropdown ul li a:hover { color: #d04526; } } @media only screen and (min-width: 768px) and (max-width: 939px) { .navbar > ul > li > .btn a { padding: 0 9.88854px 0 9.88854px !important; } .navbar ul > li .dropdown ul li.active .dropdown { left: -320px; } } .navcontain { height: 80px; } @media only screen and (max-width: 768px) { .navcontain { height: auto; } } .pretty.navbar { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzdiODA4NSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzMxMzQzNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #7b8085), color-stop(100%, #313436)); background-image: -moz-linear-gradient(#7b8085, #313436); background-image: -webkit-linear-gradient(#7b8085, #313436); background-image: linear-gradient(#7b8085, #313436); -moz-box-shadow: inset 0 1px 1px #7b8085, 0 1px 2px rgba(0, 0, 0, 0.8) !important; -webkit-box-shadow: inset 0 1px 1px #7b8085, 0 1px 2px rgba(0, 0, 0, 0.8) !important; box-shadow: inset 0 1px 1px #7b8085, 0 1px 2px rgba(0, 0, 0, 0.8) !important; /* Remove this line if you dont want a dropshadow on your navigation*/ } @media only screen and (max-width: 767px) { .pretty.navbar a.toggle { border: 1px solid #3e4043; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzdiODA4NSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzRhNGQ1MCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #7b8085), color-stop(100%, #4a4d50)); background-image: -moz-linear-gradient(#7b8085, #4a4d50); background-image: -webkit-linear-gradient(#7b8085, #4a4d50); background-image: linear-gradient(#7b8085, #4a4d50); -moz-box-shadow: inset 0 1px 2px #888d91, inset 0 -1px 1px #565a5d, inset 1px 0 1px #565a5d, inset -1px 0 1px #565a5d, 0 1px 1px #63676a; -webkit-box-shadow: inset 0 1px 2px #888d91, inset 0 -1px 1px #565a5d, inset 1px 0 1px #565a5d, inset -1px 0 1px #565a5d, 0 1px 1px #63676a; box-shadow: inset 0 1px 2px #888d91, inset 0 -1px 1px #565a5d, inset 1px 0 1px #565a5d, inset -1px 0 1px #565a5d, 0 1px 1px #63676a; } .pretty.navbar a.toggle i { text-shadow: 0 1px 1px #191a1b; } .pretty.navbar a.toggle:hover { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzg4OGQ5MSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzU2NWE1ZCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #888d91), color-stop(100%, #565a5d)); background-image: -moz-linear-gradient(#888d91, #565a5d); background-image: -webkit-linear-gradient(#888d91, #565a5d); background-image: linear-gradient(#888d91, #565a5d); } .pretty.navbar a.toggle:active, .pretty.navbar a.toggle.active { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzNlNDA0MyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzRhNGQ1MCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #3e4043), color-stop(100%, #4a4d50)); background-image: -moz-linear-gradient(#3e4043, #4a4d50); background-image: -webkit-linear-gradient(#3e4043, #4a4d50); background-image: linear-gradient(#3e4043, #4a4d50); -moz-box-shadow: 0 1px 1px #63676a; -webkit-box-shadow: 0 1px 1px #63676a; box-shadow: 0 1px 1px #63676a; } } .pretty.navbar.row { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } @media only screen and (max-width: 767px) { .pretty.navbar.row { -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; } } .pretty.navbar ul li.field input.search { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzE5MWExYiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzRmNTI1NSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #191a1b), color-stop(100%, #4f5255)); background-image: -moz-linear-gradient(#191a1b, #4f5255); background-image: -webkit-linear-gradient(#191a1b, #4f5255); background-image: linear-gradient(#191a1b, #4f5255); border: none; -moz-box-shadow: 0 1px 2px #888d91 !important; -webkit-box-shadow: 0 1px 2px #888d91 !important; box-shadow: 0 1px 2px #888d91 !important; /* Remove this line if you dont want a dropshadow on your navigation*/ } .pretty.navbar > ul > li:first-child, .pretty.navbar .pretty.navbar > ul > li:first-child a:hover { -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } .navbar li .dropdown { width: auto; min-width: 0; max-width: 320px; height: 0; position: absolute; background: #fafafa; overflow: hidden; z-index: 999; } @media only screen and (max-width: 767px) { .navbar li .dropdown .dropdown { width: 100%; max-width: 100%; position: relative; -moz-box-shadow: none !important; -webkit-box-shadow: none !important; box-shadow: none !important; } .navbar li .dropdown.active .dropdown { border-bottom: 1px solid #313436; } .navbar li .dropdown.active .dropdown ul { position: relative; top: 0; background: #36393b; min-height: 50px; max-height: 250px; height: auto; overflow: auto; -moz-box-shadow: none !important; -webkit-box-shadow: none !important; box-shadow: none !important; } .navbar li .dropdown.active .dropdown ul li { min-height: 50px; border-bottom: #3e4043; } .navbar li .dropdown.active .dropdown ul li a { color: #fff; border-bottom: 1px solid #313436; } .navbar li .dropdown.active .dropdown ul li a:hover { color: #d04526; } } .navbar li .dropdown ul { margin: 0; display: block; } .navbar li .dropdown ul > li { position: relative; display: block; width: 100%; float: left; text-align: left; height: auto; -moz-border-radius: none; -webkit-border-radius: none; border-radius: none; } @media only screen and (min-width: 768px) and (max-width: 939px) { .navbar li .dropdown ul > li { max-width: 320px; word-wrap: break-word; } } .navbar li .dropdown ul > li a { display: block; padding: 0 20px; color: #d04526; border-bottom: 1px solid #ccc; text-shadow: none; height: 50.86172px; line-height: 48.86172px; } @media only screen and (max-width: 767px) { .navbar li .dropdown ul > li a { padding: 0 20px; } } .navbar li .dropdown ul > li .dropdown { display: none; background: white; } .navbar li .dropdown ul li:first-child a { -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; } .gumby-no-touch .navbar ul li:hover > a, .gumby-touch .navbar ul li.active > a { position: relative; background: #868d92; z-index: 1000; } .gumby-no-touch .navbar ul li:hover .dropdown, .gumby-touch .navbar ul li.active .dropdown { min-height: 50px; max-height: 561px; overflow: visible; height: auto; width: 100%; padding: 0; border-top: 1px solid #3e4043; -moz-box-shadow: 0px 3px 4px rgba(0, 0, 0, 0.3); -webkit-box-shadow: 0px 3px 4px rgba(0, 0, 0, 0.3); box-shadow: 0px 3px 4px rgba(0, 0, 0, 0.3); } .gumby-no-touch .navbar ul li:hover .dropdown ul { position: relative; top: 0; min-height: 50px; max-height: 250px; height: auto; -moz-box-shadow: none !important; -webkit-box-shadow: none !important; box-shadow: none !important; -moz-transition-duration: 0.5s; -o-transition-duration: 0.5s; -webkit-transition-duration: 0.5s; transition-duration: 0.5s; } @media only screen and (max-width: 767px) { .gumby-no-touch .navbar ul li:hover .dropdown ul { overflow: auto; background: #36393b; } .gumby-no-touch .navbar ul li:hover .dropdown ul li { border-bottom: #3e4043; } .gumby-no-touch .navbar ul li:hover .dropdown ul li a { color: #fff; border-bottom: 1px solid #313436; } .gumby-no-touch .navbar ul li:hover .dropdown ul li a:hover { color: #d04526; } } .gumby-no-touch .navbar li .dropdown ul > li:hover .dropdown, .gumby-touch .navbar li .dropdown ul > li.active .dropdown { border-top: none; display: block; position: absolute; z-index: 9999; left: 100%; top: 0; margin-top: 0; } @media only screen and (max-width: 767px) { .gumby-no-touch .navbar li .dropdown ul > li:hover .dropdown, .gumby-touch .navbar li .dropdown ul > li.active .dropdown { position: relative; left: 0; } .gumby-no-touch .navbar li .dropdown ul > li:hover .dropdown ul, .gumby-touch .navbar li .dropdown ul > li.active .dropdown ul { background: #252728 !important; } } .gumby-no-touch .navbar li .dropdown ul li a:hover { background: #f2f2f2; } .gumby-touch .navbar a:hover { color: #fff !important; } .subnav { display: block; width: auto; overflow: hidden; margin: 0 0 18px 0; padding-top: 4px; } .subnav li, .subnav dt, .subnav dd { float: left; display: inline; margin-left: 9px; margin-bottom: 4px; } .subnav li:first-child, .subnav dt:first-child, .subnav dd:first-child { margin-left: 0; } .subnav dt { color: #f2f2f2; font-weight: normal; } .subnav li a, .subnav dd a { color: #fff; font-size: 15px; text-decoration: none; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } .subnav li.active a, .subnav dd.active a { background: #4a4d50; padding: 5px 9px; text-shadow: 0 1px 1px #4a4d50; } /* Buttons */ .btn, .skiplink { display: inline-block; width: auto; background: #f2f2f2; -webkit-appearance: none; font-family: "Open Sans"; font-weight: 600; padding: 0 !important; text-align: center; } .btn > a, .btn input, .btn button, .skiplink > a, .skiplink input, .skiplink button { display: block; padding: 0 18.4133px; color: #fff; height: 100%; } .btn input, .btn button, .skiplink input, .skiplink button { background: none; border: none; width: 100%; font-size: 100%; cursor: pointer; font-weight: 400; -moz-appearance: none; -webkit-appearance: none; } .btn.xlarge, .skiplink.xlarge { font-size: 29.79335px; font-size: 1.86208rem; height: 65.90355px; line-height: 63.90355px; } .btn.xlarge a, .skiplink.xlarge a { position: relative; padding: 0 29.79335px; } .btn.xlarge.icon-left a, .skiplink.xlarge.icon-left a { padding-left: 65.90355px; } .btn.xlarge.icon-left a:before, .skiplink.xlarge.icon-left a:before { left: 19.86223px; } .btn.xlarge.icon-right a, .skiplink.xlarge.icon-right a { padding-right: 65.90355px; } .btn.xlarge.icon-right a:after, .skiplink.xlarge.icon-right a:after { right: 19.86223px; } .btn.large, .skiplink.large { font-size: 25.88854px; font-size: 1.61803rem; height: 57.3971px; line-height: 55.3971px; } .btn.large a, .skiplink.large a { position: relative; padding: 0 25.88854px; } .btn.large.icon-left a, .skiplink.large.icon-left a { padding-left: 57.3971px; } .btn.large.icon-left a:before, .skiplink.large.icon-left a:before { left: 17.25903px; } .btn.large.icon-right a, .skiplink.large.icon-right a { padding-right: 57.3971px; } .btn.large.icon-right a:after, .skiplink.large.icon-right a:after { right: 17.25903px; } .btn.medium, .skiplink.medium { font-size: 16px; font-size: 1rem; height: 35.85532px; line-height: 33.85532px; } .btn.medium a, .skiplink.medium a { position: relative; padding: 0 16px; } .btn.medium.icon-left a, .skiplink.medium.icon-left a { padding-left: 35.85532px; } .btn.medium.icon-left a:before, .skiplink.medium.icon-left a:before { left: 10.66667px; } .btn.medium.icon-right a, .skiplink.medium.icon-right a { padding-right: 35.85532px; } .btn.medium.icon-right a:after, .skiplink.medium.icon-right a:after { right: 10.66667px; } .btn.medium a, .skiplink.medium a { padding: 0 18.4133px; } .btn.small, .skiplink.small { font-size: 9.88854px; font-size: 0.61803rem; height: 22.54177px; line-height: 20.54177px; } .btn.small a, .skiplink.small a { position: relative; padding: 0 9.88854px; } .btn.small.icon-left a, .skiplink.small.icon-left a { padding-left: 22.54177px; } .btn.small.icon-left a:before, .skiplink.small.icon-left a:before { left: 6.59236px; } .btn.small.icon-right a, .skiplink.small.icon-right a { padding-right: 22.54177px; } .btn.small.icon-right a:after, .skiplink.small.icon-right a:after { right: 6.59236px; } .btn.small a, .skiplink.small a { padding: 0 9.88854px; } .btn.oval, .skiplink.oval { -moz-border-radius: 1000px; -webkit-border-radius: 1000px; border-radius: 1000px; } .btn.pill-left, .skiplink.pill-left { -moz-border-radius: 500px 0 0 500px; -webkit-border-radius: 500px; border-radius: 500px 0 0 500px; } .btn.pill-right, .skiplink.pill-right { -moz-border-radius: 0 500px 500px 0; -webkit-border-radius: 0; border-radius: 0 500px 500px 0; } .btn.primary, .skiplink.primary { background: #3085d6; border: 1px solid #3085d6; } .btn.primary:hover, .skiplink.primary:hover { background: #5b9ede; } .btn.primary:active, .skiplink.primary:active { background: #236bb0; } .btn.secondary, .skiplink.secondary { background: #42a35a; border: 1px solid #42a35a; } .btn.secondary:hover, .skiplink.secondary:hover { background: #5bbd73; } .btn.secondary:active, .skiplink.secondary:active { background: #337f46; } .btn.default, .skiplink.default { background: #f2f2f2; border: 1px solid #f2f2f2; color: #555555; border: 1px solid #f2f2f2; } .btn.default:hover, .skiplink.default:hover { background: white; } .btn.default:active, .skiplink.default:active { background: #d8d8d8; } .btn.default:hover, .skiplink.default:hover { border: 1px solid #e5e5e5; } .btn.default a, .btn.default input, .btn.default button, .skiplink.default a, .skiplink.default input, .skiplink.default button { color: #555555; } .btn.info, .skiplink.info { background: #4a4d50; border: 1px solid #4a4d50; } .btn.info:hover, .skiplink.info:hover { background: #63676a; } .btn.info:active, .skiplink.info:active { background: #313436; } .btn.danger, .skiplink.danger { background: #ca3838; border: 1px solid #ca3838; } .btn.danger:hover, .skiplink.danger:hover { background: #d56060; } .btn.danger:active, .skiplink.danger:active { background: #a32c2c; } .btn.warning, .skiplink.warning { background: #f6b83f; border: 1px solid #f6b83f; color: #644405; } .btn.warning:hover, .skiplink.warning:hover { background: #f8ca70; } .btn.warning:active, .skiplink.warning:active { background: #f4a60e; } .btn.warning a, .btn.warning input, .btn.warning button, .skiplink.warning a, .skiplink.warning input, .skiplink.warning button { color: #644405; } .btn.success, .skiplink.success { background: #58c026; border: 1px solid #58c026; } .btn.success:hover, .skiplink.success:hover { background: #72d940; } .btn.success:active, .skiplink.success:active { background: #44951e; } .btn.metro, .metro .btn, .metro .skiplink, .skiplink.metro, .btn.pretty.squared, .pretty .squared.btn, .pretty .squared.skiplink, .pretty .btn.squared { -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; } .btn.pretty, .pretty .btn, .pretty .skiplink, .skiplink.pretty, .btn.metro.rounded, .metro .rounded.btn, .metro .rounded.skiplink, .metro .btn.rounded { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } .btn.pretty.primary, .pretty .primary.btn, .pretty .primary.skiplink, .skiplink.pretty.primary { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzg1YjdlNyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzJhODVkYyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #85b7e7), color-stop(100%, #2a85dc)); background-image: -moz-linear-gradient(#85b7e7, #2a85dc); background-image: -webkit-linear-gradient(#85b7e7, #2a85dc); background-image: linear-gradient(#85b7e7, #2a85dc); -moz-box-shadow: inset 0 0 3px #f0f6fc; -webkit-box-shadow: inset 0 0 3px #f0f6fc; box-shadow: inset 0 0 3px #f0f6fc; border: 1px solid #1f5e9b; } .btn.pretty.primary:hover, .pretty .primary.btn:hover, .pretty .primary.skiplink:hover, .skiplink.pretty.primary:hover { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2EyZDRmYyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzU0YjJmZSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a2d4fc), color-stop(100%, #54b2fe)); background-image: -moz-linear-gradient(#a2d4fc, #54b2fe); background-image: -webkit-linear-gradient(#a2d4fc, #54b2fe); background-image: linear-gradient(#a2d4fc, #54b2fe); -moz-box-shadow: inset 0 0 3px white; -webkit-box-shadow: inset 0 0 3px white; box-shadow: inset 0 0 3px white; border: 1px solid #0e90f8; } .btn.pretty.primary:active, .pretty .primary.btn:active, .pretty .primary.skiplink:active, .skiplink.pretty.primary:active { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzJhODVkYyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzg1YjdlNyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #2a85dc), color-stop(100%, #85b7e7)); background-image: -moz-linear-gradient(#2a85dc, #85b7e7); background-image: -webkit-linear-gradient(#2a85dc, #85b7e7); background-image: linear-gradient(#2a85dc, #85b7e7); -moz-box-shadow: inset 0 0 3px white; -webkit-box-shadow: inset 0 0 3px white; box-shadow: inset 0 0 3px white; } .btn.pretty.primary a, .pretty .primary.btn a, .pretty .primary.skiplink a, .btn.pretty.primary input, .pretty .primary.btn input, .pretty .primary.skiplink input, .btn.pretty.primary button, .pretty .primary.btn button, .pretty .primary.skiplink button, .skiplink.pretty.primary a, .skiplink.pretty.primary input, .skiplink.pretty.primary button { text-shadow: 0 1px 1px #1a5186; } .btn.pretty.secondary, .pretty .secondary.btn, .pretty .secondary.skiplink, .skiplink.pretty.secondary { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzgwY2I5MiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzNjYTk1NyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #80cb92), color-stop(100%, #3ca957)); background-image: -moz-linear-gradient(#80cb92, #3ca957); background-image: -webkit-linear-gradient(#80cb92, #3ca957); background-image: linear-gradient(#80cb92, #3ca957); -moz-box-shadow: inset 0 0 3px #daf0e0; -webkit-box-shadow: inset 0 0 3px #daf0e0; box-shadow: inset 0 0 3px #daf0e0; border: 1px solid #2c6d3c; } .btn.pretty.secondary:hover, .pretty .secondary.btn:hover, .pretty .secondary.skiplink:hover, .skiplink.pretty.secondary:hover { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ExZDNhZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzY4YzA3ZCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a1d3ad), color-stop(100%, #68c07d)); background-image: -moz-linear-gradient(#a1d3ad, #68c07d); background-image: -webkit-linear-gradient(#a1d3ad, #68c07d); background-image: linear-gradient(#a1d3ad, #68c07d); -moz-box-shadow: inset 0 0 3px #f8fcf9; -webkit-box-shadow: inset 0 0 3px #f8fcf9; box-shadow: inset 0 0 3px #f8fcf9; border: 1px solid #469659; } .btn.pretty.secondary:active, .pretty .secondary.btn:active, .pretty .secondary.skiplink:active, .skiplink.pretty.secondary:active { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzNjYTk1NyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzgwY2I5MiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #3ca957), color-stop(100%, #80cb92)); background-image: -moz-linear-gradient(#3ca957, #80cb92); background-image: -webkit-linear-gradient(#3ca957, #80cb92); background-image: linear-gradient(#3ca957, #80cb92); -moz-box-shadow: inset 0 0 3px #ecf8ef; -webkit-box-shadow: inset 0 0 3px #ecf8ef; box-shadow: inset 0 0 3px #ecf8ef; } .btn.pretty.secondary a, .pretty .secondary.btn a, .pretty .secondary.skiplink a, .btn.pretty.secondary input, .pretty .secondary.btn input, .pretty .secondary.skiplink input, .btn.pretty.secondary button, .pretty .secondary.btn button, .pretty .secondary.skiplink button, .skiplink.pretty.secondary a, .skiplink.pretty.secondary input, .skiplink.pretty.secondary button { text-shadow: 0 1px 1px #255a32; } .btn.pretty.default, .pretty .default.btn, .pretty .default.skiplink, .skiplink.pretty.default { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2YzZjFmMSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #f3f1f1)); background-image: -moz-linear-gradient(#ffffff, #f3f1f1); background-image: -webkit-linear-gradient(#ffffff, #f3f1f1); background-image: linear-gradient(#ffffff, #f3f1f1); -moz-box-shadow: inset 0 0 3px white; -webkit-box-shadow: inset 0 0 3px white; box-shadow: inset 0 0 3px white; border: 1px solid #cccccc; } .btn.pretty.default:hover, .pretty .default.btn:hover, .pretty .default.skiplink:hover, .skiplink.pretty.default:hover { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #ffffff)); background-image: -moz-linear-gradient(#ffffff, #ffffff); background-image: -webkit-linear-gradient(#ffffff, #ffffff); background-image: linear-gradient(#ffffff, #ffffff); -moz-box-shadow: inset 0 0 3px white; -webkit-box-shadow: inset 0 0 3px white; box-shadow: inset 0 0 3px white; border: 1px solid #d9d9d9; } .btn.pretty.default:active, .pretty .default.btn:active, .pretty .default.skiplink:active, .skiplink.pretty.default:active { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2YzZjFmMSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f3f1f1), color-stop(100%, #ffffff)); background-image: -moz-linear-gradient(#f3f1f1, #ffffff); background-image: -webkit-linear-gradient(#f3f1f1, #ffffff); background-image: linear-gradient(#f3f1f1, #ffffff); -moz-box-shadow: inset 0 0 3px white; -webkit-box-shadow: inset 0 0 3px white; box-shadow: inset 0 0 3px white; } .btn.pretty.default a, .pretty .default.btn a, .pretty .default.skiplink a, .btn.pretty.default input, .pretty .default.btn input, .pretty .default.skiplink input, .btn.pretty.default button, .pretty .default.btn button, .pretty .default.skiplink button, .skiplink.pretty.default a, .skiplink.pretty.default input, .skiplink.pretty.default button { text-shadow: 0 1px 1px white; } .btn.pretty.info, .pretty .info.btn, .pretty .info.skiplink, .skiplink.pretty.info { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzdiODA4NSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzQ2NGQ1NCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #7b8085), color-stop(100%, #464d54)); background-image: -moz-linear-gradient(#7b8085, #464d54); background-image: -webkit-linear-gradient(#7b8085, #464d54); background-image: linear-gradient(#7b8085, #464d54); -moz-box-shadow: inset 0 0 3px #bdc0c2; -webkit-box-shadow: inset 0 0 3px #bdc0c2; box-shadow: inset 0 0 3px #bdc0c2; border: 1px solid #252728; } .btn.pretty.info:hover, .pretty .info.btn:hover, .pretty .info.skiplink:hover, .skiplink.pretty.info:hover { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2FlYjNiNiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzgwOGU5OCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #aeb3b6), color-stop(100%, #808e98)); background-image: -moz-linear-gradient(#aeb3b6, #808e98); background-image: -webkit-linear-gradient(#aeb3b6, #808e98); background-image: linear-gradient(#aeb3b6, #808e98); -moz-box-shadow: inset 0 0 3px #f1f2f3; -webkit-box-shadow: inset 0 0 3px #f1f2f3; box-shadow: inset 0 0 3px #f1f2f3; border: 1px solid #60676b; } .btn.pretty.info:active, .pretty .info.btn:active, .pretty .info.skiplink:active, .skiplink.pretty.info:active { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzQ2NGQ1NCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzdiODA4NSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #464d54), color-stop(100%, #7b8085)); background-image: -moz-linear-gradient(#464d54, #7b8085); background-image: -webkit-linear-gradient(#464d54, #7b8085); background-image: linear-gradient(#464d54, #7b8085); -moz-box-shadow: inset 0 0 3px #cbcdce; -webkit-box-shadow: inset 0 0 3px #cbcdce; box-shadow: inset 0 0 3px #cbcdce; } .btn.pretty.info a, .pretty .info.btn a, .pretty .info.skiplink a, .btn.pretty.info input, .pretty .info.btn input, .pretty .info.skiplink input, .btn.pretty.info button, .pretty .info.btn button, .pretty .info.skiplink button, .skiplink.pretty.info a, .skiplink.pretty.info input, .skiplink.pretty.info button { text-shadow: 0 1px 1px #191a1b; } .btn.pretty.danger, .pretty .danger.btn, .pretty .danger.skiplink, .skiplink.pretty.danger { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RmODk4OSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2QwMzIzMiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #df8989), color-stop(100%, #d03232)); background-image: -moz-linear-gradient(#df8989, #d03232); background-image: -webkit-linear-gradient(#df8989, #d03232); background-image: linear-gradient(#df8989, #d03232); -moz-box-shadow: inset 0 0 3px #faeded; -webkit-box-shadow: inset 0 0 3px #faeded; box-shadow: inset 0 0 3px #faeded; border: 1px solid #8f2626; } .btn.pretty.danger:hover, .pretty .danger.btn:hover, .pretty .danger.skiplink:hover, .skiplink.pretty.danger:hover { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y3OTY5NiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2Y2NGE0YSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f79696), color-stop(100%, #f64a4a)); background-image: -moz-linear-gradient(#f79696, #f64a4a); background-image: -webkit-linear-gradient(#f79696, #f64a4a); background-image: linear-gradient(#f79696, #f64a4a); -moz-box-shadow: inset 0 0 3px white; -webkit-box-shadow: inset 0 0 3px white; box-shadow: inset 0 0 3px white; border: 1px solid #e21212; } .btn.pretty.danger:active, .pretty .danger.btn:active, .pretty .danger.skiplink:active, .skiplink.pretty.danger:active { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2QwMzIzMiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2RmODk4OSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #d03232), color-stop(100%, #df8989)); background-image: -moz-linear-gradient(#d03232, #df8989); background-image: -webkit-linear-gradient(#d03232, #df8989); background-image: linear-gradient(#d03232, #df8989); -moz-box-shadow: inset 0 0 3px white; -webkit-box-shadow: inset 0 0 3px white; box-shadow: inset 0 0 3px white; } .btn.pretty.danger a, .pretty .danger.btn a, .pretty .danger.skiplink a, .btn.pretty.danger input, .pretty .danger.btn input, .pretty .danger.skiplink input, .btn.pretty.danger button, .pretty .danger.btn button, .pretty .danger.skiplink button, .skiplink.pretty.danger a, .skiplink.pretty.danger input, .skiplink.pretty.danger button { text-shadow: 0 1px 1px #7b2121; } .btn.pretty.warning, .pretty .warning.btn, .pretty .warning.skiplink, .skiplink.pretty.warning { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZiZGNhMCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZiYmEzYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fbdca0), color-stop(100%, #fbba3a)); background-image: -moz-linear-gradient(#fbdca0, #fbba3a); background-image: -webkit-linear-gradient(#fbdca0, #fbba3a); background-image: linear-gradient(#fbdca0, #fbba3a); -moz-box-shadow: inset 0 0 3px white; -webkit-box-shadow: inset 0 0 3px white; box-shadow: inset 0 0 3px white; border: 1px solid #de960a; color: #644405; } .btn.pretty.warning:hover, .pretty .warning.btn:hover, .pretty .warning.skiplink:hover, .skiplink.pretty.warning:hover { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZlZWNjYSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZmZDM3ZCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #feecca), color-stop(100%, #ffd37d)); background-image: -moz-linear-gradient(#feecca, #ffd37d); background-image: -webkit-linear-gradient(#feecca, #ffd37d); background-image: linear-gradient(#feecca, #ffd37d); -moz-box-shadow: inset 0 0 3px white; -webkit-box-shadow: inset 0 0 3px white; box-shadow: inset 0 0 3px white; border: 1px solid #fcb834; } .btn.pretty.warning:active, .pretty .warning.btn:active, .pretty .warning.skiplink:active, .skiplink.pretty.warning:active { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZiYmEzYSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZiZGNhMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fbba3a), color-stop(100%, #fbdca0)); background-image: -moz-linear-gradient(#fbba3a, #fbdca0); background-image: -webkit-linear-gradient(#fbba3a, #fbdca0); background-image: linear-gradient(#fbba3a, #fbdca0); -moz-box-shadow: inset 0 0 3px white; -webkit-box-shadow: inset 0 0 3px white; box-shadow: inset 0 0 3px white; } .btn.pretty.warning a, .pretty .warning.btn a, .pretty .warning.skiplink a, .btn.pretty.warning input, .pretty .warning.btn input, .pretty .warning.skiplink input, .btn.pretty.warning button, .pretty .warning.btn button, .pretty .warning.skiplink button, .skiplink.pretty.warning a, .skiplink.pretty.warning input, .skiplink.pretty.warning button { text-shadow: 0 1px 1px #fbdca0; } .btn.pretty.success, .pretty .success.btn, .pretty .success.skiplink, .skiplink.pretty.success { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzkxZTI2YSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzU2YzYyMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #91e26a), color-stop(100%, #56c620)); background-image: -moz-linear-gradient(#91e26a, #56c620); background-image: -webkit-linear-gradient(#91e26a, #56c620); background-image: linear-gradient(#91e26a, #56c620); -moz-box-shadow: inset 0 0 3px #e0f7d5; -webkit-box-shadow: inset 0 0 3px #e0f7d5; box-shadow: inset 0 0 3px #e0f7d5; border: 1px solid #3b8019; } .btn.pretty.success:hover, .pretty .success.btn:hover, .pretty .success.skiplink:hover, .skiplink.pretty.success:hover { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzk2ZTU3MCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzY0ZGYyOSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #96e570), color-stop(100%, #64df29)); background-image: -moz-linear-gradient(#96e570, #64df29); background-image: -webkit-linear-gradient(#96e570, #64df29); background-image: linear-gradient(#96e570, #64df29); -moz-box-shadow: inset 0 0 3px #e5f9db; -webkit-box-shadow: inset 0 0 3px #e5f9db; box-shadow: inset 0 0 3px #e5f9db; border: 1px solid #479f1d; } .btn.pretty.success:active, .pretty .success.btn:active, .pretty .success.skiplink:active, .skiplink.pretty.success:active { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzU2YzYyMCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzkxZTI2YSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #56c620), color-stop(100%, #91e26a)); background-image: -moz-linear-gradient(#56c620, #91e26a); background-image: -webkit-linear-gradient(#56c620, #91e26a); background-image: linear-gradient(#56c620, #91e26a); -moz-box-shadow: inset 0 0 3px #f0fbea; -webkit-box-shadow: inset 0 0 3px #f0fbea; box-shadow: inset 0 0 3px #f0fbea; } .btn.pretty.success a, .pretty .success.btn a, .pretty .success.skiplink a, .btn.pretty.success input, .pretty .success.btn input, .pretty .success.skiplink input, .btn.pretty.success button, .pretty .success.btn button, .pretty .success.skiplink button, .skiplink.pretty.success a, .skiplink.pretty.success input, .skiplink.pretty.success button { text-shadow: 0 1px 1px #316b15; } /* Icons */ [class^="icon-"] a:before, [class*=" icon-"] a:before, [class^="icon-"] a:after, [class*=" icon-"] a:after, i[class^="icon-"], i[class*=" icon-"] { font-family: "entypo"; position: absolute; text-decoration: none; zoom: 1; } i[class^="icon-"], i[class*=" icon-"] { display: inline-block; position: static; min-width: 20px; margin: 0 5px; text-align: center; } /* Form Styles */ form { margin: 0 0 18px; } form label { display: block; font-size: 16px; font-size: 1rem; line-height: 1.5em; cursor: pointer; margin-bottom: 9px; } form label.inline { display: inline-block; padding-right: 20px; } form dt { margin: 0; } form textarea { height: 150px; } form ul, form ul li { margin-left: 0; list-style-type: none; } form fieldset { border-width: 0.0625em; border-style: solid; padding: 1.4375em; border-color: #d8d8d8; margin: 18px 0; } form fieldset legend { padding: 5px 10px; } .field { position: relative; max-width: 100%; margin-bottom: 10px; vertical-align: middle; font-size: 16px; overflow: hidden; } .field.metro, .field .metro { -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; } .field input, .field input[type="*"], .field textarea { max-width: 100%; width: 100%; padding: 0; margin: 0; border: none; outline: none; resize: none; -webkit-appearance: none; font-family: "Open Sans"; font-weight: 300; font-size: 16px; font-size: 1rem; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } .field .input { position: relative; padding: 0 10px; background: #fff; border: 1px solid #d8d8d8; height: 35.85532px; line-height: 33.85532px; font-size: 16px; font-size: 1rem; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } .field .input.search { height: 35.85532px; line-height: 33.85532px; -moz-border-radius: 1000px; -webkit-border-radius: 1000px; border-radius: 1000px; padding-right: 0; } .field .input.textarea { height: auto; } input.xnarrow, .input.xnarrow { width: 13.33333%; margin: 0; } input.xnarrow:last-child, .input.xnarrow:last-child { margin-left: -4px; } input.xnarrow:first-child, .input.xnarrow:first-child { margin-right: 3.94%; margin-left: 0; } input.xnarrow:first-child:last-child, .input.xnarrow:first-child:last-child { margin: 0; } input.narrow, .input.narrow { width: 30.66667%; margin: 0; } input.narrow:last-child, .input.narrow:last-child { margin-left: -4px; } input.narrow:first-child, .input.narrow:first-child { margin-right: 3.94%; margin-left: 0; } input.narrow:first-child:last-child, .input.narrow:first-child:last-child { margin: 0; } input.normal, .input.normal { width: 48%; margin: 0; } input.normal:last-child, .input.normal:last-child { margin-left: -4px; } input.normal:first-child, .input.normal:first-child { margin-right: 3.94%; margin-left: 0; } input.normal:first-child:last-child, .input.normal:first-child:last-child { margin: 0; } input.wide, .input.wide { width: 65.33333%; margin: 0; } input.wide:last-child, .input.wide:last-child { margin-left: -4px; } input.wide:first-child, .input.wide:first-child { margin-right: 3.94%; margin-left: 0; } input.wide:first-child:last-child, .input.wide:first-child:last-child { margin: 0; } input.xwide, .input.xwide { width: 82.66667%; margin: 0; } input.xwide:last-child, .input.xwide:last-child { margin-left: -4px; } input.xwide:first-child, .input.xwide:first-child { margin-right: 3.94%; margin-left: 0; } input.xwide:first-child:last-child, .input.xwide:first-child:last-child { margin: 0; } input.xxwide, .input.xxwide { width: 100%; margin: 0; } input.xxwide:last-child, .input.xxwide:last-child { margin-left: -4px; } input.xxwide:first-child, .input.xxwide:first-child { margin-right: 3.94%; margin-left: 0; } input.xxwide:first-child:last-child, .input.xxwide:first-child:last-child { margin: 0; } label + .xnarrow:last-child, label + .narrow:last-child, label + .normal:last-child, label + .wide:last-child, label + .xwide:last-child, label + .xxwide:last-child { margin-left: 0; } @media only screen and (max-width: 960px) { .xxwide:first-child, .xxwide:last-child { margin-right: 0%; } } /* remove inline-block white-space — A 0px font-size = 0px of white space */ .prepend, .append { font-size: 0; white-space: nowrap; padding-bottom: 3.5px; } .prepend input, .prepend .input, .append input, .append .input { display: inline-block; max-width: 100%; margin-right: 0; margin-left: 0; } .prepend input, .prepend .input, .prepend.append input:last-child, .append *:last-child { -moz-border-radius: 0px 4px 4px 0; -webkit-border-radius: 0px; border-radius: 0px 4px 4px 0; } .append input, .append .input, .prepend.append input:first-child, .prepend *:first-child { -moz-border-radius: 4px 0 0 4px; -webkit-border-radius: 4px; border-radius: 4px 0 0 4px; } .prepend.append input { -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; } .prepend.append input:last-child { margin-left: -1px; } .prepend .adjoined, .append .adjoined, .prepend .btn, .append .btn { position: relative; display: inline-block; margin-bottom: 0; z-index: 99; } .prepend .btn a, .prepend .btn input, .prepend .btn button, .append .btn a, .append .btn input, .append .btn button { padding: 0 12px; } .prepend .adjoined, .append .adjoined { padding: 0 10px 0 10px; background: #f2f2f2; border: 1px solid #d8d8d8; font-family: "Open Sans"; font-weight: 600; color: #555555; font-size: 16px; font-size: 1rem; height: 35.85532px; line-height: 33.85532px; } .prepend .adjoined, .prepend .btn { margin-right: -1px; } .adjoined:first-child { margin-left: 0 !important; } .append .adjoined, .append .btn { margin-left: -1px; } .append button, .prepend button { display: inline-block; } .prepend input:first-child, .append input:first-child, .prepend .input:first-child, .append .input:first-child { margin-right: 0; } .double input, .double .input { width: 50% !important; } .double input:last-child, .double .input:last-child { margin-left: -1px; } .field input, .field .input, .field textarea, .field .textarea, .field .radio span, .field .checkbox span, .field .picker { -moz-transition-duration: 0.2s; -o-transition-duration: 0.2s; -webkit-transition-duration: 0.2s; transition-duration: 0.2s; } .field.danger:after { font-family: "entypo"; content: "\\2716"; font-size: 16px; position: absolute; top: 14%; right: 15px; z-index: 999; color: #ca3838; } .field.danger.no-icon:after { display: none; } .field.danger.append:after, .field.danger.prepend:after { content: ""; } .field.danger input, .field.danger .input, .field.danger textarea, .field.danger .textarea, .field.danger .radio span, .field.danger .checkbox span, .field.danger .picker { border-color: #ca3838; background: #f0c5c5; } .field.danger input, .field.danger .input, .field.danger textarea, .field.danger .textarea, .field.danger .radio span, .field.danger .checkbox span, .field.danger .picker, .field.danger input::-webkit-input-placeholder, .field.danger textarea::-webkit-input-placeholder, .field.danger input:-moz-placeholder, .field.danger textarea:-moz-placeholder textarea { color: #ca3838; } .field.warning:after { font-family: "entypo"; content: "\\26a0"; font-size: 16px; position: absolute; top: 14%; right: 15px; z-index: 999; color: #f6b83f; } .field.warning.no-icon:after { display: none; } .field.warning.append:after, .field.warning.prepend:after { content: ""; } .field.warning input, .field.warning .input, .field.warning textarea, .field.warning .textarea, .field.warning .radio span, .field.warning .checkbox span, .field.warning .picker { border-color: #f6b83f; background: #fef7ea; } .field.warning input, .field.warning .input, .field.warning textarea, .field.warning .textarea, .field.warning .radio span, .field.warning .checkbox span, .field.warning .picker, .field.warning input::-webkit-input-placeholder, .field.warning textarea::-webkit-input-placeholder, .field.warning input:-moz-placeholder, .field.warning textarea:-moz-placeholder textarea { color: #f6b83f; } .field.success:after { font-family: "entypo"; content: "\\2713"; font-size: 16px; position: absolute; top: 14%; right: 15px; z-index: 999; color: #58c026; } .field.success.no-icon:after { display: none; } .field.success.append:after, .field.success.prepend:after { content: ""; } .field.success input, .field.success .input, .field.success textarea, .field.success .textarea, .field.success .radio span, .field.success .checkbox span, .field.success .picker { border-color: #58c026; background: #c0eeaa; } .field.success input, .field.success .input, .field.success textarea, .field.success .textarea, .field.success .radio span, .field.success .checkbox span, .field.success .picker, .field.success input::-webkit-input-placeholder, .field.success textarea::-webkit-input-placeholder, .field.success input:-moz-placeholder, .field.success textarea:-moz-placeholder textarea { color: #58c026; } .field .picker.danger { border-color: #ca3838; color: #ca3838; background: #f0c5c5; -moz-transition-duration: 0.2s; -o-transition-duration: 0.2s; -webkit-transition-duration: 0.2s; transition-duration: 0.2s; } .field .picker.danger select, .field .picker.danger:after { color: #ca3838; } .field .picker.warning { border-color: #f6b83f; color: #f6b83f; background: #fef7ea; -moz-transition-duration: 0.2s; -o-transition-duration: 0.2s; -webkit-transition-duration: 0.2s; transition-duration: 0.2s; } .field .picker.warning select, .field .picker.warning:after { color: #f6b83f; } .field .picker.success { border-color: #58c026; color: #58c026; background: #c0eeaa; -moz-transition-duration: 0.2s; -o-transition-duration: 0.2s; -webkit-transition-duration: 0.2s; transition-duration: 0.2s; } .field .picker.success select, .field .picker.success:after { color: #58c026; } .field .text input[type="search"] { -webkit-appearance: textfield; } .no-js .radio input { -webkit-appearance: radio; margin-left: 1px; } .no-js .checkbox input { -webkit-appearance: checkbox; } .no-js .radio input, .no-js .checkbox input { display: inline-block; width: 16px; } .js .field .radio, .js .field .checkbox { position: relative; } .js .field .radio.danger, .js .field .checkbox.danger { color: #ca3838; } .js .field .radio.danger span, .js .field .checkbox.danger span { border-color: #ca3838; color: #ca3838; background: #f0c5c5; -moz-transition-duration: 0.2s; -o-transition-duration: 0.2s; -webkit-transition-duration: 0.2s; transition-duration: 0.2s; } .js .field .radio.warning, .js .field .checkbox.warning { color: #f6b83f; } .js .field .radio.warning span, .js .field .checkbox.warning span { border-color: #f6b83f; color: #f6b83f; background: #fef7ea; -moz-transition-duration: 0.2s; -o-transition-duration: 0.2s; -webkit-transition-duration: 0.2s; transition-duration: 0.2s; } .js .field .radio.success, .js .field .checkbox.success { color: #58c026; color: #555555; } .js .field .radio.success i, .js .field .checkbox.success i { color: #58c026; } .js .field .radio.success span, .js .field .checkbox.success span { border-color: #58c026; color: #58c026; background: #c0eeaa; -moz-transition-duration: 0.2s; -o-transition-duration: 0.2s; -webkit-transition-duration: 0.2s; transition-duration: 0.2s; } .js .field .radio.checked i, .js .field .checkbox.checked i { position: absolute; top: -1px; left: -8px; line-height: 16px; } .js .field .radio span, .js .field .checkbox span { display: inline-block; width: 16px; height: 16px; position: relative; top: 2px; border: solid 1px #ccc; background: #fefefe; } .js .field .radio input[type="radio"], .js .field .radio input[type="checkbox"], .js .field .checkbox input[type="radio"], .js .field .checkbox input[type="checkbox"] { display: none; } .js .field .radio span { -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; } .js .field .checkbox span { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } .field .text input[type="search"] { -webkit-appearance: textfield; } /* Form Picker Element (" + ""; // Support: IE8, Opera 11-12.16 // Nothing should be selected when empty strings follow ^= or $= or *= // The test attribute must be unknown in Opera but "safe" for WinRT // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section if ( div.querySelectorAll("[msallowcapture^='']").length ) { rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); } // Support: IE8 // Boolean attributes and "value" are not treated correctly if ( !div.querySelectorAll("[selected]").length ) { rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); } // Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+ if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) { rbuggyQSA.push("~="); } // Webkit/Opera - :checked should return selected option elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked // IE8 throws error here and will not see later tests if ( !div.querySelectorAll(":checked").length ) { rbuggyQSA.push(":checked"); } // Support: Safari 8+, iOS 8+ // https://bugs.webkit.org/show_bug.cgi?id=136851 // In-page `selector#id sibing-combinator selector` fails if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) { rbuggyQSA.push(".#.+[+~]"); } }); assert(function( div ) { // Support: Windows 8 Native Apps // The type and name attributes are restricted during .innerHTML assignment var input = doc.createElement("input"); input.setAttribute( "type", "hidden" ); div.appendChild( input ).setAttribute( "name", "D" ); // Support: IE8 // Enforce case-sensitivity of name attribute if ( div.querySelectorAll("[name=d]").length ) { rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); } // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) // IE8 throws error here and will not see later tests if ( !div.querySelectorAll(":enabled").length ) { rbuggyQSA.push( ":enabled", ":disabled" ); } // Opera 10-11 does not throw on post-comma invalid pseudos div.querySelectorAll("*,:x"); rbuggyQSA.push(",.*:"); }); } if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector) )) ) { assert(function( div ) { // Check to see if it's possible to do matchesSelector // on a disconnected node (IE 9) support.disconnectedMatch = matches.call( div, "div" ); // This should fail with an exception // Gecko does not error, returns false instead matches.call( div, "[s!='']:x" ); rbuggyMatches.push( "!=", pseudos ); }); } rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); /* Contains ---------------------------------------------------------------------- */ hasCompare = rnative.test( docElem.compareDocumentPosition ); // Element contains another // Purposefully does not implement inclusive descendent // As in, an element does not contain itself contains = hasCompare || rnative.test( docElem.contains ) ? function( a, b ) { var adown = a.nodeType === 9 ? a.documentElement : a, bup = b && b.parentNode; return a === bup || !!( bup && bup.nodeType === 1 && ( adown.contains ? adown.contains( bup ) : a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 )); } : function( a, b ) { if ( b ) { while ( (b = b.parentNode) ) { if ( b === a ) { return true; } } } return false; }; /* Sorting ---------------------------------------------------------------------- */ // Document order sorting sortOrder = hasCompare ? function( a, b ) { // Flag for duplicate removal if ( a === b ) { hasDuplicate = true; return 0; } // Sort on method existence if only one input has compareDocumentPosition var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; if ( compare ) { return compare; } // Calculate position if both inputs belong to the same document compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? a.compareDocumentPosition( b ) : // Otherwise we know they are disconnected 1; // Disconnected nodes if ( compare & 1 || (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { // Choose the first element that is related to our preferred document if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { return -1; } if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { return 1; } // Maintain original order return sortInput ? ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 0; } return compare & 4 ? -1 : 1; } : function( a, b ) { // Exit early if the nodes are identical if ( a === b ) { hasDuplicate = true; return 0; } var cur, i = 0, aup = a.parentNode, bup = b.parentNode, ap = [ a ], bp = [ b ]; // Parentless nodes are either documents or disconnected if ( !aup || !bup ) { return a === doc ? -1 : b === doc ? 1 : aup ? -1 : bup ? 1 : sortInput ? ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 0; // If the nodes are siblings, we can do a quick check } else if ( aup === bup ) { return siblingCheck( a, b ); } // Otherwise we need full lists of their ancestors for comparison cur = a; while ( (cur = cur.parentNode) ) { ap.unshift( cur ); } cur = b; while ( (cur = cur.parentNode) ) { bp.unshift( cur ); } // Walk down the tree looking for a discrepancy while ( ap[i] === bp[i] ) { i++; } return i ? // Do a sibling check if the nodes have a common ancestor siblingCheck( ap[i], bp[i] ) : // Otherwise nodes in our document sort first ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0; }; return doc; }; Sizzle.matches = function( expr, elements ) { return Sizzle( expr, null, null, elements ); }; Sizzle.matchesSelector = function( elem, expr ) { // Set document vars if needed if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } // Make sure that attribute selectors are quoted expr = expr.replace( rattributeQuotes, "='$1']" ); if ( support.matchesSelector && documentIsHTML && ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { try { var ret = matches.call( elem, expr ); // IE 9's matchesSelector returns false on disconnected nodes if ( ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document // fragment in IE 9 elem.document && elem.document.nodeType !== 11 ) { return ret; } } catch (e) {} } return Sizzle( expr, document, null, [ elem ] ).length > 0; }; Sizzle.contains = function( context, elem ) { // Set document vars if needed if ( ( context.ownerDocument || context ) !== document ) { setDocument( context ); } return contains( context, elem ); }; Sizzle.attr = function( elem, name ) { // Set document vars if needed if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } var fn = Expr.attrHandle[ name.toLowerCase() ], // Don't get fooled by Object.prototype properties (jQuery #13807) val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? fn( elem, name, !documentIsHTML ) : undefined; return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute( name ) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null; }; Sizzle.error = function( msg ) { throw new Error( "Syntax error, unrecognized expression: " + msg ); }; /** * Document sorting and removing duplicates * @param {ArrayLike} results */ Sizzle.uniqueSort = function( results ) { var elem, duplicates = [], j = 0, i = 0; // Unless we *know* we can detect duplicates, assume their presence hasDuplicate = !support.detectDuplicates; sortInput = !support.sortStable && results.slice( 0 ); results.sort( sortOrder ); if ( hasDuplicate ) { while ( (elem = results[i++]) ) { if ( elem === results[ i ] ) { j = duplicates.push( i ); } } while ( j-- ) { results.splice( duplicates[ j ], 1 ); } } // Clear input after sorting to release objects // See https://github.com/jquery/sizzle/pull/225 sortInput = null; return results; }; /** * Utility function for retrieving the text value of an array of DOM nodes * @param {Array|Element} elem */ getText = Sizzle.getText = function( elem ) { var node, ret = "", i = 0, nodeType = elem.nodeType; if ( !nodeType ) { // If no nodeType, this is expected to be an array while ( (node = elem[i++]) ) { // Do not traverse comment nodes ret += getText( node ); } } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { // Use textContent for elements // innerText usage removed for consistency of new lines (jQuery #11153) if ( typeof elem.textContent === "string" ) { return elem.textContent; } else { // Traverse its children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { ret += getText( elem ); } } } else if ( nodeType === 3 || nodeType === 4 ) { return elem.nodeValue; } // Do not include comment or processing instruction nodes return ret; }; Expr = Sizzle.selectors = { // Can be adjusted by the user cacheLength: 50, createPseudo: markFunction, match: matchExpr, attrHandle: {}, find: {}, relative: { ">": { dir: "parentNode", first: true }, " ": { dir: "parentNode" }, "+": { dir: "previousSibling", first: true }, "~": { dir: "previousSibling" } }, preFilter: { "ATTR": function( match ) { match[1] = match[1].replace( runescape, funescape ); // Move the given value to match[3] whether quoted or unquoted match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); if ( match[2] === "~=" ) { match[3] = " " + match[3] + " "; } return match.slice( 0, 4 ); }, "CHILD": function( match ) { /* matches from matchExpr["CHILD"] 1 type (only|nth|...) 2 what (child|of-type) 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 4 xn-component of xn+y argument ([+-]?\d*n|) 5 sign of xn-component 6 x of xn-component 7 sign of y-component 8 y of y-component */ match[1] = match[1].toLowerCase(); if ( match[1].slice( 0, 3 ) === "nth" ) { // nth-* requires argument if ( !match[3] ) { Sizzle.error( match[0] ); } // numeric x and y parameters for Expr.filter.CHILD // remember that false/true cast respectively to 0/1 match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); // other types prohibit arguments } else if ( match[3] ) { Sizzle.error( match[0] ); } return match; }, "PSEUDO": function( match ) { var excess, unquoted = !match[6] && match[2]; if ( matchExpr["CHILD"].test( match[0] ) ) { return null; } // Accept quoted arguments as-is if ( match[3] ) { match[2] = match[4] || match[5] || ""; // Strip excess characters from unquoted arguments } else if ( unquoted && rpseudo.test( unquoted ) && // Get excess from tokenize (recursively) (excess = tokenize( unquoted, true )) && // advance to the next closing parenthesis (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { // excess is a negative index match[0] = match[0].slice( 0, excess ); match[2] = unquoted.slice( 0, excess ); } // Return only captures needed by the pseudo filter method (type and argument) return match.slice( 0, 3 ); } }, filter: { "TAG": function( nodeNameSelector ) { var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); return nodeNameSelector === "*" ? function() { return true; } : function( elem ) { return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; }; }, "CLASS": function( className ) { var pattern = classCache[ className + " " ]; return pattern || (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && classCache( className, function( elem ) { return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); }); }, "ATTR": function( name, operator, check ) { return function( elem ) { var result = Sizzle.attr( elem, name ); if ( result == null ) { return operator === "!="; } if ( !operator ) { return true; } result += ""; return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf( check ) === 0 : operator === "*=" ? check && result.indexOf( check ) > -1 : operator === "$=" ? check && result.slice( -check.length ) === check : operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : false; }; }, "CHILD": function( type, what, argument, first, last ) { var simple = type.slice( 0, 3 ) !== "nth", forward = type.slice( -4 ) !== "last", ofType = what === "of-type"; return first === 1 && last === 0 ? // Shortcut for :nth-*(n) function( elem ) { return !!elem.parentNode; } : function( elem, context, xml ) { var cache, outerCache, node, diff, nodeIndex, start, dir = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType; if ( parent ) { // :(first|last|only)-(child|of-type) if ( simple ) { while ( dir ) { node = elem; while ( (node = node[ dir ]) ) { if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { return false; } } // Reverse direction for :only-* (if we haven't yet done so) start = dir = type === "only" && !start && "nextSibling"; } return true; } start = [ forward ? parent.firstChild : parent.lastChild ]; // non-xml :nth-child(...) stores cache data on `parent` if ( forward && useCache ) { // Seek `elem` from a previously-cached index outerCache = parent[ expando ] || (parent[ expando ] = {}); cache = outerCache[ type ] || []; nodeIndex = cache[0] === dirruns && cache[1]; diff = cache[0] === dirruns && cache[2]; node = nodeIndex && parent.childNodes[ nodeIndex ]; while ( (node = ++nodeIndex && node && node[ dir ] || // Fallback to seeking `elem` from the start (diff = nodeIndex = 0) || start.pop()) ) { // When found, cache indexes on `parent` and break if ( node.nodeType === 1 && ++diff && node === elem ) { outerCache[ type ] = [ dirruns, nodeIndex, diff ]; break; } } // Use previously-cached element index if available } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { diff = cache[1]; // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) } else { // Use the same loop as above to seek `elem` from the start while ( (node = ++nodeIndex && node && node[ dir ] || (diff = nodeIndex = 0) || start.pop()) ) { if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { // Cache the index of each encountered element if ( useCache ) { (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; } if ( node === elem ) { break; } } } } // Incorporate the offset, then check against cycle size diff -= last; return diff === first || ( diff % first === 0 && diff / first >= 0 ); } }; }, "PSEUDO": function( pseudo, argument ) { // pseudo-class names are case-insensitive // http://www.w3.org/TR/selectors/#pseudo-classes // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters // Remember that setFilters inherits from pseudos var args, fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || Sizzle.error( "unsupported pseudo: " + pseudo ); // The user may use createPseudo to indicate that // arguments are needed to create the filter function // just as Sizzle does if ( fn[ expando ] ) { return fn( argument ); } // But maintain support for old signatures if ( fn.length > 1 ) { args = [ pseudo, pseudo, "", argument ]; return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? markFunction(function( seed, matches ) { var idx, matched = fn( seed, argument ), i = matched.length; while ( i-- ) { idx = indexOf( seed, matched[i] ); seed[ idx ] = !( matches[ idx ] = matched[i] ); } }) : function( elem ) { return fn( elem, 0, args ); }; } return fn; } }, pseudos: { // Potentially complex pseudos "not": markFunction(function( selector ) { // Trim the selector passed to compile // to avoid treating leading and trailing // spaces as combinators var input = [], results = [], matcher = compile( selector.replace( rtrim, "$1" ) ); return matcher[ expando ] ? markFunction(function( seed, matches, context, xml ) { var elem, unmatched = matcher( seed, null, xml, [] ), i = seed.length; // Match elements unmatched by `matcher` while ( i-- ) { if ( (elem = unmatched[i]) ) { seed[i] = !(matches[i] = elem); } } }) : function( elem, context, xml ) { input[0] = elem; matcher( input, null, xml, results ); // Don't keep the element (issue #299) input[0] = null; return !results.pop(); }; }), "has": markFunction(function( selector ) { return function( elem ) { return Sizzle( selector, elem ).length > 0; }; }), "contains": markFunction(function( text ) { text = text.replace( runescape, funescape ); return function( elem ) { return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; }; }), // "Whether an element is represented by a :lang() selector // is based solely on the element's language value // being equal to the identifier C, // or beginning with the identifier C immediately followed by "-". // The matching of C against the element's language value is performed case-insensitively. // The identifier C does not have to be a valid language name." // http://www.w3.org/TR/selectors/#lang-pseudo "lang": markFunction( function( lang ) { // lang value must be a valid identifier if ( !ridentifier.test(lang || "") ) { Sizzle.error( "unsupported lang: " + lang ); } lang = lang.replace( runescape, funescape ).toLowerCase(); return function( elem ) { var elemLang; do { if ( (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { elemLang = elemLang.toLowerCase(); return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; } } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); return false; }; }), // Miscellaneous "target": function( elem ) { var hash = window.location && window.location.hash; return hash && hash.slice( 1 ) === elem.id; }, "root": function( elem ) { return elem === docElem; }, "focus": function( elem ) { return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); }, // Boolean properties "enabled": function( elem ) { return elem.disabled === false; }, "disabled": function( elem ) { return elem.disabled === true; }, "checked": function( elem ) { // In CSS3, :checked should return both checked and selected elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked var nodeName = elem.nodeName.toLowerCase(); return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); }, "selected": function( elem ) { // Accessing this property makes selected-by-default // options in Safari work properly if ( elem.parentNode ) { elem.parentNode.selectedIndex; } return elem.selected === true; }, // Contents "empty": function( elem ) { // http://www.w3.org/TR/selectors/#empty-pseudo // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), // but not by others (comment: 8; processing instruction: 7; etc.) // nodeType < 6 works because attributes (2) do not appear as children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { if ( elem.nodeType < 6 ) { return false; } } return true; }, "parent": function( elem ) { return !Expr.pseudos["empty"]( elem ); }, // Element/input types "header": function( elem ) { return rheader.test( elem.nodeName ); }, "input": function( elem ) { return rinputs.test( elem.nodeName ); }, "button": function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === "button" || name === "button"; }, "text": function( elem ) { var attr; return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && // Support: IE<8 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); }, // Position-in-collection "first": createPositionalPseudo(function() { return [ 0 ]; }), "last": createPositionalPseudo(function( matchIndexes, length ) { return [ length - 1 ]; }), "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { return [ argument < 0 ? argument + length : argument ]; }), "even": createPositionalPseudo(function( matchIndexes, length ) { var i = 0; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; }), "odd": createPositionalPseudo(function( matchIndexes, length ) { var i = 1; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; }), "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; --i >= 0; ) { matchIndexes.push( i ); } return matchIndexes; }), "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; ++i < length; ) { matchIndexes.push( i ); } return matchIndexes; }) } }; Expr.pseudos["nth"] = Expr.pseudos["eq"]; // Add button/input type pseudos for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { Expr.pseudos[ i ] = createInputPseudo( i ); } for ( i in { submit: true, reset: true } ) { Expr.pseudos[ i ] = createButtonPseudo( i ); } // Easy API for creating new setFilters function setFilters() {} setFilters.prototype = Expr.filters = Expr.pseudos; Expr.setFilters = new setFilters(); tokenize = Sizzle.tokenize = function( selector, parseOnly ) { var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[ selector + " " ]; if ( cached ) { return parseOnly ? 0 : cached.slice( 0 ); } soFar = selector; groups = []; preFilters = Expr.preFilter; while ( soFar ) { // Comma and first run if ( !matched || (match = rcomma.exec( soFar )) ) { if ( match ) { // Don't consume trailing commas as valid soFar = soFar.slice( match[0].length ) || soFar; } groups.push( (tokens = []) ); } matched = false; // Combinators if ( (match = rcombinators.exec( soFar )) ) { matched = match.shift(); tokens.push({ value: matched, // Cast descendant combinators to space type: match[0].replace( rtrim, " " ) }); soFar = soFar.slice( matched.length ); } // Filters for ( type in Expr.filter ) { if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || (match = preFilters[ type ]( match ))) ) { matched = match.shift(); tokens.push({ value: matched, type: type, matches: match }); soFar = soFar.slice( matched.length ); } } if ( !matched ) { break; } } // Return the length of the invalid excess // if we're just parsing // Otherwise, throw an error or return tokens return parseOnly ? soFar.length : soFar ? Sizzle.error( selector ) : // Cache the tokens tokenCache( selector, groups ).slice( 0 ); }; function toSelector( tokens ) { var i = 0, len = tokens.length, selector = ""; for ( ; i < len; i++ ) { selector += tokens[i].value; } return selector; } function addCombinator( matcher, combinator, base ) { var dir = combinator.dir, checkNonElements = base && dir === "parentNode", doneName = done++; return combinator.first ? // Check against closest ancestor/preceding element function( elem, context, xml ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { return matcher( elem, context, xml ); } } } : // Check against all ancestor/preceding elements function( elem, context, xml ) { var oldCache, outerCache, newCache = [ dirruns, doneName ]; // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching if ( xml ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { if ( matcher( elem, context, xml ) ) { return true; } } } } else { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { outerCache = elem[ expando ] || (elem[ expando ] = {}); if ( (oldCache = outerCache[ dir ]) && oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { // Assign to newCache so results back-propagate to previous elements return (newCache[ 2 ] = oldCache[ 2 ]); } else { // Reuse newcache so results back-propagate to previous elements outerCache[ dir ] = newCache; // A match means we're done; a fail means we have to keep checking if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { return true; } } } } } }; } function elementMatcher( matchers ) { return matchers.length > 1 ? function( elem, context, xml ) { var i = matchers.length; while ( i-- ) { if ( !matchers[i]( elem, context, xml ) ) { return false; } } return true; } : matchers[0]; } function multipleContexts( selector, contexts, results ) { var i = 0, len = contexts.length; for ( ; i < len; i++ ) { Sizzle( selector, contexts[i], results ); } return results; } function condense( unmatched, map, filter, context, xml ) { var elem, newUnmatched = [], i = 0, len = unmatched.length, mapped = map != null; for ( ; i < len; i++ ) { if ( (elem = unmatched[i]) ) { if ( !filter || filter( elem, context, xml ) ) { newUnmatched.push( elem ); if ( mapped ) { map.push( i ); } } } } return newUnmatched; } function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { if ( postFilter && !postFilter[ expando ] ) { postFilter = setMatcher( postFilter ); } if ( postFinder && !postFinder[ expando ] ) { postFinder = setMatcher( postFinder, postSelector ); } return markFunction(function( seed, results, context, xml ) { var temp, i, elem, preMap = [], postMap = [], preexisting = results.length, // Get initial elements from seed or context elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), // Prefilter to get matcher input, preserving a map for seed-results synchronization matcherIn = preFilter && ( seed || !selector ) ? condense( elems, preMap, preFilter, context, xml ) : elems, matcherOut = matcher ? // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, postFinder || ( seed ? preFilter : preexisting || postFilter ) ? // ...intermediate processing is necessary [] : // ...otherwise use results directly results : matcherIn; // Find primary matches if ( matcher ) { matcher( matcherIn, matcherOut, context, xml ); } // Apply postFilter if ( postFilter ) { temp = condense( matcherOut, postMap ); postFilter( temp, [], context, xml ); // Un-match failing elements by moving them back to matcherIn i = temp.length; while ( i-- ) { if ( (elem = temp[i]) ) { matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); } } } if ( seed ) { if ( postFinder || preFilter ) { if ( postFinder ) { // Get the final matcherOut by condensing this intermediate into postFinder contexts temp = []; i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) ) { // Restore matcherIn since elem is not yet a final match temp.push( (matcherIn[i] = elem) ); } } postFinder( null, (matcherOut = []), temp, xml ); } // Move matched elements from seed to results to keep them synchronized i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) && (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { seed[temp] = !(results[temp] = elem); } } } // Add elements to results, through postFinder if defined } else { matcherOut = condense( matcherOut === results ? matcherOut.splice( preexisting, matcherOut.length ) : matcherOut ); if ( postFinder ) { postFinder( null, results, matcherOut, xml ); } else { push.apply( results, matcherOut ); } } }); } function matcherFromTokens( tokens ) { var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[ tokens[0].type ], implicitRelative = leadingRelative || Expr.relative[" "], i = leadingRelative ? 1 : 0, // The foundational matcher ensures that elements are reachable from top-level context(s) matchContext = addCombinator( function( elem ) { return elem === checkContext; }, implicitRelative, true ), matchAnyContext = addCombinator( function( elem ) { return indexOf( checkContext, elem ) > -1; }, implicitRelative, true ), matchers = [ function( elem, context, xml ) { var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( (checkContext = context).nodeType ? matchContext( elem, context, xml ) : matchAnyContext( elem, context, xml ) ); // Avoid hanging onto element (issue #299) checkContext = null; return ret; } ]; for ( ; i < len; i++ ) { if ( (matcher = Expr.relative[ tokens[i].type ]) ) { matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; } else { matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); // Return special upon seeing a positional matcher if ( matcher[ expando ] ) { // Find the next relative operator (if any) for proper handling j = ++i; for ( ; j < len; j++ ) { if ( Expr.relative[ tokens[j].type ] ) { break; } } return setMatcher( i > 1 && elementMatcher( matchers ), i > 1 && toSelector( // If the preceding token was a descendant combinator, insert an implicit any-element `*` tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) ).replace( rtrim, "$1" ), matcher, i < j && matcherFromTokens( tokens.slice( i, j ) ), j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), j < len && toSelector( tokens ) ); } matchers.push( matcher ); } } return elementMatcher( matchers ); } function matcherFromGroupMatchers( elementMatchers, setMatchers ) { var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function( seed, context, xml, results, outermost ) { var elem, j, matcher, matchedCount = 0, i = "0", unmatched = seed && [], setMatched = [], contextBackup = outermostContext, // We must always have either seed elements or outermost context elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), // Use integer dirruns iff this is the outermost matcher dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), len = elems.length; if ( outermost ) { outermostContext = context !== document && context; } // Add elements passing elementMatchers directly to results // Keep `i` a string if there are no elements so `matchedCount` will be "00" below // Support: IE<9, Safari // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id for ( ; i !== len && (elem = elems[i]) != null; i++ ) { if ( byElement && elem ) { j = 0; while ( (matcher = elementMatchers[j++]) ) { if ( matcher( elem, context, xml ) ) { results.push( elem ); break; } } if ( outermost ) { dirruns = dirrunsUnique; } } // Track unmatched elements for set filters if ( bySet ) { // They will have gone through all possible matchers if ( (elem = !matcher && elem) ) { matchedCount--; } // Lengthen the array for every element, matched or not if ( seed ) { unmatched.push( elem ); } } } // Apply set filters to unmatched elements matchedCount += i; if ( bySet && i !== matchedCount ) { j = 0; while ( (matcher = setMatchers[j++]) ) { matcher( unmatched, setMatched, context, xml ); } if ( seed ) { // Reintegrate element matches to eliminate the need for sorting if ( matchedCount > 0 ) { while ( i-- ) { if ( !(unmatched[i] || setMatched[i]) ) { setMatched[i] = pop.call( results ); } } } // Discard index placeholder values to get only actual matches setMatched = condense( setMatched ); } // Add matches to results push.apply( results, setMatched ); // Seedless set matches succeeding multiple successful matchers stipulate sorting if ( outermost && !seed && setMatched.length > 0 && ( matchedCount + setMatchers.length ) > 1 ) { Sizzle.uniqueSort( results ); } } // Override manipulation of globals by nested matchers if ( outermost ) { dirruns = dirrunsUnique; outermostContext = contextBackup; } return unmatched; }; return bySet ? markFunction( superMatcher ) : superMatcher; } compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { var i, setMatchers = [], elementMatchers = [], cached = compilerCache[ selector + " " ]; if ( !cached ) { // Generate a function of recursive functions that can be used to check each element if ( !match ) { match = tokenize( selector ); } i = match.length; while ( i-- ) { cached = matcherFromTokens( match[i] ); if ( cached[ expando ] ) { setMatchers.push( cached ); } else { elementMatchers.push( cached ); } } // Cache the compiled function cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); // Save selector and tokenization cached.selector = selector; } return cached; }; /** * A low-level selection function that works with Sizzle's compiled * selector functions * @param {String|Function} selector A selector or a pre-compiled * selector function built with Sizzle.compile * @param {Element} context * @param {Array} [results] * @param {Array} [seed] A set of elements to match against */ select = Sizzle.select = function( selector, context, results, seed ) { var i, tokens, token, type, find, compiled = typeof selector === "function" && selector, match = !seed && tokenize( (selector = compiled.selector || selector) ); results = results || []; // Try to minimize operations if there is no seed and only one group if ( match.length === 1 ) { // Take a shortcut and set the context if the root selector is an ID tokens = match[0] = match[0].slice( 0 ); if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && support.getById && context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) { context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; if ( !context ) { return results; // Precompiled matchers will still verify ancestry, so step up a level } else if ( compiled ) { context = context.parentNode; } selector = selector.slice( tokens.shift().value.length ); } // Fetch a seed set for right-to-left matching i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; while ( i-- ) { token = tokens[i]; // Abort if we hit a combinator if ( Expr.relative[ (type = token.type) ] ) { break; } if ( (find = Expr.find[ type ]) ) { // Search, expanding context for leading sibling combinators if ( (seed = find( token.matches[0].replace( runescape, funescape ), rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context )) ) { // If seed is empty or no tokens remain, we can return early tokens.splice( i, 1 ); selector = seed.length && toSelector( tokens ); if ( !selector ) { push.apply( results, seed ); return results; } break; } } } } // Compile and execute a filtering function if one is not provided // Provide `match` to avoid retokenization if we modified the selector above ( compiled || compile( selector, match ) )( seed, context, !documentIsHTML, results, rsibling.test( selector ) && testContext( context.parentNode ) || context ); return results; }; // One-time assignments // Sort stability support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; // Support: Chrome 14-35+ // Always assume duplicates if they aren't passed to the comparison function support.detectDuplicates = !!hasDuplicate; // Initialize against the default document setDocument(); // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) // Detached nodes confoundingly follow *each other* support.sortDetached = assert(function( div1 ) { // Should return 1, but returns 4 (following) return div1.compareDocumentPosition( document.createElement("div") ) & 1; }); // Support: IE<8 // Prevent attribute/property "interpolation" // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx if ( !assert(function( div ) { div.innerHTML = ""; return div.firstChild.getAttribute("href") === "#" ; }) ) { addHandle( "type|href|height|width", function( elem, name, isXML ) { if ( !isXML ) { return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); } }); } // Support: IE<9 // Use defaultValue in place of getAttribute("value") if ( !support.attributes || !assert(function( div ) { div.innerHTML = ""; div.firstChild.setAttribute( "value", "" ); return div.firstChild.getAttribute( "value" ) === ""; }) ) { addHandle( "value", function( elem, name, isXML ) { if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { return elem.defaultValue; } }); } // Support: IE<9 // Use getAttributeNode to fetch booleans when getAttribute lies if ( !assert(function( div ) { return div.getAttribute("disabled") == null; }) ) { addHandle( booleans, function( elem, name, isXML ) { var val; if ( !isXML ) { return elem[ name ] === true ? name.toLowerCase() : (val = elem.getAttributeNode( name )) && val.specified ? val.value : null; } }); } return Sizzle; })( window ); jQuery.find = Sizzle; jQuery.expr = Sizzle.selectors; jQuery.expr[":"] = jQuery.expr.pseudos; jQuery.unique = Sizzle.uniqueSort; jQuery.text = Sizzle.getText; jQuery.isXMLDoc = Sizzle.isXML; jQuery.contains = Sizzle.contains; var rneedsContext = jQuery.expr.match.needsContext; var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); var risSimple = /^.[^:#\[\.,]*$/; // Implement the identical functionality for filter and not function winnow( elements, qualifier, not ) { if ( jQuery.isFunction( qualifier ) ) { return jQuery.grep( elements, function( elem, i ) { /* jshint -W018 */ return !!qualifier.call( elem, i, elem ) !== not; }); } if ( qualifier.nodeType ) { return jQuery.grep( elements, function( elem ) { return ( elem === qualifier ) !== not; }); } if ( typeof qualifier === "string" ) { if ( risSimple.test( qualifier ) ) { return jQuery.filter( qualifier, elements, not ); } qualifier = jQuery.filter( qualifier, elements ); } return jQuery.grep( elements, function( elem ) { return ( indexOf.call( qualifier, elem ) >= 0 ) !== not; }); } jQuery.filter = function( expr, elems, not ) { var elem = elems[ 0 ]; if ( not ) { expr = ":not(" + expr + ")"; } return elems.length === 1 && elem.nodeType === 1 ? jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { return elem.nodeType === 1; })); }; jQuery.fn.extend({ find: function( selector ) { var i, len = this.length, ret = [], self = this; if ( typeof selector !== "string" ) { return this.pushStack( jQuery( selector ).filter(function() { for ( i = 0; i < len; i++ ) { if ( jQuery.contains( self[ i ], this ) ) { return true; } } }) ); } for ( i = 0; i < len; i++ ) { jQuery.find( selector, self[ i ], ret ); } // Needed because $( selector, context ) becomes $( context ).find( selector ) ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); ret.selector = this.selector ? this.selector + " " + selector : selector; return ret; }, filter: function( selector ) { return this.pushStack( winnow(this, selector || [], false) ); }, not: function( selector ) { return this.pushStack( winnow(this, selector || [], true) ); }, is: function( selector ) { return !!winnow( this, // If this is a positional/relative selector, check membership in the returned set // so $("p:first").is("p:last") won't return true for a doc with two "p". typeof selector === "string" && rneedsContext.test( selector ) ? jQuery( selector ) : selector || [], false ).length; } }); // Initialize a jQuery object // A central reference to the root jQuery(document) var rootjQuery, // A simple way to check for HTML strings // Prioritize #id over to avoid XSS via location.hash (#9521) // Strict HTML recognition (#11290: must start with <) rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, init = jQuery.fn.init = function( selector, context ) { var match, elem; // HANDLE: $(""), $(null), $(undefined), $(false) if ( !selector ) { return this; } // Handle HTML strings if ( typeof selector === "string" ) { if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) { // Assume that strings that start and end with <> are HTML and skip the regex check match = [ null, selector, null ]; } else { match = rquickExpr.exec( selector ); } // Match html or make sure no context is specified for #id if ( match && (match[1] || !context) ) { // HANDLE: $(html) -> $(array) if ( match[1] ) { context = context instanceof jQuery ? context[0] : context; // Option to run scripts is true for back-compat // Intentionally let the error be thrown if parseHTML is not present jQuery.merge( this, jQuery.parseHTML( match[1], context && context.nodeType ? context.ownerDocument || context : document, true ) ); // HANDLE: $(html, props) if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { for ( match in context ) { // Properties of context are called as methods if possible if ( jQuery.isFunction( this[ match ] ) ) { this[ match ]( context[ match ] ); // ...and otherwise set as attributes } else { this.attr( match, context[ match ] ); } } } return this; // HANDLE: $(#id) } else { elem = document.getElementById( match[2] ); // Support: Blackberry 4.6 // gEBID returns nodes no longer in the document (#6963) if ( elem && elem.parentNode ) { // Inject the element directly into the jQuery object this.length = 1; this[0] = elem; } this.context = document; this.selector = selector; return this; } // HANDLE: $(expr, $(...)) } else if ( !context || context.jquery ) { return ( context || rootjQuery ).find( selector ); // HANDLE: $(expr, context) // (which is just equivalent to: $(context).find(expr) } else { return this.constructor( context ).find( selector ); } // HANDLE: $(DOMElement) } else if ( selector.nodeType ) { this.context = this[0] = selector; this.length = 1; return this; // HANDLE: $(function) // Shortcut for document ready } else if ( jQuery.isFunction( selector ) ) { return typeof rootjQuery.ready !== "undefined" ? rootjQuery.ready( selector ) : // Execute immediately if ready is not present selector( jQuery ); } if ( selector.selector !== undefined ) { this.selector = selector.selector; this.context = selector.context; } return jQuery.makeArray( selector, this ); }; // Give the init function the jQuery prototype for later instantiation init.prototype = jQuery.fn; // Initialize central reference rootjQuery = jQuery( document ); var rparentsprev = /^(?:parents|prev(?:Until|All))/, // Methods guaranteed to produce a unique set when starting from a unique set guaranteedUnique = { children: true, contents: true, next: true, prev: true }; jQuery.extend({ dir: function( elem, dir, until ) { var matched = [], truncate = until !== undefined; while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) { if ( elem.nodeType === 1 ) { if ( truncate && jQuery( elem ).is( until ) ) { break; } matched.push( elem ); } } return matched; }, sibling: function( n, elem ) { var matched = []; for ( ; n; n = n.nextSibling ) { if ( n.nodeType === 1 && n !== elem ) { matched.push( n ); } } return matched; } }); jQuery.fn.extend({ has: function( target ) { var targets = jQuery( target, this ), l = targets.length; return this.filter(function() { var i = 0; for ( ; i < l; i++ ) { if ( jQuery.contains( this, targets[i] ) ) { return true; } } }); }, closest: function( selectors, context ) { var cur, i = 0, l = this.length, matched = [], pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? jQuery( selectors, context || this.context ) : 0; for ( ; i < l; i++ ) { for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { // Always skip document fragments if ( cur.nodeType < 11 && (pos ? pos.index(cur) > -1 : // Don't pass non-elements to Sizzle cur.nodeType === 1 && jQuery.find.matchesSelector(cur, selectors)) ) { matched.push( cur ); break; } } } return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); }, // Determine the position of an element within the set index: function( elem ) { // No argument, return index in parent if ( !elem ) { return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; } // Index in selector if ( typeof elem === "string" ) { return indexOf.call( jQuery( elem ), this[ 0 ] ); } // Locate the position of the desired element return indexOf.call( this, // If it receives a jQuery object, the first element is used elem.jquery ? elem[ 0 ] : elem ); }, add: function( selector, context ) { return this.pushStack( jQuery.unique( jQuery.merge( this.get(), jQuery( selector, context ) ) ) ); }, addBack: function( selector ) { return this.add( selector == null ? this.prevObject : this.prevObject.filter(selector) ); } }); function sibling( cur, dir ) { while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {} return cur; } jQuery.each({ parent: function( elem ) { var parent = elem.parentNode; return parent && parent.nodeType !== 11 ? parent : null; }, parents: function( elem ) { return jQuery.dir( elem, "parentNode" ); }, parentsUntil: function( elem, i, until ) { return jQuery.dir( elem, "parentNode", until ); }, next: function( elem ) { return sibling( elem, "nextSibling" ); }, prev: function( elem ) { return sibling( elem, "previousSibling" ); }, nextAll: function( elem ) { return jQuery.dir( elem, "nextSibling" ); }, prevAll: function( elem ) { return jQuery.dir( elem, "previousSibling" ); }, nextUntil: function( elem, i, until ) { return jQuery.dir( elem, "nextSibling", until ); }, prevUntil: function( elem, i, until ) { return jQuery.dir( elem, "previousSibling", until ); }, siblings: function( elem ) { return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); }, children: function( elem ) { return jQuery.sibling( elem.firstChild ); }, contents: function( elem ) { return elem.contentDocument || jQuery.merge( [], elem.childNodes ); } }, function( name, fn ) { jQuery.fn[ name ] = function( until, selector ) { var matched = jQuery.map( this, fn, until ); if ( name.slice( -5 ) !== "Until" ) { selector = until; } if ( selector && typeof selector === "string" ) { matched = jQuery.filter( selector, matched ); } if ( this.length > 1 ) { // Remove duplicates if ( !guaranteedUnique[ name ] ) { jQuery.unique( matched ); } // Reverse order for parents* and prev-derivatives if ( rparentsprev.test( name ) ) { matched.reverse(); } } return this.pushStack( matched ); }; }); var rnotwhite = (/\S+/g); // String to Object options format cache var optionsCache = {}; // Convert String-formatted options into Object-formatted ones and store in cache function createOptions( options ) { var object = optionsCache[ options ] = {}; jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { object[ flag ] = true; }); return object; } /* * Create a callback list using the following parameters: * * options: an optional list of space-separated options that will change how * the callback list behaves or a more traditional option object * * By default a callback list will act like an event callback list and can be * "fired" multiple times. * * Possible options: * * once: will ensure the callback list can only be fired once (like a Deferred) * * memory: will keep track of previous values and will call any callback added * after the list has been fired right away with the latest "memorized" * values (like a Deferred) * * unique: will ensure a callback can only be added once (no duplicate in the list) * * stopOnFalse: interrupt callings when a callback returns false * */ jQuery.Callbacks = function( options ) { // Convert options from String-formatted to Object-formatted if needed // (we check in cache first) options = typeof options === "string" ? ( optionsCache[ options ] || createOptions( options ) ) : jQuery.extend( {}, options ); var // Last fire value (for non-forgettable lists) memory, // Flag to know if list was already fired fired, // Flag to know if list is currently firing firing, // First callback to fire (used internally by add and fireWith) firingStart, // End of the loop when firing firingLength, // Index of currently firing callback (modified by remove if needed) firingIndex, // Actual callback list list = [], // Stack of fire calls for repeatable lists stack = !options.once && [], // Fire callbacks fire = function( data ) { memory = options.memory && data; fired = true; firingIndex = firingStart || 0; firingStart = 0; firingLength = list.length; firing = true; for ( ; list && firingIndex < firingLength; firingIndex++ ) { if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { memory = false; // To prevent further calls using add break; } } firing = false; if ( list ) { if ( stack ) { if ( stack.length ) { fire( stack.shift() ); } } else if ( memory ) { list = []; } else { self.disable(); } } }, // Actual Callbacks object self = { // Add a callback or a collection of callbacks to the list add: function() { if ( list ) { // First, we save the current length var start = list.length; (function add( args ) { jQuery.each( args, function( _, arg ) { var type = jQuery.type( arg ); if ( type === "function" ) { if ( !options.unique || !self.has( arg ) ) { list.push( arg ); } } else if ( arg && arg.length && type !== "string" ) { // Inspect recursively add( arg ); } }); })( arguments ); // Do we need to add the callbacks to the // current firing batch? if ( firing ) { firingLength = list.length; // With memory, if we're not firing then // we should call right away } else if ( memory ) { firingStart = start; fire( memory ); } } return this; }, // Remove a callback from the list remove: function() { if ( list ) { jQuery.each( arguments, function( _, arg ) { var index; while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { list.splice( index, 1 ); // Handle firing indexes if ( firing ) { if ( index <= firingLength ) { firingLength--; } if ( index <= firingIndex ) { firingIndex--; } } } }); } return this; }, // Check if a given callback is in the list. // If no argument is given, return whether or not list has callbacks attached. has: function( fn ) { return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); }, // Remove all callbacks from the list empty: function() { list = []; firingLength = 0; return this; }, // Have the list do nothing anymore disable: function() { list = stack = memory = undefined; return this; }, // Is it disabled? disabled: function() { return !list; }, // Lock the list in its current state lock: function() { stack = undefined; if ( !memory ) { self.disable(); } return this; }, // Is it locked? locked: function() { return !stack; }, // Call all callbacks with the given context and arguments fireWith: function( context, args ) { if ( list && ( !fired || stack ) ) { args = args || []; args = [ context, args.slice ? args.slice() : args ]; if ( firing ) { stack.push( args ); } else { fire( args ); } } return this; }, // Call all the callbacks with the given arguments fire: function() { self.fireWith( this, arguments ); return this; }, // To know if the callbacks have already been called at least once fired: function() { return !!fired; } }; return self; }; jQuery.extend({ Deferred: function( func ) { var tuples = [ // action, add listener, listener list, final state [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], [ "notify", "progress", jQuery.Callbacks("memory") ] ], state = "pending", promise = { state: function() { return state; }, always: function() { deferred.done( arguments ).fail( arguments ); return this; }, then: function( /* fnDone, fnFail, fnProgress */ ) { var fns = arguments; return jQuery.Deferred(function( newDefer ) { jQuery.each( tuples, function( i, tuple ) { var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; // deferred[ done | fail | progress ] for forwarding actions to newDefer deferred[ tuple[1] ](function() { var returned = fn && fn.apply( this, arguments ); if ( returned && jQuery.isFunction( returned.promise ) ) { returned.promise() .done( newDefer.resolve ) .fail( newDefer.reject ) .progress( newDefer.notify ); } else { newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); } }); }); fns = null; }).promise(); }, // Get a promise for this deferred // If obj is provided, the promise aspect is added to the object promise: function( obj ) { return obj != null ? jQuery.extend( obj, promise ) : promise; } }, deferred = {}; // Keep pipe for back-compat promise.pipe = promise.then; // Add list-specific methods jQuery.each( tuples, function( i, tuple ) { var list = tuple[ 2 ], stateString = tuple[ 3 ]; // promise[ done | fail | progress ] = list.add promise[ tuple[1] ] = list.add; // Handle state if ( stateString ) { list.add(function() { // state = [ resolved | rejected ] state = stateString; // [ reject_list | resolve_list ].disable; progress_list.lock }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); } // deferred[ resolve | reject | notify ] deferred[ tuple[0] ] = function() { deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); return this; }; deferred[ tuple[0] + "With" ] = list.fireWith; }); // Make the deferred a promise promise.promise( deferred ); // Call given func if any if ( func ) { func.call( deferred, deferred ); } // All done! return deferred; }, // Deferred helper when: function( subordinate /* , ..., subordinateN */ ) { var i = 0, resolveValues = slice.call( arguments ), length = resolveValues.length, // the count of uncompleted subordinates remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, // the master Deferred. If resolveValues consist of only a single Deferred, just use that. deferred = remaining === 1 ? subordinate : jQuery.Deferred(), // Update function for both resolve and progress values updateFunc = function( i, contexts, values ) { return function( value ) { contexts[ i ] = this; values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; if ( values === progressValues ) { deferred.notifyWith( contexts, values ); } else if ( !( --remaining ) ) { deferred.resolveWith( contexts, values ); } }; }, progressValues, progressContexts, resolveContexts; // Add listeners to Deferred subordinates; treat others as resolved if ( length > 1 ) { progressValues = new Array( length ); progressContexts = new Array( length ); resolveContexts = new Array( length ); for ( ; i < length; i++ ) { if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { resolveValues[ i ].promise() .done( updateFunc( i, resolveContexts, resolveValues ) ) .fail( deferred.reject ) .progress( updateFunc( i, progressContexts, progressValues ) ); } else { --remaining; } } } // If we're not waiting on anything, resolve the master if ( !remaining ) { deferred.resolveWith( resolveContexts, resolveValues ); } return deferred.promise(); } }); // The deferred used on DOM ready var readyList; jQuery.fn.ready = function( fn ) { // Add the callback jQuery.ready.promise().done( fn ); return this; }; jQuery.extend({ // Is the DOM ready to be used? Set to true once it occurs. isReady: false, // A counter to track how many items to wait for before // the ready event fires. See #6781 readyWait: 1, // Hold (or release) the ready event holdReady: function( hold ) { if ( hold ) { jQuery.readyWait++; } else { jQuery.ready( true ); } }, // Handle when the DOM is ready ready: function( wait ) { // Abort if there are pending holds or we're already ready if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { return; } // Remember that the DOM is ready jQuery.isReady = true; // If a normal DOM Ready event fired, decrement, and wait if need be if ( wait !== true && --jQuery.readyWait > 0 ) { return; } // If there are functions bound, to execute readyList.resolveWith( document, [ jQuery ] ); // Trigger any bound ready events if ( jQuery.fn.triggerHandler ) { jQuery( document ).triggerHandler( "ready" ); jQuery( document ).off( "ready" ); } } }); /** * The ready event handler and self cleanup method */ function completed() { document.removeEventListener( "DOMContentLoaded", completed, false ); window.removeEventListener( "load", completed, false ); jQuery.ready(); } jQuery.ready.promise = function( obj ) { if ( !readyList ) { readyList = jQuery.Deferred(); // Catch cases where $(document).ready() is called after the browser event has already occurred. // We once tried to use readyState "interactive" here, but it caused issues like the one // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 if ( document.readyState === "complete" ) { // Handle it asynchronously to allow scripts the opportunity to delay ready setTimeout( jQuery.ready ); } else { // Use the handy event callback document.addEventListener( "DOMContentLoaded", completed, false ); // A fallback to window.onload, that will always work window.addEventListener( "load", completed, false ); } } return readyList.promise( obj ); }; // Kick off the DOM ready check even if the user does not jQuery.ready.promise(); // Multifunctional method to get and set values of a collection // The value/s can optionally be executed if it's a function var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { var i = 0, len = elems.length, bulk = key == null; // Sets many values if ( jQuery.type( key ) === "object" ) { chainable = true; for ( i in key ) { jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); } // Sets one value } else if ( value !== undefined ) { chainable = true; if ( !jQuery.isFunction( value ) ) { raw = true; } if ( bulk ) { // Bulk operations run against the entire set if ( raw ) { fn.call( elems, value ); fn = null; // ...except when executing function values } else { bulk = fn; fn = function( elem, key, value ) { return bulk.call( jQuery( elem ), value ); }; } } if ( fn ) { for ( ; i < len; i++ ) { fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); } } } return chainable ? elems : // Gets bulk ? fn.call( elems ) : len ? fn( elems[0], key ) : emptyGet; }; /** * Determines whether an object can have data */ jQuery.acceptData = function( owner ) { // Accepts only: // - Node // - Node.ELEMENT_NODE // - Node.DOCUMENT_NODE // - Object // - Any /* jshint -W018 */ return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); }; function Data() { // Support: Android<4, // Old WebKit does not have Object.preventExtensions/freeze method, // return new empty object instead with no [[set]] accessor Object.defineProperty( this.cache = {}, 0, { get: function() { return {}; } }); this.expando = jQuery.expando + Data.uid++; } Data.uid = 1; Data.accepts = jQuery.acceptData; Data.prototype = { key: function( owner ) { // We can accept data for non-element nodes in modern browsers, // but we should not, see #8335. // Always return the key for a frozen object. if ( !Data.accepts( owner ) ) { return 0; } var descriptor = {}, // Check if the owner object already has a cache key unlock = owner[ this.expando ]; // If not, create one if ( !unlock ) { unlock = Data.uid++; // Secure it in a non-enumerable, non-writable property try { descriptor[ this.expando ] = { value: unlock }; Object.defineProperties( owner, descriptor ); // Support: Android<4 // Fallback to a less secure definition } catch ( e ) { descriptor[ this.expando ] = unlock; jQuery.extend( owner, descriptor ); } } // Ensure the cache object if ( !this.cache[ unlock ] ) { this.cache[ unlock ] = {}; } return unlock; }, set: function( owner, data, value ) { var prop, // There may be an unlock assigned to this node, // if there is no entry for this "owner", create one inline // and set the unlock as though an owner entry had always existed unlock = this.key( owner ), cache = this.cache[ unlock ]; // Handle: [ owner, key, value ] args if ( typeof data === "string" ) { cache[ data ] = value; // Handle: [ owner, { properties } ] args } else { // Fresh assignments by object are shallow copied if ( jQuery.isEmptyObject( cache ) ) { jQuery.extend( this.cache[ unlock ], data ); // Otherwise, copy the properties one-by-one to the cache object } else { for ( prop in data ) { cache[ prop ] = data[ prop ]; } } } return cache; }, get: function( owner, key ) { // Either a valid cache is found, or will be created. // New caches will be created and the unlock returned, // allowing direct access to the newly created // empty data object. A valid owner object must be provided. var cache = this.cache[ this.key( owner ) ]; return key === undefined ? cache : cache[ key ]; }, access: function( owner, key, value ) { var stored; // In cases where either: // // 1. No key was specified // 2. A string key was specified, but no value provided // // Take the "read" path and allow the get method to determine // which value to return, respectively either: // // 1. The entire cache object // 2. The data stored at the key // if ( key === undefined || ((key && typeof key === "string") && value === undefined) ) { stored = this.get( owner, key ); return stored !== undefined ? stored : this.get( owner, jQuery.camelCase(key) ); } // [*]When the key is not a string, or both a key and value // are specified, set or extend (existing objects) with either: // // 1. An object of properties // 2. A key and value // this.set( owner, key, value ); // Since the "set" path can have two possible entry points // return the expected data based on which path was taken[*] return value !== undefined ? value : key; }, remove: function( owner, key ) { var i, name, camel, unlock = this.key( owner ), cache = this.cache[ unlock ]; if ( key === undefined ) { this.cache[ unlock ] = {}; } else { // Support array or space separated string of keys if ( jQuery.isArray( key ) ) { // If "name" is an array of keys... // When data is initially created, via ("key", "val") signature, // keys will be converted to camelCase. // Since there is no way to tell _how_ a key was added, remove // both plain key and camelCase key. #12786 // This will only penalize the array argument path. name = key.concat( key.map( jQuery.camelCase ) ); } else { camel = jQuery.camelCase( key ); // Try the string as a key before any manipulation if ( key in cache ) { name = [ key, camel ]; } else { // If a key with the spaces exists, use it. // Otherwise, create an array by matching non-whitespace name = camel; name = name in cache ? [ name ] : ( name.match( rnotwhite ) || [] ); } } i = name.length; while ( i-- ) { delete cache[ name[ i ] ]; } } }, hasData: function( owner ) { return !jQuery.isEmptyObject( this.cache[ owner[ this.expando ] ] || {} ); }, discard: function( owner ) { if ( owner[ this.expando ] ) { delete this.cache[ owner[ this.expando ] ]; } } }; var data_priv = new Data(); var data_user = new Data(); // Implementation Summary // // 1. Enforce API surface and semantic compatibility with 1.9.x branch // 2. Improve the module's maintainability by reducing the storage // paths to a single mechanism. // 3. Use the same single mechanism to support "private" and "user" data. // 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) // 5. Avoid exposing implementation details on user objects (eg. expando properties) // 6. Provide a clear path for implementation upgrade to WeakMap in 2014 var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, rmultiDash = /([A-Z])/g; function dataAttr( elem, key, data ) { var name; // If nothing was found internally, try to fetch any // data from the HTML5 data-* attribute if ( data === undefined && elem.nodeType === 1 ) { name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); data = elem.getAttribute( name ); if ( typeof data === "string" ) { try { data = data === "true" ? true : data === "false" ? false : data === "null" ? null : // Only convert to a number if it doesn't change the string +data + "" === data ? +data : rbrace.test( data ) ? jQuery.parseJSON( data ) : data; } catch( e ) {} // Make sure we set the data so it isn't changed later data_user.set( elem, key, data ); } else { data = undefined; } } return data; } jQuery.extend({ hasData: function( elem ) { return data_user.hasData( elem ) || data_priv.hasData( elem ); }, data: function( elem, name, data ) { return data_user.access( elem, name, data ); }, removeData: function( elem, name ) { data_user.remove( elem, name ); }, // TODO: Now that all calls to _data and _removeData have been replaced // with direct calls to data_priv methods, these can be deprecated. _data: function( elem, name, data ) { return data_priv.access( elem, name, data ); }, _removeData: function( elem, name ) { data_priv.remove( elem, name ); } }); jQuery.fn.extend({ data: function( key, value ) { var i, name, data, elem = this[ 0 ], attrs = elem && elem.attributes; // Gets all values if ( key === undefined ) { if ( this.length ) { data = data_user.get( elem ); if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) { i = attrs.length; while ( i-- ) { // Support: IE11+ // The attrs elements can be null (#14894) if ( attrs[ i ] ) { name = attrs[ i ].name; if ( name.indexOf( "data-" ) === 0 ) { name = jQuery.camelCase( name.slice(5) ); dataAttr( elem, name, data[ name ] ); } } } data_priv.set( elem, "hasDataAttrs", true ); } } return data; } // Sets multiple values if ( typeof key === "object" ) { return this.each(function() { data_user.set( this, key ); }); } return access( this, function( value ) { var data, camelKey = jQuery.camelCase( key ); // The calling jQuery object (element matches) is not empty // (and therefore has an element appears at this[ 0 ]) and the // `value` parameter was not undefined. An empty jQuery object // will result in `undefined` for elem = this[ 0 ] which will // throw an exception if an attempt to read a data cache is made. if ( elem && value === undefined ) { // Attempt to get data from the cache // with the key as-is data = data_user.get( elem, key ); if ( data !== undefined ) { return data; } // Attempt to get data from the cache // with the key camelized data = data_user.get( elem, camelKey ); if ( data !== undefined ) { return data; } // Attempt to "discover" the data in // HTML5 custom data-* attrs data = dataAttr( elem, camelKey, undefined ); if ( data !== undefined ) { return data; } // We tried really hard, but the data doesn't exist. return; } // Set the data... this.each(function() { // First, attempt to store a copy or reference of any // data that might've been store with a camelCased key. var data = data_user.get( this, camelKey ); // For HTML5 data-* attribute interop, we have to // store property names with dashes in a camelCase form. // This might not apply to all properties...* data_user.set( this, camelKey, value ); // *... In the case of properties that might _actually_ // have dashes, we need to also store a copy of that // unchanged property. if ( key.indexOf("-") !== -1 && data !== undefined ) { data_user.set( this, key, value ); } }); }, null, value, arguments.length > 1, null, true ); }, removeData: function( key ) { return this.each(function() { data_user.remove( this, key ); }); } }); jQuery.extend({ queue: function( elem, type, data ) { var queue; if ( elem ) { type = ( type || "fx" ) + "queue"; queue = data_priv.get( elem, type ); // Speed up dequeue by getting out quickly if this is just a lookup if ( data ) { if ( !queue || jQuery.isArray( data ) ) { queue = data_priv.access( elem, type, jQuery.makeArray(data) ); } else { queue.push( data ); } } return queue || []; } }, dequeue: function( elem, type ) { type = type || "fx"; var queue = jQuery.queue( elem, type ), startLength = queue.length, fn = queue.shift(), hooks = jQuery._queueHooks( elem, type ), next = function() { jQuery.dequeue( elem, type ); }; // If the fx queue is dequeued, always remove the progress sentinel if ( fn === "inprogress" ) { fn = queue.shift(); startLength--; } if ( fn ) { // Add a progress sentinel to prevent the fx queue from being // automatically dequeued if ( type === "fx" ) { queue.unshift( "inprogress" ); } // Clear up the last queue stop function delete hooks.stop; fn.call( elem, next, hooks ); } if ( !startLength && hooks ) { hooks.empty.fire(); } }, // Not public - generate a queueHooks object, or return the current one _queueHooks: function( elem, type ) { var key = type + "queueHooks"; return data_priv.get( elem, key ) || data_priv.access( elem, key, { empty: jQuery.Callbacks("once memory").add(function() { data_priv.remove( elem, [ type + "queue", key ] ); }) }); } }); jQuery.fn.extend({ queue: function( type, data ) { var setter = 2; if ( typeof type !== "string" ) { data = type; type = "fx"; setter--; } if ( arguments.length < setter ) { return jQuery.queue( this[0], type ); } return data === undefined ? this : this.each(function() { var queue = jQuery.queue( this, type, data ); // Ensure a hooks for this queue jQuery._queueHooks( this, type ); if ( type === "fx" && queue[0] !== "inprogress" ) { jQuery.dequeue( this, type ); } }); }, dequeue: function( type ) { return this.each(function() { jQuery.dequeue( this, type ); }); }, clearQueue: function( type ) { return this.queue( type || "fx", [] ); }, // Get a promise resolved when queues of a certain type // are emptied (fx is the type by default) promise: function( type, obj ) { var tmp, count = 1, defer = jQuery.Deferred(), elements = this, i = this.length, resolve = function() { if ( !( --count ) ) { defer.resolveWith( elements, [ elements ] ); } }; if ( typeof type !== "string" ) { obj = type; type = undefined; } type = type || "fx"; while ( i-- ) { tmp = data_priv.get( elements[ i ], type + "queueHooks" ); if ( tmp && tmp.empty ) { count++; tmp.empty.add( resolve ); } } resolve(); return defer.promise( obj ); } }); var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; var isHidden = function( elem, el ) { // isHidden might be called from jQuery#filter function; // in that case, element will be second argument elem = el || elem; return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); }; var rcheckableType = (/^(?:checkbox|radio)$/i); (function() { var fragment = document.createDocumentFragment(), div = fragment.appendChild( document.createElement( "div" ) ), input = document.createElement( "input" ); // Support: Safari<=5.1 // Check state lost if the name is set (#11217) // Support: Windows Web Apps (WWA) // `name` and `type` must use .setAttribute for WWA (#14901) input.setAttribute( "type", "radio" ); input.setAttribute( "checked", "checked" ); input.setAttribute( "name", "t" ); div.appendChild( input ); // Support: Safari<=5.1, Android<4.2 // Older WebKit doesn't clone checked state correctly in fragments support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; // Support: IE<=11+ // Make sure textarea (and checkbox) defaultValue is properly cloned div.innerHTML = ""; support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; })(); var strundefined = typeof undefined; support.focusinBubbles = "onfocusin" in window; var rkeyEvent = /^key/, rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/, rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; function returnTrue() { return true; } function returnFalse() { return false; } function safeActiveElement() { try { return document.activeElement; } catch ( err ) { } } /* * Helper functions for managing events -- not part of the public interface. * Props to Dean Edwards' addEvent library for many of the ideas. */ jQuery.event = { global: {}, add: function( elem, types, handler, data, selector ) { var handleObjIn, eventHandle, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = data_priv.get( elem ); // Don't attach events to noData or text/comment nodes (but allow plain objects) if ( !elemData ) { return; } // Caller can pass in an object of custom data in lieu of the handler if ( handler.handler ) { handleObjIn = handler; handler = handleObjIn.handler; selector = handleObjIn.selector; } // Make sure that the handler has a unique ID, used to find/remove it later if ( !handler.guid ) { handler.guid = jQuery.guid++; } // Init the element's event structure and main handler, if this is the first if ( !(events = elemData.events) ) { events = elemData.events = {}; } if ( !(eventHandle = elemData.handle) ) { eventHandle = elemData.handle = function( e ) { // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply( elem, arguments ) : undefined; }; } // Handle multiple events separated by a space types = ( types || "" ).match( rnotwhite ) || [ "" ]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[t] ) || []; type = origType = tmp[1]; namespaces = ( tmp[2] || "" ).split( "." ).sort(); // There *must* be a type, no attaching namespace-only handlers if ( !type ) { continue; } // If event changes its type, use the special event handlers for the changed type special = jQuery.event.special[ type ] || {}; // If selector defined, determine special event api type, otherwise given type type = ( selector ? special.delegateType : special.bindType ) || type; // Update special based on newly reset type special = jQuery.event.special[ type ] || {}; // handleObj is passed to all event handlers handleObj = jQuery.extend({ type: type, origType: origType, data: data, handler: handler, guid: handler.guid, selector: selector, needsContext: selector && jQuery.expr.match.needsContext.test( selector ), namespace: namespaces.join(".") }, handleObjIn ); // Init the event handler queue if we're the first if ( !(handlers = events[ type ]) ) { handlers = events[ type ] = []; handlers.delegateCount = 0; // Only use addEventListener if the special events handler returns false if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { if ( elem.addEventListener ) { elem.addEventListener( type, eventHandle, false ); } } } if ( special.add ) { special.add.call( elem, handleObj ); if ( !handleObj.handler.guid ) { handleObj.handler.guid = handler.guid; } } // Add to the element's handler list, delegates in front if ( selector ) { handlers.splice( handlers.delegateCount++, 0, handleObj ); } else { handlers.push( handleObj ); } // Keep track of which events have ever been used, for event optimization jQuery.event.global[ type ] = true; } }, // Detach an event or set of events from an element remove: function( elem, types, handler, selector, mappedTypes ) { var j, origCount, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = data_priv.hasData( elem ) && data_priv.get( elem ); if ( !elemData || !(events = elemData.events) ) { return; } // Once for each type.namespace in types; type may be omitted types = ( types || "" ).match( rnotwhite ) || [ "" ]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[t] ) || []; type = origType = tmp[1]; namespaces = ( tmp[2] || "" ).split( "." ).sort(); // Unbind all events (on this namespace, if provided) for the element if ( !type ) { for ( type in events ) { jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); } continue; } special = jQuery.event.special[ type ] || {}; type = ( selector ? special.delegateType : special.bindType ) || type; handlers = events[ type ] || []; tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); // Remove matching events origCount = j = handlers.length; while ( j-- ) { handleObj = handlers[ j ]; if ( ( mappedTypes || origType === handleObj.origType ) && ( !handler || handler.guid === handleObj.guid ) && ( !tmp || tmp.test( handleObj.namespace ) ) && ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { handlers.splice( j, 1 ); if ( handleObj.selector ) { handlers.delegateCount--; } if ( special.remove ) { special.remove.call( elem, handleObj ); } } } // Remove generic event handler if we removed something and no more handlers exist // (avoids potential for endless recursion during removal of special event handlers) if ( origCount && !handlers.length ) { if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { jQuery.removeEvent( elem, type, elemData.handle ); } delete events[ type ]; } } // Remove the expando if it's no longer used if ( jQuery.isEmptyObject( events ) ) { delete elemData.handle; data_priv.remove( elem, "events" ); } }, trigger: function( event, data, elem, onlyHandlers ) { var i, cur, tmp, bubbleType, ontype, handle, special, eventPath = [ elem || document ], type = hasOwn.call( event, "type" ) ? event.type : event, namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; cur = tmp = elem = elem || document; // Don't do events on text and comment nodes if ( elem.nodeType === 3 || elem.nodeType === 8 ) { return; } // focus/blur morphs to focusin/out; ensure we're not firing them right now if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { return; } if ( type.indexOf(".") >= 0 ) { // Namespaced trigger; create a regexp to match event type in handle() namespaces = type.split("."); type = namespaces.shift(); namespaces.sort(); } ontype = type.indexOf(":") < 0 && "on" + type; // Caller can pass in a jQuery.Event object, Object, or just an event type string event = event[ jQuery.expando ] ? event : new jQuery.Event( type, typeof event === "object" && event ); // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) event.isTrigger = onlyHandlers ? 2 : 3; event.namespace = namespaces.join("."); event.namespace_re = event.namespace ? new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : null; // Clean up the event in case it is being reused event.result = undefined; if ( !event.target ) { event.target = elem; } // Clone any incoming data and prepend the event, creating the handler arg list data = data == null ? [ event ] : jQuery.makeArray( data, [ event ] ); // Allow special events to draw outside the lines special = jQuery.event.special[ type ] || {}; if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { return; } // Determine event propagation path in advance, per W3C events spec (#9951) // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { bubbleType = special.delegateType || type; if ( !rfocusMorph.test( bubbleType + type ) ) { cur = cur.parentNode; } for ( ; cur; cur = cur.parentNode ) { eventPath.push( cur ); tmp = cur; } // Only add window if we got to document (e.g., not plain obj or detached DOM) if ( tmp === (elem.ownerDocument || document) ) { eventPath.push( tmp.defaultView || tmp.parentWindow || window ); } } // Fire handlers on the event path i = 0; while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { event.type = i > 1 ? bubbleType : special.bindType || type; // jQuery handler handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" ); if ( handle ) { handle.apply( cur, data ); } // Native handler handle = ontype && cur[ ontype ]; if ( handle && handle.apply && jQuery.acceptData( cur ) ) { event.result = handle.apply( cur, data ); if ( event.result === false ) { event.preventDefault(); } } } event.type = type; // If nobody prevented the default action, do it now if ( !onlyHandlers && !event.isDefaultPrevented() ) { if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && jQuery.acceptData( elem ) ) { // Call a native DOM method on the target with the same name name as the event. // Don't do default actions on window, that's where global variables be (#6170) if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { // Don't re-trigger an onFOO event when we call its FOO() method tmp = elem[ ontype ]; if ( tmp ) { elem[ ontype ] = null; } // Prevent re-triggering of the same event, since we already bubbled it above jQuery.event.triggered = type; elem[ type ](); jQuery.event.triggered = undefined; if ( tmp ) { elem[ ontype ] = tmp; } } } } return event.result; }, dispatch: function( event ) { // Make a writable jQuery.Event from the native event object event = jQuery.event.fix( event ); var i, j, ret, matched, handleObj, handlerQueue = [], args = slice.call( arguments ), handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [], special = jQuery.event.special[ event.type ] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event args[0] = event; event.delegateTarget = this; // Call the preDispatch hook for the mapped type, and let it bail if desired if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { return; } // Determine handlers handlerQueue = jQuery.event.handlers.call( this, event, handlers ); // Run delegates first; they may want to stop propagation beneath us i = 0; while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { event.currentTarget = matched.elem; j = 0; while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { // Triggered event must either 1) have no namespace, or 2) have namespace(s) // a subset or equal to those in the bound event (both can have no namespace). if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { event.handleObj = handleObj; event.data = handleObj.data; ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) .apply( matched.elem, args ); if ( ret !== undefined ) { if ( (event.result = ret) === false ) { event.preventDefault(); event.stopPropagation(); } } } } } // Call the postDispatch hook for the mapped type if ( special.postDispatch ) { special.postDispatch.call( this, event ); } return event.result; }, handlers: function( event, handlers ) { var i, matches, sel, handleObj, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target; // Find delegate handlers // Black-hole SVG instance trees (#13180) // Avoid non-left-click bubbling in Firefox (#3861) if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { for ( ; cur !== this; cur = cur.parentNode || this ) { // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) if ( cur.disabled !== true || event.type !== "click" ) { matches = []; for ( i = 0; i < delegateCount; i++ ) { handleObj = handlers[ i ]; // Don't conflict with Object.prototype properties (#13203) sel = handleObj.selector + " "; if ( matches[ sel ] === undefined ) { matches[ sel ] = handleObj.needsContext ? jQuery( sel, this ).index( cur ) >= 0 : jQuery.find( sel, this, null, [ cur ] ).length; } if ( matches[ sel ] ) { matches.push( handleObj ); } } if ( matches.length ) { handlerQueue.push({ elem: cur, handlers: matches }); } } } } // Add the remaining (directly-bound) handlers if ( delegateCount < handlers.length ) { handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); } return handlerQueue; }, // Includes some event props shared by KeyEvent and MouseEvent props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), fixHooks: {}, keyHooks: { props: "char charCode key keyCode".split(" "), filter: function( event, original ) { // Add which for key events if ( event.which == null ) { event.which = original.charCode != null ? original.charCode : original.keyCode; } return event; } }, mouseHooks: { props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "), filter: function( event, original ) { var eventDoc, doc, body, button = original.button; // Calculate pageX/Y if missing and clientX/Y available if ( event.pageX == null && original.clientX != null ) { eventDoc = event.target.ownerDocument || document; doc = eventDoc.documentElement; body = eventDoc.body; event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); } // Add which for click: 1 === left; 2 === middle; 3 === right // Note: button is not normalized, so don't use it if ( !event.which && button !== undefined ) { event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); } return event; } }, fix: function( event ) { if ( event[ jQuery.expando ] ) { return event; } // Create a writable copy of the event object and normalize some properties var i, prop, copy, type = event.type, originalEvent = event, fixHook = this.fixHooks[ type ]; if ( !fixHook ) { this.fixHooks[ type ] = fixHook = rmouseEvent.test( type ) ? this.mouseHooks : rkeyEvent.test( type ) ? this.keyHooks : {}; } copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; event = new jQuery.Event( originalEvent ); i = copy.length; while ( i-- ) { prop = copy[ i ]; event[ prop ] = originalEvent[ prop ]; } // Support: Cordova 2.5 (WebKit) (#13255) // All events should have a target; Cordova deviceready doesn't if ( !event.target ) { event.target = document; } // Support: Safari 6.0+, Chrome<28 // Target should not be a text node (#504, #13143) if ( event.target.nodeType === 3 ) { event.target = event.target.parentNode; } return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; }, special: { load: { // Prevent triggered image.load events from bubbling to window.load noBubble: true }, focus: { // Fire native event if possible so blur/focus sequence is correct trigger: function() { if ( this !== safeActiveElement() && this.focus ) { this.focus(); return false; } }, delegateType: "focusin" }, blur: { trigger: function() { if ( this === safeActiveElement() && this.blur ) { this.blur(); return false; } }, delegateType: "focusout" }, click: { // For checkbox, fire native event so checked state will be right trigger: function() { if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { this.click(); return false; } }, // For cross-browser consistency, don't fire native .click() on links _default: function( event ) { return jQuery.nodeName( event.target, "a" ); } }, beforeunload: { postDispatch: function( event ) { // Support: Firefox 20+ // Firefox doesn't alert if the returnValue field is not set. if ( event.result !== undefined && event.originalEvent ) { event.originalEvent.returnValue = event.result; } } } }, simulate: function( type, elem, event, bubble ) { // Piggyback on a donor event to simulate a different one. // Fake originalEvent to avoid donor's stopPropagation, but if the // simulated event prevents default then we do the same on the donor. var e = jQuery.extend( new jQuery.Event(), event, { type: type, isSimulated: true, originalEvent: {} } ); if ( bubble ) { jQuery.event.trigger( e, null, elem ); } else { jQuery.event.dispatch.call( elem, e ); } if ( e.isDefaultPrevented() ) { event.preventDefault(); } } }; jQuery.removeEvent = function( elem, type, handle ) { if ( elem.removeEventListener ) { elem.removeEventListener( type, handle, false ); } }; jQuery.Event = function( src, props ) { // Allow instantiation without the 'new' keyword if ( !(this instanceof jQuery.Event) ) { return new jQuery.Event( src, props ); } // Event object if ( src && src.type ) { this.originalEvent = src; this.type = src.type; // Events bubbling up the document may have been marked as prevented // by a handler lower down the tree; reflect the correct value. this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined && // Support: Android<4.0 src.returnValue === false ? returnTrue : returnFalse; // Event type } else { this.type = src; } // Put explicitly provided properties onto the event object if ( props ) { jQuery.extend( this, props ); } // Create a timestamp if incoming event doesn't have one this.timeStamp = src && src.timeStamp || jQuery.now(); // Mark it as fixed this[ jQuery.expando ] = true; }; // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html jQuery.Event.prototype = { isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse, preventDefault: function() { var e = this.originalEvent; this.isDefaultPrevented = returnTrue; if ( e && e.preventDefault ) { e.preventDefault(); } }, stopPropagation: function() { var e = this.originalEvent; this.isPropagationStopped = returnTrue; if ( e && e.stopPropagation ) { e.stopPropagation(); } }, stopImmediatePropagation: function() { var e = this.originalEvent; this.isImmediatePropagationStopped = returnTrue; if ( e && e.stopImmediatePropagation ) { e.stopImmediatePropagation(); } this.stopPropagation(); } }; // Create mouseenter/leave events using mouseover/out and event-time checks // Support: Chrome 15+ jQuery.each({ mouseenter: "mouseover", mouseleave: "mouseout", pointerenter: "pointerover", pointerleave: "pointerout" }, function( orig, fix ) { jQuery.event.special[ orig ] = { delegateType: fix, bindType: fix, handle: function( event ) { var ret, target = this, related = event.relatedTarget, handleObj = event.handleObj; // For mousenter/leave call the handler if related is outside the target. // NB: No relatedTarget if the mouse left/entered the browser window if ( !related || (related !== target && !jQuery.contains( target, related )) ) { event.type = handleObj.origType; ret = handleObj.handler.apply( this, arguments ); event.type = fix; } return ret; } }; }); // Support: Firefox, Chrome, Safari // Create "bubbling" focus and blur events if ( !support.focusinBubbles ) { jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { // Attach a single capturing handler on the document while someone wants focusin/focusout var handler = function( event ) { jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); }; jQuery.event.special[ fix ] = { setup: function() { var doc = this.ownerDocument || this, attaches = data_priv.access( doc, fix ); if ( !attaches ) { doc.addEventListener( orig, handler, true ); } data_priv.access( doc, fix, ( attaches || 0 ) + 1 ); }, teardown: function() { var doc = this.ownerDocument || this, attaches = data_priv.access( doc, fix ) - 1; if ( !attaches ) { doc.removeEventListener( orig, handler, true ); data_priv.remove( doc, fix ); } else { data_priv.access( doc, fix, attaches ); } } }; }); } jQuery.fn.extend({ on: function( types, selector, data, fn, /*INTERNAL*/ one ) { var origFn, type; // Types can be a map of types/handlers if ( typeof types === "object" ) { // ( types-Object, selector, data ) if ( typeof selector !== "string" ) { // ( types-Object, data ) data = data || selector; selector = undefined; } for ( type in types ) { this.on( type, selector, data, types[ type ], one ); } return this; } if ( data == null && fn == null ) { // ( types, fn ) fn = selector; data = selector = undefined; } else if ( fn == null ) { if ( typeof selector === "string" ) { // ( types, selector, fn ) fn = data; data = undefined; } else { // ( types, data, fn ) fn = data; data = selector; selector = undefined; } } if ( fn === false ) { fn = returnFalse; } else if ( !fn ) { return this; } if ( one === 1 ) { origFn = fn; fn = function( event ) { // Can use an empty set, since event contains the info jQuery().off( event ); return origFn.apply( this, arguments ); }; // Use same guid so caller can remove using origFn fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); } return this.each( function() { jQuery.event.add( this, types, fn, data, selector ); }); }, one: function( types, selector, data, fn ) { return this.on( types, selector, data, fn, 1 ); }, off: function( types, selector, fn ) { var handleObj, type; if ( types && types.preventDefault && types.handleObj ) { // ( event ) dispatched jQuery.Event handleObj = types.handleObj; jQuery( types.delegateTarget ).off( handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler ); return this; } if ( typeof types === "object" ) { // ( types-object [, selector] ) for ( type in types ) { this.off( type, selector, types[ type ] ); } return this; } if ( selector === false || typeof selector === "function" ) { // ( types [, fn] ) fn = selector; selector = undefined; } if ( fn === false ) { fn = returnFalse; } return this.each(function() { jQuery.event.remove( this, types, fn, selector ); }); }, trigger: function( type, data ) { return this.each(function() { jQuery.event.trigger( type, data, this ); }); }, triggerHandler: function( type, data ) { var elem = this[0]; if ( elem ) { return jQuery.event.trigger( type, data, elem, true ); } } }); var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, rtagName = /<([\w:]+)/, rhtml = /<|&#?\w+;/, rnoInnerhtml = /<(?:script|style|link)/i, // checked="checked" or checked rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, rscriptType = /^$|\/(?:java|ecma)script/i, rscriptTypeMasked = /^true\/(.*)/, rcleanScript = /^\s*\s*$/g, // We have to close these tags to support XHTML (#13200) wrapMap = { // Support: IE9 option: [ 1, "" ], thead: [ 1, "", "
" ], col: [ 2, "", "
" ], tr: [ 2, "", "
" ], td: [ 3, "", "
" ], _default: [ 0, "", "" ] }; // Support: IE9 wrapMap.optgroup = wrapMap.option; wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; // Support: 1.x compatibility // Manipulating tables requires a tbody function manipulationTarget( elem, content ) { return jQuery.nodeName( elem, "table" ) && jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? elem.getElementsByTagName("tbody")[0] || elem.appendChild( elem.ownerDocument.createElement("tbody") ) : elem; } // Replace/restore the type attribute of script elements for safe DOM manipulation function disableScript( elem ) { elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type; return elem; } function restoreScript( elem ) { var match = rscriptTypeMasked.exec( elem.type ); if ( match ) { elem.type = match[ 1 ]; } else { elem.removeAttribute("type"); } return elem; } // Mark scripts as having already been evaluated function setGlobalEval( elems, refElements ) { var i = 0, l = elems.length; for ( ; i < l; i++ ) { data_priv.set( elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" ) ); } } function cloneCopyEvent( src, dest ) { var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; if ( dest.nodeType !== 1 ) { return; } // 1. Copy private data: events, handlers, etc. if ( data_priv.hasData( src ) ) { pdataOld = data_priv.access( src ); pdataCur = data_priv.set( dest, pdataOld ); events = pdataOld.events; if ( events ) { delete pdataCur.handle; pdataCur.events = {}; for ( type in events ) { for ( i = 0, l = events[ type ].length; i < l; i++ ) { jQuery.event.add( dest, type, events[ type ][ i ] ); } } } } // 2. Copy user data if ( data_user.hasData( src ) ) { udataOld = data_user.access( src ); udataCur = jQuery.extend( {}, udataOld ); data_user.set( dest, udataCur ); } } function getAll( context, tag ) { var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) : context.querySelectorAll ? context.querySelectorAll( tag || "*" ) : []; return tag === undefined || tag && jQuery.nodeName( context, tag ) ? jQuery.merge( [ context ], ret ) : ret; } // Fix IE bugs, see support tests function fixInput( src, dest ) { var nodeName = dest.nodeName.toLowerCase(); // Fails to persist the checked state of a cloned checkbox or radio button. if ( nodeName === "input" && rcheckableType.test( src.type ) ) { dest.checked = src.checked; // Fails to return the selected option to the default selected state when cloning options } else if ( nodeName === "input" || nodeName === "textarea" ) { dest.defaultValue = src.defaultValue; } } jQuery.extend({ clone: function( elem, dataAndEvents, deepDataAndEvents ) { var i, l, srcElements, destElements, clone = elem.cloneNode( true ), inPage = jQuery.contains( elem.ownerDocument, elem ); // Fix IE cloning issues if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) { // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 destElements = getAll( clone ); srcElements = getAll( elem ); for ( i = 0, l = srcElements.length; i < l; i++ ) { fixInput( srcElements[ i ], destElements[ i ] ); } } // Copy the events from the original to the clone if ( dataAndEvents ) { if ( deepDataAndEvents ) { srcElements = srcElements || getAll( elem ); destElements = destElements || getAll( clone ); for ( i = 0, l = srcElements.length; i < l; i++ ) { cloneCopyEvent( srcElements[ i ], destElements[ i ] ); } } else { cloneCopyEvent( elem, clone ); } } // Preserve script evaluation history destElements = getAll( clone, "script" ); if ( destElements.length > 0 ) { setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); } // Return the cloned set return clone; }, buildFragment: function( elems, context, scripts, selection ) { var elem, tmp, tag, wrap, contains, j, fragment = context.createDocumentFragment(), nodes = [], i = 0, l = elems.length; for ( ; i < l; i++ ) { elem = elems[ i ]; if ( elem || elem === 0 ) { // Add nodes directly if ( jQuery.type( elem ) === "object" ) { // Support: QtWebKit, PhantomJS // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); // Convert non-html into a text node } else if ( !rhtml.test( elem ) ) { nodes.push( context.createTextNode( elem ) ); // Convert html into DOM nodes } else { tmp = tmp || fragment.appendChild( context.createElement("div") ); // Deserialize a standard representation tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); wrap = wrapMap[ tag ] || wrapMap._default; tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[ 2 ]; // Descend through wrappers to the right content j = wrap[ 0 ]; while ( j-- ) { tmp = tmp.lastChild; } // Support: QtWebKit, PhantomJS // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( nodes, tmp.childNodes ); // Remember the top-level container tmp = fragment.firstChild; // Ensure the created nodes are orphaned (#12392) tmp.textContent = ""; } } } // Remove wrapper from fragment fragment.textContent = ""; i = 0; while ( (elem = nodes[ i++ ]) ) { // #4087 - If origin and destination elements are the same, and this is // that element, do not do anything if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { continue; } contains = jQuery.contains( elem.ownerDocument, elem ); // Append to fragment tmp = getAll( fragment.appendChild( elem ), "script" ); // Preserve script evaluation history if ( contains ) { setGlobalEval( tmp ); } // Capture executables if ( scripts ) { j = 0; while ( (elem = tmp[ j++ ]) ) { if ( rscriptType.test( elem.type || "" ) ) { scripts.push( elem ); } } } } return fragment; }, cleanData: function( elems ) { var data, elem, type, key, special = jQuery.event.special, i = 0; for ( ; (elem = elems[ i ]) !== undefined; i++ ) { if ( jQuery.acceptData( elem ) ) { key = elem[ data_priv.expando ]; if ( key && (data = data_priv.cache[ key ]) ) { if ( data.events ) { for ( type in data.events ) { if ( special[ type ] ) { jQuery.event.remove( elem, type ); // This is a shortcut to avoid jQuery.event.remove's overhead } else { jQuery.removeEvent( elem, type, data.handle ); } } } if ( data_priv.cache[ key ] ) { // Discard any remaining `private` data delete data_priv.cache[ key ]; } } } // Discard any remaining `user` data delete data_user.cache[ elem[ data_user.expando ] ]; } } }); jQuery.fn.extend({ text: function( value ) { return access( this, function( value ) { return value === undefined ? jQuery.text( this ) : this.empty().each(function() { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { this.textContent = value; } }); }, null, value, arguments.length ); }, append: function() { return this.domManip( arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.appendChild( elem ); } }); }, prepend: function() { return this.domManip( arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.insertBefore( elem, target.firstChild ); } }); }, before: function() { return this.domManip( arguments, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this ); } }); }, after: function() { return this.domManip( arguments, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this.nextSibling ); } }); }, remove: function( selector, keepData /* Internal Use Only */ ) { var elem, elems = selector ? jQuery.filter( selector, this ) : this, i = 0; for ( ; (elem = elems[i]) != null; i++ ) { if ( !keepData && elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem ) ); } if ( elem.parentNode ) { if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { setGlobalEval( getAll( elem, "script" ) ); } elem.parentNode.removeChild( elem ); } } return this; }, empty: function() { var elem, i = 0; for ( ; (elem = this[i]) != null; i++ ) { if ( elem.nodeType === 1 ) { // Prevent memory leaks jQuery.cleanData( getAll( elem, false ) ); // Remove any remaining nodes elem.textContent = ""; } } return this; }, clone: function( dataAndEvents, deepDataAndEvents ) { dataAndEvents = dataAndEvents == null ? false : dataAndEvents; deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; return this.map(function() { return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); }); }, html: function( value ) { return access( this, function( value ) { var elem = this[ 0 ] || {}, i = 0, l = this.length; if ( value === undefined && elem.nodeType === 1 ) { return elem.innerHTML; } // See if we can take a shortcut and just use innerHTML if ( typeof value === "string" && !rnoInnerhtml.test( value ) && !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { value = value.replace( rxhtmlTag, "<$1>" ); try { for ( ; i < l; i++ ) { elem = this[ i ] || {}; // Remove element nodes and prevent memory leaks if ( elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem, false ) ); elem.innerHTML = value; } } elem = 0; // If using innerHTML throws an exception, use the fallback method } catch( e ) {} } if ( elem ) { this.empty().append( value ); } }, null, value, arguments.length ); }, replaceWith: function() { var arg = arguments[ 0 ]; // Make the changes, replacing each context element with the new content this.domManip( arguments, function( elem ) { arg = this.parentNode; jQuery.cleanData( getAll( this ) ); if ( arg ) { arg.replaceChild( elem, this ); } }); // Force removal if there was no new content (e.g., from empty arguments) return arg && (arg.length || arg.nodeType) ? this : this.remove(); }, detach: function( selector ) { return this.remove( selector, true ); }, domManip: function( args, callback ) { // Flatten any nested arrays args = concat.apply( [], args ); var fragment, first, scripts, hasScripts, node, doc, i = 0, l = this.length, set = this, iNoClone = l - 1, value = args[ 0 ], isFunction = jQuery.isFunction( value ); // We can't cloneNode fragments that contain checked, in WebKit if ( isFunction || ( l > 1 && typeof value === "string" && !support.checkClone && rchecked.test( value ) ) ) { return this.each(function( index ) { var self = set.eq( index ); if ( isFunction ) { args[ 0 ] = value.call( this, index, self.html() ); } self.domManip( args, callback ); }); } if ( l ) { fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); first = fragment.firstChild; if ( fragment.childNodes.length === 1 ) { fragment = first; } if ( first ) { scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); hasScripts = scripts.length; // Use the original fragment for the last item instead of the first because it can end up // being emptied incorrectly in certain situations (#8070). for ( ; i < l; i++ ) { node = fragment; if ( i !== iNoClone ) { node = jQuery.clone( node, true, true ); // Keep references to cloned scripts for later restoration if ( hasScripts ) { // Support: QtWebKit // jQuery.merge because push.apply(_, arraylike) throws jQuery.merge( scripts, getAll( node, "script" ) ); } } callback.call( this[ i ], node, i ); } if ( hasScripts ) { doc = scripts[ scripts.length - 1 ].ownerDocument; // Reenable scripts jQuery.map( scripts, restoreScript ); // Evaluate executable scripts on first document insertion for ( i = 0; i < hasScripts; i++ ) { node = scripts[ i ]; if ( rscriptType.test( node.type || "" ) && !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) { if ( node.src ) { // Optional AJAX dependency, but won't run scripts if not present if ( jQuery._evalUrl ) { jQuery._evalUrl( node.src ); } } else { jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) ); } } } } } } return this; } }); jQuery.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function( name, original ) { jQuery.fn[ name ] = function( selector ) { var elems, ret = [], insert = jQuery( selector ), last = insert.length - 1, i = 0; for ( ; i <= last; i++ ) { elems = i === last ? this : this.clone( true ); jQuery( insert[ i ] )[ original ]( elems ); // Support: QtWebKit // .get() because push.apply(_, arraylike) throws push.apply( ret, elems.get() ); } return this.pushStack( ret ); }; }); var iframe, elemdisplay = {}; /** * Retrieve the actual display of a element * @param {String} name nodeName of the element * @param {Object} doc Document object */ // Called only from within defaultDisplay function actualDisplay( name, doc ) { var style, elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), // getDefaultComputedStyle might be reliably used only on attached element display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? // Use of this method is a temporary fix (more like optimization) until something better comes along, // since it was removed from specification and supported only in FF style.display : jQuery.css( elem[ 0 ], "display" ); // We don't have any data stored on the element, // so use "detach" method as fast way to get rid of the element elem.detach(); return display; } /** * Try to determine the default display value of an element * @param {String} nodeName */ function defaultDisplay( nodeName ) { var doc = document, display = elemdisplay[ nodeName ]; if ( !display ) { display = actualDisplay( nodeName, doc ); // If the simple way fails, read from inside an iframe if ( display === "none" || !display ) { // Use the already-created iframe if possible iframe = (iframe || jQuery( "`, ``}, {` ∫_a_^b^{f(x)1+x} dx `, ` ∫_a_^b^{f(x)1+x} dx `}, {``, ``}, {``, ``}, {`y`, `y`}, {`y`, `y`}, {`y`, `y`}, // from Kangax html-minfier {`text`, `text`}, // go-fuzz {``}, {`a'b=""`, `a'b=""`}, {``, ``}, {` `, ``}, {` `, ``}, {` `, ``}, {` `, ``}, {``, ``}, // #596 {``, ``}, // #657 } m := minify.New() htmlMinifier := &Minifier{KeepSpecialComments: true} for _, tt := range htmlTests { t.Run(tt.html, func(t *testing.T) { r := bytes.NewBufferString(tt.html) w := &bytes.Buffer{} err := htmlMinifier.Minify(m, w, r, nil) test.Minify(t, tt.html, err, w.String(), tt.expected) }) } } func TestHTMLKeepWhitespace(t *testing.T) { htmlTests := []struct { html string expected string }{ {`cats and dogs `, `cats and dogs`}, {`
test test
`, `
test test
`}, {`x y`, `x y`}, {`x y`, `x y`}, {"x \ny", "x \ny"}, {`

x

y`, `

x

y`}, {`x

y

`, `x

y`}, {`

`, `

`}, // spaces before html and at the start of html are dropped {`

x
y`, `

x
y`}, {`

x y`, `

x y`}, {`a code b`, `a code b`}, {`a b`, `a b`}, {`a b`, `a b`}, {"text\n\ntext", "text\ntext"}, {"text\ntext text", "text\ntext text"}, {"abc\n\ndef", "abc\ndef"}, {"\n\n", "\n"}, {"", ""}, {"

  • one\n
  • \n
  • two", "
  • one\n
  • two"}, // #442 } m := minify.New() htmlMinifier := &Minifier{KeepWhitespace: true} for _, tt := range htmlTests { t.Run(tt.html, func(t *testing.T) { r := bytes.NewBufferString(tt.html) w := &bytes.Buffer{} err := htmlMinifier.Minify(m, w, r, nil) test.Minify(t, tt.html, err, w.String(), tt.expected) }) } } func TestHTMLKeepQuotes(t *testing.T) { htmlTests := []struct { html string expected string }{ {`

    `, `

    `}, {`

    `, `

    `}, {`

    `, `

    `}, {``, ``}, } m := minify.New() htmlMinifier := &Minifier{KeepQuotes: true} for _, tt := range htmlTests { t.Run(tt.html, func(t *testing.T) { r := bytes.NewBufferString(tt.html) w := &bytes.Buffer{} err := htmlMinifier.Minify(m, w, r, nil) test.Minify(t, tt.html, err, w.String(), tt.expected) }) } } func TestHTMLURL(t *testing.T) { htmlTests := []struct { url string html string expected string }{ {`http://example.com/`, `link`, `link`}, {`https://example.com/`, `link`, `link`}, {`http://example.com/`, `link`, `link`}, {`https://example.com/`, `link`, `link`}, {`http://example.com/`, `x`, `x`}, {`http://example.com/`, ``, ``}, {`http://example.com/`, ` `, ``}, {`http://example.com/`, ``, ``}, {`https://example.com/`, ``, ``}, {`http://example.com/`, ``, ``}, {`https://example.com/`, ``, ``}, } m := minify.New() m.AddFunc("text/html", Minify) for _, tt := range htmlTests { t.Run(tt.url, func(t *testing.T) { r := bytes.NewBufferString(tt.html) w := &bytes.Buffer{} m.URL, _ = url.Parse(tt.url) err := Minify(m, w, r, nil) test.Minify(t, tt.html, err, w.String(), tt.expected) }) } } func TestHTMLTemplates(t *testing.T) { htmlTests := []struct { html string expected string }{ {`a

    {{ printf " ! " }}

    b`, `a

    {{ printf " ! " }}

    b`}, {`a {{ printf " ! " }} b`, `a {{ printf " ! " }} b`}, {``, ``}, {``, ``}, {``, `
    `, `
    `}, {``, ``}, {`

    [Top]

    minify-2.20.37/tests/html/corpus/3.html000066400000000000000000000001361464346127300176430ustar00rootroot00000000000000 minify-2.20.37/tests/html/corpus/4.html000066400000000000000000000003021464346127300176370ustar00rootroot00000000000000minify-2.20.37/tests/html/corpus/amazon.html000066400000000000000000016351561464346127300210070ustar00rootroot00000000000000 Amazon.com: Online Shopping for Electronics, Apparel, Computers, Books, DVDs & more
    Black Friday Deals Week in Automotive Black Friday Deals Week in Automotive Corporate Deals Page Holiday Deals in Books Shop Up to 65% Off Shop Up to 65% Off Sales & Deals Learn more nav_sap_plcc_6M_fly_blackbelt Black Friday 2014 Electronics Holiday Gift Guide Grooming Deals Home, Kitchen & Garden Holiday Deals & Gift Guide Gortimer S1 Movies Deals Movies Deals Music Deals Music Deals Video Games Deals Video Games Deals Shop Sports Deals Shop Sports Deals Shop All Deals Shop Sports Deals Toys & Games Black Friday Deals Get Fire phone plus 12 months of Prime for only $0.99 Shop Fire HD 6 Shop Amazon Fire TV Shop Kindle Voyage

    Related to Items You've Viewed See more

    Wearable Technology See more


    Gifts in Tools & Home Improvement See more

    Gift Ideas in Beauty, Grooming & Health See more


    Gift Ideas from the Home Gift Guide See more

    More Items to Consider See more


    Included with Prime Membership at No Additional Cost See more

    Your Recently Viewed Items and Featured Recommendations 
     

    minify-2.20.37/tests/html/corpus/bbc.html000066400000000000000000003404351464346127300202400ustar00rootroot00000000000000 BBC - Homepage

    BBC Homepage

    John Kerry, Catherine Ashton and Mohammad Javad Zarif in Vienna, 22 Nov Doubts on Iran deal as deadline looms

    Doubts grow that Monday's deadline for a deal on Iran's nuclear programme will be met at talks in Vienna, as negotiators admit "big gaps" remain.

    Business

    Man typing on computer keyboard

    New web data powers plan for police

    A law forcing communications firms to keep details that could help identify criminals using the internet is being planned by the home secretary.

    Earth

    The truth about lemmings

    The truth about lemmings

    There's more to lemmings than suicide

    Capital

    Due tomorrow? I’ll start tonight

    Due tomorrow? I’ll start tonight

    Procrastination: why we push things off until the last hour

    Autos

    The Mini, miniaturised

    The Mini, miniaturised

    The British carmaker unveils the Citysurfer Concept in LA

    Culture

    Hunger Games: Not for real adults

    Hunger Games: Not for real adults

    The new blockbuster reviewed

    Future

    How to create a brain implant

    How to create a brain implant

    …and how can it treat blindness?

    Travel

    ‘The party city of Canada’

    ‘The party city of Canada’

    Where 'the vibe edges on the weird side’

    Life connected

    Wors

    Is tech transforming language?

    Many think texts and tweets are crimes against proper grammar, but linguist Ben Zimmer argues that this misses the point.

    the travel show

    Regent's Canal

    London's 200-year-old hidden canal

    Fancy a break from the busy streets of Central London? Take in the city wildlife while cruising down charming, cafe-lined Regent's Canal, a historic waterway that was built by hand.

    quirky questions

    High roller

    The perks of owning a luxury ride

    From preferential treatment at the dealership to special consideration on the highway, BBC Autos set out to learn the intangible benefits of buying a big-ticket vehicle.

    TV & Radio

    World Service Radio

    On air now: 14:05 - 15:00 GMT

    The Science Hour
    Monica Grady from the Open University discusses the latest news from the comet mission.

    Next on air: 15:00 - 15:05 GMT

    BBC News
    The latest five minute news bulletin from BBC World Service.
    Today's Schedule

    Hourly bulletins:

    Weather

    London

     

    •  
    Sun
    Heavy Rain

    Max Temperature: 12°C 54°F

    Min Temperature: 3°C 37°F

    Mon
    Sunny

    Max Temperature: 8°C 46°F

    Min Temperature: 4°C 39°F

    Tue
    Light Cloud

    Max Temperature: 9°C 48°F

    Min Temperature: 7°C 45°F

    BBC © 2014 The BBC is not responsible for the content of external sites. Read more.

    This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.

    minify-2.20.37/tests/html/corpus/stackoverflow.html000066400000000000000000006212211464346127300223760ustar00rootroot00000000000000 Stack Overflow
    3
    votes
    1
    answer
    59
    views
    0
    votes
    0
    answers
    12
    views
    0
    votes
    2
    answers
    12
    views
    0
    votes
    1
    answer
    27
    views

    Looking for more? Browse the complete list of questions, or popular tags. Help us answer unanswered questions.

    minify-2.20.37/tests/html/corpus/wikipedia.html000066400000000000000000015456341464346127300214710ustar00rootroot00000000000000 President of the United States - Wikipedia, the free encyclopedia

    President of the United States

    From Wikipedia, the free encyclopedia
    Jump to: navigation, search
    "POTUS" redirects here. For the political talk radio channel, see P.O.T.U.S. (Sirius XM).
    President of the
    United States of America
    Seal of the President of the United States.svg
    Flag of the President of the United States of America.svg
    President Barack Obama.jpg
    Incumbent
    Barack Obama

    since January 20, 2009 (2009-01-20)
    Executive branch of the U.S. Government
    Executive Office of the President
    Style Mr. President
    (informal)[1][2]
    The Honorable
    (formal)[3]
    His Excellency[4][5][6]
    (diplomatic, outside the U.S.)
    Member of Cabinet
    Domestic Policy Council
    National Economic Council
    National Security Council
    Residence The White House
    Seat Washington, D.C.
    Appointer Electoral College
    Term length Four years
    renewable once
    Constituting instrument United States Constitution
    Formation March 4, 1789
    First holder George Washington
    April 30, 1789
    Salary $400,000 annually (2001–)
    Website The White House

    The President of the United States of America (POTUS)[7] is the head of state and head of government of the United States. The president leads the executive branch of the federal government and is the commander-in-chief of the United States Armed Forces. The person in this position is the leader of the country which has the largest economy and the largest military, with command authority over the largest active nuclear arsenal. The president is frequently described as the most powerful person in the world.[8][9][10][11][12]

    Article II of the U.S. Constitution vests the executive power of the United States in the president and charges him with the execution of federal law, alongside the responsibility of appointing federal executive, diplomatic, regulatory, and judicial officers, and concluding treaties with foreign powers with the advice and consent of the Senate. The president is further empowered to grant federal pardons and reprieves, and to convene and adjourn either or both houses of Congress under extraordinary circumstances.[13] Since the founding of the United States, the power of the president and the federal government have grown substantially,[14] and each modern president, despite possessing no formal legislative powers beyond signing or vetoing congressionally passed bills, is largely responsible for dictating the legislative agenda of his party and the foreign and domestic policy of the United States.[15]

    The president is indirectly elected by the people through the Electoral College to a four-year term, and is one of only two nationally elected federal officers, the other being the Vice President of the United States.[16] The Twenty-second Amendment, adopted in 1951, prohibits anyone from ever being elected to the presidency for a third full term. It also prohibits a person from being elected to the presidency more than once if that person previously had served as president, or acting president, for more than two years of another person's term as president. In all, 43 individuals have served 44 presidencies (Cleveland's two non-consecutive terms each counted) spanning 56 full four-year terms.[17] On January 20, 2009, Barack Obama became the 44th and current president. On November 6, 2012, he was re-elected and is currently serving the 57th term, which ends on January 20, 2017.

    Origin

    Great Seal of the United States (obverse).svg
    This article is part of a series on the
    politics and government of
    the United States

    In 1776, the Thirteen Colonies, acting through the Second Continental Congress, declared political independence from Great Britain during the American Revolution. The new states, though independent of each other as nation states,[18] recognized the necessity of closely coordinating their efforts against the British.[19] Desiring to avoid anything that remotely resembled a monarchy, Congress negotiated the Articles of Confederation to establish a weak alliance between the states.[18] As a central authority, Congress under the Articles was without any legislative power; it could make its own resolutions, determinations, and regulations, but not any laws, nor any taxes or local commercial regulations enforceable upon citizens.[19] This institutional design reflected the conception of how Americans believed the deposed British system of Crown and Parliament ought to have functioned with respect to the royal dominion: a superintending body for matters that concerned the entire empire.[19] Out from under any monarchy, the states assigned some formerly royal prerogatives (e.g., making war, receiving ambassadors, etc.) to Congress, while severally lodging the rest within their own respective state governments. Only after all the states agreed to a resolution settling competing western land claims did the Articles take effect on March 1, 1781, when Maryland became the final state to ratify them.

    In 1783, the Treaty of Paris secured independence for each of the former colonies. With peace at hand, the states each turned toward their own internal affairs.[18] By 1786, Americans found their continental borders besieged and weak, their respective economies in crises as neighboring states agitated trade rivalries with one another, witnessed their hard currency pouring into foreign markets to pay for imports, their Mediterranean commerce preyed upon by North African pirates, and their foreign-financed Revolutionary War debts unpaid and accruing interest.[18] Civil and political unrest loomed.

    Following the successful resolution of commercial and fishing disputes between Virginia and Maryland at the Mount Vernon Conference in 1785, Virginia called for a trade conference between all the states, set for September 1786 in Annapolis, Maryland, with an aim toward resolving further-reaching interstate commercial antagonisms. When the convention failed for lack of attendance due to suspicions among most of the other states, the Annapolis delegates called for a convention to offer revisions to the Articles, to be held the next spring in Philadelphia. Prospects for the next convention appeared bleak until James Madison and Edmund Randolph succeeded in securing George Washington's attendance to Philadelphia as a delegate for Virginia.[18][20]

    When the Constitutional Convention convened in May 1787, the 12 state delegations in attendance (Rhode Island did not send delegates) brought with them an accumulated experience over a diverse set of institutional arrangements between legislative and executive branches from within their respective state governments. Most states maintained a weak executive without veto or appointment powers, elected annually by the legislature to a single term only, sharing power with an executive council, and countered by a strong legislature.[18] New York offered the greatest exception, having a strong, unitary governor with veto and appointment power elected to a three-year term, and eligible for reelection to an indefinite number of terms thereafter.[18] It was through the closed-door negotiations at Philadelphia that the presidency framed in the U.S. Constitution emerged.

    Powers and duties

    Article I legislative role

    Obama signing legislation at the Resolute desk

    The first power the Constitution confers upon the president is the veto. The Presentment Clause requires any bill passed by Congress to be presented to the president before it can become law. Once the legislation has been presented, the president has three options:

    1. Sign the legislation; the bill then becomes law.
    2. Veto the legislation and return it to Congress, expressing any objections; the bill does not become law, unless each house of Congress votes to override the veto by a two-thirds vote.
    3. Take no action. In this instance, the president neither signs nor vetoes the legislation. After 10 days, not counting Sundays, two possible outcomes emerge:
      • If Congress is still convened, the bill becomes law.
      • If Congress has adjourned, thus preventing the return of the legislation, the bill does not become law. This latter outcome is known as the pocket veto.

    In 1996, Congress attempted to enhance the president's veto power with the Line Item Veto Act. The legislation empowered the president to sign any spending bill into law while simultaneously striking certain spending items within the bill, particularly any new spending, any amount of discretionary spending, or any new limited tax benefit. Once a president had stricken the item, Congress could pass that particular item again. If the president then vetoed the new legislation, Congress could override the veto by its ordinary means, a two-thirds vote in both houses. In Clinton v. City of New York, 524 U.S. 417 (1998), the U.S. Supreme Court ruled such a legislative alteration of the veto power to be unconstitutional.

    Article II executive powers

    War and foreign affairs powers

    Abraham Lincoln, the 16th President of the United States, successfully preserved the Union during the American Civil War

    Perhaps the most important of all presidential powers is command of the United States Armed Forces as its commander-in-chief. While the power to declare war is constitutionally vested in Congress, the president has ultimate responsibility for direction and disposition of the military. The present-day operational command of the Armed Forces (belonging to the Department of Defense) is normally exercised through the Secretary of Defense, with assistance of the Chairman of the Joint Chiefs of Staff, to the Combatant Commands, as outlined in the presidentially approved Unified Command Plan (UCP).[21][22][23] The framers of the Constitution took care to limit the president's powers regarding the military; Alexander Hamilton explains this in Federalist No. 69:

    The President is to be commander-in-chief of the army and navy of the United States. ... It would amount to nothing more than the supreme command and direction of the military and naval forces ... while that [the power] of the British king extends to the DECLARING of war and to the RAISING and REGULATING of fleets and armies, all [of] which ... would appertain to the legislature.[24] [Emphasis in the original.]

    Congress, pursuant to the War Powers Resolution, must authorize any troop deployments longer than 60 days, although that process relies on triggering mechanisms that have never been employed, rendering it ineffectual.[25] Additionally, Congress provides a check to presidential military power through its control over military spending and regulation. While historically presidents initiated the process for going to war,[26][27] critics have charged that there have been several conflicts in which presidents did not get official declarations, including Theodore Roosevelt's military move into Panama in 1903,[26] the Korean War,[26] the Vietnam War,[26] and the invasions of Grenada in 1983[28] and Panama in 1990.[29]

    Along with the armed forces, the president also directs U.S. foreign policy. Through the Department of State and the Department of Defense, the president is responsible for the protection of Americans abroad and of foreign nationals in the United States. The president decides whether to recognize new nations and new governments, and negotiates treaties with other nations, which become binding on the United States when approved by two-thirds vote of the Senate.[citation needed]

    Although not constitutionally provided, presidents also sometimes employ "executive agreements" in foreign relations. These agreements frequently regard administrative policy choices germane to executive power; for example, the extent to which either country presents an armed presence in a given area, how each country will enforce copyright treaties, or how each country will process foreign mail. However, the 20th century witnessed a vast expansion of the use of executive agreements, and critics have challenged the extent of that use as supplanting the treaty process and removing constitutionally prescribed checks and balances over the executive in foreign relations. Supporters counter that the agreements offer a pragmatic solution when the need for swift, secret, and/or concerted action arises.[citation needed]

    Administrative powers

    Suffice it to say that the President is made the sole repository of the executive powers of the United States, and the powers entrusted to him as well as the duties imposed upon him are awesome indeed.

    The president is the head of the executive branch of the federal government and is constitutionally obligated to "take care that the laws be faithfully executed."[30] The executive branch has over four million employees, including members of the military.[31]

    Presidents make numerous executive branch appointments: an incoming president may make up to 6,000 before he takes office and 8,000 more during his term. Ambassadors, members of the Cabinet, and other federal officers, are all appointed by a president with the "advice and consent" of a majority of the Senate. When the Senate is in recess for at least ten days, the president may make recess appointments.[32] Recess appointments are temporary and expire at the end of the next session of the Senate.

    The power of a president to fire executive officials has long been a contentious political issue. Generally, a president may remove purely executive officials at his discretion.[33] However, Congress can curtail and constrain a president's authority to fire commissioners of independent regulatory agencies and certain inferior executive officers by statute.[34]

    The president additionally possesses the ability to direct much of the executive branch through executive orders that are grounded in federal law or constitutionally granted executive power. Executive orders are reviewable by federal courts and can be superseded by federal legislation.

    To manage the growing federal bureaucracy, Presidents have gradually surrounded themselves with many layers of staff, who were eventually organized into the Executive Office of the President of the United States. Within the Executive Office, the President's innermost layer of aides (and their assistants) are located in the White House Office.

    Juridical powers

    The president also has the power to nominate federal judges, including members of the United States courts of appeals and the Supreme Court of the United States. However, these nominations do require Senate confirmation. Securing Senate approval can provide a major obstacle for presidents who wish to orient the federal judiciary toward a particular ideological stance. When nominating judges to U.S. district courts, presidents often respect the long-standing tradition of Senatorial courtesy. Presidents may also grant pardons and reprieves, as is often done just before the end of a presidential term, not without controversy.[35][36][37]

    Historically, two doctrines concerning executive power have developed that enable the president to exercise executive power with a degree of autonomy. The first is executive privilege, which allows the president to withhold from disclosure any communications made directly to the president in the performance of executive duties. George Washington first claimed privilege when Congress requested to see Chief Justice John Jay's notes from an unpopular treaty negotiation with Great Britain. While not enshrined in the Constitution, or any other law, Washington's action created the precedent for the privilege. When Richard Nixon tried to use executive privilege as a reason for not turning over subpoenaed evidence to Congress during the Watergate scandal, the Supreme Court ruled in United States v. Nixon, 418 U.S. 683 (1974), that executive privilege did not apply in cases where a president was attempting to avoid criminal prosecution. When President Bill Clinton attempted to use executive privilege regarding the Lewinsky scandal, the Supreme Court ruled in Clinton v. Jones, 520 U.S. 681 (1997), that the privilege also could not be used in civil suits. These cases established the legal precedent that executive privilege is valid, although the exact extent of the privilege has yet to be clearly defined. Additionally, federal courts have allowed this privilege to radiate outward and protect other executive branch employees, but have weakened that protection for those executive branch communications that do not involve the president.[38]

    The state secrets privilege allows the president and the executive branch to withhold information or documents from discovery in legal proceedings if such release would harm national security. Precedent for the privilege arose early in the 19th century when Thomas Jefferson refused to release military documents in the treason trial of Aaron Burr and again in Totten v. United States 92 U.S. 105 (1876), when the Supreme Court dismissed a case brought by a former Union spy.[39] However, the privilege was not formally recognized by the U.S. Supreme Court until United States v. Reynolds 345 U.S. 1 (1953), where it was held to be a common law evidentiary privilege.[40] Before the September 11 attacks, use of the privilege had been rare, but increasing in frequency.[41] Since 2001, the government has asserted the privilege in more cases and at earlier stages of the litigation, thus in some instances causing dismissal of the suits before reaching the merits of the claims, as in the Ninth Circuit's ruling in Mohamed v. Jeppesen Dataplan.[40][42][43] Critics of the privilege claim its use has become a tool for the government to cover up illegal or embarrassing government actions.[44][45]

    Legislative facilitator

    The Constitution's Ineligibility Clause prevents the President (and all other executive officers) from simultaneously being a member of Congress. Therefore, the president cannot directly introduce legislative proposals for consideration in Congress. However, the president can take an indirect role in shaping legislation, especially if the president's political party has a majority in one or both houses of Congress. For example, the president or other officials of the executive branch may draft legislation and then ask senators or representatives to introduce these drafts into Congress. The president can further influence the legislative branch through constitutionally mandated, periodic reports to Congress. These reports may be either written or oral, but today are given as the State of the Union address, which often outlines the president's legislative proposals for the coming year.

    In the 20th century critics began charging that too many legislative and budgetary powers have slid into the hands of presidents that should belong to Congress. As the head of the executive branch, presidents control a vast array of agencies that can issue regulations with little oversight from Congress. One critic charged that presidents could appoint a "virtual army of 'czars' – each wholly unaccountable to Congress yet tasked with spearheading major policy efforts for the White House."[46] Presidents have been criticized for making signing statements when signing congressional legislation about how they understand a bill or plan to execute it.[47] This practice has been criticized by the American Bar Association as unconstitutional.[48] Conservative commentator George Will wrote of an "increasingly swollen executive branch" and "the eclipse of Congress."[49]

    According to Article II, Section 3, Clause 2 of the Constitution, the president may convene either or both houses of Congress. If both houses cannot agree on a date of adjournment, the president may appoint a date for Congress to adjourn.

    Ceremonial roles

    President Woodrow Wilson throwing out the ceremonial first ball on Opening Day, 1916

    As head of state, the president can fulfill traditions established by previous presidents. William Howard Taft started the tradition of throwing out the ceremonial first pitch in 1910 at Griffith Stadium, Washington, D.C., on the Washington Senators' Opening Day. Every president since Taft, except for Jimmy Carter, threw out at least one ceremonial first ball or pitch for Opening Day, the All-Star Game, or the World Series, usually with much fanfare.[50]

    Other presidential traditions are associated with American holidays. Rutherford B. Hayes began in 1878 the first White House egg rolling for local children.[51] Beginning in 1947 during the Harry S. Truman administration, every Thanksgiving the president is presented with a live domestic turkey during the annual national thanksgiving turkey presentation held at the White House. Since 1989, when the custom of "pardoning" the turkey was formalized by George H. W. Bush, the turkey has been taken to a farm where it will live out the rest of its natural life.[52]

    Presidential traditions also involve the president's role as head of government. Many outgoing presidents since James Buchanan traditionally give advice to their successor during the presidential transition.[53] Ronald Reagan and his successors have also left a private message on the desk of the Oval Office on Inauguration Day for the incoming president.[54]


    Problems playing this file? See media help.

    During a state visit by a foreign head of state, the president typically hosts a State Arrival Ceremony held on the South Lawn, a custom begun by John F. Kennedy in 1961.[55] This is followed by a state dinner given by the president which is held in the State Dining Room later in the evening.[56]

    The modern presidency holds the president as one of the nation's premier celebrities. Some argue that images of the presidency have a tendency to be manipulated by administration public relations officials as well as by presidents themselves. One critic described the presidency as "propagandized leadership" which has a "mesmerizing power surrounding the office."[57] Administration public relations managers staged carefully crafted photo-ops of smiling presidents with smiling crowds for television cameras.[58] One critic wrote the image of John F. Kennedy was described as carefully framed "in rich detail" which "drew on the power of myth" regarding the incident of PT 109[59] and wrote that Kennedy understood how to use images to further his presidential ambitions.[60] As a result, some political commentators have opined that American voters have unrealistic expectations of presidents: voters expect a president to "drive the economy, vanquish enemies, lead the free world, comfort tornado victims, heal the national soul and protect borrowers from hidden credit-card fees."[61]

    Critics of presidency's evolution

    Main article: Imperial Presidency

    Most of the nation's Founding Fathers expected the Congress, which was the first branch of government described in the Constitution, to be the dominant branch of government; they did not expect a strong executive.[62] However, presidential power has shifted over time, which has resulted in claims that the modern presidency has become too powerful,[63][64] unchecked, unbalanced,[65] and "monarchist" in nature.[66] Critic Dana D. Nelson believes presidents over the past thirty years have worked towards "undivided presidential control of the executive branch and its agencies."[67] She criticizes proponents of the unitary executive for expanding "the many existing uncheckable executive powers – such as executive orders, decrees, memorandums, proclamations, national security directives and legislative signing statements – that already allow presidents to enact a good deal of foreign and domestic policy without aid, interference or consent from Congress."[67] Activist Bill Wilson opined that the expanded presidency was "the greatest threat ever to individual freedom and democratic rule."[68]

    Selection process

    George Washington, the first President of the United States

    Eligibility

    Main article: Age of candidacy

    Article II, Section 1, Clause 5 of the Constitution sets the requirements to hold office. A president must:

    A person who meets the above qualifications is still disqualified from holding the office of president under any of the following conditions:

    • Under the Twenty-second Amendment, no person can be elected president more than twice. The amendment also specifies that if any eligible person who serves as president or acting president for more than two years of a term for which some other eligible person was elected president, the former can only be elected president once. Scholars disagree whether anyone no longer eligible to be elected president could be elected vice president, pursuant to the qualifications set out under the Twelfth Amendment.[69]
    • Under Article I, Section 3, Clause 7, upon conviction in impeachment cases, the Senate has the option of disqualifying convicted individuals from holding other federal offices, including the presidency.[70]
    • Under Section 3 of the Fourteenth Amendment, no person who swore an oath to support the Constitution, and later rebelled against the United States, can become president. However, this disqualification can be lifted by a two-thirds vote of each house of Congress.

    Campaigns and nomination

    The modern presidential campaign begins before the primary elections, which the two major political parties use to clear the field of candidates before their national nominating conventions, where the most successful candidate is made the party's nominee for president. Typically, the party's presidential candidate chooses a vice presidential nominee, and this choice is rubber-stamped by the convention.

    Nominees participate in nationally televised debates, and while the debates are usually restricted to the Democratic and Republican nominees, third party candidates may be invited, such as Ross Perot in the 1992 debates. Nominees campaign across the country to explain their views, convince voters and solicit contributions. Much of the modern electoral process is concerned with winning swing states through frequent visits and mass media advertising drives.

    Election and oath

    A map of the United States showing the number of electoral votes allocated to each state following reapportionment based on the 2010 census; 270 electoral votes are required for a majority out of 538 overall

    The president is elected indirectly. A number of electors, collectively known as the Electoral College, officially select the president. On Election Day, voters in each of the states and the District of Columbia cast ballots for these electors. Each state is allocated a number of electors, equal to the size of its delegation in both Houses of Congress combined. Generally, the ticket that wins the most votes in a state wins all of that state's electoral votes and thus has its slate of electors chosen to vote in the Electoral College.

    The winning slate of electors meet at its state's capital on the first Monday after the second Wednesday in December, about six weeks after the election, to vote. They then send a record of that vote to Congress. The vote of the electors is opened by the sitting vice president—acting in his capacity as President of the Senate—and read aloud to a joint session of the incoming Congress, which was elected at the same time as the president.

    Pursuant to the Twentieth Amendment, the president's term of office begins at noon on January 20 of the year following the election. This date, known as Inauguration Day, marks the beginning of the four-year terms of both the president and the vice president. Before executing the powers of the office, a president is constitutionally required to take the presidential oath:

    I do solemnly swear (or affirm) that I will faithfully execute the Office of President of the United States, and will to the best of my Ability, preserve, protect and defend the Constitution of the United States.[71]

    Although not required, presidents have traditionally palmed a Bible while swearing the oath and have added, "So help me God!" to the end of the oath.[72] Further, although the oath may be administered by any person authorized by law to administer oaths, presidents are traditionally sworn in by the Chief Justice of the United States.

    Tenure and term limits

    Franklin D. Roosevelt was elected to four terms before the adoption of the Twenty-second Amendment

    The term of office for president and vice president is four years. George Washington, the first president, set an unofficial precedent of serving only two terms, which subsequent presidents followed until 1940. Before Franklin D. Roosevelt, attempts at a third term were encouraged by supporters of Ulysses S. Grant and Theodore Roosevelt; neither of these attempts succeeded. In 1940, Franklin D. Roosevelt declined to seek a third term, but allowed his political party to "draft" him as its presidential candidate and was subsequently elected to a third term. In 1941, the United States entered World War II, leading voters to elect Roosevelt to a fourth term in 1944.

    After the war, and in response to Roosevelt being elected to third and fourth terms, the Twenty-second Amendment was adopted. The amendment bars anyone from being elected president more than twice, or once if that person served more than half of another president's term. Harry S. Truman, who was president when the amendment was adopted, and so by the amendment's provisions exempt from its limitation, also briefly sought a third (a second full) term before withdrawing from the 1952 election.

    Since the amendment's adoption, four presidents have served two full terms: Dwight D. Eisenhower, Ronald Reagan, Bill Clinton, and George W. Bush. Barack Obama has been elected to a second term. Jimmy Carter and George H. W. Bush sought a second term, but were defeated. Richard Nixon was elected to a second term, but resigned before completing it. Lyndon B. Johnson was the only president under the amendment to be eligible to serve more than two terms in total, having served for only fourteen months following John F. Kennedy's assassination. However, Johnson withdrew from the 1968 Democratic Primary, surprising many Americans. Gerald Ford sought a full term, after serving out the last two years and five months of Nixon's second term, but was not elected.

    Vacancy or disability

    Vacancies in the office of president may arise under several possible circumstances: death, resignation and removal from office.

    Article II, Section 4 of the Constitution allows the House of Representatives to impeach high federal officials, including the president, for "treason, bribery, or other high crimes and misdemeanors." Article I, Section 3, Clause 6 gives the Senate the power to remove impeached officials from office, given a two-thirds vote to convict. The House has thus far impeached two presidents: Andrew Johnson in 1868 and Bill Clinton in 1998. Neither was subsequently convicted by the Senate; however, Johnson was acquitted by just one vote.

    Under Section 3 of the Twenty-fifth Amendment, the president may transfer the presidential powers and duties to the vice president, who then becomes acting president, by transmitting a statement to the Speaker of the House and the president pro tempore of the Senate stating the reasons for the transfer. The president resumes the discharge of the presidential powers and duties when he transmits, to those two officials, a written declaration stating that resumption. This transfer of power may occur for any reason the president considers appropriate; in 2002 and again in 2007, President George W. Bush briefly transferred presidential authority to Vice President Dick Cheney. In both cases, this was done to accommodate a medical procedure which required Bush to be sedated; both times, Bush returned to duty later the same day.[73]

    Under Section 4 of the Twenty-fifth Amendment, the vice president, in conjunction with a majority of the Cabinet, may transfer the presidential powers and duties from the president to the vice president by transmitting a written declaration to the Speaker of the House and the president pro tempore of the Senate that the president is unable to discharge the presidential powers and duties. If this occurs, then the vice president will assume the presidential powers and duties as acting president; however, the president can declare that no such inability exists and resume the discharge of the presidential powers and duties. If the vice president and Cabinet contest this claim, it is up to Congress, which must meet within two days if not already in session, to decide the merit of the claim.

    The United States Constitution mentions the resignation of the president but does not regulate the form of such a resignation or the conditions for its validity. Pursuant to federal law, the only valid evidence of the president's resignation is a written instrument to that effect, signed by the president and delivered to the office of the Secretary of State.[74] This has only occurred once, when Richard Nixon delivered a letter to Henry Kissinger to that effect.

    The Constitution states that the vice president becomes president upon the removal from office, death or resignation of the preceding president. If the offices of president and vice president both are either vacant or have a disabled holder of that office, the next officer in the presidential line of succession, the Speaker of the House, becomes acting president. The line then extends to the president pro tempore of the Senate, followed by every member of the Cabinet in a set order. Special elections are never held for the office of president.

    Compensation

    Presidential pay history
    Date established Salary Salary in 2012

    dollars

    September 24, 1789 $25,000 $673,451
    March 3, 1873 $50,000 $992,777
    March 4, 1909 $75,000 $1,954,850
    January 19, 1949 $100,000 $967,315
    January 20, 1969 $200,000 $1,254,610
    January 20, 2001 $400,000 $519,979
    Sources:[75][76][77]

    Since 2001, the president has earned a $400,000 annual salary, along with a $50,000 annual expense account, a $100,000 nontaxable travel account, and $19,000 for entertainment.[78][79] The most recent raise in salary was approved by Congress and President Bill Clinton in 1999 and went into effect in 2001.

    The White House in Washington, D.C., serves as the official place of residence for the president; he is entitled to use its staff and facilities, including medical care, recreation, housekeeping, and security services. The government pays for state dinners and other official functions, but the president pays for dry cleaning and food that he, his family, and personal guests consume; the high food bill often amazes new residents.[80] Naval Support Facility Thurmont, popularly known as Camp David, is a mountain-based military camp in Frederick County, Maryland, used as a country retreat and for high alert protection of the president and his guests. Blair House, located next to the Eisenhower Executive Office Building at the White House Complex and Lafayette Park, is a complex of four connected townhouses exceeding 70,000 square feet (6,500 m2) of floor space which serves as the president's official guest house and as a secondary residence for the president if needed.[81]

    For ground travel, the president uses the presidential state car, which is an armored limousine built on a heavily modified Cadillac-based chassis.[82] One of two identical Boeing VC-25 aircraft, which are extensively modified versions of Boeing 747-200B airliners, serve as long distance travel for the president and are referred to as Air Force One while the president is on board (although any U.S. Air Force aircraft the President is aboard is designated as "Air Force One" for the duration of the flight). In-country trips are typically handled with just one of the two planes while overseas trips are handled with both, one primary and one backup. Any civilian aircraft the President is aboard is designated Executive One for the flight.[83][84] The president also has a fleet of thirty-five U.S. Marine Corps helicopters at his disposal of varying models, designated Marine One when the president is aboard any particular one in the fleet. Flights are typically handled with as many as five helicopters all flying together and frequently swapping positions as to disguise which helicopter the President is actually aboard to any would-be threats.

    The U.S. Secret Service is charged with protecting the sitting president and the first family. As part of their protection, presidents, first ladies, their children and other immediate family members, and other prominent persons and locations are assigned Secret Service codenames.[85] The use of such names was originally for security purposes and dates to a time when sensitive electronic communications were not routinely encrypted; today, the names simply serve for purposes of brevity, clarity, and tradition.[86]

    Post-presidency

    Group portrait of five presidential men in dark suits and ties
    Presidents George H. W. Bush, George W. Bush, Bill Clinton and Jimmy Carter, with President-elect Barack Obama in the Oval Office on January 7, 2009.

    Beginning in 1959, all living former presidents were granted a pension, an office, and a staff. The pension has increased numerous times with Congressional approval. Retired presidents now receive a pension based on the salary of the current administration's cabinet secretaries, which was $199,700 each year in 2012.[87] Former presidents who served in Congress may also collect congressional pensions.[88] The Former Presidents Act, as amended, also provides former presidents with travel funds and franking privileges. Prior to 1997, all former presidents, their spouses, and their children until age 16 were protected by the Secret Service until the president's death.[89][90] In 1997, Congress passed legislation limiting secret service protection to no more than 10 years from the date a president leaves office.[91] On January 10, 2013, President Obama signed legislation reinstating lifetime secret service protection for him, George W. Bush, and all subsequent presidents.[92] A spouse who remarries is no longer eligible for secret service protection.[91]

    Some presidents have had significant careers after leaving office. Prominent examples include William Howard Taft's tenure as Chief Justice of the United States and Herbert Hoover's work on government reorganization after World War II. Grover Cleveland, whose bid for reelection failed in 1888, was elected president again four years later in 1892. Two former presidents served in Congress after leaving the White House: John Quincy Adams was elected to the House of Representatives, serving there for seventeen years, and Andrew Johnson returned to the Senate in 1875. John Tyler served in the provisional Congress of the Confederate States during the Civil War and was elected to the Confederate House of Representatives, but died before that body first met.

    Presidents may use their predecessors as emissaries to deliver private messages to other nations or as official representatives of the United States to state funerals and other important foreign events.[93][94] Richard Nixon made multiple foreign trips to countries including China and Russia and was lauded as an elder statesman.[95] Jimmy Carter has become a global human rights campaigner, international arbiter, and election monitor, as well as a recipient of the Nobel Peace Prize. Bill Clinton has also worked as an informal ambassador, most recently in the negotiations that led to the release of two American journalists, Laura Ling and Euna Lee, from North Korea. Clinton has also been active politically since his presidential term ended, working with his wife Hillary on her presidential bid and President Obama on his reelection campaign.

    Presidential libraries

    Main article: Presidential library

    Since Herbert Hoover, each president has created a repository known as a presidential library for preserving and making available his papers, records and other documents and materials. Completed libraries are deeded to and maintained by the National Archives and Records Administration (NARA); the initial funding for building and equipping each library must come from private, non-federal sources.[96] There are currently thirteen presidential libraries in the NARA system. There are also presidential libraries maintained by state governments and private foundations, such as the Abraham Lincoln Presidential Library and Museum, which is run by the State of Illinois.

    As many presidents live for many years after leaving office, several of them have personally overseen the building and opening of their own presidential libraries, some even making arrangements for their own burial at the site. Several presidential libraries therefore contain the graves of the president they document, such as the Richard Nixon Presidential Library and Museum in Yorba Linda, California and the Ronald Reagan Presidential Library in Simi Valley, California. The graves are viewable by the general public visiting these libraries.

    Timeline of Presidents

    This is a graphical timeline listing of the Presidents of the United States.


    See also

    Lists relating to the United States presidency

    List of Presidents of the United States

    Categories

    Articles

    Notes

    1. ^ Foreign-born American citizens who met the age and residency requirements at the time the Constitution was adopted were also eligible for the presidency. However, this allowance has since become obsolete.

    References

    1. ^ "How To Address The President; He Is Not Your Excellency Or Your Honor, But Mr. President". The New York Times. August 2, 1891. 
    2. ^ "USGS Correspondence Handbook - Chapter 4". Usgs.gov. 2007-07-18. Retrieved 2012-11-15. 
    3. ^ "Models of Address and Salutation". Ita.doc.gov. Retrieved September 4, 2010. 
    4. ^ HEADS OF STATE, HEADS OF GOVERNMENT, MINISTERS FOR FOREIGN AFFAIRS, Protocol and Liaison Service, United Nations. Retrieved on November 1, 2012.
    5. ^ The White House Office of the Press Secretary (September 1, 2010). "Remarks by President Obama, President Mubarak, His Majesty King Abdullah, Prime Minister Netanyahu and President Abbas Before Working Dinner". WhiteHouse.gov. Retrieved July 19, 2011. 
    6. ^ "Exchange of Letters". Permanent Observer Mission of Palestine to the United Nations. September 1978. Retrieved July 19, 2011. 
    7. ^ Safire, William (October 12, 1997). "On language: POTUS and FLOTUS". New York Times. New York: The New York Times Company. Retrieved May 11, 2014. 
    8. ^ Noer, Michael; Perlroth, Nicole (November 11, 2009). "The World's Most Powerful People". Forbes. Retrieved September 4, 2010. 
    9. ^ "The Most Powerful Man in the World is a Black Man – The Los Angeles Sentinel". Lasentinel.net. Retrieved September 4, 2010. 
    10. ^ "Who should be the world's most powerful person?". The Guardian (London). January 3, 2008. 
    11. ^ Jon Meacham (December 20, 2008). "Meacham: The History of Power". Newsweek. Retrieved September 4, 2010. 
    12. ^ Fareed Zakaria (December 20, 2008). "The NEWSWEEK 50: Barack Obama". Newsweek. Retrieved September 4, 2010. 
    13. ^ "Transcript of the Constitution of the United States – Official". Archives.gov. Retrieved September 4, 2010. 
    14. ^ The Influence of State Politics in Expanding Federal Power,' Henry Jones Ford, Proceedings of the American Political Science Association, Vol. 5, Fifth Annual Meeting (1908) Retrieved March 17, 2010.
    15. ^ Pfiffner, J. P. (1988). "The President's Legislative Agenda". Annals of the American Academy of Political and Social Science 499: 22–35. doi:10.1177/0002716288499001002.  edit
    16. ^ Our Government • The Executive Branch, The White House.
    17. ^ "The Executive Branch". Whitehouse.gov. Retrieved January 27, 2009. . Grover Cleveland served two non-consecutive terms, so he is counted twice; as the 22nd and 24th presidents.
    18. ^ a b c d e f g Milkis, Sidney M.; Nelson, Michael (2008). The American Presidency: Origins and Development (5th ed.). Washington, D.C.: CQ Press. pp. 1–25. ISBN 0-87289-336-7. 
    19. ^ a b c Kelly, Alfred H.; Harbison, Winfred A.; Belz, Herman (1991). The American Constitution: Its Origins and Development I (7th ed.). New York: W.W. Norton & Co. pp. 76–81. ISBN 0-393-96056-0. 
    20. ^ Beeman, Richard (2009). Plain, Honest Men: The Making of the American Constitution. New York: Random House. ISBN 0-8129-7684-3. 
    21. ^ "DOD Releases Unified Command Plan 2011". United States Department of Defense. April 8, 2011. Retrieved February 25, 2013. 
    22. ^ 10 U.S.C. § 164
    23. ^ Joint Chiefs of Staff. About the Joint Chiefs of Staff. Retrieved February 25, 2013.
    24. ^ Hamilton, Alexander. The Federalist #69 (reposting). Retrieved June 15, 2007.
    25. ^ Christopher, James A.; Baker, III (July 8, 2008). "The National War Powers Commission Report" (PDF). The Miller Center of Public Affairs at the University of Virginia. Retrieved December 15, 2010. "No clear mechanism or requirement exists today for the president and Congress to consult. The War Powers Resolution of 1973 contains only vague consultation requirements. Instead, it relies on reporting requirements that, if triggered, begin the clock running for Congress to approve the particular armed conflict. By the terms of the 1973 Resolution, however, Congress need not act to disapprove the conflict; the cessation of all hostilities is required in 60 to 90 days merely if Congress fails to act. Many have criticized this aspect of the Resolution as unwise and unconstitutional, and no president in the past 35 years has filed a report “pursuant” to these triggering provisions." 
    26. ^ a b c d "The Law: The President's War Powers". Time. June 1, 1970. Retrieved September 28, 2009. 
    27. ^ Alison Mitchell (May 2, 1999). "The World; Only Congress Can Declare War. Really. It's True". The New York Times. Retrieved November 8, 2009. "Presidents have sent forces abroad more than 100 times; Congress has declared war only five times: the War of 1812, the Mexican War, the Spanish-American War, World War I and World War II." 
    28. ^ Alison Mitchell (May 2, 1999). "The World; Only Congress Can Declare War. Really. It's True". The New York Times. Retrieved November 8, 2009. "President Reagan told Congress of the invasion of Grenada two hours after he had ordered the landing. He told Congressional leaders of the bombing of Libya while the aircraft were on their way." 
    29. ^ Michael R. Gordon (December 20, 1990). "U.S. troops move in panama in effort to seize noriega; gunfire is heard in capital". The New York Times. Retrieved November 8, 2009. "It was not clear whether the White House consulted with Congressional leaders about the military action, or notified them in advance. Thomas S. Foley, the Speaker of the House, said on Tuesday night that he had not been alerted by the Administration." 
    30. ^ "Article II, Section 3, U.S. Constitution". law.cornell.edu. Legal Information Institute. 2012. Retrieved August 7, 2012. 
    31. ^ "The Executive Branch". The White House website. Retrieved October 17, 2010. 
    32. ^ National Labor Relations Board v. Noel Canning, 572 U.S. __ (2014).
    33. ^ Shurtleff v. United States, 189 U.S. 311 (1903); Myers v. United States, 272 U.S. 52 (1926).
    34. ^ Humphrey's Executor v. United States, 295 U.S. 602 (1935) and Morrison v. Olson, 487 U.S. 654 (1988), respectively.
    35. ^ David Johnston (December 24, 1992). "Bush Pardons 6 in Iran Affair, Aborting a Weinberger Trial; Prosecutor Assails 'Cover-Up'". The New York Times. Retrieved November 8, 2009. "But not since President Gerald R. Ford granted clemency to former President Richard M. Nixon for possible crimes in Watergate has a Presidential pardon so pointedly raised the issue of whether the President was trying to shield officials for political purposes." 
    36. ^ David Johnston (December 24, 1992). "Bush Pardons 6 in Iran Affair, Aborting a Weinberger Trial; Prosecutor Assails 'Cover-Up'". The New York Times. Retrieved November 8, 2009. "The prosecutor charged that Mr. Weinberger's efforts to hide his notes may have 'forestalled impeachment proceedings against President Reagan' and formed part of a pattern of 'deception and obstruction.'... In light of President Bush's own misconduct, we are gravely concerned about his decision to pardon others who lied to Congress and obstructed official investigations." 
    37. ^ Peter Eisler (March 7, 2008). "Clinton-papers release blocked". USA TODAY. Retrieved November 8, 2009. "Former president Clinton issued 140 pardons on his last day in office, including several to controversial figures, such as commodities trader Rich, then a fugitive on tax evasion charges. Rich's ex-wife, Denise, contributed $2,000 in 1999 to Hillary Clinton's Senate campaign; $5,000 to a related political action committee; and $450,000 to a fund set up to build the Clinton library." 
    38. ^ Millhiser, Ian (June 1, 2010). "Executive Privilege 101". Center for American Progress. Retrieved October 8, 2010. 
    39. ^ "Part III of the opinion in Mohamed v. Jeppesen Dataplan". Caselaw.findlaw.com. Retrieved November 29, 2010. 
    40. ^ a b Frost, Amanda; Florence, Justin (2009). "Reforming the State Secrets Privilege". American Constitution Society. Retrieved October 8, 2010. 
    41. ^ Weaver, William G.; Pallitto, Robert M. (2005). "State Secrets and Executive Power". Political Science Quarterly (The Academy of Political Science) 120 (1): 85–112. doi:10.1002/j.1538-165x.2005.tb00539.x. "Use of the state secrets privilege in courts has grown significantly over the last twenty-five years. In the twenty-three years between the decision in Reynolds [1953] and the election of Jimmy Carter, in 1976, there were four reported cases in which the government invoked the privilege. Between 1977 and 2001, there were a total of fifty-one reported cases in which courts ruled on invocation of the privilege. Because reported cases only represent a fraction of the total cases in which the privilege is invoked or implicated, it is unclear precisely how dramatically the use of the privilege has grown. But the increase in reported cases is indicative of greater willingness to assert the privilege than in the past." 
    42. ^ Savage, Charlie (September 8, 2010). "Court Dismisses a Case Asserting Torture by C.I.A". The New York Times. Retrieved October 8, 2010. 
    43. ^ Finn, Peter (September 9, 2010). "Suit dismissed against firm in CIA rendition case". The Washington Post. Retrieved October 8, 2010. 
    44. ^ Greenwald, Glenn (February 10, 2009). "The 180-degree reversal of Obama's State Secrets position". Salon. Retrieved October 8, 2010. 
    45. ^ American Civil Liberties Union (January 31, 2007). "Background on the State Secrets Privilege". ACLU. Retrieved October 8, 2010. 
    46. ^ Eric Cantor (July 30, 2009). "Obama's 32 Czars". The Washington Post. Retrieved September 28, 2009. 
    47. ^ Dana D. Nelson (October 11, 2008). "The 'unitary executive' question". Los Angeles Times. Retrieved October 4, 2009. 
    48. ^ Transcript – Ray Suarez and others (July 24, 2006). "President's Use of 'Signing Statements' Raises Constitutional Concerns". PBS Online NewsHour. Retrieved November 11, 2009. "The American Bar Association said President Bush's use of "signing statements," which allow him to sign a bill into law but not enforce certain provisions, disregards the rule of law and the separation of powers. Legal experts discuss the implications." 
    49. ^ George F. Will – op-ed columnist (December 21, 2008). "Making Congress Moot". The Washington Post. Retrieved September 28, 2009. 
    50. ^ Duggan, Paul (April 2, 2007). "Balking at the First Pitch". The Washington Post. p. A01. 
    51. ^ Grier, Peter (April 25, 2011). "The (not so) secret history of the White House Easter Egg Roll". The Christian Science Monitor. Retrieved May 6, 2011. 
    52. ^ Hesse, Monica (November 21, 2007). "Turkey Pardons, The Stuffing of Historic Legend". The Washington Post. Retrieved May 14, 2011. 
    53. ^ Gibbs, Nancy (November 13, 2008). "How Presidents Pass The Torch". Time. Retrieved May 6, 2011. 
    54. ^ Dorning, Mike (January 22, 2009). "A note from Bush starts morning in the Oval Office". Chicago Tribune. Retrieved May 6, 2011. 
    55. ^ James A. Abbott and Elaine M. Rice (1998). Designing Camelot: The Kennedy White House Restoration. Van Nostrand Reinhold. pp. 9–10. ISBN 0-442-02532-7. 
    56. ^ "The White House State Dinner". The White House Historical Association. Retrieved May 14, 2011. 
    57. ^ Rachel Dykoski (November 1, 2008). "Book note: Presidential idolatry is "Bad for Democracy"". Twin Cities Daily Planet. Retrieved November 11, 2009. "Dana D. Nelson's book makes the case that we've had 200+ years of propagandized leadership..." 
    58. ^ John Neffinger (April 2, 2007). "Democrats vs. Science: Why We're So Damn Good at Losing Elections". Huffington Post. Retrieved November 11, 2009. "...back in the 1980s Lesley Stahl of 60 Minutes ran a piece skewering Reagan's policies on the elderly ... But while her voiceover delivered a scathing critique, the video footage was all drawn from carefully-staged photo-ops of Reagan smiling with seniors and addressing large crowds ... Deaver thanked ... Stahl...for broadcasting all those images of Reagan looking his best." 
    59. ^ Dana D. Nelson (2008). "Bad for democracy: how the Presidency undermines the power of the people". U of Minnesota Press. ISBN 978-0-8166-5677-6. Retrieved November 11, 2009. "in rich detail how Kennedy drew on the power of myth as he framed his experience during World War II, when his PT boat was sliced in half by a Japanese..." 
    60. ^ Dana D. Nelson (2008). "Bad for democracy: how the Presidency undermines the power of the people". U of Minnesota Press. ISBN 978-0-8166-5677-6. Retrieved November 11, 2009. "Even before Kennedy ran for Congress, he had become fascinated, through his Hollywood acquaintances and visits, with the idea of image... (p.54)" 
    61. ^ Lexington (July 21, 2009). "The Cult of the Presidency". The Economist. Retrieved November 9, 2009. "Gene Healy argues that because voters expect the president to do everything ... When they inevitably fail to keep their promises, voters swiftly become disillusioned. Yet they never lose their romantic idea that the president should drive the economy, vanquish enemies, lead the free world, comfort tornado victims, heal the national soul and protect borrowers from hidden credit-card fees." 
    62. ^ Michiko Kakutani (book reviewer) (July 6, 2007). "Unchecked and Unbalanced". The New York Times. Retrieved November 9, 2009. "the founding fathers had 'scant affection for strong executives' like England’s king, and ... Bush White House’s claims are rooted in ideas “about the ‘divine’ right of kings” ... and that certainly did not find their 'way into our founding documents, the 1776 Declaration of Independence and the Constitution of 1787.'" 
    63. ^ "The Conquest of Presidentialism". Huffington Post. August 22, 2008. Retrieved September 20, 2009. 
    64. ^ interview by David Schimke (September–October 2008). "Presidential Power to the People – Author Dana D. Nelson on why democracy demands that the next president be taken down a notch". Utne Reader. Retrieved September 20, 2009. 
    65. ^ Ross Linker (September 27, 2007). "Critical of Presidency, Prof. Ginsberg and Crenson unite". The Johns-Hopkins Newsletter. Retrieved November 9, 2009. "presidents slowly but surely gain more and more power with both the public at large and other political institutions doing nothing to prevent it." 
    66. ^ Michiko Kakutani (book reviewer) (July 6, 2007). "Unchecked and Unbalanced". The New York Times. Retrieved November 9, 2009. "UNCHECKED AND UNBALANCED: Presidential Power in a Time of Terror By Frederick A. O. Schwarz Jr. and Aziz Z. Huq (authors)" 
    67. ^ a b Dana D. Nelson (October 11, 2008). "Opinion–The 'unitary executive' question – What do McCain and Obama think of the concept?". Los Angeles Times. Retrieved September 21, 2009. 
    68. ^ Scott Shane (September 25, 2009). "A Critic Finds Obama Policies a Perfect Target". The New York Times. Retrieved November 8, 2009. "There is the small, minority-owned firm with deep ties to President Obama’s Chicago backers, made eligible by the Federal Reserve to handle potentially lucrative credit deals. 'I want to know how these firms are picked and who picked them,' Mr. Wilson, the group’s president, tells his eager researchers." 
    69. ^ See: Peabody, Bruce G.; Gant, Scott E. (1999). "The Twice and Future President: Constitutional Interstices and the Twenty-Second Amendment". Minnesota Law Review (Minneapolis, MN: Minnesota Law Review) 83 (565). ; alternatively, see: Albert, Richard (2005). "The Evolving Vice Presidency". Temple Law Review (Philadelphia, PA: Temple University of the Commonwealth System of Higher Education) 78 (811, at 856–9). 
    70. ^ See GPO Annotated U.S. Constitution, 2002 Ed., at 611 & nn. 772–773.
    71. ^ U.S. Const. art. II, § 1, cl. 8.
    72. ^ "Judge doesn't ban "God" in inaugural oath". Associated Press. January 15, 2009. Retrieved August 18, 2012. 
    73. ^ Guardian, "Bush colonoscopy leaves Cheney in charge", July 20, 2007.
    74. ^ 3 U.S.C. § 20
    75. ^ "Presidential and Vice Presidential Salaries, 1789+". University of Michigan. Archived from the original on June 6, 2011. Retrieved October 7, 2009. 
    76. ^ Relative Value in US Dollars. Measuring Worth. Retrieved May 30, 2006.
    77. ^ Dept. of Labor Inflation Calculator. Inflation Calculator. Retrieved August 10, 2009.
    78. ^ "How much does the U.S. president get paid?". Howstuffworks. Retrieved July 24, 2007.
    79. ^ Salaries of Federal Officials: A Fact Sheet. United States Senate website. Retrieved August 6, 2009.
    80. ^ Bumiller, Elizabeth (January 2009). "Inside the Presidency". National Geographic. Retrieved June 24, 2012. 
    81. ^ "President's Guest House (includes Lee House and Blair House), Washington, DC". Retrieved September 30, 2009. 
    82. ^ New Presidential Limousine enters Secret Service Fleet U.S. Secret Service Press Release (January 14, 2009) Retrieved on January 20, 2009.
    83. ^ Air Force One. White House Military Office. Retrieved June 17, 2007.
    84. ^ Any U.S. Air Force aircraft carrying the president will use the call sign "Air Force One." Similarly, "Navy One", "Army One", and "Coast Guard One" are the call signs used if the president is aboard a craft belonging to these services. "Executive One" becomes the call sign of any civilian aircraft when the president boards.
    85. ^ "Junior Secret Service Program: Assignment 7. Code Names". National Park Service. Retrieved August 18, 2007. 
    86. ^ "Candidate Code Names Secret Service Monikers Used On The Campaign Trail". CBS. September 16, 2008. Retrieved November 12, 2008. 
    87. ^ Schwemle, Barbara L. (October 17, 2012). "President of the United States: Compensation". Congressional Research Service. Retrieved January 10, 2013. 
    88. ^ "Former presidents cost U.S. taxpayers big bucks". Toledo Blade. January 7, 2007. Retrieved May 22, 2007. 
    89. ^ 18 U.S.C. § 3056
    90. ^ "Obama signs bill granting lifetime Secret Service protection to former presidents and spouses". The Associated Press. January 10, 2013. Retrieved January 10, 2013. 
    91. ^ a b "United States Secret Service: Protection". United States Secret Service. Retrieved October 8, 2014. 
    92. ^ "Obama signs protection bill for former presidents". The Washington Times. January 10, 2013. Retrieved August 14, 2013. 
    93. ^ "Shock and Anger Flash Throughout the United States". Associated Press. March 31, 1981. Retrieved March 11, 2011. 
    94. ^ "FOUR PRESIDENTS". Reagan Presidential Library, National Archives and Records Administration. Retrieved April 3, 2011. 
    95. ^ Biography of Richard M. Nixon, The White House.
    96. ^ 44 U.S.C. § 2112

    Further reading

    • Bumiller, Elisabeth (January 2009). "Inside the Presidency". National Geographic 215 (1): 130–149. 
    • Couch, Ernie. Presidential Trivia. Rutledge Hill Press. March 1, 1996. ISBN 1-55853-412-1
    • Lang, J. Stephen. The Complete Book of Presidential Trivia. Pelican Publishing. 2001. ISBN 1-56554-877-9
    • Leo, Leonard – Taranto, James – Bennett, William J. Presidential Leadership: Rating the Best and the Worst in the White House. Simon and Schuster. 2004. ISBN 0-7432-5433-3
    • Presidential Studies Quarterly, published by Blackwell Synergy, is a quarterly academic journal on the presidency.
    • Świątczak, Wasilewska, Iwona. “The Toughest Season in the White House”: The Rhetorical Presidency and the State of the Union Address, 1953–1992. Ph.D. thesis. University of Helsinki, 2014. ISBN 978-951-51-0248-5. Online version.
    • Waldman, Michael – Stephanopoulos, George. My Fellow Americans: The Most Important Speeches of America's Presidents, from George Washington to George W. Bush. Sourcebooks Trade. 2003. ISBN 1-4022-0027-7
    • Winder, Michael K. Presidents and Prophets: The Story of America's Presidents and the LDS Church. Covenant Communications. 2007. ISBN 1-59811-452-2

    External links

    Official
    Presidential histories
    Miscellaneous

    Navigation menu

    minify-2.20.37/tests/html/corpus/wolff.html000066400000000000000000000242641464346127300206260ustar00rootroot00000000000000 JPEG file format - Taco de Wolff

    JPEG file format

    20-02-2012

    This articles provides information on how a JPEG file is constructed at binary level. It is accompanied with this article: JPEG scan data. The conversion from a raw bitmap to JPEG is implemented in this tool: JPEG

    General structure

    The JPEG file format uses markers to denote the beginning of a certain block. These markers are 2 bytes long and start with0xFFfollowed by the marker for the following block. This consequently means that if we were to write a0xFFthat does not denote the beginning of a block, we must escape it by appending0x00right after the0xFF. This means that no block is following and only the0xFFis interpreted as being part of the data.

    Markers and segments

    The following segments are discussed in the order they’d appear in a basic JPEG file. Some are optional segments and some optional segments are left out of the discussion. If you were to decode a JPEG file, you can often skip those optional segments.

    Start Of Image

    0xFF 0xD8Marker

    APP0

    0xFF 0xE0Marker0x?? 0x??Segment length is the length of the segment excluding the marker0x4A46494600Reads JFIF0x01 0x02Version 1.20x00No density units used (defaults to 72 DPI I believe)0x00 0x01Scaling of 100% in the X direction (no scaling)0x00 0x01Scaling of 100% in the Y direction (no scaling)0x00 0x00Width and height of thumbnail are zero

    Quantization table

    Usually two tables are provided, one for the luminance and one for the chrominance. See bottom of the page for the default quantization tables. The elements must be provided in the serpentine / zigzag order.

    0xFF 0xDBMarker0x00 0x43Segment length is the length of the segment excluding the marker (3 + 64)0x0?Insignificant four bits denote the table ID, significant four the precision of its elements (set to 0 for default 8bit per element)...64 values of the quantization table

    Start Of Frame

    0xFF 0xC0Marker0x00 0x11Segment length is the length of the segment excluding the marker (17 for us)0x08Precision of 8bits0x?? 0x??Height of image in 2 bytes0x?? 0x??Width of image in 2 bytes0x03Three color components0x01 0x11 0x??Component 1 (luminance), 1x1 sample (no subsampling), quantization table ID0x02 0x11 0x??Component 2 (chrominance blue)0x03 0x11 0x??Component 3 (chrominance red)

    Huffman table

    Usually four tables are provided, two for the luminance and two for the chrominance. Each is split into tables for DC and AC values. See bottom of the page for the default Huffman tables and see JPEG scan data for an explanation to use it.

    0xFF 0xC4Marker0x?? 0x??Segment length is the length of the segment excluding the marker (3 + 16 + X)0x??Insignificant four bits denote the table ID, the 5th bit is true for AC and false for DC...16 values for the bit lengths...X values for the codes

    Start of Scan

    Multiple scans may exist for interlacing. We use only one.

    0xFF 0xDAMarker0x00 0x0CSegment length is the length of the segment excluding the marker and scan data (12)0x03Three color components0x01 0x??Component 1 (luminance), huffman table ID0x02 0x??Component 2 (chrominance blue)0x03 0x??Component 3 (chrominance red)0x00 0x3F 0x00Skipping three bytes (no idea what the0x3Fis for…)...Entropy-encoded scan data, see JPEG scan data

    End Of Image

    0xFF 0xD9Marker

    Default quantization tables

    /* Luminance */
    const uint8_t Qy_[] = {
    	16,  11,  10,  16,  24,  40,  51,  61,
    	12,  12,  14,  19,  26,  58,  60,  55,
    	14,  13,  16,  24,  40,  57,  69,  56,
    	14,  17,  22,  29,  51,  87,  80,  62,
    	18,  22,  37,  56,  68, 109, 103,  77,
    	24,  35,  55,  64,  81, 104, 113,  92,
    	49,  64,  78,  87, 103, 121, 120, 101,
    	72,  92,  95,  98, 112, 100, 103,  99
    };
    
    /* Chrominance */
    const uint8_t Qc_[] = {
    	17, 18, 24, 47, 99, 99, 99, 99,
    	18, 21, 26, 66, 99, 99, 99, 99,
    	24, 26, 56, 99, 99, 99, 99, 99,
    	47, 66, 99, 99, 99, 99, 99, 99,
    	99, 99, 99, 99, 99, 99, 99, 99,
    	99, 99, 99, 99, 99, 99, 99, 99,
    	99, 99, 99, 99, 99, 99, 99, 99,
    	99, 99, 99, 99, 99, 99, 99, 99
    };
    

    Default Huffman tables

    /* Luminance DC */
    const uint8_t Hy_dc_bits[] = {
    	0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0
    };
    
    const uint8_t Hy_dc_val[] = {
    	0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
    };
    
    /* Luminance AC */
    const uint8_t Hy_ac_bits[] = {
    	0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d
    };
    
    const uint8_t Hy_ac_val[] = {
    	0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12,
    	0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07,
    	0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08,
    	0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0,
    	0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16,
    	0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28,
    	0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
    	0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
    	0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
    	0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
    	0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
    	0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,
    	0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98,
    	0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
    	0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6,
    	0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5,
    	0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4,
    	0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2,
    	0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea,
    	0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
    	0xf9, 0xfa
    };
    
    /* Chrominance DC */
    const uint8_t Hc_dc_bits[] = {
    	0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0
    };
    
    const uint8_t Hc_dc_val[] = {
    	0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
    };
    
    /* Chrominance AC */
    const uint8_t Hc_ac_bits[] = {
    	0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77
    };
    
    const uint8_t Hc_ac_val[] = {
    	0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21,
    	0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71,
    	0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91,
    	0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0,
    	0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34,
    	0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26,
    	0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38,
    	0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
    	0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
    	0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
    	0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
    	0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
    	0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96,
    	0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5,
    	0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4,
    	0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3,
    	0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2,
    	0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda,
    	0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
    	0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
    	0xf9, 0xfa
    };
    

    More information:http://class.ee.iastate.edu/ee528/Reading%20material/JPEG_File_Format.pdf

    minify-2.20.37/tests/html/main.go000066400000000000000000000004361464346127300165560ustar00rootroot00000000000000// +build gofuzz package fuzz import ( "bytes" "io/ioutil" "github.com/tdewolff/minify/v2" "github.com/tdewolff/minify/v2/html" ) // Fuzz is a fuzz test. func Fuzz(data []byte) int { r := bytes.NewBuffer(data) _ = html.Minify(minify.New(), ioutil.Discard, r, nil) return 1 } minify-2.20.37/tests/js/000077500000000000000000000000001464346127300147505ustar00rootroot00000000000000minify-2.20.37/tests/js/corpus/000077500000000000000000000000001464346127300162635ustar00rootroot00000000000000minify-2.20.37/tests/js/corpus/ace.js000066400000000000000000023164651464346127300173720ustar00rootroot00000000000000/* ***** BEGIN LICENSE BLOCK ***** * Distributed under the BSD license: * * Copyright (c) 2010, Ajax.org B.V. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Ajax.org B.V. nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * ***** END LICENSE BLOCK ***** */ /** * Define a module along with a payload * @param module a name for the payload * @param payload a function to call with (require, exports, module) params */ (function() { var ACE_NAMESPACE = ""; var global = (function() { return this; })(); if (!global && typeof window != "undefined") global = window; // strict mode if (!ACE_NAMESPACE && typeof requirejs !== "undefined") return; var define = function(module, deps, payload) { if (typeof module !== "string") { if (define.original) define.original.apply(this, arguments); else { console.error("dropping module because define wasn\'t a string."); console.trace(); } return; } if (arguments.length == 2) payload = deps; if (!define.modules[module]) { define.payloads[module] = payload; define.modules[module] = null; } }; define.modules = {}; define.payloads = {}; /** * Get at functionality define()ed using the function above */ var _require = function(parentId, module, callback) { if (typeof module === "string") { var payload = lookup(parentId, module); if (payload != undefined) { callback && callback(); return payload; } } else if (Object.prototype.toString.call(module) === "[object Array]") { var params = []; for (var i = 0, l = module.length; i < l; ++i) { var dep = lookup(parentId, module[i]); if (dep == undefined && require.original) return; params.push(dep); } return callback && callback.apply(null, params) || true; } }; var require = function(module, callback) { var packagedModule = _require("", module, callback); if (packagedModule == undefined && require.original) return require.original.apply(this, arguments); return packagedModule; }; var normalizeModule = function(parentId, moduleName) { // normalize plugin requires if (moduleName.indexOf("!") !== -1) { var chunks = moduleName.split("!"); return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]); } // normalize relative requires if (moduleName.charAt(0) == ".") { var base = parentId.split("/").slice(0, -1).join("/"); moduleName = base + "/" + moduleName; while(moduleName.indexOf(".") !== -1 && previous != moduleName) { var previous = moduleName; moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); } } return moduleName; }; /** * Internal function to lookup moduleNames and resolve them by calling the * definition function if needed. */ var lookup = function(parentId, moduleName) { moduleName = normalizeModule(parentId, moduleName); var module = define.modules[moduleName]; if (!module) { module = define.payloads[moduleName]; if (typeof module === 'function') { var exports = {}; var mod = { id: moduleName, uri: '', exports: exports, packaged: true }; var req = function(module, callback) { return _require(moduleName, module, callback); }; var returnValue = module(req, exports, mod); exports = returnValue || mod.exports; define.modules[moduleName] = exports; delete define.payloads[moduleName]; } module = define.modules[moduleName] = exports || module; } return module; }; function exportAce(ns) { var root = global; if (ns) { if (!global[ns]) global[ns] = {}; root = global[ns]; } if (!root.define || !root.define.packaged) { define.original = root.define; root.define = define; root.define.packaged = true; } if (!root.require || !root.require.packaged) { require.original = root.require; root.require = require; root.require.packaged = true; } } exportAce(ACE_NAMESPACE); })(); define("ace/lib/regexp",["require","exports","module"], function(require, exports, module) { "use strict"; var real = { exec: RegExp.prototype.exec, test: RegExp.prototype.test, match: String.prototype.match, replace: String.prototype.replace, split: String.prototype.split }, compliantExecNpcg = real.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups compliantLastIndexIncrement = function () { var x = /^/g; real.test.call(x, ""); return !x.lastIndex; }(); if (compliantLastIndexIncrement && compliantExecNpcg) return; RegExp.prototype.exec = function (str) { var match = real.exec.apply(this, arguments), name, r2; if ( typeof(str) == 'string' && match) { if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) { r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), "g", "")); real.replace.call(str.slice(match.index), r2, function () { for (var i = 1; i < arguments.length - 2; i++) { if (arguments[i] === undefined) match[i] = undefined; } }); } if (this._xregexp && this._xregexp.captureNames) { for (var i = 1; i < match.length; i++) { name = this._xregexp.captureNames[i - 1]; if (name) match[name] = match[i]; } } if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index)) this.lastIndex--; } return match; }; if (!compliantLastIndexIncrement) { RegExp.prototype.test = function (str) { var match = real.exec.call(this, str); if (match && this.global && !match[0].length && (this.lastIndex > match.index)) this.lastIndex--; return !!match; }; } function getNativeFlags (regex) { return (regex.global ? "g" : "") + (regex.ignoreCase ? "i" : "") + (regex.multiline ? "m" : "") + (regex.extended ? "x" : "") + // Proposed for ES4; included in AS3 (regex.sticky ? "y" : ""); } function indexOf (array, item, from) { if (Array.prototype.indexOf) // Use the native array method if available return array.indexOf(item, from); for (var i = from || 0; i < array.length; i++) { if (array[i] === item) return i; } return -1; } }); define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) { function Empty() {} if (!Function.prototype.bind) { Function.prototype.bind = function bind(that) { // .length is 1 var target = this; if (typeof target != "function") { throw new TypeError("Function.prototype.bind called on incompatible " + target); } var args = slice.call(arguments, 1); // for normal call var bound = function () { if (this instanceof bound) { var result = target.apply( this, args.concat(slice.call(arguments)) ); if (Object(result) === result) { return result; } return this; } else { return target.apply( that, args.concat(slice.call(arguments)) ); } }; if(target.prototype) { Empty.prototype = target.prototype; bound.prototype = new Empty(); Empty.prototype = null; } return bound; }; } var call = Function.prototype.call; var prototypeOfArray = Array.prototype; var prototypeOfObject = Object.prototype; var slice = prototypeOfArray.slice; var _toString = call.bind(prototypeOfObject.toString); var owns = call.bind(prototypeOfObject.hasOwnProperty); var defineGetter; var defineSetter; var lookupGetter; var lookupSetter; var supportsAccessors; if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) { defineGetter = call.bind(prototypeOfObject.__defineGetter__); defineSetter = call.bind(prototypeOfObject.__defineSetter__); lookupGetter = call.bind(prototypeOfObject.__lookupGetter__); lookupSetter = call.bind(prototypeOfObject.__lookupSetter__); } if ([1,2].splice(0).length != 2) { if(function() { // test IE < 9 to splice bug - see issue #138 function makeArray(l) { var a = new Array(l+2); a[0] = a[1] = 0; return a; } var array = [], lengthBefore; array.splice.apply(array, makeArray(20)); array.splice.apply(array, makeArray(26)); lengthBefore = array.length; //46 array.splice(5, 0, "XXX"); // add one element lengthBefore + 1 == array.length if (lengthBefore + 1 == array.length) { return true;// has right splice implementation without bugs } }()) {//IE 6/7 var array_splice = Array.prototype.splice; Array.prototype.splice = function(start, deleteCount) { if (!arguments.length) { return []; } else { return array_splice.apply(this, [ start === void 0 ? 0 : start, deleteCount === void 0 ? (this.length - start) : deleteCount ].concat(slice.call(arguments, 2))) } }; } else {//IE8 Array.prototype.splice = function(pos, removeCount){ var length = this.length; if (pos > 0) { if (pos > length) pos = length; } else if (pos == void 0) { pos = 0; } else if (pos < 0) { pos = Math.max(length + pos, 0); } if (!(pos+removeCount < length)) removeCount = length - pos; var removed = this.slice(pos, pos+removeCount); var insert = slice.call(arguments, 2); var add = insert.length; if (pos === length) { if (add) { this.push.apply(this, insert); } } else { var remove = Math.min(removeCount, length - pos); var tailOldPos = pos + remove; var tailNewPos = tailOldPos + add - remove; var tailCount = length - tailOldPos; var lengthAfterRemove = length - remove; if (tailNewPos < tailOldPos) { // case A for (var i = 0; i < tailCount; ++i) { this[tailNewPos+i] = this[tailOldPos+i]; } } else if (tailNewPos > tailOldPos) { // case B for (i = tailCount; i--; ) { this[tailNewPos+i] = this[tailOldPos+i]; } } // else, add == remove (nothing to do) if (add && pos === lengthAfterRemove) { this.length = lengthAfterRemove; // truncate array this.push.apply(this, insert); } else { this.length = lengthAfterRemove + add; // reserves space for (i = 0; i < add; ++i) { this[pos+i] = insert[i]; } } } return removed; }; } } if (!Array.isArray) { Array.isArray = function isArray(obj) { return _toString(obj) == "[object Array]"; }; } var boxedString = Object("a"), splitString = boxedString[0] != "a" || !(0 in boxedString); if (!Array.prototype.forEach) { Array.prototype.forEach = function forEach(fun /*, thisp*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, thisp = arguments[1], i = -1, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(); // TODO message } while (++i < length) { if (i in self) { fun.call(thisp, self[i], i, object); } } }; } if (!Array.prototype.map) { Array.prototype.map = function map(fun /*, thisp*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, result = Array(length), thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self) result[i] = fun.call(thisp, self[i], i, object); } return result; }; } if (!Array.prototype.filter) { Array.prototype.filter = function filter(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, result = [], value, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self) { value = self[i]; if (fun.call(thisp, value, i, object)) { result.push(value); } } } return result; }; } if (!Array.prototype.every) { Array.prototype.every = function every(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self && !fun.call(thisp, self[i], i, object)) { return false; } } return true; }; } if (!Array.prototype.some) { Array.prototype.some = function some(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self && fun.call(thisp, self[i], i, object)) { return true; } } return false; }; } if (!Array.prototype.reduce) { Array.prototype.reduce = function reduce(fun /*, initial*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } if (!length && arguments.length == 1) { throw new TypeError("reduce of empty array with no initial value"); } var i = 0; var result; if (arguments.length >= 2) { result = arguments[1]; } else { do { if (i in self) { result = self[i++]; break; } if (++i >= length) { throw new TypeError("reduce of empty array with no initial value"); } } while (true); } for (; i < length; i++) { if (i in self) { result = fun.call(void 0, result, self[i], i, object); } } return result; }; } if (!Array.prototype.reduceRight) { Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } if (!length && arguments.length == 1) { throw new TypeError("reduceRight of empty array with no initial value"); } var result, i = length - 1; if (arguments.length >= 2) { result = arguments[1]; } else { do { if (i in self) { result = self[i--]; break; } if (--i < 0) { throw new TypeError("reduceRight of empty array with no initial value"); } } while (true); } do { if (i in this) { result = fun.call(void 0, result, self[i], i, object); } } while (i--); return result; }; } if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) { Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) { var self = splitString && _toString(this) == "[object String]" ? this.split("") : toObject(this), length = self.length >>> 0; if (!length) { return -1; } var i = 0; if (arguments.length > 1) { i = toInteger(arguments[1]); } i = i >= 0 ? i : Math.max(0, length + i); for (; i < length; i++) { if (i in self && self[i] === sought) { return i; } } return -1; }; } if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) { Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) { var self = splitString && _toString(this) == "[object String]" ? this.split("") : toObject(this), length = self.length >>> 0; if (!length) { return -1; } var i = length - 1; if (arguments.length > 1) { i = Math.min(i, toInteger(arguments[1])); } i = i >= 0 ? i : length - Math.abs(i); for (; i >= 0; i--) { if (i in self && sought === self[i]) { return i; } } return -1; }; } if (!Object.getPrototypeOf) { Object.getPrototypeOf = function getPrototypeOf(object) { return object.__proto__ || ( object.constructor ? object.constructor.prototype : prototypeOfObject ); }; } if (!Object.getOwnPropertyDescriptor) { var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " + "non-object: "; Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) { if ((typeof object != "object" && typeof object != "function") || object === null) throw new TypeError(ERR_NON_OBJECT + object); if (!owns(object, property)) return; var descriptor, getter, setter; descriptor = { enumerable: true, configurable: true }; if (supportsAccessors) { var prototype = object.__proto__; object.__proto__ = prototypeOfObject; var getter = lookupGetter(object, property); var setter = lookupSetter(object, property); object.__proto__ = prototype; if (getter || setter) { if (getter) descriptor.get = getter; if (setter) descriptor.set = setter; return descriptor; } } descriptor.value = object[property]; return descriptor; }; } if (!Object.getOwnPropertyNames) { Object.getOwnPropertyNames = function getOwnPropertyNames(object) { return Object.keys(object); }; } if (!Object.create) { var createEmpty; if (Object.prototype.__proto__ === null) { createEmpty = function () { return { "__proto__": null }; }; } else { createEmpty = function () { var empty = {}; for (var i in empty) empty[i] = null; empty.constructor = empty.hasOwnProperty = empty.propertyIsEnumerable = empty.isPrototypeOf = empty.toLocaleString = empty.toString = empty.valueOf = empty.__proto__ = null; return empty; } } Object.create = function create(prototype, properties) { var object; if (prototype === null) { object = createEmpty(); } else { if (typeof prototype != "object") throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'"); var Type = function () {}; Type.prototype = prototype; object = new Type(); object.__proto__ = prototype; } if (properties !== void 0) Object.defineProperties(object, properties); return object; }; } function doesDefinePropertyWork(object) { try { Object.defineProperty(object, "sentinel", {}); return "sentinel" in object; } catch (exception) { } } if (Object.defineProperty) { var definePropertyWorksOnObject = doesDefinePropertyWork({}); var definePropertyWorksOnDom = typeof document == "undefined" || doesDefinePropertyWork(document.createElement("div")); if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) { var definePropertyFallback = Object.defineProperty; } } if (!Object.defineProperty || definePropertyFallback) { var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: "; var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: " var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " + "on this javascript engine"; Object.defineProperty = function defineProperty(object, property, descriptor) { if ((typeof object != "object" && typeof object != "function") || object === null) throw new TypeError(ERR_NON_OBJECT_TARGET + object); if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null) throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor); if (definePropertyFallback) { try { return definePropertyFallback.call(Object, object, property, descriptor); } catch (exception) { } } if (owns(descriptor, "value")) { if (supportsAccessors && (lookupGetter(object, property) || lookupSetter(object, property))) { var prototype = object.__proto__; object.__proto__ = prototypeOfObject; delete object[property]; object[property] = descriptor.value; object.__proto__ = prototype; } else { object[property] = descriptor.value; } } else { if (!supportsAccessors) throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); if (owns(descriptor, "get")) defineGetter(object, property, descriptor.get); if (owns(descriptor, "set")) defineSetter(object, property, descriptor.set); } return object; }; } if (!Object.defineProperties) { Object.defineProperties = function defineProperties(object, properties) { for (var property in properties) { if (owns(properties, property)) Object.defineProperty(object, property, properties[property]); } return object; }; } if (!Object.seal) { Object.seal = function seal(object) { return object; }; } if (!Object.freeze) { Object.freeze = function freeze(object) { return object; }; } try { Object.freeze(function () {}); } catch (exception) { Object.freeze = (function freeze(freezeObject) { return function freeze(object) { if (typeof object == "function") { return object; } else { return freezeObject(object); } }; })(Object.freeze); } if (!Object.preventExtensions) { Object.preventExtensions = function preventExtensions(object) { return object; }; } if (!Object.isSealed) { Object.isSealed = function isSealed(object) { return false; }; } if (!Object.isFrozen) { Object.isFrozen = function isFrozen(object) { return false; }; } if (!Object.isExtensible) { Object.isExtensible = function isExtensible(object) { if (Object(object) === object) { throw new TypeError(); // TODO message } var name = ''; while (owns(object, name)) { name += '?'; } object[name] = true; var returnValue = owns(object, name); delete object[name]; return returnValue; }; } if (!Object.keys) { var hasDontEnumBug = true, dontEnums = [ "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor" ], dontEnumsLength = dontEnums.length; for (var key in {"toString": null}) { hasDontEnumBug = false; } Object.keys = function keys(object) { if ( (typeof object != "object" && typeof object != "function") || object === null ) { throw new TypeError("Object.keys called on a non-object"); } var keys = []; for (var name in object) { if (owns(object, name)) { keys.push(name); } } if (hasDontEnumBug) { for (var i = 0, ii = dontEnumsLength; i < ii; i++) { var dontEnum = dontEnums[i]; if (owns(object, dontEnum)) { keys.push(dontEnum); } } } return keys; }; } if (!Date.now) { Date.now = function now() { return new Date().getTime(); }; } var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" + "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" + "\u2029\uFEFF"; if (!String.prototype.trim || ws.trim()) { ws = "[" + ws + "]"; var trimBeginRegexp = new RegExp("^" + ws + ws + "*"), trimEndRegexp = new RegExp(ws + ws + "*$"); String.prototype.trim = function trim() { return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, ""); }; } function toInteger(n) { n = +n; if (n !== n) { // isNaN n = 0; } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) { n = (n > 0 || -1) * Math.floor(Math.abs(n)); } return n; } function isPrimitive(input) { var type = typeof input; return ( input === null || type === "undefined" || type === "boolean" || type === "number" || type === "string" ); } function toPrimitive(input) { var val, valueOf, toString; if (isPrimitive(input)) { return input; } valueOf = input.valueOf; if (typeof valueOf === "function") { val = valueOf.call(input); if (isPrimitive(val)) { return val; } } toString = input.toString; if (typeof toString === "function") { val = toString.call(input); if (isPrimitive(val)) { return val; } } throw new TypeError(); } var toObject = function (o) { if (o == null) { // this matches both null and undefined throw new TypeError("can't convert "+o+" to object"); } return Object(o); }; }); define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"], function(require, exports, module) { "use strict"; require("./regexp"); require("./es5-shim"); }); define("ace/lib/dom",["require","exports","module"], function(require, exports, module) { "use strict"; var XHTML_NS = "http://www.w3.org/1999/xhtml"; exports.getDocumentHead = function(doc) { if (!doc) doc = document; return doc.head || doc.getElementsByTagName("head")[0] || doc.documentElement; } exports.createElement = function(tag, ns) { return document.createElementNS ? document.createElementNS(ns || XHTML_NS, tag) : document.createElement(tag); }; exports.hasCssClass = function(el, name) { var classes = (el.className || "").split(/\s+/g); return classes.indexOf(name) !== -1; }; exports.addCssClass = function(el, name) { if (!exports.hasCssClass(el, name)) { el.className += " " + name; } }; exports.removeCssClass = function(el, name) { var classes = el.className.split(/\s+/g); while (true) { var index = classes.indexOf(name); if (index == -1) { break; } classes.splice(index, 1); } el.className = classes.join(" "); }; exports.toggleCssClass = function(el, name) { var classes = el.className.split(/\s+/g), add = true; while (true) { var index = classes.indexOf(name); if (index == -1) { break; } add = false; classes.splice(index, 1); } if(add) classes.push(name); el.className = classes.join(" "); return add; }; exports.setCssClass = function(node, className, include) { if (include) { exports.addCssClass(node, className); } else { exports.removeCssClass(node, className); } }; exports.hasCssString = function(id, doc) { var index = 0, sheets; doc = doc || document; if (doc.createStyleSheet && (sheets = doc.styleSheets)) { while (index < sheets.length) if (sheets[index++].owningElement.id === id) return true; } else if ((sheets = doc.getElementsByTagName("style"))) { while (index < sheets.length) if (sheets[index++].id === id) return true; } return false; }; exports.importCssString = function importCssString(cssText, id, doc) { doc = doc || document; if (id && exports.hasCssString(id, doc)) return null; var style; if (doc.createStyleSheet) { style = doc.createStyleSheet(); style.cssText = cssText; if (id) style.owningElement.id = id; } else { style = doc.createElementNS ? doc.createElementNS(XHTML_NS, "style") : doc.createElement("style"); style.appendChild(doc.createTextNode(cssText)); if (id) style.id = id; exports.getDocumentHead(doc).appendChild(style); } }; exports.importCssStylsheet = function(uri, doc) { if (doc.createStyleSheet) { doc.createStyleSheet(uri); } else { var link = exports.createElement('link'); link.rel = 'stylesheet'; link.href = uri; exports.getDocumentHead(doc).appendChild(link); } }; exports.getInnerWidth = function(element) { return ( parseInt(exports.computedStyle(element, "paddingLeft"), 10) + parseInt(exports.computedStyle(element, "paddingRight"), 10) + element.clientWidth ); }; exports.getInnerHeight = function(element) { return ( parseInt(exports.computedStyle(element, "paddingTop"), 10) + parseInt(exports.computedStyle(element, "paddingBottom"), 10) + element.clientHeight ); }; if (typeof document == "undefined") return; if (window.pageYOffset !== undefined) { exports.getPageScrollTop = function() { return window.pageYOffset; }; exports.getPageScrollLeft = function() { return window.pageXOffset; }; } else { exports.getPageScrollTop = function() { return document.body.scrollTop; }; exports.getPageScrollLeft = function() { return document.body.scrollLeft; }; } if (window.getComputedStyle) exports.computedStyle = function(element, style) { if (style) return (window.getComputedStyle(element, "") || {})[style] || ""; return window.getComputedStyle(element, "") || {}; }; else exports.computedStyle = function(element, style) { if (style) return element.currentStyle[style]; return element.currentStyle; }; exports.scrollbarWidth = function(document) { var inner = exports.createElement("ace_inner"); inner.style.width = "100%"; inner.style.minWidth = "0px"; inner.style.height = "200px"; inner.style.display = "block"; var outer = exports.createElement("ace_outer"); var style = outer.style; style.position = "absolute"; style.left = "-10000px"; style.overflow = "hidden"; style.width = "200px"; style.minWidth = "0px"; style.height = "150px"; style.display = "block"; outer.appendChild(inner); var body = document.documentElement; body.appendChild(outer); var noScrollbar = inner.offsetWidth; style.overflow = "scroll"; var withScrollbar = inner.offsetWidth; if (noScrollbar == withScrollbar) { withScrollbar = outer.clientWidth; } body.removeChild(outer); return noScrollbar-withScrollbar; }; exports.setInnerHtml = function(el, innerHtml) { var element = el.cloneNode(false);//document.createElement("div"); element.innerHTML = innerHtml; el.parentNode.replaceChild(element, el); return element; }; if ("textContent" in document.documentElement) { exports.setInnerText = function(el, innerText) { el.textContent = innerText; }; exports.getInnerText = function(el) { return el.textContent; }; } else { exports.setInnerText = function(el, innerText) { el.innerText = innerText; }; exports.getInnerText = function(el) { return el.innerText; }; } exports.getParentWindow = function(document) { return document.defaultView || document.parentWindow; }; }); define("ace/lib/oop",["require","exports","module"], function(require, exports, module) { "use strict"; exports.inherits = function(ctor, superCtor) { ctor.super_ = superCtor; ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }; exports.mixin = function(obj, mixin) { for (var key in mixin) { obj[key] = mixin[key]; } return obj; }; exports.implement = function(proto, mixin) { exports.mixin(proto, mixin); }; }); define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"], function(require, exports, module) { "use strict"; require("./fixoldbrowsers"); var oop = require("./oop"); var Keys = (function() { var ret = { MODIFIER_KEYS: { 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta' }, KEY_MODS: { "ctrl": 1, "alt": 2, "option" : 2, "shift": 4, "super": 8, "meta": 8, "command": 8, "cmd": 8 }, FUNCTION_KEYS : { 8 : "Backspace", 9 : "Tab", 13 : "Return", 19 : "Pause", 27 : "Esc", 32 : "Space", 33 : "PageUp", 34 : "PageDown", 35 : "End", 36 : "Home", 37 : "Left", 38 : "Up", 39 : "Right", 40 : "Down", 44 : "Print", 45 : "Insert", 46 : "Delete", 96 : "Numpad0", 97 : "Numpad1", 98 : "Numpad2", 99 : "Numpad3", 100: "Numpad4", 101: "Numpad5", 102: "Numpad6", 103: "Numpad7", 104: "Numpad8", 105: "Numpad9", '-13': "NumpadEnter", 112: "F1", 113: "F2", 114: "F3", 115: "F4", 116: "F5", 117: "F6", 118: "F7", 119: "F8", 120: "F9", 121: "F10", 122: "F11", 123: "F12", 144: "Numlock", 145: "Scrolllock" }, PRINTABLE_KEYS: { 32: ' ', 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5', 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', 61: '=', 65: 'a', 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h', 73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o', 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v', 87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`', 219: '[', 220: '\\',221: ']', 222: '\'' } }; var name, i; for (i in ret.FUNCTION_KEYS) { name = ret.FUNCTION_KEYS[i].toLowerCase(); ret[name] = parseInt(i, 10); } for (i in ret.PRINTABLE_KEYS) { name = ret.PRINTABLE_KEYS[i].toLowerCase(); ret[name] = parseInt(i, 10); } oop.mixin(ret, ret.MODIFIER_KEYS); oop.mixin(ret, ret.PRINTABLE_KEYS); oop.mixin(ret, ret.FUNCTION_KEYS); ret.enter = ret["return"]; ret.escape = ret.esc; ret.del = ret["delete"]; ret[173] = '-'; (function() { var mods = ["cmd", "ctrl", "alt", "shift"]; for (var i = Math.pow(2, mods.length); i--;) { ret.KEY_MODS[i] = mods.filter(function(x) { return i & ret.KEY_MODS[x]; }).join("-") + "-"; } })(); ret.KEY_MODS[0] = ""; ret.KEY_MODS[-1] = "input-"; return ret; })(); oop.mixin(exports, Keys); exports.keyCodeToString = function(keyCode) { var keyString = Keys[keyCode]; if (typeof keyString != "string") keyString = String.fromCharCode(keyCode); return keyString.toLowerCase(); }; }); define("ace/lib/useragent",["require","exports","module"], function(require, exports, module) { "use strict"; exports.OS = { LINUX: "LINUX", MAC: "MAC", WINDOWS: "WINDOWS" }; exports.getOS = function() { if (exports.isMac) { return exports.OS.MAC; } else if (exports.isLinux) { return exports.OS.LINUX; } else { return exports.OS.WINDOWS; } }; if (typeof navigator != "object") return; var os = (navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase(); var ua = navigator.userAgent; exports.isWin = (os == "win"); exports.isMac = (os == "mac"); exports.isLinux = (os == "linux"); exports.isIE = (navigator.appName == "Microsoft Internet Explorer" || navigator.appName.indexOf("MSAppHost") >= 0) ? parseFloat((ua.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]) : parseFloat((ua.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]); // for ie exports.isOldIE = exports.isIE && exports.isIE < 9; exports.isGecko = exports.isMozilla = (window.Controllers || window.controllers) && window.navigator.product === "Gecko"; exports.isOldGecko = exports.isGecko && parseInt((ua.match(/rv\:(\d+)/)||[])[1], 10) < 4; exports.isOpera = window.opera && Object.prototype.toString.call(window.opera) == "[object Opera]"; exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined; exports.isChrome = parseFloat(ua.split(" Chrome/")[1]) || undefined; exports.isAIR = ua.indexOf("AdobeAIR") >= 0; exports.isIPad = ua.indexOf("iPad") >= 0; exports.isTouchPad = ua.indexOf("TouchPad") >= 0; exports.isChromeOS = ua.indexOf(" CrOS ") >= 0; }); define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(require, exports, module) { "use strict"; var keys = require("./keys"); var useragent = require("./useragent"); exports.addListener = function(elem, type, callback) { if (elem.addEventListener) { return elem.addEventListener(type, callback, false); } if (elem.attachEvent) { var wrapper = function() { callback.call(elem, window.event); }; callback._wrapper = wrapper; elem.attachEvent("on" + type, wrapper); } }; exports.removeListener = function(elem, type, callback) { if (elem.removeEventListener) { return elem.removeEventListener(type, callback, false); } if (elem.detachEvent) { elem.detachEvent("on" + type, callback._wrapper || callback); } }; exports.stopEvent = function(e) { exports.stopPropagation(e); exports.preventDefault(e); return false; }; exports.stopPropagation = function(e) { if (e.stopPropagation) e.stopPropagation(); else e.cancelBubble = true; }; exports.preventDefault = function(e) { if (e.preventDefault) e.preventDefault(); else e.returnValue = false; }; exports.getButton = function(e) { if (e.type == "dblclick") return 0; if (e.type == "contextmenu" || (useragent.isMac && (e.ctrlKey && !e.altKey && !e.shiftKey))) return 2; if (e.preventDefault) { return e.button; } else { return {1:0, 2:2, 4:1}[e.button]; } }; exports.capture = function(el, eventHandler, releaseCaptureHandler) { function onMouseUp(e) { eventHandler && eventHandler(e); releaseCaptureHandler && releaseCaptureHandler(e); exports.removeListener(document, "mousemove", eventHandler, true); exports.removeListener(document, "mouseup", onMouseUp, true); exports.removeListener(document, "dragstart", onMouseUp, true); } exports.addListener(document, "mousemove", eventHandler, true); exports.addListener(document, "mouseup", onMouseUp, true); exports.addListener(document, "dragstart", onMouseUp, true); return onMouseUp; }; exports.addMouseWheelListener = function(el, callback) { if ("onmousewheel" in el) { exports.addListener(el, "mousewheel", function(e) { var factor = 8; if (e.wheelDeltaX !== undefined) { e.wheelX = -e.wheelDeltaX / factor; e.wheelY = -e.wheelDeltaY / factor; } else { e.wheelX = 0; e.wheelY = -e.wheelDelta / factor; } callback(e); }); } else if ("onwheel" in el) { exports.addListener(el, "wheel", function(e) { var factor = 0.35; switch (e.deltaMode) { case e.DOM_DELTA_PIXEL: e.wheelX = e.deltaX * factor || 0; e.wheelY = e.deltaY * factor || 0; break; case e.DOM_DELTA_LINE: case e.DOM_DELTA_PAGE: e.wheelX = (e.deltaX || 0) * 5; e.wheelY = (e.deltaY || 0) * 5; break; } callback(e); }); } else { exports.addListener(el, "DOMMouseScroll", function(e) { if (e.axis && e.axis == e.HORIZONTAL_AXIS) { e.wheelX = (e.detail || 0) * 5; e.wheelY = 0; } else { e.wheelX = 0; e.wheelY = (e.detail || 0) * 5; } callback(e); }); } }; exports.addMultiMouseDownListener = function(el, timeouts, eventHandler, callbackName) { var clicks = 0; var startX, startY, timer; var eventNames = { 2: "dblclick", 3: "tripleclick", 4: "quadclick" }; exports.addListener(el, "mousedown", function(e) { if (exports.getButton(e) !== 0) { clicks = 0; } else if (e.detail > 1) { clicks++; if (clicks > 4) clicks = 1; } else { clicks = 1; } if (useragent.isIE) { var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5; if (!timer || isNewClick) clicks = 1; if (timer) clearTimeout(timer); timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600); if (clicks == 1) { startX = e.clientX; startY = e.clientY; } } e._clicks = clicks; eventHandler[callbackName]("mousedown", e); if (clicks > 4) clicks = 0; else if (clicks > 1) return eventHandler[callbackName](eventNames[clicks], e); }); if (useragent.isOldIE) { exports.addListener(el, "dblclick", function(e) { clicks = 2; if (timer) clearTimeout(timer); timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600); eventHandler[callbackName]("mousedown", e); eventHandler[callbackName](eventNames[clicks], e); }); } }; var getModifierHash = useragent.isMac && useragent.isOpera && !("KeyboardEvent" in window) ? function(e) { return 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0); } : function(e) { return 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0); }; exports.getModifierString = function(e) { return keys.KEY_MODS[getModifierHash(e)]; }; function normalizeCommandKeys(callback, e, keyCode) { var hashId = getModifierHash(e); if (!useragent.isMac && pressedKeys) { if (pressedKeys[91] || pressedKeys[92]) hashId |= 8; if (pressedKeys.altGr) { if ((3 & hashId) != 3) pressedKeys.altGr = 0; else return; } if (keyCode === 18 || keyCode === 17) { var location = "location" in e ? e.location : e.keyLocation; if (keyCode === 17 && location === 1) { if (pressedKeys[keyCode] == 1) ts = e.timeStamp; } else if (keyCode === 18 && hashId === 3 && location === 2) { var dt = e.timestamp - ts; if (dt < 50) pressedKeys.altGr = true; } } } if (keyCode in keys.MODIFIER_KEYS) { keyCode = -1; } if (hashId & 8 && (keyCode === 91 || keyCode === 93)) { keyCode = -1; } if (!hashId && keyCode === 13) { var location = "location" in e ? e.location : e.keyLocation; if (location === 3) { callback(e, hashId, -keyCode); if (e.defaultPrevented) return; } } if (useragent.isChromeOS && hashId & 8) { callback(e, hashId, keyCode); if (e.defaultPrevented) return; else hashId &= ~8; } if (!hashId && !(keyCode in keys.FUNCTION_KEYS) && !(keyCode in keys.PRINTABLE_KEYS)) { return false; } return callback(e, hashId, keyCode); } var pressedKeys = null; var ts = 0; exports.addCommandKeyListener = function(el, callback) { var addListener = exports.addListener; if (useragent.isOldGecko || (useragent.isOpera && !("KeyboardEvent" in window))) { var lastKeyDownKeyCode = null; addListener(el, "keydown", function(e) { lastKeyDownKeyCode = e.keyCode; }); addListener(el, "keypress", function(e) { return normalizeCommandKeys(callback, e, lastKeyDownKeyCode); }); } else { var lastDefaultPrevented = null; addListener(el, "keydown", function(e) { pressedKeys[e.keyCode] = (pressedKeys[e.keyCode] || 0) + 1; var result = normalizeCommandKeys(callback, e, e.keyCode); lastDefaultPrevented = e.defaultPrevented; return result; }); addListener(el, "keypress", function(e) { if (lastDefaultPrevented && (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey)) { exports.stopEvent(e); lastDefaultPrevented = null; } }); addListener(el, "keyup", function(e) { pressedKeys[e.keyCode] = null; }); if (!pressedKeys) { pressedKeys = Object.create(null); addListener(window, "focus", function(e) { pressedKeys = Object.create(null); }); } } }; if (window.postMessage && !useragent.isOldIE) { var postMessageId = 1; exports.nextTick = function(callback, win) { win = win || window; var messageName = "zero-timeout-message-" + postMessageId; exports.addListener(win, "message", function listener(e) { if (e.data == messageName) { exports.stopPropagation(e); exports.removeListener(win, "message", listener); callback(); } }); win.postMessage(messageName, "*"); }; } exports.nextFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame; if (exports.nextFrame) exports.nextFrame = exports.nextFrame.bind(window); else exports.nextFrame = function(callback) { setTimeout(callback, 17); }; }); define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { "use strict"; exports.last = function(a) { return a[a.length - 1]; }; exports.stringReverse = function(string) { return string.split("").reverse().join(""); }; exports.stringRepeat = function (string, count) { var result = ''; while (count > 0) { if (count & 1) result += string; if (count >>= 1) string += string; } return result; }; var trimBeginRegexp = /^\s\s*/; var trimEndRegexp = /\s\s*$/; exports.stringTrimLeft = function (string) { return string.replace(trimBeginRegexp, ''); }; exports.stringTrimRight = function (string) { return string.replace(trimEndRegexp, ''); }; exports.copyObject = function(obj) { var copy = {}; for (var key in obj) { copy[key] = obj[key]; } return copy; }; exports.copyArray = function(array){ var copy = []; for (var i=0, l=array.length; i 1); return ev.preventDefault(); }; this.startSelect = function(pos, waitForClickSelection) { pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y); var editor = this.editor; editor.$blockScrolling++; if (this.mousedownEvent.getShiftKey()) editor.selection.selectToPosition(pos); else if (!waitForClickSelection) editor.selection.moveToPosition(pos); if (!waitForClickSelection) this.select(); if (editor.renderer.scroller.setCapture) { editor.renderer.scroller.setCapture(); } editor.setStyle("ace_selecting"); this.setState("select"); editor.$blockScrolling--; }; this.select = function() { var anchor, editor = this.editor; var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y); editor.$blockScrolling++; if (this.$clickSelection) { var cmp = this.$clickSelection.comparePoint(cursor); if (cmp == -1) { anchor = this.$clickSelection.end; } else if (cmp == 1) { anchor = this.$clickSelection.start; } else { var orientedRange = calcRangeOrientation(this.$clickSelection, cursor); cursor = orientedRange.cursor; anchor = orientedRange.anchor; } editor.selection.setSelectionAnchor(anchor.row, anchor.column); } editor.selection.selectToPosition(cursor); editor.$blockScrolling--; editor.renderer.scrollCursorIntoView(); }; this.extendSelectionBy = function(unitName) { var anchor, editor = this.editor; var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y); var range = editor.selection[unitName](cursor.row, cursor.column); editor.$blockScrolling++; if (this.$clickSelection) { var cmpStart = this.$clickSelection.comparePoint(range.start); var cmpEnd = this.$clickSelection.comparePoint(range.end); if (cmpStart == -1 && cmpEnd <= 0) { anchor = this.$clickSelection.end; if (range.end.row != cursor.row || range.end.column != cursor.column) cursor = range.start; } else if (cmpEnd == 1 && cmpStart >= 0) { anchor = this.$clickSelection.start; if (range.start.row != cursor.row || range.start.column != cursor.column) cursor = range.end; } else if (cmpStart == -1 && cmpEnd == 1) { cursor = range.end; anchor = range.start; } else { var orientedRange = calcRangeOrientation(this.$clickSelection, cursor); cursor = orientedRange.cursor; anchor = orientedRange.anchor; } editor.selection.setSelectionAnchor(anchor.row, anchor.column); } editor.selection.selectToPosition(cursor); editor.$blockScrolling--; editor.renderer.scrollCursorIntoView(); }; this.selectEnd = this.selectAllEnd = this.selectByWordsEnd = this.selectByLinesEnd = function() { this.$clickSelection = null; this.editor.unsetStyle("ace_selecting"); if (this.editor.renderer.scroller.releaseCapture) { this.editor.renderer.scroller.releaseCapture(); } }; this.focusWait = function() { var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); var time = Date.now(); if (distance > DRAG_OFFSET || time - this.mousedownEvent.time > this.$focusTimout) this.startSelect(this.mousedownEvent.getDocumentPosition()); }; this.onDoubleClick = function(ev) { var pos = ev.getDocumentPosition(); var editor = this.editor; var session = editor.session; var range = session.getBracketRange(pos); if (range) { if (range.isEmpty()) { range.start.column--; range.end.column++; } this.setState("select"); } else { range = editor.selection.getWordRange(pos.row, pos.column); this.setState("selectByWords"); } this.$clickSelection = range; this.select(); }; this.onTripleClick = function(ev) { var pos = ev.getDocumentPosition(); var editor = this.editor; this.setState("selectByLines"); var range = editor.getSelectionRange(); if (range.isMultiLine() && range.contains(pos.row, pos.column)) { this.$clickSelection = editor.selection.getLineRange(range.start.row); this.$clickSelection.end = editor.selection.getLineRange(range.end.row).end; } else { this.$clickSelection = editor.selection.getLineRange(pos.row); } this.select(); }; this.onQuadClick = function(ev) { var editor = this.editor; editor.selectAll(); this.$clickSelection = editor.getSelectionRange(); this.setState("selectAll"); }; this.onMouseWheel = function(ev) { if (ev.getAccelKey()) return; if (ev.getShiftKey() && ev.wheelY && !ev.wheelX) { ev.wheelX = ev.wheelY; ev.wheelY = 0; } var t = ev.domEvent.timeStamp; var dt = t - (this.$lastScrollTime||0); var editor = this.editor; var isScrolable = editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); if (isScrolable || dt < 200) { this.$lastScrollTime = t; editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); return ev.stop(); } }; }).call(DefaultHandlers.prototype); exports.DefaultHandlers = DefaultHandlers; function calcDistance(ax, ay, bx, by) { return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2)); } function calcRangeOrientation(range, cursor) { if (range.start.row == range.end.row) var cmp = 2 * cursor.column - range.start.column - range.end.column; else if (range.start.row == range.end.row - 1 && !range.start.column && !range.end.column) var cmp = cursor.column - 4; else var cmp = 2 * cursor.row - range.start.row - range.end.row; if (cmp < 0) return {cursor: range.start, anchor: range.end}; else return {cursor: range.end, anchor: range.start}; } }); define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var dom = require("./lib/dom"); function Tooltip (parentNode) { this.isOpen = false; this.$element = null; this.$parentNode = parentNode; } (function() { this.$init = function() { this.$element = dom.createElement("div"); this.$element.className = "ace_tooltip"; this.$element.style.display = "none"; this.$parentNode.appendChild(this.$element); return this.$element; }; this.getElement = function() { return this.$element || this.$init(); }; this.setText = function(text) { dom.setInnerText(this.getElement(), text); }; this.setHtml = function(html) { this.getElement().innerHTML = html; }; this.setPosition = function(x, y) { this.getElement().style.left = x + "px"; this.getElement().style.top = y + "px"; }; this.setClassName = function(className) { dom.addCssClass(this.getElement(), className); }; this.show = function(text, x, y) { if (text != null) this.setText(text); if (x != null && y != null) this.setPosition(x, y); if (!this.isOpen) { this.getElement().style.display = "block"; this.isOpen = true; } }; this.hide = function() { if (this.isOpen) { this.getElement().style.display = "none"; this.isOpen = false; } }; this.getHeight = function() { return this.getElement().offsetHeight; }; this.getWidth = function() { return this.getElement().offsetWidth; }; }).call(Tooltip.prototype); exports.Tooltip = Tooltip; }); define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"], function(require, exports, module) { "use strict"; var dom = require("../lib/dom"); var oop = require("../lib/oop"); var event = require("../lib/event"); var Tooltip = require("../tooltip").Tooltip; function GutterHandler(mouseHandler) { var editor = mouseHandler.editor; var gutter = editor.renderer.$gutterLayer; var tooltip = new GutterTooltip(editor.container); mouseHandler.editor.setDefaultHandler("guttermousedown", function(e) { if (!editor.isFocused() || e.getButton() != 0) return; var gutterRegion = gutter.getRegion(e); if (gutterRegion == "foldWidgets") return; var row = e.getDocumentPosition().row; var selection = editor.session.selection; if (e.getShiftKey()) selection.selectTo(row, 0); else { if (e.domEvent.detail == 2) { editor.selectAll(); return e.preventDefault(); } mouseHandler.$clickSelection = editor.selection.getLineRange(row); } mouseHandler.setState("selectByLines"); mouseHandler.captureMouse(e); return e.preventDefault(); }); var tooltipTimeout, mouseEvent, tooltipAnnotation; function showTooltip() { var row = mouseEvent.getDocumentPosition().row; var annotation = gutter.$annotations[row]; if (!annotation) return hideTooltip(); var maxRow = editor.session.getLength(); if (row == maxRow) { var screenRow = editor.renderer.pixelToScreenCoordinates(0, mouseEvent.y).row; var pos = mouseEvent.$pos; if (screenRow > editor.session.documentToScreenRow(pos.row, pos.column)) return hideTooltip(); } if (tooltipAnnotation == annotation) return; tooltipAnnotation = annotation.text.join("
    "); tooltip.setHtml(tooltipAnnotation); tooltip.show(); editor.on("mousewheel", hideTooltip); if (mouseHandler.$tooltipFollowsMouse) { moveTooltip(mouseEvent); } else { var gutterElement = gutter.$cells[editor.session.documentToScreenRow(row, 0)].element; var rect = gutterElement.getBoundingClientRect(); var style = tooltip.getElement().style; style.left = rect.right + "px"; style.top = rect.bottom + "px"; } } function hideTooltip() { if (tooltipTimeout) tooltipTimeout = clearTimeout(tooltipTimeout); if (tooltipAnnotation) { tooltip.hide(); tooltipAnnotation = null; editor.removeEventListener("mousewheel", hideTooltip); } } function moveTooltip(e) { tooltip.setPosition(e.x, e.y); } mouseHandler.editor.setDefaultHandler("guttermousemove", function(e) { var target = e.domEvent.target || e.domEvent.srcElement; if (dom.hasCssClass(target, "ace_fold-widget")) return hideTooltip(); if (tooltipAnnotation && mouseHandler.$tooltipFollowsMouse) moveTooltip(e); mouseEvent = e; if (tooltipTimeout) return; tooltipTimeout = setTimeout(function() { tooltipTimeout = null; if (mouseEvent && !mouseHandler.isMousePressed) showTooltip(); else hideTooltip(); }, 50); }); event.addListener(editor.renderer.$gutter, "mouseout", function(e) { mouseEvent = null; if (!tooltipAnnotation || tooltipTimeout) return; tooltipTimeout = setTimeout(function() { tooltipTimeout = null; hideTooltip(); }, 50); }); editor.on("changeSession", hideTooltip); } function GutterTooltip(parentNode) { Tooltip.call(this, parentNode); } oop.inherits(GutterTooltip, Tooltip); (function(){ this.setPosition = function(x, y) { var windowWidth = window.innerWidth || document.documentElement.clientWidth; var windowHeight = window.innerHeight || document.documentElement.clientHeight; var width = this.getWidth(); var height = this.getHeight(); x += 15; y += 15; if (x + width > windowWidth) { x -= (x + width) - windowWidth; } if (y + height > windowHeight) { y -= 20 + height; } Tooltip.prototype.setPosition.call(this, x, y); }; }).call(GutterTooltip.prototype); exports.GutterHandler = GutterHandler; }); define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(require, exports, module) { "use strict"; var event = require("../lib/event"); var useragent = require("../lib/useragent"); var MouseEvent = exports.MouseEvent = function(domEvent, editor) { this.domEvent = domEvent; this.editor = editor; this.x = this.clientX = domEvent.clientX; this.y = this.clientY = domEvent.clientY; this.$pos = null; this.$inSelection = null; this.propagationStopped = false; this.defaultPrevented = false; }; (function() { this.stopPropagation = function() { event.stopPropagation(this.domEvent); this.propagationStopped = true; }; this.preventDefault = function() { event.preventDefault(this.domEvent); this.defaultPrevented = true; }; this.stop = function() { this.stopPropagation(); this.preventDefault(); }; this.getDocumentPosition = function() { if (this.$pos) return this.$pos; this.$pos = this.editor.renderer.screenToTextCoordinates(this.clientX, this.clientY); return this.$pos; }; this.inSelection = function() { if (this.$inSelection !== null) return this.$inSelection; var editor = this.editor; var selectionRange = editor.getSelectionRange(); if (selectionRange.isEmpty()) this.$inSelection = false; else { var pos = this.getDocumentPosition(); this.$inSelection = selectionRange.contains(pos.row, pos.column); } return this.$inSelection; }; this.getButton = function() { return event.getButton(this.domEvent); }; this.getShiftKey = function() { return this.domEvent.shiftKey; }; this.getAccelKey = useragent.isMac ? function() { return this.domEvent.metaKey; } : function() { return this.domEvent.ctrlKey; }; }).call(MouseEvent.prototype); }); define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"], function(require, exports, module) { "use strict"; var dom = require("../lib/dom"); var event = require("../lib/event"); var useragent = require("../lib/useragent"); var AUTOSCROLL_DELAY = 200; var SCROLL_CURSOR_DELAY = 200; var SCROLL_CURSOR_HYSTERESIS = 5; function DragdropHandler(mouseHandler) { var editor = mouseHandler.editor; var blankImage = dom.createElement("img"); blankImage.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; if (useragent.isOpera) blankImage.style.cssText = "width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"; var exports = ["dragWait", "dragWaitEnd", "startDrag", "dragReadyEnd", "onMouseDrag"]; exports.forEach(function(x) { mouseHandler[x] = this[x]; }, this); editor.addEventListener("mousedown", this.onMouseDown.bind(mouseHandler)); var mouseTarget = editor.container; var dragSelectionMarker, x, y; var timerId, range; var dragCursor, counter = 0; var dragOperation; var isInternal; var autoScrollStartTime; var cursorMovedTime; var cursorPointOnCaretMoved; this.onDragStart = function(e) { if (this.cancelDrag || !mouseTarget.draggable) { var self = this; setTimeout(function(){ self.startSelect(); self.captureMouse(e); }, 0); return e.preventDefault(); } range = editor.getSelectionRange(); var dataTransfer = e.dataTransfer; dataTransfer.effectAllowed = editor.getReadOnly() ? "copy" : "copyMove"; if (useragent.isOpera) { editor.container.appendChild(blankImage); blankImage.scrollTop = 0; } dataTransfer.setDragImage && dataTransfer.setDragImage(blankImage, 0, 0); if (useragent.isOpera) { editor.container.removeChild(blankImage); } dataTransfer.clearData(); dataTransfer.setData("Text", editor.session.getTextRange()); isInternal = true; this.setState("drag"); }; this.onDragEnd = function(e) { mouseTarget.draggable = false; isInternal = false; this.setState(null); if (!editor.getReadOnly()) { var dropEffect = e.dataTransfer.dropEffect; if (!dragOperation && dropEffect == "move") editor.session.remove(editor.getSelectionRange()); editor.renderer.$cursorLayer.setBlinking(true); } this.editor.unsetStyle("ace_dragging"); this.editor.renderer.setCursorStyle(""); }; this.onDragEnter = function(e) { if (editor.getReadOnly() || !canAccept(e.dataTransfer)) return; x = e.clientX; y = e.clientY; if (!dragSelectionMarker) addDragMarker(); counter++; e.dataTransfer.dropEffect = dragOperation = getDropEffect(e); return event.preventDefault(e); }; this.onDragOver = function(e) { if (editor.getReadOnly() || !canAccept(e.dataTransfer)) return; x = e.clientX; y = e.clientY; if (!dragSelectionMarker) { addDragMarker(); counter++; } if (onMouseMoveTimer !== null) onMouseMoveTimer = null; e.dataTransfer.dropEffect = dragOperation = getDropEffect(e); return event.preventDefault(e); }; this.onDragLeave = function(e) { counter--; if (counter <= 0 && dragSelectionMarker) { clearDragMarker(); dragOperation = null; return event.preventDefault(e); } }; this.onDrop = function(e) { if (!dragCursor) return; var dataTransfer = e.dataTransfer; if (isInternal) { switch (dragOperation) { case "move": if (range.contains(dragCursor.row, dragCursor.column)) { range = { start: dragCursor, end: dragCursor }; } else { range = editor.moveText(range, dragCursor); } break; case "copy": range = editor.moveText(range, dragCursor, true); break; } } else { var dropData = dataTransfer.getData('Text'); range = { start: dragCursor, end: editor.session.insert(dragCursor, dropData) }; editor.focus(); dragOperation = null; } clearDragMarker(); return event.preventDefault(e); }; event.addListener(mouseTarget, "dragstart", this.onDragStart.bind(mouseHandler)); event.addListener(mouseTarget, "dragend", this.onDragEnd.bind(mouseHandler)); event.addListener(mouseTarget, "dragenter", this.onDragEnter.bind(mouseHandler)); event.addListener(mouseTarget, "dragover", this.onDragOver.bind(mouseHandler)); event.addListener(mouseTarget, "dragleave", this.onDragLeave.bind(mouseHandler)); event.addListener(mouseTarget, "drop", this.onDrop.bind(mouseHandler)); function scrollCursorIntoView(cursor, prevCursor) { var now = Date.now(); var vMovement = !prevCursor || cursor.row != prevCursor.row; var hMovement = !prevCursor || cursor.column != prevCursor.column; if (!cursorMovedTime || vMovement || hMovement) { editor.$blockScrolling += 1; editor.moveCursorToPosition(cursor); editor.$blockScrolling -= 1; cursorMovedTime = now; cursorPointOnCaretMoved = {x: x, y: y}; } else { var distance = calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y); if (distance > SCROLL_CURSOR_HYSTERESIS) { cursorMovedTime = null; } else if (now - cursorMovedTime >= SCROLL_CURSOR_DELAY) { editor.renderer.scrollCursorIntoView(); cursorMovedTime = null; } } } function autoScroll(cursor, prevCursor) { var now = Date.now(); var lineHeight = editor.renderer.layerConfig.lineHeight; var characterWidth = editor.renderer.layerConfig.characterWidth; var editorRect = editor.renderer.scroller.getBoundingClientRect(); var offsets = { x: { left: x - editorRect.left, right: editorRect.right - x }, y: { top: y - editorRect.top, bottom: editorRect.bottom - y } }; var nearestXOffset = Math.min(offsets.x.left, offsets.x.right); var nearestYOffset = Math.min(offsets.y.top, offsets.y.bottom); var scrollCursor = {row: cursor.row, column: cursor.column}; if (nearestXOffset / characterWidth <= 2) { scrollCursor.column += (offsets.x.left < offsets.x.right ? -3 : +2); } if (nearestYOffset / lineHeight <= 1) { scrollCursor.row += (offsets.y.top < offsets.y.bottom ? -1 : +1); } var vScroll = cursor.row != scrollCursor.row; var hScroll = cursor.column != scrollCursor.column; var vMovement = !prevCursor || cursor.row != prevCursor.row; if (vScroll || (hScroll && !vMovement)) { if (!autoScrollStartTime) autoScrollStartTime = now; else if (now - autoScrollStartTime >= AUTOSCROLL_DELAY) editor.renderer.scrollCursorIntoView(scrollCursor); } else { autoScrollStartTime = null; } } function onDragInterval() { var prevCursor = dragCursor; dragCursor = editor.renderer.screenToTextCoordinates(x, y); scrollCursorIntoView(dragCursor, prevCursor); autoScroll(dragCursor, prevCursor); } function addDragMarker() { range = editor.selection.toOrientedRange(); dragSelectionMarker = editor.session.addMarker(range, "ace_selection", editor.getSelectionStyle()); editor.clearSelection(); if (editor.isFocused()) editor.renderer.$cursorLayer.setBlinking(false); clearInterval(timerId); onDragInterval(); timerId = setInterval(onDragInterval, 20); counter = 0; event.addListener(document, "mousemove", onMouseMove); } function clearDragMarker() { clearInterval(timerId); editor.session.removeMarker(dragSelectionMarker); dragSelectionMarker = null; editor.$blockScrolling += 1; editor.selection.fromOrientedRange(range); editor.$blockScrolling -= 1; if (editor.isFocused() && !isInternal) editor.renderer.$cursorLayer.setBlinking(!editor.getReadOnly()); range = null; dragCursor = null; counter = 0; autoScrollStartTime = null; cursorMovedTime = null; event.removeListener(document, "mousemove", onMouseMove); } var onMouseMoveTimer = null; function onMouseMove() { if (onMouseMoveTimer == null) { onMouseMoveTimer = setTimeout(function() { if (onMouseMoveTimer != null && dragSelectionMarker) clearDragMarker(); }, 20); } } function canAccept(dataTransfer) { var types = dataTransfer.types; return !types || Array.prototype.some.call(types, function(type) { return type == 'text/plain' || type == 'Text'; }); } function getDropEffect(e) { var copyAllowed = ['copy', 'copymove', 'all', 'uninitialized']; var moveAllowed = ['move', 'copymove', 'linkmove', 'all', 'uninitialized']; var copyModifierState = useragent.isMac ? e.altKey : e.ctrlKey; var effectAllowed = "uninitialized"; try { effectAllowed = e.dataTransfer.effectAllowed.toLowerCase(); } catch (e) {} var dropEffect = "none"; if (copyModifierState && copyAllowed.indexOf(effectAllowed) >= 0) dropEffect = "copy"; else if (moveAllowed.indexOf(effectAllowed) >= 0) dropEffect = "move"; else if (copyAllowed.indexOf(effectAllowed) >= 0) dropEffect = "copy"; return dropEffect; } } (function() { this.dragWait = function() { var interval = Date.now() - this.mousedownEvent.time; if (interval > this.editor.getDragDelay()) this.startDrag(); }; this.dragWaitEnd = function() { var target = this.editor.container; target.draggable = false; this.startSelect(this.mousedownEvent.getDocumentPosition()); this.selectEnd(); }; this.dragReadyEnd = function(e) { this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()); this.editor.unsetStyle("ace_dragging"); this.editor.renderer.setCursorStyle(""); this.dragWaitEnd(); }; this.startDrag = function(){ this.cancelDrag = false; var editor = this.editor; var target = editor.container; target.draggable = true; editor.renderer.$cursorLayer.setBlinking(false); editor.setStyle("ace_dragging"); var cursorStyle = useragent.isWin ? "default" : "move"; editor.renderer.setCursorStyle(cursorStyle); this.setState("dragReady"); }; this.onMouseDrag = function(e) { var target = this.editor.container; if (useragent.isIE && this.state == "dragReady") { var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); if (distance > 3) target.dragDrop(); } if (this.state === "dragWait") { var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); if (distance > 0) { target.draggable = false; this.startSelect(this.mousedownEvent.getDocumentPosition()); } } }; this.onMouseDown = function(e) { if (!this.$dragEnabled) return; this.mousedownEvent = e; var editor = this.editor; var inSelection = e.inSelection(); var button = e.getButton(); var clickCount = e.domEvent.detail || 1; if (clickCount === 1 && button === 0 && inSelection) { if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey())) return; this.mousedownEvent.time = Date.now(); var eventTarget = e.domEvent.target || e.domEvent.srcElement; if ("unselectable" in eventTarget) eventTarget.unselectable = "on"; if (editor.getDragDelay()) { if (useragent.isWebKit) { this.cancelDrag = true; var mouseTarget = editor.container; mouseTarget.draggable = true; } this.setState("dragWait"); } else { this.startDrag(); } this.captureMouse(e, this.onMouseDrag.bind(this)); e.defaultPrevented = true; } }; }).call(DragdropHandler.prototype); function calcDistance(ax, ay, bx, by) { return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2)); } exports.DragdropHandler = DragdropHandler; }); define("ace/lib/net",["require","exports","module","ace/lib/dom"], function(require, exports, module) { "use strict"; var dom = require("./dom"); exports.get = function (url, callback) { var xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.onreadystatechange = function () { if (xhr.readyState === 4) { callback(xhr.responseText); } }; xhr.send(null); }; exports.loadScript = function(path, callback) { var head = dom.getDocumentHead(); var s = document.createElement('script'); s.src = path; head.appendChild(s); s.onload = s.onreadystatechange = function(_, isAbort) { if (isAbort || !s.readyState || s.readyState == "loaded" || s.readyState == "complete") { s = s.onload = s.onreadystatechange = null; if (!isAbort) callback(); } }; }; exports.qualifyURL = function(url) { var a = document.createElement('a'); a.href = url; return a.href; } }); define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) { "use strict"; var EventEmitter = {}; var stopPropagation = function() { this.propagationStopped = true; }; var preventDefault = function() { this.defaultPrevented = true; }; EventEmitter._emit = EventEmitter._dispatchEvent = function(eventName, e) { this._eventRegistry || (this._eventRegistry = {}); this._defaultHandlers || (this._defaultHandlers = {}); var listeners = this._eventRegistry[eventName] || []; var defaultHandler = this._defaultHandlers[eventName]; if (!listeners.length && !defaultHandler) return; if (typeof e != "object" || !e) e = {}; if (!e.type) e.type = eventName; if (!e.stopPropagation) e.stopPropagation = stopPropagation; if (!e.preventDefault) e.preventDefault = preventDefault; listeners = listeners.slice(); for (var i=0; i 1) base = parts[parts.length - 2]; var path = options[component + "Path"]; if (path == null) { path = options.basePath; } else if (sep == "/") { component = sep = ""; } if (path && path.slice(-1) != "/") path += "/"; return path + component + sep + base + this.get("suffix"); }; exports.setModuleUrl = function(name, subst) { return options.$moduleUrls[name] = subst; }; exports.$loading = {}; exports.loadModule = function(moduleName, onLoad) { var module, moduleType; if (Array.isArray(moduleName)) { moduleType = moduleName[0]; moduleName = moduleName[1]; } try { module = require(moduleName); } catch (e) {} if (module && !exports.$loading[moduleName]) return onLoad && onLoad(module); if (!exports.$loading[moduleName]) exports.$loading[moduleName] = []; exports.$loading[moduleName].push(onLoad); if (exports.$loading[moduleName].length > 1) return; var afterLoad = function() { require([moduleName], function(module) { exports._emit("load.module", {name: moduleName, module: module}); var listeners = exports.$loading[moduleName]; exports.$loading[moduleName] = null; listeners.forEach(function(onLoad) { onLoad && onLoad(module); }); }); }; if (!exports.get("packaged")) return afterLoad(); net.loadScript(exports.moduleUrl(moduleName, moduleType), afterLoad); }; init(true);function init(packaged) { options.packaged = packaged || require.packaged || module.packaged || (global.define && define.packaged); if (!global.document) return ""; var scriptOptions = {}; var scriptUrl = ""; var currentScript = (document.currentScript || document._currentScript ); // native or polyfill var currentDocument = currentScript && currentScript.ownerDocument || document; var scripts = currentDocument.getElementsByTagName("script"); for (var i=0; i [" + this.end.row + "/" + this.end.column + "]"); }; this.contains = function(row, column) { return this.compare(row, column) == 0; }; this.compareRange = function(range) { var cmp, end = range.end, start = range.start; cmp = this.compare(end.row, end.column); if (cmp == 1) { cmp = this.compare(start.row, start.column); if (cmp == 1) { return 2; } else if (cmp == 0) { return 1; } else { return 0; } } else if (cmp == -1) { return -2; } else { cmp = this.compare(start.row, start.column); if (cmp == -1) { return -1; } else if (cmp == 1) { return 42; } else { return 0; } } }; this.comparePoint = function(p) { return this.compare(p.row, p.column); }; this.containsRange = function(range) { return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; }; this.intersects = function(range) { var cmp = this.compareRange(range); return (cmp == -1 || cmp == 0 || cmp == 1); }; this.isEnd = function(row, column) { return this.end.row == row && this.end.column == column; }; this.isStart = function(row, column) { return this.start.row == row && this.start.column == column; }; this.setStart = function(row, column) { if (typeof row == "object") { this.start.column = row.column; this.start.row = row.row; } else { this.start.row = row; this.start.column = column; } }; this.setEnd = function(row, column) { if (typeof row == "object") { this.end.column = row.column; this.end.row = row.row; } else { this.end.row = row; this.end.column = column; } }; this.inside = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column) || this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.insideStart = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column)) { return false; } else { return true; } } return false; }; this.insideEnd = function(row, column) { if (this.compare(row, column) == 0) { if (this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.compare = function(row, column) { if (!this.isMultiLine()) { if (row === this.start.row) { return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); }; } if (row < this.start.row) return -1; if (row > this.end.row) return 1; if (this.start.row === row) return column >= this.start.column ? 0 : -1; if (this.end.row === row) return column <= this.end.column ? 0 : 1; return 0; }; this.compareStart = function(row, column) { if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.compareEnd = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else { return this.compare(row, column); } }; this.compareInside = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.clipRows = function(firstRow, lastRow) { if (this.end.row > lastRow) var end = {row: lastRow + 1, column: 0}; else if (this.end.row < firstRow) var end = {row: firstRow, column: 0}; if (this.start.row > lastRow) var start = {row: lastRow + 1, column: 0}; else if (this.start.row < firstRow) var start = {row: firstRow, column: 0}; return Range.fromPoints(start || this.start, end || this.end); }; this.extend = function(row, column) { var cmp = this.compare(row, column); if (cmp == 0) return this; else if (cmp == -1) var start = {row: row, column: column}; else var end = {row: row, column: column}; return Range.fromPoints(start || this.start, end || this.end); }; this.isEmpty = function() { return (this.start.row === this.end.row && this.start.column === this.end.column); }; this.isMultiLine = function() { return (this.start.row !== this.end.row); }; this.clone = function() { return Range.fromPoints(this.start, this.end); }; this.collapseRows = function() { if (this.end.column == 0) return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0) else return new Range(this.start.row, 0, this.end.row, 0) }; this.toScreenRange = function(session) { var screenPosStart = session.documentToScreenPosition(this.start); var screenPosEnd = session.documentToScreenPosition(this.end); return new Range( screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column ); }; this.moveBy = function(row, column) { this.start.row += row; this.start.column += column; this.end.row += row; this.end.column += column; }; }).call(Range.prototype); Range.fromPoints = function(start, end) { return new Range(start.row, start.column, end.row, end.column); }; Range.comparePoints = comparePoints; Range.comparePoints = function(p1, p2) { return p1.row - p2.row || p1.column - p2.column; }; exports.Range = Range; }); define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var lang = require("./lib/lang"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Range = require("./range").Range; var Selection = function(session) { this.session = session; this.doc = session.getDocument(); this.clearSelection(); this.lead = this.selectionLead = this.doc.createAnchor(0, 0); this.anchor = this.selectionAnchor = this.doc.createAnchor(0, 0); var self = this; this.lead.on("change", function(e) { self._emit("changeCursor"); if (!self.$isEmpty) self._emit("changeSelection"); if (!self.$keepDesiredColumnOnChange && e.old.column != e.value.column) self.$desiredColumn = null; }); this.selectionAnchor.on("change", function() { if (!self.$isEmpty) self._emit("changeSelection"); }); }; (function() { oop.implement(this, EventEmitter); this.isEmpty = function() { return (this.$isEmpty || ( this.anchor.row == this.lead.row && this.anchor.column == this.lead.column )); }; this.isMultiLine = function() { if (this.isEmpty()) { return false; } return this.getRange().isMultiLine(); }; this.getCursor = function() { return this.lead.getPosition(); }; this.setSelectionAnchor = function(row, column) { this.anchor.setPosition(row, column); if (this.$isEmpty) { this.$isEmpty = false; this._emit("changeSelection"); } }; this.getSelectionAnchor = function() { if (this.$isEmpty) return this.getSelectionLead(); else return this.anchor.getPosition(); }; this.getSelectionLead = function() { return this.lead.getPosition(); }; this.shiftSelection = function(columns) { if (this.$isEmpty) { this.moveCursorTo(this.lead.row, this.lead.column + columns); return; } var anchor = this.getSelectionAnchor(); var lead = this.getSelectionLead(); var isBackwards = this.isBackwards(); if (!isBackwards || anchor.column !== 0) this.setSelectionAnchor(anchor.row, anchor.column + columns); if (isBackwards || lead.column !== 0) { this.$moveSelection(function() { this.moveCursorTo(lead.row, lead.column + columns); }); } }; this.isBackwards = function() { var anchor = this.anchor; var lead = this.lead; return (anchor.row > lead.row || (anchor.row == lead.row && anchor.column > lead.column)); }; this.getRange = function() { var anchor = this.anchor; var lead = this.lead; if (this.isEmpty()) return Range.fromPoints(lead, lead); if (this.isBackwards()) { return Range.fromPoints(lead, anchor); } else { return Range.fromPoints(anchor, lead); } }; this.clearSelection = function() { if (!this.$isEmpty) { this.$isEmpty = true; this._emit("changeSelection"); } }; this.selectAll = function() { var lastRow = this.doc.getLength() - 1; this.setSelectionAnchor(0, 0); this.moveCursorTo(lastRow, this.doc.getLine(lastRow).length); }; this.setRange = this.setSelectionRange = function(range, reverse) { if (reverse) { this.setSelectionAnchor(range.end.row, range.end.column); this.selectTo(range.start.row, range.start.column); } else { this.setSelectionAnchor(range.start.row, range.start.column); this.selectTo(range.end.row, range.end.column); } if (this.getRange().isEmpty()) this.$isEmpty = true; this.$desiredColumn = null; }; this.$moveSelection = function(mover) { var lead = this.lead; if (this.$isEmpty) this.setSelectionAnchor(lead.row, lead.column); mover.call(this); }; this.selectTo = function(row, column) { this.$moveSelection(function() { this.moveCursorTo(row, column); }); }; this.selectToPosition = function(pos) { this.$moveSelection(function() { this.moveCursorToPosition(pos); }); }; this.moveTo = function(row, column) { this.clearSelection(); this.moveCursorTo(row, column); }; this.moveToPosition = function(pos) { this.clearSelection(); this.moveCursorToPosition(pos); }; this.selectUp = function() { this.$moveSelection(this.moveCursorUp); }; this.selectDown = function() { this.$moveSelection(this.moveCursorDown); }; this.selectRight = function() { this.$moveSelection(this.moveCursorRight); }; this.selectLeft = function() { this.$moveSelection(this.moveCursorLeft); }; this.selectLineStart = function() { this.$moveSelection(this.moveCursorLineStart); }; this.selectLineEnd = function() { this.$moveSelection(this.moveCursorLineEnd); }; this.selectFileEnd = function() { this.$moveSelection(this.moveCursorFileEnd); }; this.selectFileStart = function() { this.$moveSelection(this.moveCursorFileStart); }; this.selectWordRight = function() { this.$moveSelection(this.moveCursorWordRight); }; this.selectWordLeft = function() { this.$moveSelection(this.moveCursorWordLeft); }; this.getWordRange = function(row, column) { if (typeof column == "undefined") { var cursor = row || this.lead; row = cursor.row; column = cursor.column; } return this.session.getWordRange(row, column); }; this.selectWord = function() { this.setSelectionRange(this.getWordRange()); }; this.selectAWord = function() { var cursor = this.getCursor(); var range = this.session.getAWordRange(cursor.row, cursor.column); this.setSelectionRange(range); }; this.getLineRange = function(row, excludeLastChar) { var rowStart = typeof row == "number" ? row : this.lead.row; var rowEnd; var foldLine = this.session.getFoldLine(rowStart); if (foldLine) { rowStart = foldLine.start.row; rowEnd = foldLine.end.row; } else { rowEnd = rowStart; } if (excludeLastChar === true) return new Range(rowStart, 0, rowEnd, this.session.getLine(rowEnd).length); else return new Range(rowStart, 0, rowEnd + 1, 0); }; this.selectLine = function() { this.setSelectionRange(this.getLineRange()); }; this.moveCursorUp = function() { this.moveCursorBy(-1, 0); }; this.moveCursorDown = function() { this.moveCursorBy(1, 0); }; this.moveCursorLeft = function() { var cursor = this.lead.getPosition(), fold; if (fold = this.session.getFoldAt(cursor.row, cursor.column, -1)) { this.moveCursorTo(fold.start.row, fold.start.column); } else if (cursor.column === 0) { if (cursor.row > 0) { this.moveCursorTo(cursor.row - 1, this.doc.getLine(cursor.row - 1).length); } } else { var tabSize = this.session.getTabSize(); if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column-tabSize, cursor.column).split(" ").length-1 == tabSize) this.moveCursorBy(0, -tabSize); else this.moveCursorBy(0, -1); } }; this.moveCursorRight = function() { var cursor = this.lead.getPosition(), fold; if (fold = this.session.getFoldAt(cursor.row, cursor.column, 1)) { this.moveCursorTo(fold.end.row, fold.end.column); } else if (this.lead.column == this.doc.getLine(this.lead.row).length) { if (this.lead.row < this.doc.getLength() - 1) { this.moveCursorTo(this.lead.row + 1, 0); } } else { var tabSize = this.session.getTabSize(); var cursor = this.lead; if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column, cursor.column+tabSize).split(" ").length-1 == tabSize) this.moveCursorBy(0, tabSize); else this.moveCursorBy(0, 1); } }; this.moveCursorLineStart = function() { var row = this.lead.row; var column = this.lead.column; var screenRow = this.session.documentToScreenRow(row, column); var firstColumnPosition = this.session.screenToDocumentPosition(screenRow, 0); var beforeCursor = this.session.getDisplayLine( row, null, firstColumnPosition.row, firstColumnPosition.column ); var leadingSpace = beforeCursor.match(/^\s*/); if (leadingSpace[0].length != column && !this.session.$useEmacsStyleLineStart) firstColumnPosition.column += leadingSpace[0].length; this.moveCursorToPosition(firstColumnPosition); }; this.moveCursorLineEnd = function() { var lead = this.lead; var lineEnd = this.session.getDocumentLastRowColumnPosition(lead.row, lead.column); if (this.lead.column == lineEnd.column) { var line = this.session.getLine(lineEnd.row); if (lineEnd.column == line.length) { var textEnd = line.search(/\s+$/); if (textEnd > 0) lineEnd.column = textEnd; } } this.moveCursorTo(lineEnd.row, lineEnd.column); }; this.moveCursorFileEnd = function() { var row = this.doc.getLength() - 1; var column = this.doc.getLine(row).length; this.moveCursorTo(row, column); }; this.moveCursorFileStart = function() { this.moveCursorTo(0, 0); }; this.moveCursorLongWordRight = function() { var row = this.lead.row; var column = this.lead.column; var line = this.doc.getLine(row); var rightOfCursor = line.substring(column); var match; this.session.nonTokenRe.lastIndex = 0; this.session.tokenRe.lastIndex = 0; var fold = this.session.getFoldAt(row, column, 1); if (fold) { this.moveCursorTo(fold.end.row, fold.end.column); return; } if (match = this.session.nonTokenRe.exec(rightOfCursor)) { column += this.session.nonTokenRe.lastIndex; this.session.nonTokenRe.lastIndex = 0; rightOfCursor = line.substring(column); } if (column >= line.length) { this.moveCursorTo(row, line.length); this.moveCursorRight(); if (row < this.doc.getLength() - 1) this.moveCursorWordRight(); return; } if (match = this.session.tokenRe.exec(rightOfCursor)) { column += this.session.tokenRe.lastIndex; this.session.tokenRe.lastIndex = 0; } this.moveCursorTo(row, column); }; this.moveCursorLongWordLeft = function() { var row = this.lead.row; var column = this.lead.column; var fold; if (fold = this.session.getFoldAt(row, column, -1)) { this.moveCursorTo(fold.start.row, fold.start.column); return; } var str = this.session.getFoldStringAt(row, column, -1); if (str == null) { str = this.doc.getLine(row).substring(0, column); } var leftOfCursor = lang.stringReverse(str); var match; this.session.nonTokenRe.lastIndex = 0; this.session.tokenRe.lastIndex = 0; if (match = this.session.nonTokenRe.exec(leftOfCursor)) { column -= this.session.nonTokenRe.lastIndex; leftOfCursor = leftOfCursor.slice(this.session.nonTokenRe.lastIndex); this.session.nonTokenRe.lastIndex = 0; } if (column <= 0) { this.moveCursorTo(row, 0); this.moveCursorLeft(); if (row > 0) this.moveCursorWordLeft(); return; } if (match = this.session.tokenRe.exec(leftOfCursor)) { column -= this.session.tokenRe.lastIndex; this.session.tokenRe.lastIndex = 0; } this.moveCursorTo(row, column); }; this.$shortWordEndIndex = function(rightOfCursor) { var match, index = 0, ch; var whitespaceRe = /\s/; var tokenRe = this.session.tokenRe; tokenRe.lastIndex = 0; if (match = this.session.tokenRe.exec(rightOfCursor)) { index = this.session.tokenRe.lastIndex; } else { while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch)) index ++; if (index < 1) { tokenRe.lastIndex = 0; while ((ch = rightOfCursor[index]) && !tokenRe.test(ch)) { tokenRe.lastIndex = 0; index ++; if (whitespaceRe.test(ch)) { if (index > 2) { index--; break; } else { while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch)) index ++; if (index > 2) break; } } } } } tokenRe.lastIndex = 0; return index; }; this.moveCursorShortWordRight = function() { var row = this.lead.row; var column = this.lead.column; var line = this.doc.getLine(row); var rightOfCursor = line.substring(column); var fold = this.session.getFoldAt(row, column, 1); if (fold) return this.moveCursorTo(fold.end.row, fold.end.column); if (column == line.length) { var l = this.doc.getLength(); do { row++; rightOfCursor = this.doc.getLine(row); } while (row < l && /^\s*$/.test(rightOfCursor)); if (!/^\s+/.test(rightOfCursor)) rightOfCursor = ""; column = 0; } var index = this.$shortWordEndIndex(rightOfCursor); this.moveCursorTo(row, column + index); }; this.moveCursorShortWordLeft = function() { var row = this.lead.row; var column = this.lead.column; var fold; if (fold = this.session.getFoldAt(row, column, -1)) return this.moveCursorTo(fold.start.row, fold.start.column); var line = this.session.getLine(row).substring(0, column); if (column === 0) { do { row--; line = this.doc.getLine(row); } while (row > 0 && /^\s*$/.test(line)); column = line.length; if (!/\s+$/.test(line)) line = ""; } var leftOfCursor = lang.stringReverse(line); var index = this.$shortWordEndIndex(leftOfCursor); return this.moveCursorTo(row, column - index); }; this.moveCursorWordRight = function() { if (this.session.$selectLongWords) this.moveCursorLongWordRight(); else this.moveCursorShortWordRight(); }; this.moveCursorWordLeft = function() { if (this.session.$selectLongWords) this.moveCursorLongWordLeft(); else this.moveCursorShortWordLeft(); }; this.moveCursorBy = function(rows, chars) { var screenPos = this.session.documentToScreenPosition( this.lead.row, this.lead.column ); if (chars === 0) { if (this.$desiredColumn) screenPos.column = this.$desiredColumn; else this.$desiredColumn = screenPos.column; } var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column); if (rows !== 0 && chars === 0 && docPos.row === this.lead.row && docPos.column === this.lead.column) { if (this.session.lineWidgets && this.session.lineWidgets[docPos.row]) docPos.row++; } this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0); }; this.moveCursorToPosition = function(position) { this.moveCursorTo(position.row, position.column); }; this.moveCursorTo = function(row, column, keepDesiredColumn) { var fold = this.session.getFoldAt(row, column, 1); if (fold) { row = fold.start.row; column = fold.start.column; } this.$keepDesiredColumnOnChange = true; this.lead.setPosition(row, column); this.$keepDesiredColumnOnChange = false; if (!keepDesiredColumn) this.$desiredColumn = null; }; this.moveCursorToScreen = function(row, column, keepDesiredColumn) { var pos = this.session.screenToDocumentPosition(row, column); this.moveCursorTo(pos.row, pos.column, keepDesiredColumn); }; this.detach = function() { this.lead.detach(); this.anchor.detach(); this.session = this.doc = null; }; this.fromOrientedRange = function(range) { this.setSelectionRange(range, range.cursor == range.start); this.$desiredColumn = range.desiredColumn || this.$desiredColumn; }; this.toOrientedRange = function(range) { var r = this.getRange(); if (range) { range.start.column = r.start.column; range.start.row = r.start.row; range.end.column = r.end.column; range.end.row = r.end.row; } else { range = r; } range.cursor = this.isBackwards() ? range.start : range.end; range.desiredColumn = this.$desiredColumn; return range; }; this.getRangeOfMovements = function(func) { var start = this.getCursor(); try { func.call(null, this); var end = this.getCursor(); return Range.fromPoints(start,end); } catch(e) { return Range.fromPoints(start,start); } finally { this.moveCursorToPosition(start); } }; this.toJSON = function() { if (this.rangeCount) { var data = this.ranges.map(function(r) { var r1 = r.clone(); r1.isBackwards = r.cursor == r.start; return r1; }); } else { var data = this.getRange(); data.isBackwards = this.isBackwards(); } return data; }; this.fromJSON = function(data) { if (data.start == undefined) { if (this.rangeList) { this.toSingleRange(data[0]); for (var i = data.length; i--; ) { var r = Range.fromPoints(data[i].start, data[i].end); if (data.isBackwards) r.cursor = r.start; this.addRange(r, true); } return; } else data = data[0]; } if (this.rangeList) this.toSingleRange(data); this.setSelectionRange(data, data.isBackwards); }; this.isEqual = function(data) { if ((data.length || this.rangeCount) && data.length != this.rangeCount) return false; if (!data.length || !this.ranges) return this.getRange().isEqual(data); for (var i = this.ranges.length; i--; ) { if (!this.ranges[i].isEqual(data[i])) return false; } return true; }; }).call(Selection.prototype); exports.Selection = Selection; }); define("ace/tokenizer",["require","exports","module","ace/config"], function(require, exports, module) { "use strict"; var config = require("./config"); var MAX_TOKEN_COUNT = 2000; var Tokenizer = function(rules) { this.states = rules; this.regExps = {}; this.matchMappings = {}; for (var key in this.states) { var state = this.states[key]; var ruleRegExps = []; var matchTotal = 0; var mapping = this.matchMappings[key] = {defaultToken: "text"}; var flag = "g"; var splitterRurles = []; for (var i = 0; i < state.length; i++) { var rule = state[i]; if (rule.defaultToken) mapping.defaultToken = rule.defaultToken; if (rule.caseInsensitive) flag = "gi"; if (rule.regex == null) continue; if (rule.regex instanceof RegExp) rule.regex = rule.regex.toString().slice(1, -1); var adjustedregex = rule.regex; var matchcount = new RegExp("(?:(" + adjustedregex + ")|(.))").exec("a").length - 2; if (Array.isArray(rule.token)) { if (rule.token.length == 1 || matchcount == 1) { rule.token = rule.token[0]; } else if (matchcount - 1 != rule.token.length) { this.reportError("number of classes and regexp groups doesn't match", { rule: rule, groupCount: matchcount - 1 }); rule.token = rule.token[0]; } else { rule.tokenArray = rule.token; rule.token = null; rule.onMatch = this.$arrayTokens; } } else if (typeof rule.token == "function" && !rule.onMatch) { if (matchcount > 1) rule.onMatch = this.$applyToken; else rule.onMatch = rule.token; } if (matchcount > 1) { if (/\\\d/.test(rule.regex)) { adjustedregex = rule.regex.replace(/\\([0-9]+)/g, function(match, digit) { return "\\" + (parseInt(digit, 10) + matchTotal + 1); }); } else { matchcount = 1; adjustedregex = this.removeCapturingGroups(rule.regex); } if (!rule.splitRegex && typeof rule.token != "string") splitterRurles.push(rule); // flag will be known only at the very end } mapping[matchTotal] = i; matchTotal += matchcount; ruleRegExps.push(adjustedregex); if (!rule.onMatch) rule.onMatch = null; } if (!ruleRegExps.length) { mapping[0] = 0; ruleRegExps.push("$"); } splitterRurles.forEach(function(rule) { rule.splitRegex = this.createSplitterRegexp(rule.regex, flag); }, this); this.regExps[key] = new RegExp("(" + ruleRegExps.join(")|(") + ")|($)", flag); } }; (function() { this.$setMaxTokenCount = function(m) { MAX_TOKEN_COUNT = m | 0; }; this.$applyToken = function(str) { var values = this.splitRegex.exec(str).slice(1); var types = this.token.apply(this, values); if (typeof types === "string") return [{type: types, value: str}]; var tokens = []; for (var i = 0, l = types.length; i < l; i++) { if (values[i]) tokens[tokens.length] = { type: types[i], value: values[i] }; } return tokens; }, this.$arrayTokens = function(str) { if (!str) return []; var values = this.splitRegex.exec(str); if (!values) return "text"; var tokens = []; var types = this.tokenArray; for (var i = 0, l = types.length; i < l; i++) { if (values[i + 1]) tokens[tokens.length] = { type: types[i], value: values[i + 1] }; } return tokens; }; this.removeCapturingGroups = function(src) { var r = src.replace( /\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g, function(x, y) {return y ? "(?:" : x;} ); return r; }; this.createSplitterRegexp = function(src, flag) { if (src.indexOf("(?=") != -1) { var stack = 0; var inChClass = false; var lastCapture = {}; src.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g, function( m, esc, parenOpen, parenClose, square, index ) { if (inChClass) { inChClass = square != "]"; } else if (square) { inChClass = true; } else if (parenClose) { if (stack == lastCapture.stack) { lastCapture.end = index+1; lastCapture.stack = -1; } stack--; } else if (parenOpen) { stack++; if (parenOpen.length != 1) { lastCapture.stack = stack lastCapture.start = index; } } return m; }); if (lastCapture.end != null && /^\)*$/.test(src.substr(lastCapture.end))) src = src.substring(0, lastCapture.start) + src.substr(lastCapture.end); } return new RegExp(src, (flag||"").replace("g", "")); }; this.getLineTokens = function(line, startState) { if (startState && typeof startState != "string") { var stack = startState.slice(0); startState = stack[0]; if (startState === "#tmp") { stack.shift() startState = stack.shift() } } else var stack = []; var currentState = startState || "start"; var state = this.states[currentState]; if (!state) { currentState = "start"; state = this.states[currentState]; } var mapping = this.matchMappings[currentState]; var re = this.regExps[currentState]; re.lastIndex = 0; var match, tokens = []; var lastIndex = 0; var matchAttempts = 0; var token = {type: null, value: ""}; while (match = re.exec(line)) { var type = mapping.defaultToken; var rule = null; var value = match[0]; var index = re.lastIndex; if (index - value.length > lastIndex) { var skipped = line.substring(lastIndex, index - value.length); if (token.type == type) { token.value += skipped; } else { if (token.type) tokens.push(token); token = {type: type, value: skipped}; } } for (var i = 0; i < match.length-2; i++) { if (match[i + 1] === undefined) continue; rule = state[mapping[i]]; if (rule.onMatch) type = rule.onMatch(value, currentState, stack); else type = rule.token; if (rule.next) { if (typeof rule.next == "string") { currentState = rule.next; } else { currentState = rule.next(currentState, stack); } state = this.states[currentState]; if (!state) { this.reportError("state doesn't exist", currentState); currentState = "start"; state = this.states[currentState]; } mapping = this.matchMappings[currentState]; lastIndex = index; re = this.regExps[currentState]; re.lastIndex = index; } break; } if (value) { if (typeof type === "string") { if ((!rule || rule.merge !== false) && token.type === type) { token.value += value; } else { if (token.type) tokens.push(token); token = {type: type, value: value}; } } else if (type) { if (token.type) tokens.push(token); token = {type: null, value: ""}; for (var i = 0; i < type.length; i++) tokens.push(type[i]); } } if (lastIndex == line.length) break; lastIndex = index; if (matchAttempts++ > MAX_TOKEN_COUNT) { if (matchAttempts > 2 * line.length) { this.reportError("infinite loop with in ace tokenizer", { startState: startState, line: line }); } while (lastIndex < line.length) { if (token.type) tokens.push(token); token = { value: line.substring(lastIndex, lastIndex += 2000), type: "overflow" }; } currentState = "start"; stack = []; break; } } if (token.type) tokens.push(token); if (stack.length > 1) { if (stack[0] !== currentState) stack.unshift("#tmp", currentState); } return { tokens : tokens, state : stack.length ? stack : currentState }; }; this.reportError = config.reportError; }).call(Tokenizer.prototype); exports.Tokenizer = Tokenizer; }); define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"], function(require, exports, module) { "use strict"; var lang = require("../lib/lang"); var TextHighlightRules = function() { this.$rules = { "start" : [{ token : "empty_line", regex : '^$' }, { defaultToken : "text" }] }; }; (function() { this.addRules = function(rules, prefix) { if (!prefix) { for (var key in rules) this.$rules[key] = rules[key]; return; } for (var key in rules) { var state = rules[key]; for (var i = 0; i < state.length; i++) { var rule = state[i]; if (rule.next || rule.onMatch) { if (typeof rule.next != "string") { if (rule.nextState && rule.nextState.indexOf(prefix) !== 0) rule.nextState = prefix + rule.nextState; } else { if (rule.next.indexOf(prefix) !== 0) rule.next = prefix + rule.next; } } } this.$rules[prefix + key] = state; } }; this.getRules = function() { return this.$rules; }; this.embedRules = function (HighlightRules, prefix, escapeRules, states, append) { var embedRules = typeof HighlightRules == "function" ? new HighlightRules().getRules() : HighlightRules; if (states) { for (var i = 0; i < states.length; i++) states[i] = prefix + states[i]; } else { states = []; for (var key in embedRules) states.push(prefix + key); } this.addRules(embedRules, prefix); if (escapeRules) { var addRules = Array.prototype[append ? "push" : "unshift"]; for (var i = 0; i < states.length; i++) addRules.apply(this.$rules[states[i]], lang.deepCopy(escapeRules)); } if (!this.$embeds) this.$embeds = []; this.$embeds.push(prefix); }; this.getEmbeds = function() { return this.$embeds; }; var pushState = function(currentState, stack) { if (currentState != "start" || stack.length) stack.unshift(this.nextState, currentState); return this.nextState; }; var popState = function(currentState, stack) { stack.shift(); return stack.shift() || "start"; }; this.normalizeRules = function() { var id = 0; var rules = this.$rules; function processState(key) { var state = rules[key]; state.processed = true; for (var i = 0; i < state.length; i++) { var rule = state[i]; if (!rule.regex && rule.start) { rule.regex = rule.start; if (!rule.next) rule.next = []; rule.next.push({ defaultToken: rule.token }, { token: rule.token + ".end", regex: rule.end || rule.start, next: "pop" }); rule.token = rule.token + ".start"; rule.push = true; } var next = rule.next || rule.push; if (next && Array.isArray(next)) { var stateName = rule.stateName; if (!stateName) { stateName = rule.token; if (typeof stateName != "string") stateName = stateName[0] || ""; if (rules[stateName]) stateName += id++; } rules[stateName] = next; rule.next = stateName; processState(stateName); } else if (next == "pop") { rule.next = popState; } if (rule.push) { rule.nextState = rule.next || rule.push; rule.next = pushState; delete rule.push; } if (rule.rules) { for (var r in rule.rules) { if (rules[r]) { if (rules[r].push) rules[r].push.apply(rules[r], rule.rules[r]); } else { rules[r] = rule.rules[r]; } } } if (rule.include || typeof rule == "string") { var includeName = rule.include || rule; var toInsert = rules[includeName]; } else if (Array.isArray(rule)) toInsert = rule; if (toInsert) { var args = [i, 1].concat(toInsert); if (rule.noEscape) args = args.filter(function(x) {return !x.next;}); state.splice.apply(state, args); i--; toInsert = null; } if (rule.keywordMap) { rule.token = this.createKeywordMapper( rule.keywordMap, rule.defaultToken || "text", rule.caseInsensitive ); delete rule.defaultToken; } } } Object.keys(rules).forEach(processState, this); }; this.createKeywordMapper = function(map, defaultToken, ignoreCase, splitChar) { var keywords = Object.create(null); Object.keys(map).forEach(function(className) { var a = map[className]; if (ignoreCase) a = a.toLowerCase(); var list = a.split(splitChar || "|"); for (var i = list.length; i--; ) keywords[list[i]] = className; }); if (Object.getPrototypeOf(keywords)) { keywords.__proto__ = null; } this.$keywordList = Object.keys(keywords); map = null; return ignoreCase ? function(value) {return keywords[value.toLowerCase()] || defaultToken } : function(value) {return keywords[value] || defaultToken }; }; this.getKeywords = function() { return this.$keywords; }; }).call(TextHighlightRules.prototype); exports.TextHighlightRules = TextHighlightRules; }); define("ace/mode/behaviour",["require","exports","module"], function(require, exports, module) { "use strict"; var Behaviour = function() { this.$behaviours = {}; }; (function () { this.add = function (name, action, callback) { switch (undefined) { case this.$behaviours: this.$behaviours = {}; case this.$behaviours[name]: this.$behaviours[name] = {}; } this.$behaviours[name][action] = callback; } this.addBehaviours = function (behaviours) { for (var key in behaviours) { for (var action in behaviours[key]) { this.add(key, action, behaviours[key][action]); } } } this.remove = function (name) { if (this.$behaviours && this.$behaviours[name]) { delete this.$behaviours[name]; } } this.inherit = function (mode, filter) { if (typeof mode === "function") { var behaviours = new mode().getBehaviours(filter); } else { var behaviours = mode.getBehaviours(filter); } this.addBehaviours(behaviours); } this.getBehaviours = function (filter) { if (!filter) { return this.$behaviours; } else { var ret = {} for (var i = 0; i < filter.length; i++) { if (this.$behaviours[filter[i]]) { ret[filter[i]] = this.$behaviours[filter[i]]; } } return ret; } } }).call(Behaviour.prototype); exports.Behaviour = Behaviour; }); define("ace/unicode",["require","exports","module"], function(require, exports, module) { "use strict"; exports.packages = {}; addUnicodePackage({ L: "0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC", Ll: "0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A", Lu: "0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A", Lt: "01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC", Lm: "02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F", Lo: "01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC", M: "0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26", Mn: "0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26", Mc: "0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC", Me: "0488048906DE20DD-20E020E2-20E4A670-A672", N: "0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19", Nd: "0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19", Nl: "16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF", No: "00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835", P: "0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65", Pd: "002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D", Ps: "0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62", Pe: "0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63", Pi: "00AB2018201B201C201F20392E022E042E092E0C2E1C2E20", Pf: "00BB2019201D203A2E032E052E0A2E0D2E1D2E21", Pc: "005F203F20402054FE33FE34FE4D-FE4FFF3F", Po: "0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65", S: "0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD", Sm: "002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC", Sc: "002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6", Sk: "005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3", So: "00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD", Z: "002000A01680180E2000-200A20282029202F205F3000", Zs: "002000A01680180E2000-200A202F205F3000", Zl: "2028", Zp: "2029", C: "0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF", Cc: "0000-001F007F-009F", Cf: "00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB", Co: "E000-F8FF", Cs: "D800-DFFF", Cn: "03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF" }); function addUnicodePackage (pack) { var codePoint = /\w{4}/g; for (var name in pack) exports.packages[name] = pack[name].replace(codePoint, "\\u$&"); }; }); define("ace/token_iterator",["require","exports","module"], function(require, exports, module) { "use strict"; var TokenIterator = function(session, initialRow, initialColumn) { this.$session = session; this.$row = initialRow; this.$rowTokens = session.getTokens(initialRow); var token = session.getTokenAt(initialRow, initialColumn); this.$tokenIndex = token ? token.index : -1; }; (function() { this.stepBackward = function() { this.$tokenIndex -= 1; while (this.$tokenIndex < 0) { this.$row -= 1; if (this.$row < 0) { this.$row = 0; return null; } this.$rowTokens = this.$session.getTokens(this.$row); this.$tokenIndex = this.$rowTokens.length - 1; } return this.$rowTokens[this.$tokenIndex]; }; this.stepForward = function() { this.$tokenIndex += 1; var rowCount; while (this.$tokenIndex >= this.$rowTokens.length) { this.$row += 1; if (!rowCount) rowCount = this.$session.getLength(); if (this.$row >= rowCount) { this.$row = rowCount - 1; return null; } this.$rowTokens = this.$session.getTokens(this.$row); this.$tokenIndex = 0; } return this.$rowTokens[this.$tokenIndex]; }; this.getCurrentToken = function () { return this.$rowTokens[this.$tokenIndex]; }; this.getCurrentTokenRow = function () { return this.$row; }; this.getCurrentTokenColumn = function() { var rowTokens = this.$rowTokens; var tokenIndex = this.$tokenIndex; var column = rowTokens[tokenIndex].start; if (column !== undefined) return column; column = 0; while (tokenIndex > 0) { tokenIndex -= 1; column += rowTokens[tokenIndex].value.length; } return column; }; }).call(TokenIterator.prototype); exports.TokenIterator = TokenIterator; }); define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"], function(require, exports, module) { "use strict"; var Tokenizer = require("../tokenizer").Tokenizer; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var Behaviour = require("./behaviour").Behaviour; var unicode = require("../unicode"); var lang = require("../lib/lang"); var TokenIterator = require("../token_iterator").TokenIterator; var Range = require("../range").Range; var Mode = function() { this.HighlightRules = TextHighlightRules; this.$behaviour = new Behaviour(); }; (function() { this.tokenRe = new RegExp("^[" + unicode.packages.L + unicode.packages.Mn + unicode.packages.Mc + unicode.packages.Nd + unicode.packages.Pc + "\\$_]+", "g" ); this.nonTokenRe = new RegExp("^(?:[^" + unicode.packages.L + unicode.packages.Mn + unicode.packages.Mc + unicode.packages.Nd + unicode.packages.Pc + "\\$_]|\\s])+", "g" ); this.getTokenizer = function() { if (!this.$tokenizer) { this.$highlightRules = this.$highlightRules || new this.HighlightRules(); this.$tokenizer = new Tokenizer(this.$highlightRules.getRules()); } return this.$tokenizer; }; this.lineCommentStart = ""; this.blockComment = ""; this.toggleCommentLines = function(state, session, startRow, endRow) { var doc = session.doc; var ignoreBlankLines = true; var shouldRemove = true; var minIndent = Infinity; var tabSize = session.getTabSize(); var insertAtTabStop = false; if (!this.lineCommentStart) { if (!this.blockComment) return false; var lineCommentStart = this.blockComment.start; var lineCommentEnd = this.blockComment.end; var regexpStart = new RegExp("^(\\s*)(?:" + lang.escapeRegExp(lineCommentStart) + ")"); var regexpEnd = new RegExp("(?:" + lang.escapeRegExp(lineCommentEnd) + ")\\s*$"); var comment = function(line, i) { if (testRemove(line, i)) return; if (!ignoreBlankLines || /\S/.test(line)) { doc.insertInLine({row: i, column: line.length}, lineCommentEnd); doc.insertInLine({row: i, column: minIndent}, lineCommentStart); } }; var uncomment = function(line, i) { var m; if (m = line.match(regexpEnd)) doc.removeInLine(i, line.length - m[0].length, line.length); if (m = line.match(regexpStart)) doc.removeInLine(i, m[1].length, m[0].length); }; var testRemove = function(line, row) { if (regexpStart.test(line)) return true; var tokens = session.getTokens(row); for (var i = 0; i < tokens.length; i++) { if (tokens[i].type === 'comment') return true; } }; } else { if (Array.isArray(this.lineCommentStart)) { var regexpStart = this.lineCommentStart.map(lang.escapeRegExp).join("|"); var lineCommentStart = this.lineCommentStart[0]; } else { var regexpStart = lang.escapeRegExp(this.lineCommentStart); var lineCommentStart = this.lineCommentStart; } regexpStart = new RegExp("^(\\s*)(?:" + regexpStart + ") ?"); insertAtTabStop = session.getUseSoftTabs(); var uncomment = function(line, i) { var m = line.match(regexpStart); if (!m) return; var start = m[1].length, end = m[0].length; if (!shouldInsertSpace(line, start, end) && m[0][end - 1] == " ") end--; doc.removeInLine(i, start, end); }; var commentWithSpace = lineCommentStart + " "; var comment = function(line, i) { if (!ignoreBlankLines || /\S/.test(line)) { if (shouldInsertSpace(line, minIndent, minIndent)) doc.insertInLine({row: i, column: minIndent}, commentWithSpace); else doc.insertInLine({row: i, column: minIndent}, lineCommentStart); } }; var testRemove = function(line, i) { return regexpStart.test(line); }; var shouldInsertSpace = function(line, before, after) { var spaces = 0; while (before-- && line.charAt(before) == " ") spaces++; if (spaces % tabSize != 0) return false; var spaces = 0; while (line.charAt(after++) == " ") spaces++; if (tabSize > 2) return spaces % tabSize != tabSize - 1; else return spaces % tabSize == 0; return true; }; } function iter(fun) { for (var i = startRow; i <= endRow; i++) fun(doc.getLine(i), i); } var minEmptyLength = Infinity; iter(function(line, i) { var indent = line.search(/\S/); if (indent !== -1) { if (indent < minIndent) minIndent = indent; if (shouldRemove && !testRemove(line, i)) shouldRemove = false; } else if (minEmptyLength > line.length) { minEmptyLength = line.length; } }); if (minIndent == Infinity) { minIndent = minEmptyLength; ignoreBlankLines = false; shouldRemove = false; } if (insertAtTabStop && minIndent % tabSize != 0) minIndent = Math.floor(minIndent / tabSize) * tabSize; iter(shouldRemove ? uncomment : comment); }; this.toggleBlockComment = function(state, session, range, cursor) { var comment = this.blockComment; if (!comment) return; if (!comment.start && comment[0]) comment = comment[0]; var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); var sel = session.selection; var initialRange = session.selection.toOrientedRange(); var startRow, colDiff; if (token && /comment/.test(token.type)) { var startRange, endRange; while (token && /comment/.test(token.type)) { var i = token.value.indexOf(comment.start); if (i != -1) { var row = iterator.getCurrentTokenRow(); var column = iterator.getCurrentTokenColumn() + i; startRange = new Range(row, column, row, column + comment.start.length); break; } token = iterator.stepBackward(); } var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); while (token && /comment/.test(token.type)) { var i = token.value.indexOf(comment.end); if (i != -1) { var row = iterator.getCurrentTokenRow(); var column = iterator.getCurrentTokenColumn() + i; endRange = new Range(row, column, row, column + comment.end.length); break; } token = iterator.stepForward(); } if (endRange) session.remove(endRange); if (startRange) { session.remove(startRange); startRow = startRange.start.row; colDiff = -comment.start.length; } } else { colDiff = comment.start.length; startRow = range.start.row; session.insert(range.end, comment.end); session.insert(range.start, comment.start); } if (initialRange.start.row == startRow) initialRange.start.column += colDiff; if (initialRange.end.row == startRow) initialRange.end.column += colDiff; session.selection.fromOrientedRange(initialRange); }; this.getNextLineIndent = function(state, line, tab) { return this.$getIndent(line); }; this.checkOutdent = function(state, line, input) { return false; }; this.autoOutdent = function(state, doc, row) { }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; this.createWorker = function(session) { return null; }; this.createModeDelegates = function (mapping) { this.$embeds = []; this.$modes = {}; for (var i in mapping) { if (mapping[i]) { this.$embeds.push(i); this.$modes[i] = new mapping[i](); } } var delegations = ['toggleBlockComment', 'toggleCommentLines', 'getNextLineIndent', 'checkOutdent', 'autoOutdent', 'transformAction', 'getCompletions']; for (var i = 0; i < delegations.length; i++) { (function(scope) { var functionName = delegations[i]; var defaultHandler = scope[functionName]; scope[delegations[i]] = function() { return this.$delegator(functionName, arguments, defaultHandler); }; } (this)); } }; this.$delegator = function(method, args, defaultHandler) { var state = args[0]; if (typeof state != "string") state = state[0]; for (var i = 0; i < this.$embeds.length; i++) { if (!this.$modes[this.$embeds[i]]) continue; var split = state.split(this.$embeds[i]); if (!split[0] && split[1]) { args[0] = split[1]; var mode = this.$modes[this.$embeds[i]]; return mode[method].apply(mode, args); } } var ret = defaultHandler.apply(this, args); return defaultHandler ? ret : undefined; }; this.transformAction = function(state, action, editor, session, param) { if (this.$behaviour) { var behaviours = this.$behaviour.getBehaviours(); for (var key in behaviours) { if (behaviours[key][action]) { var ret = behaviours[key][action].apply(this, arguments); if (ret) { return ret; } } } } }; this.getKeywords = function(append) { if (!this.completionKeywords) { var rules = this.$tokenizer.rules; var completionKeywords = []; for (var rule in rules) { var ruleItr = rules[rule]; for (var r = 0, l = ruleItr.length; r < l; r++) { if (typeof ruleItr[r].token === "string") { if (/keyword|support|storage/.test(ruleItr[r].token)) completionKeywords.push(ruleItr[r].regex); } else if (typeof ruleItr[r].token === "object") { for (var a = 0, aLength = ruleItr[r].token.length; a < aLength; a++) { if (/keyword|support|storage/.test(ruleItr[r].token[a])) { var rule = ruleItr[r].regex.match(/\(.+?\)/g)[a]; completionKeywords.push(rule.substr(1, rule.length - 2)); } } } } } this.completionKeywords = completionKeywords; } if (!append) return this.$keywordList; return completionKeywords.concat(this.$keywordList || []); }; this.$createKeywordList = function() { if (!this.$highlightRules) this.getTokenizer(); return this.$keywordList = this.$highlightRules.$keywordList || []; }; this.getCompletions = function(state, session, pos, prefix) { var keywords = this.$keywordList || this.$createKeywordList(); return keywords.map(function(word) { return { name: word, value: word, score: 0, meta: "keyword" }; }); }; this.$id = "ace/mode/text"; }).call(Mode.prototype); exports.Mode = Mode; }); define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Anchor = exports.Anchor = function(doc, row, column) { this.$onChange = this.onChange.bind(this); this.attach(doc); if (typeof column == "undefined") this.setPosition(row.row, row.column); else this.setPosition(row, column); }; (function() { oop.implement(this, EventEmitter); this.getPosition = function() { return this.$clipPositionToDocument(this.row, this.column); }; this.getDocument = function() { return this.document; }; this.$insertRight = false; this.onChange = function(e) { var delta = e.data; var range = delta.range; if (range.start.row == range.end.row && range.start.row != this.row) return; if (range.start.row > this.row) return; if (range.start.row == this.row && range.start.column > this.column) return; var row = this.row; var column = this.column; var start = range.start; var end = range.end; if (delta.action === "insertText") { if (start.row === row && start.column <= column) { if (start.column === column && this.$insertRight) { } else if (start.row === end.row) { column += end.column - start.column; } else { column -= start.column; row += end.row - start.row; } } else if (start.row !== end.row && start.row < row) { row += end.row - start.row; } } else if (delta.action === "insertLines") { if (start.row === row && column === 0 && this.$insertRight) { } else if (start.row <= row) { row += end.row - start.row; } } else if (delta.action === "removeText") { if (start.row === row && start.column < column) { if (end.column >= column) column = start.column; else column = Math.max(0, column - (end.column - start.column)); } else if (start.row !== end.row && start.row < row) { if (end.row === row) column = Math.max(0, column - end.column) + start.column; row -= (end.row - start.row); } else if (end.row === row) { row -= end.row - start.row; column = Math.max(0, column - end.column) + start.column; } } else if (delta.action == "removeLines") { if (start.row <= row) { if (end.row <= row) row -= end.row - start.row; else { row = start.row; column = 0; } } } this.setPosition(row, column, true); }; this.setPosition = function(row, column, noClip) { var pos; if (noClip) { pos = { row: row, column: column }; } else { pos = this.$clipPositionToDocument(row, column); } if (this.row == pos.row && this.column == pos.column) return; var old = { row: this.row, column: this.column }; this.row = pos.row; this.column = pos.column; this._signal("change", { old: old, value: pos }); }; this.detach = function() { this.document.removeEventListener("change", this.$onChange); }; this.attach = function(doc) { this.document = doc || this.document; this.document.on("change", this.$onChange); }; this.$clipPositionToDocument = function(row, column) { var pos = {}; if (row >= this.document.getLength()) { pos.row = Math.max(0, this.document.getLength() - 1); pos.column = this.document.getLine(pos.row).length; } else if (row < 0) { pos.row = 0; pos.column = 0; } else { pos.row = row; pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); } if (column < 0) pos.column = 0; return pos; }; }).call(Anchor.prototype); }); define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Range = require("./range").Range; var Anchor = require("./anchor").Anchor; var Document = function(text) { this.$lines = []; if (text.length === 0) { this.$lines = [""]; } else if (Array.isArray(text)) { this._insertLines(0, text); } else { this.insert({row: 0, column:0}, text); } }; (function() { oop.implement(this, EventEmitter); this.setValue = function(text) { var len = this.getLength(); this.remove(new Range(0, 0, len, this.getLine(len-1).length)); this.insert({row: 0, column:0}, text); }; this.getValue = function() { return this.getAllLines().join(this.getNewLineCharacter()); }; this.createAnchor = function(row, column) { return new Anchor(this, row, column); }; if ("aaa".split(/a/).length === 0) this.$split = function(text) { return text.replace(/\r\n|\r/g, "\n").split("\n"); }; else this.$split = function(text) { return text.split(/\r\n|\r|\n/); }; this.$detectNewLine = function(text) { var match = text.match(/^.*?(\r\n|\r|\n)/m); this.$autoNewLine = match ? match[1] : "\n"; this._signal("changeNewLineMode"); }; this.getNewLineCharacter = function() { switch (this.$newLineMode) { case "windows": return "\r\n"; case "unix": return "\n"; default: return this.$autoNewLine || "\n"; } }; this.$autoNewLine = ""; this.$newLineMode = "auto"; this.setNewLineMode = function(newLineMode) { if (this.$newLineMode === newLineMode) return; this.$newLineMode = newLineMode; this._signal("changeNewLineMode"); }; this.getNewLineMode = function() { return this.$newLineMode; }; this.isNewLine = function(text) { return (text == "\r\n" || text == "\r" || text == "\n"); }; this.getLine = function(row) { return this.$lines[row] || ""; }; this.getLines = function(firstRow, lastRow) { return this.$lines.slice(firstRow, lastRow + 1); }; this.getAllLines = function() { return this.getLines(0, this.getLength()); }; this.getLength = function() { return this.$lines.length; }; this.getTextRange = function(range) { if (range.start.row == range.end.row) { return this.getLine(range.start.row) .substring(range.start.column, range.end.column); } var lines = this.getLines(range.start.row, range.end.row); lines[0] = (lines[0] || "").substring(range.start.column); var l = lines.length - 1; if (range.end.row - range.start.row == l) lines[l] = lines[l].substring(0, range.end.column); return lines.join(this.getNewLineCharacter()); }; this.$clipPosition = function(position) { var length = this.getLength(); if (position.row >= length) { position.row = Math.max(0, length - 1); position.column = this.getLine(length-1).length; } else if (position.row < 0) position.row = 0; return position; }; this.insert = function(position, text) { if (!text || text.length === 0) return position; position = this.$clipPosition(position); if (this.getLength() <= 1) this.$detectNewLine(text); var lines = this.$split(text); var firstLine = lines.splice(0, 1)[0]; var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0]; position = this.insertInLine(position, firstLine); if (lastLine !== null) { position = this.insertNewLine(position); // terminate first line position = this._insertLines(position.row, lines); position = this.insertInLine(position, lastLine || ""); } return position; }; this.insertLines = function(row, lines) { if (row >= this.getLength()) return this.insert({row: row, column: 0}, "\n" + lines.join("\n")); return this._insertLines(Math.max(row, 0), lines); }; this._insertLines = function(row, lines) { if (lines.length == 0) return {row: row, column: 0}; while (lines.length > 20000) { var end = this._insertLines(row, lines.slice(0, 20000)); lines = lines.slice(20000); row = end.row; } var args = [row, 0]; args.push.apply(args, lines); this.$lines.splice.apply(this.$lines, args); var range = new Range(row, 0, row + lines.length, 0); var delta = { action: "insertLines", range: range, lines: lines }; this._signal("change", { data: delta }); return range.end; }; this.insertNewLine = function(position) { position = this.$clipPosition(position); var line = this.$lines[position.row] || ""; this.$lines[position.row] = line.substring(0, position.column); this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length)); var end = { row : position.row + 1, column : 0 }; var delta = { action: "insertText", range: Range.fromPoints(position, end), text: this.getNewLineCharacter() }; this._signal("change", { data: delta }); return end; }; this.insertInLine = function(position, text) { if (text.length == 0) return position; var line = this.$lines[position.row] || ""; this.$lines[position.row] = line.substring(0, position.column) + text + line.substring(position.column); var end = { row : position.row, column : position.column + text.length }; var delta = { action: "insertText", range: Range.fromPoints(position, end), text: text }; this._signal("change", { data: delta }); return end; }; this.remove = function(range) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); range.start = this.$clipPosition(range.start); range.end = this.$clipPosition(range.end); if (range.isEmpty()) return range.start; var firstRow = range.start.row; var lastRow = range.end.row; if (range.isMultiLine()) { var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1; var lastFullRow = lastRow - 1; if (range.end.column > 0) this.removeInLine(lastRow, 0, range.end.column); if (lastFullRow >= firstFullRow) this._removeLines(firstFullRow, lastFullRow); if (firstFullRow != firstRow) { this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length); this.removeNewLine(range.start.row); } } else { this.removeInLine(firstRow, range.start.column, range.end.column); } return range.start; }; this.removeInLine = function(row, startColumn, endColumn) { if (startColumn == endColumn) return; var range = new Range(row, startColumn, row, endColumn); var line = this.getLine(row); var removed = line.substring(startColumn, endColumn); var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length); this.$lines.splice(row, 1, newLine); var delta = { action: "removeText", range: range, text: removed }; this._signal("change", { data: delta }); return range.start; }; this.removeLines = function(firstRow, lastRow) { if (firstRow < 0 || lastRow >= this.getLength()) return this.remove(new Range(firstRow, 0, lastRow + 1, 0)); return this._removeLines(firstRow, lastRow); }; this._removeLines = function(firstRow, lastRow) { var range = new Range(firstRow, 0, lastRow + 1, 0); var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1); var delta = { action: "removeLines", range: range, nl: this.getNewLineCharacter(), lines: removed }; this._signal("change", { data: delta }); return removed; }; this.removeNewLine = function(row) { var firstLine = this.getLine(row); var secondLine = this.getLine(row+1); var range = new Range(row, firstLine.length, row+1, 0); var line = firstLine + secondLine; this.$lines.splice(row, 2, line); var delta = { action: "removeText", range: range, text: this.getNewLineCharacter() }; this._signal("change", { data: delta }); }; this.replace = function(range, text) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); if (text.length == 0 && range.isEmpty()) return range.start; if (text == this.getTextRange(range)) return range.end; this.remove(range); if (text) { var end = this.insert(range.start, text); } else { end = range.start; } return end; }; this.applyDeltas = function(deltas) { for (var i=0; i=0; i--) { var delta = deltas[i]; var range = Range.fromPoints(delta.range.start, delta.range.end); if (delta.action == "insertLines") this._removeLines(range.start.row, range.end.row - 1); else if (delta.action == "insertText") this.remove(range); else if (delta.action == "removeLines") this._insertLines(range.start.row, delta.lines); else if (delta.action == "removeText") this.insert(range.start, delta.text); } }; this.indexToPosition = function(index, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; for (var i = startRow || 0, l = lines.length; i < l; i++) { index -= lines[i].length + newlineLength; if (index < 0) return {row: i, column: index + lines[i].length + newlineLength}; } return {row: l-1, column: lines[l-1].length}; }; this.positionToIndex = function(pos, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; var index = 0; var row = Math.min(pos.row, lines.length); for (var i = startRow || 0; i < row; ++i) index += lines[i].length + newlineLength; return index + pos.column; }; }).call(Document.prototype); exports.Document = Document; }); define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var BackgroundTokenizer = function(tokenizer, editor) { this.running = false; this.lines = []; this.states = []; this.currentLine = 0; this.tokenizer = tokenizer; var self = this; this.$worker = function() { if (!self.running) { return; } var workerStart = new Date(); var currentLine = self.currentLine; var endLine = -1; var doc = self.doc; while (self.lines[currentLine]) currentLine++; var startLine = currentLine; var len = doc.getLength(); var processedLines = 0; self.running = false; while (currentLine < len) { self.$tokenizeRow(currentLine); endLine = currentLine; do { currentLine++; } while (self.lines[currentLine]); processedLines ++; if ((processedLines % 5 === 0) && (new Date() - workerStart) > 20) { self.running = setTimeout(self.$worker, 20); break; } } self.currentLine = currentLine; if (startLine <= endLine) self.fireUpdateEvent(startLine, endLine); }; }; (function(){ oop.implement(this, EventEmitter); this.setTokenizer = function(tokenizer) { this.tokenizer = tokenizer; this.lines = []; this.states = []; this.start(0); }; this.setDocument = function(doc) { this.doc = doc; this.lines = []; this.states = []; this.stop(); }; this.fireUpdateEvent = function(firstRow, lastRow) { var data = { first: firstRow, last: lastRow }; this._signal("update", {data: data}); }; this.start = function(startRow) { this.currentLine = Math.min(startRow || 0, this.currentLine, this.doc.getLength()); this.lines.splice(this.currentLine, this.lines.length); this.states.splice(this.currentLine, this.states.length); this.stop(); this.running = setTimeout(this.$worker, 700); }; this.scheduleStart = function() { if (!this.running) this.running = setTimeout(this.$worker, 700); } this.$updateOnChange = function(delta) { var range = delta.range; var startRow = range.start.row; var len = range.end.row - startRow; if (len === 0) { this.lines[startRow] = null; } else if (delta.action == "removeText" || delta.action == "removeLines") { this.lines.splice(startRow, len + 1, null); this.states.splice(startRow, len + 1, null); } else { var args = Array(len + 1); args.unshift(startRow, 1); this.lines.splice.apply(this.lines, args); this.states.splice.apply(this.states, args); } this.currentLine = Math.min(startRow, this.currentLine, this.doc.getLength()); this.stop(); }; this.stop = function() { if (this.running) clearTimeout(this.running); this.running = false; }; this.getTokens = function(row) { return this.lines[row] || this.$tokenizeRow(row); }; this.getState = function(row) { if (this.currentLine == row) this.$tokenizeRow(row); return this.states[row] || "start"; }; this.$tokenizeRow = function(row) { var line = this.doc.getLine(row); var state = this.states[row - 1]; var data = this.tokenizer.getLineTokens(line, state, row); if (this.states[row] + "" !== data.state + "") { this.states[row] = data.state; this.lines[row + 1] = null; if (this.currentLine > row + 1) this.currentLine = row + 1; } else if (this.currentLine == row) { this.currentLine = row + 1; } return this.lines[row] = data.tokens; }; }).call(BackgroundTokenizer.prototype); exports.BackgroundTokenizer = BackgroundTokenizer; }); define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"], function(require, exports, module) { "use strict"; var lang = require("./lib/lang"); var oop = require("./lib/oop"); var Range = require("./range").Range; var SearchHighlight = function(regExp, clazz, type) { this.setRegexp(regExp); this.clazz = clazz; this.type = type || "text"; }; (function() { this.MAX_RANGES = 500; this.setRegexp = function(regExp) { if (this.regExp+"" == regExp+"") return; this.regExp = regExp; this.cache = []; }; this.update = function(html, markerLayer, session, config) { if (!this.regExp) return; var start = config.firstRow, end = config.lastRow; for (var i = start; i <= end; i++) { var ranges = this.cache[i]; if (ranges == null) { ranges = lang.getMatchOffsets(session.getLine(i), this.regExp); if (ranges.length > this.MAX_RANGES) ranges = ranges.slice(0, this.MAX_RANGES); ranges = ranges.map(function(match) { return new Range(i, match.offset, i, match.offset + match.length); }); this.cache[i] = ranges.length ? ranges : ""; } for (var j = ranges.length; j --; ) { markerLayer.drawSingleLineMarker( html, ranges[j].toScreenRange(session), this.clazz, config); } } }; }).call(SearchHighlight.prototype); exports.SearchHighlight = SearchHighlight; }); define("ace/edit_session/fold_line",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; function FoldLine(foldData, folds) { this.foldData = foldData; if (Array.isArray(folds)) { this.folds = folds; } else { folds = this.folds = [ folds ]; } var last = folds[folds.length - 1]; this.range = new Range(folds[0].start.row, folds[0].start.column, last.end.row, last.end.column); this.start = this.range.start; this.end = this.range.end; this.folds.forEach(function(fold) { fold.setFoldLine(this); }, this); } (function() { this.shiftRow = function(shift) { this.start.row += shift; this.end.row += shift; this.folds.forEach(function(fold) { fold.start.row += shift; fold.end.row += shift; }); }; this.addFold = function(fold) { if (fold.sameRow) { if (fold.start.row < this.startRow || fold.endRow > this.endRow) { throw new Error("Can't add a fold to this FoldLine as it has no connection"); } this.folds.push(fold); this.folds.sort(function(a, b) { return -a.range.compareEnd(b.start.row, b.start.column); }); if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) { this.end.row = fold.end.row; this.end.column = fold.end.column; } else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) { this.start.row = fold.start.row; this.start.column = fold.start.column; } } else if (fold.start.row == this.end.row) { this.folds.push(fold); this.end.row = fold.end.row; this.end.column = fold.end.column; } else if (fold.end.row == this.start.row) { this.folds.unshift(fold); this.start.row = fold.start.row; this.start.column = fold.start.column; } else { throw new Error("Trying to add fold to FoldRow that doesn't have a matching row"); } fold.foldLine = this; }; this.containsRow = function(row) { return row >= this.start.row && row <= this.end.row; }; this.walk = function(callback, endRow, endColumn) { var lastEnd = 0, folds = this.folds, fold, cmp, stop, isNewRow = true; if (endRow == null) { endRow = this.end.row; endColumn = this.end.column; } for (var i = 0; i < folds.length; i++) { fold = folds[i]; cmp = fold.range.compareStart(endRow, endColumn); if (cmp == -1) { callback(null, endRow, endColumn, lastEnd, isNewRow); return; } stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow); stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd); if (stop || cmp === 0) { return; } isNewRow = !fold.sameRow; lastEnd = fold.end.column; } callback(null, endRow, endColumn, lastEnd, isNewRow); }; this.getNextFoldTo = function(row, column) { var fold, cmp; for (var i = 0; i < this.folds.length; i++) { fold = this.folds[i]; cmp = fold.range.compareEnd(row, column); if (cmp == -1) { return { fold: fold, kind: "after" }; } else if (cmp === 0) { return { fold: fold, kind: "inside" }; } } return null; }; this.addRemoveChars = function(row, column, len) { var ret = this.getNextFoldTo(row, column), fold, folds; if (ret) { fold = ret.fold; if (ret.kind == "inside" && fold.start.column != column && fold.start.row != row) { window.console && window.console.log(row, column, fold); } else if (fold.start.row == row) { folds = this.folds; var i = folds.indexOf(fold); if (i === 0) { this.start.column += len; } for (i; i < folds.length; i++) { fold = folds[i]; fold.start.column += len; if (!fold.sameRow) { return; } fold.end.column += len; } this.end.column += len; } } }; this.split = function(row, column) { var pos = this.getNextFoldTo(row, column); if (!pos || pos.kind == "inside") return null; var fold = pos.fold; var folds = this.folds; var foldData = this.foldData; var i = folds.indexOf(fold); var foldBefore = folds[i - 1]; this.end.row = foldBefore.end.row; this.end.column = foldBefore.end.column; folds = folds.splice(i, folds.length - i); var newFoldLine = new FoldLine(foldData, folds); foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine); return newFoldLine; }; this.merge = function(foldLineNext) { var folds = foldLineNext.folds; for (var i = 0; i < folds.length; i++) { this.addFold(folds[i]); } var foldData = this.foldData; foldData.splice(foldData.indexOf(foldLineNext), 1); }; this.toString = function() { var ret = [this.range.toString() + ": [" ]; this.folds.forEach(function(fold) { ret.push(" " + fold.toString()); }); ret.push("]"); return ret.join("\n"); }; this.idxToPosition = function(idx) { var lastFoldEndColumn = 0; for (var i = 0; i < this.folds.length; i++) { var fold = this.folds[i]; idx -= fold.start.column - lastFoldEndColumn; if (idx < 0) { return { row: fold.start.row, column: fold.start.column + idx }; } idx -= fold.placeholder.length; if (idx < 0) { return fold.start; } lastFoldEndColumn = fold.end.column; } return { row: this.end.row, column: this.end.column + idx }; }; }).call(FoldLine.prototype); exports.FoldLine = FoldLine; }); define("ace/range_list",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("./range").Range; var comparePoints = Range.comparePoints; var RangeList = function() { this.ranges = []; }; (function() { this.comparePoints = comparePoints; this.pointIndex = function(pos, excludeEdges, startIndex) { var list = this.ranges; for (var i = startIndex || 0; i < list.length; i++) { var range = list[i]; var cmpEnd = comparePoints(pos, range.end); if (cmpEnd > 0) continue; var cmpStart = comparePoints(pos, range.start); if (cmpEnd === 0) return excludeEdges && cmpStart !== 0 ? -i-2 : i; if (cmpStart > 0 || (cmpStart === 0 && !excludeEdges)) return i; return -i-1; } return -i - 1; }; this.add = function(range) { var excludeEdges = !range.isEmpty(); var startIndex = this.pointIndex(range.start, excludeEdges); if (startIndex < 0) startIndex = -startIndex - 1; var endIndex = this.pointIndex(range.end, excludeEdges, startIndex); if (endIndex < 0) endIndex = -endIndex - 1; else endIndex++; return this.ranges.splice(startIndex, endIndex - startIndex, range); }; this.addList = function(list) { var removed = []; for (var i = list.length; i--; ) { removed.push.call(removed, this.add(list[i])); } return removed; }; this.substractPoint = function(pos) { var i = this.pointIndex(pos); if (i >= 0) return this.ranges.splice(i, 1); }; this.merge = function() { var removed = []; var list = this.ranges; list = list.sort(function(a, b) { return comparePoints(a.start, b.start); }); var next = list[0], range; for (var i = 1; i < list.length; i++) { range = next; next = list[i]; var cmp = comparePoints(range.end, next.start); if (cmp < 0) continue; if (cmp == 0 && !range.isEmpty() && !next.isEmpty()) continue; if (comparePoints(range.end, next.end) < 0) { range.end.row = next.end.row; range.end.column = next.end.column; } list.splice(i, 1); removed.push(next); next = range; i--; } this.ranges = list; return removed; }; this.contains = function(row, column) { return this.pointIndex({row: row, column: column}) >= 0; }; this.containsPoint = function(pos) { return this.pointIndex(pos) >= 0; }; this.rangeAtPoint = function(pos) { var i = this.pointIndex(pos); if (i >= 0) return this.ranges[i]; }; this.clipRows = function(startRow, endRow) { var list = this.ranges; if (list[0].start.row > endRow || list[list.length - 1].start.row < startRow) return []; var startIndex = this.pointIndex({row: startRow, column: 0}); if (startIndex < 0) startIndex = -startIndex - 1; var endIndex = this.pointIndex({row: endRow, column: 0}, startIndex); if (endIndex < 0) endIndex = -endIndex - 1; var clipped = []; for (var i = startIndex; i < endIndex; i++) { clipped.push(list[i]); } return clipped; }; this.removeAll = function() { return this.ranges.splice(0, this.ranges.length); }; this.attach = function(session) { if (this.session) this.detach(); this.session = session; this.onChange = this.$onChange.bind(this); this.session.on('change', this.onChange); }; this.detach = function() { if (!this.session) return; this.session.removeListener('change', this.onChange); this.session = null; }; this.$onChange = function(e) { var changeRange = e.data.range; if (e.data.action[0] == "i"){ var start = changeRange.start; var end = changeRange.end; } else { var end = changeRange.start; var start = changeRange.end; } var startRow = start.row; var endRow = end.row; var lineDif = endRow - startRow; var colDiff = -start.column + end.column; var ranges = this.ranges; for (var i = 0, n = ranges.length; i < n; i++) { var r = ranges[i]; if (r.end.row < startRow) continue; if (r.start.row > startRow) break; if (r.start.row == startRow && r.start.column >= start.column ) { if (r.start.column == start.column && this.$insertRight) { } else { r.start.column += colDiff; r.start.row += lineDif; } } if (r.end.row == startRow && r.end.column >= start.column) { if (r.end.column == start.column && this.$insertRight) { continue; } if (r.end.column == start.column && colDiff > 0 && i < n - 1) { if (r.end.column > r.start.column && r.end.column == ranges[i+1].start.column) r.end.column -= colDiff; } r.end.column += colDiff; r.end.row += lineDif; } } if (lineDif != 0 && i < n) { for (; i < n; i++) { var r = ranges[i]; r.start.row += lineDif; r.end.row += lineDif; } } }; }).call(RangeList.prototype); exports.RangeList = RangeList; }); define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var RangeList = require("../range_list").RangeList; var oop = require("../lib/oop") var Fold = exports.Fold = function(range, placeholder) { this.foldLine = null; this.placeholder = placeholder; this.range = range; this.start = range.start; this.end = range.end; this.sameRow = range.start.row == range.end.row; this.subFolds = this.ranges = []; }; oop.inherits(Fold, RangeList); (function() { this.toString = function() { return '"' + this.placeholder + '" ' + this.range.toString(); }; this.setFoldLine = function(foldLine) { this.foldLine = foldLine; this.subFolds.forEach(function(fold) { fold.setFoldLine(foldLine); }); }; this.clone = function() { var range = this.range.clone(); var fold = new Fold(range, this.placeholder); this.subFolds.forEach(function(subFold) { fold.subFolds.push(subFold.clone()); }); fold.collapseChildren = this.collapseChildren; return fold; }; this.addSubFold = function(fold) { if (this.range.isEqual(fold)) return; if (!this.range.containsRange(fold)) throw new Error("A fold can't intersect already existing fold" + fold.range + this.range); consumeRange(fold, this.start); var row = fold.start.row, column = fold.start.column; for (var i = 0, cmp = -1; i < this.subFolds.length; i++) { cmp = this.subFolds[i].range.compare(row, column); if (cmp != 1) break; } var afterStart = this.subFolds[i]; if (cmp == 0) return afterStart.addSubFold(fold); var row = fold.range.end.row, column = fold.range.end.column; for (var j = i, cmp = -1; j < this.subFolds.length; j++) { cmp = this.subFolds[j].range.compare(row, column); if (cmp != 1) break; } var afterEnd = this.subFolds[j]; if (cmp == 0) throw new Error("A fold can't intersect already existing fold" + fold.range + this.range); var consumedFolds = this.subFolds.splice(i, j - i, fold); fold.setFoldLine(this.foldLine); return fold; }; this.restoreRange = function(range) { return restoreRange(range, this.start); }; }).call(Fold.prototype); function consumePoint(point, anchor) { point.row -= anchor.row; if (point.row == 0) point.column -= anchor.column; } function consumeRange(range, anchor) { consumePoint(range.start, anchor); consumePoint(range.end, anchor); } function restorePoint(point, anchor) { if (point.row == 0) point.column += anchor.column; point.row += anchor.row; } function restoreRange(range, anchor) { restorePoint(range.start, anchor); restorePoint(range.end, anchor); } }); define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var FoldLine = require("./fold_line").FoldLine; var Fold = require("./fold").Fold; var TokenIterator = require("../token_iterator").TokenIterator; function Folding() { this.getFoldAt = function(row, column, side) { var foldLine = this.getFoldLine(row); if (!foldLine) return null; var folds = foldLine.folds; for (var i = 0; i < folds.length; i++) { var fold = folds[i]; if (fold.range.contains(row, column)) { if (side == 1 && fold.range.isEnd(row, column)) { continue; } else if (side == -1 && fold.range.isStart(row, column)) { continue; } return fold; } } }; this.getFoldsInRange = function(range) { var start = range.start; var end = range.end; var foldLines = this.$foldData; var foundFolds = []; start.column += 1; end.column -= 1; for (var i = 0; i < foldLines.length; i++) { var cmp = foldLines[i].range.compareRange(range); if (cmp == 2) { continue; } else if (cmp == -2) { break; } var folds = foldLines[i].folds; for (var j = 0; j < folds.length; j++) { var fold = folds[j]; cmp = fold.range.compareRange(range); if (cmp == -2) { break; } else if (cmp == 2) { continue; } else if (cmp == 42) { break; } foundFolds.push(fold); } } start.column -= 1; end.column += 1; return foundFolds; }; this.getFoldsInRangeList = function(ranges) { if (Array.isArray(ranges)) { var folds = []; ranges.forEach(function(range) { folds = folds.concat(this.getFoldsInRange(range)); }, this); } else { var folds = this.getFoldsInRange(ranges); } return folds; } this.getAllFolds = function() { var folds = []; var foldLines = this.$foldData; for (var i = 0; i < foldLines.length; i++) for (var j = 0; j < foldLines[i].folds.length; j++) folds.push(foldLines[i].folds[j]); return folds; }; this.getFoldStringAt = function(row, column, trim, foldLine) { foldLine = foldLine || this.getFoldLine(row); if (!foldLine) return null; var lastFold = { end: { column: 0 } }; var str, fold; for (var i = 0; i < foldLine.folds.length; i++) { fold = foldLine.folds[i]; var cmp = fold.range.compareEnd(row, column); if (cmp == -1) { str = this .getLine(fold.start.row) .substring(lastFold.end.column, fold.start.column); break; } else if (cmp === 0) { return null; } lastFold = fold; } if (!str) str = this.getLine(fold.start.row).substring(lastFold.end.column); if (trim == -1) return str.substring(0, column - lastFold.end.column); else if (trim == 1) return str.substring(column - lastFold.end.column); else return str; }; this.getFoldLine = function(docRow, startFoldLine) { var foldData = this.$foldData; var i = 0; if (startFoldLine) i = foldData.indexOf(startFoldLine); if (i == -1) i = 0; for (i; i < foldData.length; i++) { var foldLine = foldData[i]; if (foldLine.start.row <= docRow && foldLine.end.row >= docRow) { return foldLine; } else if (foldLine.end.row > docRow) { return null; } } return null; }; this.getNextFoldLine = function(docRow, startFoldLine) { var foldData = this.$foldData; var i = 0; if (startFoldLine) i = foldData.indexOf(startFoldLine); if (i == -1) i = 0; for (i; i < foldData.length; i++) { var foldLine = foldData[i]; if (foldLine.end.row >= docRow) { return foldLine; } } return null; }; this.getFoldedRowCount = function(first, last) { var foldData = this.$foldData, rowCount = last-first+1; for (var i = 0; i < foldData.length; i++) { var foldLine = foldData[i], end = foldLine.end.row, start = foldLine.start.row; if (end >= last) { if(start < last) { if(start >= first) rowCount -= last-start; else rowCount = 0;//in one fold } break; } else if(end >= first){ if (start >= first) //fold inside range rowCount -= end-start; else rowCount -= end-first+1; } } return rowCount; }; this.$addFoldLine = function(foldLine) { this.$foldData.push(foldLine); this.$foldData.sort(function(a, b) { return a.start.row - b.start.row; }); return foldLine; }; this.addFold = function(placeholder, range) { var foldData = this.$foldData; var added = false; var fold; if (placeholder instanceof Fold) fold = placeholder; else { fold = new Fold(range, placeholder); fold.collapseChildren = range.collapseChildren; } this.$clipRangeToDocument(fold.range); var startRow = fold.start.row; var startColumn = fold.start.column; var endRow = fold.end.row; var endColumn = fold.end.column; if (!(startRow < endRow || startRow == endRow && startColumn <= endColumn - 2)) throw new Error("The range has to be at least 2 characters width"); var startFold = this.getFoldAt(startRow, startColumn, 1); var endFold = this.getFoldAt(endRow, endColumn, -1); if (startFold && endFold == startFold) return startFold.addSubFold(fold); if (startFold && !startFold.range.isStart(startRow, startColumn)) this.removeFold(startFold); if (endFold && !endFold.range.isEnd(endRow, endColumn)) this.removeFold(endFold); var folds = this.getFoldsInRange(fold.range); if (folds.length > 0) { this.removeFolds(folds); folds.forEach(function(subFold) { fold.addSubFold(subFold); }); } for (var i = 0; i < foldData.length; i++) { var foldLine = foldData[i]; if (endRow == foldLine.start.row) { foldLine.addFold(fold); added = true; break; } else if (startRow == foldLine.end.row) { foldLine.addFold(fold); added = true; if (!fold.sameRow) { var foldLineNext = foldData[i + 1]; if (foldLineNext && foldLineNext.start.row == endRow) { foldLine.merge(foldLineNext); break; } } break; } else if (endRow <= foldLine.start.row) { break; } } if (!added) foldLine = this.$addFoldLine(new FoldLine(this.$foldData, fold)); if (this.$useWrapMode) this.$updateWrapData(foldLine.start.row, foldLine.start.row); else this.$updateRowLengthCache(foldLine.start.row, foldLine.start.row); this.$modified = true; this._emit("changeFold", { data: fold, action: "add" }); return fold; }; this.addFolds = function(folds) { folds.forEach(function(fold) { this.addFold(fold); }, this); }; this.removeFold = function(fold) { var foldLine = fold.foldLine; var startRow = foldLine.start.row; var endRow = foldLine.end.row; var foldLines = this.$foldData; var folds = foldLine.folds; if (folds.length == 1) { foldLines.splice(foldLines.indexOf(foldLine), 1); } else if (foldLine.range.isEnd(fold.end.row, fold.end.column)) { folds.pop(); foldLine.end.row = folds[folds.length - 1].end.row; foldLine.end.column = folds[folds.length - 1].end.column; } else if (foldLine.range.isStart(fold.start.row, fold.start.column)) { folds.shift(); foldLine.start.row = folds[0].start.row; foldLine.start.column = folds[0].start.column; } else if (fold.sameRow) { folds.splice(folds.indexOf(fold), 1); } else { var newFoldLine = foldLine.split(fold.start.row, fold.start.column); folds = newFoldLine.folds; folds.shift(); newFoldLine.start.row = folds[0].start.row; newFoldLine.start.column = folds[0].start.column; } if (!this.$updating) { if (this.$useWrapMode) this.$updateWrapData(startRow, endRow); else this.$updateRowLengthCache(startRow, endRow); } this.$modified = true; this._emit("changeFold", { data: fold, action: "remove" }); }; this.removeFolds = function(folds) { var cloneFolds = []; for (var i = 0; i < folds.length; i++) { cloneFolds.push(folds[i]); } cloneFolds.forEach(function(fold) { this.removeFold(fold); }, this); this.$modified = true; }; this.expandFold = function(fold) { this.removeFold(fold); fold.subFolds.forEach(function(subFold) { fold.restoreRange(subFold); this.addFold(subFold); }, this); if (fold.collapseChildren > 0) { this.foldAll(fold.start.row+1, fold.end.row, fold.collapseChildren-1); } fold.subFolds = []; }; this.expandFolds = function(folds) { folds.forEach(function(fold) { this.expandFold(fold); }, this); }; this.unfold = function(location, expandInner) { var range, folds; if (location == null) { range = new Range(0, 0, this.getLength(), 0); expandInner = true; } else if (typeof location == "number") range = new Range(location, 0, location, this.getLine(location).length); else if ("row" in location) range = Range.fromPoints(location, location); else range = location; folds = this.getFoldsInRangeList(range); if (expandInner) { this.removeFolds(folds); } else { var subFolds = folds; while (subFolds.length) { this.expandFolds(subFolds); subFolds = this.getFoldsInRangeList(range); } } if (folds.length) return folds; }; this.isRowFolded = function(docRow, startFoldRow) { return !!this.getFoldLine(docRow, startFoldRow); }; this.getRowFoldEnd = function(docRow, startFoldRow) { var foldLine = this.getFoldLine(docRow, startFoldRow); return foldLine ? foldLine.end.row : docRow; }; this.getRowFoldStart = function(docRow, startFoldRow) { var foldLine = this.getFoldLine(docRow, startFoldRow); return foldLine ? foldLine.start.row : docRow; }; this.getFoldDisplayLine = function(foldLine, endRow, endColumn, startRow, startColumn) { if (startRow == null) startRow = foldLine.start.row; if (startColumn == null) startColumn = 0; if (endRow == null) endRow = foldLine.end.row; if (endColumn == null) endColumn = this.getLine(endRow).length; var doc = this.doc; var textLine = ""; foldLine.walk(function(placeholder, row, column, lastColumn) { if (row < startRow) return; if (row == startRow) { if (column < startColumn) return; lastColumn = Math.max(startColumn, lastColumn); } if (placeholder != null) { textLine += placeholder; } else { textLine += doc.getLine(row).substring(lastColumn, column); } }, endRow, endColumn); return textLine; }; this.getDisplayLine = function(row, endColumn, startRow, startColumn) { var foldLine = this.getFoldLine(row); if (!foldLine) { var line; line = this.doc.getLine(row); return line.substring(startColumn || 0, endColumn || line.length); } else { return this.getFoldDisplayLine( foldLine, row, endColumn, startRow, startColumn); } }; this.$cloneFoldData = function() { var fd = []; fd = this.$foldData.map(function(foldLine) { var folds = foldLine.folds.map(function(fold) { return fold.clone(); }); return new FoldLine(fd, folds); }); return fd; }; this.toggleFold = function(tryToUnfold) { var selection = this.selection; var range = selection.getRange(); var fold; var bracketPos; if (range.isEmpty()) { var cursor = range.start; fold = this.getFoldAt(cursor.row, cursor.column); if (fold) { this.expandFold(fold); return; } else if (bracketPos = this.findMatchingBracket(cursor)) { if (range.comparePoint(bracketPos) == 1) { range.end = bracketPos; } else { range.start = bracketPos; range.start.column++; range.end.column--; } } else if (bracketPos = this.findMatchingBracket({row: cursor.row, column: cursor.column + 1})) { if (range.comparePoint(bracketPos) == 1) range.end = bracketPos; else range.start = bracketPos; range.start.column++; } else { range = this.getCommentFoldRange(cursor.row, cursor.column) || range; } } else { var folds = this.getFoldsInRange(range); if (tryToUnfold && folds.length) { this.expandFolds(folds); return; } else if (folds.length == 1 ) { fold = folds[0]; } } if (!fold) fold = this.getFoldAt(range.start.row, range.start.column); if (fold && fold.range.toString() == range.toString()) { this.expandFold(fold); return; } var placeholder = "..."; if (!range.isMultiLine()) { placeholder = this.getTextRange(range); if(placeholder.length < 4) return; placeholder = placeholder.trim().substring(0, 2) + ".."; } this.addFold(placeholder, range); }; this.getCommentFoldRange = function(row, column, dir) { var iterator = new TokenIterator(this, row, column); var token = iterator.getCurrentToken(); if (token && /^comment|string/.test(token.type)) { var range = new Range(); var re = new RegExp(token.type.replace(/\..*/, "\\.")); if (dir != 1) { do { token = iterator.stepBackward(); } while(token && re.test(token.type)); iterator.stepForward(); } range.start.row = iterator.getCurrentTokenRow(); range.start.column = iterator.getCurrentTokenColumn() + 2; iterator = new TokenIterator(this, row, column); if (dir != -1) { do { token = iterator.stepForward(); } while(token && re.test(token.type)); token = iterator.stepBackward(); } else token = iterator.getCurrentToken(); range.end.row = iterator.getCurrentTokenRow(); range.end.column = iterator.getCurrentTokenColumn() + token.value.length - 2; return range; } }; this.foldAll = function(startRow, endRow, depth) { if (depth == undefined) depth = 100000; // JSON.stringify doesn't hanle Infinity var foldWidgets = this.foldWidgets; if (!foldWidgets) return; // mode doesn't support folding endRow = endRow || this.getLength(); startRow = startRow || 0; for (var row = startRow; row < endRow; row++) { if (foldWidgets[row] == null) foldWidgets[row] = this.getFoldWidget(row); if (foldWidgets[row] != "start") continue; var range = this.getFoldWidgetRange(row); if (range && range.isMultiLine() && range.end.row <= endRow && range.start.row >= startRow ) { row = range.end.row; try { var fold = this.addFold("...", range); if (fold) fold.collapseChildren = depth; } catch(e) {} } } }; this.$foldStyles = { "manual": 1, "markbegin": 1, "markbeginend": 1 }; this.$foldStyle = "markbegin"; this.setFoldStyle = function(style) { if (!this.$foldStyles[style]) throw new Error("invalid fold style: " + style + "[" + Object.keys(this.$foldStyles).join(", ") + "]"); if (this.$foldStyle == style) return; this.$foldStyle = style; if (style == "manual") this.unfold(); var mode = this.$foldMode; this.$setFolding(null); this.$setFolding(mode); }; this.$setFolding = function(foldMode) { if (this.$foldMode == foldMode) return; this.$foldMode = foldMode; this.off('change', this.$updateFoldWidgets); this.off('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets); this._emit("changeAnnotation"); if (!foldMode || this.$foldStyle == "manual") { this.foldWidgets = null; return; } this.foldWidgets = []; this.getFoldWidget = foldMode.getFoldWidget.bind(foldMode, this, this.$foldStyle); this.getFoldWidgetRange = foldMode.getFoldWidgetRange.bind(foldMode, this, this.$foldStyle); this.$updateFoldWidgets = this.updateFoldWidgets.bind(this); this.$tokenizerUpdateFoldWidgets = this.tokenizerUpdateFoldWidgets.bind(this); this.on('change', this.$updateFoldWidgets); this.on('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets); }; this.getParentFoldRangeData = function (row, ignoreCurrent) { var fw = this.foldWidgets; if (!fw || (ignoreCurrent && fw[row])) return {}; var i = row - 1, firstRange; while (i >= 0) { var c = fw[i]; if (c == null) c = fw[i] = this.getFoldWidget(i); if (c == "start") { var range = this.getFoldWidgetRange(i); if (!firstRange) firstRange = range; if (range && range.end.row >= row) break; } i--; } return { range: i !== -1 && range, firstRange: firstRange }; } this.onFoldWidgetClick = function(row, e) { e = e.domEvent; var options = { children: e.shiftKey, all: e.ctrlKey || e.metaKey, siblings: e.altKey }; var range = this.$toggleFoldWidget(row, options); if (!range) { var el = (e.target || e.srcElement) if (el && /ace_fold-widget/.test(el.className)) el.className += " ace_invalid"; } }; this.$toggleFoldWidget = function(row, options) { if (!this.getFoldWidget) return; var type = this.getFoldWidget(row); var line = this.getLine(row); var dir = type === "end" ? -1 : 1; var fold = this.getFoldAt(row, dir === -1 ? 0 : line.length, dir); if (fold) { if (options.children || options.all) this.removeFold(fold); else this.expandFold(fold); return; } var range = this.getFoldWidgetRange(row, true); if (range && !range.isMultiLine()) { fold = this.getFoldAt(range.start.row, range.start.column, 1); if (fold && range.isEqual(fold.range)) { this.removeFold(fold); return; } } if (options.siblings) { var data = this.getParentFoldRangeData(row); if (data.range) { var startRow = data.range.start.row + 1; var endRow = data.range.end.row; } this.foldAll(startRow, endRow, options.all ? 10000 : 0); } else if (options.children) { endRow = range ? range.end.row : this.getLength(); this.foldAll(row + 1, endRow, options.all ? 10000 : 0); } else if (range) { if (options.all) range.collapseChildren = 10000; this.addFold("...", range); } return range; }; this.toggleFoldWidget = function(toggleParent) { var row = this.selection.getCursor().row; row = this.getRowFoldStart(row); var range = this.$toggleFoldWidget(row, {}); if (range) return; var data = this.getParentFoldRangeData(row, true); range = data.range || data.firstRange; if (range) { row = range.start.row; var fold = this.getFoldAt(row, this.getLine(row).length, 1); if (fold) { this.removeFold(fold); } else { this.addFold("...", range); } } }; this.updateFoldWidgets = function(e) { var delta = e.data; var range = delta.range; var firstRow = range.start.row; var len = range.end.row - firstRow; if (len === 0) { this.foldWidgets[firstRow] = null; } else if (delta.action == "removeText" || delta.action == "removeLines") { this.foldWidgets.splice(firstRow, len + 1, null); } else { var args = Array(len + 1); args.unshift(firstRow, 1); this.foldWidgets.splice.apply(this.foldWidgets, args); } }; this.tokenizerUpdateFoldWidgets = function(e) { var rows = e.data; if (rows.first != rows.last) { if (this.foldWidgets.length > rows.first) this.foldWidgets.splice(rows.first, this.foldWidgets.length); } } } exports.Folding = Folding; }); define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"], function(require, exports, module) { "use strict"; var TokenIterator = require("../token_iterator").TokenIterator; var Range = require("../range").Range; function BracketMatch() { this.findMatchingBracket = function(position, chr) { if (position.column == 0) return null; var charBeforeCursor = chr || this.getLine(position.row).charAt(position.column-1); if (charBeforeCursor == "") return null; var match = charBeforeCursor.match(/([\(\[\{])|([\)\]\}])/); if (!match) return null; if (match[1]) return this.$findClosingBracket(match[1], position); else return this.$findOpeningBracket(match[2], position); }; this.getBracketRange = function(pos) { var line = this.getLine(pos.row); var before = true, range; var chr = line.charAt(pos.column-1); var match = chr && chr.match(/([\(\[\{])|([\)\]\}])/); if (!match) { chr = line.charAt(pos.column); pos = {row: pos.row, column: pos.column + 1}; match = chr && chr.match(/([\(\[\{])|([\)\]\}])/); before = false; } if (!match) return null; if (match[1]) { var bracketPos = this.$findClosingBracket(match[1], pos); if (!bracketPos) return null; range = Range.fromPoints(pos, bracketPos); if (!before) { range.end.column++; range.start.column--; } range.cursor = range.end; } else { var bracketPos = this.$findOpeningBracket(match[2], pos); if (!bracketPos) return null; range = Range.fromPoints(bracketPos, pos); if (!before) { range.start.column++; range.end.column--; } range.cursor = range.start; } return range; }; this.$brackets = { ")": "(", "(": ")", "]": "[", "[": "]", "{": "}", "}": "{" }; this.$findOpeningBracket = function(bracket, position, typeRe) { var openBracket = this.$brackets[bracket]; var depth = 1; var iterator = new TokenIterator(this, position.row, position.column); var token = iterator.getCurrentToken(); if (!token) token = iterator.stepForward(); if (!token) return; if (!typeRe){ typeRe = new RegExp( "(\\.?" + token.type.replace(".", "\\.").replace("rparen", ".paren") .replace(/\b(?:end|start|begin)\b/, "") + ")+" ); } var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2; var value = token.value; while (true) { while (valueIndex >= 0) { var chr = value.charAt(valueIndex); if (chr == openBracket) { depth -= 1; if (depth == 0) { return {row: iterator.getCurrentTokenRow(), column: valueIndex + iterator.getCurrentTokenColumn()}; } } else if (chr == bracket) { depth += 1; } valueIndex -= 1; } do { token = iterator.stepBackward(); } while (token && !typeRe.test(token.type)); if (token == null) break; value = token.value; valueIndex = value.length - 1; } return null; }; this.$findClosingBracket = function(bracket, position, typeRe) { var closingBracket = this.$brackets[bracket]; var depth = 1; var iterator = new TokenIterator(this, position.row, position.column); var token = iterator.getCurrentToken(); if (!token) token = iterator.stepForward(); if (!token) return; if (!typeRe){ typeRe = new RegExp( "(\\.?" + token.type.replace(".", "\\.").replace("lparen", ".paren") .replace(/\b(?:end|start|begin)\b/, "") + ")+" ); } var valueIndex = position.column - iterator.getCurrentTokenColumn(); while (true) { var value = token.value; var valueLength = value.length; while (valueIndex < valueLength) { var chr = value.charAt(valueIndex); if (chr == closingBracket) { depth -= 1; if (depth == 0) { return {row: iterator.getCurrentTokenRow(), column: valueIndex + iterator.getCurrentTokenColumn()}; } } else if (chr == bracket) { depth += 1; } valueIndex += 1; } do { token = iterator.stepForward(); } while (token && !typeRe.test(token.type)); if (token == null) break; valueIndex = 0; } return null; }; } exports.BracketMatch = BracketMatch; }); define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var lang = require("./lib/lang"); var config = require("./config"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Selection = require("./selection").Selection; var TextMode = require("./mode/text").Mode; var Range = require("./range").Range; var Document = require("./document").Document; var BackgroundTokenizer = require("./background_tokenizer").BackgroundTokenizer; var SearchHighlight = require("./search_highlight").SearchHighlight; var EditSession = function(text, mode) { this.$breakpoints = []; this.$decorations = []; this.$frontMarkers = {}; this.$backMarkers = {}; this.$markerId = 1; this.$undoSelect = true; this.$foldData = []; this.$foldData.toString = function() { return this.join("\n"); } this.on("changeFold", this.onChangeFold.bind(this)); this.$onChange = this.onChange.bind(this); if (typeof text != "object" || !text.getLine) text = new Document(text); this.setDocument(text); this.selection = new Selection(this); config.resetOptions(this); this.setMode(mode); config._signal("session", this); }; (function() { oop.implement(this, EventEmitter); this.setDocument = function(doc) { if (this.doc) this.doc.removeListener("change", this.$onChange); this.doc = doc; doc.on("change", this.$onChange); if (this.bgTokenizer) this.bgTokenizer.setDocument(this.getDocument()); this.resetCaches(); }; this.getDocument = function() { return this.doc; }; this.$resetRowCache = function(docRow) { if (!docRow) { this.$docRowCache = []; this.$screenRowCache = []; return; } var l = this.$docRowCache.length; var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1; if (l > i) { this.$docRowCache.splice(i, l); this.$screenRowCache.splice(i, l); } }; this.$getRowCacheIndex = function(cacheArray, val) { var low = 0; var hi = cacheArray.length - 1; while (low <= hi) { var mid = (low + hi) >> 1; var c = cacheArray[mid]; if (val > c) low = mid + 1; else if (val < c) hi = mid - 1; else return mid; } return low -1; }; this.resetCaches = function() { this.$modified = true; this.$wrapData = []; this.$rowLengthCache = []; this.$resetRowCache(0); if (this.bgTokenizer) this.bgTokenizer.start(0); }; this.onChangeFold = function(e) { var fold = e.data; this.$resetRowCache(fold.start.row); }; this.onChange = function(e) { var delta = e.data; this.$modified = true; this.$resetRowCache(delta.range.start.row); var removedFolds = this.$updateInternalDataOnChange(e); if (!this.$fromUndo && this.$undoManager && !delta.ignore) { this.$deltasDoc.push(delta); if (removedFolds && removedFolds.length != 0) { this.$deltasFold.push({ action: "removeFolds", folds: removedFolds }); } this.$informUndoManager.schedule(); } this.bgTokenizer && this.bgTokenizer.$updateOnChange(delta); this._signal("change", e); }; this.setValue = function(text) { this.doc.setValue(text); this.selection.moveTo(0, 0); this.$resetRowCache(0); this.$deltas = []; this.$deltasDoc = []; this.$deltasFold = []; this.setUndoManager(this.$undoManager); this.getUndoManager().reset(); }; this.getValue = this.toString = function() { return this.doc.getValue(); }; this.getSelection = function() { return this.selection; }; this.getState = function(row) { return this.bgTokenizer.getState(row); }; this.getTokens = function(row) { return this.bgTokenizer.getTokens(row); }; this.getTokenAt = function(row, column) { var tokens = this.bgTokenizer.getTokens(row); var token, c = 0; if (column == null) { i = tokens.length - 1; c = this.getLine(row).length; } else { for (var i = 0; i < tokens.length; i++) { c += tokens[i].value.length; if (c >= column) break; } } token = tokens[i]; if (!token) return null; token.index = i; token.start = c - token.value.length; return token; }; this.setUndoManager = function(undoManager) { this.$undoManager = undoManager; this.$deltas = []; this.$deltasDoc = []; this.$deltasFold = []; if (this.$informUndoManager) this.$informUndoManager.cancel(); if (undoManager) { var self = this; this.$syncInformUndoManager = function() { self.$informUndoManager.cancel(); if (self.$deltasFold.length) { self.$deltas.push({ group: "fold", deltas: self.$deltasFold }); self.$deltasFold = []; } if (self.$deltasDoc.length) { self.$deltas.push({ group: "doc", deltas: self.$deltasDoc }); self.$deltasDoc = []; } if (self.$deltas.length > 0) { undoManager.execute({ action: "aceupdate", args: [self.$deltas, self], merge: self.mergeUndoDeltas }); } self.mergeUndoDeltas = false; self.$deltas = []; }; this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager); } }; this.markUndoGroup = function() { if (this.$syncInformUndoManager) this.$syncInformUndoManager(); }; this.$defaultUndoManager = { undo: function() {}, redo: function() {}, reset: function() {} }; this.getUndoManager = function() { return this.$undoManager || this.$defaultUndoManager; }; this.getTabString = function() { if (this.getUseSoftTabs()) { return lang.stringRepeat(" ", this.getTabSize()); } else { return "\t"; } }; this.setUseSoftTabs = function(val) { this.setOption("useSoftTabs", val); }; this.getUseSoftTabs = function() { return this.$useSoftTabs && !this.$mode.$indentWithTabs; }; this.setTabSize = function(tabSize) { this.setOption("tabSize", tabSize); }; this.getTabSize = function() { return this.$tabSize; }; this.isTabStop = function(position) { return this.$useSoftTabs && (position.column % this.$tabSize === 0); }; this.$overwrite = false; this.setOverwrite = function(overwrite) { this.setOption("overwrite", overwrite); }; this.getOverwrite = function() { return this.$overwrite; }; this.toggleOverwrite = function() { this.setOverwrite(!this.$overwrite); }; this.addGutterDecoration = function(row, className) { if (!this.$decorations[row]) this.$decorations[row] = ""; this.$decorations[row] += " " + className; this._signal("changeBreakpoint", {}); }; this.removeGutterDecoration = function(row, className) { this.$decorations[row] = (this.$decorations[row] || "").replace(" " + className, ""); this._signal("changeBreakpoint", {}); }; this.getBreakpoints = function() { return this.$breakpoints; }; this.setBreakpoints = function(rows) { this.$breakpoints = []; for (var i=0; i 0) inToken = !!line.charAt(column - 1).match(this.tokenRe); if (!inToken) inToken = !!line.charAt(column).match(this.tokenRe); if (inToken) var re = this.tokenRe; else if (/^\s+$/.test(line.slice(column-1, column+1))) var re = /\s/; else var re = this.nonTokenRe; var start = column; if (start > 0) { do { start--; } while (start >= 0 && line.charAt(start).match(re)); start++; } var end = column; while (end < line.length && line.charAt(end).match(re)) { end++; } return new Range(row, start, row, end); }; this.getAWordRange = function(row, column) { var wordRange = this.getWordRange(row, column); var line = this.getLine(wordRange.end.row); while (line.charAt(wordRange.end.column).match(/[ \t]/)) { wordRange.end.column += 1; } return wordRange; }; this.setNewLineMode = function(newLineMode) { this.doc.setNewLineMode(newLineMode); }; this.getNewLineMode = function() { return this.doc.getNewLineMode(); }; this.setUseWorker = function(useWorker) { this.setOption("useWorker", useWorker); }; this.getUseWorker = function() { return this.$useWorker; }; this.onReloadTokenizer = function(e) { var rows = e.data; this.bgTokenizer.start(rows.first); this._signal("tokenizerUpdate", e); }; this.$modes = {}; this.$mode = null; this.$modeId = null; this.setMode = function(mode, cb) { if (mode && typeof mode === "object") { if (mode.getTokenizer) return this.$onChangeMode(mode); var options = mode; var path = options.path; } else { path = mode || "ace/mode/text"; } if (!this.$modes["ace/mode/text"]) this.$modes["ace/mode/text"] = new TextMode(); if (this.$modes[path] && !options) { this.$onChangeMode(this.$modes[path]); cb && cb(); return; } this.$modeId = path; config.loadModule(["mode", path], function(m) { if (this.$modeId !== path) return cb && cb(); if (this.$modes[path] && !options) { this.$onChangeMode(this.$modes[path]); } else if (m && m.Mode) { m = new m.Mode(options); if (!options) { this.$modes[path] = m; m.$id = path; } this.$onChangeMode(m); } cb && cb(); }.bind(this)); if (!this.$mode) this.$onChangeMode(this.$modes["ace/mode/text"], true); }; this.$onChangeMode = function(mode, $isPlaceholder) { if (!$isPlaceholder) this.$modeId = mode.$id; if (this.$mode === mode) return; this.$mode = mode; this.$stopWorker(); if (this.$useWorker) this.$startWorker(); var tokenizer = mode.getTokenizer(); if(tokenizer.addEventListener !== undefined) { var onReloadTokenizer = this.onReloadTokenizer.bind(this); tokenizer.addEventListener("update", onReloadTokenizer); } if (!this.bgTokenizer) { this.bgTokenizer = new BackgroundTokenizer(tokenizer); var _self = this; this.bgTokenizer.addEventListener("update", function(e) { _self._signal("tokenizerUpdate", e); }); } else { this.bgTokenizer.setTokenizer(tokenizer); } this.bgTokenizer.setDocument(this.getDocument()); this.tokenRe = mode.tokenRe; this.nonTokenRe = mode.nonTokenRe; if (!$isPlaceholder) { if (mode.attachToSession) mode.attachToSession(this); this.$options.wrapMethod.set.call(this, this.$wrapMethod); this.$setFolding(mode.foldingRules); this.bgTokenizer.start(0); this._emit("changeMode"); } }; this.$stopWorker = function() { if (this.$worker) { this.$worker.terminate(); this.$worker = null; } }; this.$startWorker = function() { try { this.$worker = this.$mode.createWorker(this); } catch (e) { config.warn("Could not load worker", e); this.$worker = null; } }; this.getMode = function() { return this.$mode; }; this.$scrollTop = 0; this.setScrollTop = function(scrollTop) { if (this.$scrollTop === scrollTop || isNaN(scrollTop)) return; this.$scrollTop = scrollTop; this._signal("changeScrollTop", scrollTop); }; this.getScrollTop = function() { return this.$scrollTop; }; this.$scrollLeft = 0; this.setScrollLeft = function(scrollLeft) { if (this.$scrollLeft === scrollLeft || isNaN(scrollLeft)) return; this.$scrollLeft = scrollLeft; this._signal("changeScrollLeft", scrollLeft); }; this.getScrollLeft = function() { return this.$scrollLeft; }; this.getScreenWidth = function() { this.$computeWidth(); if (this.lineWidgets) return Math.max(this.getLineWidgetMaxWidth(), this.screenWidth); return this.screenWidth; }; this.getLineWidgetMaxWidth = function() { if (this.lineWidgetsWidth != null) return this.lineWidgetsWidth; var width = 0; this.lineWidgets.forEach(function(w) { if (w && w.screenWidth > width) width = w.screenWidth; }); return this.lineWidgetWidth = width; }; this.$computeWidth = function(force) { if (this.$modified || force) { this.$modified = false; if (this.$useWrapMode) return this.screenWidth = this.$wrapLimit; var lines = this.doc.getAllLines(); var cache = this.$rowLengthCache; var longestScreenLine = 0; var foldIndex = 0; var foldLine = this.$foldData[foldIndex]; var foldStart = foldLine ? foldLine.start.row : Infinity; var len = lines.length; for (var i = 0; i < len; i++) { if (i > foldStart) { i = foldLine.end.row + 1; if (i >= len) break; foldLine = this.$foldData[foldIndex++]; foldStart = foldLine ? foldLine.start.row : Infinity; } if (cache[i] == null) cache[i] = this.$getStringScreenWidth(lines[i])[0]; if (cache[i] > longestScreenLine) longestScreenLine = cache[i]; } this.screenWidth = longestScreenLine; } }; this.getLine = function(row) { return this.doc.getLine(row); }; this.getLines = function(firstRow, lastRow) { return this.doc.getLines(firstRow, lastRow); }; this.getLength = function() { return this.doc.getLength(); }; this.getTextRange = function(range) { return this.doc.getTextRange(range || this.selection.getRange()); }; this.insert = function(position, text) { return this.doc.insert(position, text); }; this.remove = function(range) { return this.doc.remove(range); }; this.undoChanges = function(deltas, dontSelect) { if (!deltas.length) return; this.$fromUndo = true; var lastUndoRange = null; for (var i = deltas.length - 1; i != -1; i--) { var delta = deltas[i]; if (delta.group == "doc") { this.doc.revertDeltas(delta.deltas); lastUndoRange = this.$getUndoSelection(delta.deltas, true, lastUndoRange); } else { delta.deltas.forEach(function(foldDelta) { this.addFolds(foldDelta.folds); }, this); } } this.$fromUndo = false; lastUndoRange && this.$undoSelect && !dontSelect && this.selection.setSelectionRange(lastUndoRange); return lastUndoRange; }; this.redoChanges = function(deltas, dontSelect) { if (!deltas.length) return; this.$fromUndo = true; var lastUndoRange = null; for (var i = 0; i < deltas.length; i++) { var delta = deltas[i]; if (delta.group == "doc") { this.doc.applyDeltas(delta.deltas); lastUndoRange = this.$getUndoSelection(delta.deltas, false, lastUndoRange); } } this.$fromUndo = false; lastUndoRange && this.$undoSelect && !dontSelect && this.selection.setSelectionRange(lastUndoRange); return lastUndoRange; }; this.setUndoSelect = function(enable) { this.$undoSelect = enable; }; this.$getUndoSelection = function(deltas, isUndo, lastUndoRange) { function isInsert(delta) { var insert = delta.action === "insertText" || delta.action === "insertLines"; return isUndo ? !insert : insert; } var delta = deltas[0]; var range, point; var lastDeltaIsInsert = false; if (isInsert(delta)) { range = Range.fromPoints(delta.range.start, delta.range.end); lastDeltaIsInsert = true; } else { range = Range.fromPoints(delta.range.start, delta.range.start); lastDeltaIsInsert = false; } for (var i = 1; i < deltas.length; i++) { delta = deltas[i]; if (isInsert(delta)) { point = delta.range.start; if (range.compare(point.row, point.column) == -1) { range.setStart(delta.range.start); } point = delta.range.end; if (range.compare(point.row, point.column) == 1) { range.setEnd(delta.range.end); } lastDeltaIsInsert = true; } else { point = delta.range.start; if (range.compare(point.row, point.column) == -1) { range = Range.fromPoints(delta.range.start, delta.range.start); } lastDeltaIsInsert = false; } } if (lastUndoRange != null) { if (Range.comparePoints(lastUndoRange.start, range.start) === 0) { lastUndoRange.start.column += range.end.column - range.start.column; lastUndoRange.end.column += range.end.column - range.start.column; } var cmp = lastUndoRange.compareRange(range); if (cmp == 1) { range.setStart(lastUndoRange.start); } else if (cmp == -1) { range.setEnd(lastUndoRange.end); } } return range; }; this.replace = function(range, text) { return this.doc.replace(range, text); }; this.moveText = function(fromRange, toPosition, copy) { var text = this.getTextRange(fromRange); var folds = this.getFoldsInRange(fromRange); var toRange = Range.fromPoints(toPosition, toPosition); if (!copy) { this.remove(fromRange); var rowDiff = fromRange.start.row - fromRange.end.row; var collDiff = rowDiff ? -fromRange.end.column : fromRange.start.column - fromRange.end.column; if (collDiff) { if (toRange.start.row == fromRange.end.row && toRange.start.column > fromRange.end.column) toRange.start.column += collDiff; if (toRange.end.row == fromRange.end.row && toRange.end.column > fromRange.end.column) toRange.end.column += collDiff; } if (rowDiff && toRange.start.row >= fromRange.end.row) { toRange.start.row += rowDiff; toRange.end.row += rowDiff; } } toRange.end = this.insert(toRange.start, text); if (folds.length) { var oldStart = fromRange.start; var newStart = toRange.start; var rowDiff = newStart.row - oldStart.row; var collDiff = newStart.column - oldStart.column; this.addFolds(folds.map(function(x) { x = x.clone(); if (x.start.row == oldStart.row) x.start.column += collDiff; if (x.end.row == oldStart.row) x.end.column += collDiff; x.start.row += rowDiff; x.end.row += rowDiff; return x; })); } return toRange; }; this.indentRows = function(startRow, endRow, indentString) { indentString = indentString.replace(/\t/g, this.getTabString()); for (var row=startRow; row<=endRow; row++) this.insert({row: row, column:0}, indentString); }; this.outdentRows = function (range) { var rowRange = range.collapseRows(); var deleteRange = new Range(0, 0, 0, 0); var size = this.getTabSize(); for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) { var line = this.getLine(i); deleteRange.start.row = i; deleteRange.end.row = i; for (var j = 0; j < size; ++j) if (line.charAt(j) != ' ') break; if (j < size && line.charAt(j) == '\t') { deleteRange.start.column = j; deleteRange.end.column = j + 1; } else { deleteRange.start.column = 0; deleteRange.end.column = j; } this.remove(deleteRange); } }; this.$moveLines = function(firstRow, lastRow, dir) { firstRow = this.getRowFoldStart(firstRow); lastRow = this.getRowFoldEnd(lastRow); if (dir < 0) { var row = this.getRowFoldStart(firstRow + dir); if (row < 0) return 0; var diff = row-firstRow; } else if (dir > 0) { var row = this.getRowFoldEnd(lastRow + dir); if (row > this.doc.getLength()-1) return 0; var diff = row-lastRow; } else { firstRow = this.$clipRowToDocument(firstRow); lastRow = this.$clipRowToDocument(lastRow); var diff = lastRow - firstRow + 1; } var range = new Range(firstRow, 0, lastRow, Number.MAX_VALUE); var folds = this.getFoldsInRange(range).map(function(x){ x = x.clone(); x.start.row += diff; x.end.row += diff; return x; }); var lines = dir == 0 ? this.doc.getLines(firstRow, lastRow) : this.doc.removeLines(firstRow, lastRow); this.doc.insertLines(firstRow+diff, lines); folds.length && this.addFolds(folds); return diff; }; this.moveLinesUp = function(firstRow, lastRow) { return this.$moveLines(firstRow, lastRow, -1); }; this.moveLinesDown = function(firstRow, lastRow) { return this.$moveLines(firstRow, lastRow, 1); }; this.duplicateLines = function(firstRow, lastRow) { return this.$moveLines(firstRow, lastRow, 0); }; this.$clipRowToDocument = function(row) { return Math.max(0, Math.min(row, this.doc.getLength()-1)); }; this.$clipColumnToRow = function(row, column) { if (column < 0) return 0; return Math.min(this.doc.getLine(row).length, column); }; this.$clipPositionToDocument = function(row, column) { column = Math.max(0, column); if (row < 0) { row = 0; column = 0; } else { var len = this.doc.getLength(); if (row >= len) { row = len - 1; column = this.doc.getLine(len-1).length; } else { column = Math.min(this.doc.getLine(row).length, column); } } return { row: row, column: column }; }; this.$clipRangeToDocument = function(range) { if (range.start.row < 0) { range.start.row = 0; range.start.column = 0; } else { range.start.column = this.$clipColumnToRow( range.start.row, range.start.column ); } var len = this.doc.getLength() - 1; if (range.end.row > len) { range.end.row = len; range.end.column = this.doc.getLine(len).length; } else { range.end.column = this.$clipColumnToRow( range.end.row, range.end.column ); } return range; }; this.$wrapLimit = 80; this.$useWrapMode = false; this.$wrapLimitRange = { min : null, max : null }; this.setUseWrapMode = function(useWrapMode) { if (useWrapMode != this.$useWrapMode) { this.$useWrapMode = useWrapMode; this.$modified = true; this.$resetRowCache(0); if (useWrapMode) { var len = this.getLength(); this.$wrapData = Array(len); this.$updateWrapData(0, len - 1); } this._signal("changeWrapMode"); } }; this.getUseWrapMode = function() { return this.$useWrapMode; }; this.setWrapLimitRange = function(min, max) { if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) { this.$wrapLimitRange = { min: min, max: max }; this.$modified = true; if (this.$useWrapMode) this._signal("changeWrapMode"); } }; this.adjustWrapLimit = function(desiredLimit, $printMargin) { var limits = this.$wrapLimitRange; if (limits.max < 0) limits = {min: $printMargin, max: $printMargin}; var wrapLimit = this.$constrainWrapLimit(desiredLimit, limits.min, limits.max); if (wrapLimit != this.$wrapLimit && wrapLimit > 1) { this.$wrapLimit = wrapLimit; this.$modified = true; if (this.$useWrapMode) { this.$updateWrapData(0, this.getLength() - 1); this.$resetRowCache(0); this._signal("changeWrapLimit"); } return true; } return false; }; this.$constrainWrapLimit = function(wrapLimit, min, max) { if (min) wrapLimit = Math.max(min, wrapLimit); if (max) wrapLimit = Math.min(max, wrapLimit); return wrapLimit; }; this.getWrapLimit = function() { return this.$wrapLimit; }; this.setWrapLimit = function (limit) { this.setWrapLimitRange(limit, limit); }; this.getWrapLimitRange = function() { return { min : this.$wrapLimitRange.min, max : this.$wrapLimitRange.max }; }; this.$updateInternalDataOnChange = function(e) { var useWrapMode = this.$useWrapMode; var len; var action = e.data.action; var firstRow = e.data.range.start.row; var lastRow = e.data.range.end.row; var start = e.data.range.start; var end = e.data.range.end; var removedFolds = null; if (action.indexOf("Lines") != -1) { if (action == "insertLines") { lastRow = firstRow + (e.data.lines.length); } else { lastRow = firstRow; } len = e.data.lines ? e.data.lines.length : lastRow - firstRow; } else { len = lastRow - firstRow; } this.$updating = true; if (len != 0) { if (action.indexOf("remove") != -1) { this[useWrapMode ? "$wrapData" : "$rowLengthCache"].splice(firstRow, len); var foldLines = this.$foldData; removedFolds = this.getFoldsInRange(e.data.range); this.removeFolds(removedFolds); var foldLine = this.getFoldLine(end.row); var idx = 0; if (foldLine) { foldLine.addRemoveChars(end.row, end.column, start.column - end.column); foldLine.shiftRow(-len); var foldLineBefore = this.getFoldLine(firstRow); if (foldLineBefore && foldLineBefore !== foldLine) { foldLineBefore.merge(foldLine); foldLine = foldLineBefore; } idx = foldLines.indexOf(foldLine) + 1; } for (idx; idx < foldLines.length; idx++) { var foldLine = foldLines[idx]; if (foldLine.start.row >= end.row) { foldLine.shiftRow(-len); } } lastRow = firstRow; } else { var args = Array(len); args.unshift(firstRow, 0); var arr = useWrapMode ? this.$wrapData : this.$rowLengthCache arr.splice.apply(arr, args); var foldLines = this.$foldData; var foldLine = this.getFoldLine(firstRow); var idx = 0; if (foldLine) { var cmp = foldLine.range.compareInside(start.row, start.column); if (cmp == 0) { foldLine = foldLine.split(start.row, start.column); if (foldLine) { foldLine.shiftRow(len); foldLine.addRemoveChars(lastRow, 0, end.column - start.column); } } else if (cmp == -1) { foldLine.addRemoveChars(firstRow, 0, end.column - start.column); foldLine.shiftRow(len); } idx = foldLines.indexOf(foldLine) + 1; } for (idx; idx < foldLines.length; idx++) { var foldLine = foldLines[idx]; if (foldLine.start.row >= firstRow) { foldLine.shiftRow(len); } } } } else { len = Math.abs(e.data.range.start.column - e.data.range.end.column); if (action.indexOf("remove") != -1) { removedFolds = this.getFoldsInRange(e.data.range); this.removeFolds(removedFolds); len = -len; } var foldLine = this.getFoldLine(firstRow); if (foldLine) { foldLine.addRemoveChars(firstRow, start.column, len); } } if (useWrapMode && this.$wrapData.length != this.doc.getLength()) { console.error("doc.getLength() and $wrapData.length have to be the same!"); } this.$updating = false; if (useWrapMode) this.$updateWrapData(firstRow, lastRow); else this.$updateRowLengthCache(firstRow, lastRow); return removedFolds; }; this.$updateRowLengthCache = function(firstRow, lastRow, b) { this.$rowLengthCache[firstRow] = null; this.$rowLengthCache[lastRow] = null; }; this.$updateWrapData = function(firstRow, lastRow) { var lines = this.doc.getAllLines(); var tabSize = this.getTabSize(); var wrapData = this.$wrapData; var wrapLimit = this.$wrapLimit; var tokens; var foldLine; var row = firstRow; lastRow = Math.min(lastRow, lines.length - 1); while (row <= lastRow) { foldLine = this.getFoldLine(row, foldLine); if (!foldLine) { tokens = this.$getDisplayTokens(lines[row]); wrapData[row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize); row ++; } else { tokens = []; foldLine.walk(function(placeholder, row, column, lastColumn) { var walkTokens; if (placeholder != null) { walkTokens = this.$getDisplayTokens( placeholder, tokens.length); walkTokens[0] = PLACEHOLDER_START; for (var i = 1; i < walkTokens.length; i++) { walkTokens[i] = PLACEHOLDER_BODY; } } else { walkTokens = this.$getDisplayTokens( lines[row].substring(lastColumn, column), tokens.length); } tokens = tokens.concat(walkTokens); }.bind(this), foldLine.end.row, lines[foldLine.end.row].length + 1 ); wrapData[foldLine.start.row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize); row = foldLine.end.row + 1; } } }; var CHAR = 1, CHAR_EXT = 2, PLACEHOLDER_START = 3, PLACEHOLDER_BODY = 4, PUNCTUATION = 9, SPACE = 10, TAB = 11, TAB_SPACE = 12; this.$computeWrapSplits = function(tokens, wrapLimit) { if (tokens.length == 0) { return []; } var splits = []; var displayLength = tokens.length; var lastSplit = 0, lastDocSplit = 0; var isCode = this.$wrapAsCode; function addSplit(screenPos) { var displayed = tokens.slice(lastSplit, screenPos); var len = displayed.length; displayed.join(""). replace(/12/g, function() { len -= 1; }). replace(/2/g, function() { len -= 1; }); lastDocSplit += len; splits.push(lastDocSplit); lastSplit = screenPos; } while (displayLength - lastSplit > wrapLimit) { var split = lastSplit + wrapLimit; if (tokens[split - 1] >= SPACE && tokens[split] >= SPACE) { addSplit(split); continue; } if (tokens[split] == PLACEHOLDER_START || tokens[split] == PLACEHOLDER_BODY) { for (split; split != lastSplit - 1; split--) { if (tokens[split] == PLACEHOLDER_START) { break; } } if (split > lastSplit) { addSplit(split); continue; } split = lastSplit + wrapLimit; for (split; split < tokens.length; split++) { if (tokens[split] != PLACEHOLDER_BODY) { break; } } if (split == tokens.length) { break; // Breaks the while-loop. } addSplit(split); continue; } var minSplit = Math.max(split - (isCode ? 10 : wrapLimit-(wrapLimit>>2)), lastSplit - 1); while (split > minSplit && tokens[split] < PLACEHOLDER_START) { split --; } if (isCode) { while (split > minSplit && tokens[split] < PLACEHOLDER_START) { split --; } while (split > minSplit && tokens[split] == PUNCTUATION) { split --; } } else { while (split > minSplit && tokens[split] < SPACE) { split --; } } if (split > minSplit) { addSplit(++split); continue; } split = lastSplit + wrapLimit; if (tokens[split] == CHAR_EXT) split--; addSplit(split); } return splits; }; this.$getDisplayTokens = function(str, offset) { var arr = []; var tabSize; offset = offset || 0; for (var i = 0; i < str.length; i++) { var c = str.charCodeAt(i); if (c == 9) { tabSize = this.getScreenTabSize(arr.length + offset); arr.push(TAB); for (var n = 1; n < tabSize; n++) { arr.push(TAB_SPACE); } } else if (c == 32) { arr.push(SPACE); } else if((c > 39 && c < 48) || (c > 57 && c < 64)) { arr.push(PUNCTUATION); } else if (c >= 0x1100 && isFullWidth(c)) { arr.push(CHAR, CHAR_EXT); } else { arr.push(CHAR); } } return arr; }; this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) { if (maxScreenColumn == 0) return [0, 0]; if (maxScreenColumn == null) maxScreenColumn = Infinity; screenColumn = screenColumn || 0; var c, column; for (column = 0; column < str.length; column++) { c = str.charCodeAt(column); if (c == 9) { screenColumn += this.getScreenTabSize(screenColumn); } else if (c >= 0x1100 && isFullWidth(c)) { screenColumn += 2; } else { screenColumn += 1; } if (screenColumn > maxScreenColumn) { break; } } return [screenColumn, column]; }; this.lineWidgets = null; this.getRowLength = function(row) { if (this.lineWidgets) var h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0; else h = 0 if (!this.$useWrapMode || !this.$wrapData[row]) { return 1 + h; } else { return this.$wrapData[row].length + 1 + h; } }; this.getRowLineCount = function(row) { if (!this.$useWrapMode || !this.$wrapData[row]) { return 1; } else { return this.$wrapData[row].length + 1; } }; this.getScreenLastRowColumn = function(screenRow) { var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE); return this.documentToScreenColumn(pos.row, pos.column); }; this.getDocumentLastRowColumn = function(docRow, docColumn) { var screenRow = this.documentToScreenRow(docRow, docColumn); return this.getScreenLastRowColumn(screenRow); }; this.getDocumentLastRowColumnPosition = function(docRow, docColumn) { var screenRow = this.documentToScreenRow(docRow, docColumn); return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10); }; this.getRowSplitData = function(row) { if (!this.$useWrapMode) { return undefined; } else { return this.$wrapData[row]; } }; this.getScreenTabSize = function(screenColumn) { return this.$tabSize - screenColumn % this.$tabSize; }; this.screenToDocumentRow = function(screenRow, screenColumn) { return this.screenToDocumentPosition(screenRow, screenColumn).row; }; this.screenToDocumentColumn = function(screenRow, screenColumn) { return this.screenToDocumentPosition(screenRow, screenColumn).column; }; this.screenToDocumentPosition = function(screenRow, screenColumn) { if (screenRow < 0) return {row: 0, column: 0}; var line; var docRow = 0; var docColumn = 0; var column; var row = 0; var rowLength = 0; var rowCache = this.$screenRowCache; var i = this.$getRowCacheIndex(rowCache, screenRow); var l = rowCache.length; if (l && i >= 0) { var row = rowCache[i]; var docRow = this.$docRowCache[i]; var doCache = screenRow > rowCache[l - 1]; } else { var doCache = !l; } var maxRow = this.getLength() - 1; var foldLine = this.getNextFoldLine(docRow); var foldStart = foldLine ? foldLine.start.row : Infinity; while (row <= screenRow) { rowLength = this.getRowLength(docRow); if (row + rowLength > screenRow || docRow >= maxRow) { break; } else { row += rowLength; docRow++; if (docRow > foldStart) { docRow = foldLine.end.row+1; foldLine = this.getNextFoldLine(docRow, foldLine); foldStart = foldLine ? foldLine.start.row : Infinity; } } if (doCache) { this.$docRowCache.push(docRow); this.$screenRowCache.push(row); } } if (foldLine && foldLine.start.row <= docRow) { line = this.getFoldDisplayLine(foldLine); docRow = foldLine.start.row; } else if (row + rowLength <= screenRow || docRow > maxRow) { return { row: maxRow, column: this.getLine(maxRow).length }; } else { line = this.getLine(docRow); foldLine = null; } if (this.$useWrapMode) { var splits = this.$wrapData[docRow]; if (splits) { var splitIndex = Math.floor(screenRow - row); column = splits[splitIndex]; if(splitIndex > 0 && splits.length) { docColumn = splits[splitIndex - 1] || splits[splits.length - 1]; line = line.substring(docColumn); } } } docColumn += this.$getStringScreenWidth(line, screenColumn)[1]; if (this.$useWrapMode && docColumn >= column) docColumn = column - 1; if (foldLine) return foldLine.idxToPosition(docColumn); return {row: docRow, column: docColumn}; }; this.documentToScreenPosition = function(docRow, docColumn) { if (typeof docColumn === "undefined") var pos = this.$clipPositionToDocument(docRow.row, docRow.column); else pos = this.$clipPositionToDocument(docRow, docColumn); docRow = pos.row; docColumn = pos.column; var screenRow = 0; var foldStartRow = null; var fold = null; fold = this.getFoldAt(docRow, docColumn, 1); if (fold) { docRow = fold.start.row; docColumn = fold.start.column; } var rowEnd, row = 0; var rowCache = this.$docRowCache; var i = this.$getRowCacheIndex(rowCache, docRow); var l = rowCache.length; if (l && i >= 0) { var row = rowCache[i]; var screenRow = this.$screenRowCache[i]; var doCache = docRow > rowCache[l - 1]; } else { var doCache = !l; } var foldLine = this.getNextFoldLine(row); var foldStart = foldLine ?foldLine.start.row :Infinity; while (row < docRow) { if (row >= foldStart) { rowEnd = foldLine.end.row + 1; if (rowEnd > docRow) break; foldLine = this.getNextFoldLine(rowEnd, foldLine); foldStart = foldLine ?foldLine.start.row :Infinity; } else { rowEnd = row + 1; } screenRow += this.getRowLength(row); row = rowEnd; if (doCache) { this.$docRowCache.push(row); this.$screenRowCache.push(screenRow); } } var textLine = ""; if (foldLine && row >= foldStart) { textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn); foldStartRow = foldLine.start.row; } else { textLine = this.getLine(docRow).substring(0, docColumn); foldStartRow = docRow; } if (this.$useWrapMode) { var wrapRow = this.$wrapData[foldStartRow]; if (wrapRow) { var screenRowOffset = 0; while (textLine.length >= wrapRow[screenRowOffset]) { screenRow ++; screenRowOffset++; } textLine = textLine.substring( wrapRow[screenRowOffset - 1] || 0, textLine.length ); } } return { row: screenRow, column: this.$getStringScreenWidth(textLine)[0] }; }; this.documentToScreenColumn = function(row, docColumn) { return this.documentToScreenPosition(row, docColumn).column; }; this.documentToScreenRow = function(docRow, docColumn) { return this.documentToScreenPosition(docRow, docColumn).row; }; this.getScreenLength = function() { var screenRows = 0; var fold = null; if (!this.$useWrapMode) { screenRows = this.getLength(); var foldData = this.$foldData; for (var i = 0; i < foldData.length; i++) { fold = foldData[i]; screenRows -= fold.end.row - fold.start.row; } } else { var lastRow = this.$wrapData.length; var row = 0, i = 0; var fold = this.$foldData[i++]; var foldStart = fold ? fold.start.row :Infinity; while (row < lastRow) { var splits = this.$wrapData[row]; screenRows += splits ? splits.length + 1 : 1; row ++; if (row > foldStart) { row = fold.end.row+1; fold = this.$foldData[i++]; foldStart = fold ?fold.start.row :Infinity; } } } if (this.lineWidgets) screenRows += this.$getWidgetScreenLength(); return screenRows; }; this.$setFontMetrics = function(fm) { }; this.destroy = function() { if (this.bgTokenizer) { this.bgTokenizer.setDocument(null); this.bgTokenizer = null; } this.$stopWorker(); }; function isFullWidth(c) { if (c < 0x1100) return false; return c >= 0x1100 && c <= 0x115F || c >= 0x11A3 && c <= 0x11A7 || c >= 0x11FA && c <= 0x11FF || c >= 0x2329 && c <= 0x232A || c >= 0x2E80 && c <= 0x2E99 || c >= 0x2E9B && c <= 0x2EF3 || c >= 0x2F00 && c <= 0x2FD5 || c >= 0x2FF0 && c <= 0x2FFB || c >= 0x3000 && c <= 0x303E || c >= 0x3041 && c <= 0x3096 || c >= 0x3099 && c <= 0x30FF || c >= 0x3105 && c <= 0x312D || c >= 0x3131 && c <= 0x318E || c >= 0x3190 && c <= 0x31BA || c >= 0x31C0 && c <= 0x31E3 || c >= 0x31F0 && c <= 0x321E || c >= 0x3220 && c <= 0x3247 || c >= 0x3250 && c <= 0x32FE || c >= 0x3300 && c <= 0x4DBF || c >= 0x4E00 && c <= 0xA48C || c >= 0xA490 && c <= 0xA4C6 || c >= 0xA960 && c <= 0xA97C || c >= 0xAC00 && c <= 0xD7A3 || c >= 0xD7B0 && c <= 0xD7C6 || c >= 0xD7CB && c <= 0xD7FB || c >= 0xF900 && c <= 0xFAFF || c >= 0xFE10 && c <= 0xFE19 || c >= 0xFE30 && c <= 0xFE52 || c >= 0xFE54 && c <= 0xFE66 || c >= 0xFE68 && c <= 0xFE6B || c >= 0xFF01 && c <= 0xFF60 || c >= 0xFFE0 && c <= 0xFFE6; }; }).call(EditSession.prototype); require("./edit_session/folding").Folding.call(EditSession.prototype); require("./edit_session/bracket_match").BracketMatch.call(EditSession.prototype); config.defineOptions(EditSession.prototype, "session", { wrap: { set: function(value) { if (!value || value == "off") value = false; else if (value == "free") value = true; else if (value == "printMargin") value = -1; else if (typeof value == "string") value = parseInt(value, 10) || false; if (this.$wrap == value) return; this.$wrap = value; if (!value) { this.setUseWrapMode(false); } else { var col = typeof value == "number" ? value : null; this.setWrapLimitRange(col, col); this.setUseWrapMode(true); } }, get: function() { if (this.getUseWrapMode()) { if (this.$wrap == -1) return "printMargin"; if (!this.getWrapLimitRange().min) return "free"; return this.$wrap; } return "off"; }, handlesSet: true }, wrapMethod: { set: function(val) { val = val == "auto" ? this.$mode.type != "text" : val != "text"; if (val != this.$wrapAsCode) { this.$wrapAsCode = val; if (this.$useWrapMode) { this.$modified = true; this.$resetRowCache(0); this.$updateWrapData(0, this.getLength() - 1); } } }, initialValue: "auto" }, firstLineNumber: { set: function() {this._signal("changeBreakpoint");}, initialValue: 1 }, useWorker: { set: function(useWorker) { this.$useWorker = useWorker; this.$stopWorker(); if (useWorker) this.$startWorker(); }, initialValue: true }, useSoftTabs: {initialValue: true}, tabSize: { set: function(tabSize) { if (isNaN(tabSize) || this.$tabSize === tabSize) return; this.$modified = true; this.$rowLengthCache = []; this.$tabSize = tabSize; this._signal("changeTabSize"); }, initialValue: 4, handlesSet: true }, overwrite: { set: function(val) {this._signal("changeOverwrite");}, initialValue: false }, newLineMode: { set: function(val) {this.doc.setNewLineMode(val)}, get: function() {return this.doc.getNewLineMode()}, handlesSet: true }, mode: { set: function(val) { this.setMode(val) }, get: function() { return this.$modeId } } }); exports.EditSession = EditSession; }); define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"], function(require, exports, module) { "use strict"; var lang = require("./lib/lang"); var oop = require("./lib/oop"); var Range = require("./range").Range; var Search = function() { this.$options = {}; }; (function() { this.set = function(options) { oop.mixin(this.$options, options); return this; }; this.getOptions = function() { return lang.copyObject(this.$options); }; this.setOptions = function(options) { this.$options = options; }; this.find = function(session) { var options = this.$options; var iterator = this.$matchIterator(session, options); if (!iterator) return false; var firstRange = null; iterator.forEach(function(range, row, offset) { if (!range.start) { var column = range.offset + (offset || 0); firstRange = new Range(row, column, row, column + range.length); if (!range.length && options.start && options.start.start && options.skipCurrent != false && firstRange.isEqual(options.start) ) { firstRange = null; return false; } } else firstRange = range; return true; }); return firstRange; }; this.findAll = function(session) { var options = this.$options; if (!options.needle) return []; this.$assembleRegExp(options); var range = options.range; var lines = range ? session.getLines(range.start.row, range.end.row) : session.doc.getAllLines(); var ranges = []; var re = options.re; if (options.$isMultiLine) { var len = re.length; var maxRow = lines.length - len; var prevRange; outer: for (var row = re.offset || 0; row <= maxRow; row++) { for (var j = 0; j < len; j++) if (lines[row + j].search(re[j]) == -1) continue outer; var startLine = lines[row]; var line = lines[row + len - 1]; var startIndex = startLine.length - startLine.match(re[0])[0].length; var endIndex = line.match(re[len - 1])[0].length; if (prevRange && prevRange.end.row === row && prevRange.end.column > startIndex ) { continue; } ranges.push(prevRange = new Range( row, startIndex, row + len - 1, endIndex )); if (len > 2) row = row + len - 2; } } else { for (var i = 0; i < lines.length; i++) { var matches = lang.getMatchOffsets(lines[i], re); for (var j = 0; j < matches.length; j++) { var match = matches[j]; ranges.push(new Range(i, match.offset, i, match.offset + match.length)); } } } if (range) { var startColumn = range.start.column; var endColumn = range.start.column; var i = 0, j = ranges.length - 1; while (i < j && ranges[i].start.column < startColumn && ranges[i].start.row == range.start.row) i++; while (i < j && ranges[j].end.column > endColumn && ranges[j].end.row == range.end.row) j--; ranges = ranges.slice(i, j + 1); for (i = 0, j = ranges.length; i < j; i++) { ranges[i].start.row += range.start.row; ranges[i].end.row += range.start.row; } } return ranges; }; this.replace = function(input, replacement) { var options = this.$options; var re = this.$assembleRegExp(options); if (options.$isMultiLine) return replacement; if (!re) return; var match = re.exec(input); if (!match || match[0].length != input.length) return null; replacement = input.replace(re, replacement); if (options.preserveCase) { replacement = replacement.split(""); for (var i = Math.min(input.length, input.length); i--; ) { var ch = input[i]; if (ch && ch.toLowerCase() != ch) replacement[i] = replacement[i].toUpperCase(); else replacement[i] = replacement[i].toLowerCase(); } replacement = replacement.join(""); } return replacement; }; this.$matchIterator = function(session, options) { var re = this.$assembleRegExp(options); if (!re) return false; var callback; if (options.$isMultiLine) { var len = re.length; var matchIterator = function(line, row, offset) { var startIndex = line.search(re[0]); if (startIndex == -1) return; for (var i = 1; i < len; i++) { line = session.getLine(row + i); if (line.search(re[i]) == -1) return; } var endIndex = line.match(re[len - 1])[0].length; var range = new Range(row, startIndex, row + len - 1, endIndex); if (re.offset == 1) { range.start.row--; range.start.column = Number.MAX_VALUE; } else if (offset) range.start.column += offset; if (callback(range)) return true; }; } else if (options.backwards) { var matchIterator = function(line, row, startIndex) { var matches = lang.getMatchOffsets(line, re); for (var i = matches.length-1; i >= 0; i--) if (callback(matches[i], row, startIndex)) return true; }; } else { var matchIterator = function(line, row, startIndex) { var matches = lang.getMatchOffsets(line, re); for (var i = 0; i < matches.length; i++) if (callback(matches[i], row, startIndex)) return true; }; } var lineIterator = this.$lineIterator(session, options); return { forEach: function(_callback) { callback = _callback; lineIterator.forEach(matchIterator); } }; }; this.$assembleRegExp = function(options, $disableFakeMultiline) { if (options.needle instanceof RegExp) return options.re = options.needle; var needle = options.needle; if (!options.needle) return options.re = false; if (!options.regExp) needle = lang.escapeRegExp(needle); if (options.wholeWord) needle = "\\b" + needle + "\\b"; var modifier = options.caseSensitive ? "gm" : "gmi"; options.$isMultiLine = !$disableFakeMultiline && /[\n\r]/.test(needle); if (options.$isMultiLine) return options.re = this.$assembleMultilineRegExp(needle, modifier); try { var re = new RegExp(needle, modifier); } catch(e) { re = false; } return options.re = re; }; this.$assembleMultilineRegExp = function(needle, modifier) { var parts = needle.replace(/\r\n|\r|\n/g, "$\n^").split("\n"); var re = []; for (var i = 0; i < parts.length; i++) try { re.push(new RegExp(parts[i], modifier)); } catch(e) { return false; } if (parts[0] == "") { re.shift(); re.offset = 1; } else { re.offset = 0; } return re; }; this.$lineIterator = function(session, options) { var backwards = options.backwards == true; var skipCurrent = options.skipCurrent != false; var range = options.range; var start = options.start; if (!start) start = range ? range[backwards ? "end" : "start"] : session.selection.getRange(); if (start.start) start = start[skipCurrent != backwards ? "end" : "start"]; var firstRow = range ? range.start.row : 0; var lastRow = range ? range.end.row : session.getLength() - 1; var forEach = backwards ? function(callback) { var row = start.row; var line = session.getLine(row).substring(0, start.column); if (callback(line, row)) return; for (row--; row >= firstRow; row--) if (callback(session.getLine(row), row)) return; if (options.wrap == false) return; for (row = lastRow, firstRow = start.row; row >= firstRow; row--) if (callback(session.getLine(row), row)) return; } : function(callback) { var row = start.row; var line = session.getLine(row).substr(start.column); if (callback(line, row, start.column)) return; for (row = row+1; row <= lastRow; row++) if (callback(session.getLine(row), row)) return; if (options.wrap == false) return; for (row = firstRow, lastRow = start.row; row <= lastRow; row++) if (callback(session.getLine(row), row)) return; }; return {forEach: forEach}; }; }).call(Search.prototype); exports.Search = Search; }); define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(require, exports, module) { "use strict"; var keyUtil = require("../lib/keys"); var useragent = require("../lib/useragent"); var KEY_MODS = keyUtil.KEY_MODS; function HashHandler(config, platform) { this.platform = platform || (useragent.isMac ? "mac" : "win"); this.commands = {}; this.commandKeyBinding = {}; this.addCommands(config); this.$singleCommand = true; } function MultiHashHandler(config, platform) { HashHandler.call(this, config, platform); this.$singleCommand = false; } MultiHashHandler.prototype = HashHandler.prototype; (function() { this.addCommand = function(command) { if (this.commands[command.name]) this.removeCommand(command); this.commands[command.name] = command; if (command.bindKey) this._buildKeyHash(command); }; this.removeCommand = function(command, keepCommand) { var name = command && (typeof command === 'string' ? command : command.name); command = this.commands[name]; if (!keepCommand) delete this.commands[name]; var ckb = this.commandKeyBinding; for (var keyId in ckb) { var cmdGroup = ckb[keyId]; if (cmdGroup == command) { delete ckb[keyId]; } else if (Array.isArray(cmdGroup)) { var i = cmdGroup.indexOf(command); if (i != -1) { cmdGroup.splice(i, 1); if (cmdGroup.length == 1) ckb[keyId] = cmdGroup[0]; } } } }; this.bindKey = function(key, command, asDefault) { if (typeof key == "object") key = key[this.platform]; if (!key) return; if (typeof command == "function") return this.addCommand({exec: command, bindKey: key, name: command.name || key}); key.split("|").forEach(function(keyPart) { var chain = ""; if (keyPart.indexOf(" ") != -1) { var parts = keyPart.split(/\s+/); keyPart = parts.pop(); parts.forEach(function(keyPart) { var binding = this.parseKeys(keyPart); var id = KEY_MODS[binding.hashId] + binding.key; chain += (chain ? " " : "") + id; this._addCommandToBinding(chain, "chainKeys"); }, this); chain += " "; } var binding = this.parseKeys(keyPart); var id = KEY_MODS[binding.hashId] + binding.key; this._addCommandToBinding(chain + id, command, asDefault); }, this); }; this._addCommandToBinding = function(keyId, command, asDefault) { var ckb = this.commandKeyBinding, i; if (!command) { delete ckb[keyId]; } else if (!ckb[keyId] || this.$singleCommand) { ckb[keyId] = command; } else { if (!Array.isArray(ckb[keyId])) { ckb[keyId] = [ckb[keyId]]; } else if ((i = ckb[keyId].indexOf(command)) != -1) { ckb[keyId].splice(i, 1); } if (asDefault || command.isDefault) ckb[keyId].unshift(command); else ckb[keyId].push(command); } }; this.addCommands = function(commands) { commands && Object.keys(commands).forEach(function(name) { var command = commands[name]; if (!command) return; if (typeof command === "string") return this.bindKey(command, name); if (typeof command === "function") command = { exec: command }; if (typeof command !== "object") return; if (!command.name) command.name = name; this.addCommand(command); }, this); }; this.removeCommands = function(commands) { Object.keys(commands).forEach(function(name) { this.removeCommand(commands[name]); }, this); }; this.bindKeys = function(keyList) { Object.keys(keyList).forEach(function(key) { this.bindKey(key, keyList[key]); }, this); }; this._buildKeyHash = function(command) { this.bindKey(command.bindKey, command); }; this.parseKeys = function(keys) { var parts = keys.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(x){return x}); var key = parts.pop(); var keyCode = keyUtil[key]; if (keyUtil.FUNCTION_KEYS[keyCode]) key = keyUtil.FUNCTION_KEYS[keyCode].toLowerCase(); else if (!parts.length) return {key: key, hashId: -1}; else if (parts.length == 1 && parts[0] == "shift") return {key: key.toUpperCase(), hashId: -1}; var hashId = 0; for (var i = parts.length; i--;) { var modifier = keyUtil.KEY_MODS[parts[i]]; if (modifier == null) { if (typeof console != "undefined") console.error("invalid modifier " + parts[i] + " in " + keys); return false; } hashId |= modifier; } return {key: key, hashId: hashId}; }; this.findKeyCommand = function findKeyCommand(hashId, keyString) { var key = KEY_MODS[hashId] + keyString; return this.commandKeyBinding[key]; }; this.handleKeyboard = function(data, hashId, keyString, keyCode) { var key = KEY_MODS[hashId] + keyString; var command = this.commandKeyBinding[key]; if (data.$keyChain) { data.$keyChain += " " + key; command = this.commandKeyBinding[data.$keyChain] || command; } if (command) { if (command == "chainKeys" || command[command.length - 1] == "chainKeys") { data.$keyChain = data.$keyChain || key; return {command: "null"}; } } if (data.$keyChain && keyCode > 0) data.$keyChain = ""; return {command: command}; }; }).call(HashHandler.prototype); exports.HashHandler = HashHandler; exports.MultiHashHandler = MultiHashHandler; }); define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var MultiHashHandler = require("../keyboard/hash_handler").MultiHashHandler; var EventEmitter = require("../lib/event_emitter").EventEmitter; var CommandManager = function(platform, commands) { MultiHashHandler.call(this, commands, platform); this.byName = this.commands; this.setDefaultHandler("exec", function(e) { return e.command.exec(e.editor, e.args || {}); }); }; oop.inherits(CommandManager, MultiHashHandler); (function() { oop.implement(this, EventEmitter); this.exec = function(command, editor, args) { if (Array.isArray(command)) { for (var i = command.length; i--; ) { if (this.exec(command[i], editor, args)) return true; } return false; } if (typeof command === "string") command = this.commands[command]; if (!command) return false; if (editor && editor.$readOnly && !command.readOnly) return false; var e = {editor: editor, command: command, args: args}; e.returnValue = this._emit("exec", e); this._signal("afterExec", e); return e.returnValue === false ? false : true; }; this.toggleRecording = function(editor) { if (this.$inReplay) return; editor && editor._emit("changeStatus"); if (this.recording) { this.macro.pop(); this.removeEventListener("exec", this.$addCommandToMacro); if (!this.macro.length) this.macro = this.oldMacro; return this.recording = false; } if (!this.$addCommandToMacro) { this.$addCommandToMacro = function(e) { this.macro.push([e.command, e.args]); }.bind(this); } this.oldMacro = this.macro; this.macro = []; this.on("exec", this.$addCommandToMacro); return this.recording = true; }; this.replay = function(editor) { if (this.$inReplay || !this.macro) return; if (this.recording) return this.toggleRecording(editor); try { this.$inReplay = true; this.macro.forEach(function(x) { if (typeof x == "string") this.exec(x, editor); else this.exec(x[0], editor, x[1]); }, this); } finally { this.$inReplay = false; } }; this.trimMacro = function(m) { return m.map(function(x){ if (typeof x[0] != "string") x[0] = x[0].name; if (!x[1]) x = x[0]; return x; }); }; }).call(CommandManager.prototype); exports.CommandManager = CommandManager; }); define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"], function(require, exports, module) { "use strict"; var lang = require("../lib/lang"); var config = require("../config"); var Range = require("../range").Range; function bindKey(win, mac) { return {win: win, mac: mac}; } exports.commands = [{ name: "showSettingsMenu", bindKey: bindKey("Ctrl-,", "Command-,"), exec: function(editor) { config.loadModule("ace/ext/settings_menu", function(module) { module.init(editor); editor.showSettingsMenu(); }); }, readOnly: true }, { name: "goToNextError", bindKey: bindKey("Alt-E", "Ctrl-E"), exec: function(editor) { config.loadModule("ace/ext/error_marker", function(module) { module.showErrorMarker(editor, 1); }); }, scrollIntoView: "animate", readOnly: true }, { name: "goToPreviousError", bindKey: bindKey("Alt-Shift-E", "Ctrl-Shift-E"), exec: function(editor) { config.loadModule("ace/ext/error_marker", function(module) { module.showErrorMarker(editor, -1); }); }, scrollIntoView: "animate", readOnly: true }, { name: "selectall", bindKey: bindKey("Ctrl-A", "Command-A"), exec: function(editor) { editor.selectAll(); }, readOnly: true }, { name: "centerselection", bindKey: bindKey(null, "Ctrl-L"), exec: function(editor) { editor.centerSelection(); }, readOnly: true }, { name: "gotoline", bindKey: bindKey("Ctrl-L", "Command-L"), exec: function(editor) { var line = parseInt(prompt("Enter line number:"), 10); if (!isNaN(line)) { editor.gotoLine(line); } }, readOnly: true }, { name: "fold", bindKey: bindKey("Alt-L|Ctrl-F1", "Command-Alt-L|Command-F1"), exec: function(editor) { editor.session.toggleFold(false); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "unfold", bindKey: bindKey("Alt-Shift-L|Ctrl-Shift-F1", "Command-Alt-Shift-L|Command-Shift-F1"), exec: function(editor) { editor.session.toggleFold(true); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "toggleFoldWidget", bindKey: bindKey("F2", "F2"), exec: function(editor) { editor.session.toggleFoldWidget(); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "toggleParentFoldWidget", bindKey: bindKey("Alt-F2", "Alt-F2"), exec: function(editor) { editor.session.toggleFoldWidget(true); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "foldall", bindKey: bindKey(null, "Ctrl-Command-Option-0"), exec: function(editor) { editor.session.foldAll(); }, scrollIntoView: "center", readOnly: true }, { name: "foldOther", bindKey: bindKey("Alt-0", "Command-Option-0"), exec: function(editor) { editor.session.foldAll(); editor.session.unfold(editor.selection.getAllRanges()); }, scrollIntoView: "center", readOnly: true }, { name: "unfoldall", bindKey: bindKey("Alt-Shift-0", "Command-Option-Shift-0"), exec: function(editor) { editor.session.unfold(); }, scrollIntoView: "center", readOnly: true }, { name: "findnext", bindKey: bindKey("Ctrl-K", "Command-G"), exec: function(editor) { editor.findNext(); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "findprevious", bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"), exec: function(editor) { editor.findPrevious(); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "selectOrFindNext", bindKey: bindKey("Alt-K", "Ctrl-G"), exec: function(editor) { if (editor.selection.isEmpty()) editor.selection.selectWord(); else editor.findNext(); }, readOnly: true }, { name: "selectOrFindPrevious", bindKey: bindKey("Alt-Shift-K", "Ctrl-Shift-G"), exec: function(editor) { if (editor.selection.isEmpty()) editor.selection.selectWord(); else editor.findPrevious(); }, readOnly: true }, { name: "find", bindKey: bindKey("Ctrl-F", "Command-F"), exec: function(editor) { config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor)}); }, readOnly: true }, { name: "overwrite", bindKey: "Insert", exec: function(editor) { editor.toggleOverwrite(); }, readOnly: true }, { name: "selecttostart", bindKey: bindKey("Ctrl-Shift-Home", "Command-Shift-Up"), exec: function(editor) { editor.getSelection().selectFileStart(); }, multiSelectAction: "forEach", readOnly: true, scrollIntoView: "animate", aceCommandGroup: "fileJump" }, { name: "gotostart", bindKey: bindKey("Ctrl-Home", "Command-Home|Command-Up"), exec: function(editor) { editor.navigateFileStart(); }, multiSelectAction: "forEach", readOnly: true, scrollIntoView: "animate", aceCommandGroup: "fileJump" }, { name: "selectup", bindKey: bindKey("Shift-Up", "Shift-Up"), exec: function(editor) { editor.getSelection().selectUp(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "golineup", bindKey: bindKey("Up", "Up|Ctrl-P"), exec: function(editor, args) { editor.navigateUp(args.times); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selecttoend", bindKey: bindKey("Ctrl-Shift-End", "Command-Shift-Down"), exec: function(editor) { editor.getSelection().selectFileEnd(); }, multiSelectAction: "forEach", readOnly: true, scrollIntoView: "animate", aceCommandGroup: "fileJump" }, { name: "gotoend", bindKey: bindKey("Ctrl-End", "Command-End|Command-Down"), exec: function(editor) { editor.navigateFileEnd(); }, multiSelectAction: "forEach", readOnly: true, scrollIntoView: "animate", aceCommandGroup: "fileJump" }, { name: "selectdown", bindKey: bindKey("Shift-Down", "Shift-Down"), exec: function(editor) { editor.getSelection().selectDown(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "golinedown", bindKey: bindKey("Down", "Down|Ctrl-N"), exec: function(editor, args) { editor.navigateDown(args.times); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectwordleft", bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"), exec: function(editor) { editor.getSelection().selectWordLeft(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotowordleft", bindKey: bindKey("Ctrl-Left", "Option-Left"), exec: function(editor) { editor.navigateWordLeft(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selecttolinestart", bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left"), exec: function(editor) { editor.getSelection().selectLineStart(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotolinestart", bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"), exec: function(editor) { editor.navigateLineStart(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectleft", bindKey: bindKey("Shift-Left", "Shift-Left"), exec: function(editor) { editor.getSelection().selectLeft(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotoleft", bindKey: bindKey("Left", "Left|Ctrl-B"), exec: function(editor, args) { editor.navigateLeft(args.times); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectwordright", bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"), exec: function(editor) { editor.getSelection().selectWordRight(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotowordright", bindKey: bindKey("Ctrl-Right", "Option-Right"), exec: function(editor) { editor.navigateWordRight(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selecttolineend", bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right"), exec: function(editor) { editor.getSelection().selectLineEnd(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotolineend", bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"), exec: function(editor) { editor.navigateLineEnd(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectright", bindKey: bindKey("Shift-Right", "Shift-Right"), exec: function(editor) { editor.getSelection().selectRight(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotoright", bindKey: bindKey("Right", "Right|Ctrl-F"), exec: function(editor, args) { editor.navigateRight(args.times); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectpagedown", bindKey: "Shift-PageDown", exec: function(editor) { editor.selectPageDown(); }, readOnly: true }, { name: "pagedown", bindKey: bindKey(null, "Option-PageDown"), exec: function(editor) { editor.scrollPageDown(); }, readOnly: true }, { name: "gotopagedown", bindKey: bindKey("PageDown", "PageDown|Ctrl-V"), exec: function(editor) { editor.gotoPageDown(); }, readOnly: true }, { name: "selectpageup", bindKey: "Shift-PageUp", exec: function(editor) { editor.selectPageUp(); }, readOnly: true }, { name: "pageup", bindKey: bindKey(null, "Option-PageUp"), exec: function(editor) { editor.scrollPageUp(); }, readOnly: true }, { name: "gotopageup", bindKey: "PageUp", exec: function(editor) { editor.gotoPageUp(); }, readOnly: true }, { name: "scrollup", bindKey: bindKey("Ctrl-Up", null), exec: function(e) { e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight); }, readOnly: true }, { name: "scrolldown", bindKey: bindKey("Ctrl-Down", null), exec: function(e) { e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight); }, readOnly: true }, { name: "selectlinestart", bindKey: "Shift-Home", exec: function(editor) { editor.getSelection().selectLineStart(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectlineend", bindKey: "Shift-End", exec: function(editor) { editor.getSelection().selectLineEnd(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "togglerecording", bindKey: bindKey("Ctrl-Alt-E", "Command-Option-E"), exec: function(editor) { editor.commands.toggleRecording(editor); }, readOnly: true }, { name: "replaymacro", bindKey: bindKey("Ctrl-Shift-E", "Command-Shift-E"), exec: function(editor) { editor.commands.replay(editor); }, readOnly: true }, { name: "jumptomatching", bindKey: bindKey("Ctrl-P", "Ctrl-P"), exec: function(editor) { editor.jumpToMatching(); }, multiSelectAction: "forEach", scrollIntoView: "animate", readOnly: true }, { name: "selecttomatching", bindKey: bindKey("Ctrl-Shift-P", "Ctrl-Shift-P"), exec: function(editor) { editor.jumpToMatching(true); }, multiSelectAction: "forEach", scrollIntoView: "animate", readOnly: true }, { name: "expandToMatching", bindKey: bindKey("Ctrl-Shift-M", "Ctrl-Shift-M"), exec: function(editor) { editor.jumpToMatching(true, true); }, multiSelectAction: "forEach", scrollIntoView: "animate", readOnly: true }, { name: "passKeysToBrowser", bindKey: bindKey(null, null), exec: function() {}, passEvent: true, readOnly: true }, { name: "cut", exec: function(editor) { var range = editor.getSelectionRange(); editor._emit("cut", range); if (!editor.selection.isEmpty()) { editor.session.remove(range); editor.clearSelection(); } }, scrollIntoView: "cursor", multiSelectAction: "forEach" }, { name: "removeline", bindKey: bindKey("Ctrl-D", "Command-D"), exec: function(editor) { editor.removeLines(); }, scrollIntoView: "cursor", multiSelectAction: "forEachLine" }, { name: "duplicateSelection", bindKey: bindKey("Ctrl-Shift-D", "Command-Shift-D"), exec: function(editor) { editor.duplicateSelection(); }, scrollIntoView: "cursor", multiSelectAction: "forEach" }, { name: "sortlines", bindKey: bindKey("Ctrl-Alt-S", "Command-Alt-S"), exec: function(editor) { editor.sortLines(); }, scrollIntoView: "selection", multiSelectAction: "forEachLine" }, { name: "togglecomment", bindKey: bindKey("Ctrl-/", "Command-/"), exec: function(editor) { editor.toggleCommentLines(); }, multiSelectAction: "forEachLine", scrollIntoView: "selectionPart" }, { name: "toggleBlockComment", bindKey: bindKey("Ctrl-Shift-/", "Command-Shift-/"), exec: function(editor) { editor.toggleBlockComment(); }, multiSelectAction: "forEach", scrollIntoView: "selectionPart" }, { name: "modifyNumberUp", bindKey: bindKey("Ctrl-Shift-Up", "Alt-Shift-Up"), exec: function(editor) { editor.modifyNumber(1); }, scrollIntoView: "cursor", multiSelectAction: "forEach" }, { name: "modifyNumberDown", bindKey: bindKey("Ctrl-Shift-Down", "Alt-Shift-Down"), exec: function(editor) { editor.modifyNumber(-1); }, scrollIntoView: "cursor", multiSelectAction: "forEach" }, { name: "replace", bindKey: bindKey("Ctrl-H", "Command-Option-F"), exec: function(editor) { config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor, true)}); } }, { name: "undo", bindKey: bindKey("Ctrl-Z", "Command-Z"), exec: function(editor) { editor.undo(); } }, { name: "redo", bindKey: bindKey("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"), exec: function(editor) { editor.redo(); } }, { name: "copylinesup", bindKey: bindKey("Alt-Shift-Up", "Command-Option-Up"), exec: function(editor) { editor.copyLinesUp(); }, scrollIntoView: "cursor" }, { name: "movelinesup", bindKey: bindKey("Alt-Up", "Option-Up"), exec: function(editor) { editor.moveLinesUp(); }, scrollIntoView: "cursor" }, { name: "copylinesdown", bindKey: bindKey("Alt-Shift-Down", "Command-Option-Down"), exec: function(editor) { editor.copyLinesDown(); }, scrollIntoView: "cursor" }, { name: "movelinesdown", bindKey: bindKey("Alt-Down", "Option-Down"), exec: function(editor) { editor.moveLinesDown(); }, scrollIntoView: "cursor" }, { name: "del", bindKey: bindKey("Delete", "Delete|Ctrl-D|Shift-Delete"), exec: function(editor) { editor.remove("right"); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "backspace", bindKey: bindKey( "Shift-Backspace|Backspace", "Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H" ), exec: function(editor) { editor.remove("left"); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "cut_or_delete", bindKey: bindKey("Shift-Delete", null), exec: function(editor) { if (editor.selection.isEmpty()) { editor.remove("left"); } else { return false; } }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "removetolinestart", bindKey: bindKey("Alt-Backspace", "Command-Backspace"), exec: function(editor) { editor.removeToLineStart(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "removetolineend", bindKey: bindKey("Alt-Delete", "Ctrl-K"), exec: function(editor) { editor.removeToLineEnd(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "removewordleft", bindKey: bindKey("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"), exec: function(editor) { editor.removeWordLeft(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "removewordright", bindKey: bindKey("Ctrl-Delete", "Alt-Delete"), exec: function(editor) { editor.removeWordRight(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "outdent", bindKey: bindKey("Shift-Tab", "Shift-Tab"), exec: function(editor) { editor.blockOutdent(); }, multiSelectAction: "forEach", scrollIntoView: "selectionPart" }, { name: "indent", bindKey: bindKey("Tab", "Tab"), exec: function(editor) { editor.indent(); }, multiSelectAction: "forEach", scrollIntoView: "selectionPart" }, { name: "blockoutdent", bindKey: bindKey("Ctrl-[", "Ctrl-["), exec: function(editor) { editor.blockOutdent(); }, multiSelectAction: "forEachLine", scrollIntoView: "selectionPart" }, { name: "blockindent", bindKey: bindKey("Ctrl-]", "Ctrl-]"), exec: function(editor) { editor.blockIndent(); }, multiSelectAction: "forEachLine", scrollIntoView: "selectionPart" }, { name: "insertstring", exec: function(editor, str) { editor.insert(str); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "inserttext", exec: function(editor, args) { editor.insert(lang.stringRepeat(args.text || "", args.times || 1)); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "splitline", bindKey: bindKey(null, "Ctrl-O"), exec: function(editor) { editor.splitLine(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "transposeletters", bindKey: bindKey("Ctrl-T", "Ctrl-T"), exec: function(editor) { editor.transposeLetters(); }, multiSelectAction: function(editor) {editor.transposeSelections(1); }, scrollIntoView: "cursor" }, { name: "touppercase", bindKey: bindKey("Ctrl-U", "Ctrl-U"), exec: function(editor) { editor.toUpperCase(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "tolowercase", bindKey: bindKey("Ctrl-Shift-U", "Ctrl-Shift-U"), exec: function(editor) { editor.toLowerCase(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "expandtoline", bindKey: bindKey("Ctrl-Shift-L", "Command-Shift-L"), exec: function(editor) { var range = editor.selection.getRange(); range.start.column = range.end.column = 0; range.end.row++; editor.selection.setRange(range, false); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "joinlines", bindKey: bindKey(null, null), exec: function(editor) { var isBackwards = editor.selection.isBackwards(); var selectionStart = isBackwards ? editor.selection.getSelectionLead() : editor.selection.getSelectionAnchor(); var selectionEnd = isBackwards ? editor.selection.getSelectionAnchor() : editor.selection.getSelectionLead(); var firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length; var selectedText = editor.session.doc.getTextRange(editor.selection.getRange()); var selectedCount = selectedText.replace(/\n\s*/, " ").length; var insertLine = editor.session.doc.getLine(selectionStart.row); for (var i = selectionStart.row + 1; i <= selectionEnd.row + 1; i++) { var curLine = lang.stringTrimLeft(lang.stringTrimRight(editor.session.doc.getLine(i))); if (curLine.length !== 0) { curLine = " " + curLine; } insertLine += curLine; } if (selectionEnd.row + 1 < (editor.session.doc.getLength() - 1)) { insertLine += editor.session.doc.getNewLineCharacter(); } editor.clearSelection(); editor.session.doc.replace(new Range(selectionStart.row, 0, selectionEnd.row + 2, 0), insertLine); if (selectedCount > 0) { editor.selection.moveCursorTo(selectionStart.row, selectionStart.column); editor.selection.selectTo(selectionStart.row, selectionStart.column + selectedCount); } else { firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length > firstLineEndCol ? (firstLineEndCol + 1) : firstLineEndCol; editor.selection.moveCursorTo(selectionStart.row, firstLineEndCol); } }, multiSelectAction: "forEach", readOnly: true }, { name: "invertSelection", bindKey: bindKey(null, null), exec: function(editor) { var endRow = editor.session.doc.getLength() - 1; var endCol = editor.session.doc.getLine(endRow).length; var ranges = editor.selection.rangeList.ranges; var newRanges = []; if (ranges.length < 1) { ranges = [editor.selection.getRange()]; } for (var i = 0; i < ranges.length; i++) { if (i == (ranges.length - 1)) { if (!(ranges[i].end.row === endRow && ranges[i].end.column === endCol)) { newRanges.push(new Range(ranges[i].end.row, ranges[i].end.column, endRow, endCol)); } } if (i === 0) { if (!(ranges[i].start.row === 0 && ranges[i].start.column === 0)) { newRanges.push(new Range(0, 0, ranges[i].start.row, ranges[i].start.column)); } } else { newRanges.push(new Range(ranges[i-1].end.row, ranges[i-1].end.column, ranges[i].start.row, ranges[i].start.column)); } } editor.exitMultiSelectMode(); editor.clearSelection(); for(var i = 0; i < newRanges.length; i++) { editor.selection.addRange(newRanges[i], false); } }, readOnly: true, scrollIntoView: "none" }]; }); define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"], function(require, exports, module) { "use strict"; require("./lib/fixoldbrowsers"); var oop = require("./lib/oop"); var dom = require("./lib/dom"); var lang = require("./lib/lang"); var useragent = require("./lib/useragent"); var TextInput = require("./keyboard/textinput").TextInput; var MouseHandler = require("./mouse/mouse_handler").MouseHandler; var FoldHandler = require("./mouse/fold_handler").FoldHandler; var KeyBinding = require("./keyboard/keybinding").KeyBinding; var EditSession = require("./edit_session").EditSession; var Search = require("./search").Search; var Range = require("./range").Range; var EventEmitter = require("./lib/event_emitter").EventEmitter; var CommandManager = require("./commands/command_manager").CommandManager; var defaultCommands = require("./commands/default_commands").commands; var config = require("./config"); var TokenIterator = require("./token_iterator").TokenIterator; var Editor = function(renderer, session) { var container = renderer.getContainerElement(); this.container = container; this.renderer = renderer; this.commands = new CommandManager(useragent.isMac ? "mac" : "win", defaultCommands); this.textInput = new TextInput(renderer.getTextAreaContainer(), this); this.renderer.textarea = this.textInput.getElement(); this.keyBinding = new KeyBinding(this); this.$mouseHandler = new MouseHandler(this); new FoldHandler(this); this.$blockScrolling = 0; this.$search = new Search().set({ wrap: true }); this.$historyTracker = this.$historyTracker.bind(this); this.commands.on("exec", this.$historyTracker); this.$initOperationListeners(); this._$emitInputEvent = lang.delayedCall(function() { this._signal("input", {}); if (this.session && this.session.bgTokenizer) this.session.bgTokenizer.scheduleStart(); }.bind(this)); this.on("change", function(_, _self) { _self._$emitInputEvent.schedule(31); }); this.setSession(session || new EditSession("")); config.resetOptions(this); config._signal("editor", this); }; (function(){ oop.implement(this, EventEmitter); this.$initOperationListeners = function() { function last(a) {return a[a.length - 1]} this.selections = []; this.commands.on("exec", this.startOperation.bind(this), true); this.commands.on("afterExec", this.endOperation.bind(this), true); this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this)); this.on("change", function() { this.curOp || this.startOperation(); this.curOp.docChanged = true; }.bind(this), true); this.on("changeSelection", function() { this.curOp || this.startOperation(); this.curOp.selectionChanged = true; }.bind(this), true); }; this.curOp = null; this.prevOp = {}; this.startOperation = function(commadEvent) { if (this.curOp) { if (!commadEvent || this.curOp.command) return; this.prevOp = this.curOp; } if (!commadEvent) { this.previousCommand = null; commadEvent = {}; } this.$opResetTimer.schedule(); this.curOp = { command: commadEvent.command || {}, args: commadEvent.args, scrollTop: this.renderer.scrollTop }; if (this.curOp.command.name) this.$blockScrolling++; }; this.endOperation = function(e) { if (this.curOp) { if (e && e.returnValue === false) return this.curOp = null; this._signal("beforeEndOperation"); var command = this.curOp.command; if (command.name && this.$blockScrolling) this.$blockScrolling--; if (command && command.scrollIntoView) { switch (command.scrollIntoView) { case "center": this.renderer.scrollCursorIntoView(null, 0.5); break; case "animate": case "cursor": this.renderer.scrollCursorIntoView(); break; case "selectionPart": var range = this.selection.getRange(); var config = this.renderer.layerConfig; if (range.start.row >= config.lastRow || range.end.row <= config.firstRow) { this.renderer.scrollSelectionIntoView(this.selection.anchor, this.selection.lead); } break; default: break; } if (command.scrollIntoView == "animate") this.renderer.animateScrolling(this.curOp.scrollTop); } this.prevOp = this.curOp; this.curOp = null; } }; this.$mergeableCommands = ["backspace", "del", "insertstring"]; this.$historyTracker = function(e) { if (!this.$mergeUndoDeltas) return; var prev = this.prevOp; var mergeableCommands = this.$mergeableCommands; var shouldMerge = prev.command && (e.command.name == prev.command.name); if (e.command.name == "insertstring") { var text = e.args; if (this.mergeNextCommand === undefined) this.mergeNextCommand = true; shouldMerge = shouldMerge && this.mergeNextCommand // previous command allows to coalesce with && (!/\s/.test(text) || /\s/.test(prev.args)); // previous insertion was of same type this.mergeNextCommand = true; } else { shouldMerge = shouldMerge && mergeableCommands.indexOf(e.command.name) !== -1; // the command is mergeable } if ( this.$mergeUndoDeltas != "always" && Date.now() - this.sequenceStartTime > 2000 ) { shouldMerge = false; // the sequence is too long } if (shouldMerge) this.session.mergeUndoDeltas = true; else if (mergeableCommands.indexOf(e.command.name) !== -1) this.sequenceStartTime = Date.now(); }; this.setKeyboardHandler = function(keyboardHandler, cb) { if (keyboardHandler && typeof keyboardHandler === "string") { this.$keybindingId = keyboardHandler; var _self = this; config.loadModule(["keybinding", keyboardHandler], function(module) { if (_self.$keybindingId == keyboardHandler) _self.keyBinding.setKeyboardHandler(module && module.handler); cb && cb(); }); } else { this.$keybindingId = null; this.keyBinding.setKeyboardHandler(keyboardHandler); cb && cb(); } }; this.getKeyboardHandler = function() { return this.keyBinding.getKeyboardHandler(); }; this.setSession = function(session) { if (this.session == session) return; var oldSession = this.session; if (oldSession) { this.session.removeEventListener("change", this.$onDocumentChange); this.session.removeEventListener("changeMode", this.$onChangeMode); this.session.removeEventListener("tokenizerUpdate", this.$onTokenizerUpdate); this.session.removeEventListener("changeTabSize", this.$onChangeTabSize); this.session.removeEventListener("changeWrapLimit", this.$onChangeWrapLimit); this.session.removeEventListener("changeWrapMode", this.$onChangeWrapMode); this.session.removeEventListener("onChangeFold", this.$onChangeFold); this.session.removeEventListener("changeFrontMarker", this.$onChangeFrontMarker); this.session.removeEventListener("changeBackMarker", this.$onChangeBackMarker); this.session.removeEventListener("changeBreakpoint", this.$onChangeBreakpoint); this.session.removeEventListener("changeAnnotation", this.$onChangeAnnotation); this.session.removeEventListener("changeOverwrite", this.$onCursorChange); this.session.removeEventListener("changeScrollTop", this.$onScrollTopChange); this.session.removeEventListener("changeScrollLeft", this.$onScrollLeftChange); var selection = this.session.getSelection(); selection.removeEventListener("changeCursor", this.$onCursorChange); selection.removeEventListener("changeSelection", this.$onSelectionChange); } this.session = session; if (session) { this.$onDocumentChange = this.onDocumentChange.bind(this); session.addEventListener("change", this.$onDocumentChange); this.renderer.setSession(session); this.$onChangeMode = this.onChangeMode.bind(this); session.addEventListener("changeMode", this.$onChangeMode); this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this); session.addEventListener("tokenizerUpdate", this.$onTokenizerUpdate); this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer); session.addEventListener("changeTabSize", this.$onChangeTabSize); this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this); session.addEventListener("changeWrapLimit", this.$onChangeWrapLimit); this.$onChangeWrapMode = this.onChangeWrapMode.bind(this); session.addEventListener("changeWrapMode", this.$onChangeWrapMode); this.$onChangeFold = this.onChangeFold.bind(this); session.addEventListener("changeFold", this.$onChangeFold); this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this); this.session.addEventListener("changeFrontMarker", this.$onChangeFrontMarker); this.$onChangeBackMarker = this.onChangeBackMarker.bind(this); this.session.addEventListener("changeBackMarker", this.$onChangeBackMarker); this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this); this.session.addEventListener("changeBreakpoint", this.$onChangeBreakpoint); this.$onChangeAnnotation = this.onChangeAnnotation.bind(this); this.session.addEventListener("changeAnnotation", this.$onChangeAnnotation); this.$onCursorChange = this.onCursorChange.bind(this); this.session.addEventListener("changeOverwrite", this.$onCursorChange); this.$onScrollTopChange = this.onScrollTopChange.bind(this); this.session.addEventListener("changeScrollTop", this.$onScrollTopChange); this.$onScrollLeftChange = this.onScrollLeftChange.bind(this); this.session.addEventListener("changeScrollLeft", this.$onScrollLeftChange); this.selection = session.getSelection(); this.selection.addEventListener("changeCursor", this.$onCursorChange); this.$onSelectionChange = this.onSelectionChange.bind(this); this.selection.addEventListener("changeSelection", this.$onSelectionChange); this.onChangeMode(); this.$blockScrolling += 1; this.onCursorChange(); this.$blockScrolling -= 1; this.onScrollTopChange(); this.onScrollLeftChange(); this.onSelectionChange(); this.onChangeFrontMarker(); this.onChangeBackMarker(); this.onChangeBreakpoint(); this.onChangeAnnotation(); this.session.getUseWrapMode() && this.renderer.adjustWrapLimit(); this.renderer.updateFull(); } else { this.selection = null; this.renderer.setSession(session); } this._signal("changeSession", { session: session, oldSession: oldSession }); oldSession && oldSession._signal("changeEditor", {oldEditor: this}); session && session._signal("changeEditor", {editor: this}); }; this.getSession = function() { return this.session; }; this.setValue = function(val, cursorPos) { this.session.doc.setValue(val); if (!cursorPos) this.selectAll(); else if (cursorPos == 1) this.navigateFileEnd(); else if (cursorPos == -1) this.navigateFileStart(); return val; }; this.getValue = function() { return this.session.getValue(); }; this.getSelection = function() { return this.selection; }; this.resize = function(force) { this.renderer.onResize(force); }; this.setTheme = function(theme, cb) { this.renderer.setTheme(theme, cb); }; this.getTheme = function() { return this.renderer.getTheme(); }; this.setStyle = function(style) { this.renderer.setStyle(style); }; this.unsetStyle = function(style) { this.renderer.unsetStyle(style); }; this.getFontSize = function () { return this.getOption("fontSize") || dom.computedStyle(this.container, "fontSize"); }; this.setFontSize = function(size) { this.setOption("fontSize", size); }; this.$highlightBrackets = function() { if (this.session.$bracketHighlight) { this.session.removeMarker(this.session.$bracketHighlight); this.session.$bracketHighlight = null; } if (this.$highlightPending) { return; } var self = this; this.$highlightPending = true; setTimeout(function() { self.$highlightPending = false; var session = self.session; if (!session || !session.bgTokenizer) return; var pos = session.findMatchingBracket(self.getCursorPosition()); if (pos) { var range = new Range(pos.row, pos.column, pos.row, pos.column + 1); } else if (session.$mode.getMatching) { var range = session.$mode.getMatching(self.session); } if (range) session.$bracketHighlight = session.addMarker(range, "ace_bracket", "text"); }, 50); }; this.$highlightTags = function() { if (this.$highlightTagPending) return; var self = this; this.$highlightTagPending = true; setTimeout(function() { self.$highlightTagPending = false; var session = self.session; if (!session || !session.bgTokenizer) return; var pos = self.getCursorPosition(); var iterator = new TokenIterator(self.session, pos.row, pos.column); var token = iterator.getCurrentToken(); if (!token || !/\b(?:tag-open|tag-name)/.test(token.type)) { session.removeMarker(session.$tagHighlight); session.$tagHighlight = null; return; } if (token.type.indexOf("tag-open") != -1) { token = iterator.stepForward(); if (!token) return; } var tag = token.value; var depth = 0; var prevToken = iterator.stepBackward(); if (prevToken.value == '<'){ do { prevToken = token; token = iterator.stepForward(); if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) { if (prevToken.value === '<'){ depth++; } else if (prevToken.value === '= 0); } else { do { token = prevToken; prevToken = iterator.stepBackward(); if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) { if (prevToken.value === '<') { depth++; } else if (prevToken.value === ' 1)) highlight = false; } if (session.$highlightLineMarker && !highlight) { session.removeMarker(session.$highlightLineMarker.id); session.$highlightLineMarker = null; } else if (!session.$highlightLineMarker && highlight) { var range = new Range(highlight.row, highlight.column, highlight.row, Infinity); range.id = session.addMarker(range, "ace_active-line", "screenLine"); session.$highlightLineMarker = range; } else if (highlight) { session.$highlightLineMarker.start.row = highlight.row; session.$highlightLineMarker.end.row = highlight.row; session.$highlightLineMarker.start.column = highlight.column; session._signal("changeBackMarker"); } }; this.onSelectionChange = function(e) { var session = this.session; if (session.$selectionMarker) { session.removeMarker(session.$selectionMarker); } session.$selectionMarker = null; if (!this.selection.isEmpty()) { var range = this.selection.getRange(); var style = this.getSelectionStyle(); session.$selectionMarker = session.addMarker(range, "ace_selection", style); } else { this.$updateHighlightActiveLine(); } var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp(); this.session.highlight(re); this._signal("changeSelection"); }; this.$getSelectionHighLightRegexp = function() { var session = this.session; var selection = this.getSelectionRange(); if (selection.isEmpty() || selection.isMultiLine()) return; var startOuter = selection.start.column - 1; var endOuter = selection.end.column + 1; var line = session.getLine(selection.start.row); var lineCols = line.length; var needle = line.substring(Math.max(startOuter, 0), Math.min(endOuter, lineCols)); if ((startOuter >= 0 && /^[\w\d]/.test(needle)) || (endOuter <= lineCols && /[\w\d]$/.test(needle))) return; needle = line.substring(selection.start.column, selection.end.column); if (!/^[\w\d]+$/.test(needle)) return; var re = this.$search.$assembleRegExp({ wholeWord: true, caseSensitive: true, needle: needle }); return re; }; this.onChangeFrontMarker = function() { this.renderer.updateFrontMarkers(); }; this.onChangeBackMarker = function() { this.renderer.updateBackMarkers(); }; this.onChangeBreakpoint = function() { this.renderer.updateBreakpoints(); }; this.onChangeAnnotation = function() { this.renderer.setAnnotations(this.session.getAnnotations()); }; this.onChangeMode = function(e) { this.renderer.updateText(); this._emit("changeMode", e); }; this.onChangeWrapLimit = function() { this.renderer.updateFull(); }; this.onChangeWrapMode = function() { this.renderer.onResize(true); }; this.onChangeFold = function() { this.$updateHighlightActiveLine(); this.renderer.updateFull(); }; this.getSelectedText = function() { return this.session.getTextRange(this.getSelectionRange()); }; this.getCopyText = function() { var text = this.getSelectedText(); this._signal("copy", text); return text; }; this.onCopy = function() { this.commands.exec("copy", this); }; this.onCut = function() { this.commands.exec("cut", this); }; this.onPaste = function(text) { if (this.$readOnly) return; var e = {text: text}; this._signal("paste", e); text = e.text; if (!this.inMultiSelectMode || this.inVirtualSelectionMode) { this.insert(text); } else { var lines = text.split(/\r\n|\r|\n/); var ranges = this.selection.rangeList.ranges; if (lines.length > ranges.length || lines.length < 2 || !lines[1]) return this.commands.exec("insertstring", this, text); for (var i = ranges.length; i--;) { var range = ranges[i]; if (!range.isEmpty()) this.session.remove(range); this.session.insert(range.start, lines[i]); } } this.renderer.scrollCursorIntoView(); }; this.execCommand = function(command, args) { return this.commands.exec(command, this, args); }; this.insert = function(text, pasted) { var session = this.session; var mode = session.getMode(); var cursor = this.getCursorPosition(); if (this.getBehavioursEnabled() && !pasted) { var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text); if (transform) { if (text !== transform.text) { this.session.mergeUndoDeltas = false; this.$mergeNextCommand = false; } text = transform.text; } } if (text == "\t") text = this.session.getTabString(); if (!this.selection.isEmpty()) { var range = this.getSelectionRange(); cursor = this.session.remove(range); this.clearSelection(); } else if (this.session.getOverwrite()) { var range = new Range.fromPoints(cursor, cursor); range.end.column += text.length; this.session.remove(range); } if (text == "\n" || text == "\r\n") { var line = session.getLine(cursor.row); if (cursor.column > line.search(/\S|$/)) { var d = line.substr(cursor.column).search(/\S|$/); session.doc.removeInLine(cursor.row, cursor.column, cursor.column + d); } } this.clearSelection(); var start = cursor.column; var lineState = session.getState(cursor.row); var line = session.getLine(cursor.row); var shouldOutdent = mode.checkOutdent(lineState, line, text); var end = session.insert(cursor, text); if (transform && transform.selection) { if (transform.selection.length == 2) { // Transform relative to the current column this.selection.setSelectionRange( new Range(cursor.row, start + transform.selection[0], cursor.row, start + transform.selection[1])); } else { // Transform relative to the current row. this.selection.setSelectionRange( new Range(cursor.row + transform.selection[0], transform.selection[1], cursor.row + transform.selection[2], transform.selection[3])); } } if (session.getDocument().isNewLine(text)) { var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString()); session.insert({row: cursor.row+1, column: 0}, lineIndent); } if (shouldOutdent) mode.autoOutdent(lineState, session, cursor.row); }; this.onTextInput = function(text) { this.keyBinding.onTextInput(text); }; this.onCommandKey = function(e, hashId, keyCode) { this.keyBinding.onCommandKey(e, hashId, keyCode); }; this.setOverwrite = function(overwrite) { this.session.setOverwrite(overwrite); }; this.getOverwrite = function() { return this.session.getOverwrite(); }; this.toggleOverwrite = function() { this.session.toggleOverwrite(); }; this.setScrollSpeed = function(speed) { this.setOption("scrollSpeed", speed); }; this.getScrollSpeed = function() { return this.getOption("scrollSpeed"); }; this.setDragDelay = function(dragDelay) { this.setOption("dragDelay", dragDelay); }; this.getDragDelay = function() { return this.getOption("dragDelay"); }; this.setSelectionStyle = function(val) { this.setOption("selectionStyle", val); }; this.getSelectionStyle = function() { return this.getOption("selectionStyle"); }; this.setHighlightActiveLine = function(shouldHighlight) { this.setOption("highlightActiveLine", shouldHighlight); }; this.getHighlightActiveLine = function() { return this.getOption("highlightActiveLine"); }; this.setHighlightGutterLine = function(shouldHighlight) { this.setOption("highlightGutterLine", shouldHighlight); }; this.getHighlightGutterLine = function() { return this.getOption("highlightGutterLine"); }; this.setHighlightSelectedWord = function(shouldHighlight) { this.setOption("highlightSelectedWord", shouldHighlight); }; this.getHighlightSelectedWord = function() { return this.$highlightSelectedWord; }; this.setAnimatedScroll = function(shouldAnimate){ this.renderer.setAnimatedScroll(shouldAnimate); }; this.getAnimatedScroll = function(){ return this.renderer.getAnimatedScroll(); }; this.setShowInvisibles = function(showInvisibles) { this.renderer.setShowInvisibles(showInvisibles); }; this.getShowInvisibles = function() { return this.renderer.getShowInvisibles(); }; this.setDisplayIndentGuides = function(display) { this.renderer.setDisplayIndentGuides(display); }; this.getDisplayIndentGuides = function() { return this.renderer.getDisplayIndentGuides(); }; this.setShowPrintMargin = function(showPrintMargin) { this.renderer.setShowPrintMargin(showPrintMargin); }; this.getShowPrintMargin = function() { return this.renderer.getShowPrintMargin(); }; this.setPrintMarginColumn = function(showPrintMargin) { this.renderer.setPrintMarginColumn(showPrintMargin); }; this.getPrintMarginColumn = function() { return this.renderer.getPrintMarginColumn(); }; this.setReadOnly = function(readOnly) { this.setOption("readOnly", readOnly); }; this.getReadOnly = function() { return this.getOption("readOnly"); }; this.setBehavioursEnabled = function (enabled) { this.setOption("behavioursEnabled", enabled); }; this.getBehavioursEnabled = function () { return this.getOption("behavioursEnabled"); }; this.setWrapBehavioursEnabled = function (enabled) { this.setOption("wrapBehavioursEnabled", enabled); }; this.getWrapBehavioursEnabled = function () { return this.getOption("wrapBehavioursEnabled"); }; this.setShowFoldWidgets = function(show) { this.setOption("showFoldWidgets", show); }; this.getShowFoldWidgets = function() { return this.getOption("showFoldWidgets"); }; this.setFadeFoldWidgets = function(fade) { this.setOption("fadeFoldWidgets", fade); }; this.getFadeFoldWidgets = function() { return this.getOption("fadeFoldWidgets"); }; this.remove = function(dir) { if (this.selection.isEmpty()){ if (dir == "left") this.selection.selectLeft(); else this.selection.selectRight(); } var range = this.getSelectionRange(); if (this.getBehavioursEnabled()) { var session = this.session; var state = session.getState(range.start.row); var new_range = session.getMode().transformAction(state, 'deletion', this, session, range); if (range.end.column === 0) { var text = session.getTextRange(range); if (text[text.length - 1] == "\n") { var line = session.getLine(range.end.row); if (/^\s+$/.test(line)) { range.end.column = line.length; } } } if (new_range) range = new_range; } this.session.remove(range); this.clearSelection(); }; this.removeWordRight = function() { if (this.selection.isEmpty()) this.selection.selectWordRight(); this.session.remove(this.getSelectionRange()); this.clearSelection(); }; this.removeWordLeft = function() { if (this.selection.isEmpty()) this.selection.selectWordLeft(); this.session.remove(this.getSelectionRange()); this.clearSelection(); }; this.removeToLineStart = function() { if (this.selection.isEmpty()) this.selection.selectLineStart(); this.session.remove(this.getSelectionRange()); this.clearSelection(); }; this.removeToLineEnd = function() { if (this.selection.isEmpty()) this.selection.selectLineEnd(); var range = this.getSelectionRange(); if (range.start.column == range.end.column && range.start.row == range.end.row) { range.end.column = 0; range.end.row++; } this.session.remove(range); this.clearSelection(); }; this.splitLine = function() { if (!this.selection.isEmpty()) { this.session.remove(this.getSelectionRange()); this.clearSelection(); } var cursor = this.getCursorPosition(); this.insert("\n"); this.moveCursorToPosition(cursor); }; this.transposeLetters = function() { if (!this.selection.isEmpty()) { return; } var cursor = this.getCursorPosition(); var column = cursor.column; if (column === 0) return; var line = this.session.getLine(cursor.row); var swap, range; if (column < line.length) { swap = line.charAt(column) + line.charAt(column-1); range = new Range(cursor.row, column-1, cursor.row, column+1); } else { swap = line.charAt(column-1) + line.charAt(column-2); range = new Range(cursor.row, column-2, cursor.row, column); } this.session.replace(range, swap); }; this.toLowerCase = function() { var originalRange = this.getSelectionRange(); if (this.selection.isEmpty()) { this.selection.selectWord(); } var range = this.getSelectionRange(); var text = this.session.getTextRange(range); this.session.replace(range, text.toLowerCase()); this.selection.setSelectionRange(originalRange); }; this.toUpperCase = function() { var originalRange = this.getSelectionRange(); if (this.selection.isEmpty()) { this.selection.selectWord(); } var range = this.getSelectionRange(); var text = this.session.getTextRange(range); this.session.replace(range, text.toUpperCase()); this.selection.setSelectionRange(originalRange); }; this.indent = function() { var session = this.session; var range = this.getSelectionRange(); if (range.start.row < range.end.row) { var rows = this.$getSelectedRows(); session.indentRows(rows.first, rows.last, "\t"); return; } else if (range.start.column < range.end.column) { var text = session.getTextRange(range); if (!/^\s+$/.test(text)) { var rows = this.$getSelectedRows(); session.indentRows(rows.first, rows.last, "\t"); return; } } var line = session.getLine(range.start.row); var position = range.start; var size = session.getTabSize(); var column = session.documentToScreenColumn(position.row, position.column); if (this.session.getUseSoftTabs()) { var count = (size - column % size); var indentString = lang.stringRepeat(" ", count); } else { var count = column % size; while (line[range.start.column] == " " && count) { range.start.column--; count--; } this.selection.setSelectionRange(range); indentString = "\t"; } return this.insert(indentString); }; this.blockIndent = function() { var rows = this.$getSelectedRows(); this.session.indentRows(rows.first, rows.last, "\t"); }; this.blockOutdent = function() { var selection = this.session.getSelection(); this.session.outdentRows(selection.getRange()); }; this.sortLines = function() { var rows = this.$getSelectedRows(); var session = this.session; var lines = []; for (i = rows.first; i <= rows.last; i++) lines.push(session.getLine(i)); lines.sort(function(a, b) { if (a.toLowerCase() < b.toLowerCase()) return -1; if (a.toLowerCase() > b.toLowerCase()) return 1; return 0; }); var deleteRange = new Range(0, 0, 0, 0); for (var i = rows.first; i <= rows.last; i++) { var line = session.getLine(i); deleteRange.start.row = i; deleteRange.end.row = i; deleteRange.end.column = line.length; session.replace(deleteRange, lines[i-rows.first]); } }; this.toggleCommentLines = function() { var state = this.session.getState(this.getCursorPosition().row); var rows = this.$getSelectedRows(); this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last); }; this.toggleBlockComment = function() { var cursor = this.getCursorPosition(); var state = this.session.getState(cursor.row); var range = this.getSelectionRange(); this.session.getMode().toggleBlockComment(state, this.session, range, cursor); }; this.getNumberAt = function(row, column) { var _numberRx = /[\-]?[0-9]+(?:\.[0-9]+)?/g; _numberRx.lastIndex = 0; var s = this.session.getLine(row); while (_numberRx.lastIndex < column) { var m = _numberRx.exec(s); if(m.index <= column && m.index+m[0].length >= column){ var number = { value: m[0], start: m.index, end: m.index+m[0].length }; return number; } } return null; }; this.modifyNumber = function(amount) { var row = this.selection.getCursor().row; var column = this.selection.getCursor().column; var charRange = new Range(row, column-1, row, column); var c = this.session.getTextRange(charRange); if (!isNaN(parseFloat(c)) && isFinite(c)) { var nr = this.getNumberAt(row, column); if (nr) { var fp = nr.value.indexOf(".") >= 0 ? nr.start + nr.value.indexOf(".") + 1 : nr.end; var decimals = nr.start + nr.value.length - fp; var t = parseFloat(nr.value); t *= Math.pow(10, decimals); if(fp !== nr.end && column < fp){ amount *= Math.pow(10, nr.end - column - 1); } else { amount *= Math.pow(10, nr.end - column); } t += amount; t /= Math.pow(10, decimals); var nnr = t.toFixed(decimals); var replaceRange = new Range(row, nr.start, row, nr.end); this.session.replace(replaceRange, nnr); this.moveCursorTo(row, Math.max(nr.start +1, column + nnr.length - nr.value.length)); } } }; this.removeLines = function() { var rows = this.$getSelectedRows(); var range; if (rows.first === 0 || rows.last+1 < this.session.getLength()) range = new Range(rows.first, 0, rows.last+1, 0); else range = new Range( rows.first-1, this.session.getLine(rows.first-1).length, rows.last, this.session.getLine(rows.last).length ); this.session.remove(range); this.clearSelection(); }; this.duplicateSelection = function() { var sel = this.selection; var doc = this.session; var range = sel.getRange(); var reverse = sel.isBackwards(); if (range.isEmpty()) { var row = range.start.row; doc.duplicateLines(row, row); } else { var point = reverse ? range.start : range.end; var endPoint = doc.insert(point, doc.getTextRange(range), false); range.start = point; range.end = endPoint; sel.setSelectionRange(range, reverse); } }; this.moveLinesDown = function() { this.$moveLines(1, false); }; this.moveLinesUp = function() { this.$moveLines(-1, false); }; this.moveText = function(range, toPosition, copy) { return this.session.moveText(range, toPosition, copy); }; this.copyLinesUp = function() { this.$moveLines(-1, true); }; this.copyLinesDown = function() { this.$moveLines(1, true); }; this.$moveLines = function(dir, copy) { var rows, moved; var selection = this.selection; if (!selection.inMultiSelectMode || this.inVirtualSelectionMode) { var range = selection.toOrientedRange(); rows = this.$getSelectedRows(range); moved = this.session.$moveLines(rows.first, rows.last, copy ? 0 : dir); if (copy && dir == -1) moved = 0; range.moveBy(moved, 0); selection.fromOrientedRange(range); } else { var ranges = selection.rangeList.ranges; selection.rangeList.detach(this.session); this.inVirtualSelectionMode = true; var diff = 0; var totalDiff = 0; var l = ranges.length; for (var i = 0; i < l; i++) { var rangeIndex = i; ranges[i].moveBy(diff, 0); rows = this.$getSelectedRows(ranges[i]); var first = rows.first; var last = rows.last; while (++i < l) { if (totalDiff) ranges[i].moveBy(totalDiff, 0); var subRows = this.$getSelectedRows(ranges[i]); if (copy && subRows.first != last) break; else if (!copy && subRows.first > last + 1) break; last = subRows.last; } i--; diff = this.session.$moveLines(first, last, copy ? 0 : dir); if (copy && dir == -1) rangeIndex = i + 1; while (rangeIndex <= i) { ranges[rangeIndex].moveBy(diff, 0); rangeIndex++; } if (!copy) diff = 0; totalDiff += diff; } selection.fromOrientedRange(selection.ranges[0]); selection.rangeList.attach(this.session); this.inVirtualSelectionMode = false; } }; this.$getSelectedRows = function(range) { range = (range || this.getSelectionRange()).collapseRows(); return { first: this.session.getRowFoldStart(range.start.row), last: this.session.getRowFoldEnd(range.end.row) }; }; this.onCompositionStart = function(text) { this.renderer.showComposition(this.getCursorPosition()); }; this.onCompositionUpdate = function(text) { this.renderer.setCompositionText(text); }; this.onCompositionEnd = function() { this.renderer.hideComposition(); }; this.getFirstVisibleRow = function() { return this.renderer.getFirstVisibleRow(); }; this.getLastVisibleRow = function() { return this.renderer.getLastVisibleRow(); }; this.isRowVisible = function(row) { return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow()); }; this.isRowFullyVisible = function(row) { return (row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow()); }; this.$getVisibleRowCount = function() { return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1; }; this.$moveByPage = function(dir, select) { var renderer = this.renderer; var config = this.renderer.layerConfig; var rows = dir * Math.floor(config.height / config.lineHeight); this.$blockScrolling++; if (select === true) { this.selection.$moveSelection(function(){ this.moveCursorBy(rows, 0); }); } else if (select === false) { this.selection.moveCursorBy(rows, 0); this.selection.clearSelection(); } this.$blockScrolling--; var scrollTop = renderer.scrollTop; renderer.scrollBy(0, rows * config.lineHeight); if (select != null) renderer.scrollCursorIntoView(null, 0.5); renderer.animateScrolling(scrollTop); }; this.selectPageDown = function() { this.$moveByPage(1, true); }; this.selectPageUp = function() { this.$moveByPage(-1, true); }; this.gotoPageDown = function() { this.$moveByPage(1, false); }; this.gotoPageUp = function() { this.$moveByPage(-1, false); }; this.scrollPageDown = function() { this.$moveByPage(1); }; this.scrollPageUp = function() { this.$moveByPage(-1); }; this.scrollToRow = function(row) { this.renderer.scrollToRow(row); }; this.scrollToLine = function(line, center, animate, callback) { this.renderer.scrollToLine(line, center, animate, callback); }; this.centerSelection = function() { var range = this.getSelectionRange(); var pos = { row: Math.floor(range.start.row + (range.end.row - range.start.row) / 2), column: Math.floor(range.start.column + (range.end.column - range.start.column) / 2) }; this.renderer.alignCursor(pos, 0.5); }; this.getCursorPosition = function() { return this.selection.getCursor(); }; this.getCursorPositionScreen = function() { return this.session.documentToScreenPosition(this.getCursorPosition()); }; this.getSelectionRange = function() { return this.selection.getRange(); }; this.selectAll = function() { this.$blockScrolling += 1; this.selection.selectAll(); this.$blockScrolling -= 1; }; this.clearSelection = function() { this.selection.clearSelection(); }; this.moveCursorTo = function(row, column) { this.selection.moveCursorTo(row, column); }; this.moveCursorToPosition = function(pos) { this.selection.moveCursorToPosition(pos); }; this.jumpToMatching = function(select, expand) { var cursor = this.getCursorPosition(); var iterator = new TokenIterator(this.session, cursor.row, cursor.column); var prevToken = iterator.getCurrentToken(); var token = prevToken || iterator.stepForward(); if (!token) return; var matchType; var found = false; var depth = {}; var i = cursor.column - token.start; var bracketType; var brackets = { ")": "(", "(": "(", "]": "[", "[": "[", "{": "{", "}": "{" }; do { if (token.value.match(/[{}()\[\]]/g)) { for (; i < token.value.length && !found; i++) { if (!brackets[token.value[i]]) { continue; } bracketType = brackets[token.value[i]] + '.' + token.type.replace("rparen", "lparen"); if (isNaN(depth[bracketType])) { depth[bracketType] = 0; } switch (token.value[i]) { case '(': case '[': case '{': depth[bracketType]++; break; case ')': case ']': case '}': depth[bracketType]--; if (depth[bracketType] === -1) { matchType = 'bracket'; found = true; } break; } } } else if (token && token.type.indexOf('tag-name') !== -1) { if (isNaN(depth[token.value])) { depth[token.value] = 0; } if (prevToken.value === '<') { depth[token.value]++; } else if (prevToken.value === '= 0; --i) { if(this.$tryReplace(ranges[i], replacement)) { replaced++; } } this.selection.setSelectionRange(selection); this.$blockScrolling -= 1; return replaced; }; this.$tryReplace = function(range, replacement) { var input = this.session.getTextRange(range); replacement = this.$search.replace(input, replacement); if (replacement !== null) { range.end = this.session.replace(range, replacement); return range; } else { return null; } }; this.getLastSearchOptions = function() { return this.$search.getOptions(); }; this.find = function(needle, options, animate) { if (!options) options = {}; if (typeof needle == "string" || needle instanceof RegExp) options.needle = needle; else if (typeof needle == "object") oop.mixin(options, needle); var range = this.selection.getRange(); if (options.needle == null) { needle = this.session.getTextRange(range) || this.$search.$options.needle; if (!needle) { range = this.session.getWordRange(range.start.row, range.start.column); needle = this.session.getTextRange(range); } this.$search.set({needle: needle}); } this.$search.set(options); if (!options.start) this.$search.set({start: range}); var newRange = this.$search.find(this.session); if (options.preventScroll) return newRange; if (newRange) { this.revealRange(newRange, animate); return newRange; } if (options.backwards) range.start = range.end; else range.end = range.start; this.selection.setRange(range); }; this.findNext = function(options, animate) { this.find({skipCurrent: true, backwards: false}, options, animate); }; this.findPrevious = function(options, animate) { this.find(options, {skipCurrent: true, backwards: true}, animate); }; this.revealRange = function(range, animate) { this.$blockScrolling += 1; this.session.unfold(range); this.selection.setSelectionRange(range); this.$blockScrolling -= 1; var scrollTop = this.renderer.scrollTop; this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5); if (animate !== false) this.renderer.animateScrolling(scrollTop); }; this.undo = function() { this.$blockScrolling++; this.session.getUndoManager().undo(); this.$blockScrolling--; this.renderer.scrollCursorIntoView(null, 0.5); }; this.redo = function() { this.$blockScrolling++; this.session.getUndoManager().redo(); this.$blockScrolling--; this.renderer.scrollCursorIntoView(null, 0.5); }; this.destroy = function() { this.renderer.destroy(); this._signal("destroy", this); if (this.session) { this.session.destroy(); } }; this.setAutoScrollEditorIntoView = function(enable) { if (!enable) return; var rect; var self = this; var shouldScroll = false; if (!this.$scrollAnchor) this.$scrollAnchor = document.createElement("div"); var scrollAnchor = this.$scrollAnchor; scrollAnchor.style.cssText = "position:absolute"; this.container.insertBefore(scrollAnchor, this.container.firstChild); var onChangeSelection = this.on("changeSelection", function() { shouldScroll = true; }); var onBeforeRender = this.renderer.on("beforeRender", function() { if (shouldScroll) rect = self.renderer.container.getBoundingClientRect(); }); var onAfterRender = this.renderer.on("afterRender", function() { if (shouldScroll && rect && (self.isFocused() || self.searchBox && self.searchBox.isFocused()) ) { var renderer = self.renderer; var pos = renderer.$cursorLayer.$pixelPos; var config = renderer.layerConfig; var top = pos.top - config.offset; if (pos.top >= 0 && top + rect.top < 0) { shouldScroll = true; } else if (pos.top < config.height && pos.top + rect.top + config.lineHeight > window.innerHeight) { shouldScroll = false; } else { shouldScroll = null; } if (shouldScroll != null) { scrollAnchor.style.top = top + "px"; scrollAnchor.style.left = pos.left + "px"; scrollAnchor.style.height = config.lineHeight + "px"; scrollAnchor.scrollIntoView(shouldScroll); } shouldScroll = rect = null; } }); this.setAutoScrollEditorIntoView = function(enable) { if (enable) return; delete this.setAutoScrollEditorIntoView; this.removeEventListener("changeSelection", onChangeSelection); this.renderer.removeEventListener("afterRender", onAfterRender); this.renderer.removeEventListener("beforeRender", onBeforeRender); }; }; this.$resetCursorStyle = function() { var style = this.$cursorStyle || "ace"; var cursorLayer = this.renderer.$cursorLayer; if (!cursorLayer) return; cursorLayer.setSmoothBlinking(/smooth/.test(style)); cursorLayer.isBlinking = !this.$readOnly && style != "wide"; dom.setCssClass(cursorLayer.element, "ace_slim-cursors", /slim/.test(style)); }; }).call(Editor.prototype); config.defineOptions(Editor.prototype, "editor", { selectionStyle: { set: function(style) { this.onSelectionChange(); this._signal("changeSelectionStyle", {data: style}); }, initialValue: "line" }, highlightActiveLine: { set: function() {this.$updateHighlightActiveLine();}, initialValue: true }, highlightSelectedWord: { set: function(shouldHighlight) {this.$onSelectionChange();}, initialValue: true }, readOnly: { set: function(readOnly) { this.$resetCursorStyle(); }, initialValue: false }, cursorStyle: { set: function(val) { this.$resetCursorStyle(); }, values: ["ace", "slim", "smooth", "wide"], initialValue: "ace" }, mergeUndoDeltas: { values: [false, true, "always"], initialValue: true }, behavioursEnabled: {initialValue: true}, wrapBehavioursEnabled: {initialValue: true}, autoScrollEditorIntoView: { set: function(val) {this.setAutoScrollEditorIntoView(val)} }, hScrollBarAlwaysVisible: "renderer", vScrollBarAlwaysVisible: "renderer", highlightGutterLine: "renderer", animatedScroll: "renderer", showInvisibles: "renderer", showPrintMargin: "renderer", printMarginColumn: "renderer", printMargin: "renderer", fadeFoldWidgets: "renderer", showFoldWidgets: "renderer", showLineNumbers: "renderer", showGutter: "renderer", displayIndentGuides: "renderer", fontSize: "renderer", fontFamily: "renderer", maxLines: "renderer", minLines: "renderer", scrollPastEnd: "renderer", fixedWidthGutter: "renderer", theme: "renderer", scrollSpeed: "$mouseHandler", dragDelay: "$mouseHandler", dragEnabled: "$mouseHandler", focusTimout: "$mouseHandler", tooltipFollowsMouse: "$mouseHandler", firstLineNumber: "session", overwrite: "session", newLineMode: "session", useWorker: "session", useSoftTabs: "session", tabSize: "session", wrap: "session", foldStyle: "session", mode: "session" }); exports.Editor = Editor; }); define("ace/undomanager",["require","exports","module"], function(require, exports, module) { "use strict"; var UndoManager = function() { this.reset(); }; (function() { this.execute = function(options) { var deltas = options.args[0]; this.$doc = options.args[1]; if (options.merge && this.hasUndo()){ this.dirtyCounter--; deltas = this.$undoStack.pop().concat(deltas); } this.$undoStack.push(deltas); this.$redoStack = []; if (this.dirtyCounter < 0) { this.dirtyCounter = NaN; } this.dirtyCounter++; }; this.undo = function(dontSelect) { var deltas = this.$undoStack.pop(); var undoSelectionRange = null; if (deltas) { undoSelectionRange = this.$doc.undoChanges(deltas, dontSelect); this.$redoStack.push(deltas); this.dirtyCounter--; } return undoSelectionRange; }; this.redo = function(dontSelect) { var deltas = this.$redoStack.pop(); var redoSelectionRange = null; if (deltas) { redoSelectionRange = this.$doc.redoChanges(deltas, dontSelect); this.$undoStack.push(deltas); this.dirtyCounter++; } return redoSelectionRange; }; this.reset = function() { this.$undoStack = []; this.$redoStack = []; this.dirtyCounter = 0; }; this.hasUndo = function() { return this.$undoStack.length > 0; }; this.hasRedo = function() { return this.$redoStack.length > 0; }; this.markClean = function() { this.dirtyCounter = 0; }; this.isClean = function() { return this.dirtyCounter === 0; }; }).call(UndoManager.prototype); exports.UndoManager = UndoManager; }); define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var dom = require("../lib/dom"); var oop = require("../lib/oop"); var lang = require("../lib/lang"); var EventEmitter = require("../lib/event_emitter").EventEmitter; var Gutter = function(parentEl) { this.element = dom.createElement("div"); this.element.className = "ace_layer ace_gutter-layer"; parentEl.appendChild(this.element); this.setShowFoldWidgets(this.$showFoldWidgets); this.gutterWidth = 0; this.$annotations = []; this.$updateAnnotations = this.$updateAnnotations.bind(this); this.$cells = []; }; (function() { oop.implement(this, EventEmitter); this.setSession = function(session) { if (this.session) this.session.removeEventListener("change", this.$updateAnnotations); this.session = session; if (session) session.on("change", this.$updateAnnotations); }; this.addGutterDecoration = function(row, className){ if (window.console) console.warn && console.warn("deprecated use session.addGutterDecoration"); this.session.addGutterDecoration(row, className); }; this.removeGutterDecoration = function(row, className){ if (window.console) console.warn && console.warn("deprecated use session.removeGutterDecoration"); this.session.removeGutterDecoration(row, className); }; this.setAnnotations = function(annotations) { this.$annotations = []; for (var i = 0; i < annotations.length; i++) { var annotation = annotations[i]; var row = annotation.row; var rowInfo = this.$annotations[row]; if (!rowInfo) rowInfo = this.$annotations[row] = {text: []}; var annoText = annotation.text; annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || ""; if (rowInfo.text.indexOf(annoText) === -1) rowInfo.text.push(annoText); var type = annotation.type; if (type == "error") rowInfo.className = " ace_error"; else if (type == "warning" && rowInfo.className != " ace_error") rowInfo.className = " ace_warning"; else if (type == "info" && (!rowInfo.className)) rowInfo.className = " ace_info"; } }; this.$updateAnnotations = function (e) { if (!this.$annotations.length) return; var delta = e.data; var range = delta.range; var firstRow = range.start.row; var len = range.end.row - firstRow; if (len === 0) { } else if (delta.action == "removeText" || delta.action == "removeLines") { this.$annotations.splice(firstRow, len + 1, null); } else { var args = new Array(len + 1); args.unshift(firstRow, 1); this.$annotations.splice.apply(this.$annotations, args); } }; this.update = function(config) { var session = this.session; var firstRow = config.firstRow; var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar session.getLength() - 1); var fold = session.getNextFoldLine(firstRow); var foldStart = fold ? fold.start.row : Infinity; var foldWidgets = this.$showFoldWidgets && session.foldWidgets; var breakpoints = session.$breakpoints; var decorations = session.$decorations; var firstLineNumber = session.$firstLineNumber; var lastLineNumber = 0; var gutterRenderer = session.gutterRenderer || this.$renderer; var cell = null; var index = -1; var row = firstRow; while (true) { if (row > foldStart) { row = fold.end.row + 1; fold = session.getNextFoldLine(row, fold); foldStart = fold ? fold.start.row : Infinity; } if (row > lastRow) { while (this.$cells.length > index + 1) { cell = this.$cells.pop(); this.element.removeChild(cell.element); } break; } cell = this.$cells[++index]; if (!cell) { cell = {element: null, textNode: null, foldWidget: null}; cell.element = dom.createElement("div"); cell.textNode = document.createTextNode(''); cell.element.appendChild(cell.textNode); this.element.appendChild(cell.element); this.$cells[index] = cell; } var className = "ace_gutter-cell "; if (breakpoints[row]) className += breakpoints[row]; if (decorations[row]) className += decorations[row]; if (this.$annotations[row]) className += this.$annotations[row].className; if (cell.element.className != className) cell.element.className = className; var height = session.getRowLength(row) * config.lineHeight + "px"; if (height != cell.element.style.height) cell.element.style.height = height; if (foldWidgets) { var c = foldWidgets[row]; if (c == null) c = foldWidgets[row] = session.getFoldWidget(row); } if (c) { if (!cell.foldWidget) { cell.foldWidget = dom.createElement("span"); cell.element.appendChild(cell.foldWidget); } var className = "ace_fold-widget ace_" + c; if (c == "start" && row == foldStart && row < fold.end.row) className += " ace_closed"; else className += " ace_open"; if (cell.foldWidget.className != className) cell.foldWidget.className = className; var height = config.lineHeight + "px"; if (cell.foldWidget.style.height != height) cell.foldWidget.style.height = height; } else { if (cell.foldWidget) { cell.element.removeChild(cell.foldWidget); cell.foldWidget = null; } } var text = lastLineNumber = gutterRenderer ? gutterRenderer.getText(session, row) : row + firstLineNumber; if (text != cell.textNode.data) cell.textNode.data = text; row++; } this.element.style.height = config.minHeight + "px"; if (this.$fixedWidth || session.$useWrapMode) lastLineNumber = session.getLength() + firstLineNumber; var gutterWidth = gutterRenderer ? gutterRenderer.getWidth(session, lastLineNumber, config) : lastLineNumber.toString().length * config.characterWidth; var padding = this.$padding || this.$computePadding(); gutterWidth += padding.left + padding.right; if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) { this.gutterWidth = gutterWidth; this.element.style.width = Math.ceil(this.gutterWidth) + "px"; this._emit("changeGutterWidth", gutterWidth); } }; this.$fixedWidth = false; this.$showLineNumbers = true; this.$renderer = ""; this.setShowLineNumbers = function(show) { this.$renderer = !show && { getWidth: function() {return ""}, getText: function() {return ""} }; }; this.getShowLineNumbers = function() { return this.$showLineNumbers; }; this.$showFoldWidgets = true; this.setShowFoldWidgets = function(show) { if (show) dom.addCssClass(this.element, "ace_folding-enabled"); else dom.removeCssClass(this.element, "ace_folding-enabled"); this.$showFoldWidgets = show; this.$padding = null; }; this.getShowFoldWidgets = function() { return this.$showFoldWidgets; }; this.$computePadding = function() { if (!this.element.firstChild) return {left: 0, right: 0}; var style = dom.computedStyle(this.element.firstChild); this.$padding = {}; this.$padding.left = parseInt(style.paddingLeft) + 1 || 0; this.$padding.right = parseInt(style.paddingRight) || 0; return this.$padding; }; this.getRegion = function(point) { var padding = this.$padding || this.$computePadding(); var rect = this.element.getBoundingClientRect(); if (point.x < padding.left + rect.left) return "markers"; if (this.$showFoldWidgets && point.x > rect.right - padding.right) return "foldWidgets"; }; }).call(Gutter.prototype); exports.Gutter = Gutter; }); define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var dom = require("../lib/dom"); var Marker = function(parentEl) { this.element = dom.createElement("div"); this.element.className = "ace_layer ace_marker-layer"; parentEl.appendChild(this.element); }; (function() { this.$padding = 0; this.setPadding = function(padding) { this.$padding = padding; }; this.setSession = function(session) { this.session = session; }; this.setMarkers = function(markers) { this.markers = markers; }; this.update = function(config) { var config = config || this.config; if (!config) return; this.config = config; var html = []; for (var key in this.markers) { var marker = this.markers[key]; if (!marker.range) { marker.update(html, this, this.session, config); continue; } var range = marker.range.clipRows(config.firstRow, config.lastRow); if (range.isEmpty()) continue; range = range.toScreenRange(this.session); if (marker.renderer) { var top = this.$getTop(range.start.row, config); var left = this.$padding + range.start.column * config.characterWidth; marker.renderer(html, range, left, top, config); } else if (marker.type == "fullLine") { this.drawFullLineMarker(html, range, marker.clazz, config); } else if (marker.type == "screenLine") { this.drawScreenLineMarker(html, range, marker.clazz, config); } else if (range.isMultiLine()) { if (marker.type == "text") this.drawTextMarker(html, range, marker.clazz, config); else this.drawMultiLineMarker(html, range, marker.clazz, config); } else { this.drawSingleLineMarker(html, range, marker.clazz + " ace_start", config); } } this.element.innerHTML = html.join(""); }; this.$getTop = function(row, layerConfig) { return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight; }; this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig, extraStyle) { var row = range.start.row; var lineRange = new Range( row, range.start.column, row, this.session.getScreenLastRowColumn(row) ); this.drawSingleLineMarker(stringBuilder, lineRange, clazz + " ace_start", layerConfig, 1, extraStyle); row = range.end.row; lineRange = new Range(row, 0, row, range.end.column); this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 0, extraStyle); for (row = range.start.row + 1; row < range.end.row; row++) { lineRange.start.row = row; lineRange.end.row = row; lineRange.end.column = this.session.getScreenLastRowColumn(row); this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 1, extraStyle); } }; this.drawMultiLineMarker = function(stringBuilder, range, clazz, config, extraStyle) { var padding = this.$padding; var height = config.lineHeight; var top = this.$getTop(range.start.row, config); var left = padding + range.start.column * config.characterWidth; extraStyle = extraStyle || ""; stringBuilder.push( "
    " ); top = this.$getTop(range.end.row, config); var width = range.end.column * config.characterWidth; stringBuilder.push( "
    " ); height = (range.end.row - range.start.row - 1) * config.lineHeight; if (height < 0) return; top = this.$getTop(range.start.row + 1, config); stringBuilder.push( "
    " ); }; this.drawSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength, extraStyle) { var height = config.lineHeight; var width = (range.end.column + (extraLength || 0) - range.start.column) * config.characterWidth; var top = this.$getTop(range.start.row, config); var left = this.$padding + range.start.column * config.characterWidth; stringBuilder.push( "
    " ); }; this.drawFullLineMarker = function(stringBuilder, range, clazz, config, extraStyle) { var top = this.$getTop(range.start.row, config); var height = config.lineHeight; if (range.start.row != range.end.row) height += this.$getTop(range.end.row, config) - top; stringBuilder.push( "
    " ); }; this.drawScreenLineMarker = function(stringBuilder, range, clazz, config, extraStyle) { var top = this.$getTop(range.start.row, config); var height = config.lineHeight; stringBuilder.push( "
    " ); }; }).call(Marker.prototype); exports.Marker = Marker; }); define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var dom = require("../lib/dom"); var lang = require("../lib/lang"); var useragent = require("../lib/useragent"); var EventEmitter = require("../lib/event_emitter").EventEmitter; var Text = function(parentEl) { this.element = dom.createElement("div"); this.element.className = "ace_layer ace_text-layer"; parentEl.appendChild(this.element); this.$updateEolChar = this.$updateEolChar.bind(this); }; (function() { oop.implement(this, EventEmitter); this.EOF_CHAR = "\xB6"; this.EOL_CHAR_LF = "\xAC"; this.EOL_CHAR_CRLF = "\xa4"; this.EOL_CHAR = this.EOL_CHAR_LF; this.TAB_CHAR = "\u2192"; //"\u21E5"; this.SPACE_CHAR = "\xB7"; this.$padding = 0; this.$updateEolChar = function() { var EOL_CHAR = this.session.doc.getNewLineCharacter() == "\n" ? this.EOL_CHAR_LF : this.EOL_CHAR_CRLF; if (this.EOL_CHAR != EOL_CHAR) { this.EOL_CHAR = EOL_CHAR; return true; } } this.setPadding = function(padding) { this.$padding = padding; this.element.style.padding = "0 " + padding + "px"; }; this.getLineHeight = function() { return this.$fontMetrics.$characterSize.height || 0; }; this.getCharacterWidth = function() { return this.$fontMetrics.$characterSize.width || 0; }; this.$setFontMetrics = function(measure) { this.$fontMetrics = measure; this.$fontMetrics.on("changeCharacterSize", function(e) { this._signal("changeCharacterSize", e); }.bind(this)); this.$pollSizeChanges(); } this.checkForSizeChanges = function() { this.$fontMetrics.checkForSizeChanges(); }; this.$pollSizeChanges = function() { return this.$pollSizeChangesTimer = this.$fontMetrics.$pollSizeChanges(); }; this.setSession = function(session) { this.session = session; if (session) this.$computeTabString(); }; this.showInvisibles = false; this.setShowInvisibles = function(showInvisibles) { if (this.showInvisibles == showInvisibles) return false; this.showInvisibles = showInvisibles; this.$computeTabString(); return true; }; this.displayIndentGuides = true; this.setDisplayIndentGuides = function(display) { if (this.displayIndentGuides == display) return false; this.displayIndentGuides = display; this.$computeTabString(); return true; }; this.$tabStrings = []; this.onChangeTabSize = this.$computeTabString = function() { var tabSize = this.session.getTabSize(); this.tabSize = tabSize; var tabStr = this.$tabStrings = [0]; for (var i = 1; i < tabSize + 1; i++) { if (this.showInvisibles) { tabStr.push("" + this.TAB_CHAR + lang.stringRepeat("\xa0", i - 1) + ""); } else { tabStr.push(lang.stringRepeat("\xa0", i)); } } if (this.displayIndentGuides) { this.$indentGuideRe = /\s\S| \t|\t |\s$/; var className = "ace_indent-guide"; var spaceClass = ""; var tabClass = ""; if (this.showInvisibles) { className += " ace_invisible"; spaceClass = " ace_invisible_space"; tabClass = " ace_invisible_tab"; var spaceContent = lang.stringRepeat(this.SPACE_CHAR, this.tabSize); var tabContent = this.TAB_CHAR + lang.stringRepeat("\xa0", this.tabSize - 1); } else{ var spaceContent = lang.stringRepeat("\xa0", this.tabSize); var tabContent = spaceContent; } this.$tabStrings[" "] = "" + spaceContent + ""; this.$tabStrings["\t"] = "" + tabContent + ""; } }; this.updateLines = function(config, firstRow, lastRow) { if (this.config.lastRow != config.lastRow || this.config.firstRow != config.firstRow) { this.scrollLines(config); } this.config = config; var first = Math.max(firstRow, config.firstRow); var last = Math.min(lastRow, config.lastRow); var lineElements = this.element.childNodes; var lineElementsIdx = 0; for (var row = config.firstRow; row < first; row++) { var foldLine = this.session.getFoldLine(row); if (foldLine) { if (foldLine.containsRow(first)) { first = foldLine.start.row; break; } else { row = foldLine.end.row; } } lineElementsIdx ++; } var row = first; var foldLine = this.session.getNextFoldLine(row); var foldStart = foldLine ? foldLine.start.row : Infinity; while (true) { if (row > foldStart) { row = foldLine.end.row+1; foldLine = this.session.getNextFoldLine(row, foldLine); foldStart = foldLine ? foldLine.start.row :Infinity; } if (row > last) break; var lineElement = lineElements[lineElementsIdx++]; if (lineElement) { var html = []; this.$renderLine( html, row, !this.$useLineGroups(), row == foldStart ? foldLine : false ); lineElement.style.height = config.lineHeight * this.session.getRowLength(row) + "px"; lineElement.innerHTML = html.join(""); } row++; } }; this.scrollLines = function(config) { var oldConfig = this.config; this.config = config; if (!oldConfig || oldConfig.lastRow < config.firstRow) return this.update(config); if (config.lastRow < oldConfig.firstRow) return this.update(config); var el = this.element; if (oldConfig.firstRow < config.firstRow) for (var row=this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row>0; row--) el.removeChild(el.firstChild); if (oldConfig.lastRow > config.lastRow) for (var row=this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row>0; row--) el.removeChild(el.lastChild); if (config.firstRow < oldConfig.firstRow) { var fragment = this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1); if (el.firstChild) el.insertBefore(fragment, el.firstChild); else el.appendChild(fragment); } if (config.lastRow > oldConfig.lastRow) { var fragment = this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow); el.appendChild(fragment); } }; this.$renderLinesFragment = function(config, firstRow, lastRow) { var fragment = this.element.ownerDocument.createDocumentFragment(); var row = firstRow; var foldLine = this.session.getNextFoldLine(row); var foldStart = foldLine ? foldLine.start.row : Infinity; while (true) { if (row > foldStart) { row = foldLine.end.row+1; foldLine = this.session.getNextFoldLine(row, foldLine); foldStart = foldLine ? foldLine.start.row : Infinity; } if (row > lastRow) break; var container = dom.createElement("div"); var html = []; this.$renderLine(html, row, false, row == foldStart ? foldLine : false); container.innerHTML = html.join(""); if (this.$useLineGroups()) { container.className = 'ace_line_group'; fragment.appendChild(container); container.style.height = config.lineHeight * this.session.getRowLength(row) + "px"; } else { while(container.firstChild) fragment.appendChild(container.firstChild); } row++; } return fragment; }; this.update = function(config) { this.config = config; var html = []; var firstRow = config.firstRow, lastRow = config.lastRow; var row = firstRow; var foldLine = this.session.getNextFoldLine(row); var foldStart = foldLine ? foldLine.start.row : Infinity; while (true) { if (row > foldStart) { row = foldLine.end.row+1; foldLine = this.session.getNextFoldLine(row, foldLine); foldStart = foldLine ? foldLine.start.row :Infinity; } if (row > lastRow) break; if (this.$useLineGroups()) html.push("
    ") this.$renderLine(html, row, false, row == foldStart ? foldLine : false); if (this.$useLineGroups()) html.push("
    "); // end the line group row++; } this.element.innerHTML = html.join(""); }; this.$textToken = { "text": true, "rparen": true, "lparen": true }; this.$renderToken = function(stringBuilder, screenColumn, token, value) { var self = this; var replaceReg = /\t|&|<|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g; var replaceFunc = function(c, a, b, tabIdx, idx4) { if (a) { return self.showInvisibles ? "" + lang.stringRepeat(self.SPACE_CHAR, c.length) + "" : lang.stringRepeat("\xa0", c.length); } else if (c == "&") { return "&"; } else if (c == "<") { return "<"; } else if (c == "\t") { var tabSize = self.session.getScreenTabSize(screenColumn + tabIdx); screenColumn += tabSize - 1; return self.$tabStrings[tabSize]; } else if (c == "\u3000") { var classToUse = self.showInvisibles ? "ace_cjk ace_invisible ace_invisible_space" : "ace_cjk"; var space = self.showInvisibles ? self.SPACE_CHAR : ""; screenColumn += 1; return "" + space + ""; } else if (b) { return "" + self.SPACE_CHAR + ""; } else { screenColumn += 1; return "" + c + ""; } }; var output = value.replace(replaceReg, replaceFunc); if (!this.$textToken[token.type]) { var classes = "ace_" + token.type.replace(/\./g, " ace_"); var style = ""; if (token.type == "fold") style = " style='width:" + (token.value.length * this.config.characterWidth) + "px;' "; stringBuilder.push("", output, ""); } else { stringBuilder.push(output); } return screenColumn + value.length; }; this.renderIndentGuide = function(stringBuilder, value, max) { var cols = value.search(this.$indentGuideRe); if (cols <= 0 || cols >= max) return value; if (value[0] == " ") { cols -= cols % this.tabSize; stringBuilder.push(lang.stringRepeat(this.$tabStrings[" "], cols/this.tabSize)); return value.substr(cols); } else if (value[0] == "\t") { stringBuilder.push(lang.stringRepeat(this.$tabStrings["\t"], cols)); return value.substr(cols); } return value; }; this.$renderWrappedLine = function(stringBuilder, tokens, splits, onlyContents) { var chars = 0; var split = 0; var splitChars = splits[0]; var screenColumn = 0; for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; var value = token.value; if (i == 0 && this.displayIndentGuides) { chars = value.length; value = this.renderIndentGuide(stringBuilder, value, splitChars); if (!value) continue; chars -= value.length; } if (chars + value.length < splitChars) { screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value); chars += value.length; } else { while (chars + value.length >= splitChars) { screenColumn = this.$renderToken( stringBuilder, screenColumn, token, value.substring(0, splitChars - chars) ); value = value.substring(splitChars - chars); chars = splitChars; if (!onlyContents) { stringBuilder.push("
    ", "
    " ); } split ++; screenColumn = 0; splitChars = splits[split] || Number.MAX_VALUE; } if (value.length != 0) { chars += value.length; screenColumn = this.$renderToken( stringBuilder, screenColumn, token, value ); } } } }; this.$renderSimpleLine = function(stringBuilder, tokens) { var screenColumn = 0; var token = tokens[0]; var value = token.value; if (this.displayIndentGuides) value = this.renderIndentGuide(stringBuilder, value); if (value) screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value); for (var i = 1; i < tokens.length; i++) { token = tokens[i]; value = token.value; screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value); } }; this.$renderLine = function(stringBuilder, row, onlyContents, foldLine) { if (!foldLine && foldLine != false) foldLine = this.session.getFoldLine(row); if (foldLine) var tokens = this.$getFoldLineTokens(row, foldLine); else var tokens = this.session.getTokens(row); if (!onlyContents) { stringBuilder.push( "
    " ); } if (tokens.length) { var splits = this.session.getRowSplitData(row); if (splits && splits.length) this.$renderWrappedLine(stringBuilder, tokens, splits, onlyContents); else this.$renderSimpleLine(stringBuilder, tokens); } if (this.showInvisibles) { if (foldLine) row = foldLine.end.row stringBuilder.push( "", row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR, "" ); } if (!onlyContents) stringBuilder.push("
    "); }; this.$getFoldLineTokens = function(row, foldLine) { var session = this.session; var renderTokens = []; function addTokens(tokens, from, to) { var idx = 0, col = 0; while ((col + tokens[idx].value.length) < from) { col += tokens[idx].value.length; idx++; if (idx == tokens.length) return; } if (col != from) { var value = tokens[idx].value.substring(from - col); if (value.length > (to - from)) value = value.substring(0, to - from); renderTokens.push({ type: tokens[idx].type, value: value }); col = from + value.length; idx += 1; } while (col < to && idx < tokens.length) { var value = tokens[idx].value; if (value.length + col > to) { renderTokens.push({ type: tokens[idx].type, value: value.substring(0, to - col) }); } else renderTokens.push(tokens[idx]); col += value.length; idx += 1; } } var tokens = session.getTokens(row); foldLine.walk(function(placeholder, row, column, lastColumn, isNewRow) { if (placeholder != null) { renderTokens.push({ type: "fold", value: placeholder }); } else { if (isNewRow) tokens = session.getTokens(row); if (tokens.length) addTokens(tokens, lastColumn, column); } }, foldLine.end.row, this.session.getLine(foldLine.end.row).length); return renderTokens; }; this.$useLineGroups = function() { return this.session.getUseWrapMode(); }; this.destroy = function() { clearInterval(this.$pollSizeChangesTimer); if (this.$measureNode) this.$measureNode.parentNode.removeChild(this.$measureNode); delete this.$measureNode; }; }).call(Text.prototype); exports.Text = Text; }); define("ace/layer/cursor",["require","exports","module","ace/lib/dom"], function(require, exports, module) { "use strict"; var dom = require("../lib/dom"); var IE8; var Cursor = function(parentEl) { this.element = dom.createElement("div"); this.element.className = "ace_layer ace_cursor-layer"; parentEl.appendChild(this.element); if (IE8 === undefined) IE8 = "opacity" in this.element; this.isVisible = false; this.isBlinking = true; this.blinkInterval = 1000; this.smoothBlinking = false; this.cursors = []; this.cursor = this.addCursor(); dom.addCssClass(this.element, "ace_hidden-cursors"); this.$updateCursors = this.$updateVisibility.bind(this); }; (function() { this.$updateVisibility = function(val) { var cursors = this.cursors; for (var i = cursors.length; i--; ) cursors[i].style.visibility = val ? "" : "hidden"; }; this.$updateOpacity = function(val) { var cursors = this.cursors; for (var i = cursors.length; i--; ) cursors[i].style.opacity = val ? "" : "0"; }; this.$padding = 0; this.setPadding = function(padding) { this.$padding = padding; }; this.setSession = function(session) { this.session = session; }; this.setBlinking = function(blinking) { if (blinking != this.isBlinking){ this.isBlinking = blinking; this.restartTimer(); } }; this.setBlinkInterval = function(blinkInterval) { if (blinkInterval != this.blinkInterval){ this.blinkInterval = blinkInterval; this.restartTimer(); } }; this.setSmoothBlinking = function(smoothBlinking) { if (smoothBlinking != this.smoothBlinking && !IE8) { this.smoothBlinking = smoothBlinking; dom.setCssClass(this.element, "ace_smooth-blinking", smoothBlinking); this.$updateCursors(true); this.$updateCursors = (smoothBlinking ? this.$updateOpacity : this.$updateVisibility).bind(this); this.restartTimer(); } }; this.addCursor = function() { var el = dom.createElement("div"); el.className = "ace_cursor"; this.element.appendChild(el); this.cursors.push(el); return el; }; this.removeCursor = function() { if (this.cursors.length > 1) { var el = this.cursors.pop(); el.parentNode.removeChild(el); return el; } }; this.hideCursor = function() { this.isVisible = false; dom.addCssClass(this.element, "ace_hidden-cursors"); this.restartTimer(); }; this.showCursor = function() { this.isVisible = true; dom.removeCssClass(this.element, "ace_hidden-cursors"); this.restartTimer(); }; this.restartTimer = function() { var update = this.$updateCursors; clearInterval(this.intervalId); clearTimeout(this.timeoutId); if (this.smoothBlinking) { dom.removeCssClass(this.element, "ace_smooth-blinking"); } update(true); if (!this.isBlinking || !this.blinkInterval || !this.isVisible) return; if (this.smoothBlinking) { setTimeout(function(){ dom.addCssClass(this.element, "ace_smooth-blinking"); }.bind(this)); } var blink = function(){ this.timeoutId = setTimeout(function() { update(false); }, 0.6 * this.blinkInterval); }.bind(this); this.intervalId = setInterval(function() { update(true); blink(); }, this.blinkInterval); blink(); }; this.getPixelPosition = function(position, onScreen) { if (!this.config || !this.session) return {left : 0, top : 0}; if (!position) position = this.session.selection.getCursor(); var pos = this.session.documentToScreenPosition(position); var cursorLeft = this.$padding + pos.column * this.config.characterWidth; var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) * this.config.lineHeight; return {left : cursorLeft, top : cursorTop}; }; this.update = function(config) { this.config = config; var selections = this.session.$selectionMarkers; var i = 0, cursorIndex = 0; if (selections === undefined || selections.length === 0){ selections = [{cursor: null}]; } for (var i = 0, n = selections.length; i < n; i++) { var pixelPos = this.getPixelPosition(selections[i].cursor, true); if ((pixelPos.top > config.height + config.offset || pixelPos.top < 0) && i > 1) { continue; } var style = (this.cursors[cursorIndex++] || this.addCursor()).style; if (!this.drawCursor) { style.left = pixelPos.left + "px"; style.top = pixelPos.top + "px"; style.width = config.characterWidth + "px"; style.height = config.lineHeight + "px"; } else { this.drawCursor(style, pixelPos, config, selections[i], this.session); } } while (this.cursors.length > cursorIndex) this.removeCursor(); var overwrite = this.session.getOverwrite(); this.$setOverwrite(overwrite); this.$pixelPos = pixelPos; this.restartTimer(); }; this.drawCursor = null; this.$setOverwrite = function(overwrite) { if (overwrite != this.overwrite) { this.overwrite = overwrite; if (overwrite) dom.addCssClass(this.element, "ace_overwrite-cursors"); else dom.removeCssClass(this.element, "ace_overwrite-cursors"); } }; this.destroy = function() { clearInterval(this.intervalId); clearTimeout(this.timeoutId); }; }).call(Cursor.prototype); exports.Cursor = Cursor; }); define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var dom = require("./lib/dom"); var event = require("./lib/event"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var ScrollBar = function(parent) { this.element = dom.createElement("div"); this.element.className = "ace_scrollbar ace_scrollbar" + this.classSuffix; this.inner = dom.createElement("div"); this.inner.className = "ace_scrollbar-inner"; this.element.appendChild(this.inner); parent.appendChild(this.element); this.setVisible(false); this.skipEvent = false; event.addListener(this.element, "scroll", this.onScroll.bind(this)); event.addListener(this.element, "mousedown", event.preventDefault); }; (function() { oop.implement(this, EventEmitter); this.setVisible = function(isVisible) { this.element.style.display = isVisible ? "" : "none"; this.isVisible = isVisible; }; }).call(ScrollBar.prototype); var VScrollBar = function(parent, renderer) { ScrollBar.call(this, parent); this.scrollTop = 0; renderer.$scrollbarWidth = this.width = dom.scrollbarWidth(parent.ownerDocument); this.inner.style.width = this.element.style.width = (this.width || 15) + 5 + "px"; }; oop.inherits(VScrollBar, ScrollBar); (function() { this.classSuffix = '-v'; this.onScroll = function() { if (!this.skipEvent) { this.scrollTop = this.element.scrollTop; this._emit("scroll", {data: this.scrollTop}); } this.skipEvent = false; }; this.getWidth = function() { return this.isVisible ? this.width : 0; }; this.setHeight = function(height) { this.element.style.height = height + "px"; }; this.setInnerHeight = function(height) { this.inner.style.height = height + "px"; }; this.setScrollHeight = function(height) { this.inner.style.height = height + "px"; }; this.setScrollTop = function(scrollTop) { if (this.scrollTop != scrollTop) { this.skipEvent = true; this.scrollTop = this.element.scrollTop = scrollTop; } }; }).call(VScrollBar.prototype); var HScrollBar = function(parent, renderer) { ScrollBar.call(this, parent); this.scrollLeft = 0; this.height = renderer.$scrollbarWidth; this.inner.style.height = this.element.style.height = (this.height || 15) + 5 + "px"; }; oop.inherits(HScrollBar, ScrollBar); (function() { this.classSuffix = '-h'; this.onScroll = function() { if (!this.skipEvent) { this.scrollLeft = this.element.scrollLeft; this._emit("scroll", {data: this.scrollLeft}); } this.skipEvent = false; }; this.getHeight = function() { return this.isVisible ? this.height : 0; }; this.setWidth = function(width) { this.element.style.width = width + "px"; }; this.setInnerWidth = function(width) { this.inner.style.width = width + "px"; }; this.setScrollWidth = function(width) { this.inner.style.width = width + "px"; }; this.setScrollLeft = function(scrollLeft) { if (this.scrollLeft != scrollLeft) { this.skipEvent = true; this.scrollLeft = this.element.scrollLeft = scrollLeft; } }; }).call(HScrollBar.prototype); exports.ScrollBar = VScrollBar; // backward compatibility exports.ScrollBarV = VScrollBar; // backward compatibility exports.ScrollBarH = HScrollBar; // backward compatibility exports.VScrollBar = VScrollBar; exports.HScrollBar = HScrollBar; }); define("ace/renderloop",["require","exports","module","ace/lib/event"], function(require, exports, module) { "use strict"; var event = require("./lib/event"); var RenderLoop = function(onRender, win) { this.onRender = onRender; this.pending = false; this.changes = 0; this.window = win || window; }; (function() { this.schedule = function(change) { this.changes = this.changes | change; if (!this.pending && this.changes) { this.pending = true; var _self = this; event.nextFrame(function() { _self.pending = false; var changes; while (changes = _self.changes) { _self.changes = 0; _self.onRender(changes); } }, this.window); } }; }).call(RenderLoop.prototype); exports.RenderLoop = RenderLoop; }); define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"], function(require, exports, module) { var oop = require("../lib/oop"); var dom = require("../lib/dom"); var lang = require("../lib/lang"); var useragent = require("../lib/useragent"); var EventEmitter = require("../lib/event_emitter").EventEmitter; var CHAR_COUNT = 0; var FontMetrics = exports.FontMetrics = function(parentEl, interval) { this.el = dom.createElement("div"); this.$setMeasureNodeStyles(this.el.style, true); this.$main = dom.createElement("div"); this.$setMeasureNodeStyles(this.$main.style); this.$measureNode = dom.createElement("div"); this.$setMeasureNodeStyles(this.$measureNode.style); this.el.appendChild(this.$main); this.el.appendChild(this.$measureNode); parentEl.appendChild(this.el); if (!CHAR_COUNT) this.$testFractionalRect(); this.$measureNode.innerHTML = lang.stringRepeat("X", CHAR_COUNT); this.$characterSize = {width: 0, height: 0}; this.checkForSizeChanges(); }; (function() { oop.implement(this, EventEmitter); this.$characterSize = {width: 0, height: 0}; this.$testFractionalRect = function() { var el = dom.createElement("div"); this.$setMeasureNodeStyles(el.style); el.style.width = "0.2px"; document.documentElement.appendChild(el); var w = el.getBoundingClientRect().width; if (w > 0 && w < 1) CHAR_COUNT = 50; else CHAR_COUNT = 100; el.parentNode.removeChild(el); }; this.$setMeasureNodeStyles = function(style, isRoot) { style.width = style.height = "auto"; style.left = style.top = "0px"; style.visibility = "hidden"; style.position = "absolute"; style.whiteSpace = "pre"; if (useragent.isIE < 8) { style["font-family"] = "inherit"; } else { style.font = "inherit"; } style.overflow = isRoot ? "hidden" : "visible"; }; this.checkForSizeChanges = function() { var size = this.$measureSizes(); if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) { this.$measureNode.style.fontWeight = "bold"; var boldSize = this.$measureSizes(); this.$measureNode.style.fontWeight = ""; this.$characterSize = size; this.charSizes = Object.create(null); this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height; this._emit("changeCharacterSize", {data: size}); } }; this.$pollSizeChanges = function() { if (this.$pollSizeChangesTimer) return this.$pollSizeChangesTimer; var self = this; return this.$pollSizeChangesTimer = setInterval(function() { self.checkForSizeChanges(); }, 500); }; this.setPolling = function(val) { if (val) { this.$pollSizeChanges(); } else { if (this.$pollSizeChangesTimer) this.$pollSizeChangesTimer; } }; this.$measureSizes = function() { if (CHAR_COUNT === 50) { var rect = null; try { rect = this.$measureNode.getBoundingClientRect(); } catch(e) { rect = {width: 0, height:0 }; }; var size = { height: rect.height, width: rect.width / CHAR_COUNT }; } else { var size = { height: this.$measureNode.clientHeight, width: this.$measureNode.clientWidth / CHAR_COUNT }; } if (size.width === 0 || size.height === 0) return null; return size; }; this.$measureCharWidth = function(ch) { this.$main.innerHTML = lang.stringRepeat(ch, CHAR_COUNT); var rect = this.$main.getBoundingClientRect(); return rect.width / CHAR_COUNT; }; this.getCharacterWidth = function(ch) { var w = this.charSizes[ch]; if (w === undefined) { this.charSizes[ch] = this.$measureCharWidth(ch) / this.$characterSize.width; } return w; }; this.destroy = function() { clearInterval(this.$pollSizeChangesTimer); if (this.el && this.el.parentNode) this.el.parentNode.removeChild(this.el); }; }).call(FontMetrics.prototype); }); define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var dom = require("./lib/dom"); var config = require("./config"); var useragent = require("./lib/useragent"); var GutterLayer = require("./layer/gutter").Gutter; var MarkerLayer = require("./layer/marker").Marker; var TextLayer = require("./layer/text").Text; var CursorLayer = require("./layer/cursor").Cursor; var HScrollBar = require("./scrollbar").HScrollBar; var VScrollBar = require("./scrollbar").VScrollBar; var RenderLoop = require("./renderloop").RenderLoop; var FontMetrics = require("./layer/font_metrics").FontMetrics; var EventEmitter = require("./lib/event_emitter").EventEmitter; var editorCss = ".ace_editor {\ position: relative;\ overflow: hidden;\ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;\ direction: ltr;\ }\ .ace_scroller {\ position: absolute;\ overflow: hidden;\ top: 0;\ bottom: 0;\ background-color: inherit;\ -ms-user-select: none;\ -moz-user-select: none;\ -webkit-user-select: none;\ user-select: none;\ cursor: text;\ }\ .ace_content {\ position: absolute;\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ min-width: 100%;\ }\ .ace_dragging .ace_scroller:before{\ position: absolute;\ top: 0;\ left: 0;\ right: 0;\ bottom: 0;\ content: '';\ background: rgba(250, 250, 250, 0.01);\ z-index: 1000;\ }\ .ace_dragging.ace_dark .ace_scroller:before{\ background: rgba(0, 0, 0, 0.01);\ }\ .ace_selecting, .ace_selecting * {\ cursor: text !important;\ }\ .ace_gutter {\ position: absolute;\ overflow : hidden;\ width: auto;\ top: 0;\ bottom: 0;\ left: 0;\ cursor: default;\ z-index: 4;\ -ms-user-select: none;\ -moz-user-select: none;\ -webkit-user-select: none;\ user-select: none;\ }\ .ace_gutter-active-line {\ position: absolute;\ left: 0;\ right: 0;\ }\ .ace_scroller.ace_scroll-left {\ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\ }\ .ace_gutter-cell {\ padding-left: 19px;\ padding-right: 6px;\ background-repeat: no-repeat;\ }\ .ace_gutter-cell.ace_error {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==\");\ background-repeat: no-repeat;\ background-position: 2px center;\ }\ .ace_gutter-cell.ace_warning {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==\");\ background-position: 2px center;\ }\ .ace_gutter-cell.ace_info {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=\");\ background-position: 2px center;\ }\ .ace_dark .ace_gutter-cell.ace_info {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC\");\ }\ .ace_scrollbar {\ position: absolute;\ right: 0;\ bottom: 0;\ z-index: 6;\ }\ .ace_scrollbar-inner {\ position: absolute;\ cursor: text;\ left: 0;\ top: 0;\ }\ .ace_scrollbar-v{\ overflow-x: hidden;\ overflow-y: scroll;\ top: 0;\ }\ .ace_scrollbar-h {\ overflow-x: scroll;\ overflow-y: hidden;\ left: 0;\ }\ .ace_print-margin {\ position: absolute;\ height: 100%;\ }\ .ace_text-input {\ position: absolute;\ z-index: 0;\ width: 0.5em;\ height: 1em;\ opacity: 0;\ background: transparent;\ -moz-appearance: none;\ appearance: none;\ border: none;\ resize: none;\ outline: none;\ overflow: hidden;\ font: inherit;\ padding: 0 1px;\ margin: 0 -1px;\ text-indent: -1em;\ -ms-user-select: text;\ -moz-user-select: text;\ -webkit-user-select: text;\ user-select: text;\ }\ .ace_text-input.ace_composition {\ background: inherit;\ color: inherit;\ z-index: 1000;\ opacity: 1;\ text-indent: 0;\ }\ .ace_layer {\ z-index: 1;\ position: absolute;\ overflow: hidden;\ word-wrap: normal;\ white-space: pre;\ height: 100%;\ width: 100%;\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ pointer-events: none;\ }\ .ace_gutter-layer {\ position: relative;\ width: auto;\ text-align: right;\ pointer-events: auto;\ }\ .ace_text-layer {\ font: inherit !important;\ }\ .ace_cjk {\ display: inline-block;\ text-align: center;\ }\ .ace_cursor-layer {\ z-index: 4;\ }\ .ace_cursor {\ z-index: 4;\ position: absolute;\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ border-left: 2px solid\ }\ .ace_slim-cursors .ace_cursor {\ border-left-width: 1px;\ }\ .ace_overwrite-cursors .ace_cursor {\ border-left-width: 0;\ border-bottom: 1px solid;\ }\ .ace_hidden-cursors .ace_cursor {\ opacity: 0.2;\ }\ .ace_smooth-blinking .ace_cursor {\ -webkit-transition: opacity 0.18s;\ transition: opacity 0.18s;\ }\ .ace_editor.ace_multiselect .ace_cursor {\ border-left-width: 1px;\ }\ .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\ position: absolute;\ z-index: 3;\ }\ .ace_marker-layer .ace_selection {\ position: absolute;\ z-index: 5;\ }\ .ace_marker-layer .ace_bracket {\ position: absolute;\ z-index: 6;\ }\ .ace_marker-layer .ace_active-line {\ position: absolute;\ z-index: 2;\ }\ .ace_marker-layer .ace_selected-word {\ position: absolute;\ z-index: 4;\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ }\ .ace_line .ace_fold {\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ display: inline-block;\ height: 11px;\ margin-top: -2px;\ vertical-align: middle;\ background-image:\ url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\"),\ url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=\");\ background-repeat: no-repeat, repeat-x;\ background-position: center center, top left;\ color: transparent;\ border: 1px solid black;\ border-radius: 2px;\ cursor: pointer;\ pointer-events: auto;\ }\ .ace_dark .ace_fold {\ }\ .ace_fold:hover{\ background-image:\ url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\"),\ url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC\");\ }\ .ace_tooltip {\ background-color: #FFF;\ background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));\ background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\ border: 1px solid gray;\ border-radius: 1px;\ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\ color: black;\ max-width: 100%;\ padding: 3px 4px;\ position: fixed;\ z-index: 999999;\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ cursor: default;\ white-space: pre;\ word-wrap: break-word;\ line-height: normal;\ font-style: normal;\ font-weight: normal;\ letter-spacing: normal;\ pointer-events: none;\ }\ .ace_folding-enabled > .ace_gutter-cell {\ padding-right: 13px;\ }\ .ace_fold-widget {\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ margin: 0 -12px 0 1px;\ display: none;\ width: 11px;\ vertical-align: top;\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==\");\ background-repeat: no-repeat;\ background-position: center;\ border-radius: 3px;\ border: 1px solid transparent;\ cursor: pointer;\ }\ .ace_folding-enabled .ace_fold-widget {\ display: inline-block; \ }\ .ace_fold-widget.ace_end {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==\");\ }\ .ace_fold-widget.ace_closed {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==\");\ }\ .ace_fold-widget:hover {\ border: 1px solid rgba(0, 0, 0, 0.3);\ background-color: rgba(255, 255, 255, 0.2);\ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\ }\ .ace_fold-widget:active {\ border: 1px solid rgba(0, 0, 0, 0.4);\ background-color: rgba(0, 0, 0, 0.05);\ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\ }\ .ace_dark .ace_fold-widget {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\");\ }\ .ace_dark .ace_fold-widget.ace_end {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\");\ }\ .ace_dark .ace_fold-widget.ace_closed {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\");\ }\ .ace_dark .ace_fold-widget:hover {\ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\ background-color: rgba(255, 255, 255, 0.1);\ }\ .ace_dark .ace_fold-widget:active {\ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\ }\ .ace_fold-widget.ace_invalid {\ background-color: #FFB4B4;\ border-color: #DE5555;\ }\ .ace_fade-fold-widgets .ace_fold-widget {\ -webkit-transition: opacity 0.4s ease 0.05s;\ transition: opacity 0.4s ease 0.05s;\ opacity: 0;\ }\ .ace_fade-fold-widgets:hover .ace_fold-widget {\ -webkit-transition: opacity 0.05s ease 0.05s;\ transition: opacity 0.05s ease 0.05s;\ opacity:1;\ }\ .ace_underline {\ text-decoration: underline;\ }\ .ace_bold {\ font-weight: bold;\ }\ .ace_nobold .ace_bold {\ font-weight: normal;\ }\ .ace_italic {\ font-style: italic;\ }\ .ace_error-marker {\ background-color: rgba(255, 0, 0,0.2);\ position: absolute;\ z-index: 9;\ }\ .ace_highlight-marker {\ background-color: rgba(255, 255, 0,0.2);\ position: absolute;\ z-index: 8;\ }\ "; dom.importCssString(editorCss, "ace_editor"); var VirtualRenderer = function(container, theme) { var _self = this; this.container = container || dom.createElement("div"); this.$keepTextAreaAtCursor = !useragent.isOldIE; dom.addCssClass(this.container, "ace_editor"); this.setTheme(theme); this.$gutter = dom.createElement("div"); this.$gutter.className = "ace_gutter"; this.container.appendChild(this.$gutter); this.scroller = dom.createElement("div"); this.scroller.className = "ace_scroller"; this.container.appendChild(this.scroller); this.content = dom.createElement("div"); this.content.className = "ace_content"; this.scroller.appendChild(this.content); this.$gutterLayer = new GutterLayer(this.$gutter); this.$gutterLayer.on("changeGutterWidth", this.onGutterResize.bind(this)); this.$markerBack = new MarkerLayer(this.content); var textLayer = this.$textLayer = new TextLayer(this.content); this.canvas = textLayer.element; this.$markerFront = new MarkerLayer(this.content); this.$cursorLayer = new CursorLayer(this.content); this.$horizScroll = false; this.$vScroll = false; this.scrollBar = this.scrollBarV = new VScrollBar(this.container, this); this.scrollBarH = new HScrollBar(this.container, this); this.scrollBarV.addEventListener("scroll", function(e) { if (!_self.$scrollAnimation) _self.session.setScrollTop(e.data - _self.scrollMargin.top); }); this.scrollBarH.addEventListener("scroll", function(e) { if (!_self.$scrollAnimation) _self.session.setScrollLeft(e.data - _self.scrollMargin.left); }); this.scrollTop = 0; this.scrollLeft = 0; this.cursorPos = { row : 0, column : 0 }; this.$fontMetrics = new FontMetrics(this.container, 500); this.$textLayer.$setFontMetrics(this.$fontMetrics); this.$textLayer.addEventListener("changeCharacterSize", function(e) { _self.updateCharacterSize(); _self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height); _self._signal("changeCharacterSize", e); }); this.$size = { width: 0, height: 0, scrollerHeight: 0, scrollerWidth: 0, $dirty: true }; this.layerConfig = { width : 1, padding : 0, firstRow : 0, firstRowScreen: 0, lastRow : 0, lineHeight : 0, characterWidth : 0, minHeight : 1, maxHeight : 1, offset : 0, height : 1, gutterOffset: 1 }; this.scrollMargin = { left: 0, right: 0, top: 0, bottom: 0, v: 0, h: 0 }; this.$loop = new RenderLoop( this.$renderChanges.bind(this), this.container.ownerDocument.defaultView ); this.$loop.schedule(this.CHANGE_FULL); this.updateCharacterSize(); this.setPadding(4); config.resetOptions(this); config._emit("renderer", this); }; (function() { this.CHANGE_CURSOR = 1; this.CHANGE_MARKER = 2; this.CHANGE_GUTTER = 4; this.CHANGE_SCROLL = 8; this.CHANGE_LINES = 16; this.CHANGE_TEXT = 32; this.CHANGE_SIZE = 64; this.CHANGE_MARKER_BACK = 128; this.CHANGE_MARKER_FRONT = 256; this.CHANGE_FULL = 512; this.CHANGE_H_SCROLL = 1024; oop.implement(this, EventEmitter); this.updateCharacterSize = function() { if (this.$textLayer.allowBoldFonts != this.$allowBoldFonts) { this.$allowBoldFonts = this.$textLayer.allowBoldFonts; this.setStyle("ace_nobold", !this.$allowBoldFonts); } this.layerConfig.characterWidth = this.characterWidth = this.$textLayer.getCharacterWidth(); this.layerConfig.lineHeight = this.lineHeight = this.$textLayer.getLineHeight(); this.$updatePrintMargin(); }; this.setSession = function(session) { if (this.session) this.session.doc.off("changeNewLineMode", this.onChangeNewLineMode); this.session = session; if (session && this.scrollMargin.top && session.getScrollTop() <= 0) session.setScrollTop(-this.scrollMargin.top); this.$cursorLayer.setSession(session); this.$markerBack.setSession(session); this.$markerFront.setSession(session); this.$gutterLayer.setSession(session); this.$textLayer.setSession(session); if (!session) return; this.$loop.schedule(this.CHANGE_FULL); this.session.$setFontMetrics(this.$fontMetrics); this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this); this.onChangeNewLineMode() this.session.doc.on("changeNewLineMode", this.onChangeNewLineMode); }; this.updateLines = function(firstRow, lastRow, force) { if (lastRow === undefined) lastRow = Infinity; if (!this.$changedLines) { this.$changedLines = { firstRow: firstRow, lastRow: lastRow }; } else { if (this.$changedLines.firstRow > firstRow) this.$changedLines.firstRow = firstRow; if (this.$changedLines.lastRow < lastRow) this.$changedLines.lastRow = lastRow; } if (this.$changedLines.lastRow < this.layerConfig.firstRow) { if (force) this.$changedLines.lastRow = this.layerConfig.lastRow; else return; } if (this.$changedLines.firstRow > this.layerConfig.lastRow) return; this.$loop.schedule(this.CHANGE_LINES); }; this.onChangeNewLineMode = function() { this.$loop.schedule(this.CHANGE_TEXT); this.$textLayer.$updateEolChar(); }; this.onChangeTabSize = function() { this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER); this.$textLayer.onChangeTabSize(); }; this.updateText = function() { this.$loop.schedule(this.CHANGE_TEXT); }; this.updateFull = function(force) { if (force) this.$renderChanges(this.CHANGE_FULL, true); else this.$loop.schedule(this.CHANGE_FULL); }; this.updateFontSize = function() { this.$textLayer.checkForSizeChanges(); }; this.$changes = 0; this.$updateSizeAsync = function() { if (this.$loop.pending) this.$size.$dirty = true; else this.onResize(); }; this.onResize = function(force, gutterWidth, width, height) { if (this.resizing > 2) return; else if (this.resizing > 0) this.resizing++; else this.resizing = force ? 1 : 0; var el = this.container; if (!height) height = el.clientHeight || el.scrollHeight; if (!width) width = el.clientWidth || el.scrollWidth; var changes = this.$updateCachedSize(force, gutterWidth, width, height); if (!this.$size.scrollerHeight || (!width && !height)) return this.resizing = 0; if (force) this.$gutterLayer.$padding = null; if (force) this.$renderChanges(changes | this.$changes, true); else this.$loop.schedule(changes | this.$changes); if (this.resizing) this.resizing = 0; this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null; }; this.$updateCachedSize = function(force, gutterWidth, width, height) { height -= (this.$extraHeight || 0); var changes = 0; var size = this.$size; var oldSize = { width: size.width, height: size.height, scrollerHeight: size.scrollerHeight, scrollerWidth: size.scrollerWidth }; if (height && (force || size.height != height)) { size.height = height; changes |= this.CHANGE_SIZE; size.scrollerHeight = size.height; if (this.$horizScroll) size.scrollerHeight -= this.scrollBarH.getHeight(); this.scrollBarV.element.style.bottom = this.scrollBarH.getHeight() + "px"; changes = changes | this.CHANGE_SCROLL; } if (width && (force || size.width != width)) { changes |= this.CHANGE_SIZE; size.width = width; if (gutterWidth == null) gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0; this.gutterWidth = gutterWidth; this.scrollBarH.element.style.left = this.scroller.style.left = gutterWidth + "px"; size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth()); this.scrollBarH.element.style.right = this.scroller.style.right = this.scrollBarV.getWidth() + "px"; this.scroller.style.bottom = this.scrollBarH.getHeight() + "px"; if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force) changes |= this.CHANGE_FULL; } size.$dirty = !width || !height; if (changes) this._signal("resize", oldSize); return changes; }; this.onGutterResize = function() { var gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0; if (gutterWidth != this.gutterWidth) this.$changes |= this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height); if (this.session.getUseWrapMode() && this.adjustWrapLimit()) { this.$loop.schedule(this.CHANGE_FULL); } else if (this.$size.$dirty) { this.$loop.schedule(this.CHANGE_FULL); } else { this.$computeLayerConfig(); this.$loop.schedule(this.CHANGE_MARKER); } }; this.adjustWrapLimit = function() { var availableWidth = this.$size.scrollerWidth - this.$padding * 2; var limit = Math.floor(availableWidth / this.characterWidth); return this.session.adjustWrapLimit(limit, this.$showPrintMargin && this.$printMarginColumn); }; this.setAnimatedScroll = function(shouldAnimate){ this.setOption("animatedScroll", shouldAnimate); }; this.getAnimatedScroll = function() { return this.$animatedScroll; }; this.setShowInvisibles = function(showInvisibles) { this.setOption("showInvisibles", showInvisibles); }; this.getShowInvisibles = function() { return this.getOption("showInvisibles"); }; this.getDisplayIndentGuides = function() { return this.getOption("displayIndentGuides"); }; this.setDisplayIndentGuides = function(display) { this.setOption("displayIndentGuides", display); }; this.setShowPrintMargin = function(showPrintMargin) { this.setOption("showPrintMargin", showPrintMargin); }; this.getShowPrintMargin = function() { return this.getOption("showPrintMargin"); }; this.setPrintMarginColumn = function(showPrintMargin) { this.setOption("printMarginColumn", showPrintMargin); }; this.getPrintMarginColumn = function() { return this.getOption("printMarginColumn"); }; this.getShowGutter = function(){ return this.getOption("showGutter"); }; this.setShowGutter = function(show){ return this.setOption("showGutter", show); }; this.getFadeFoldWidgets = function(){ return this.getOption("fadeFoldWidgets") }; this.setFadeFoldWidgets = function(show) { this.setOption("fadeFoldWidgets", show); }; this.setHighlightGutterLine = function(shouldHighlight) { this.setOption("highlightGutterLine", shouldHighlight); }; this.getHighlightGutterLine = function() { return this.getOption("highlightGutterLine"); }; this.$updateGutterLineHighlight = function() { var pos = this.$cursorLayer.$pixelPos; var height = this.layerConfig.lineHeight; if (this.session.getUseWrapMode()) { var cursor = this.session.selection.getCursor(); cursor.column = 0; pos = this.$cursorLayer.getPixelPosition(cursor, true); height *= this.session.getRowLength(cursor.row); } this.$gutterLineHighlight.style.top = pos.top - this.layerConfig.offset + "px"; this.$gutterLineHighlight.style.height = height + "px"; }; this.$updatePrintMargin = function() { if (!this.$showPrintMargin && !this.$printMarginEl) return; if (!this.$printMarginEl) { var containerEl = dom.createElement("div"); containerEl.className = "ace_layer ace_print-margin-layer"; this.$printMarginEl = dom.createElement("div"); this.$printMarginEl.className = "ace_print-margin"; containerEl.appendChild(this.$printMarginEl); this.content.insertBefore(containerEl, this.content.firstChild); } var style = this.$printMarginEl.style; style.left = ((this.characterWidth * this.$printMarginColumn) + this.$padding) + "px"; style.visibility = this.$showPrintMargin ? "visible" : "hidden"; if (this.session && this.session.$wrap == -1) this.adjustWrapLimit(); }; this.getContainerElement = function() { return this.container; }; this.getMouseEventTarget = function() { return this.content; }; this.getTextAreaContainer = function() { return this.container; }; this.$moveTextAreaToCursor = function() { if (!this.$keepTextAreaAtCursor) return; var config = this.layerConfig; var posTop = this.$cursorLayer.$pixelPos.top; var posLeft = this.$cursorLayer.$pixelPos.left; posTop -= config.offset; var style = this.textarea.style; var h = this.lineHeight; if (posTop < 0 || posTop > config.height - h) { style.top = style.left = "0"; return; } var w = this.characterWidth; if (this.$composition) { var val = this.textarea.value.replace(/^\x01+/, ""); w *= (this.session.$getStringScreenWidth(val)[0]+2); h += 2; } posLeft -= this.scrollLeft; if (posLeft > this.$size.scrollerWidth - w) posLeft = this.$size.scrollerWidth - w; posLeft += this.gutterWidth; style.height = h + "px"; style.width = w + "px"; style.left = Math.min(posLeft, this.$size.scrollerWidth - w) + "px"; style.top = Math.min(posTop, this.$size.height - h) + "px"; }; this.getFirstVisibleRow = function() { return this.layerConfig.firstRow; }; this.getFirstFullyVisibleRow = function() { return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1); }; this.getLastFullyVisibleRow = function() { var flint = Math.floor((this.layerConfig.height + this.layerConfig.offset) / this.layerConfig.lineHeight); return this.layerConfig.firstRow - 1 + flint; }; this.getLastVisibleRow = function() { return this.layerConfig.lastRow; }; this.$padding = null; this.setPadding = function(padding) { this.$padding = padding; this.$textLayer.setPadding(padding); this.$cursorLayer.setPadding(padding); this.$markerFront.setPadding(padding); this.$markerBack.setPadding(padding); this.$loop.schedule(this.CHANGE_FULL); this.$updatePrintMargin(); }; this.setScrollMargin = function(top, bottom, left, right) { var sm = this.scrollMargin; sm.top = top|0; sm.bottom = bottom|0; sm.right = right|0; sm.left = left|0; sm.v = sm.top + sm.bottom; sm.h = sm.left + sm.right; if (sm.top && this.scrollTop <= 0 && this.session) this.session.setScrollTop(-sm.top); this.updateFull(); }; this.getHScrollBarAlwaysVisible = function() { return this.$hScrollBarAlwaysVisible; }; this.setHScrollBarAlwaysVisible = function(alwaysVisible) { this.setOption("hScrollBarAlwaysVisible", alwaysVisible); }; this.getVScrollBarAlwaysVisible = function() { return this.$vScrollBarAlwaysVisible; }; this.setVScrollBarAlwaysVisible = function(alwaysVisible) { this.setOption("vScrollBarAlwaysVisible", alwaysVisible); }; this.$updateScrollBarV = function() { var scrollHeight = this.layerConfig.maxHeight; var scrollerHeight = this.$size.scrollerHeight; if (!this.$maxLines && this.$scrollPastEnd) { scrollHeight -= (scrollerHeight - this.lineHeight) * this.$scrollPastEnd; if (this.scrollTop > scrollHeight - scrollerHeight) { scrollHeight = this.scrollTop + scrollerHeight; this.scrollBarV.scrollTop = null; } } this.scrollBarV.setScrollHeight(scrollHeight + this.scrollMargin.v); this.scrollBarV.setScrollTop(this.scrollTop + this.scrollMargin.top); }; this.$updateScrollBarH = function() { this.scrollBarH.setScrollWidth(this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h); this.scrollBarH.setScrollLeft(this.scrollLeft + this.scrollMargin.left); }; this.$frozen = false; this.freeze = function() { this.$frozen = true; }; this.unfreeze = function() { this.$frozen = false; }; this.$renderChanges = function(changes, force) { if (this.$changes) { changes |= this.$changes; this.$changes = 0; } if ((!this.session || !this.container.offsetWidth || this.$frozen) || (!changes && !force)) { this.$changes |= changes; return; } if (this.$size.$dirty) { this.$changes |= changes; return this.onResize(true); } if (!this.lineHeight) { this.$textLayer.checkForSizeChanges(); } this._signal("beforeRender"); var config = this.layerConfig; if (changes & this.CHANGE_FULL || changes & this.CHANGE_SIZE || changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES || changes & this.CHANGE_SCROLL || changes & this.CHANGE_H_SCROLL ) { changes |= this.$computeLayerConfig(); if (config.firstRow != this.layerConfig.firstRow && config.firstRowScreen == this.layerConfig.firstRowScreen) { var st = this.scrollTop + (config.firstRow - this.layerConfig.firstRow) * this.lineHeight; if (st > 0) { this.scrollTop = st; changes = changes | this.CHANGE_SCROLL; changes |= this.$computeLayerConfig(); } } config = this.layerConfig; this.$updateScrollBarV(); if (changes & this.CHANGE_H_SCROLL) this.$updateScrollBarH(); this.$gutterLayer.element.style.marginTop = (-config.offset) + "px"; this.content.style.marginTop = (-config.offset) + "px"; this.content.style.width = config.width + 2 * this.$padding + "px"; this.content.style.height = config.minHeight + "px"; } if (changes & this.CHANGE_H_SCROLL) { this.content.style.marginLeft = -this.scrollLeft + "px"; this.scroller.className = this.scrollLeft <= 0 ? "ace_scroller" : "ace_scroller ace_scroll-left"; } if (changes & this.CHANGE_FULL) { this.$textLayer.update(config); if (this.$showGutter) this.$gutterLayer.update(config); this.$markerBack.update(config); this.$markerFront.update(config); this.$cursorLayer.update(config); this.$moveTextAreaToCursor(); this.$highlightGutterLine && this.$updateGutterLineHighlight(); this._signal("afterRender"); return; } if (changes & this.CHANGE_SCROLL) { if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES) this.$textLayer.update(config); else this.$textLayer.scrollLines(config); if (this.$showGutter) this.$gutterLayer.update(config); this.$markerBack.update(config); this.$markerFront.update(config); this.$cursorLayer.update(config); this.$highlightGutterLine && this.$updateGutterLineHighlight(); this.$moveTextAreaToCursor(); this._signal("afterRender"); return; } if (changes & this.CHANGE_TEXT) { this.$textLayer.update(config); if (this.$showGutter) this.$gutterLayer.update(config); } else if (changes & this.CHANGE_LINES) { if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this.$showGutter) this.$gutterLayer.update(config); } else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) { if (this.$showGutter) this.$gutterLayer.update(config); } if (changes & this.CHANGE_CURSOR) { this.$cursorLayer.update(config); this.$moveTextAreaToCursor(); this.$highlightGutterLine && this.$updateGutterLineHighlight(); } if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) { this.$markerFront.update(config); } if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) { this.$markerBack.update(config); } this._signal("afterRender"); }; this.$autosize = function() { var height = this.session.getScreenLength() * this.lineHeight; var maxHeight = this.$maxLines * this.lineHeight; var desiredHeight = Math.max( (this.$minLines||1) * this.lineHeight, Math.min(maxHeight, height) ) + this.scrollMargin.v + (this.$extraHeight || 0); var vScroll = height > maxHeight; if (desiredHeight != this.desiredHeight || this.$size.height != this.desiredHeight || vScroll != this.$vScroll) { if (vScroll != this.$vScroll) { this.$vScroll = vScroll; this.scrollBarV.setVisible(vScroll); } var w = this.container.clientWidth; this.container.style.height = desiredHeight + "px"; this.$updateCachedSize(true, this.$gutterWidth, w, desiredHeight); this.desiredHeight = desiredHeight; this._signal("autosize"); } }; this.$computeLayerConfig = function() { if (this.$maxLines && this.lineHeight > 1) this.$autosize(); var session = this.session; var size = this.$size; var hideScrollbars = size.height <= 2 * this.lineHeight; var screenLines = this.session.getScreenLength(); var maxHeight = screenLines * this.lineHeight; var offset = this.scrollTop % this.lineHeight; var minHeight = size.scrollerHeight + this.lineHeight; var longestLine = this.$getLongestLine(); var horizScroll = !hideScrollbars && (this.$hScrollBarAlwaysVisible || size.scrollerWidth - longestLine - 2 * this.$padding < 0); var hScrollChanged = this.$horizScroll !== horizScroll; if (hScrollChanged) { this.$horizScroll = horizScroll; this.scrollBarH.setVisible(horizScroll); } var scrollPastEnd = !this.$maxLines && this.$scrollPastEnd ? (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd : 0; maxHeight += scrollPastEnd; this.session.setScrollTop(Math.max(-this.scrollMargin.top, Math.min(this.scrollTop, maxHeight - size.scrollerHeight + this.scrollMargin.bottom))); this.session.setScrollLeft(Math.max(-this.scrollMargin.left, Math.min(this.scrollLeft, longestLine + 2 * this.$padding - size.scrollerWidth + this.scrollMargin.right))); var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible || size.scrollerHeight - maxHeight + scrollPastEnd < 0 || this.scrollTop); var vScrollChanged = this.$vScroll !== vScroll; if (vScrollChanged) { this.$vScroll = vScroll; this.scrollBarV.setVisible(vScroll); } var lineCount = Math.ceil(minHeight / this.lineHeight) - 1; var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight)); var lastRow = firstRow + lineCount; var firstRowScreen, firstRowHeight; var lineHeight = this.lineHeight; firstRow = session.screenToDocumentRow(firstRow, 0); var foldLine = session.getFoldLine(firstRow); if (foldLine) { firstRow = foldLine.start.row; } firstRowScreen = session.documentToScreenRow(firstRow, 0); firstRowHeight = session.getRowLength(firstRow) * lineHeight; lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1); minHeight = size.scrollerHeight + session.getRowLength(lastRow) * lineHeight + firstRowHeight; offset = this.scrollTop - firstRowScreen * lineHeight; var changes = 0; if (this.layerConfig.width != longestLine) changes = this.CHANGE_H_SCROLL; if (hScrollChanged || vScrollChanged) { changes = this.$updateCachedSize(true, this.gutterWidth, size.width, size.height); this._signal("scrollbarVisibilityChanged"); if (vScrollChanged) longestLine = this.$getLongestLine(); } this.layerConfig = { width : longestLine, padding : this.$padding, firstRow : firstRow, firstRowScreen: firstRowScreen, lastRow : lastRow, lineHeight : lineHeight, characterWidth : this.characterWidth, minHeight : minHeight, maxHeight : maxHeight, offset : offset, gutterOffset : Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)), height : this.$size.scrollerHeight }; return changes; }; this.$updateLines = function() { var firstRow = this.$changedLines.firstRow; var lastRow = this.$changedLines.lastRow; this.$changedLines = null; var layerConfig = this.layerConfig; if (firstRow > layerConfig.lastRow + 1) { return; } if (lastRow < layerConfig.firstRow) { return; } if (lastRow === Infinity) { if (this.$showGutter) this.$gutterLayer.update(layerConfig); this.$textLayer.update(layerConfig); return; } this.$textLayer.updateLines(layerConfig, firstRow, lastRow); return true; }; this.$getLongestLine = function() { var charCount = this.session.getScreenWidth(); if (this.showInvisibles && !this.session.$useWrapMode) charCount += 1; return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth)); }; this.updateFrontMarkers = function() { this.$markerFront.setMarkers(this.session.getMarkers(true)); this.$loop.schedule(this.CHANGE_MARKER_FRONT); }; this.updateBackMarkers = function() { this.$markerBack.setMarkers(this.session.getMarkers()); this.$loop.schedule(this.CHANGE_MARKER_BACK); }; this.addGutterDecoration = function(row, className){ this.$gutterLayer.addGutterDecoration(row, className); }; this.removeGutterDecoration = function(row, className){ this.$gutterLayer.removeGutterDecoration(row, className); }; this.updateBreakpoints = function(rows) { this.$loop.schedule(this.CHANGE_GUTTER); }; this.setAnnotations = function(annotations) { this.$gutterLayer.setAnnotations(annotations); this.$loop.schedule(this.CHANGE_GUTTER); }; this.updateCursor = function() { this.$loop.schedule(this.CHANGE_CURSOR); }; this.hideCursor = function() { this.$cursorLayer.hideCursor(); }; this.showCursor = function() { this.$cursorLayer.showCursor(); }; this.scrollSelectionIntoView = function(anchor, lead, offset) { this.scrollCursorIntoView(anchor, offset); this.scrollCursorIntoView(lead, offset); }; this.scrollCursorIntoView = function(cursor, offset, $viewMargin) { if (this.$size.scrollerHeight === 0) return; var pos = this.$cursorLayer.getPixelPosition(cursor); var left = pos.left; var top = pos.top; var topMargin = $viewMargin && $viewMargin.top || 0; var bottomMargin = $viewMargin && $viewMargin.bottom || 0; var scrollTop = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop; if (scrollTop + topMargin > top) { if (offset) top -= offset * this.$size.scrollerHeight; if (top === 0) top = -this.scrollMargin.top; this.session.setScrollTop(top); } else if (scrollTop + this.$size.scrollerHeight - bottomMargin < top + this.lineHeight) { if (offset) top += offset * this.$size.scrollerHeight; this.session.setScrollTop(top + this.lineHeight - this.$size.scrollerHeight); } var scrollLeft = this.scrollLeft; if (scrollLeft > left) { if (left < this.$padding + 2 * this.layerConfig.characterWidth) left = -this.scrollMargin.left; this.session.setScrollLeft(left); } else if (scrollLeft + this.$size.scrollerWidth < left + this.characterWidth) { this.session.setScrollLeft(Math.round(left + this.characterWidth - this.$size.scrollerWidth)); } else if (scrollLeft <= this.$padding && left - scrollLeft < this.characterWidth) { this.session.setScrollLeft(0); } }; this.getScrollTop = function() { return this.session.getScrollTop(); }; this.getScrollLeft = function() { return this.session.getScrollLeft(); }; this.getScrollTopRow = function() { return this.scrollTop / this.lineHeight; }; this.getScrollBottomRow = function() { return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1); }; this.scrollToRow = function(row) { this.session.setScrollTop(row * this.lineHeight); }; this.alignCursor = function(cursor, alignment) { if (typeof cursor == "number") cursor = {row: cursor, column: 0}; var pos = this.$cursorLayer.getPixelPosition(cursor); var h = this.$size.scrollerHeight - this.lineHeight; var offset = pos.top - h * (alignment || 0); this.session.setScrollTop(offset); return offset; }; this.STEPS = 8; this.$calcSteps = function(fromValue, toValue){ var i = 0; var l = this.STEPS; var steps = []; var func = function(t, x_min, dx) { return dx * (Math.pow(t - 1, 3) + 1) + x_min; }; for (i = 0; i < l; ++i) steps.push(func(i / this.STEPS, fromValue, toValue - fromValue)); return steps; }; this.scrollToLine = function(line, center, animate, callback) { var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0}); var offset = pos.top; if (center) offset -= this.$size.scrollerHeight / 2; var initialScroll = this.scrollTop; this.session.setScrollTop(offset); if (animate !== false) this.animateScrolling(initialScroll, callback); }; this.animateScrolling = function(fromValue, callback) { var toValue = this.scrollTop; if (!this.$animatedScroll) return; var _self = this; if (fromValue == toValue) return; if (this.$scrollAnimation) { var oldSteps = this.$scrollAnimation.steps; if (oldSteps.length) { fromValue = oldSteps[0]; if (fromValue == toValue) return; } } var steps = _self.$calcSteps(fromValue, toValue); this.$scrollAnimation = {from: fromValue, to: toValue, steps: steps}; clearInterval(this.$timer); _self.session.setScrollTop(steps.shift()); _self.session.$scrollTop = toValue; this.$timer = setInterval(function() { if (steps.length) { _self.session.setScrollTop(steps.shift()); _self.session.$scrollTop = toValue; } else if (toValue != null) { _self.session.$scrollTop = -1; _self.session.setScrollTop(toValue); toValue = null; } else { _self.$timer = clearInterval(_self.$timer); _self.$scrollAnimation = null; callback && callback(); } }, 10); }; this.scrollToY = function(scrollTop) { if (this.scrollTop !== scrollTop) { this.$loop.schedule(this.CHANGE_SCROLL); this.scrollTop = scrollTop; } }; this.scrollToX = function(scrollLeft) { if (this.scrollLeft !== scrollLeft) this.scrollLeft = scrollLeft; this.$loop.schedule(this.CHANGE_H_SCROLL); }; this.scrollTo = function(x, y) { this.session.setScrollTop(y); this.session.setScrollLeft(y); }; this.scrollBy = function(deltaX, deltaY) { deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY); deltaX && this.session.setScrollLeft(this.session.getScrollLeft() + deltaX); }; this.isScrollableBy = function(deltaX, deltaY) { if (deltaY < 0 && this.session.getScrollTop() >= 1 - this.scrollMargin.top) return true; if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight - this.layerConfig.maxHeight < -1 + this.scrollMargin.bottom) return true; if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left) return true; if (deltaX > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth - this.layerConfig.width < -1 + this.scrollMargin.right) return true; }; this.pixelToScreenCoordinates = function(x, y) { var canvasPos = this.scroller.getBoundingClientRect(); var offset = (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth; var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight); var col = Math.round(offset); return {row: row, column: col, side: offset - col > 0 ? 1 : -1}; }; this.screenToTextCoordinates = function(x, y) { var canvasPos = this.scroller.getBoundingClientRect(); var col = Math.round( (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth ); var row = (y + this.scrollTop - canvasPos.top) / this.lineHeight; return this.session.screenToDocumentPosition(row, Math.max(col, 0)); }; this.textToScreenCoordinates = function(row, column) { var canvasPos = this.scroller.getBoundingClientRect(); var pos = this.session.documentToScreenPosition(row, column); var x = this.$padding + Math.round(pos.column * this.characterWidth); var y = pos.row * this.lineHeight; return { pageX: canvasPos.left + x - this.scrollLeft, pageY: canvasPos.top + y - this.scrollTop }; }; this.visualizeFocus = function() { dom.addCssClass(this.container, "ace_focus"); }; this.visualizeBlur = function() { dom.removeCssClass(this.container, "ace_focus"); }; this.showComposition = function(position) { if (!this.$composition) this.$composition = { keepTextAreaAtCursor: this.$keepTextAreaAtCursor, cssText: this.textarea.style.cssText }; this.$keepTextAreaAtCursor = true; dom.addCssClass(this.textarea, "ace_composition"); this.textarea.style.cssText = ""; this.$moveTextAreaToCursor(); }; this.setCompositionText = function(text) { this.$moveTextAreaToCursor(); }; this.hideComposition = function() { if (!this.$composition) return; dom.removeCssClass(this.textarea, "ace_composition"); this.$keepTextAreaAtCursor = this.$composition.keepTextAreaAtCursor; this.textarea.style.cssText = this.$composition.cssText; this.$composition = null; }; this.setTheme = function(theme, cb) { var _self = this; this.$themeId = theme; _self._dispatchEvent('themeChange',{theme:theme}); if (!theme || typeof theme == "string") { var moduleName = theme || this.$options.theme.initialValue; config.loadModule(["theme", moduleName], afterLoad); } else { afterLoad(theme); } function afterLoad(module) { if (_self.$themeId != theme) return cb && cb(); if (!module.cssClass) return; dom.importCssString( module.cssText, module.cssClass, _self.container.ownerDocument ); if (_self.theme) dom.removeCssClass(_self.container, _self.theme.cssClass); var padding = "padding" in module ? module.padding : "padding" in (_self.theme || {}) ? 4 : _self.$padding; if (_self.$padding && padding != _self.$padding) _self.setPadding(padding); _self.$theme = module.cssClass; _self.theme = module; dom.addCssClass(_self.container, module.cssClass); dom.setCssClass(_self.container, "ace_dark", module.isDark); if (_self.$size) { _self.$size.width = 0; _self.$updateSizeAsync(); } _self._dispatchEvent('themeLoaded', {theme:module}); cb && cb(); } }; this.getTheme = function() { return this.$themeId; }; this.setStyle = function(style, include) { dom.setCssClass(this.container, style, include !== false); }; this.unsetStyle = function(style) { dom.removeCssClass(this.container, style); }; this.setCursorStyle = function(style) { if (this.scroller.style.cursor != style) this.scroller.style.cursor = style; }; this.setMouseCursor = function(cursorStyle) { this.scroller.style.cursor = cursorStyle; }; this.destroy = function() { this.$textLayer.destroy(); this.$cursorLayer.destroy(); }; }).call(VirtualRenderer.prototype); config.defineOptions(VirtualRenderer.prototype, "renderer", { animatedScroll: {initialValue: false}, showInvisibles: { set: function(value) { if (this.$textLayer.setShowInvisibles(value)) this.$loop.schedule(this.CHANGE_TEXT); }, initialValue: false }, showPrintMargin: { set: function() { this.$updatePrintMargin(); }, initialValue: true }, printMarginColumn: { set: function() { this.$updatePrintMargin(); }, initialValue: 80 }, printMargin: { set: function(val) { if (typeof val == "number") this.$printMarginColumn = val; this.$showPrintMargin = !!val; this.$updatePrintMargin(); }, get: function() { return this.$showPrintMargin && this.$printMarginColumn; } }, showGutter: { set: function(show){ this.$gutter.style.display = show ? "block" : "none"; this.$loop.schedule(this.CHANGE_FULL); this.onGutterResize(); }, initialValue: true }, fadeFoldWidgets: { set: function(show) { dom.setCssClass(this.$gutter, "ace_fade-fold-widgets", show); }, initialValue: false }, showFoldWidgets: { set: function(show) {this.$gutterLayer.setShowFoldWidgets(show)}, initialValue: true }, showLineNumbers: { set: function(show) { this.$gutterLayer.setShowLineNumbers(show); this.$loop.schedule(this.CHANGE_GUTTER); }, initialValue: true }, displayIndentGuides: { set: function(show) { if (this.$textLayer.setDisplayIndentGuides(show)) this.$loop.schedule(this.CHANGE_TEXT); }, initialValue: true }, highlightGutterLine: { set: function(shouldHighlight) { if (!this.$gutterLineHighlight) { this.$gutterLineHighlight = dom.createElement("div"); this.$gutterLineHighlight.className = "ace_gutter-active-line"; this.$gutter.appendChild(this.$gutterLineHighlight); return; } this.$gutterLineHighlight.style.display = shouldHighlight ? "" : "none"; if (this.$cursorLayer.$pixelPos) this.$updateGutterLineHighlight(); }, initialValue: false, value: true }, hScrollBarAlwaysVisible: { set: function(val) { if (!this.$hScrollBarAlwaysVisible || !this.$horizScroll) this.$loop.schedule(this.CHANGE_SCROLL); }, initialValue: false }, vScrollBarAlwaysVisible: { set: function(val) { if (!this.$vScrollBarAlwaysVisible || !this.$vScroll) this.$loop.schedule(this.CHANGE_SCROLL); }, initialValue: false }, fontSize: { set: function(size) { if (typeof size == "number") size = size + "px"; this.container.style.fontSize = size; this.updateFontSize(); }, initialValue: 12 }, fontFamily: { set: function(name) { this.container.style.fontFamily = name; this.updateFontSize(); } }, maxLines: { set: function(val) { this.updateFull(); } }, minLines: { set: function(val) { this.updateFull(); } }, scrollPastEnd: { set: function(val) { val = +val || 0; if (this.$scrollPastEnd == val) return; this.$scrollPastEnd = val; this.$loop.schedule(this.CHANGE_SCROLL); }, initialValue: 0, handlesSet: true }, fixedWidthGutter: { set: function(val) { this.$gutterLayer.$fixedWidth = !!val; this.$loop.schedule(this.CHANGE_GUTTER); } }, theme: { set: function(val) { this.setTheme(val) }, get: function() { return this.$themeId || this.theme; }, initialValue: "./theme/textmate", handlesSet: true } }); exports.VirtualRenderer = VirtualRenderer; }); define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var net = require("../lib/net"); var EventEmitter = require("../lib/event_emitter").EventEmitter; var config = require("../config"); var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl) { this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this); this.changeListener = this.changeListener.bind(this); this.onMessage = this.onMessage.bind(this); if (require.nameToUrl && !require.toUrl) require.toUrl = require.nameToUrl; if (config.get("packaged") || !require.toUrl) { workerUrl = workerUrl || config.moduleUrl(mod, "worker"); } else { var normalizePath = this.$normalizePath; workerUrl = workerUrl || normalizePath(require.toUrl("ace/worker/worker.js", null, "_")); var tlns = {}; topLevelNamespaces.forEach(function(ns) { tlns[ns] = normalizePath(require.toUrl(ns, null, "_").replace(/(\.js)?(\?.*)?$/, "")); }); } try { this.$worker = new Worker(workerUrl); } catch(e) { if (e instanceof window.DOMException) { var blob = this.$workerBlob(workerUrl); var URL = window.URL || window.webkitURL; var blobURL = URL.createObjectURL(blob); this.$worker = new Worker(blobURL); URL.revokeObjectURL(blobURL); } else { throw e; } } this.$worker.postMessage({ init : true, tlns : tlns, module : mod, classname : classname }); this.callbackId = 1; this.callbacks = {}; this.$worker.onmessage = this.onMessage; }; (function(){ oop.implement(this, EventEmitter); this.onMessage = function(e) { var msg = e.data; switch(msg.type) { case "event": this._signal(msg.name, {data: msg.data}); break; case "call": var callback = this.callbacks[msg.id]; if (callback) { callback(msg.data); delete this.callbacks[msg.id]; } break; case "error": this.reportError(msg.data); break; case "log": window.console && console.log && console.log.apply(console, msg.data); break; } }; this.reportError = function(err) { window.console && console.error && console.error(err); }; this.$normalizePath = function(path) { return net.qualifyURL(path); }; this.terminate = function() { this._signal("terminate", {}); this.deltaQueue = null; this.$worker.terminate(); this.$worker = null; if (this.$doc) this.$doc.off("change", this.changeListener); this.$doc = null; }; this.send = function(cmd, args) { this.$worker.postMessage({command: cmd, args: args}); }; this.call = function(cmd, args, callback) { if (callback) { var id = this.callbackId++; this.callbacks[id] = callback; args.push(id); } this.send(cmd, args); }; this.emit = function(event, data) { try { this.$worker.postMessage({event: event, data: {data: data.data}}); } catch(ex) { console.error(ex.stack); } }; this.attachToDocument = function(doc) { if(this.$doc) this.terminate(); this.$doc = doc; this.call("setValue", [doc.getValue()]); doc.on("change", this.changeListener); }; this.changeListener = function(e) { if (!this.deltaQueue) { this.deltaQueue = [e.data]; setTimeout(this.$sendDeltaQueue, 0); } else this.deltaQueue.push(e.data); }; this.$sendDeltaQueue = function() { var q = this.deltaQueue; if (!q) return; this.deltaQueue = null; if (q.length > 20 && q.length > this.$doc.getLength() >> 1) { this.call("setValue", [this.$doc.getValue()]); } else this.emit("change", {data: q}); }; this.$workerBlob = function(workerUrl) { var script = "importScripts('" + net.qualifyURL(workerUrl) + "');"; try { return new Blob([script], {"type": "application/javascript"}); } catch (e) { // Backwards-compatibility var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder; var blobBuilder = new BlobBuilder(); blobBuilder.append(script); return blobBuilder.getBlob("application/javascript"); } }; }).call(WorkerClient.prototype); var UIWorkerClient = function(topLevelNamespaces, mod, classname) { this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this); this.changeListener = this.changeListener.bind(this); this.callbackId = 1; this.callbacks = {}; this.messageBuffer = []; var main = null; var emitSync = false; var sender = Object.create(EventEmitter); var _self = this; this.$worker = {}; this.$worker.terminate = function() {}; this.$worker.postMessage = function(e) { _self.messageBuffer.push(e); if (main) { if (emitSync) setTimeout(processNext); else processNext(); } }; this.setEmitSync = function(val) { emitSync = val }; var processNext = function() { var msg = _self.messageBuffer.shift(); if (msg.command) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); }; sender.postMessage = function(msg) { _self.onMessage({data: msg}); }; sender.callback = function(data, callbackId) { this.postMessage({type: "call", id: callbackId, data: data}); }; sender.emit = function(name, data) { this.postMessage({type: "event", name: name, data: data}); }; config.loadModule(["worker", mod], function(Main) { main = new Main[classname](sender); while (_self.messageBuffer.length) processNext(); }); }; UIWorkerClient.prototype = WorkerClient.prototype; exports.UIWorkerClient = UIWorkerClient; exports.WorkerClient = WorkerClient; }); define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"], function(require, exports, module) { "use strict"; var Range = require("./range").Range; var EventEmitter = require("./lib/event_emitter").EventEmitter; var oop = require("./lib/oop"); var PlaceHolder = function(session, length, pos, others, mainClass, othersClass) { var _self = this; this.length = length; this.session = session; this.doc = session.getDocument(); this.mainClass = mainClass; this.othersClass = othersClass; this.$onUpdate = this.onUpdate.bind(this); this.doc.on("change", this.$onUpdate); this.$others = others; this.$onCursorChange = function() { setTimeout(function() { _self.onCursorChange(); }); }; this.$pos = pos; var undoStack = session.getUndoManager().$undoStack || session.getUndoManager().$undostack || {length: -1}; this.$undoStackDepth = undoStack.length; this.setup(); session.selection.on("changeCursor", this.$onCursorChange); }; (function() { oop.implement(this, EventEmitter); this.setup = function() { var _self = this; var doc = this.doc; var session = this.session; var pos = this.$pos; this.selectionBefore = session.selection.toJSON(); if (session.selection.inMultiSelectMode) session.selection.toSingleRange(); this.pos = doc.createAnchor(pos.row, pos.column); this.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false); this.pos.on("change", function(event) { session.removeMarker(_self.markerId); _self.markerId = session.addMarker(new Range(event.value.row, event.value.column, event.value.row, event.value.column+_self.length), _self.mainClass, null, false); }); this.others = []; this.$others.forEach(function(other) { var anchor = doc.createAnchor(other.row, other.column); _self.others.push(anchor); }); session.setUndoSelect(false); }; this.showOtherMarkers = function() { if(this.othersActive) return; var session = this.session; var _self = this; this.othersActive = true; this.others.forEach(function(anchor) { anchor.markerId = session.addMarker(new Range(anchor.row, anchor.column, anchor.row, anchor.column+_self.length), _self.othersClass, null, false); anchor.on("change", function(event) { session.removeMarker(anchor.markerId); anchor.markerId = session.addMarker(new Range(event.value.row, event.value.column, event.value.row, event.value.column+_self.length), _self.othersClass, null, false); }); }); }; this.hideOtherMarkers = function() { if(!this.othersActive) return; this.othersActive = false; for (var i = 0; i < this.others.length; i++) { this.session.removeMarker(this.others[i].markerId); } }; this.onUpdate = function(event) { var delta = event.data; var range = delta.range; if(range.start.row !== range.end.row) return; if(range.start.row !== this.pos.row) return; if (this.$updating) return; this.$updating = true; var lengthDiff = delta.action === "insertText" ? range.end.column - range.start.column : range.start.column - range.end.column; if(range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1) { var distanceFromStart = range.start.column - this.pos.column; this.length += lengthDiff; if(!this.session.$fromUndo) { if(delta.action === "insertText") { for (var i = this.others.length - 1; i >= 0; i--) { var otherPos = this.others[i]; var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart}; if(otherPos.row === range.start.row && range.start.column < otherPos.column) newPos.column += lengthDiff; this.doc.insert(newPos, delta.text); } } else if(delta.action === "removeText") { for (var i = this.others.length - 1; i >= 0; i--) { var otherPos = this.others[i]; var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart}; if(otherPos.row === range.start.row && range.start.column < otherPos.column) newPos.column += lengthDiff; this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff)); } } if(range.start.column === this.pos.column && delta.action === "insertText") { setTimeout(function() { this.pos.setPosition(this.pos.row, this.pos.column - lengthDiff); for (var i = 0; i < this.others.length; i++) { var other = this.others[i]; var newPos = {row: other.row, column: other.column - lengthDiff}; if(other.row === range.start.row && range.start.column < other.column) newPos.column += lengthDiff; other.setPosition(newPos.row, newPos.column); } }.bind(this), 0); } else if(range.start.column === this.pos.column && delta.action === "removeText") { setTimeout(function() { for (var i = 0; i < this.others.length; i++) { var other = this.others[i]; if(other.row === range.start.row && range.start.column < other.column) { other.setPosition(other.row, other.column - lengthDiff); } } }.bind(this), 0); } } this.pos._emit("change", {value: this.pos}); for (var i = 0; i < this.others.length; i++) { this.others[i]._emit("change", {value: this.others[i]}); } } this.$updating = false; }; this.onCursorChange = function(event) { if (this.$updating || !this.session) return; var pos = this.session.selection.getCursor(); if (pos.row === this.pos.row && pos.column >= this.pos.column && pos.column <= this.pos.column + this.length) { this.showOtherMarkers(); this._emit("cursorEnter", event); } else { this.hideOtherMarkers(); this._emit("cursorLeave", event); } }; this.detach = function() { this.session.removeMarker(this.markerId); this.hideOtherMarkers(); this.doc.removeEventListener("change", this.$onUpdate); this.session.selection.removeEventListener("changeCursor", this.$onCursorChange); this.pos.detach(); for (var i = 0; i < this.others.length; i++) { this.others[i].detach(); } this.session.setUndoSelect(true); this.session = null; }; this.cancel = function() { if(this.$undoStackDepth === -1) throw Error("Canceling placeholders only supported with undo manager attached to session."); var undoManager = this.session.getUndoManager(); var undosRequired = (undoManager.$undoStack || undoManager.$undostack).length - this.$undoStackDepth; for (var i = 0; i < undosRequired; i++) { undoManager.undo(true); } if (this.selectionBefore) this.session.selection.fromJSON(this.selectionBefore); }; }).call(PlaceHolder.prototype); exports.PlaceHolder = PlaceHolder; }); define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(require, exports, module) { var event = require("../lib/event"); var useragent = require("../lib/useragent"); function isSamePoint(p1, p2) { return p1.row == p2.row && p1.column == p2.column; } function onMouseDown(e) { var ev = e.domEvent; var alt = ev.altKey; var shift = ev.shiftKey; var ctrl = ev.ctrlKey; var accel = e.getAccelKey(); var button = e.getButton(); if (ctrl && useragent.isMac) button = ev.button; if (e.editor.inMultiSelectMode && button == 2) { e.editor.textInput.onContextMenu(e.domEvent); return; } if (!ctrl && !alt && !accel) { if (button === 0 && e.editor.inMultiSelectMode) e.editor.exitMultiSelectMode(); return; } if (button !== 0) return; var editor = e.editor; var selection = editor.selection; var isMultiSelect = editor.inMultiSelectMode; var pos = e.getDocumentPosition(); var cursor = selection.getCursor(); var inSelection = e.inSelection() || (selection.isEmpty() && isSamePoint(pos, cursor)); var mouseX = e.x, mouseY = e.y; var onMouseSelection = function(e) { mouseX = e.clientX; mouseY = e.clientY; }; var session = editor.session; var screenAnchor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY); var screenCursor = screenAnchor; var selectionMode; if (editor.$mouseHandler.$enableJumpToDef) { if (ctrl && alt || accel && alt) selectionMode = "add"; else if (alt) selectionMode = "block"; } else { if (accel && !alt) { selectionMode = "add"; if (!isMultiSelect && shift) return; } else if (alt) { selectionMode = "block"; } } if (selectionMode && useragent.isMac && ev.ctrlKey) { editor.$mouseHandler.cancelContextMenu(); } if (selectionMode == "add") { if (!isMultiSelect && inSelection) return; // dragging if (!isMultiSelect) { var range = selection.toOrientedRange(); editor.addSelectionMarker(range); } var oldRange = selection.rangeList.rangeAtPoint(pos); editor.$blockScrolling++; editor.inVirtualSelectionMode = true; if (shift) { oldRange = null; range = selection.ranges[0]; editor.removeSelectionMarker(range); } editor.once("mouseup", function() { var tmpSel = selection.toOrientedRange(); if (oldRange && tmpSel.isEmpty() && isSamePoint(oldRange.cursor, tmpSel.cursor)) selection.substractPoint(tmpSel.cursor); else { if (shift) { selection.substractPoint(range.cursor); } else if (range) { editor.removeSelectionMarker(range); selection.addRange(range); } selection.addRange(tmpSel); } editor.$blockScrolling--; editor.inVirtualSelectionMode = false; }); } else if (selectionMode == "block") { e.stop(); editor.inVirtualSelectionMode = true; var initialRange; var rectSel = []; var blockSelect = function() { var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY); var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column); if (isSamePoint(screenCursor, newCursor) && isSamePoint(cursor, selection.lead)) return; screenCursor = newCursor; editor.$blockScrolling++; editor.selection.moveToPosition(cursor); editor.renderer.scrollCursorIntoView(); editor.removeSelectionMarkers(rectSel); rectSel = selection.rectangularRangeBlock(screenCursor, screenAnchor); if (editor.$mouseHandler.$clickSelection && rectSel.length == 1 && rectSel[0].isEmpty()) rectSel[0] = editor.$mouseHandler.$clickSelection.clone(); rectSel.forEach(editor.addSelectionMarker, editor); editor.updateSelectionMarkers(); editor.$blockScrolling--; }; editor.$blockScrolling++; if (isMultiSelect && !accel) { selection.toSingleRange(); } else if (!isMultiSelect && accel) { initialRange = selection.toOrientedRange(); editor.addSelectionMarker(initialRange); } if (shift) screenAnchor = session.documentToScreenPosition(selection.lead); else selection.moveToPosition(pos); editor.$blockScrolling--; screenCursor = {row: -1, column: -1}; var onMouseSelectionEnd = function(e) { clearInterval(timerId); editor.removeSelectionMarkers(rectSel); if (!rectSel.length) rectSel = [selection.toOrientedRange()]; editor.$blockScrolling++; if (initialRange) { editor.removeSelectionMarker(initialRange); selection.toSingleRange(initialRange); } for (var i = 0; i < rectSel.length; i++) selection.addRange(rectSel[i]); editor.inVirtualSelectionMode = false; editor.$mouseHandler.$clickSelection = null; editor.$blockScrolling--; }; var onSelectionInterval = blockSelect; event.capture(editor.container, onMouseSelection, onMouseSelectionEnd); var timerId = setInterval(function() {onSelectionInterval();}, 20); return e.preventDefault(); } } exports.onMouseDown = onMouseDown; }); define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"], function(require, exports, module) { exports.defaultCommands = [{ name: "addCursorAbove", exec: function(editor) { editor.selectMoreLines(-1); }, bindKey: {win: "Ctrl-Alt-Up", mac: "Ctrl-Alt-Up"}, scrollIntoView: "cursor", readonly: true }, { name: "addCursorBelow", exec: function(editor) { editor.selectMoreLines(1); }, bindKey: {win: "Ctrl-Alt-Down", mac: "Ctrl-Alt-Down"}, scrollIntoView: "cursor", readonly: true }, { name: "addCursorAboveSkipCurrent", exec: function(editor) { editor.selectMoreLines(-1, true); }, bindKey: {win: "Ctrl-Alt-Shift-Up", mac: "Ctrl-Alt-Shift-Up"}, scrollIntoView: "cursor", readonly: true }, { name: "addCursorBelowSkipCurrent", exec: function(editor) { editor.selectMoreLines(1, true); }, bindKey: {win: "Ctrl-Alt-Shift-Down", mac: "Ctrl-Alt-Shift-Down"}, scrollIntoView: "cursor", readonly: true }, { name: "selectMoreBefore", exec: function(editor) { editor.selectMore(-1); }, bindKey: {win: "Ctrl-Alt-Left", mac: "Ctrl-Alt-Left"}, scrollIntoView: "cursor", readonly: true }, { name: "selectMoreAfter", exec: function(editor) { editor.selectMore(1); }, bindKey: {win: "Ctrl-Alt-Right", mac: "Ctrl-Alt-Right"}, scrollIntoView: "cursor", readonly: true }, { name: "selectNextBefore", exec: function(editor) { editor.selectMore(-1, true); }, bindKey: {win: "Ctrl-Alt-Shift-Left", mac: "Ctrl-Alt-Shift-Left"}, scrollIntoView: "cursor", readonly: true }, { name: "selectNextAfter", exec: function(editor) { editor.selectMore(1, true); }, bindKey: {win: "Ctrl-Alt-Shift-Right", mac: "Ctrl-Alt-Shift-Right"}, scrollIntoView: "cursor", readonly: true }, { name: "splitIntoLines", exec: function(editor) { editor.multiSelect.splitIntoLines(); }, bindKey: {win: "Ctrl-Alt-L", mac: "Ctrl-Alt-L"}, readonly: true }, { name: "alignCursors", exec: function(editor) { editor.alignCursors(); }, bindKey: {win: "Ctrl-Alt-A", mac: "Ctrl-Alt-A"}, scrollIntoView: "cursor" }, { name: "findAll", exec: function(editor) { editor.findAll(); }, bindKey: {win: "Ctrl-Alt-K", mac: "Ctrl-Alt-G"}, scrollIntoView: "cursor", readonly: true }]; exports.multiSelectCommands = [{ name: "singleSelection", bindKey: "esc", exec: function(editor) { editor.exitMultiSelectMode(); }, scrollIntoView: "cursor", readonly: true, isAvailable: function(editor) {return editor && editor.inMultiSelectMode} }]; var HashHandler = require("../keyboard/hash_handler").HashHandler; exports.keyboardHandler = new HashHandler(exports.multiSelectCommands); }); define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"], function(require, exports, module) { var RangeList = require("./range_list").RangeList; var Range = require("./range").Range; var Selection = require("./selection").Selection; var onMouseDown = require("./mouse/multi_select_handler").onMouseDown; var event = require("./lib/event"); var lang = require("./lib/lang"); var commands = require("./commands/multi_select_commands"); exports.commands = commands.defaultCommands.concat(commands.multiSelectCommands); var Search = require("./search").Search; var search = new Search(); function find(session, needle, dir) { search.$options.wrap = true; search.$options.needle = needle; search.$options.backwards = dir == -1; return search.find(session); } var EditSession = require("./edit_session").EditSession; (function() { this.getSelectionMarkers = function() { return this.$selectionMarkers; }; }).call(EditSession.prototype); (function() { this.ranges = null; this.rangeList = null; this.addRange = function(range, $blockChangeEvents) { if (!range) return; if (!this.inMultiSelectMode && this.rangeCount === 0) { var oldRange = this.toOrientedRange(); this.rangeList.add(oldRange); this.rangeList.add(range); if (this.rangeList.ranges.length != 2) { this.rangeList.removeAll(); return $blockChangeEvents || this.fromOrientedRange(range); } this.rangeList.removeAll(); this.rangeList.add(oldRange); this.$onAddRange(oldRange); } if (!range.cursor) range.cursor = range.end; var removed = this.rangeList.add(range); this.$onAddRange(range); if (removed.length) this.$onRemoveRange(removed); if (this.rangeCount > 1 && !this.inMultiSelectMode) { this._signal("multiSelect"); this.inMultiSelectMode = true; this.session.$undoSelect = false; this.rangeList.attach(this.session); } return $blockChangeEvents || this.fromOrientedRange(range); }; this.toSingleRange = function(range) { range = range || this.ranges[0]; var removed = this.rangeList.removeAll(); if (removed.length) this.$onRemoveRange(removed); range && this.fromOrientedRange(range); }; this.substractPoint = function(pos) { var removed = this.rangeList.substractPoint(pos); if (removed) { this.$onRemoveRange(removed); return removed[0]; } }; this.mergeOverlappingRanges = function() { var removed = this.rangeList.merge(); if (removed.length) this.$onRemoveRange(removed); else if(this.ranges[0]) this.fromOrientedRange(this.ranges[0]); }; this.$onAddRange = function(range) { this.rangeCount = this.rangeList.ranges.length; this.ranges.unshift(range); this._signal("addRange", {range: range}); }; this.$onRemoveRange = function(removed) { this.rangeCount = this.rangeList.ranges.length; if (this.rangeCount == 1 && this.inMultiSelectMode) { var lastRange = this.rangeList.ranges.pop(); removed.push(lastRange); this.rangeCount = 0; } for (var i = removed.length; i--; ) { var index = this.ranges.indexOf(removed[i]); this.ranges.splice(index, 1); } this._signal("removeRange", {ranges: removed}); if (this.rangeCount === 0 && this.inMultiSelectMode) { this.inMultiSelectMode = false; this._signal("singleSelect"); this.session.$undoSelect = true; this.rangeList.detach(this.session); } lastRange = lastRange || this.ranges[0]; if (lastRange && !lastRange.isEqual(this.getRange())) this.fromOrientedRange(lastRange); }; this.$initRangeList = function() { if (this.rangeList) return; this.rangeList = new RangeList(); this.ranges = []; this.rangeCount = 0; }; this.getAllRanges = function() { return this.rangeCount ? this.rangeList.ranges.concat() : [this.getRange()]; }; this.splitIntoLines = function () { if (this.rangeCount > 1) { var ranges = this.rangeList.ranges; var lastRange = ranges[ranges.length - 1]; var range = Range.fromPoints(ranges[0].start, lastRange.end); this.toSingleRange(); this.setSelectionRange(range, lastRange.cursor == lastRange.start); } else { var range = this.getRange(); var isBackwards = this.isBackwards(); var startRow = range.start.row; var endRow = range.end.row; if (startRow == endRow) { if (isBackwards) var start = range.end, end = range.start; else var start = range.start, end = range.end; this.addRange(Range.fromPoints(end, end)); this.addRange(Range.fromPoints(start, start)); return; } var rectSel = []; var r = this.getLineRange(startRow, true); r.start.column = range.start.column; rectSel.push(r); for (var i = startRow + 1; i < endRow; i++) rectSel.push(this.getLineRange(i, true)); r = this.getLineRange(endRow, true); r.end.column = range.end.column; rectSel.push(r); rectSel.forEach(this.addRange, this); } }; this.toggleBlockSelection = function () { if (this.rangeCount > 1) { var ranges = this.rangeList.ranges; var lastRange = ranges[ranges.length - 1]; var range = Range.fromPoints(ranges[0].start, lastRange.end); this.toSingleRange(); this.setSelectionRange(range, lastRange.cursor == lastRange.start); } else { var cursor = this.session.documentToScreenPosition(this.selectionLead); var anchor = this.session.documentToScreenPosition(this.selectionAnchor); var rectSel = this.rectangularRangeBlock(cursor, anchor); rectSel.forEach(this.addRange, this); } }; this.rectangularRangeBlock = function(screenCursor, screenAnchor, includeEmptyLines) { var rectSel = []; var xBackwards = screenCursor.column < screenAnchor.column; if (xBackwards) { var startColumn = screenCursor.column; var endColumn = screenAnchor.column; } else { var startColumn = screenAnchor.column; var endColumn = screenCursor.column; } var yBackwards = screenCursor.row < screenAnchor.row; if (yBackwards) { var startRow = screenCursor.row; var endRow = screenAnchor.row; } else { var startRow = screenAnchor.row; var endRow = screenCursor.row; } if (startColumn < 0) startColumn = 0; if (startRow < 0) startRow = 0; if (startRow == endRow) includeEmptyLines = true; for (var row = startRow; row <= endRow; row++) { var range = Range.fromPoints( this.session.screenToDocumentPosition(row, startColumn), this.session.screenToDocumentPosition(row, endColumn) ); if (range.isEmpty()) { if (docEnd && isSamePoint(range.end, docEnd)) break; var docEnd = range.end; } range.cursor = xBackwards ? range.start : range.end; rectSel.push(range); } if (yBackwards) rectSel.reverse(); if (!includeEmptyLines) { var end = rectSel.length - 1; while (rectSel[end].isEmpty() && end > 0) end--; if (end > 0) { var start = 0; while (rectSel[start].isEmpty()) start++; } for (var i = end; i >= start; i--) { if (rectSel[i].isEmpty()) rectSel.splice(i, 1); } } return rectSel; }; }).call(Selection.prototype); var Editor = require("./editor").Editor; (function() { this.updateSelectionMarkers = function() { this.renderer.updateCursor(); this.renderer.updateBackMarkers(); }; this.addSelectionMarker = function(orientedRange) { if (!orientedRange.cursor) orientedRange.cursor = orientedRange.end; var style = this.getSelectionStyle(); orientedRange.marker = this.session.addMarker(orientedRange, "ace_selection", style); this.session.$selectionMarkers.push(orientedRange); this.session.selectionMarkerCount = this.session.$selectionMarkers.length; return orientedRange; }; this.removeSelectionMarker = function(range) { if (!range.marker) return; this.session.removeMarker(range.marker); var index = this.session.$selectionMarkers.indexOf(range); if (index != -1) this.session.$selectionMarkers.splice(index, 1); this.session.selectionMarkerCount = this.session.$selectionMarkers.length; }; this.removeSelectionMarkers = function(ranges) { var markerList = this.session.$selectionMarkers; for (var i = ranges.length; i--; ) { var range = ranges[i]; if (!range.marker) continue; this.session.removeMarker(range.marker); var index = markerList.indexOf(range); if (index != -1) markerList.splice(index, 1); } this.session.selectionMarkerCount = markerList.length; }; this.$onAddRange = function(e) { this.addSelectionMarker(e.range); this.renderer.updateCursor(); this.renderer.updateBackMarkers(); }; this.$onRemoveRange = function(e) { this.removeSelectionMarkers(e.ranges); this.renderer.updateCursor(); this.renderer.updateBackMarkers(); }; this.$onMultiSelect = function(e) { if (this.inMultiSelectMode) return; this.inMultiSelectMode = true; this.setStyle("ace_multiselect"); this.keyBinding.addKeyboardHandler(commands.keyboardHandler); this.commands.setDefaultHandler("exec", this.$onMultiSelectExec); this.renderer.updateCursor(); this.renderer.updateBackMarkers(); }; this.$onSingleSelect = function(e) { if (this.session.multiSelect.inVirtualMode) return; this.inMultiSelectMode = false; this.unsetStyle("ace_multiselect"); this.keyBinding.removeKeyboardHandler(commands.keyboardHandler); this.commands.removeDefaultHandler("exec", this.$onMultiSelectExec); this.renderer.updateCursor(); this.renderer.updateBackMarkers(); this._emit("changeSelection"); }; this.$onMultiSelectExec = function(e) { var command = e.command; var editor = e.editor; if (!editor.multiSelect) return; if (!command.multiSelectAction) { var result = command.exec(editor, e.args || {}); editor.multiSelect.addRange(editor.multiSelect.toOrientedRange()); editor.multiSelect.mergeOverlappingRanges(); } else if (command.multiSelectAction == "forEach") { result = editor.forEachSelection(command, e.args); } else if (command.multiSelectAction == "forEachLine") { result = editor.forEachSelection(command, e.args, true); } else if (command.multiSelectAction == "single") { editor.exitMultiSelectMode(); result = command.exec(editor, e.args || {}); } else { result = command.multiSelectAction(editor, e.args || {}); } return result; }; this.forEachSelection = function(cmd, args, options) { if (this.inVirtualSelectionMode) return; var keepOrder = options && options.keepOrder; var $byLines = options == true || options && options.$byLines var session = this.session; var selection = this.selection; var rangeList = selection.rangeList; var ranges = (keepOrder ? selection : rangeList).ranges; var result; if (!ranges.length) return cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {}); var reg = selection._eventRegistry; selection._eventRegistry = {}; var tmpSel = new Selection(session); this.inVirtualSelectionMode = true; for (var i = ranges.length; i--;) { if ($byLines) { while (i > 0 && ranges[i].start.row == ranges[i - 1].end.row) i--; } tmpSel.fromOrientedRange(ranges[i]); tmpSel.index = i; this.selection = session.selection = tmpSel; var cmdResult = cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {}); if (!result && cmdResult !== undefined) result = cmdResult; tmpSel.toOrientedRange(ranges[i]); } tmpSel.detach(); this.selection = session.selection = selection; this.inVirtualSelectionMode = false; selection._eventRegistry = reg; selection.mergeOverlappingRanges(); var anim = this.renderer.$scrollAnimation; this.onCursorChange(); this.onSelectionChange(); if (anim && anim.from == anim.to) this.renderer.animateScrolling(anim.from); return result; }; this.exitMultiSelectMode = function() { if (!this.inMultiSelectMode || this.inVirtualSelectionMode) return; this.multiSelect.toSingleRange(); }; this.getSelectedText = function() { var text = ""; if (this.inMultiSelectMode && !this.inVirtualSelectionMode) { var ranges = this.multiSelect.rangeList.ranges; var buf = []; for (var i = 0; i < ranges.length; i++) { buf.push(this.session.getTextRange(ranges[i])); } var nl = this.session.getDocument().getNewLineCharacter(); text = buf.join(nl); if (text.length == (buf.length - 1) * nl.length) text = ""; } else if (!this.selection.isEmpty()) { text = this.session.getTextRange(this.getSelectionRange()); } return text; }; this.$checkMultiselectChange = function(e, anchor) { if (this.inMultiSelectMode && !this.inVirtualSelectionMode) { var range = this.multiSelect.ranges[0]; if (this.multiSelect.isEmpty() && anchor == this.multiSelect.anchor) return; var pos = anchor == this.multiSelect.anchor ? range.cursor == range.start ? range.end : range.start : range.cursor; if (pos.row != anchor.row || this.session.$clipPositionToDocument(pos.row, pos.column).column != anchor.column) this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()); } }; this.findAll = function(needle, options, additive) { options = options || {}; options.needle = needle || options.needle; if (options.needle == undefined) { var range = this.selection.isEmpty() ? this.selection.getWordRange() : this.selection.getRange(); options.needle = this.session.getTextRange(range); } this.$search.set(options); var ranges = this.$search.findAll(this.session); if (!ranges.length) return 0; this.$blockScrolling += 1; var selection = this.multiSelect; if (!additive) selection.toSingleRange(ranges[0]); for (var i = ranges.length; i--; ) selection.addRange(ranges[i], true); if (range && selection.rangeList.rangeAtPoint(range.start)) selection.addRange(range, true); this.$blockScrolling -= 1; return ranges.length; }; this.selectMoreLines = function(dir, skip) { var range = this.selection.toOrientedRange(); var isBackwards = range.cursor == range.end; var screenLead = this.session.documentToScreenPosition(range.cursor); if (this.selection.$desiredColumn) screenLead.column = this.selection.$desiredColumn; var lead = this.session.screenToDocumentPosition(screenLead.row + dir, screenLead.column); if (!range.isEmpty()) { var screenAnchor = this.session.documentToScreenPosition(isBackwards ? range.end : range.start); var anchor = this.session.screenToDocumentPosition(screenAnchor.row + dir, screenAnchor.column); } else { var anchor = lead; } if (isBackwards) { var newRange = Range.fromPoints(lead, anchor); newRange.cursor = newRange.start; } else { var newRange = Range.fromPoints(anchor, lead); newRange.cursor = newRange.end; } newRange.desiredColumn = screenLead.column; if (!this.selection.inMultiSelectMode) { this.selection.addRange(range); } else { if (skip) var toRemove = range.cursor; } this.selection.addRange(newRange); if (toRemove) this.selection.substractPoint(toRemove); }; this.transposeSelections = function(dir) { var session = this.session; var sel = session.multiSelect; var all = sel.ranges; for (var i = all.length; i--; ) { var range = all[i]; if (range.isEmpty()) { var tmp = session.getWordRange(range.start.row, range.start.column); range.start.row = tmp.start.row; range.start.column = tmp.start.column; range.end.row = tmp.end.row; range.end.column = tmp.end.column; } } sel.mergeOverlappingRanges(); var words = []; for (var i = all.length; i--; ) { var range = all[i]; words.unshift(session.getTextRange(range)); } if (dir < 0) words.unshift(words.pop()); else words.push(words.shift()); for (var i = all.length; i--; ) { var range = all[i]; var tmp = range.clone(); session.replace(range, words[i]); range.start.row = tmp.start.row; range.start.column = tmp.start.column; } }; this.selectMore = function(dir, skip, stopAtFirst) { var session = this.session; var sel = session.multiSelect; var range = sel.toOrientedRange(); if (range.isEmpty()) { range = session.getWordRange(range.start.row, range.start.column); range.cursor = dir == -1 ? range.start : range.end; this.multiSelect.addRange(range); if (stopAtFirst) return; } var needle = session.getTextRange(range); var newRange = find(session, needle, dir); if (newRange) { newRange.cursor = dir == -1 ? newRange.start : newRange.end; this.$blockScrolling += 1; this.session.unfold(newRange); this.multiSelect.addRange(newRange); this.$blockScrolling -= 1; this.renderer.scrollCursorIntoView(null, 0.5); } if (skip) this.multiSelect.substractPoint(range.cursor); }; this.alignCursors = function() { var session = this.session; var sel = session.multiSelect; var ranges = sel.ranges; var row = -1; var sameRowRanges = ranges.filter(function(r) { if (r.cursor.row == row) return true; row = r.cursor.row; }); if (!ranges.length || sameRowRanges.length == ranges.length - 1) { var range = this.selection.getRange(); var fr = range.start.row, lr = range.end.row; var guessRange = fr == lr; if (guessRange) { var max = this.session.getLength(); var line; do { line = this.session.getLine(lr); } while (/[=:]/.test(line) && ++lr < max); do { line = this.session.getLine(fr); } while (/[=:]/.test(line) && --fr > 0); if (fr < 0) fr = 0; if (lr >= max) lr = max - 1; } var lines = this.session.doc.removeLines(fr, lr); lines = this.$reAlignText(lines, guessRange); this.session.doc.insert({row: fr, column: 0}, lines.join("\n") + "\n"); if (!guessRange) { range.start.column = 0; range.end.column = lines[lines.length - 1].length; } this.selection.setRange(range); } else { sameRowRanges.forEach(function(r) { sel.substractPoint(r.cursor); }); var maxCol = 0; var minSpace = Infinity; var spaceOffsets = ranges.map(function(r) { var p = r.cursor; var line = session.getLine(p.row); var spaceOffset = line.substr(p.column).search(/\S/g); if (spaceOffset == -1) spaceOffset = 0; if (p.column > maxCol) maxCol = p.column; if (spaceOffset < minSpace) minSpace = spaceOffset; return spaceOffset; }); ranges.forEach(function(r, i) { var p = r.cursor; var l = maxCol - p.column; var d = spaceOffsets[i] - minSpace; if (l > d) session.insert(p, lang.stringRepeat(" ", l - d)); else session.remove(new Range(p.row, p.column, p.row, p.column - l + d)); r.start.column = r.end.column = maxCol; r.start.row = r.end.row = p.row; r.cursor = r.end; }); sel.fromOrientedRange(ranges[0]); this.renderer.updateCursor(); this.renderer.updateBackMarkers(); } }; this.$reAlignText = function(lines, forceLeft) { var isLeftAligned = true, isRightAligned = true; var startW, textW, endW; return lines.map(function(line) { var m = line.match(/(\s*)(.*?)(\s*)([=:].*)/); if (!m) return [line]; if (startW == null) { startW = m[1].length; textW = m[2].length; endW = m[3].length; return m; } if (startW + textW + endW != m[1].length + m[2].length + m[3].length) isRightAligned = false; if (startW != m[1].length) isLeftAligned = false; if (startW > m[1].length) startW = m[1].length; if (textW < m[2].length) textW = m[2].length; if (endW > m[3].length) endW = m[3].length; return m; }).map(forceLeft ? alignLeft : isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign); function spaces(n) { return lang.stringRepeat(" ", n); } function alignLeft(m) { return !m[2] ? m[0] : spaces(startW) + m[2] + spaces(textW - m[2].length + endW) + m[4].replace(/^([=:])\s+/, "$1 "); } function alignRight(m) { return !m[2] ? m[0] : spaces(startW + textW - m[2].length) + m[2] + spaces(endW, " ") + m[4].replace(/^([=:])\s+/, "$1 "); } function unAlign(m) { return !m[2] ? m[0] : spaces(startW) + m[2] + spaces(endW) + m[4].replace(/^([=:])\s+/, "$1 "); } }; }).call(Editor.prototype); function isSamePoint(p1, p2) { return p1.row == p2.row && p1.column == p2.column; } exports.onSessionChange = function(e) { var session = e.session; if (session && !session.multiSelect) { session.$selectionMarkers = []; session.selection.$initRangeList(); session.multiSelect = session.selection; } this.multiSelect = session && session.multiSelect; var oldSession = e.oldSession; if (oldSession) { oldSession.multiSelect.off("addRange", this.$onAddRange); oldSession.multiSelect.off("removeRange", this.$onRemoveRange); oldSession.multiSelect.off("multiSelect", this.$onMultiSelect); oldSession.multiSelect.off("singleSelect", this.$onSingleSelect); oldSession.multiSelect.lead.off("change", this.$checkMultiselectChange); oldSession.multiSelect.anchor.off("change", this.$checkMultiselectChange); } if (session) { session.multiSelect.on("addRange", this.$onAddRange); session.multiSelect.on("removeRange", this.$onRemoveRange); session.multiSelect.on("multiSelect", this.$onMultiSelect); session.multiSelect.on("singleSelect", this.$onSingleSelect); session.multiSelect.lead.on("change", this.$checkMultiselectChange); session.multiSelect.anchor.on("change", this.$checkMultiselectChange); } if (session && this.inMultiSelectMode != session.selection.inMultiSelectMode) { if (session.selection.inMultiSelectMode) this.$onMultiSelect(); else this.$onSingleSelect(); } }; function MultiSelect(editor) { if (editor.$multiselectOnSessionChange) return; editor.$onAddRange = editor.$onAddRange.bind(editor); editor.$onRemoveRange = editor.$onRemoveRange.bind(editor); editor.$onMultiSelect = editor.$onMultiSelect.bind(editor); editor.$onSingleSelect = editor.$onSingleSelect.bind(editor); editor.$multiselectOnSessionChange = exports.onSessionChange.bind(editor); editor.$checkMultiselectChange = editor.$checkMultiselectChange.bind(editor); editor.$multiselectOnSessionChange(editor); editor.on("changeSession", editor.$multiselectOnSessionChange); editor.on("mousedown", onMouseDown); editor.commands.addCommands(commands.defaultCommands); addAltCursorListeners(editor); } function addAltCursorListeners(editor){ var el = editor.textInput.getElement(); var altCursor = false; event.addListener(el, "keydown", function(e) { if (e.keyCode == 18 && !(e.ctrlKey || e.shiftKey || e.metaKey)) { if (!altCursor) { editor.renderer.setMouseCursor("crosshair"); altCursor = true; } } else if (altCursor) { reset(); } }); event.addListener(el, "keyup", reset); event.addListener(el, "blur", reset); function reset(e) { if (altCursor) { editor.renderer.setMouseCursor(""); altCursor = false; } } } exports.MultiSelect = MultiSelect; require("./config").defineOptions(Editor.prototype, "editor", { enableMultiselect: { set: function(val) { MultiSelect(this); if (val) { this.on("changeSession", this.$multiselectOnSessionChange); this.on("mousedown", onMouseDown); } else { this.off("changeSession", this.$multiselectOnSessionChange); this.off("mousedown", onMouseDown); } }, value: true } }); }); define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../../range").Range; var FoldMode = exports.FoldMode = function() {}; (function() { this.foldingStartMarker = null; this.foldingStopMarker = null; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.foldingStartMarker.test(line)) return "start"; if (foldStyle == "markbeginend" && this.foldingStopMarker && this.foldingStopMarker.test(line)) return "end"; return ""; }; this.getFoldWidgetRange = function(session, foldStyle, row) { return null; }; this.indentationBlock = function(session, row, column) { var re = /\S/; var line = session.getLine(row); var startLevel = line.search(re); if (startLevel == -1) return; var startColumn = column || line.length; var maxRow = session.getLength(); var startRow = row; var endRow = row; while (++row < maxRow) { var level = session.getLine(row).search(re); if (level == -1) continue; if (level <= startLevel) break; endRow = row; } if (endRow > startRow) { var endColumn = session.getLine(endRow).length; return new Range(startRow, startColumn, endRow, endColumn); } }; this.openingBracketBlock = function(session, bracket, row, column, typeRe) { var start = {row: row, column: column + 1}; var end = session.$findClosingBracket(bracket, start, typeRe); if (!end) return; var fw = session.foldWidgets[end.row]; if (fw == null) fw = session.getFoldWidget(end.row); if (fw == "start" && end.row > start.row) { end.row --; end.column = session.getLine(end.row).length; } return Range.fromPoints(start, end); }; this.closingBracketBlock = function(session, bracket, row, column, typeRe) { var end = {row: row, column: column}; var start = session.$findOpeningBracket(bracket, end); if (!start) return; start.column++; end.column--; return Range.fromPoints(start, end); }; }).call(FoldMode.prototype); }); define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) { "use strict"; exports.isDark = false; exports.cssClass = "ace-tm"; exports.cssText = ".ace-tm .ace_gutter {\ background: #f0f0f0;\ color: #333;\ }\ .ace-tm .ace_print-margin {\ width: 1px;\ background: #e8e8e8;\ }\ .ace-tm .ace_fold {\ background-color: #6B72E6;\ }\ .ace-tm {\ background-color: #FFFFFF;\ color: black;\ }\ .ace-tm .ace_cursor {\ color: black;\ }\ .ace-tm .ace_invisible {\ color: rgb(191, 191, 191);\ }\ .ace-tm .ace_storage,\ .ace-tm .ace_keyword {\ color: blue;\ }\ .ace-tm .ace_constant {\ color: rgb(197, 6, 11);\ }\ .ace-tm .ace_constant.ace_buildin {\ color: rgb(88, 72, 246);\ }\ .ace-tm .ace_constant.ace_language {\ color: rgb(88, 92, 246);\ }\ .ace-tm .ace_constant.ace_library {\ color: rgb(6, 150, 14);\ }\ .ace-tm .ace_invalid {\ background-color: rgba(255, 0, 0, 0.1);\ color: red;\ }\ .ace-tm .ace_support.ace_function {\ color: rgb(60, 76, 114);\ }\ .ace-tm .ace_support.ace_constant {\ color: rgb(6, 150, 14);\ }\ .ace-tm .ace_support.ace_type,\ .ace-tm .ace_support.ace_class {\ color: rgb(109, 121, 222);\ }\ .ace-tm .ace_keyword.ace_operator {\ color: rgb(104, 118, 135);\ }\ .ace-tm .ace_string {\ color: rgb(3, 106, 7);\ }\ .ace-tm .ace_comment {\ color: rgb(76, 136, 107);\ }\ .ace-tm .ace_comment.ace_doc {\ color: rgb(0, 102, 255);\ }\ .ace-tm .ace_comment.ace_doc.ace_tag {\ color: rgb(128, 159, 191);\ }\ .ace-tm .ace_constant.ace_numeric {\ color: rgb(0, 0, 205);\ }\ .ace-tm .ace_variable {\ color: rgb(49, 132, 149);\ }\ .ace-tm .ace_xml-pe {\ color: rgb(104, 104, 91);\ }\ .ace-tm .ace_entity.ace_name.ace_function {\ color: #0000A2;\ }\ .ace-tm .ace_heading {\ color: rgb(12, 7, 255);\ }\ .ace-tm .ace_list {\ color:rgb(185, 6, 144);\ }\ .ace-tm .ace_meta.ace_tag {\ color:rgb(0, 22, 142);\ }\ .ace-tm .ace_string.ace_regex {\ color: rgb(255, 0, 0)\ }\ .ace-tm .ace_marker-layer .ace_selection {\ background: rgb(181, 213, 255);\ }\ .ace-tm.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px white;\ border-radius: 2px;\ }\ .ace-tm .ace_marker-layer .ace_step {\ background: rgb(252, 255, 0);\ }\ .ace-tm .ace_marker-layer .ace_stack {\ background: rgb(164, 229, 101);\ }\ .ace-tm .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid rgb(192, 192, 192);\ }\ .ace-tm .ace_marker-layer .ace_active-line {\ background: rgba(0, 0, 0, 0.07);\ }\ .ace-tm .ace_gutter-active-line {\ background-color : #dcdcdc;\ }\ .ace-tm .ace_marker-layer .ace_selected-word {\ background: rgb(250, 250, 255);\ border: 1px solid rgb(200, 200, 250);\ }\ .ace-tm .ace_indent-guide {\ background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ }\ "; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var dom = require("./lib/dom"); var Range = require("./range").Range; function LineWidgets(session) { this.session = session; this.session.widgetManager = this; this.session.getRowLength = this.getRowLength; this.session.$getWidgetScreenLength = this.$getWidgetScreenLength; this.updateOnChange = this.updateOnChange.bind(this); this.renderWidgets = this.renderWidgets.bind(this); this.measureWidgets = this.measureWidgets.bind(this); this.session._changedWidgets = []; this.$onChangeEditor = this.$onChangeEditor.bind(this); this.session.on("change", this.updateOnChange); this.session.on("changeEditor", this.$onChangeEditor); } (function() { this.getRowLength = function(row) { var h; if (this.lineWidgets) h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0; else h = 0; if (!this.$useWrapMode || !this.$wrapData[row]) { return 1 + h; } else { return this.$wrapData[row].length + 1 + h; } }; this.$getWidgetScreenLength = function() { var screenRows = 0; this.lineWidgets.forEach(function(w){ if (w && w.rowCount) screenRows +=w.rowCount; }); return screenRows; }; this.$onChangeEditor = function(e) { this.attach(e.editor); }; this.attach = function(editor) { if (editor && editor.widgetManager && editor.widgetManager != this) editor.widgetManager.detach(); if (this.editor == editor) return; this.detach(); this.editor = editor; if (editor) { editor.widgetManager = this; editor.renderer.on("beforeRender", this.measureWidgets); editor.renderer.on("afterRender", this.renderWidgets); } }; this.detach = function(e) { var editor = this.editor; if (!editor) return; this.editor = null; editor.widgetManager = null; editor.renderer.off("beforeRender", this.measureWidgets); editor.renderer.off("afterRender", this.renderWidgets); var lineWidgets = this.session.lineWidgets; lineWidgets && lineWidgets.forEach(function(w) { if (w && w.el && w.el.parentNode) { w._inDocument = false; w.el.parentNode.removeChild(w.el); } }); }; this.updateOnChange = function(e) { var lineWidgets = this.session.lineWidgets; if (!lineWidgets) return; var delta = e.data; var range = delta.range; var startRow = range.start.row; var len = range.end.row - startRow; if (len === 0) { } else if (delta.action == "removeText" || delta.action == "removeLines") { var removed = lineWidgets.splice(startRow + 1, len); removed.forEach(function(w) { w && this.removeLineWidget(w); }, this); this.$updateRows(); } else { var args = new Array(len); args.unshift(startRow, 0); lineWidgets.splice.apply(lineWidgets, args); this.$updateRows(); } }; this.$updateRows = function() { var lineWidgets = this.session.lineWidgets; if (!lineWidgets) return; var noWidgets = true; lineWidgets.forEach(function(w, i) { if (w) { noWidgets = false; w.row = i; } }); if (noWidgets) this.session.lineWidgets = null; }; this.addLineWidget = function(w) { if (!this.session.lineWidgets) this.session.lineWidgets = new Array(this.session.getLength()); this.session.lineWidgets[w.row] = w; var renderer = this.editor.renderer; if (w.html && !w.el) { w.el = dom.createElement("div"); w.el.innerHTML = w.html; } if (w.el) { dom.addCssClass(w.el, "ace_lineWidgetContainer"); w.el.style.position = "absolute"; w.el.style.zIndex = 5; renderer.container.appendChild(w.el); w._inDocument = true; } if (!w.coverGutter) { w.el.style.zIndex = 3; } if (!w.pixelHeight) { w.pixelHeight = w.el.offsetHeight; } if (w.rowCount == null) w.rowCount = w.pixelHeight / renderer.layerConfig.lineHeight; this.session._emit("changeFold", {data:{start:{row: w.row}}}); this.$updateRows(); this.renderWidgets(null, renderer); return w; }; this.removeLineWidget = function(w) { w._inDocument = false; if (w.el && w.el.parentNode) w.el.parentNode.removeChild(w.el); if (w.editor && w.editor.destroy) try { w.editor.destroy(); } catch(e){} if (this.session.lineWidgets) this.session.lineWidgets[w.row] = undefined; this.session._emit("changeFold", {data:{start:{row: w.row}}}); this.$updateRows(); }; this.onWidgetChanged = function(w) { this.session._changedWidgets.push(w); this.editor && this.editor.renderer.updateFull(); }; this.measureWidgets = function(e, renderer) { var changedWidgets = this.session._changedWidgets; var config = renderer.layerConfig; if (!changedWidgets || !changedWidgets.length) return; var min = Infinity; for (var i = 0; i < changedWidgets.length; i++) { var w = changedWidgets[i]; if (!w._inDocument) { w._inDocument = true; renderer.container.appendChild(w.el); } w.h = w.el.offsetHeight; if (!w.fixedWidth) { w.w = w.el.offsetWidth; w.screenWidth = Math.ceil(w.w / config.characterWidth); } var rowCount = w.h / config.lineHeight; if (w.coverLine) { rowCount -= this.session.getRowLineCount(w.row); if (rowCount < 0) rowCount = 0; } if (w.rowCount != rowCount) { w.rowCount = rowCount; if (w.row < min) min = w.row; } } if (min != Infinity) { this.session._emit("changeFold", {data:{start:{row: min}}}); this.session.lineWidgetWidth = null; } this.session._changedWidgets = []; }; this.renderWidgets = function(e, renderer) { var config = renderer.layerConfig; var lineWidgets = this.session.lineWidgets; if (!lineWidgets) return; var first = Math.min(this.firstRow, config.firstRow); var last = Math.max(this.lastRow, config.lastRow, lineWidgets.length); while (first > 0 && !lineWidgets[first]) first--; this.firstRow = config.firstRow; this.lastRow = config.lastRow; renderer.$cursorLayer.config = config; for (var i = first; i <= last; i++) { var w = lineWidgets[i]; if (!w || !w.el) continue; if (!w._inDocument) { w._inDocument = true; renderer.container.appendChild(w.el); } var top = renderer.$cursorLayer.getPixelPosition({row: i, column:0}, true).top; if (!w.coverLine) top += config.lineHeight * this.session.getRowLineCount(w.row); w.el.style.top = top - config.offset + "px"; var left = w.coverGutter ? 0 : renderer.gutterWidth; if (!w.fixedWidth) left -= renderer.scrollLeft; w.el.style.left = left + "px"; if (w.fixedWidth) { w.el.style.right = renderer.scrollBar.getWidth() + "px"; } else { w.el.style.right = ""; } } }; }).call(LineWidgets.prototype); exports.LineWidgets = LineWidgets; }); define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"], function(require, exports, module) { "use strict"; var LineWidgets = require("../line_widgets").LineWidgets; var dom = require("../lib/dom"); var Range = require("../range").Range; function binarySearch(array, needle, comparator) { var first = 0; var last = array.length - 1; while (first <= last) { var mid = (first + last) >> 1; var c = comparator(needle, array[mid]); if (c > 0) first = mid + 1; else if (c < 0) last = mid - 1; else return mid; } return -(first + 1); } function findAnnotations(session, row, dir) { var annotations = session.getAnnotations().sort(Range.comparePoints); if (!annotations.length) return; var i = binarySearch(annotations, {row: row, column: -1}, Range.comparePoints); if (i < 0) i = -i - 1; if (i >= annotations.length) i = dir > 0 ? 0 : annotations.length - 1; else if (i === 0 && dir < 0) i = annotations.length - 1; var annotation = annotations[i]; if (!annotation || !dir) return; if (annotation.row === row) { do { annotation = annotations[i += dir]; } while (annotation && annotation.row === row); if (!annotation) return annotations.slice(); } var matched = []; row = annotation.row; do { matched[dir < 0 ? "unshift" : "push"](annotation); annotation = annotations[i += dir]; } while (annotation && annotation.row == row); return matched.length && matched; } exports.showErrorMarker = function(editor, dir) { var session = editor.session; if (!session.widgetManager) { session.widgetManager = new LineWidgets(session); session.widgetManager.attach(editor); } var pos = editor.getCursorPosition(); var row = pos.row; var oldWidget = session.lineWidgets && session.lineWidgets[row]; if (oldWidget) { oldWidget.destroy(); } else { row -= dir; } var annotations = findAnnotations(session, row, dir); var gutterAnno; if (annotations) { var annotation = annotations[0]; pos.column = (annotation.pos && typeof annotation.column != "number" ? annotation.pos.sc : annotation.column) || 0; pos.row = annotation.row; gutterAnno = editor.renderer.$gutterLayer.$annotations[pos.row]; } else if (oldWidget) { return; } else { gutterAnno = { text: ["Looks good!"], className: "ace_ok" }; } editor.session.unfold(pos.row); editor.selection.moveToPosition(pos); var w = { row: pos.row, fixedWidth: true, coverGutter: true, el: dom.createElement("div") }; var el = w.el.appendChild(dom.createElement("div")); var arrow = w.el.appendChild(dom.createElement("div")); arrow.className = "error_widget_arrow " + gutterAnno.className; var left = editor.renderer.$cursorLayer .getPixelPosition(pos).left; arrow.style.left = left + editor.renderer.gutterWidth - 5 + "px"; w.el.className = "error_widget_wrapper"; el.className = "error_widget " + gutterAnno.className; el.innerHTML = gutterAnno.text.join("
    "); el.appendChild(dom.createElement("div")); var kb = function(_, hashId, keyString) { if (hashId === 0 && (keyString === "esc" || keyString === "return")) { w.destroy(); return {command: "null"}; } }; w.destroy = function() { if (editor.$mouseHandler.isMousePressed) return; editor.keyBinding.removeKeyboardHandler(kb); session.widgetManager.removeLineWidget(w); editor.off("changeSelection", w.destroy); editor.off("changeSession", w.destroy); editor.off("mouseup", w.destroy); editor.off("change", w.destroy); }; editor.keyBinding.addKeyboardHandler(kb); editor.on("changeSelection", w.destroy); editor.on("changeSession", w.destroy); editor.on("mouseup", w.destroy); editor.on("change", w.destroy); editor.session.widgetManager.addLineWidget(w); w.el.onmousedown = editor.focus.bind(editor); editor.renderer.scrollCursorIntoView(null, 0.5, {bottom: w.el.offsetHeight}); }; dom.importCssString("\ .error_widget_wrapper {\ background: inherit;\ color: inherit;\ border:none\ }\ .error_widget {\ border-top: solid 2px;\ border-bottom: solid 2px;\ margin: 5px 0;\ padding: 10px 40px;\ white-space: pre-wrap;\ }\ .error_widget.ace_error, .error_widget_arrow.ace_error{\ border-color: #ff5a5a\ }\ .error_widget.ace_warning, .error_widget_arrow.ace_warning{\ border-color: #F1D817\ }\ .error_widget.ace_info, .error_widget_arrow.ace_info{\ border-color: #5a5a5a\ }\ .error_widget.ace_ok, .error_widget_arrow.ace_ok{\ border-color: #5aaa5a\ }\ .error_widget_arrow {\ position: absolute;\ border: solid 5px;\ border-top-color: transparent!important;\ border-right-color: transparent!important;\ border-left-color: transparent!important;\ top: -5px;\ }\ ", ""); }); define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"], function(require, exports, module) { "use strict"; require("./lib/fixoldbrowsers"); var dom = require("./lib/dom"); var event = require("./lib/event"); var Editor = require("./editor").Editor; var EditSession = require("./edit_session").EditSession; var UndoManager = require("./undomanager").UndoManager; var Renderer = require("./virtual_renderer").VirtualRenderer; require("./worker/worker_client"); require("./keyboard/hash_handler"); require("./placeholder"); require("./multi_select"); require("./mode/folding/fold_mode"); require("./theme/textmate"); require("./ext/error_marker"); exports.config = require("./config"); exports.require = require; exports.edit = function(el) { if (typeof(el) == "string") { var _id = el; el = document.getElementById(_id); if (!el) throw new Error("ace.edit can't find div #" + _id); } if (el && el.env && el.env.editor instanceof Editor) return el.env.editor; var value = ""; if (el && /input|textarea/i.test(el.tagName)) { var oldNode = el; value = oldNode.value; el = dom.createElement("pre"); oldNode.parentNode.replaceChild(el, oldNode); } else { value = dom.getInnerText(el); el.innerHTML = ''; } var doc = exports.createEditSession(value); var editor = new Editor(new Renderer(el)); editor.setSession(doc); var env = { document: doc, editor: editor, onResize: editor.resize.bind(editor, null) }; if (oldNode) env.textarea = oldNode; event.addListener(window, "resize", env.onResize); editor.on("destroy", function() { event.removeListener(window, "resize", env.onResize); env.editor.container.env = null; // prevent memory leak on old ie }); editor.container.env = editor.env = env; return editor; }; exports.createEditSession = function(text, mode) { var doc = new EditSession(text, mode); doc.setUndoManager(new UndoManager()); return doc; } exports.EditSession = EditSession; exports.UndoManager = UndoManager; }); (function() { window.require(["ace/ace"], function(a) { a && a.config.init(true); if (!window.ace) window.ace = a; for (var key in a) if (a.hasOwnProperty(key)) window.ace[key] = a[key]; }); })(); minify-2.20.37/tests/js/corpus/dot.js000066400000000000000000000120521464346127300174070ustar00rootroot00000000000000// doT.js // 2011-2014, Laura Doktorova, https://github.com/olado/doT // Licensed under the MIT license. (function() { "use strict"; var doT = { version: "1.0.3", templateSettings: { evaluate: /\{\{([\s\S]+?(\}?)+)\}\}/g, interpolate: /\{\{=([\s\S]+?)\}\}/g, encode: /\{\{!([\s\S]+?)\}\}/g, use: /\{\{#([\s\S]+?)\}\}/g, useParams: /(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g, define: /\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g, defineParams:/^\s*([\w$]+):([\s\S]+)/, conditional: /\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g, iterate: /\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g, varname: "it", strip: true, append: true, selfcontained: false, doNotSkipEncoded: false }, template: undefined, //fn, compile template compile: undefined //fn, for express }, _globals; doT.encodeHTMLSource = function(doNotSkipEncoded) { var encodeHTMLRules = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "/": "/" }, matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g; return function(code) { return code ? code.toString().replace(matchHTML, function(m) {return encodeHTMLRules[m] || m;}) : ""; }; }; _globals = (function(){ return this || (0,eval)("this"); }()); if (typeof module !== "undefined" && module.exports) { module.exports = doT; } else if (typeof define === "function" && define.amd) { define(function(){return doT;}); } else { _globals.doT = doT; } var startend = { append: { start: "'+(", end: ")+'", startencode: "'+encodeHTML(" }, split: { start: "';out+=(", end: ");out+='", startencode: "';out+=encodeHTML(" } }, skip = /$^/; function resolveDefs(c, block, def) { return ((typeof block === "string") ? block : block.toString()) .replace(c.define || skip, function(m, code, assign, value) { if (code.indexOf("def.") === 0) { code = code.substring(4); } if (!(code in def)) { if (assign === ":") { if (c.defineParams) value.replace(c.defineParams, function(m, param, v) { def[code] = {arg: param, text: v}; }); if (!(code in def)) def[code]= value; } else { new Function("def", "def['"+code+"']=" + value)(def); } } return ""; }) .replace(c.use || skip, function(m, code) { if (c.useParams) code = code.replace(c.useParams, function(m, s, d, param) { if (def[d] && def[d].arg && param) { var rw = (d+":"+param).replace(/'|\\/g, "_"); def.__exp = def.__exp || {}; def.__exp[rw] = def[d].text.replace(new RegExp("(^|[^\\w$])" + def[d].arg + "([^\\w$])", "g"), "$1" + param + "$2"); return s + "def.__exp['"+rw+"']"; } }); var v = new Function("def", "return " + code)(def); return v ? resolveDefs(c, v, def) : v; }); } function unescape(code) { return code.replace(/\\('|\\)/g, "$1").replace(/[\r\t\n]/g, " "); } doT.template = function(tmpl, c, def) { c = c || doT.templateSettings; var cse = c.append ? startend.append : startend.split, needhtmlencode, sid = 0, indv, str = (c.use || c.define) ? resolveDefs(c, tmpl, def || {}) : tmpl; str = ("var out='" + (c.strip ? str.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g," ") .replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g,""): str) .replace(/'|\\/g, "\\$&") .replace(c.interpolate || skip, function(m, code) { return cse.start + unescape(code) + cse.end; }) .replace(c.encode || skip, function(m, code) { needhtmlencode = true; return cse.startencode + unescape(code) + cse.end; }) .replace(c.conditional || skip, function(m, elsecase, code) { return elsecase ? (code ? "';}else if(" + unescape(code) + "){out+='" : "';}else{out+='") : (code ? "';if(" + unescape(code) + "){out+='" : "';}out+='"); }) .replace(c.iterate || skip, function(m, iterate, vname, iname) { if (!iterate) return "';} } out+='"; sid+=1; indv=iname || "i"+sid; iterate=unescape(iterate); return "';var arr"+sid+"="+iterate+";if(arr"+sid+"){var "+vname+","+indv+"=-1,l"+sid+"=arr"+sid+".length-1;while("+indv+"= 0 ) && focusable( element, !isTabIndexNaN ); } }); // support: jQuery <1.8 if ( !$( "" ).outerWidth( 1 ).jquery ) { $.each( [ "Width", "Height" ], function( i, name ) { var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], type = name.toLowerCase(), orig = { innerWidth: $.fn.innerWidth, innerHeight: $.fn.innerHeight, outerWidth: $.fn.outerWidth, outerHeight: $.fn.outerHeight }; function reduce( elem, size, border, margin ) { $.each( side, function() { size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; if ( border ) { size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; } if ( margin ) { size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; } }); return size; } $.fn[ "inner" + name ] = function( size ) { if ( size === undefined ) { return orig[ "inner" + name ].call( this ); } return this.each(function() { $( this ).css( type, reduce( this, size ) + "px" ); }); }; $.fn[ "outer" + name] = function( size, margin ) { if ( typeof size !== "number" ) { return orig[ "outer" + name ].call( this, size ); } return this.each(function() { $( this).css( type, reduce( this, size, true, margin ) + "px" ); }); }; }); } // support: jQuery <1.8 if ( !$.fn.addBack ) { $.fn.addBack = function( selector ) { return this.add( selector == null ? this.prevObject : this.prevObject.filter( selector ) ); }; } // support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) if ( $( "" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { $.fn.removeData = (function( removeData ) { return function( key ) { if ( arguments.length ) { return removeData.call( this, $.camelCase( key ) ); } else { return removeData.call( this ); } }; })( $.fn.removeData ); } // deprecated $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); $.fn.extend({ focus: (function( orig ) { return function( delay, fn ) { return typeof delay === "number" ? this.each(function() { var elem = this; setTimeout(function() { $( elem ).focus(); if ( fn ) { fn.call( elem ); } }, delay ); }) : orig.apply( this, arguments ); }; })( $.fn.focus ), disableSelection: (function() { var eventType = "onselectstart" in document.createElement( "div" ) ? "selectstart" : "mousedown"; return function() { return this.bind( eventType + ".ui-disableSelection", function( event ) { event.preventDefault(); }); }; })(), enableSelection: function() { return this.unbind( ".ui-disableSelection" ); }, zIndex: function( zIndex ) { if ( zIndex !== undefined ) { return this.css( "zIndex", zIndex ); } if ( this.length ) { var elem = $( this[ 0 ] ), position, value; while ( elem.length && elem[ 0 ] !== document ) { // Ignore z-index if position is set to a value where z-index is ignored by the browser // This makes behavior of this function consistent across browsers // WebKit always returns auto if the element is positioned position = elem.css( "position" ); if ( position === "absolute" || position === "relative" || position === "fixed" ) { // IE returns 0 when zIndex is not specified // other browsers return a string // we ignore the case of nested elements with an explicit value of 0 //
    value = parseInt( elem.css( "zIndex" ), 10 ); if ( !isNaN( value ) && value !== 0 ) { return value; } } elem = elem.parent(); } } return 0; } }); // $.ui.plugin is deprecated. Use $.widget() extensions instead. $.ui.plugin = { add: function( module, option, set ) { var i, proto = $.ui[ module ].prototype; for ( i in set ) { proto.plugins[ i ] = proto.plugins[ i ] || []; proto.plugins[ i ].push( [ option, set[ i ] ] ); } }, call: function( instance, name, args, allowDisconnected ) { var i, set = instance.plugins[ name ]; if ( !set ) { return; } if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) { return; } for ( i = 0; i < set.length; i++ ) { if ( instance.options[ set[ i ][ 0 ] ] ) { set[ i ][ 1 ].apply( instance.element, args ); } } } }; /*! * jQuery UI Widget 1.11.3 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/jQuery.widget/ */ var widget_uuid = 0, widget_slice = Array.prototype.slice; $.cleanData = (function( orig ) { return function( elems ) { var events, elem, i; for ( i = 0; (elem = elems[i]) != null; i++ ) { try { // Only trigger remove when necessary to save time events = $._data( elem, "events" ); if ( events && events.remove ) { $( elem ).triggerHandler( "remove" ); } // http://bugs.jquery.com/ticket/8235 } catch ( e ) {} } orig( elems ); }; })( $.cleanData ); $.widget = function( name, base, prototype ) { var fullName, existingConstructor, constructor, basePrototype, // proxiedPrototype allows the provided prototype to remain unmodified // so that it can be used as a mixin for multiple widgets (#8876) proxiedPrototype = {}, namespace = name.split( "." )[ 0 ]; name = name.split( "." )[ 1 ]; fullName = namespace + "-" + name; if ( !prototype ) { prototype = base; base = $.Widget; } // create selector for plugin $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { return !!$.data( elem, fullName ); }; $[ namespace ] = $[ namespace ] || {}; existingConstructor = $[ namespace ][ name ]; constructor = $[ namespace ][ name ] = function( options, element ) { // allow instantiation without "new" keyword if ( !this._createWidget ) { return new constructor( options, element ); } // allow instantiation without initializing for simple inheritance // must use "new" keyword (the code above always passes args) if ( arguments.length ) { this._createWidget( options, element ); } }; // extend with the existing constructor to carry over any static properties $.extend( constructor, existingConstructor, { version: prototype.version, // copy the object used to create the prototype in case we need to // redefine the widget later _proto: $.extend( {}, prototype ), // track widgets that inherit from this widget in case this widget is // redefined after a widget inherits from it _childConstructors: [] }); basePrototype = new base(); // we need to make the options hash a property directly on the new instance // otherwise we'll modify the options hash on the prototype that we're // inheriting from basePrototype.options = $.widget.extend( {}, basePrototype.options ); $.each( prototype, function( prop, value ) { if ( !$.isFunction( value ) ) { proxiedPrototype[ prop ] = value; return; } proxiedPrototype[ prop ] = (function() { var _super = function() { return base.prototype[ prop ].apply( this, arguments ); }, _superApply = function( args ) { return base.prototype[ prop ].apply( this, args ); }; return function() { var __super = this._super, __superApply = this._superApply, returnValue; this._super = _super; this._superApply = _superApply; returnValue = value.apply( this, arguments ); this._super = __super; this._superApply = __superApply; return returnValue; }; })(); }); constructor.prototype = $.widget.extend( basePrototype, { // TODO: remove support for widgetEventPrefix // always use the name + a colon as the prefix, e.g., draggable:start // don't prefix for widgets that aren't DOM-based widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name }, proxiedPrototype, { constructor: constructor, namespace: namespace, widgetName: name, widgetFullName: fullName }); // If this widget is being redefined then we need to find all widgets that // are inheriting from it and redefine all of them so that they inherit from // the new version of this widget. We're essentially trying to replace one // level in the prototype chain. if ( existingConstructor ) { $.each( existingConstructor._childConstructors, function( i, child ) { var childPrototype = child.prototype; // redefine the child widget using the same prototype that was // originally used, but inherit from the new version of the base $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); }); // remove the list of existing child constructors from the old constructor // so the old child constructors can be garbage collected delete existingConstructor._childConstructors; } else { base._childConstructors.push( constructor ); } $.widget.bridge( name, constructor ); return constructor; }; $.widget.extend = function( target ) { var input = widget_slice.call( arguments, 1 ), inputIndex = 0, inputLength = input.length, key, value; for ( ; inputIndex < inputLength; inputIndex++ ) { for ( key in input[ inputIndex ] ) { value = input[ inputIndex ][ key ]; if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { // Clone objects if ( $.isPlainObject( value ) ) { target[ key ] = $.isPlainObject( target[ key ] ) ? $.widget.extend( {}, target[ key ], value ) : // Don't extend strings, arrays, etc. with objects $.widget.extend( {}, value ); // Copy everything else by reference } else { target[ key ] = value; } } } } return target; }; $.widget.bridge = function( name, object ) { var fullName = object.prototype.widgetFullName || name; $.fn[ name ] = function( options ) { var isMethodCall = typeof options === "string", args = widget_slice.call( arguments, 1 ), returnValue = this; if ( isMethodCall ) { this.each(function() { var methodValue, instance = $.data( this, fullName ); if ( options === "instance" ) { returnValue = instance; return false; } if ( !instance ) { return $.error( "cannot call methods on " + name + " prior to initialization; " + "attempted to call method '" + options + "'" ); } if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { return $.error( "no such method '" + options + "' for " + name + " widget instance" ); } methodValue = instance[ options ].apply( instance, args ); if ( methodValue !== instance && methodValue !== undefined ) { returnValue = methodValue && methodValue.jquery ? returnValue.pushStack( methodValue.get() ) : methodValue; return false; } }); } else { // Allow multiple hashes to be passed on init if ( args.length ) { options = $.widget.extend.apply( null, [ options ].concat(args) ); } this.each(function() { var instance = $.data( this, fullName ); if ( instance ) { instance.option( options || {} ); if ( instance._init ) { instance._init(); } } else { $.data( this, fullName, new object( options, this ) ); } }); } return returnValue; }; }; $.Widget = function( /* options, element */ ) {}; $.Widget._childConstructors = []; $.Widget.prototype = { widgetName: "widget", widgetEventPrefix: "", defaultElement: "
    ", options: { disabled: false, // callbacks create: null }, _createWidget: function( options, element ) { element = $( element || this.defaultElement || this )[ 0 ]; this.element = $( element ); this.uuid = widget_uuid++; this.eventNamespace = "." + this.widgetName + this.uuid; this.bindings = $(); this.hoverable = $(); this.focusable = $(); if ( element !== this ) { $.data( element, this.widgetFullName, this ); this._on( true, this.element, { remove: function( event ) { if ( event.target === element ) { this.destroy(); } } }); this.document = $( element.style ? // element within the document element.ownerDocument : // element is window or document element.document || element ); this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); } this.options = $.widget.extend( {}, this.options, this._getCreateOptions(), options ); this._create(); this._trigger( "create", null, this._getCreateEventData() ); this._init(); }, _getCreateOptions: $.noop, _getCreateEventData: $.noop, _create: $.noop, _init: $.noop, destroy: function() { this._destroy(); // we can probably remove the unbind calls in 2.0 // all event bindings should go through this._on() this.element .unbind( this.eventNamespace ) .removeData( this.widgetFullName ) // support: jquery <1.6.3 // http://bugs.jquery.com/ticket/9413 .removeData( $.camelCase( this.widgetFullName ) ); this.widget() .unbind( this.eventNamespace ) .removeAttr( "aria-disabled" ) .removeClass( this.widgetFullName + "-disabled " + "ui-state-disabled" ); // clean up events and states this.bindings.unbind( this.eventNamespace ); this.hoverable.removeClass( "ui-state-hover" ); this.focusable.removeClass( "ui-state-focus" ); }, _destroy: $.noop, widget: function() { return this.element; }, option: function( key, value ) { var options = key, parts, curOption, i; if ( arguments.length === 0 ) { // don't return a reference to the internal hash return $.widget.extend( {}, this.options ); } if ( typeof key === "string" ) { // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } options = {}; parts = key.split( "." ); key = parts.shift(); if ( parts.length ) { curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); for ( i = 0; i < parts.length - 1; i++ ) { curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; curOption = curOption[ parts[ i ] ]; } key = parts.pop(); if ( arguments.length === 1 ) { return curOption[ key ] === undefined ? null : curOption[ key ]; } curOption[ key ] = value; } else { if ( arguments.length === 1 ) { return this.options[ key ] === undefined ? null : this.options[ key ]; } options[ key ] = value; } } this._setOptions( options ); return this; }, _setOptions: function( options ) { var key; for ( key in options ) { this._setOption( key, options[ key ] ); } return this; }, _setOption: function( key, value ) { this.options[ key ] = value; if ( key === "disabled" ) { this.widget() .toggleClass( this.widgetFullName + "-disabled", !!value ); // If the widget is becoming disabled, then nothing is interactive if ( value ) { this.hoverable.removeClass( "ui-state-hover" ); this.focusable.removeClass( "ui-state-focus" ); } } return this; }, enable: function() { return this._setOptions({ disabled: false }); }, disable: function() { return this._setOptions({ disabled: true }); }, _on: function( suppressDisabledCheck, element, handlers ) { var delegateElement, instance = this; // no suppressDisabledCheck flag, shuffle arguments if ( typeof suppressDisabledCheck !== "boolean" ) { handlers = element; element = suppressDisabledCheck; suppressDisabledCheck = false; } // no element argument, shuffle and use this.element if ( !handlers ) { handlers = element; element = this.element; delegateElement = this.widget(); } else { element = delegateElement = $( element ); this.bindings = this.bindings.add( element ); } $.each( handlers, function( event, handler ) { function handlerProxy() { // allow widgets to customize the disabled handling // - disabled as an array instead of boolean // - disabled class as method for disabling individual parts if ( !suppressDisabledCheck && ( instance.options.disabled === true || $( this ).hasClass( "ui-state-disabled" ) ) ) { return; } return ( typeof handler === "string" ? instance[ handler ] : handler ) .apply( instance, arguments ); } // copy the guid so direct unbinding works if ( typeof handler !== "string" ) { handlerProxy.guid = handler.guid = handler.guid || handlerProxy.guid || $.guid++; } var match = event.match( /^([\w:-]*)\s*(.*)$/ ), eventName = match[1] + instance.eventNamespace, selector = match[2]; if ( selector ) { delegateElement.delegate( selector, eventName, handlerProxy ); } else { element.bind( eventName, handlerProxy ); } }); }, _off: function( element, eventName ) { eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; element.unbind( eventName ).undelegate( eventName ); // Clear the stack to avoid memory leaks (#10056) this.bindings = $( this.bindings.not( element ).get() ); this.focusable = $( this.focusable.not( element ).get() ); this.hoverable = $( this.hoverable.not( element ).get() ); }, _delay: function( handler, delay ) { function handlerProxy() { return ( typeof handler === "string" ? instance[ handler ] : handler ) .apply( instance, arguments ); } var instance = this; return setTimeout( handlerProxy, delay || 0 ); }, _hoverable: function( element ) { this.hoverable = this.hoverable.add( element ); this._on( element, { mouseenter: function( event ) { $( event.currentTarget ).addClass( "ui-state-hover" ); }, mouseleave: function( event ) { $( event.currentTarget ).removeClass( "ui-state-hover" ); } }); }, _focusable: function( element ) { this.focusable = this.focusable.add( element ); this._on( element, { focusin: function( event ) { $( event.currentTarget ).addClass( "ui-state-focus" ); }, focusout: function( event ) { $( event.currentTarget ).removeClass( "ui-state-focus" ); } }); }, _trigger: function( type, event, data ) { var prop, orig, callback = this.options[ type ]; data = data || {}; event = $.Event( event ); event.type = ( type === this.widgetEventPrefix ? type : this.widgetEventPrefix + type ).toLowerCase(); // the original event may come from any element // so we need to reset the target on the new event event.target = this.element[ 0 ]; // copy original event properties over to the new event orig = event.originalEvent; if ( orig ) { for ( prop in orig ) { if ( !( prop in event ) ) { event[ prop ] = orig[ prop ]; } } } this.element.trigger( event, data ); return !( $.isFunction( callback ) && callback.apply( this.element[0], [ event ].concat( data ) ) === false || event.isDefaultPrevented() ); } }; $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { if ( typeof options === "string" ) { options = { effect: options }; } var hasOptions, effectName = !options ? method : options === true || typeof options === "number" ? defaultEffect : options.effect || defaultEffect; options = options || {}; if ( typeof options === "number" ) { options = { duration: options }; } hasOptions = !$.isEmptyObject( options ); options.complete = callback; if ( options.delay ) { element.delay( options.delay ); } if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { element[ method ]( options ); } else if ( effectName !== method && element[ effectName ] ) { element[ effectName ]( options.duration, options.easing, callback ); } else { element.queue(function( next ) { $( this )[ method ](); if ( callback ) { callback.call( element[ 0 ] ); } next(); }); } }; }); var widget = $.widget; /*! * jQuery UI Mouse 1.11.3 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/mouse/ */ var mouseHandled = false; $( document ).mouseup( function() { mouseHandled = false; }); var mouse = $.widget("ui.mouse", { version: "1.11.3", options: { cancel: "input,textarea,button,select,option", distance: 1, delay: 0 }, _mouseInit: function() { var that = this; this.element .bind("mousedown." + this.widgetName, function(event) { return that._mouseDown(event); }) .bind("click." + this.widgetName, function(event) { if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) { $.removeData(event.target, that.widgetName + ".preventClickEvent"); event.stopImmediatePropagation(); return false; } }); this.started = false; }, // TODO: make sure destroying one instance of mouse doesn't mess with // other instances of mouse _mouseDestroy: function() { this.element.unbind("." + this.widgetName); if ( this._mouseMoveDelegate ) { this.document .unbind("mousemove." + this.widgetName, this._mouseMoveDelegate) .unbind("mouseup." + this.widgetName, this._mouseUpDelegate); } }, _mouseDown: function(event) { // don't let more than one widget handle mouseStart if ( mouseHandled ) { return; } this._mouseMoved = false; // we may have missed mouseup (out of window) (this._mouseStarted && this._mouseUp(event)); this._mouseDownEvent = event; var that = this, btnIsLeft = (event.which === 1), // event.target.nodeName works around a bug in IE 8 with // disabled inputs (#7620) elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false); if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { return true; } this.mouseDelayMet = !this.options.delay; if (!this.mouseDelayMet) { this._mouseDelayTimer = setTimeout(function() { that.mouseDelayMet = true; }, this.options.delay); } if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { this._mouseStarted = (this._mouseStart(event) !== false); if (!this._mouseStarted) { event.preventDefault(); return true; } } // Click event may never have fired (Gecko & Opera) if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) { $.removeData(event.target, this.widgetName + ".preventClickEvent"); } // these delegates are required to keep context this._mouseMoveDelegate = function(event) { return that._mouseMove(event); }; this._mouseUpDelegate = function(event) { return that._mouseUp(event); }; this.document .bind( "mousemove." + this.widgetName, this._mouseMoveDelegate ) .bind( "mouseup." + this.widgetName, this._mouseUpDelegate ); event.preventDefault(); mouseHandled = true; return true; }, _mouseMove: function(event) { // Only check for mouseups outside the document if you've moved inside the document // at least once. This prevents the firing of mouseup in the case of IE<9, which will // fire a mousemove event if content is placed under the cursor. See #7778 // Support: IE <9 if ( this._mouseMoved ) { // IE mouseup check - mouseup happened when mouse was out of window if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { return this._mouseUp(event); // Iframe mouseup check - mouseup occurred in another document } else if ( !event.which ) { return this._mouseUp( event ); } } if ( event.which || event.button ) { this._mouseMoved = true; } if (this._mouseStarted) { this._mouseDrag(event); return event.preventDefault(); } if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { this._mouseStarted = (this._mouseStart(this._mouseDownEvent, event) !== false); (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); } return !this._mouseStarted; }, _mouseUp: function(event) { this.document .unbind( "mousemove." + this.widgetName, this._mouseMoveDelegate ) .unbind( "mouseup." + this.widgetName, this._mouseUpDelegate ); if (this._mouseStarted) { this._mouseStarted = false; if (event.target === this._mouseDownEvent.target) { $.data(event.target, this.widgetName + ".preventClickEvent", true); } this._mouseStop(event); } mouseHandled = false; return false; }, _mouseDistanceMet: function(event) { return (Math.max( Math.abs(this._mouseDownEvent.pageX - event.pageX), Math.abs(this._mouseDownEvent.pageY - event.pageY) ) >= this.options.distance ); }, _mouseDelayMet: function(/* event */) { return this.mouseDelayMet; }, // These are placeholder methods, to be overriden by extending plugin _mouseStart: function(/* event */) {}, _mouseDrag: function(/* event */) {}, _mouseStop: function(/* event */) {}, _mouseCapture: function(/* event */) { return true; } }); /*! * jQuery UI Position 1.11.3 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/position/ */ (function() { $.ui = $.ui || {}; var cachedScrollbarWidth, supportsOffsetFractions, max = Math.max, abs = Math.abs, round = Math.round, rhorizontal = /left|center|right/, rvertical = /top|center|bottom/, roffset = /[\+\-]\d+(\.[\d]+)?%?/, rposition = /^\w+/, rpercent = /%$/, _position = $.fn.position; function getOffsets( offsets, width, height ) { return [ parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) ]; } function parseCss( element, property ) { return parseInt( $.css( element, property ), 10 ) || 0; } function getDimensions( elem ) { var raw = elem[0]; if ( raw.nodeType === 9 ) { return { width: elem.width(), height: elem.height(), offset: { top: 0, left: 0 } }; } if ( $.isWindow( raw ) ) { return { width: elem.width(), height: elem.height(), offset: { top: elem.scrollTop(), left: elem.scrollLeft() } }; } if ( raw.preventDefault ) { return { width: 0, height: 0, offset: { top: raw.pageY, left: raw.pageX } }; } return { width: elem.outerWidth(), height: elem.outerHeight(), offset: elem.offset() }; } $.position = { scrollbarWidth: function() { if ( cachedScrollbarWidth !== undefined ) { return cachedScrollbarWidth; } var w1, w2, div = $( "
    " ), innerDiv = div.children()[0]; $( "body" ).append( div ); w1 = innerDiv.offsetWidth; div.css( "overflow", "scroll" ); w2 = innerDiv.offsetWidth; if ( w1 === w2 ) { w2 = div[0].clientWidth; } div.remove(); return (cachedScrollbarWidth = w1 - w2); }, getScrollInfo: function( within ) { var overflowX = within.isWindow || within.isDocument ? "" : within.element.css( "overflow-x" ), overflowY = within.isWindow || within.isDocument ? "" : within.element.css( "overflow-y" ), hasOverflowX = overflowX === "scroll" || ( overflowX === "auto" && within.width < within.element[0].scrollWidth ), hasOverflowY = overflowY === "scroll" || ( overflowY === "auto" && within.height < within.element[0].scrollHeight ); return { width: hasOverflowY ? $.position.scrollbarWidth() : 0, height: hasOverflowX ? $.position.scrollbarWidth() : 0 }; }, getWithinInfo: function( element ) { var withinElement = $( element || window ), isWindow = $.isWindow( withinElement[0] ), isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9; return { element: withinElement, isWindow: isWindow, isDocument: isDocument, offset: withinElement.offset() || { left: 0, top: 0 }, scrollLeft: withinElement.scrollLeft(), scrollTop: withinElement.scrollTop(), // support: jQuery 1.6.x // jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(), height: isWindow || isDocument ? withinElement.height() : withinElement.outerHeight() }; } }; $.fn.position = function( options ) { if ( !options || !options.of ) { return _position.apply( this, arguments ); } // make a copy, we don't want to modify arguments options = $.extend( {}, options ); var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, target = $( options.of ), within = $.position.getWithinInfo( options.within ), scrollInfo = $.position.getScrollInfo( within ), collision = ( options.collision || "flip" ).split( " " ), offsets = {}; dimensions = getDimensions( target ); if ( target[0].preventDefault ) { // force left top to allow flipping options.at = "left top"; } targetWidth = dimensions.width; targetHeight = dimensions.height; targetOffset = dimensions.offset; // clone to reuse original targetOffset later basePosition = $.extend( {}, targetOffset ); // force my and at to have valid horizontal and vertical positions // if a value is missing or invalid, it will be converted to center $.each( [ "my", "at" ], function() { var pos = ( options[ this ] || "" ).split( " " ), horizontalOffset, verticalOffset; if ( pos.length === 1) { pos = rhorizontal.test( pos[ 0 ] ) ? pos.concat( [ "center" ] ) : rvertical.test( pos[ 0 ] ) ? [ "center" ].concat( pos ) : [ "center", "center" ]; } pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; // calculate offsets horizontalOffset = roffset.exec( pos[ 0 ] ); verticalOffset = roffset.exec( pos[ 1 ] ); offsets[ this ] = [ horizontalOffset ? horizontalOffset[ 0 ] : 0, verticalOffset ? verticalOffset[ 0 ] : 0 ]; // reduce to just the positions without the offsets options[ this ] = [ rposition.exec( pos[ 0 ] )[ 0 ], rposition.exec( pos[ 1 ] )[ 0 ] ]; }); // normalize collision option if ( collision.length === 1 ) { collision[ 1 ] = collision[ 0 ]; } if ( options.at[ 0 ] === "right" ) { basePosition.left += targetWidth; } else if ( options.at[ 0 ] === "center" ) { basePosition.left += targetWidth / 2; } if ( options.at[ 1 ] === "bottom" ) { basePosition.top += targetHeight; } else if ( options.at[ 1 ] === "center" ) { basePosition.top += targetHeight / 2; } atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); basePosition.left += atOffset[ 0 ]; basePosition.top += atOffset[ 1 ]; return this.each(function() { var collisionPosition, using, elem = $( this ), elemWidth = elem.outerWidth(), elemHeight = elem.outerHeight(), marginLeft = parseCss( this, "marginLeft" ), marginTop = parseCss( this, "marginTop" ), collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width, collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height, position = $.extend( {}, basePosition ), myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); if ( options.my[ 0 ] === "right" ) { position.left -= elemWidth; } else if ( options.my[ 0 ] === "center" ) { position.left -= elemWidth / 2; } if ( options.my[ 1 ] === "bottom" ) { position.top -= elemHeight; } else if ( options.my[ 1 ] === "center" ) { position.top -= elemHeight / 2; } position.left += myOffset[ 0 ]; position.top += myOffset[ 1 ]; // if the browser doesn't support fractions, then round for consistent results if ( !supportsOffsetFractions ) { position.left = round( position.left ); position.top = round( position.top ); } collisionPosition = { marginLeft: marginLeft, marginTop: marginTop }; $.each( [ "left", "top" ], function( i, dir ) { if ( $.ui.position[ collision[ i ] ] ) { $.ui.position[ collision[ i ] ][ dir ]( position, { targetWidth: targetWidth, targetHeight: targetHeight, elemWidth: elemWidth, elemHeight: elemHeight, collisionPosition: collisionPosition, collisionWidth: collisionWidth, collisionHeight: collisionHeight, offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], my: options.my, at: options.at, within: within, elem: elem }); } }); if ( options.using ) { // adds feedback as second argument to using callback, if present using = function( props ) { var left = targetOffset.left - position.left, right = left + targetWidth - elemWidth, top = targetOffset.top - position.top, bottom = top + targetHeight - elemHeight, feedback = { target: { element: target, left: targetOffset.left, top: targetOffset.top, width: targetWidth, height: targetHeight }, element: { element: elem, left: position.left, top: position.top, width: elemWidth, height: elemHeight }, horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" }; if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { feedback.horizontal = "center"; } if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { feedback.vertical = "middle"; } if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { feedback.important = "horizontal"; } else { feedback.important = "vertical"; } options.using.call( this, props, feedback ); }; } elem.offset( $.extend( position, { using: using } ) ); }); }; $.ui.position = { fit: { left: function( position, data ) { var within = data.within, withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, outerWidth = within.width, collisionPosLeft = position.left - data.collisionPosition.marginLeft, overLeft = withinOffset - collisionPosLeft, overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, newOverRight; // element is wider than within if ( data.collisionWidth > outerWidth ) { // element is initially over the left side of within if ( overLeft > 0 && overRight <= 0 ) { newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset; position.left += overLeft - newOverRight; // element is initially over right side of within } else if ( overRight > 0 && overLeft <= 0 ) { position.left = withinOffset; // element is initially over both left and right sides of within } else { if ( overLeft > overRight ) { position.left = withinOffset + outerWidth - data.collisionWidth; } else { position.left = withinOffset; } } // too far left -> align with left edge } else if ( overLeft > 0 ) { position.left += overLeft; // too far right -> align with right edge } else if ( overRight > 0 ) { position.left -= overRight; // adjust based on position and margin } else { position.left = max( position.left - collisionPosLeft, position.left ); } }, top: function( position, data ) { var within = data.within, withinOffset = within.isWindow ? within.scrollTop : within.offset.top, outerHeight = data.within.height, collisionPosTop = position.top - data.collisionPosition.marginTop, overTop = withinOffset - collisionPosTop, overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, newOverBottom; // element is taller than within if ( data.collisionHeight > outerHeight ) { // element is initially over the top of within if ( overTop > 0 && overBottom <= 0 ) { newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset; position.top += overTop - newOverBottom; // element is initially over bottom of within } else if ( overBottom > 0 && overTop <= 0 ) { position.top = withinOffset; // element is initially over both top and bottom of within } else { if ( overTop > overBottom ) { position.top = withinOffset + outerHeight - data.collisionHeight; } else { position.top = withinOffset; } } // too far up -> align with top } else if ( overTop > 0 ) { position.top += overTop; // too far down -> align with bottom edge } else if ( overBottom > 0 ) { position.top -= overBottom; // adjust based on position and margin } else { position.top = max( position.top - collisionPosTop, position.top ); } } }, flip: { left: function( position, data ) { var within = data.within, withinOffset = within.offset.left + within.scrollLeft, outerWidth = within.width, offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, collisionPosLeft = position.left - data.collisionPosition.marginLeft, overLeft = collisionPosLeft - offsetLeft, overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, myOffset = data.my[ 0 ] === "left" ? -data.elemWidth : data.my[ 0 ] === "right" ? data.elemWidth : 0, atOffset = data.at[ 0 ] === "left" ? data.targetWidth : data.at[ 0 ] === "right" ? -data.targetWidth : 0, offset = -2 * data.offset[ 0 ], newOverRight, newOverLeft; if ( overLeft < 0 ) { newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset; if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { position.left += myOffset + atOffset + offset; } } else if ( overRight > 0 ) { newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft; if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { position.left += myOffset + atOffset + offset; } } }, top: function( position, data ) { var within = data.within, withinOffset = within.offset.top + within.scrollTop, outerHeight = within.height, offsetTop = within.isWindow ? within.scrollTop : within.offset.top, collisionPosTop = position.top - data.collisionPosition.marginTop, overTop = collisionPosTop - offsetTop, overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, top = data.my[ 1 ] === "top", myOffset = top ? -data.elemHeight : data.my[ 1 ] === "bottom" ? data.elemHeight : 0, atOffset = data.at[ 1 ] === "top" ? data.targetHeight : data.at[ 1 ] === "bottom" ? -data.targetHeight : 0, offset = -2 * data.offset[ 1 ], newOverTop, newOverBottom; if ( overTop < 0 ) { newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset; if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) { position.top += myOffset + atOffset + offset; } } else if ( overBottom > 0 ) { newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop; if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) { position.top += myOffset + atOffset + offset; } } } }, flipfit: { left: function() { $.ui.position.flip.left.apply( this, arguments ); $.ui.position.fit.left.apply( this, arguments ); }, top: function() { $.ui.position.flip.top.apply( this, arguments ); $.ui.position.fit.top.apply( this, arguments ); } } }; // fraction support test (function() { var testElement, testElementParent, testElementStyle, offsetLeft, i, body = document.getElementsByTagName( "body" )[ 0 ], div = document.createElement( "div" ); //Create a "fake body" for testing based on method used in jQuery.support testElement = document.createElement( body ? "div" : "body" ); testElementStyle = { visibility: "hidden", width: 0, height: 0, border: 0, margin: 0, background: "none" }; if ( body ) { $.extend( testElementStyle, { position: "absolute", left: "-1000px", top: "-1000px" }); } for ( i in testElementStyle ) { testElement.style[ i ] = testElementStyle[ i ]; } testElement.appendChild( div ); testElementParent = body || document.documentElement; testElementParent.insertBefore( testElement, testElementParent.firstChild ); div.style.cssText = "position: absolute; left: 10.7432222px;"; offsetLeft = $( div ).offset().left; supportsOffsetFractions = offsetLeft > 10 && offsetLeft < 11; testElement.innerHTML = ""; testElementParent.removeChild( testElement ); })(); })(); var position = $.ui.position; /*! * jQuery UI Draggable 1.11.3 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/draggable/ */ $.widget("ui.draggable", $.ui.mouse, { version: "1.11.3", widgetEventPrefix: "drag", options: { addClasses: true, appendTo: "parent", axis: false, connectToSortable: false, containment: false, cursor: "auto", cursorAt: false, grid: false, handle: false, helper: "original", iframeFix: false, opacity: false, refreshPositions: false, revert: false, revertDuration: 500, scope: "default", scroll: true, scrollSensitivity: 20, scrollSpeed: 20, snap: false, snapMode: "both", snapTolerance: 20, stack: false, zIndex: false, // callbacks drag: null, start: null, stop: null }, _create: function() { if ( this.options.helper === "original" ) { this._setPositionRelative(); } if (this.options.addClasses){ this.element.addClass("ui-draggable"); } if (this.options.disabled){ this.element.addClass("ui-draggable-disabled"); } this._setHandleClassName(); this._mouseInit(); }, _setOption: function( key, value ) { this._super( key, value ); if ( key === "handle" ) { this._removeHandleClassName(); this._setHandleClassName(); } }, _destroy: function() { if ( ( this.helper || this.element ).is( ".ui-draggable-dragging" ) ) { this.destroyOnClear = true; return; } this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" ); this._removeHandleClassName(); this._mouseDestroy(); }, _mouseCapture: function(event) { var o = this.options; this._blurActiveElement( event ); // among others, prevent a drag on a resizable-handle if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) { return false; } //Quit if we're not on a valid handle this.handle = this._getHandle(event); if (!this.handle) { return false; } this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix ); return true; }, _blockFrames: function( selector ) { this.iframeBlocks = this.document.find( selector ).map(function() { var iframe = $( this ); return $( "
    " ) .css( "position", "absolute" ) .appendTo( iframe.parent() ) .outerWidth( iframe.outerWidth() ) .outerHeight( iframe.outerHeight() ) .offset( iframe.offset() )[ 0 ]; }); }, _unblockFrames: function() { if ( this.iframeBlocks ) { this.iframeBlocks.remove(); delete this.iframeBlocks; } }, _blurActiveElement: function( event ) { var document = this.document[ 0 ]; // Only need to blur if the event occurred on the draggable itself, see #10527 if ( !this.handleElement.is( event.target ) ) { return; } // support: IE9 // IE9 throws an "Unspecified error" accessing document.activeElement from an